freemium-survey-components 2.0.4 → 2.0.6

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 (670) hide show
  1. package/lib/index.cjs.js +6 -6
  2. package/lib/index.esm.js +5 -5
  3. package/lib/types/components/icons/WidgetClose.d.ts +3 -0
  4. package/lib/types/components/icons/WidgetMaximize.d.ts +3 -0
  5. package/lib/types/components/icons/WidgetMinimize.d.ts +3 -0
  6. package/lib/types/components/matrix-widget/index.d.ts +1 -0
  7. package/lib/types/stories/GalleryStory.d.ts +5 -0
  8. package/lib/types/stories/MatrixStory.d.ts +8 -0
  9. package/lib/types/stories/QuestionStory.d.ts +2 -1
  10. package/lib/types/survey/question.d.ts +1 -1
  11. package/package.json +1 -1
  12. package/storybook-static/1488.4ffdfb21.iframe.bundle.js +405 -0
  13. package/storybook-static/1488.4ffdfb21.iframe.bundle.js.LICENSE.txt +56 -0
  14. package/storybook-static/1488.4ffdfb21.iframe.bundle.js.map +1 -0
  15. package/storybook-static/22036.f61a05f1.iframe.bundle.js +1 -0
  16. package/storybook-static/22341.1e3f2340.iframe.bundle.js +1 -0
  17. package/storybook-static/23981.33b390c5.iframe.bundle.js +1 -0
  18. package/storybook-static/25290.da95bd76.iframe.bundle.js +2 -0
  19. package/storybook-static/25290.da95bd76.iframe.bundle.js.LICENSE.txt +27 -0
  20. package/storybook-static/3062.a3fcbc22.iframe.bundle.js +1 -0
  21. package/storybook-static/38922.db4e19bf.iframe.bundle.js +1 -0
  22. package/storybook-static/42077.cffe4cdf.iframe.bundle.js +95 -0
  23. package/storybook-static/42077.cffe4cdf.iframe.bundle.js.LICENSE.txt +16 -0
  24. package/storybook-static/42077.cffe4cdf.iframe.bundle.js.map +1 -0
  25. package/storybook-static/46169.bb101da3.iframe.bundle.js +1 -0
  26. package/storybook-static/47648.d0860258.iframe.bundle.js +1 -0
  27. package/storybook-static/53542.e2b5a389.iframe.bundle.js +2 -0
  28. package/storybook-static/53542.e2b5a389.iframe.bundle.js.LICENSE.txt +8 -0
  29. package/storybook-static/56410.1d81ebf6.iframe.bundle.js +1 -0
  30. package/storybook-static/59150.08c2b450.iframe.bundle.js +2 -0
  31. package/storybook-static/59150.08c2b450.iframe.bundle.js.LICENSE.txt +51 -0
  32. package/storybook-static/60260.b47b1b36.iframe.bundle.js +1 -0
  33. package/storybook-static/60414.d2cf05a1.iframe.bundle.js +1 -0
  34. package/storybook-static/63913.b49cd3b0.iframe.bundle.js +1 -0
  35. package/storybook-static/68666.7d8da127.iframe.bundle.js +1 -0
  36. package/storybook-static/7282.8467e4ad.iframe.bundle.js +1 -0
  37. package/storybook-static/86489.a4ba0111.iframe.bundle.js +1 -0
  38. package/storybook-static/89186.01b5f01f.iframe.bundle.js +1 -0
  39. package/storybook-static/92433.50567516.iframe.bundle.js +1 -0
  40. package/storybook-static/blueprint-icons-16px-paths.a5a9e793.iframe.bundle.js +1 -0
  41. package/storybook-static/blueprint-icons-20px-paths.8a077185.iframe.bundle.js +1 -0
  42. package/storybook-static/blueprint-icons-all-paths-loader.9c63719f.iframe.bundle.js +1 -0
  43. package/storybook-static/blueprint-icons-all-paths.5bc53fe7.iframe.bundle.js +1 -0
  44. package/storybook-static/blueprint-icons-split-paths-by-size-loader.d2f2b1c2.iframe.bundle.js +1 -0
  45. package/storybook-static/components-button-Button-stories.928b3fd9.iframe.bundle.js +2 -0
  46. package/storybook-static/components-button-Button-stories.928b3fd9.iframe.bundle.js.LICENSE.txt +8 -0
  47. package/storybook-static/components-checkbox-Checkbox-stories.fb24d93b.iframe.bundle.js +1 -0
  48. package/storybook-static/components-dropdown-Dropdown-stories.e130bd4b.iframe.bundle.js +1 -0
  49. package/storybook-static/components-pickers-DatePicker-stories.306d1b79.iframe.bundle.js +1 -0
  50. package/storybook-static/components-pickers-DateTimePicker-stories.2ab573db.iframe.bundle.js +1 -0
  51. package/storybook-static/components-radio-button-Radio-stories.ca7784a6.iframe.bundle.js +1 -0
  52. package/storybook-static/components-radio-button-RadioGroup-stories.37d0cc16.iframe.bundle.js +1 -0
  53. package/storybook-static/date-fns-locale-af-_lib-formatDistance-index-js.f102e7f0.iframe.bundle.js +1 -0
  54. package/storybook-static/date-fns-locale-af-_lib-formatLong-index-js.e8f8b0c9.iframe.bundle.js +1 -0
  55. package/storybook-static/date-fns-locale-af-_lib-formatRelative-index-js.ba4bb06c.iframe.bundle.js +1 -0
  56. package/storybook-static/date-fns-locale-af-_lib-localize-index-js.fc2440d2.iframe.bundle.js +1 -0
  57. package/storybook-static/date-fns-locale-af-_lib-match-index-js.da496b5e.iframe.bundle.js +1 -0
  58. package/storybook-static/date-fns-locale-af-index-js.7687b93b.iframe.bundle.js +1 -0
  59. package/storybook-static/date-fns-locale-ar-DZ-_lib-formatDistance-index-js.d20db258.iframe.bundle.js +1 -0
  60. package/storybook-static/date-fns-locale-ar-DZ-_lib-formatLong-index-js.175be990.iframe.bundle.js +1 -0
  61. package/storybook-static/date-fns-locale-ar-DZ-_lib-formatRelative-index-js.75a9d463.iframe.bundle.js +1 -0
  62. package/storybook-static/date-fns-locale-ar-DZ-_lib-localize-index-js.a0f6c6fb.iframe.bundle.js +1 -0
  63. package/storybook-static/date-fns-locale-ar-DZ-_lib-match-index-js.a0b68a49.iframe.bundle.js +1 -0
  64. package/storybook-static/date-fns-locale-ar-DZ-index-js.7821b9f5.iframe.bundle.js +1 -0
  65. package/storybook-static/date-fns-locale-ar-EG-_lib-formatDistance-index-js.6b44f676.iframe.bundle.js +1 -0
  66. package/storybook-static/date-fns-locale-ar-EG-_lib-formatLong-index-js.02e88134.iframe.bundle.js +1 -0
  67. package/storybook-static/date-fns-locale-ar-EG-_lib-formatRelative-index-js.7587055c.iframe.bundle.js +1 -0
  68. package/storybook-static/date-fns-locale-ar-EG-_lib-localize-index-js.76cfc2ad.iframe.bundle.js +1 -0
  69. package/storybook-static/date-fns-locale-ar-EG-_lib-match-index-js.af3db75f.iframe.bundle.js +1 -0
  70. package/storybook-static/date-fns-locale-ar-EG-index-js.ec16a1f6.iframe.bundle.js +1 -0
  71. package/storybook-static/date-fns-locale-ar-MA-_lib-formatDistance-index-js.5ff3e0a1.iframe.bundle.js +1 -0
  72. package/storybook-static/date-fns-locale-ar-MA-_lib-formatLong-index-js.45b98da0.iframe.bundle.js +1 -0
  73. package/storybook-static/date-fns-locale-ar-MA-_lib-formatRelative-index-js.0c7a121a.iframe.bundle.js +1 -0
  74. package/storybook-static/date-fns-locale-ar-MA-_lib-localize-index-js.73a6c5c4.iframe.bundle.js +1 -0
  75. package/storybook-static/date-fns-locale-ar-MA-_lib-match-index-js.0cad0c52.iframe.bundle.js +1 -0
  76. package/storybook-static/date-fns-locale-ar-MA-index-js.b55c5731.iframe.bundle.js +1 -0
  77. package/storybook-static/date-fns-locale-ar-SA-_lib-formatDistance-index-js.e552ed9e.iframe.bundle.js +1 -0
  78. package/storybook-static/date-fns-locale-ar-SA-_lib-formatLong-index-js.cd788f6a.iframe.bundle.js +1 -0
  79. package/storybook-static/date-fns-locale-ar-SA-_lib-formatRelative-index-js.7c935486.iframe.bundle.js +1 -0
  80. package/storybook-static/date-fns-locale-ar-SA-_lib-localize-index-js.6b440cc8.iframe.bundle.js +1 -0
  81. package/storybook-static/date-fns-locale-ar-SA-_lib-match-index-js.4988bfeb.iframe.bundle.js +1 -0
  82. package/storybook-static/date-fns-locale-ar-SA-index-js.c97fe7e0.iframe.bundle.js +1 -0
  83. package/storybook-static/date-fns-locale-ar-TN-_lib-formatDistance-index-js.cac4a997.iframe.bundle.js +1 -0
  84. package/storybook-static/date-fns-locale-ar-TN-_lib-formatLong-index-js.99294e55.iframe.bundle.js +1 -0
  85. package/storybook-static/date-fns-locale-ar-TN-_lib-formatRelative-index-js.67694815.iframe.bundle.js +1 -0
  86. package/storybook-static/date-fns-locale-ar-TN-_lib-localize-index-js.b33cc808.iframe.bundle.js +1 -0
  87. package/storybook-static/date-fns-locale-ar-TN-_lib-match-index-js.c4942e9b.iframe.bundle.js +1 -0
  88. package/storybook-static/date-fns-locale-ar-TN-index-js.6569298a.iframe.bundle.js +1 -0
  89. package/storybook-static/date-fns-locale-ar-_lib-formatDistance-index-js.e53308be.iframe.bundle.js +1 -0
  90. package/storybook-static/date-fns-locale-ar-_lib-formatLong-index-js.f9380b30.iframe.bundle.js +1 -0
  91. package/storybook-static/date-fns-locale-ar-_lib-formatRelative-index-js.4e3fa8eb.iframe.bundle.js +1 -0
  92. package/storybook-static/date-fns-locale-ar-_lib-localize-index-js.3570b460.iframe.bundle.js +1 -0
  93. package/storybook-static/date-fns-locale-ar-_lib-match-index-js.49c476e0.iframe.bundle.js +1 -0
  94. package/storybook-static/date-fns-locale-ar-index-js.ace73e55.iframe.bundle.js +1 -0
  95. package/storybook-static/date-fns-locale-az-_lib-formatDistance-index-js.001a6020.iframe.bundle.js +1 -0
  96. package/storybook-static/date-fns-locale-az-_lib-formatLong-index-js.36eda7d9.iframe.bundle.js +1 -0
  97. package/storybook-static/date-fns-locale-az-_lib-formatRelative-index-js.02929050.iframe.bundle.js +1 -0
  98. package/storybook-static/date-fns-locale-az-_lib-localize-index-js.11bcfcee.iframe.bundle.js +1 -0
  99. package/storybook-static/date-fns-locale-az-_lib-match-index-js.666080b6.iframe.bundle.js +1 -0
  100. package/storybook-static/date-fns-locale-az-index-js.536a5cd7.iframe.bundle.js +1 -0
  101. package/storybook-static/date-fns-locale-be-_lib-formatDistance-index-js.9ac20e2a.iframe.bundle.js +1 -0
  102. package/storybook-static/date-fns-locale-be-_lib-formatLong-index-js.ca92e5b7.iframe.bundle.js +1 -0
  103. package/storybook-static/date-fns-locale-be-_lib-formatRelative-index-js.1b6f2a85.iframe.bundle.js +1 -0
  104. package/storybook-static/date-fns-locale-be-_lib-localize-index-js.2c614676.iframe.bundle.js +1 -0
  105. package/storybook-static/date-fns-locale-be-_lib-match-index-js.f38da407.iframe.bundle.js +1 -0
  106. package/storybook-static/date-fns-locale-be-index-js.b7223d98.iframe.bundle.js +1 -0
  107. package/storybook-static/date-fns-locale-be-tarask-_lib-formatDistance-index-js.9f5a1df2.iframe.bundle.js +1 -0
  108. package/storybook-static/date-fns-locale-be-tarask-_lib-formatLong-index-js.2b870c5c.iframe.bundle.js +1 -0
  109. package/storybook-static/date-fns-locale-be-tarask-_lib-formatRelative-index-js.e87b5969.iframe.bundle.js +1 -0
  110. package/storybook-static/date-fns-locale-be-tarask-_lib-localize-index-js.cf418ec4.iframe.bundle.js +1 -0
  111. package/storybook-static/date-fns-locale-be-tarask-_lib-match-index-js.61474693.iframe.bundle.js +1 -0
  112. package/storybook-static/date-fns-locale-be-tarask-index-js.ec0126f0.iframe.bundle.js +1 -0
  113. package/storybook-static/date-fns-locale-bg-_lib-formatDistance-index-js.969cfc1b.iframe.bundle.js +1 -0
  114. package/storybook-static/date-fns-locale-bg-_lib-formatLong-index-js.c16055ef.iframe.bundle.js +1 -0
  115. package/storybook-static/date-fns-locale-bg-_lib-formatRelative-index-js.a5dccf6a.iframe.bundle.js +1 -0
  116. package/storybook-static/date-fns-locale-bg-_lib-localize-index-js.6c34648a.iframe.bundle.js +1 -0
  117. package/storybook-static/date-fns-locale-bg-_lib-match-index-js.db6c6a96.iframe.bundle.js +1 -0
  118. package/storybook-static/date-fns-locale-bg-index-js.f24205eb.iframe.bundle.js +1 -0
  119. package/storybook-static/date-fns-locale-bn-_lib-formatDistance-index-js.073b2939.iframe.bundle.js +1 -0
  120. package/storybook-static/date-fns-locale-bn-_lib-formatLong-index-js.2a08b69b.iframe.bundle.js +1 -0
  121. package/storybook-static/date-fns-locale-bn-_lib-formatRelative-index-js.0cf077ba.iframe.bundle.js +1 -0
  122. package/storybook-static/date-fns-locale-bn-_lib-localize-index-js.13f24593.iframe.bundle.js +1 -0
  123. package/storybook-static/date-fns-locale-bn-_lib-match-index-js.46ebf719.iframe.bundle.js +1 -0
  124. package/storybook-static/date-fns-locale-bn-index-js.24063746.iframe.bundle.js +1 -0
  125. package/storybook-static/date-fns-locale-bs-_lib-formatDistance-index-js.797ad063.iframe.bundle.js +1 -0
  126. package/storybook-static/date-fns-locale-bs-_lib-formatLong-index-js.abfffbc9.iframe.bundle.js +1 -0
  127. package/storybook-static/date-fns-locale-bs-_lib-formatRelative-index-js.9a232d13.iframe.bundle.js +1 -0
  128. package/storybook-static/date-fns-locale-bs-_lib-localize-index-js.706339c2.iframe.bundle.js +1 -0
  129. package/storybook-static/date-fns-locale-bs-_lib-match-index-js.f7714eaa.iframe.bundle.js +1 -0
  130. package/storybook-static/date-fns-locale-bs-index-js.552c3814.iframe.bundle.js +1 -0
  131. package/storybook-static/date-fns-locale-ca-_lib-formatDistance-index-js.5f00f37b.iframe.bundle.js +1 -0
  132. package/storybook-static/date-fns-locale-ca-_lib-formatLong-index-js.b9f77027.iframe.bundle.js +1 -0
  133. package/storybook-static/date-fns-locale-ca-_lib-formatRelative-index-js.97de9ae4.iframe.bundle.js +1 -0
  134. package/storybook-static/date-fns-locale-ca-_lib-localize-index-js.7ba52bbd.iframe.bundle.js +1 -0
  135. package/storybook-static/date-fns-locale-ca-_lib-match-index-js.c97693fa.iframe.bundle.js +1 -0
  136. package/storybook-static/date-fns-locale-ca-index-js.afaa425b.iframe.bundle.js +1 -0
  137. package/storybook-static/date-fns-locale-cs-_lib-formatDistance-index-js.a45377eb.iframe.bundle.js +1 -0
  138. package/storybook-static/date-fns-locale-cs-_lib-formatLong-index-js.1cb1dcec.iframe.bundle.js +1 -0
  139. package/storybook-static/date-fns-locale-cs-_lib-formatRelative-index-js.c3b65b71.iframe.bundle.js +1 -0
  140. package/storybook-static/date-fns-locale-cs-_lib-localize-index-js.b5558161.iframe.bundle.js +1 -0
  141. package/storybook-static/date-fns-locale-cs-_lib-match-index-js.7f303bcd.iframe.bundle.js +1 -0
  142. package/storybook-static/date-fns-locale-cs-index-js.f85bf269.iframe.bundle.js +1 -0
  143. package/storybook-static/date-fns-locale-cy-_lib-formatDistance-index-js.4f17587f.iframe.bundle.js +1 -0
  144. package/storybook-static/date-fns-locale-cy-_lib-formatLong-index-js.0ce7a90b.iframe.bundle.js +1 -0
  145. package/storybook-static/date-fns-locale-cy-_lib-formatRelative-index-js.709d3225.iframe.bundle.js +1 -0
  146. package/storybook-static/date-fns-locale-cy-_lib-localize-index-js.504cb687.iframe.bundle.js +1 -0
  147. package/storybook-static/date-fns-locale-cy-_lib-match-index-js.0493477a.iframe.bundle.js +1 -0
  148. package/storybook-static/date-fns-locale-cy-index-js.7794afe9.iframe.bundle.js +1 -0
  149. package/storybook-static/date-fns-locale-da-_lib-formatDistance-index-js.8df09149.iframe.bundle.js +1 -0
  150. package/storybook-static/date-fns-locale-da-_lib-formatLong-index-js.3e7f1431.iframe.bundle.js +1 -0
  151. package/storybook-static/date-fns-locale-da-_lib-formatRelative-index-js.2061a8ee.iframe.bundle.js +1 -0
  152. package/storybook-static/date-fns-locale-da-_lib-localize-index-js.c31bc7a0.iframe.bundle.js +1 -0
  153. package/storybook-static/date-fns-locale-da-_lib-match-index-js.73d52560.iframe.bundle.js +1 -0
  154. package/storybook-static/date-fns-locale-da-index-js.6f2693c8.iframe.bundle.js +1 -0
  155. package/storybook-static/date-fns-locale-de-AT-_lib-localize-index-js.3af6a849.iframe.bundle.js +1 -0
  156. package/storybook-static/date-fns-locale-de-AT-index-js.6d9d6da1.iframe.bundle.js +1 -0
  157. package/storybook-static/date-fns-locale-de-_lib-formatDistance-index-js.1830da33.iframe.bundle.js +1 -0
  158. package/storybook-static/date-fns-locale-de-_lib-formatLong-index-js.2520723b.iframe.bundle.js +1 -0
  159. package/storybook-static/date-fns-locale-de-_lib-formatRelative-index-js.93d695db.iframe.bundle.js +1 -0
  160. package/storybook-static/date-fns-locale-de-_lib-localize-index-js.2a931eb4.iframe.bundle.js +1 -0
  161. package/storybook-static/date-fns-locale-de-_lib-match-index-js.c3eee26c.iframe.bundle.js +1 -0
  162. package/storybook-static/date-fns-locale-de-index-js.1d9dd723.iframe.bundle.js +1 -0
  163. package/storybook-static/date-fns-locale-el-_lib-formatDistance-index-js.bbb44079.iframe.bundle.js +1 -0
  164. package/storybook-static/date-fns-locale-el-_lib-formatLong-index-js.53bbc9fa.iframe.bundle.js +1 -0
  165. package/storybook-static/date-fns-locale-el-_lib-formatRelative-index-js.79046a28.iframe.bundle.js +1 -0
  166. package/storybook-static/date-fns-locale-el-_lib-localize-index-js.7ed732c9.iframe.bundle.js +1 -0
  167. package/storybook-static/date-fns-locale-el-_lib-match-index-js.79879c8f.iframe.bundle.js +1 -0
  168. package/storybook-static/date-fns-locale-el-index-js.e4674359.iframe.bundle.js +1 -0
  169. package/storybook-static/date-fns-locale-en-AU-_lib-formatLong-index-js.f9dcff8c.iframe.bundle.js +1 -0
  170. package/storybook-static/date-fns-locale-en-AU-index-js.2239d7f0.iframe.bundle.js +1 -0
  171. package/storybook-static/date-fns-locale-en-CA-_lib-formatDistance-index-js.3e9853bb.iframe.bundle.js +1 -0
  172. package/storybook-static/date-fns-locale-en-CA-_lib-formatLong-index-js.5ea013f6.iframe.bundle.js +1 -0
  173. package/storybook-static/date-fns-locale-en-CA-index-js.40ba37d6.iframe.bundle.js +1 -0
  174. package/storybook-static/date-fns-locale-en-GB-_lib-formatLong-index-js.0c053443.iframe.bundle.js +1 -0
  175. package/storybook-static/date-fns-locale-en-GB-index-js.0abc9eee.iframe.bundle.js +1 -0
  176. package/storybook-static/date-fns-locale-en-IE-index-js.80d40ce0.iframe.bundle.js +1 -0
  177. package/storybook-static/date-fns-locale-en-IN-_lib-formatLong-index-js.77955be7.iframe.bundle.js +1 -0
  178. package/storybook-static/date-fns-locale-en-IN-index-js.fd6995aa.iframe.bundle.js +1 -0
  179. package/storybook-static/date-fns-locale-en-NZ-_lib-formatLong-index-js.59d48c6e.iframe.bundle.js +1 -0
  180. package/storybook-static/date-fns-locale-en-NZ-index-js.f173957a.iframe.bundle.js +1 -0
  181. package/storybook-static/date-fns-locale-en-ZA-_lib-formatLong-index-js.c7a86037.iframe.bundle.js +1 -0
  182. package/storybook-static/date-fns-locale-en-ZA-index-js.d31cf56b.iframe.bundle.js +1 -0
  183. package/storybook-static/date-fns-locale-eo-_lib-formatDistance-index-js.fb4762e5.iframe.bundle.js +1 -0
  184. package/storybook-static/date-fns-locale-eo-_lib-formatLong-index-js.a8764ed3.iframe.bundle.js +1 -0
  185. package/storybook-static/date-fns-locale-eo-_lib-formatRelative-index-js.ab818a81.iframe.bundle.js +1 -0
  186. package/storybook-static/date-fns-locale-eo-_lib-localize-index-js.1fd3b120.iframe.bundle.js +1 -0
  187. package/storybook-static/date-fns-locale-eo-_lib-match-index-js.def363ec.iframe.bundle.js +1 -0
  188. package/storybook-static/date-fns-locale-eo-index-js.395b0acf.iframe.bundle.js +1 -0
  189. package/storybook-static/date-fns-locale-es-_lib-formatDistance-index-js.3b6bf13e.iframe.bundle.js +1 -0
  190. package/storybook-static/date-fns-locale-es-_lib-formatLong-index-js.4cd12b01.iframe.bundle.js +1 -0
  191. package/storybook-static/date-fns-locale-es-_lib-formatRelative-index-js.d645fa48.iframe.bundle.js +1 -0
  192. package/storybook-static/date-fns-locale-es-_lib-localize-index-js.c84189fb.iframe.bundle.js +1 -0
  193. package/storybook-static/date-fns-locale-es-_lib-match-index-js.a863147b.iframe.bundle.js +1 -0
  194. package/storybook-static/date-fns-locale-es-index-js.f57c83f9.iframe.bundle.js +1 -0
  195. package/storybook-static/date-fns-locale-et-_lib-formatDistance-index-js.9b78be29.iframe.bundle.js +1 -0
  196. package/storybook-static/date-fns-locale-et-_lib-formatLong-index-js.05699a41.iframe.bundle.js +1 -0
  197. package/storybook-static/date-fns-locale-et-_lib-formatRelative-index-js.e8fd9f5a.iframe.bundle.js +1 -0
  198. package/storybook-static/date-fns-locale-et-_lib-localize-index-js.6eff8b87.iframe.bundle.js +1 -0
  199. package/storybook-static/date-fns-locale-et-_lib-match-index-js.d79b6d7f.iframe.bundle.js +1 -0
  200. package/storybook-static/date-fns-locale-et-index-js.54d5b53b.iframe.bundle.js +1 -0
  201. package/storybook-static/date-fns-locale-eu-_lib-formatDistance-index-js.90ae3b86.iframe.bundle.js +1 -0
  202. package/storybook-static/date-fns-locale-eu-_lib-formatLong-index-js.c2f8aa94.iframe.bundle.js +1 -0
  203. package/storybook-static/date-fns-locale-eu-_lib-formatRelative-index-js.5e5140b0.iframe.bundle.js +1 -0
  204. package/storybook-static/date-fns-locale-eu-_lib-localize-index-js.4bf3dc07.iframe.bundle.js +1 -0
  205. package/storybook-static/date-fns-locale-eu-_lib-match-index-js.213154e5.iframe.bundle.js +1 -0
  206. package/storybook-static/date-fns-locale-eu-index-js.2752888d.iframe.bundle.js +1 -0
  207. package/storybook-static/date-fns-locale-fa-IR-_lib-formatDistance-index-js.874ad5b6.iframe.bundle.js +1 -0
  208. package/storybook-static/date-fns-locale-fa-IR-_lib-formatLong-index-js.d95bd046.iframe.bundle.js +1 -0
  209. package/storybook-static/date-fns-locale-fa-IR-_lib-formatRelative-index-js.c2f532d1.iframe.bundle.js +1 -0
  210. package/storybook-static/date-fns-locale-fa-IR-_lib-localize-index-js.4f62bfe6.iframe.bundle.js +1 -0
  211. package/storybook-static/date-fns-locale-fa-IR-_lib-match-index-js.85e9e6fb.iframe.bundle.js +1 -0
  212. package/storybook-static/date-fns-locale-fa-IR-index-js.786cbe59.iframe.bundle.js +1 -0
  213. package/storybook-static/date-fns-locale-fi-_lib-formatDistance-index-js.8a63be88.iframe.bundle.js +1 -0
  214. package/storybook-static/date-fns-locale-fi-_lib-formatLong-index-js.19a5817d.iframe.bundle.js +1 -0
  215. package/storybook-static/date-fns-locale-fi-_lib-formatRelative-index-js.70294fb9.iframe.bundle.js +1 -0
  216. package/storybook-static/date-fns-locale-fi-_lib-localize-index-js.89472ced.iframe.bundle.js +1 -0
  217. package/storybook-static/date-fns-locale-fi-_lib-match-index-js.bb18602b.iframe.bundle.js +1 -0
  218. package/storybook-static/date-fns-locale-fi-index-js.6091fb4d.iframe.bundle.js +1 -0
  219. package/storybook-static/date-fns-locale-fr-CA-_lib-formatLong-index-js.5bb51bae.iframe.bundle.js +1 -0
  220. package/storybook-static/date-fns-locale-fr-CA-index-js.2fc90d73.iframe.bundle.js +1 -0
  221. package/storybook-static/date-fns-locale-fr-CH-_lib-formatLong-index-js.43bec06e.iframe.bundle.js +1 -0
  222. package/storybook-static/date-fns-locale-fr-CH-_lib-formatRelative-index-js.f8b1b01f.iframe.bundle.js +1 -0
  223. package/storybook-static/date-fns-locale-fr-CH-index-js.0ba8c544.iframe.bundle.js +1 -0
  224. package/storybook-static/date-fns-locale-fr-_lib-formatDistance-index-js.5045db96.iframe.bundle.js +1 -0
  225. package/storybook-static/date-fns-locale-fr-_lib-formatLong-index-js.4a4015ce.iframe.bundle.js +1 -0
  226. package/storybook-static/date-fns-locale-fr-_lib-formatRelative-index-js.481dcbf2.iframe.bundle.js +1 -0
  227. package/storybook-static/date-fns-locale-fr-_lib-localize-index-js.badef843.iframe.bundle.js +1 -0
  228. package/storybook-static/date-fns-locale-fr-_lib-match-index-js.558ca345.iframe.bundle.js +1 -0
  229. package/storybook-static/date-fns-locale-fr-index-js.d635fe7c.iframe.bundle.js +1 -0
  230. package/storybook-static/date-fns-locale-fy-_lib-formatDistance-index-js.ea6eb1d9.iframe.bundle.js +1 -0
  231. package/storybook-static/date-fns-locale-fy-_lib-formatLong-index-js.871ac84c.iframe.bundle.js +1 -0
  232. package/storybook-static/date-fns-locale-fy-_lib-formatRelative-index-js.2018ac98.iframe.bundle.js +1 -0
  233. package/storybook-static/date-fns-locale-fy-_lib-localize-index-js.591b64f4.iframe.bundle.js +1 -0
  234. package/storybook-static/date-fns-locale-fy-_lib-match-index-js.6a607c0d.iframe.bundle.js +1 -0
  235. package/storybook-static/date-fns-locale-fy-index-js.b0f18165.iframe.bundle.js +1 -0
  236. package/storybook-static/date-fns-locale-gd-_lib-formatDistance-index-js.17830c08.iframe.bundle.js +1 -0
  237. package/storybook-static/date-fns-locale-gd-_lib-formatLong-index-js.dbb6fdc4.iframe.bundle.js +1 -0
  238. package/storybook-static/date-fns-locale-gd-_lib-formatRelative-index-js.adfb4963.iframe.bundle.js +1 -0
  239. package/storybook-static/date-fns-locale-gd-_lib-localize-index-js.66608627.iframe.bundle.js +1 -0
  240. package/storybook-static/date-fns-locale-gd-_lib-match-index-js.065b85bb.iframe.bundle.js +1 -0
  241. package/storybook-static/date-fns-locale-gd-index-js.e43c03b1.iframe.bundle.js +1 -0
  242. package/storybook-static/date-fns-locale-gl-_lib-formatDistance-index-js.cd803f0b.iframe.bundle.js +1 -0
  243. package/storybook-static/date-fns-locale-gl-_lib-formatLong-index-js.f71fd652.iframe.bundle.js +1 -0
  244. package/storybook-static/date-fns-locale-gl-_lib-formatRelative-index-js.2aba7820.iframe.bundle.js +1 -0
  245. package/storybook-static/date-fns-locale-gl-_lib-localize-index-js.51413fbb.iframe.bundle.js +1 -0
  246. package/storybook-static/date-fns-locale-gl-_lib-match-index-js.bc2942e5.iframe.bundle.js +1 -0
  247. package/storybook-static/date-fns-locale-gl-index-js.fce6fab0.iframe.bundle.js +1 -0
  248. package/storybook-static/date-fns-locale-gu-_lib-formatDistance-index-js.1125b1d8.iframe.bundle.js +1 -0
  249. package/storybook-static/date-fns-locale-gu-_lib-formatLong-index-js.8a45f7ce.iframe.bundle.js +1 -0
  250. package/storybook-static/date-fns-locale-gu-_lib-formatRelative-index-js.b931c2c2.iframe.bundle.js +1 -0
  251. package/storybook-static/date-fns-locale-gu-_lib-localize-index-js.91c352eb.iframe.bundle.js +1 -0
  252. package/storybook-static/date-fns-locale-gu-_lib-match-index-js.1c41913a.iframe.bundle.js +1 -0
  253. package/storybook-static/date-fns-locale-gu-index-js.6dd70243.iframe.bundle.js +1 -0
  254. package/storybook-static/date-fns-locale-he-_lib-formatDistance-index-js.6c325723.iframe.bundle.js +1 -0
  255. package/storybook-static/date-fns-locale-he-_lib-formatLong-index-js.54f3e0fe.iframe.bundle.js +1 -0
  256. package/storybook-static/date-fns-locale-he-_lib-formatRelative-index-js.31b5d6d7.iframe.bundle.js +1 -0
  257. package/storybook-static/date-fns-locale-he-_lib-localize-index-js.8a67fd4c.iframe.bundle.js +1 -0
  258. package/storybook-static/date-fns-locale-he-_lib-match-index-js.4072072c.iframe.bundle.js +1 -0
  259. package/storybook-static/date-fns-locale-he-index-js.83306490.iframe.bundle.js +1 -0
  260. package/storybook-static/date-fns-locale-hi-_lib-formatDistance-index-js.82b5246f.iframe.bundle.js +1 -0
  261. package/storybook-static/date-fns-locale-hi-_lib-formatLong-index-js.3bd67564.iframe.bundle.js +1 -0
  262. package/storybook-static/date-fns-locale-hi-_lib-formatRelative-index-js.10ba8813.iframe.bundle.js +1 -0
  263. package/storybook-static/date-fns-locale-hi-_lib-localize-index-js.f05b2af7.iframe.bundle.js +1 -0
  264. package/storybook-static/date-fns-locale-hi-_lib-match-index-js.719bb232.iframe.bundle.js +1 -0
  265. package/storybook-static/date-fns-locale-hi-index-js.ee28336e.iframe.bundle.js +1 -0
  266. package/storybook-static/date-fns-locale-hr-_lib-formatDistance-index-js.f775b33f.iframe.bundle.js +1 -0
  267. package/storybook-static/date-fns-locale-hr-_lib-formatLong-index-js.46259b80.iframe.bundle.js +1 -0
  268. package/storybook-static/date-fns-locale-hr-_lib-formatRelative-index-js.f9577817.iframe.bundle.js +1 -0
  269. package/storybook-static/date-fns-locale-hr-_lib-localize-index-js.e1b09f59.iframe.bundle.js +1 -0
  270. package/storybook-static/date-fns-locale-hr-_lib-match-index-js.a4a3f9ba.iframe.bundle.js +1 -0
  271. package/storybook-static/date-fns-locale-hr-index-js.914dce4b.iframe.bundle.js +1 -0
  272. package/storybook-static/date-fns-locale-ht-_lib-formatDistance-index-js.be4b0dbd.iframe.bundle.js +1 -0
  273. package/storybook-static/date-fns-locale-ht-_lib-formatLong-index-js.6f4fd115.iframe.bundle.js +1 -0
  274. package/storybook-static/date-fns-locale-ht-_lib-formatRelative-index-js.46486729.iframe.bundle.js +1 -0
  275. package/storybook-static/date-fns-locale-ht-_lib-localize-index-js.384d5ec4.iframe.bundle.js +1 -0
  276. package/storybook-static/date-fns-locale-ht-_lib-match-index-js.760f7db6.iframe.bundle.js +1 -0
  277. package/storybook-static/date-fns-locale-ht-index-js.643b8a0e.iframe.bundle.js +1 -0
  278. package/storybook-static/date-fns-locale-hu-_lib-formatDistance-index-js.575293f2.iframe.bundle.js +1 -0
  279. package/storybook-static/date-fns-locale-hu-_lib-formatLong-index-js.68ebd17a.iframe.bundle.js +1 -0
  280. package/storybook-static/date-fns-locale-hu-_lib-formatRelative-index-js.fe37fdf0.iframe.bundle.js +1 -0
  281. package/storybook-static/date-fns-locale-hu-_lib-localize-index-js.2adc7c46.iframe.bundle.js +1 -0
  282. package/storybook-static/date-fns-locale-hu-_lib-match-index-js.4416438e.iframe.bundle.js +1 -0
  283. package/storybook-static/date-fns-locale-hu-index-js.930fe2f0.iframe.bundle.js +1 -0
  284. package/storybook-static/date-fns-locale-hy-_lib-formatDistance-index-js.acd7f4e6.iframe.bundle.js +1 -0
  285. package/storybook-static/date-fns-locale-hy-_lib-formatLong-index-js.6df872f3.iframe.bundle.js +1 -0
  286. package/storybook-static/date-fns-locale-hy-_lib-formatRelative-index-js.dae744f8.iframe.bundle.js +1 -0
  287. package/storybook-static/date-fns-locale-hy-_lib-localize-index-js.6fd47924.iframe.bundle.js +1 -0
  288. package/storybook-static/date-fns-locale-hy-_lib-match-index-js.09ff5029.iframe.bundle.js +1 -0
  289. package/storybook-static/date-fns-locale-hy-index-js.e1062476.iframe.bundle.js +1 -0
  290. package/storybook-static/date-fns-locale-id-_lib-formatDistance-index-js.978833bb.iframe.bundle.js +1 -0
  291. package/storybook-static/date-fns-locale-id-_lib-formatLong-index-js.580dc34a.iframe.bundle.js +1 -0
  292. package/storybook-static/date-fns-locale-id-_lib-formatRelative-index-js.48db519d.iframe.bundle.js +1 -0
  293. package/storybook-static/date-fns-locale-id-_lib-localize-index-js.1c9cd156.iframe.bundle.js +1 -0
  294. package/storybook-static/date-fns-locale-id-_lib-match-index-js.5f8f47ae.iframe.bundle.js +1 -0
  295. package/storybook-static/date-fns-locale-id-index-js.014ba7e6.iframe.bundle.js +1 -0
  296. package/storybook-static/date-fns-locale-is-_lib-formatDistance-index-js.4ab48d06.iframe.bundle.js +1 -0
  297. package/storybook-static/date-fns-locale-is-_lib-formatLong-index-js.a682b491.iframe.bundle.js +1 -0
  298. package/storybook-static/date-fns-locale-is-_lib-formatRelative-index-js.a17c5c17.iframe.bundle.js +1 -0
  299. package/storybook-static/date-fns-locale-is-_lib-localize-index-js.eed29880.iframe.bundle.js +1 -0
  300. package/storybook-static/date-fns-locale-is-_lib-match-index-js.66b036b5.iframe.bundle.js +1 -0
  301. package/storybook-static/date-fns-locale-is-index-js.4ae22ee0.iframe.bundle.js +1 -0
  302. package/storybook-static/date-fns-locale-it-CH-_lib-formatLong-index-js.1adf1a4f.iframe.bundle.js +1 -0
  303. package/storybook-static/date-fns-locale-it-CH-index-js.46c3adf5.iframe.bundle.js +1 -0
  304. package/storybook-static/date-fns-locale-it-_lib-formatDistance-index-js.e0c8f8a5.iframe.bundle.js +1 -0
  305. package/storybook-static/date-fns-locale-it-_lib-formatLong-index-js.747dc161.iframe.bundle.js +1 -0
  306. package/storybook-static/date-fns-locale-it-_lib-formatRelative-index-js.858c28a9.iframe.bundle.js +1 -0
  307. package/storybook-static/date-fns-locale-it-_lib-localize-index-js.4bca71ee.iframe.bundle.js +1 -0
  308. package/storybook-static/date-fns-locale-it-_lib-match-index-js.0cd51d55.iframe.bundle.js +1 -0
  309. package/storybook-static/date-fns-locale-it-index-js.ed68413f.iframe.bundle.js +1 -0
  310. package/storybook-static/date-fns-locale-ja-Hira-_lib-formatDistance-index-js.315f751c.iframe.bundle.js +1 -0
  311. package/storybook-static/date-fns-locale-ja-Hira-_lib-formatLong-index-js.35f129f4.iframe.bundle.js +1 -0
  312. package/storybook-static/date-fns-locale-ja-Hira-_lib-formatRelative-index-js.478530ec.iframe.bundle.js +1 -0
  313. package/storybook-static/date-fns-locale-ja-Hira-_lib-localize-index-js.43354614.iframe.bundle.js +1 -0
  314. package/storybook-static/date-fns-locale-ja-Hira-_lib-match-index-js.7bcd59ab.iframe.bundle.js +1 -0
  315. package/storybook-static/date-fns-locale-ja-Hira-index-js.55ebcb61.iframe.bundle.js +1 -0
  316. package/storybook-static/date-fns-locale-ja-_lib-formatDistance-index-js.0c2e6f86.iframe.bundle.js +1 -0
  317. package/storybook-static/date-fns-locale-ja-_lib-formatLong-index-js.e931f80a.iframe.bundle.js +1 -0
  318. package/storybook-static/date-fns-locale-ja-_lib-formatRelative-index-js.5d144dc5.iframe.bundle.js +1 -0
  319. package/storybook-static/date-fns-locale-ja-_lib-localize-index-js.45be734a.iframe.bundle.js +1 -0
  320. package/storybook-static/date-fns-locale-ja-_lib-match-index-js.a2151c55.iframe.bundle.js +1 -0
  321. package/storybook-static/date-fns-locale-ja-index-js.ccc76ede.iframe.bundle.js +1 -0
  322. package/storybook-static/date-fns-locale-ka-_lib-formatDistance-index-js.d87bea7c.iframe.bundle.js +1 -0
  323. package/storybook-static/date-fns-locale-ka-_lib-formatLong-index-js.dcc4b877.iframe.bundle.js +1 -0
  324. package/storybook-static/date-fns-locale-ka-_lib-formatRelative-index-js.463d4b4d.iframe.bundle.js +1 -0
  325. package/storybook-static/date-fns-locale-ka-_lib-localize-index-js.57b07834.iframe.bundle.js +1 -0
  326. package/storybook-static/date-fns-locale-ka-_lib-match-index-js.c63568a4.iframe.bundle.js +1 -0
  327. package/storybook-static/date-fns-locale-ka-index-js.ba43f105.iframe.bundle.js +1 -0
  328. package/storybook-static/date-fns-locale-kk-_lib-formatDistance-index-js.a241958c.iframe.bundle.js +1 -0
  329. package/storybook-static/date-fns-locale-kk-_lib-formatLong-index-js.e6e2efb6.iframe.bundle.js +1 -0
  330. package/storybook-static/date-fns-locale-kk-_lib-formatRelative-index-js.5b91e707.iframe.bundle.js +1 -0
  331. package/storybook-static/date-fns-locale-kk-_lib-localize-index-js.fe879dd1.iframe.bundle.js +1 -0
  332. package/storybook-static/date-fns-locale-kk-_lib-match-index-js.ed09afd6.iframe.bundle.js +1 -0
  333. package/storybook-static/date-fns-locale-kk-index-js.9a9757f8.iframe.bundle.js +1 -0
  334. package/storybook-static/date-fns-locale-km-_lib-formatDistance-index-js.d05836d0.iframe.bundle.js +1 -0
  335. package/storybook-static/date-fns-locale-km-_lib-formatLong-index-js.856f6d10.iframe.bundle.js +1 -0
  336. package/storybook-static/date-fns-locale-km-_lib-formatRelative-index-js.67b5e4b1.iframe.bundle.js +1 -0
  337. package/storybook-static/date-fns-locale-km-_lib-localize-index-js.70692e4e.iframe.bundle.js +1 -0
  338. package/storybook-static/date-fns-locale-km-_lib-match-index-js.24b7e94a.iframe.bundle.js +1 -0
  339. package/storybook-static/date-fns-locale-km-index-js.a43fc383.iframe.bundle.js +1 -0
  340. package/storybook-static/date-fns-locale-kn-_lib-formatDistance-index-js.7bf74d46.iframe.bundle.js +1 -0
  341. package/storybook-static/date-fns-locale-kn-_lib-formatLong-index-js.8e018c57.iframe.bundle.js +1 -0
  342. package/storybook-static/date-fns-locale-kn-_lib-formatRelative-index-js.a2f09608.iframe.bundle.js +1 -0
  343. package/storybook-static/date-fns-locale-kn-_lib-localize-index-js.56348987.iframe.bundle.js +1 -0
  344. package/storybook-static/date-fns-locale-kn-_lib-match-index-js.a38cb049.iframe.bundle.js +1 -0
  345. package/storybook-static/date-fns-locale-kn-index-js.461d3032.iframe.bundle.js +1 -0
  346. package/storybook-static/date-fns-locale-ko-_lib-formatDistance-index-js.397df461.iframe.bundle.js +1 -0
  347. package/storybook-static/date-fns-locale-ko-_lib-formatLong-index-js.4e352106.iframe.bundle.js +1 -0
  348. package/storybook-static/date-fns-locale-ko-_lib-formatRelative-index-js.d000a764.iframe.bundle.js +1 -0
  349. package/storybook-static/date-fns-locale-ko-_lib-localize-index-js.cb5da07e.iframe.bundle.js +1 -0
  350. package/storybook-static/date-fns-locale-ko-_lib-match-index-js.4fdf600a.iframe.bundle.js +1 -0
  351. package/storybook-static/date-fns-locale-ko-index-js.552065b3.iframe.bundle.js +1 -0
  352. package/storybook-static/date-fns-locale-lb-_lib-formatDistance-index-js.4bef1ccf.iframe.bundle.js +1 -0
  353. package/storybook-static/date-fns-locale-lb-_lib-formatLong-index-js.11d23647.iframe.bundle.js +1 -0
  354. package/storybook-static/date-fns-locale-lb-_lib-formatRelative-index-js.236be17b.iframe.bundle.js +1 -0
  355. package/storybook-static/date-fns-locale-lb-_lib-localize-index-js.5cecd7bb.iframe.bundle.js +1 -0
  356. package/storybook-static/date-fns-locale-lb-_lib-match-index-js.4f56d8bc.iframe.bundle.js +1 -0
  357. package/storybook-static/date-fns-locale-lb-index-js.1a6a39b7.iframe.bundle.js +1 -0
  358. package/storybook-static/date-fns-locale-lt-_lib-formatDistance-index-js.6195104a.iframe.bundle.js +1 -0
  359. package/storybook-static/date-fns-locale-lt-_lib-formatLong-index-js.8c3c79a9.iframe.bundle.js +1 -0
  360. package/storybook-static/date-fns-locale-lt-_lib-formatRelative-index-js.950d8f33.iframe.bundle.js +1 -0
  361. package/storybook-static/date-fns-locale-lt-_lib-localize-index-js.4a951f5d.iframe.bundle.js +1 -0
  362. package/storybook-static/date-fns-locale-lt-_lib-match-index-js.710d2c17.iframe.bundle.js +1 -0
  363. package/storybook-static/date-fns-locale-lt-index-js.15fd6ea5.iframe.bundle.js +1 -0
  364. package/storybook-static/date-fns-locale-lv-_lib-formatDistance-index-js.db15363c.iframe.bundle.js +1 -0
  365. package/storybook-static/date-fns-locale-lv-_lib-formatLong-index-js.f5a3a53b.iframe.bundle.js +1 -0
  366. package/storybook-static/date-fns-locale-lv-_lib-formatRelative-index-js.7bef7521.iframe.bundle.js +1 -0
  367. package/storybook-static/date-fns-locale-lv-_lib-localize-index-js.fb9bab17.iframe.bundle.js +1 -0
  368. package/storybook-static/date-fns-locale-lv-_lib-match-index-js.dbb940b3.iframe.bundle.js +1 -0
  369. package/storybook-static/date-fns-locale-lv-index-js.41bbae13.iframe.bundle.js +1 -0
  370. package/storybook-static/date-fns-locale-mk-_lib-formatDistance-index-js.81b830a4.iframe.bundle.js +1 -0
  371. package/storybook-static/date-fns-locale-mk-_lib-formatLong-index-js.f3a4d135.iframe.bundle.js +1 -0
  372. package/storybook-static/date-fns-locale-mk-_lib-formatRelative-index-js.5830f0ef.iframe.bundle.js +1 -0
  373. package/storybook-static/date-fns-locale-mk-_lib-localize-index-js.772f95f6.iframe.bundle.js +1 -0
  374. package/storybook-static/date-fns-locale-mk-_lib-match-index-js.898e4965.iframe.bundle.js +1 -0
  375. package/storybook-static/date-fns-locale-mk-index-js.ed0e35fd.iframe.bundle.js +1 -0
  376. package/storybook-static/date-fns-locale-mn-_lib-formatDistance-index-js.73e1ba78.iframe.bundle.js +1 -0
  377. package/storybook-static/date-fns-locale-mn-_lib-formatLong-index-js.12ab7186.iframe.bundle.js +1 -0
  378. package/storybook-static/date-fns-locale-mn-_lib-formatRelative-index-js.5d489b78.iframe.bundle.js +1 -0
  379. package/storybook-static/date-fns-locale-mn-_lib-localize-index-js.010189c6.iframe.bundle.js +1 -0
  380. package/storybook-static/date-fns-locale-mn-_lib-match-index-js.939ec550.iframe.bundle.js +1 -0
  381. package/storybook-static/date-fns-locale-mn-index-js.077bf6b1.iframe.bundle.js +1 -0
  382. package/storybook-static/date-fns-locale-ms-_lib-formatDistance-index-js.3467dd70.iframe.bundle.js +1 -0
  383. package/storybook-static/date-fns-locale-ms-_lib-formatLong-index-js.a6ade1d4.iframe.bundle.js +1 -0
  384. package/storybook-static/date-fns-locale-ms-_lib-formatRelative-index-js.121c83b2.iframe.bundle.js +1 -0
  385. package/storybook-static/date-fns-locale-ms-_lib-localize-index-js.3bb526ba.iframe.bundle.js +1 -0
  386. package/storybook-static/date-fns-locale-ms-_lib-match-index-js.b85a0b3d.iframe.bundle.js +1 -0
  387. package/storybook-static/date-fns-locale-ms-index-js.356a8cb8.iframe.bundle.js +1 -0
  388. package/storybook-static/date-fns-locale-mt-_lib-formatDistance-index-js.d2ee3c5f.iframe.bundle.js +1 -0
  389. package/storybook-static/date-fns-locale-mt-_lib-formatLong-index-js.3bdc1b27.iframe.bundle.js +1 -0
  390. package/storybook-static/date-fns-locale-mt-_lib-formatRelative-index-js.3b00a6e1.iframe.bundle.js +1 -0
  391. package/storybook-static/date-fns-locale-mt-_lib-localize-index-js.5d0a5d24.iframe.bundle.js +1 -0
  392. package/storybook-static/date-fns-locale-mt-_lib-match-index-js.b62c3e02.iframe.bundle.js +1 -0
  393. package/storybook-static/date-fns-locale-mt-index-js.167ae9ab.iframe.bundle.js +1 -0
  394. package/storybook-static/date-fns-locale-nb-_lib-formatDistance-index-js.3cf76ae6.iframe.bundle.js +1 -0
  395. package/storybook-static/date-fns-locale-nb-_lib-formatLong-index-js.084c55e2.iframe.bundle.js +1 -0
  396. package/storybook-static/date-fns-locale-nb-_lib-formatRelative-index-js.d7f5410f.iframe.bundle.js +1 -0
  397. package/storybook-static/date-fns-locale-nb-_lib-localize-index-js.e2b5fed0.iframe.bundle.js +1 -0
  398. package/storybook-static/date-fns-locale-nb-_lib-match-index-js.bd67afbb.iframe.bundle.js +1 -0
  399. package/storybook-static/date-fns-locale-nb-index-js.4669e8bf.iframe.bundle.js +1 -0
  400. package/storybook-static/date-fns-locale-nl-BE-_lib-formatDistance-index-js.46d7f48c.iframe.bundle.js +1 -0
  401. package/storybook-static/date-fns-locale-nl-BE-_lib-formatLong-index-js.35fce689.iframe.bundle.js +1 -0
  402. package/storybook-static/date-fns-locale-nl-BE-_lib-formatRelative-index-js.e189b38e.iframe.bundle.js +1 -0
  403. package/storybook-static/date-fns-locale-nl-BE-_lib-localize-index-js.e6788dc3.iframe.bundle.js +1 -0
  404. package/storybook-static/date-fns-locale-nl-BE-_lib-match-index-js.2b080d56.iframe.bundle.js +1 -0
  405. package/storybook-static/date-fns-locale-nl-BE-index-js.87f4f5b4.iframe.bundle.js +1 -0
  406. package/storybook-static/date-fns-locale-nl-_lib-formatDistance-index-js.ea598b17.iframe.bundle.js +1 -0
  407. package/storybook-static/date-fns-locale-nl-_lib-formatLong-index-js.eea97911.iframe.bundle.js +1 -0
  408. package/storybook-static/date-fns-locale-nl-_lib-formatRelative-index-js.2c50a26f.iframe.bundle.js +1 -0
  409. package/storybook-static/date-fns-locale-nl-_lib-localize-index-js.92e0ae56.iframe.bundle.js +1 -0
  410. package/storybook-static/date-fns-locale-nl-_lib-match-index-js.3d72ac4b.iframe.bundle.js +1 -0
  411. package/storybook-static/date-fns-locale-nl-index-js.a2f3d5e0.iframe.bundle.js +1 -0
  412. package/storybook-static/date-fns-locale-nn-_lib-formatDistance-index-js.a2571d86.iframe.bundle.js +1 -0
  413. package/storybook-static/date-fns-locale-nn-_lib-formatLong-index-js.57fe57ed.iframe.bundle.js +1 -0
  414. package/storybook-static/date-fns-locale-nn-_lib-formatRelative-index-js.2109d2f8.iframe.bundle.js +1 -0
  415. package/storybook-static/date-fns-locale-nn-_lib-localize-index-js.8f900c7a.iframe.bundle.js +1 -0
  416. package/storybook-static/date-fns-locale-nn-_lib-match-index-js.8667f8c1.iframe.bundle.js +1 -0
  417. package/storybook-static/date-fns-locale-nn-index-js.e77c6f1b.iframe.bundle.js +1 -0
  418. package/storybook-static/date-fns-locale-oc-_lib-formatDistance-index-js.b3b9075d.iframe.bundle.js +1 -0
  419. package/storybook-static/date-fns-locale-oc-_lib-formatLong-index-js.a310ccdf.iframe.bundle.js +1 -0
  420. package/storybook-static/date-fns-locale-oc-_lib-formatRelative-index-js.dd587f5f.iframe.bundle.js +1 -0
  421. package/storybook-static/date-fns-locale-oc-_lib-localize-index-js.25db6e27.iframe.bundle.js +1 -0
  422. package/storybook-static/date-fns-locale-oc-_lib-match-index-js.883adc91.iframe.bundle.js +1 -0
  423. package/storybook-static/date-fns-locale-oc-index-js.cef5235e.iframe.bundle.js +1 -0
  424. package/storybook-static/date-fns-locale-pl-_lib-formatDistance-index-js.02493e8d.iframe.bundle.js +1 -0
  425. package/storybook-static/date-fns-locale-pl-_lib-formatLong-index-js.716585d1.iframe.bundle.js +1 -0
  426. package/storybook-static/date-fns-locale-pl-_lib-formatRelative-index-js.a0b652d3.iframe.bundle.js +1 -0
  427. package/storybook-static/date-fns-locale-pl-_lib-localize-index-js.8408d3fb.iframe.bundle.js +1 -0
  428. package/storybook-static/date-fns-locale-pl-_lib-match-index-js.d882b662.iframe.bundle.js +1 -0
  429. package/storybook-static/date-fns-locale-pl-index-js.b2888b34.iframe.bundle.js +1 -0
  430. package/storybook-static/date-fns-locale-pt-BR-_lib-formatDistance-index-js.9623ee05.iframe.bundle.js +1 -0
  431. package/storybook-static/date-fns-locale-pt-BR-_lib-formatLong-index-js.3e984b4f.iframe.bundle.js +1 -0
  432. package/storybook-static/date-fns-locale-pt-BR-_lib-formatRelative-index-js.015ea23c.iframe.bundle.js +1 -0
  433. package/storybook-static/date-fns-locale-pt-BR-_lib-localize-index-js.d41decc5.iframe.bundle.js +1 -0
  434. package/storybook-static/date-fns-locale-pt-BR-_lib-match-index-js.c5ee7419.iframe.bundle.js +1 -0
  435. package/storybook-static/date-fns-locale-pt-BR-index-js.14843db0.iframe.bundle.js +1 -0
  436. package/storybook-static/date-fns-locale-pt-_lib-formatDistance-index-js.f021b38f.iframe.bundle.js +1 -0
  437. package/storybook-static/date-fns-locale-pt-_lib-formatLong-index-js.06af10fa.iframe.bundle.js +1 -0
  438. package/storybook-static/date-fns-locale-pt-_lib-formatRelative-index-js.6a32dd7c.iframe.bundle.js +1 -0
  439. package/storybook-static/date-fns-locale-pt-_lib-localize-index-js.116a4996.iframe.bundle.js +1 -0
  440. package/storybook-static/date-fns-locale-pt-_lib-match-index-js.37f5ef33.iframe.bundle.js +1 -0
  441. package/storybook-static/date-fns-locale-pt-index-js.790a9bc2.iframe.bundle.js +1 -0
  442. package/storybook-static/date-fns-locale-ro-_lib-formatDistance-index-js.684b0db2.iframe.bundle.js +1 -0
  443. package/storybook-static/date-fns-locale-ro-_lib-formatLong-index-js.6a41731b.iframe.bundle.js +1 -0
  444. package/storybook-static/date-fns-locale-ro-_lib-formatRelative-index-js.8c5f1c38.iframe.bundle.js +1 -0
  445. package/storybook-static/date-fns-locale-ro-_lib-localize-index-js.44f77ee1.iframe.bundle.js +1 -0
  446. package/storybook-static/date-fns-locale-ro-_lib-match-index-js.59eb3192.iframe.bundle.js +1 -0
  447. package/storybook-static/date-fns-locale-ro-index-js.d5cfc372.iframe.bundle.js +1 -0
  448. package/storybook-static/date-fns-locale-ru-_lib-formatDistance-index-js.784bef06.iframe.bundle.js +1 -0
  449. package/storybook-static/date-fns-locale-ru-_lib-formatLong-index-js.5490409a.iframe.bundle.js +1 -0
  450. package/storybook-static/date-fns-locale-ru-_lib-formatRelative-index-js.879beca4.iframe.bundle.js +1 -0
  451. package/storybook-static/date-fns-locale-ru-_lib-localize-index-js.089d50d2.iframe.bundle.js +1 -0
  452. package/storybook-static/date-fns-locale-ru-_lib-match-index-js.e46e68cc.iframe.bundle.js +1 -0
  453. package/storybook-static/date-fns-locale-ru-index-js.5d433d0b.iframe.bundle.js +1 -0
  454. package/storybook-static/date-fns-locale-sk-_lib-formatDistance-index-js.c9cc6af0.iframe.bundle.js +1 -0
  455. package/storybook-static/date-fns-locale-sk-_lib-formatLong-index-js.d9fc4a63.iframe.bundle.js +1 -0
  456. package/storybook-static/date-fns-locale-sk-_lib-formatRelative-index-js.519777e5.iframe.bundle.js +1 -0
  457. package/storybook-static/date-fns-locale-sk-_lib-localize-index-js.02fbdedb.iframe.bundle.js +1 -0
  458. package/storybook-static/date-fns-locale-sk-_lib-match-index-js.5e0c2fdb.iframe.bundle.js +1 -0
  459. package/storybook-static/date-fns-locale-sk-index-js.269e4d48.iframe.bundle.js +1 -0
  460. package/storybook-static/date-fns-locale-sl-_lib-formatDistance-index-js.4cf7d0be.iframe.bundle.js +1 -0
  461. package/storybook-static/date-fns-locale-sl-_lib-formatLong-index-js.f7b5a4d6.iframe.bundle.js +1 -0
  462. package/storybook-static/date-fns-locale-sl-_lib-formatRelative-index-js.e607db1f.iframe.bundle.js +1 -0
  463. package/storybook-static/date-fns-locale-sl-_lib-localize-index-js.ade3cd36.iframe.bundle.js +1 -0
  464. package/storybook-static/date-fns-locale-sl-_lib-match-index-js.f56303ef.iframe.bundle.js +1 -0
  465. package/storybook-static/date-fns-locale-sl-index-js.bcd3825b.iframe.bundle.js +1 -0
  466. package/storybook-static/date-fns-locale-sq-_lib-formatDistance-index-js.40832009.iframe.bundle.js +1 -0
  467. package/storybook-static/date-fns-locale-sq-_lib-formatLong-index-js.f01b48e0.iframe.bundle.js +1 -0
  468. package/storybook-static/date-fns-locale-sq-_lib-formatRelative-index-js.3d16317b.iframe.bundle.js +1 -0
  469. package/storybook-static/date-fns-locale-sq-_lib-localize-index-js.058be957.iframe.bundle.js +1 -0
  470. package/storybook-static/date-fns-locale-sq-_lib-match-index-js.8fee89fb.iframe.bundle.js +1 -0
  471. package/storybook-static/date-fns-locale-sq-index-js.cec2efbd.iframe.bundle.js +1 -0
  472. package/storybook-static/date-fns-locale-sr-Latn-_lib-formatDistance-index-js.fcc8d5c5.iframe.bundle.js +1 -0
  473. package/storybook-static/date-fns-locale-sr-Latn-_lib-formatLong-index-js.9df712c1.iframe.bundle.js +1 -0
  474. package/storybook-static/date-fns-locale-sr-Latn-_lib-formatRelative-index-js.fc3b0098.iframe.bundle.js +1 -0
  475. package/storybook-static/date-fns-locale-sr-Latn-_lib-localize-index-js.0ee61331.iframe.bundle.js +1 -0
  476. package/storybook-static/date-fns-locale-sr-Latn-_lib-match-index-js.0d013bec.iframe.bundle.js +1 -0
  477. package/storybook-static/date-fns-locale-sr-Latn-index-js.19c47a82.iframe.bundle.js +1 -0
  478. package/storybook-static/date-fns-locale-sr-_lib-formatDistance-index-js.d0c00daa.iframe.bundle.js +1 -0
  479. package/storybook-static/date-fns-locale-sr-_lib-formatLong-index-js.58567d07.iframe.bundle.js +1 -0
  480. package/storybook-static/date-fns-locale-sr-_lib-formatRelative-index-js.dee284d5.iframe.bundle.js +1 -0
  481. package/storybook-static/date-fns-locale-sr-_lib-localize-index-js.f8c7df32.iframe.bundle.js +1 -0
  482. package/storybook-static/date-fns-locale-sr-_lib-match-index-js.39c85776.iframe.bundle.js +1 -0
  483. package/storybook-static/date-fns-locale-sr-index-js.08e033b2.iframe.bundle.js +1 -0
  484. package/storybook-static/date-fns-locale-sv-_lib-formatDistance-index-js.38775377.iframe.bundle.js +1 -0
  485. package/storybook-static/date-fns-locale-sv-_lib-formatLong-index-js.2f0cbc79.iframe.bundle.js +1 -0
  486. package/storybook-static/date-fns-locale-sv-_lib-formatRelative-index-js.c73b6a32.iframe.bundle.js +1 -0
  487. package/storybook-static/date-fns-locale-sv-_lib-localize-index-js.e5781fda.iframe.bundle.js +1 -0
  488. package/storybook-static/date-fns-locale-sv-_lib-match-index-js.ad99ccaa.iframe.bundle.js +1 -0
  489. package/storybook-static/date-fns-locale-sv-index-js.8a9915fe.iframe.bundle.js +1 -0
  490. package/storybook-static/date-fns-locale-ta-_lib-formatDistance-index-js.6f9b20dd.iframe.bundle.js +1 -0
  491. package/storybook-static/date-fns-locale-ta-_lib-formatLong-index-js.cf7d902b.iframe.bundle.js +1 -0
  492. package/storybook-static/date-fns-locale-ta-_lib-formatRelative-index-js.f558e7ef.iframe.bundle.js +1 -0
  493. package/storybook-static/date-fns-locale-ta-_lib-localize-index-js.8f68b7fc.iframe.bundle.js +1 -0
  494. package/storybook-static/date-fns-locale-ta-_lib-match-index-js.07e63dcb.iframe.bundle.js +1 -0
  495. package/storybook-static/date-fns-locale-ta-index-js.94ba20ac.iframe.bundle.js +1 -0
  496. package/storybook-static/date-fns-locale-te-_lib-formatDistance-index-js.f371e035.iframe.bundle.js +1 -0
  497. package/storybook-static/date-fns-locale-te-_lib-formatLong-index-js.9fbab223.iframe.bundle.js +1 -0
  498. package/storybook-static/date-fns-locale-te-_lib-formatRelative-index-js.bdbf7df2.iframe.bundle.js +1 -0
  499. package/storybook-static/date-fns-locale-te-_lib-localize-index-js.4460f889.iframe.bundle.js +1 -0
  500. package/storybook-static/date-fns-locale-te-_lib-match-index-js.32ffdc0f.iframe.bundle.js +1 -0
  501. package/storybook-static/date-fns-locale-te-index-js.e9009b3a.iframe.bundle.js +1 -0
  502. package/storybook-static/date-fns-locale-th-_lib-formatDistance-index-js.b499c620.iframe.bundle.js +1 -0
  503. package/storybook-static/date-fns-locale-th-_lib-formatLong-index-js.1916599f.iframe.bundle.js +1 -0
  504. package/storybook-static/date-fns-locale-th-_lib-formatRelative-index-js.6a7ab58e.iframe.bundle.js +1 -0
  505. package/storybook-static/date-fns-locale-th-_lib-localize-index-js.4e0b0713.iframe.bundle.js +1 -0
  506. package/storybook-static/date-fns-locale-th-_lib-match-index-js.e2b10640.iframe.bundle.js +1 -0
  507. package/storybook-static/date-fns-locale-th-index-js.ec8fc05a.iframe.bundle.js +1 -0
  508. package/storybook-static/date-fns-locale-tr-_lib-formatDistance-index-js.d4a71e06.iframe.bundle.js +1 -0
  509. package/storybook-static/date-fns-locale-tr-_lib-formatLong-index-js.21fac545.iframe.bundle.js +1 -0
  510. package/storybook-static/date-fns-locale-tr-_lib-formatRelative-index-js.8bd2cc6a.iframe.bundle.js +1 -0
  511. package/storybook-static/date-fns-locale-tr-_lib-localize-index-js.890d5358.iframe.bundle.js +1 -0
  512. package/storybook-static/date-fns-locale-tr-_lib-match-index-js.6e27e07b.iframe.bundle.js +1 -0
  513. package/storybook-static/date-fns-locale-tr-index-js.3d958829.iframe.bundle.js +1 -0
  514. package/storybook-static/date-fns-locale-ug-_lib-formatDistance-index-js.32deacef.iframe.bundle.js +1 -0
  515. package/storybook-static/date-fns-locale-ug-_lib-formatLong-index-js.030a017d.iframe.bundle.js +1 -0
  516. package/storybook-static/date-fns-locale-ug-_lib-formatRelative-index-js.584b1bc6.iframe.bundle.js +1 -0
  517. package/storybook-static/date-fns-locale-ug-_lib-localize-index-js.49b7b43c.iframe.bundle.js +1 -0
  518. package/storybook-static/date-fns-locale-ug-_lib-match-index-js.a61affe5.iframe.bundle.js +1 -0
  519. package/storybook-static/date-fns-locale-ug-index-js.7601f0d3.iframe.bundle.js +1 -0
  520. package/storybook-static/date-fns-locale-uk-_lib-formatDistance-index-js.66cbb38d.iframe.bundle.js +1 -0
  521. package/storybook-static/date-fns-locale-uk-_lib-formatLong-index-js.d0d90eab.iframe.bundle.js +1 -0
  522. package/storybook-static/date-fns-locale-uk-_lib-formatRelative-index-js.be71893b.iframe.bundle.js +1 -0
  523. package/storybook-static/date-fns-locale-uk-_lib-localize-index-js.a4d07ece.iframe.bundle.js +1 -0
  524. package/storybook-static/date-fns-locale-uk-_lib-match-index-js.b43fa17f.iframe.bundle.js +1 -0
  525. package/storybook-static/date-fns-locale-uk-index-js.ac958fc2.iframe.bundle.js +1 -0
  526. package/storybook-static/date-fns-locale-uz-Cyrl-_lib-formatDistance-index-js.59c07e45.iframe.bundle.js +1 -0
  527. package/storybook-static/date-fns-locale-uz-Cyrl-_lib-formatLong-index-js.53e402f9.iframe.bundle.js +1 -0
  528. package/storybook-static/date-fns-locale-uz-Cyrl-_lib-formatRelative-index-js.a781599a.iframe.bundle.js +1 -0
  529. package/storybook-static/date-fns-locale-uz-Cyrl-_lib-localize-index-js.65d5067d.iframe.bundle.js +1 -0
  530. package/storybook-static/date-fns-locale-uz-Cyrl-_lib-match-index-js.af320bca.iframe.bundle.js +1 -0
  531. package/storybook-static/date-fns-locale-uz-Cyrl-index-js.32551f6f.iframe.bundle.js +1 -0
  532. package/storybook-static/date-fns-locale-uz-_lib-formatDistance-index-js.bf88a315.iframe.bundle.js +1 -0
  533. package/storybook-static/date-fns-locale-uz-_lib-formatLong-index-js.091d31d1.iframe.bundle.js +1 -0
  534. package/storybook-static/date-fns-locale-uz-_lib-formatRelative-index-js.5a960602.iframe.bundle.js +1 -0
  535. package/storybook-static/date-fns-locale-uz-_lib-localize-index-js.7bc2084a.iframe.bundle.js +1 -0
  536. package/storybook-static/date-fns-locale-uz-_lib-match-index-js.50c0679c.iframe.bundle.js +1 -0
  537. package/storybook-static/date-fns-locale-uz-index-js.22edbd40.iframe.bundle.js +1 -0
  538. package/storybook-static/date-fns-locale-vi-_lib-formatDistance-index-js.ab25e8bb.iframe.bundle.js +1 -0
  539. package/storybook-static/date-fns-locale-vi-_lib-formatLong-index-js.cd84487b.iframe.bundle.js +1 -0
  540. package/storybook-static/date-fns-locale-vi-_lib-formatRelative-index-js.a24ccefb.iframe.bundle.js +1 -0
  541. package/storybook-static/date-fns-locale-vi-_lib-localize-index-js.55198cf2.iframe.bundle.js +1 -0
  542. package/storybook-static/date-fns-locale-vi-_lib-match-index-js.8ebbb9e1.iframe.bundle.js +1 -0
  543. package/storybook-static/date-fns-locale-vi-index-js.daa414ca.iframe.bundle.js +1 -0
  544. package/storybook-static/date-fns-locale-zh-CN-_lib-formatDistance-index-js.f2b62d9b.iframe.bundle.js +1 -0
  545. package/storybook-static/date-fns-locale-zh-CN-_lib-formatLong-index-js.0d0dfac4.iframe.bundle.js +1 -0
  546. package/storybook-static/date-fns-locale-zh-CN-_lib-formatRelative-index-js.246e006b.iframe.bundle.js +1 -0
  547. package/storybook-static/date-fns-locale-zh-CN-_lib-localize-index-js.a812a110.iframe.bundle.js +1 -0
  548. package/storybook-static/date-fns-locale-zh-CN-_lib-match-index-js.67936ef5.iframe.bundle.js +1 -0
  549. package/storybook-static/date-fns-locale-zh-CN-index-js.6a7e71cd.iframe.bundle.js +1 -0
  550. package/storybook-static/date-fns-locale-zh-HK-_lib-formatDistance-index-js.783e3b49.iframe.bundle.js +1 -0
  551. package/storybook-static/date-fns-locale-zh-HK-_lib-formatLong-index-js.607ef0ae.iframe.bundle.js +1 -0
  552. package/storybook-static/date-fns-locale-zh-HK-_lib-formatRelative-index-js.1537fc6f.iframe.bundle.js +1 -0
  553. package/storybook-static/date-fns-locale-zh-HK-_lib-localize-index-js.bee4fc4b.iframe.bundle.js +1 -0
  554. package/storybook-static/date-fns-locale-zh-HK-_lib-match-index-js.f8e2041d.iframe.bundle.js +1 -0
  555. package/storybook-static/date-fns-locale-zh-HK-index-js.b099dd7a.iframe.bundle.js +1 -0
  556. package/storybook-static/date-fns-locale-zh-TW-_lib-formatDistance-index-js.26aa1191.iframe.bundle.js +1 -0
  557. package/storybook-static/date-fns-locale-zh-TW-_lib-formatLong-index-js.d1cc6cea.iframe.bundle.js +1 -0
  558. package/storybook-static/date-fns-locale-zh-TW-_lib-formatRelative-index-js.93b42edd.iframe.bundle.js +1 -0
  559. package/storybook-static/date-fns-locale-zh-TW-_lib-localize-index-js.34a35314.iframe.bundle.js +1 -0
  560. package/storybook-static/date-fns-locale-zh-TW-_lib-match-index-js.c407e6e3.iframe.bundle.js +1 -0
  561. package/storybook-static/date-fns-locale-zh-TW-index-js.e7b9ac16.iframe.bundle.js +1 -0
  562. package/storybook-static/favicon.svg +7 -0
  563. package/storybook-static/iframe.html +370 -0
  564. package/storybook-static/index.html +163 -0
  565. package/storybook-static/index.json +1 -0
  566. package/storybook-static/main.f493e4c4.iframe.bundle.js +1 -0
  567. package/storybook-static/project.json +1 -0
  568. package/storybook-static/robots.txt +3 -0
  569. package/storybook-static/runtime~main.edf0a8b2.iframe.bundle.js +1 -0
  570. package/storybook-static/sb-addons/essentials-actions-4/manager-bundle.js +3 -0
  571. package/storybook-static/sb-addons/essentials-actions-4/manager-bundle.js.LEGAL.txt +0 -0
  572. package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +12 -0
  573. package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js.LEGAL.txt +0 -0
  574. package/storybook-static/sb-addons/essentials-controls-3/manager-bundle.js +60 -0
  575. package/storybook-static/sb-addons/essentials-controls-3/manager-bundle.js.LEGAL.txt +18 -0
  576. package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js +3 -0
  577. package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js.LEGAL.txt +0 -0
  578. package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js +3 -0
  579. package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js.LEGAL.txt +0 -0
  580. package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js +3 -0
  581. package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js.LEGAL.txt +0 -0
  582. package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +3 -0
  583. package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js.LEGAL.txt +0 -0
  584. package/storybook-static/sb-addons/interactions-10/manager-bundle.js +33 -0
  585. package/storybook-static/sb-addons/interactions-10/manager-bundle.js.LEGAL.txt +0 -0
  586. package/storybook-static/sb-addons/links-2/manager-bundle.js +3 -0
  587. package/storybook-static/sb-addons/links-2/manager-bundle.js.LEGAL.txt +0 -0
  588. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +502 -0
  589. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js.LEGAL.txt +0 -0
  590. package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +3 -0
  591. package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
  592. package/storybook-static/sb-common-assets/fonts.css +31 -0
  593. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  594. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  595. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  596. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  597. package/storybook-static/sb-manager/WithTooltip-Y7J54OF7-CEHQ77YF.js +1 -0
  598. package/storybook-static/sb-manager/chunk-FEE35O7J.js +9 -0
  599. package/storybook-static/sb-manager/chunk-GFFGH77H.js +183 -0
  600. package/storybook-static/sb-manager/chunk-KCHUFUTG.js +234 -0
  601. package/storybook-static/sb-manager/chunk-S4VOIVUE.js +347 -0
  602. package/storybook-static/sb-manager/chunk-XCO5HRLK.js +6 -0
  603. package/storybook-static/sb-manager/chunk-XP3HGWTR.js +1 -0
  604. package/storybook-static/sb-manager/formatter-B5HCVTEV-7DCBOGO6.js +58 -0
  605. package/storybook-static/sb-manager/globals-module-info.js +1 -0
  606. package/storybook-static/sb-manager/globals-runtime.js +1 -0
  607. package/storybook-static/sb-manager/globals.js +1 -0
  608. package/storybook-static/sb-manager/index.js +1 -0
  609. package/storybook-static/sb-manager/runtime.js +1 -0
  610. package/storybook-static/sb-manager/syntaxhighlighter-JOJW2KGS-VF6EEVPI.js +1 -0
  611. package/storybook-static/sb-preview/globals.js +1 -0
  612. package/storybook-static/sb-preview/runtime.js +139 -0
  613. package/storybook-static/static/css/59150.80bfa16b.chunk.css +28 -0
  614. package/storybook-static/static/css/59150.80bfa16b.chunk.css.map +1 -0
  615. package/storybook-static/static/css/89186.8c8df273.chunk.css +27 -0
  616. package/storybook-static/static/css/89186.8c8df273.chunk.css.map +1 -0
  617. package/storybook-static/static/css/components-button-Button-stories.16d473f7.chunk.css +5 -0
  618. package/storybook-static/static/css/components-button-Button-stories.16d473f7.chunk.css.map +1 -0
  619. package/storybook-static/static/css/components-checkbox-Checkbox-stories.78a76c44.chunk.css +4 -0
  620. package/storybook-static/static/css/components-checkbox-Checkbox-stories.78a76c44.chunk.css.map +1 -0
  621. package/storybook-static/static/css/components-dropdown-Dropdown-stories.2e7b4f05.chunk.css +5 -0
  622. package/storybook-static/static/css/components-dropdown-Dropdown-stories.2e7b4f05.chunk.css.map +1 -0
  623. package/storybook-static/static/css/components-pickers-DatePicker-stories.8df7d6c3.chunk.css +6 -0
  624. package/storybook-static/static/css/components-pickers-DatePicker-stories.8df7d6c3.chunk.css.map +1 -0
  625. package/storybook-static/static/css/components-pickers-DateTimePicker-stories.ebe24670.chunk.css +6 -0
  626. package/storybook-static/static/css/components-pickers-DateTimePicker-stories.ebe24670.chunk.css.map +1 -0
  627. package/storybook-static/static/css/components-radio-button-Radio-stories.c1dbb162.chunk.css +5 -0
  628. package/storybook-static/static/css/components-radio-button-Radio-stories.c1dbb162.chunk.css.map +1 -0
  629. package/storybook-static/static/css/components-radio-button-RadioGroup-stories.b35659f3.chunk.css +7 -0
  630. package/storybook-static/static/css/components-radio-button-RadioGroup-stories.b35659f3.chunk.css.map +1 -0
  631. package/storybook-static/static/css/stories-Consent-stories.1445ea3a.chunk.css +4 -0
  632. package/storybook-static/static/css/stories-Consent-stories.1445ea3a.chunk.css.map +1 -0
  633. package/storybook-static/static/css/stories-DateTime-stories.1445ea3a.chunk.css +4 -0
  634. package/storybook-static/static/css/stories-DateTime-stories.1445ea3a.chunk.css.map +1 -0
  635. package/storybook-static/static/css/stories-FormFields-stories.1445ea3a.chunk.css +4 -0
  636. package/storybook-static/static/css/stories-FormFields-stories.1445ea3a.chunk.css.map +1 -0
  637. package/storybook-static/static/css/stories-Gallery-stories.d74a259a.chunk.css +4 -0
  638. package/storybook-static/static/css/stories-Gallery-stories.d74a259a.chunk.css.map +1 -0
  639. package/storybook-static/static/css/stories-LongTextAnswer-stories.1445ea3a.chunk.css +4 -0
  640. package/storybook-static/static/css/stories-LongTextAnswer-stories.1445ea3a.chunk.css.map +1 -0
  641. package/storybook-static/static/css/stories-Matrix-stories.1445ea3a.chunk.css +4 -0
  642. package/storybook-static/static/css/stories-Matrix-stories.1445ea3a.chunk.css.map +1 -0
  643. package/storybook-static/static/css/stories-McqMultiple-stories.1445ea3a.chunk.css +4 -0
  644. package/storybook-static/static/css/stories-McqMultiple-stories.1445ea3a.chunk.css.map +1 -0
  645. package/storybook-static/static/css/stories-McqSingle-stories.1445ea3a.chunk.css +4 -0
  646. package/storybook-static/static/css/stories-McqSingle-stories.1445ea3a.chunk.css.map +1 -0
  647. package/storybook-static/static/css/stories-Message-stories.1445ea3a.chunk.css +4 -0
  648. package/storybook-static/static/css/stories-Message-stories.1445ea3a.chunk.css.map +1 -0
  649. package/storybook-static/static/css/stories-Range-stories.1445ea3a.chunk.css +4 -0
  650. package/storybook-static/static/css/stories-Range-stories.1445ea3a.chunk.css.map +1 -0
  651. package/storybook-static/static/css/stories-Textbox-stories.1445ea3a.chunk.css +4 -0
  652. package/storybook-static/static/css/stories-Textbox-stories.1445ea3a.chunk.css.map +1 -0
  653. package/storybook-static/static/css/survey-Survey-stories.643427ac.chunk.css +3 -0
  654. package/storybook-static/static/css/survey-Survey-stories.643427ac.chunk.css.map +1 -0
  655. package/storybook-static/static/css/survey-end-card-ThankYou-stories.643427ac.chunk.css +3 -0
  656. package/storybook-static/static/css/survey-end-card-ThankYou-stories.643427ac.chunk.css.map +1 -0
  657. package/storybook-static/stories-Consent-stories.b7911a26.iframe.bundle.js +1 -0
  658. package/storybook-static/stories-DateTime-stories.6089983f.iframe.bundle.js +1 -0
  659. package/storybook-static/stories-FormFields-stories.0ac7e539.iframe.bundle.js +1 -0
  660. package/storybook-static/stories-Gallery-stories.464189e4.iframe.bundle.js +1 -0
  661. package/storybook-static/stories-LongTextAnswer-stories.f3cf06f5.iframe.bundle.js +1 -0
  662. package/storybook-static/stories-Matrix-stories.09cfc12e.iframe.bundle.js +1 -0
  663. package/storybook-static/stories-McqMultiple-stories.848f301b.iframe.bundle.js +1 -0
  664. package/storybook-static/stories-McqSingle-stories.526b208e.iframe.bundle.js +1 -0
  665. package/storybook-static/stories-Message-stories.85a47835.iframe.bundle.js +1 -0
  666. package/storybook-static/stories-Range-stories.045831ee.iframe.bundle.js +1 -0
  667. package/storybook-static/stories-Textbox-stories.3cb06ef1.iframe.bundle.js +1 -0
  668. package/storybook-static/survey-Survey-stories.8dc8d963.iframe.bundle.js +1 -0
  669. package/storybook-static/survey-WebInAppSurvey-stories.3a480c52.iframe.bundle.js +1 -0
  670. package/storybook-static/survey-end-card-ThankYou-stories.e8a0ca19.iframe.bundle.js +1 -0
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 59150.08c2b450.iframe.bundle.js.LICENSE.txt */
2
+ (self.webpackChunkfreemium_survey_components=self.webpackChunkfreemium_survey_components||[]).push([[59150],{"./node_modules/@dnd-kit/core/dist/core.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Mp:()=>DndContext,vL:()=>KeyboardCode,uN:()=>KeyboardSensor,cA:()=>MouseSensor,IG:()=>TouchSensor,fp:()=>closestCenter,y$:()=>closestCorners,Sj:()=>getClientRect,Vy:()=>getFirstCollision,sl:()=>getScrollableAncestors,fF:()=>useDndContext,PM:()=>useDraggable,zM:()=>useDroppable,MS:()=>useSensor,FR:()=>useSensors});var react=__webpack_require__("./node_modules/react/index.js"),react_dom=__webpack_require__("./node_modules/react-dom/index.js"),utilities_esm=__webpack_require__("./node_modules/@dnd-kit/utilities/dist/utilities.esm.js");const hiddenStyles={display:"none"};function HiddenText(_ref){let{id,value}=_ref;return react.createElement("div",{id,style:hiddenStyles},value)}function LiveRegion(_ref){let{id,announcement,ariaLiveType="assertive"}=_ref;return react.createElement("div",{id,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":ariaLiveType,"aria-atomic":!0},announcement)}const DndMonitorContext=(0,react.createContext)(null);const defaultScreenReaderInstructions={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},defaultAnnouncements={onDragStart(_ref){let{active}=_ref;return"Picked up draggable item "+active.id+"."},onDragOver(_ref2){let{active,over}=_ref2;return over?"Draggable item "+active.id+" was moved over droppable area "+over.id+".":"Draggable item "+active.id+" is no longer over a droppable area."},onDragEnd(_ref3){let{active,over}=_ref3;return over?"Draggable item "+active.id+" was dropped over droppable area "+over.id:"Draggable item "+active.id+" was dropped."},onDragCancel(_ref4){let{active}=_ref4;return"Dragging was cancelled. Draggable item "+active.id+" was dropped."}};function Accessibility(_ref){let{announcements=defaultAnnouncements,container,hiddenTextDescribedById,screenReaderInstructions=defaultScreenReaderInstructions}=_ref;const{announce,announcement}=function useAnnouncement(){const[announcement,setAnnouncement]=(0,react.useState)("");return{announce:(0,react.useCallback)((value=>{null!=value&&setAnnouncement(value)}),[]),announcement}}(),liveRegionId=(0,utilities_esm.YG)("DndLiveRegion"),[mounted,setMounted]=(0,react.useState)(!1);if((0,react.useEffect)((()=>{setMounted(!0)}),[]),function useDndMonitor(listener){const registerListener=(0,react.useContext)(DndMonitorContext);(0,react.useEffect)((()=>{if(!registerListener)throw new Error("useDndMonitor must be used within a children of <DndContext>");return registerListener(listener)}),[listener,registerListener])}((0,react.useMemo)((()=>({onDragStart(_ref2){let{active}=_ref2;announce(announcements.onDragStart({active}))},onDragMove(_ref3){let{active,over}=_ref3;announcements.onDragMove&&announce(announcements.onDragMove({active,over}))},onDragOver(_ref4){let{active,over}=_ref4;announce(announcements.onDragOver({active,over}))},onDragEnd(_ref5){let{active,over}=_ref5;announce(announcements.onDragEnd({active,over}))},onDragCancel(_ref6){let{active,over}=_ref6;announce(announcements.onDragCancel({active,over}))}})),[announce,announcements])),!mounted)return null;const markup=react.createElement(react.Fragment,null,react.createElement(HiddenText,{id:hiddenTextDescribedById,value:screenReaderInstructions.draggable}),react.createElement(LiveRegion,{id:liveRegionId,announcement}));return container?(0,react_dom.createPortal)(markup,container):markup}var Action;function noop(){}function useSensor(sensor,options){return(0,react.useMemo)((()=>({sensor,options:null!=options?options:{}})),[sensor,options])}function useSensors(){for(var _len=arguments.length,sensors=new Array(_len),_key=0;_key<_len;_key++)sensors[_key]=arguments[_key];return(0,react.useMemo)((()=>[...sensors].filter((sensor=>null!=sensor))),[...sensors])}!function(Action){Action.DragStart="dragStart",Action.DragMove="dragMove",Action.DragEnd="dragEnd",Action.DragCancel="dragCancel",Action.DragOver="dragOver",Action.RegisterDroppable="registerDroppable",Action.SetDroppableDisabled="setDroppableDisabled",Action.UnregisterDroppable="unregisterDroppable"}(Action||(Action={}));const defaultCoordinates=Object.freeze({x:0,y:0});function distanceBetween(p1,p2){return Math.sqrt(Math.pow(p1.x-p2.x,2)+Math.pow(p1.y-p2.y,2))}function sortCollisionsAsc(_ref,_ref2){let{data:{value:a}}=_ref,{data:{value:b}}=_ref2;return a-b}function sortCollisionsDesc(_ref3,_ref4){let{data:{value:a}}=_ref3,{data:{value:b}}=_ref4;return b-a}function cornersOfRectangle(_ref5){let{left,top,height,width}=_ref5;return[{x:left,y:top},{x:left+width,y:top},{x:left,y:top+height},{x:left+width,y:top+height}]}function getFirstCollision(collisions,property){if(!collisions||0===collisions.length)return null;const[firstCollision]=collisions;return property?firstCollision[property]:firstCollision}function centerOfRectangle(rect,left,top){return void 0===left&&(left=rect.left),void 0===top&&(top=rect.top),{x:left+.5*rect.width,y:top+.5*rect.height}}const closestCenter=_ref=>{let{collisionRect,droppableRects,droppableContainers}=_ref;const centerRect=centerOfRectangle(collisionRect,collisionRect.left,collisionRect.top),collisions=[];for(const droppableContainer of droppableContainers){const{id}=droppableContainer,rect=droppableRects.get(id);if(rect){const distBetween=distanceBetween(centerOfRectangle(rect),centerRect);collisions.push({id,data:{droppableContainer,value:distBetween}})}}return collisions.sort(sortCollisionsAsc)},closestCorners=_ref=>{let{collisionRect,droppableRects,droppableContainers}=_ref;const corners=cornersOfRectangle(collisionRect),collisions=[];for(const droppableContainer of droppableContainers){const{id}=droppableContainer,rect=droppableRects.get(id);if(rect){const rectCorners=cornersOfRectangle(rect),distances=corners.reduce(((accumulator,corner,index)=>accumulator+distanceBetween(rectCorners[index],corner)),0),effectiveDistance=Number((distances/4).toFixed(4));collisions.push({id,data:{droppableContainer,value:effectiveDistance}})}}return collisions.sort(sortCollisionsAsc)};function getIntersectionRatio(entry,target){const top=Math.max(target.top,entry.top),left=Math.max(target.left,entry.left),right=Math.min(target.left+target.width,entry.left+entry.width),bottom=Math.min(target.top+target.height,entry.top+entry.height),width=right-left,height=bottom-top;if(left<right&&top<bottom){const targetArea=target.width*target.height,entryArea=entry.width*entry.height,intersectionArea=width*height;return Number((intersectionArea/(targetArea+entryArea-intersectionArea)).toFixed(4))}return 0}const rectIntersection=_ref=>{let{collisionRect,droppableRects,droppableContainers}=_ref;const collisions=[];for(const droppableContainer of droppableContainers){const{id}=droppableContainer,rect=droppableRects.get(id);if(rect){const intersectionRatio=getIntersectionRatio(rect,collisionRect);intersectionRatio>0&&collisions.push({id,data:{droppableContainer,value:intersectionRatio}})}}return collisions.sort(sortCollisionsDesc)};function getRectDelta(rect1,rect2){return rect1&&rect2?{x:rect1.left-rect2.left,y:rect1.top-rect2.top}:defaultCoordinates}function createRectAdjustmentFn(modifier){return function adjustClientRect(rect){for(var _len=arguments.length,adjustments=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)adjustments[_key-1]=arguments[_key];return adjustments.reduce(((acc,adjustment)=>({...acc,top:acc.top+modifier*adjustment.y,bottom:acc.bottom+modifier*adjustment.y,left:acc.left+modifier*adjustment.x,right:acc.right+modifier*adjustment.x})),{...rect})}}const getAdjustedRect=createRectAdjustmentFn(1);function parseTransform(transform){if(transform.startsWith("matrix3d(")){const transformArray=transform.slice(9,-1).split(/, /);return{x:+transformArray[12],y:+transformArray[13],scaleX:+transformArray[0],scaleY:+transformArray[5]}}if(transform.startsWith("matrix(")){const transformArray=transform.slice(7,-1).split(/, /);return{x:+transformArray[4],y:+transformArray[5],scaleX:+transformArray[0],scaleY:+transformArray[3]}}return null}const defaultOptions={ignoreTransform:!1};function getClientRect(element,options){void 0===options&&(options=defaultOptions);let rect=element.getBoundingClientRect();if(options.ignoreTransform){const{transform,transformOrigin}=(0,utilities_esm.zk)(element).getComputedStyle(element);transform&&(rect=function inverseTransform(rect,transform,transformOrigin){const parsedTransform=parseTransform(transform);if(!parsedTransform)return rect;const{scaleX,scaleY,x:translateX,y:translateY}=parsedTransform,x=rect.left-translateX-(1-scaleX)*parseFloat(transformOrigin),y=rect.top-translateY-(1-scaleY)*parseFloat(transformOrigin.slice(transformOrigin.indexOf(" ")+1)),w=scaleX?rect.width/scaleX:rect.width,h=scaleY?rect.height/scaleY:rect.height;return{width:w,height:h,top:y,right:x+w,bottom:y+h,left:x}}(rect,transform,transformOrigin))}const{top,left,width,height,bottom,right}=rect;return{top,left,width,height,bottom,right}}function getTransformAgnosticClientRect(element){return getClientRect(element,{ignoreTransform:!0})}function getScrollableAncestors(element,limit){const scrollParents=[];return element?function findScrollableAncestors(node){if(null!=limit&&scrollParents.length>=limit)return scrollParents;if(!node)return scrollParents;if((0,utilities_esm.wz)(node)&&null!=node.scrollingElement&&!scrollParents.includes(node.scrollingElement))return scrollParents.push(node.scrollingElement),scrollParents;if(!(0,utilities_esm.sb)(node)||(0,utilities_esm.xZ)(node))return scrollParents;if(scrollParents.includes(node))return scrollParents;const computedStyle=(0,utilities_esm.zk)(element).getComputedStyle(node);return node!==element&&function isScrollable(element,computedStyle){void 0===computedStyle&&(computedStyle=(0,utilities_esm.zk)(element).getComputedStyle(element));const overflowRegex=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((property=>{const value=computedStyle[property];return"string"==typeof value&&overflowRegex.test(value)}))}(node,computedStyle)&&scrollParents.push(node),function isFixed(node,computedStyle){return void 0===computedStyle&&(computedStyle=(0,utilities_esm.zk)(node).getComputedStyle(node)),"fixed"===computedStyle.position}(node,computedStyle)?scrollParents:findScrollableAncestors(node.parentNode)}(element):scrollParents}function getFirstScrollableAncestor(node){const[firstScrollableAncestor]=getScrollableAncestors(node,1);return null!=firstScrollableAncestor?firstScrollableAncestor:null}function getScrollableElement(element){return utilities_esm.Sw&&element?(0,utilities_esm.l6)(element)?element:(0,utilities_esm.Ll)(element)?(0,utilities_esm.wz)(element)||element===(0,utilities_esm.TW)(element).scrollingElement?window:(0,utilities_esm.sb)(element)?element:null:null:null}function getScrollXCoordinate(element){return(0,utilities_esm.l6)(element)?element.scrollX:element.scrollLeft}function getScrollYCoordinate(element){return(0,utilities_esm.l6)(element)?element.scrollY:element.scrollTop}function getScrollCoordinates(element){return{x:getScrollXCoordinate(element),y:getScrollYCoordinate(element)}}var Direction;function isDocumentScrollingElement(element){return!(!utilities_esm.Sw||!element)&&element===document.scrollingElement}function getScrollPosition(scrollingContainer){const minScroll={x:0,y:0},dimensions=isDocumentScrollingElement(scrollingContainer)?{height:window.innerHeight,width:window.innerWidth}:{height:scrollingContainer.clientHeight,width:scrollingContainer.clientWidth},maxScroll={x:scrollingContainer.scrollWidth-dimensions.width,y:scrollingContainer.scrollHeight-dimensions.height};return{isTop:scrollingContainer.scrollTop<=minScroll.y,isLeft:scrollingContainer.scrollLeft<=minScroll.x,isBottom:scrollingContainer.scrollTop>=maxScroll.y,isRight:scrollingContainer.scrollLeft>=maxScroll.x,maxScroll,minScroll}}!function(Direction){Direction[Direction.Forward=1]="Forward",Direction[Direction.Backward=-1]="Backward"}(Direction||(Direction={}));const defaultThreshold={x:.2,y:.2};function getScrollDirectionAndSpeed(scrollContainer,scrollContainerRect,_ref,acceleration,thresholdPercentage){let{top,left,right,bottom}=_ref;void 0===acceleration&&(acceleration=10),void 0===thresholdPercentage&&(thresholdPercentage=defaultThreshold);const{isTop,isBottom,isLeft,isRight}=getScrollPosition(scrollContainer),direction={x:0,y:0},speed={x:0,y:0},threshold_height=scrollContainerRect.height*thresholdPercentage.y,threshold_width=scrollContainerRect.width*thresholdPercentage.x;return!isTop&&top<=scrollContainerRect.top+threshold_height?(direction.y=Direction.Backward,speed.y=acceleration*Math.abs((scrollContainerRect.top+threshold_height-top)/threshold_height)):!isBottom&&bottom>=scrollContainerRect.bottom-threshold_height&&(direction.y=Direction.Forward,speed.y=acceleration*Math.abs((scrollContainerRect.bottom-threshold_height-bottom)/threshold_height)),!isRight&&right>=scrollContainerRect.right-threshold_width?(direction.x=Direction.Forward,speed.x=acceleration*Math.abs((scrollContainerRect.right-threshold_width-right)/threshold_width)):!isLeft&&left<=scrollContainerRect.left+threshold_width&&(direction.x=Direction.Backward,speed.x=acceleration*Math.abs((scrollContainerRect.left+threshold_width-left)/threshold_width)),{direction,speed}}function getScrollElementRect(element){if(element===document.scrollingElement){const{innerWidth,innerHeight}=window;return{top:0,left:0,right:innerWidth,bottom:innerHeight,width:innerWidth,height:innerHeight}}const{top,left,right,bottom}=element.getBoundingClientRect();return{top,left,right,bottom,width:element.clientWidth,height:element.clientHeight}}function getScrollOffsets(scrollableAncestors){return scrollableAncestors.reduce(((acc,node)=>(0,utilities_esm.WQ)(acc,getScrollCoordinates(node))),defaultCoordinates)}function scrollIntoViewIfNeeded(element,measure){if(void 0===measure&&(measure=getClientRect),!element)return;const{top,left,bottom,right}=measure(element);getFirstScrollableAncestor(element)&&(bottom<=0||right<=0||top>=window.innerHeight||left>=window.innerWidth)&&element.scrollIntoView({block:"center",inline:"center"})}const properties=[["x",["left","right"],function getScrollXOffset(scrollableAncestors){return scrollableAncestors.reduce(((acc,node)=>acc+getScrollXCoordinate(node)),0)}],["y",["top","bottom"],function getScrollYOffset(scrollableAncestors){return scrollableAncestors.reduce(((acc,node)=>acc+getScrollYCoordinate(node)),0)}]];class Rect{constructor(rect,element){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const scrollableAncestors=getScrollableAncestors(element),scrollOffsets=getScrollOffsets(scrollableAncestors);this.rect={...rect},this.width=rect.width,this.height=rect.height;for(const[axis,keys,getScrollOffset]of properties)for(const key of keys)Object.defineProperty(this,key,{get:()=>{const currentOffsets=getScrollOffset(scrollableAncestors),scrollOffsetsDeltla=scrollOffsets[axis]-currentOffsets;return this.rect[key]+scrollOffsetsDeltla},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Listeners{constructor(target){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((listener=>{var _this$target;return null==(_this$target=this.target)?void 0:_this$target.removeEventListener(...listener)}))},this.target=target}add(eventName,handler,options){var _this$target2;null==(_this$target2=this.target)||_this$target2.addEventListener(eventName,handler,options),this.listeners.push([eventName,handler,options])}}function hasExceededDistance(delta,measurement){const dx=Math.abs(delta.x),dy=Math.abs(delta.y);return"number"==typeof measurement?Math.sqrt(dx**2+dy**2)>measurement:"x"in measurement&&"y"in measurement?dx>measurement.x&&dy>measurement.y:"x"in measurement?dx>measurement.x:"y"in measurement&&dy>measurement.y}var EventName,KeyboardCode;function preventDefault(event){event.preventDefault()}function stopPropagation(event){event.stopPropagation()}!function(EventName){EventName.Click="click",EventName.DragStart="dragstart",EventName.Keydown="keydown",EventName.ContextMenu="contextmenu",EventName.Resize="resize",EventName.SelectionChange="selectionchange",EventName.VisibilityChange="visibilitychange"}(EventName||(EventName={})),function(KeyboardCode){KeyboardCode.Space="Space",KeyboardCode.Down="ArrowDown",KeyboardCode.Right="ArrowRight",KeyboardCode.Left="ArrowLeft",KeyboardCode.Up="ArrowUp",KeyboardCode.Esc="Escape",KeyboardCode.Enter="Enter"}(KeyboardCode||(KeyboardCode={}));const defaultKeyboardCodes={start:[KeyboardCode.Space,KeyboardCode.Enter],cancel:[KeyboardCode.Esc],end:[KeyboardCode.Space,KeyboardCode.Enter]},defaultKeyboardCoordinateGetter=(event,_ref)=>{let{currentCoordinates}=_ref;switch(event.code){case KeyboardCode.Right:return{...currentCoordinates,x:currentCoordinates.x+25};case KeyboardCode.Left:return{...currentCoordinates,x:currentCoordinates.x-25};case KeyboardCode.Down:return{...currentCoordinates,y:currentCoordinates.y+25};case KeyboardCode.Up:return{...currentCoordinates,y:currentCoordinates.y-25}}};class KeyboardSensor{constructor(props){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=props;const{event:{target}}=props;this.props=props,this.listeners=new Listeners((0,utilities_esm.TW)(target)),this.windowListeners=new Listeners((0,utilities_esm.zk)(target)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(EventName.Resize,this.handleCancel),this.windowListeners.add(EventName.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(EventName.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode,onStart}=this.props,node=activeNode.node.current;node&&scrollIntoViewIfNeeded(node),onStart(defaultCoordinates)}handleKeyDown(event){if((0,utilities_esm.kx)(event)){const{active,context,options}=this.props,{keyboardCodes=defaultKeyboardCodes,coordinateGetter=defaultKeyboardCoordinateGetter,scrollBehavior="smooth"}=options,{code}=event;if(keyboardCodes.end.includes(code))return void this.handleEnd(event);if(keyboardCodes.cancel.includes(code))return void this.handleCancel(event);const{collisionRect}=context.current,currentCoordinates=collisionRect?{x:collisionRect.left,y:collisionRect.top}:defaultCoordinates;this.referenceCoordinates||(this.referenceCoordinates=currentCoordinates);const newCoordinates=coordinateGetter(event,{active,context:context.current,currentCoordinates});if(newCoordinates){const coordinatesDelta=(0,utilities_esm.Re)(newCoordinates,currentCoordinates),scrollDelta={x:0,y:0},{scrollableAncestors}=context.current;for(const scrollContainer of scrollableAncestors){const direction=event.code,{isTop,isRight,isLeft,isBottom,maxScroll,minScroll}=getScrollPosition(scrollContainer),scrollElementRect=getScrollElementRect(scrollContainer),clampedCoordinates={x:Math.min(direction===KeyboardCode.Right?scrollElementRect.right-scrollElementRect.width/2:scrollElementRect.right,Math.max(direction===KeyboardCode.Right?scrollElementRect.left:scrollElementRect.left+scrollElementRect.width/2,newCoordinates.x)),y:Math.min(direction===KeyboardCode.Down?scrollElementRect.bottom-scrollElementRect.height/2:scrollElementRect.bottom,Math.max(direction===KeyboardCode.Down?scrollElementRect.top:scrollElementRect.top+scrollElementRect.height/2,newCoordinates.y))},canScrollX=direction===KeyboardCode.Right&&!isRight||direction===KeyboardCode.Left&&!isLeft,canScrollY=direction===KeyboardCode.Down&&!isBottom||direction===KeyboardCode.Up&&!isTop;if(canScrollX&&clampedCoordinates.x!==newCoordinates.x){const newScrollCoordinates=scrollContainer.scrollLeft+coordinatesDelta.x,canScrollToNewCoordinates=direction===KeyboardCode.Right&&newScrollCoordinates<=maxScroll.x||direction===KeyboardCode.Left&&newScrollCoordinates>=minScroll.x;if(canScrollToNewCoordinates&&!coordinatesDelta.y)return void scrollContainer.scrollTo({left:newScrollCoordinates,behavior:scrollBehavior});scrollDelta.x=canScrollToNewCoordinates?scrollContainer.scrollLeft-newScrollCoordinates:direction===KeyboardCode.Right?scrollContainer.scrollLeft-maxScroll.x:scrollContainer.scrollLeft-minScroll.x,scrollDelta.x&&scrollContainer.scrollBy({left:-scrollDelta.x,behavior:scrollBehavior});break}if(canScrollY&&clampedCoordinates.y!==newCoordinates.y){const newScrollCoordinates=scrollContainer.scrollTop+coordinatesDelta.y,canScrollToNewCoordinates=direction===KeyboardCode.Down&&newScrollCoordinates<=maxScroll.y||direction===KeyboardCode.Up&&newScrollCoordinates>=minScroll.y;if(canScrollToNewCoordinates&&!coordinatesDelta.x)return void scrollContainer.scrollTo({top:newScrollCoordinates,behavior:scrollBehavior});scrollDelta.y=canScrollToNewCoordinates?scrollContainer.scrollTop-newScrollCoordinates:direction===KeyboardCode.Down?scrollContainer.scrollTop-maxScroll.y:scrollContainer.scrollTop-minScroll.y,scrollDelta.y&&scrollContainer.scrollBy({top:-scrollDelta.y,behavior:scrollBehavior});break}}this.handleMove(event,(0,utilities_esm.WQ)((0,utilities_esm.Re)(newCoordinates,this.referenceCoordinates),scrollDelta))}}}handleMove(event,coordinates){const{onMove}=this.props;event.preventDefault(),onMove(coordinates)}handleEnd(event){const{onEnd}=this.props;event.preventDefault(),this.detach(),onEnd()}handleCancel(event){const{onCancel}=this.props;event.preventDefault(),this.detach(),onCancel()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function isDistanceConstraint(constraint){return Boolean(constraint&&"distance"in constraint)}function isDelayConstraint(constraint){return Boolean(constraint&&"delay"in constraint)}KeyboardSensor.activators=[{eventName:"onKeyDown",handler:(event,_ref,_ref2)=>{let{keyboardCodes=defaultKeyboardCodes,onActivation}=_ref,{active}=_ref2;const{code}=event.nativeEvent;if(keyboardCodes.start.includes(code)){const activator=active.activatorNode.current;return(!activator||event.target===activator)&&(event.preventDefault(),null==onActivation||onActivation({event:event.nativeEvent}),!0)}return!1}}];class AbstractPointerSensor{constructor(props,events,listenerTarget){var _getEventCoordinates;void 0===listenerTarget&&(listenerTarget=function getEventListenerTarget(target){const{EventTarget}=(0,utilities_esm.zk)(target);return target instanceof EventTarget?target:(0,utilities_esm.TW)(target)}(props.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=props,this.events=events;const{event}=props,{target}=event;this.props=props,this.events=events,this.document=(0,utilities_esm.TW)(target),this.documentListeners=new Listeners(this.document),this.listeners=new Listeners(listenerTarget),this.windowListeners=new Listeners((0,utilities_esm.zk)(target)),this.initialCoordinates=null!=(_getEventCoordinates=(0,utilities_esm.e_)(event))?_getEventCoordinates:defaultCoordinates,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events,props:{options:{activationConstraint,bypassActivationConstraint}}}=this;if(this.listeners.add(events.move.name,this.handleMove,{passive:!1}),this.listeners.add(events.end.name,this.handleEnd),this.windowListeners.add(EventName.Resize,this.handleCancel),this.windowListeners.add(EventName.DragStart,preventDefault),this.windowListeners.add(EventName.VisibilityChange,this.handleCancel),this.windowListeners.add(EventName.ContextMenu,preventDefault),this.documentListeners.add(EventName.Keydown,this.handleKeydown),activationConstraint){if(null!=bypassActivationConstraint&&bypassActivationConstraint({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(isDelayConstraint(activationConstraint))return void(this.timeoutId=setTimeout(this.handleStart,activationConstraint.delay));if(isDistanceConstraint(activationConstraint))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates}=this,{onStart}=this.props;initialCoordinates&&(this.activated=!0,this.documentListeners.add(EventName.Click,stopPropagation,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(EventName.SelectionChange,this.removeTextSelection),onStart(initialCoordinates))}handleMove(event){var _getEventCoordinates2;const{activated,initialCoordinates,props}=this,{onMove,options:{activationConstraint}}=props;if(!initialCoordinates)return;const coordinates=null!=(_getEventCoordinates2=(0,utilities_esm.e_)(event))?_getEventCoordinates2:defaultCoordinates,delta=(0,utilities_esm.Re)(initialCoordinates,coordinates);if(!activated&&activationConstraint){if(isDistanceConstraint(activationConstraint)){if(null!=activationConstraint.tolerance&&hasExceededDistance(delta,activationConstraint.tolerance))return this.handleCancel();if(hasExceededDistance(delta,activationConstraint.distance))return this.handleStart()}return isDelayConstraint(activationConstraint)&&hasExceededDistance(delta,activationConstraint.tolerance)?this.handleCancel():void 0}event.cancelable&&event.preventDefault(),onMove(coordinates)}handleEnd(){const{onEnd}=this.props;this.detach(),onEnd()}handleCancel(){const{onCancel}=this.props;this.detach(),onCancel()}handleKeydown(event){event.code===KeyboardCode.Esc&&this.handleCancel()}removeTextSelection(){var _this$document$getSel;null==(_this$document$getSel=this.document.getSelection())||_this$document$getSel.removeAllRanges()}}const events={move:{name:"pointermove"},end:{name:"pointerup"}};class PointerSensor extends AbstractPointerSensor{constructor(props){const{event}=props,listenerTarget=(0,utilities_esm.TW)(event.target);super(props,events,listenerTarget)}}PointerSensor.activators=[{eventName:"onPointerDown",handler:(_ref,_ref2)=>{let{nativeEvent:event}=_ref,{onActivation}=_ref2;return!(!event.isPrimary||0!==event.button)&&(null==onActivation||onActivation({event}),!0)}}];const events$1={move:{name:"mousemove"},end:{name:"mouseup"}};var MouseButton;!function(MouseButton){MouseButton[MouseButton.RightClick=2]="RightClick"}(MouseButton||(MouseButton={}));class MouseSensor extends AbstractPointerSensor{constructor(props){super(props,events$1,(0,utilities_esm.TW)(props.event.target))}}MouseSensor.activators=[{eventName:"onMouseDown",handler:(_ref,_ref2)=>{let{nativeEvent:event}=_ref,{onActivation}=_ref2;return event.button!==MouseButton.RightClick&&(null==onActivation||onActivation({event}),!0)}}];const events$2={move:{name:"touchmove"},end:{name:"touchend"}};class TouchSensor extends AbstractPointerSensor{constructor(props){super(props,events$2)}static setup(){return window.addEventListener(events$2.move.name,noop,{capture:!1,passive:!1}),function teardown(){window.removeEventListener(events$2.move.name,noop)};function noop(){}}}var AutoScrollActivator,TraversalOrder;function useAutoScroller(_ref){let{acceleration,activator=AutoScrollActivator.Pointer,canScroll,draggingRect,enabled,interval=5,order=TraversalOrder.TreeOrder,pointerCoordinates,scrollableAncestors,scrollableAncestorRects,delta,threshold}=_ref;const scrollIntent=function useScrollIntent(_ref2){let{delta,disabled}=_ref2;const previousDelta=(0,utilities_esm.ZC)(delta);return(0,utilities_esm.KG)((previousIntent=>{if(disabled||!previousDelta||!previousIntent)return defaultScrollIntent;const direction={x:Math.sign(delta.x-previousDelta.x),y:Math.sign(delta.y-previousDelta.y)};return{x:{[Direction.Backward]:previousIntent.x[Direction.Backward]||-1===direction.x,[Direction.Forward]:previousIntent.x[Direction.Forward]||1===direction.x},y:{[Direction.Backward]:previousIntent.y[Direction.Backward]||-1===direction.y,[Direction.Forward]:previousIntent.y[Direction.Forward]||1===direction.y}}}),[disabled,delta,previousDelta])}({delta,disabled:!enabled}),[setAutoScrollInterval,clearAutoScrollInterval]=(0,utilities_esm.$$)(),scrollSpeed=(0,react.useRef)({x:0,y:0}),scrollDirection=(0,react.useRef)({x:0,y:0}),rect=(0,react.useMemo)((()=>{switch(activator){case AutoScrollActivator.Pointer:return pointerCoordinates?{top:pointerCoordinates.y,bottom:pointerCoordinates.y,left:pointerCoordinates.x,right:pointerCoordinates.x}:null;case AutoScrollActivator.DraggableRect:return draggingRect}}),[activator,draggingRect,pointerCoordinates]),scrollContainerRef=(0,react.useRef)(null),autoScroll=(0,react.useCallback)((()=>{const scrollContainer=scrollContainerRef.current;if(!scrollContainer)return;const scrollLeft=scrollSpeed.current.x*scrollDirection.current.x,scrollTop=scrollSpeed.current.y*scrollDirection.current.y;scrollContainer.scrollBy(scrollLeft,scrollTop)}),[]),sortedScrollableAncestors=(0,react.useMemo)((()=>order===TraversalOrder.TreeOrder?[...scrollableAncestors].reverse():scrollableAncestors),[order,scrollableAncestors]);(0,react.useEffect)((()=>{if(enabled&&scrollableAncestors.length&&rect){for(const scrollContainer of sortedScrollableAncestors){if(!1===(null==canScroll?void 0:canScroll(scrollContainer)))continue;const index=scrollableAncestors.indexOf(scrollContainer),scrollContainerRect=scrollableAncestorRects[index];if(!scrollContainerRect)continue;const{direction,speed}=getScrollDirectionAndSpeed(scrollContainer,scrollContainerRect,rect,acceleration,threshold);for(const axis of["x","y"])scrollIntent[axis][direction[axis]]||(speed[axis]=0,direction[axis]=0);if(speed.x>0||speed.y>0)return clearAutoScrollInterval(),scrollContainerRef.current=scrollContainer,setAutoScrollInterval(autoScroll,interval),scrollSpeed.current=speed,void(scrollDirection.current=direction)}scrollSpeed.current={x:0,y:0},scrollDirection.current={x:0,y:0},clearAutoScrollInterval()}else clearAutoScrollInterval()}),[acceleration,autoScroll,canScroll,clearAutoScrollInterval,enabled,interval,JSON.stringify(rect),JSON.stringify(scrollIntent),setAutoScrollInterval,scrollableAncestors,sortedScrollableAncestors,scrollableAncestorRects,JSON.stringify(threshold)])}TouchSensor.activators=[{eventName:"onTouchStart",handler:(_ref,_ref2)=>{let{nativeEvent:event}=_ref,{onActivation}=_ref2;const{touches}=event;return!(touches.length>1)&&(null==onActivation||onActivation({event}),!0)}}],function(AutoScrollActivator){AutoScrollActivator[AutoScrollActivator.Pointer=0]="Pointer",AutoScrollActivator[AutoScrollActivator.DraggableRect=1]="DraggableRect"}(AutoScrollActivator||(AutoScrollActivator={})),function(TraversalOrder){TraversalOrder[TraversalOrder.TreeOrder=0]="TreeOrder",TraversalOrder[TraversalOrder.ReversedTreeOrder=1]="ReversedTreeOrder"}(TraversalOrder||(TraversalOrder={}));const defaultScrollIntent={x:{[Direction.Backward]:!1,[Direction.Forward]:!1},y:{[Direction.Backward]:!1,[Direction.Forward]:!1}};var MeasuringStrategy,MeasuringFrequency;!function(MeasuringStrategy){MeasuringStrategy[MeasuringStrategy.Always=0]="Always",MeasuringStrategy[MeasuringStrategy.BeforeDragging=1]="BeforeDragging",MeasuringStrategy[MeasuringStrategy.WhileDragging=2]="WhileDragging"}(MeasuringStrategy||(MeasuringStrategy={})),function(MeasuringFrequency){MeasuringFrequency.Optimized="optimized"}(MeasuringFrequency||(MeasuringFrequency={}));const defaultValue=new Map;function useInitialValue(value,computeFn){return(0,utilities_esm.KG)((previousValue=>value?previousValue||("function"==typeof computeFn?computeFn(value):value):null),[computeFn,value])}function useResizeObserver(_ref){let{callback,disabled}=_ref;const handleResize=(0,utilities_esm._q)(callback),resizeObserver=(0,react.useMemo)((()=>{if(disabled||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver}=window;return new ResizeObserver(handleResize)}),[disabled]);return(0,react.useEffect)((()=>()=>null==resizeObserver?void 0:resizeObserver.disconnect()),[resizeObserver]),resizeObserver}function defaultMeasure(element){return new Rect(getClientRect(element),element)}function useRect(element,measure,fallbackRect){void 0===measure&&(measure=defaultMeasure);const[rect,measureRect]=(0,react.useReducer)((function reducer(currentRect){if(!element)return null;var _ref;if(!1===element.isConnected)return null!=(_ref=null!=currentRect?currentRect:fallbackRect)?_ref:null;const newRect=measure(element);if(JSON.stringify(currentRect)===JSON.stringify(newRect))return currentRect;return newRect}),null),mutationObserver=function useMutationObserver(_ref){let{callback,disabled}=_ref;const handleMutations=(0,utilities_esm._q)(callback),mutationObserver=(0,react.useMemo)((()=>{if(disabled||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver}=window;return new MutationObserver(handleMutations)}),[handleMutations,disabled]);return(0,react.useEffect)((()=>()=>null==mutationObserver?void 0:mutationObserver.disconnect()),[mutationObserver]),mutationObserver}({callback(records){if(element)for(const record of records){const{type,target}=record;if("childList"===type&&target instanceof HTMLElement&&target.contains(element)){measureRect();break}}}}),resizeObserver=useResizeObserver({callback:measureRect});return(0,utilities_esm.Es)((()=>{measureRect(),element?(null==resizeObserver||resizeObserver.observe(element),null==mutationObserver||mutationObserver.observe(document.body,{childList:!0,subtree:!0})):(null==resizeObserver||resizeObserver.disconnect(),null==mutationObserver||mutationObserver.disconnect())}),[element]),rect}const defaultValue$1=[];function useScrollOffsetsDelta(scrollOffsets,dependencies){void 0===dependencies&&(dependencies=[]);const initialScrollOffsets=(0,react.useRef)(null);return(0,react.useEffect)((()=>{initialScrollOffsets.current=null}),dependencies),(0,react.useEffect)((()=>{const hasScrollOffsets=scrollOffsets!==defaultCoordinates;hasScrollOffsets&&!initialScrollOffsets.current&&(initialScrollOffsets.current=scrollOffsets),!hasScrollOffsets&&initialScrollOffsets.current&&(initialScrollOffsets.current=null)}),[scrollOffsets]),initialScrollOffsets.current?(0,utilities_esm.Re)(scrollOffsets,initialScrollOffsets.current):defaultCoordinates}function useWindowRect(element){return(0,react.useMemo)((()=>element?function getWindowClientRect(element){const width=element.innerWidth,height=element.innerHeight;return{top:0,left:0,right:width,bottom:height,width,height}}(element):null),[element])}const defaultValue$2=[];function getMeasurableNode(node){if(!node)return null;if(node.children.length>1)return node;const firstChild=node.children[0];return(0,utilities_esm.sb)(firstChild)?firstChild:node}const defaultSensors=[{sensor:PointerSensor,options:{}},{sensor:KeyboardSensor,options:{}}],defaultData={current:{}},defaultMeasuringConfiguration={draggable:{measure:getTransformAgnosticClientRect},droppable:{measure:getTransformAgnosticClientRect,strategy:MeasuringStrategy.WhileDragging,frequency:MeasuringFrequency.Optimized},dragOverlay:{measure:getClientRect}};class DroppableContainersMap extends Map{get(id){var _super$get;return null!=id&&null!=(_super$get=super.get(id))?_super$get:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((_ref=>{let{disabled}=_ref;return!disabled}))}getNodeFor(id){var _this$get$node$curren,_this$get;return null!=(_this$get$node$curren=null==(_this$get=this.get(id))?void 0:_this$get.node.current)?_this$get$node$curren:void 0}}const defaultPublicContext={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new DroppableContainersMap,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:noop},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:defaultMeasuringConfiguration,measureDroppableContainers:noop,windowRect:null,measuringScheduled:!1},defaultInternalContext={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:noop,draggableNodes:new Map,over:null,measureDroppableContainers:noop},InternalContext=(0,react.createContext)(defaultInternalContext),PublicContext=(0,react.createContext)(defaultPublicContext);function getInitialState(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new DroppableContainersMap}}}function reducer(state,action){switch(action.type){case Action.DragStart:return{...state,draggable:{...state.draggable,initialCoordinates:action.initialCoordinates,active:action.active}};case Action.DragMove:return state.draggable.active?{...state,draggable:{...state.draggable,translate:{x:action.coordinates.x-state.draggable.initialCoordinates.x,y:action.coordinates.y-state.draggable.initialCoordinates.y}}}:state;case Action.DragEnd:case Action.DragCancel:return{...state,draggable:{...state.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Action.RegisterDroppable:{const{element}=action,{id}=element,containers=new DroppableContainersMap(state.droppable.containers);return containers.set(id,element),{...state,droppable:{...state.droppable,containers}}}case Action.SetDroppableDisabled:{const{id,key,disabled}=action,element=state.droppable.containers.get(id);if(!element||key!==element.key)return state;const containers=new DroppableContainersMap(state.droppable.containers);return containers.set(id,{...element,disabled}),{...state,droppable:{...state.droppable,containers}}}case Action.UnregisterDroppable:{const{id,key}=action,element=state.droppable.containers.get(id);if(!element||key!==element.key)return state;const containers=new DroppableContainersMap(state.droppable.containers);return containers.delete(id),{...state,droppable:{...state.droppable,containers}}}default:return state}}function RestoreFocus(_ref){let{disabled}=_ref;const{active,activatorEvent,draggableNodes}=(0,react.useContext)(InternalContext),previousActivatorEvent=(0,utilities_esm.ZC)(activatorEvent),previousActiveId=(0,utilities_esm.ZC)(null==active?void 0:active.id);return(0,react.useEffect)((()=>{if(!disabled&&!activatorEvent&&previousActivatorEvent&&null!=previousActiveId){if(!(0,utilities_esm.kx)(previousActivatorEvent))return;if(document.activeElement===previousActivatorEvent.target)return;const draggableNode=draggableNodes.get(previousActiveId);if(!draggableNode)return;const{activatorNode,node}=draggableNode;if(!activatorNode.current&&!node.current)return;requestAnimationFrame((()=>{for(const element of[activatorNode.current,node.current]){if(!element)continue;const focusableNode=(0,utilities_esm.ag)(element);if(focusableNode){focusableNode.focus();break}}}))}}),[activatorEvent,disabled,draggableNodes,previousActiveId,previousActivatorEvent]),null}function applyModifiers(modifiers,_ref){let{transform,...args}=_ref;return null!=modifiers&&modifiers.length?modifiers.reduce(((accumulator,modifier)=>modifier({transform:accumulator,...args})),transform):transform}const ActiveDraggableContext=(0,react.createContext)({...defaultCoordinates,scaleX:1,scaleY:1});var Status;!function(Status){Status[Status.Uninitialized=0]="Uninitialized",Status[Status.Initializing=1]="Initializing",Status[Status.Initialized=2]="Initialized"}(Status||(Status={}));const DndContext=(0,react.memo)((function DndContext(_ref){var _sensorContext$curren,_dragOverlay$nodeRef$,_dragOverlay$rect,_over$rect;let{id,accessibility,autoScroll=!0,children,sensors=defaultSensors,collisionDetection=rectIntersection,measuring,modifiers,...props}=_ref;const store=(0,react.useReducer)(reducer,void 0,getInitialState),[state,dispatch]=store,[dispatchMonitorEvent,registerMonitorListener]=function useDndMonitorProvider(){const[listeners]=(0,react.useState)((()=>new Set)),registerListener=(0,react.useCallback)((listener=>(listeners.add(listener),()=>listeners.delete(listener))),[listeners]);return[(0,react.useCallback)((_ref=>{let{type,event}=_ref;listeners.forEach((listener=>{var _listener$type;return null==(_listener$type=listener[type])?void 0:_listener$type.call(listener,event)}))}),[listeners]),registerListener]}(),[status,setStatus]=(0,react.useState)(Status.Uninitialized),isInitialized=status===Status.Initialized,{draggable:{active:activeId,nodes:draggableNodes,translate},droppable:{containers:droppableContainers}}=state,node=activeId?draggableNodes.get(activeId):null,activeRects=(0,react.useRef)({initial:null,translated:null}),active=(0,react.useMemo)((()=>{var _node$data;return null!=activeId?{id:activeId,data:null!=(_node$data=null==node?void 0:node.data)?_node$data:defaultData,rect:activeRects}:null}),[activeId,node]),activeRef=(0,react.useRef)(null),[activeSensor,setActiveSensor]=(0,react.useState)(null),[activatorEvent,setActivatorEvent]=(0,react.useState)(null),latestProps=(0,utilities_esm.YN)(props,Object.values(props)),draggableDescribedById=(0,utilities_esm.YG)("DndDescribedBy",id),enabledDroppableContainers=(0,react.useMemo)((()=>droppableContainers.getEnabled()),[droppableContainers]),measuringConfiguration=function useMeasuringConfiguration(config){return(0,react.useMemo)((()=>({draggable:{...defaultMeasuringConfiguration.draggable,...null==config?void 0:config.draggable},droppable:{...defaultMeasuringConfiguration.droppable,...null==config?void 0:config.droppable},dragOverlay:{...defaultMeasuringConfiguration.dragOverlay,...null==config?void 0:config.dragOverlay}})),[null==config?void 0:config.draggable,null==config?void 0:config.droppable,null==config?void 0:config.dragOverlay])}(measuring),{droppableRects,measureDroppableContainers,measuringScheduled}=function useDroppableMeasuring(containers,_ref){let{dragging,dependencies,config}=_ref;const[queue,setQueue]=(0,react.useState)(null),{frequency,measure,strategy}=config,containersRef=(0,react.useRef)(containers),disabled=function isDisabled(){switch(strategy){case MeasuringStrategy.Always:return!1;case MeasuringStrategy.BeforeDragging:return dragging;default:return!dragging}}(),disabledRef=(0,utilities_esm.YN)(disabled),measureDroppableContainers=(0,react.useCallback)((function(ids){void 0===ids&&(ids=[]),disabledRef.current||setQueue((value=>null===value?ids:value.concat(ids.filter((id=>!value.includes(id))))))}),[disabledRef]),timeoutId=(0,react.useRef)(null),droppableRects=(0,utilities_esm.KG)((previousValue=>{if(disabled&&!dragging)return defaultValue;if(!previousValue||previousValue===defaultValue||containersRef.current!==containers||null!=queue){const map=new Map;for(let container of containers){if(!container)continue;if(queue&&queue.length>0&&!queue.includes(container.id)&&container.rect.current){map.set(container.id,container.rect.current);continue}const node=container.node.current,rect=node?new Rect(measure(node),node):null;container.rect.current=rect,rect&&map.set(container.id,rect)}return map}return previousValue}),[containers,queue,dragging,disabled,measure]);return(0,react.useEffect)((()=>{containersRef.current=containers}),[containers]),(0,react.useEffect)((()=>{disabled||measureDroppableContainers()}),[dragging,disabled]),(0,react.useEffect)((()=>{queue&&queue.length>0&&setQueue(null)}),[JSON.stringify(queue)]),(0,react.useEffect)((()=>{disabled||"number"!=typeof frequency||null!==timeoutId.current||(timeoutId.current=setTimeout((()=>{measureDroppableContainers(),timeoutId.current=null}),frequency))}),[frequency,disabled,measureDroppableContainers,...dependencies]),{droppableRects,measureDroppableContainers,measuringScheduled:null!=queue}}(enabledDroppableContainers,{dragging:isInitialized,dependencies:[translate.x,translate.y],config:measuringConfiguration.droppable}),activeNode=function useCachedNode(draggableNodes,id){const draggableNode=null!==id?draggableNodes.get(id):void 0,node=draggableNode?draggableNode.node.current:null;return(0,utilities_esm.KG)((cachedNode=>{var _ref;return null===id?null:null!=(_ref=null!=node?node:cachedNode)?_ref:null}),[node,id])}(draggableNodes,activeId),activationCoordinates=(0,react.useMemo)((()=>activatorEvent?(0,utilities_esm.e_)(activatorEvent):null),[activatorEvent]),autoScrollOptions=function getAutoScrollerOptions(){const activeSensorDisablesAutoscroll=!1===(null==activeSensor?void 0:activeSensor.autoScrollEnabled),autoScrollGloballyDisabled="object"==typeof autoScroll?!1===autoScroll.enabled:!1===autoScroll,enabled=isInitialized&&!activeSensorDisablesAutoscroll&&!autoScrollGloballyDisabled;if("object"==typeof autoScroll)return{...autoScroll,enabled};return{enabled}}(),initialActiveNodeRect=function useInitialRect(node,measure){return useInitialValue(node,measure)}(activeNode,measuringConfiguration.draggable.measure);!function useLayoutShiftScrollCompensation(_ref){let{activeNode,measure,initialRect,config=!0}=_ref;const initialized=(0,react.useRef)(!1),{x,y}="boolean"==typeof config?{x:config,y:config}:config;(0,utilities_esm.Es)((()=>{if(!x&&!y||!activeNode)return void(initialized.current=!1);if(initialized.current||!initialRect)return;const node=null==activeNode?void 0:activeNode.node.current;if(!node||!1===node.isConnected)return;const rectDelta=getRectDelta(measure(node),initialRect);if(x||(rectDelta.x=0),y||(rectDelta.y=0),initialized.current=!0,Math.abs(rectDelta.x)>0||Math.abs(rectDelta.y)>0){const firstScrollableAncestor=getFirstScrollableAncestor(node);firstScrollableAncestor&&firstScrollableAncestor.scrollBy({top:rectDelta.y,left:rectDelta.x})}}),[activeNode,x,y,initialRect,measure])}({activeNode:activeId?draggableNodes.get(activeId):null,config:autoScrollOptions.layoutShiftCompensation,initialRect:initialActiveNodeRect,measure:measuringConfiguration.draggable.measure});const activeNodeRect=useRect(activeNode,measuringConfiguration.draggable.measure,initialActiveNodeRect),containerNodeRect=useRect(activeNode?activeNode.parentElement:null),sensorContext=(0,react.useRef)({activatorEvent:null,active:null,activeNode,collisionRect:null,collisions:null,droppableRects,draggableNodes,draggingNode:null,draggingNodeRect:null,droppableContainers,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),overNode=droppableContainers.getNodeFor(null==(_sensorContext$curren=sensorContext.current.over)?void 0:_sensorContext$curren.id),dragOverlay=function useDragOverlayMeasuring(_ref){let{measure}=_ref;const[rect,setRect]=(0,react.useState)(null),resizeObserver=useResizeObserver({callback:(0,react.useCallback)((entries=>{for(const{target}of entries)if((0,utilities_esm.sb)(target)){setRect((rect=>{const newRect=measure(target);return rect?{...rect,width:newRect.width,height:newRect.height}:newRect}));break}}),[measure])}),handleNodeChange=(0,react.useCallback)((element=>{const node=getMeasurableNode(element);null==resizeObserver||resizeObserver.disconnect(),node&&(null==resizeObserver||resizeObserver.observe(node)),setRect(node?measure(node):null)}),[measure,resizeObserver]),[nodeRef,setRef]=(0,utilities_esm.lk)(handleNodeChange);return(0,react.useMemo)((()=>({nodeRef,rect,setRef})),[rect,nodeRef,setRef])}({measure:measuringConfiguration.dragOverlay.measure}),draggingNode=null!=(_dragOverlay$nodeRef$=dragOverlay.nodeRef.current)?_dragOverlay$nodeRef$:activeNode,draggingNodeRect=isInitialized?null!=(_dragOverlay$rect=dragOverlay.rect)?_dragOverlay$rect:activeNodeRect:null,usesDragOverlay=Boolean(dragOverlay.nodeRef.current&&dragOverlay.rect),nodeRectDelta=function useRectDelta(rect){return getRectDelta(rect,useInitialValue(rect))}(usesDragOverlay?null:activeNodeRect),windowRect=useWindowRect(draggingNode?(0,utilities_esm.zk)(draggingNode):null),scrollableAncestors=function useScrollableAncestors(node){const previousNode=(0,react.useRef)(node),ancestors=(0,utilities_esm.KG)((previousValue=>node?previousValue&&previousValue!==defaultValue$1&&node&&previousNode.current&&node.parentNode===previousNode.current.parentNode?previousValue:getScrollableAncestors(node):defaultValue$1),[node]);return(0,react.useEffect)((()=>{previousNode.current=node}),[node]),ancestors}(isInitialized?null!=overNode?overNode:activeNode:null),scrollableAncestorRects=function useRects(elements,measure){void 0===measure&&(measure=getClientRect);const[firstElement]=elements,windowRect=useWindowRect(firstElement?(0,utilities_esm.zk)(firstElement):null),[rects,measureRects]=(0,react.useReducer)((function reducer(){return elements.length?elements.map((element=>isDocumentScrollingElement(element)?windowRect:new Rect(measure(element),element))):defaultValue$2}),defaultValue$2),resizeObserver=useResizeObserver({callback:measureRects});return elements.length>0&&rects===defaultValue$2&&measureRects(),(0,utilities_esm.Es)((()=>{elements.length?elements.forEach((element=>null==resizeObserver?void 0:resizeObserver.observe(element))):(null==resizeObserver||resizeObserver.disconnect(),measureRects())}),[elements]),rects}(scrollableAncestors),modifiedTranslate=applyModifiers(modifiers,{transform:{x:translate.x-nodeRectDelta.x,y:translate.y-nodeRectDelta.y,scaleX:1,scaleY:1},activatorEvent,active,activeNodeRect,containerNodeRect,draggingNodeRect,over:sensorContext.current.over,overlayNodeRect:dragOverlay.rect,scrollableAncestors,scrollableAncestorRects,windowRect}),pointerCoordinates=activationCoordinates?(0,utilities_esm.WQ)(activationCoordinates,translate):null,scrollOffsets=function useScrollOffsets(elements){const[scrollCoordinates,setScrollCoordinates]=(0,react.useState)(null),prevElements=(0,react.useRef)(elements),handleScroll=(0,react.useCallback)((event=>{const scrollingElement=getScrollableElement(event.target);scrollingElement&&setScrollCoordinates((scrollCoordinates=>scrollCoordinates?(scrollCoordinates.set(scrollingElement,getScrollCoordinates(scrollingElement)),new Map(scrollCoordinates)):null))}),[]);return(0,react.useEffect)((()=>{const previousElements=prevElements.current;if(elements!==previousElements){cleanup(previousElements);const entries=elements.map((element=>{const scrollableElement=getScrollableElement(element);return scrollableElement?(scrollableElement.addEventListener("scroll",handleScroll,{passive:!0}),[scrollableElement,getScrollCoordinates(scrollableElement)]):null})).filter((entry=>null!=entry));setScrollCoordinates(entries.length?new Map(entries):null),prevElements.current=elements}return()=>{cleanup(elements),cleanup(previousElements)};function cleanup(elements){elements.forEach((element=>{const scrollableElement=getScrollableElement(element);null==scrollableElement||scrollableElement.removeEventListener("scroll",handleScroll)}))}}),[handleScroll,elements]),(0,react.useMemo)((()=>elements.length?scrollCoordinates?Array.from(scrollCoordinates.values()).reduce(((acc,coordinates)=>(0,utilities_esm.WQ)(acc,coordinates)),defaultCoordinates):getScrollOffsets(elements):defaultCoordinates),[elements,scrollCoordinates])}(scrollableAncestors),scrollAdjustment=useScrollOffsetsDelta(scrollOffsets),activeNodeScrollDelta=useScrollOffsetsDelta(scrollOffsets,[activeNodeRect]),scrollAdjustedTranslate=(0,utilities_esm.WQ)(modifiedTranslate,scrollAdjustment),collisionRect=draggingNodeRect?getAdjustedRect(draggingNodeRect,modifiedTranslate):null,collisions=active&&collisionRect?collisionDetection({active,collisionRect,droppableRects,droppableContainers:enabledDroppableContainers,pointerCoordinates}):null,overId=getFirstCollision(collisions,"id"),[over,setOver]=(0,react.useState)(null),transform=function adjustScale(transform,rect1,rect2){return{...transform,scaleX:rect1&&rect2?rect1.width/rect2.width:1,scaleY:rect1&&rect2?rect1.height/rect2.height:1}}(usesDragOverlay?modifiedTranslate:(0,utilities_esm.WQ)(modifiedTranslate,activeNodeScrollDelta),null!=(_over$rect=null==over?void 0:over.rect)?_over$rect:null,activeNodeRect),instantiateSensor=(0,react.useCallback)(((event,_ref2)=>{let{sensor:Sensor,options}=_ref2;if(null==activeRef.current)return;const activeNode=draggableNodes.get(activeRef.current);if(!activeNode)return;const activatorEvent=event.nativeEvent,sensorInstance=new Sensor({active:activeRef.current,activeNode,event:activatorEvent,options,context:sensorContext,onStart(initialCoordinates){const id=activeRef.current;if(null==id)return;const draggableNode=draggableNodes.get(id);if(!draggableNode)return;const{onDragStart}=latestProps.current,event={active:{id,data:draggableNode.data,rect:activeRects}};(0,react_dom.unstable_batchedUpdates)((()=>{null==onDragStart||onDragStart(event),setStatus(Status.Initializing),dispatch({type:Action.DragStart,initialCoordinates,active:id}),dispatchMonitorEvent({type:"onDragStart",event})}))},onMove(coordinates){dispatch({type:Action.DragMove,coordinates})},onEnd:createHandler(Action.DragEnd),onCancel:createHandler(Action.DragCancel)});function createHandler(type){return async function handler(){const{active,collisions,over,scrollAdjustedTranslate}=sensorContext.current;let event=null;if(active&&scrollAdjustedTranslate){const{cancelDrop}=latestProps.current;if(event={activatorEvent,active,collisions,delta:scrollAdjustedTranslate,over},type===Action.DragEnd&&"function"==typeof cancelDrop){await Promise.resolve(cancelDrop(event))&&(type=Action.DragCancel)}}activeRef.current=null,(0,react_dom.unstable_batchedUpdates)((()=>{dispatch({type}),setStatus(Status.Uninitialized),setOver(null),setActiveSensor(null),setActivatorEvent(null);const eventName=type===Action.DragEnd?"onDragEnd":"onDragCancel";if(event){const handler=latestProps.current[eventName];null==handler||handler(event),dispatchMonitorEvent({type:eventName,event})}}))}}(0,react_dom.unstable_batchedUpdates)((()=>{setActiveSensor(sensorInstance),setActivatorEvent(event.nativeEvent)}))}),[draggableNodes]),bindActivatorToSensorInstantiator=(0,react.useCallback)(((handler,sensor)=>(event,active)=>{const nativeEvent=event.nativeEvent,activeDraggableNode=draggableNodes.get(active);if(null!==activeRef.current||!activeDraggableNode||nativeEvent.dndKit||nativeEvent.defaultPrevented)return;const activationContext={active:activeDraggableNode};!0===handler(event,sensor.options,activationContext)&&(nativeEvent.dndKit={capturedBy:sensor.sensor},activeRef.current=active,instantiateSensor(event,sensor))}),[draggableNodes,instantiateSensor]),activators=function useCombineActivators(sensors,getSyntheticHandler){return(0,react.useMemo)((()=>sensors.reduce(((accumulator,sensor)=>{const{sensor:Sensor}=sensor;return[...accumulator,...Sensor.activators.map((activator=>({eventName:activator.eventName,handler:getSyntheticHandler(activator.handler,sensor)})))]}),[])),[sensors,getSyntheticHandler])}(sensors,bindActivatorToSensorInstantiator);!function useSensorSetup(sensors){(0,react.useEffect)((()=>{if(!utilities_esm.Sw)return;const teardownFns=sensors.map((_ref=>{let{sensor}=_ref;return null==sensor.setup?void 0:sensor.setup()}));return()=>{for(const teardown of teardownFns)null==teardown||teardown()}}),sensors.map((_ref2=>{let{sensor}=_ref2;return sensor})))}(sensors),(0,utilities_esm.Es)((()=>{activeNodeRect&&status===Status.Initializing&&setStatus(Status.Initialized)}),[activeNodeRect,status]),(0,react.useEffect)((()=>{const{onDragMove}=latestProps.current,{active,activatorEvent,collisions,over}=sensorContext.current;if(!active||!activatorEvent)return;const event={active,activatorEvent,collisions,delta:{x:scrollAdjustedTranslate.x,y:scrollAdjustedTranslate.y},over};(0,react_dom.unstable_batchedUpdates)((()=>{null==onDragMove||onDragMove(event),dispatchMonitorEvent({type:"onDragMove",event})}))}),[scrollAdjustedTranslate.x,scrollAdjustedTranslate.y]),(0,react.useEffect)((()=>{const{active,activatorEvent,collisions,droppableContainers,scrollAdjustedTranslate}=sensorContext.current;if(!active||null==activeRef.current||!activatorEvent||!scrollAdjustedTranslate)return;const{onDragOver}=latestProps.current,overContainer=droppableContainers.get(overId),over=overContainer&&overContainer.rect.current?{id:overContainer.id,rect:overContainer.rect.current,data:overContainer.data,disabled:overContainer.disabled}:null,event={active,activatorEvent,collisions,delta:{x:scrollAdjustedTranslate.x,y:scrollAdjustedTranslate.y},over};(0,react_dom.unstable_batchedUpdates)((()=>{setOver(over),null==onDragOver||onDragOver(event),dispatchMonitorEvent({type:"onDragOver",event})}))}),[overId]),(0,utilities_esm.Es)((()=>{sensorContext.current={activatorEvent,active,activeNode,collisionRect,collisions,droppableRects,draggableNodes,draggingNode,draggingNodeRect,droppableContainers,over,scrollableAncestors,scrollAdjustedTranslate},activeRects.current={initial:draggingNodeRect,translated:collisionRect}}),[active,activeNode,collisions,collisionRect,draggableNodes,draggingNode,draggingNodeRect,droppableRects,droppableContainers,over,scrollableAncestors,scrollAdjustedTranslate]),useAutoScroller({...autoScrollOptions,delta:translate,draggingRect:collisionRect,pointerCoordinates,scrollableAncestors,scrollableAncestorRects});const publicContext=(0,react.useMemo)((()=>({active,activeNode,activeNodeRect,activatorEvent,collisions,containerNodeRect,dragOverlay,draggableNodes,droppableContainers,droppableRects,over,measureDroppableContainers,scrollableAncestors,scrollableAncestorRects,measuringConfiguration,measuringScheduled,windowRect})),[active,activeNode,activeNodeRect,activatorEvent,collisions,containerNodeRect,dragOverlay,draggableNodes,droppableContainers,droppableRects,over,measureDroppableContainers,scrollableAncestors,scrollableAncestorRects,measuringConfiguration,measuringScheduled,windowRect]),internalContext=(0,react.useMemo)((()=>({activatorEvent,activators,active,activeNodeRect,ariaDescribedById:{draggable:draggableDescribedById},dispatch,draggableNodes,over,measureDroppableContainers})),[activatorEvent,activators,active,activeNodeRect,dispatch,draggableDescribedById,draggableNodes,over,measureDroppableContainers]);return react.createElement(DndMonitorContext.Provider,{value:registerMonitorListener},react.createElement(InternalContext.Provider,{value:internalContext},react.createElement(PublicContext.Provider,{value:publicContext},react.createElement(ActiveDraggableContext.Provider,{value:transform},children)),react.createElement(RestoreFocus,{disabled:!1===(null==accessibility?void 0:accessibility.restoreFocus)})),react.createElement(Accessibility,{...accessibility,hiddenTextDescribedById:draggableDescribedById}))})),NullContext=(0,react.createContext)(null),defaultRole="button",ID_PREFIX="Droppable";function useDraggable(_ref){let{id,data,disabled=!1,attributes}=_ref;const key=(0,utilities_esm.YG)(ID_PREFIX),{activators,activatorEvent,active,activeNodeRect,ariaDescribedById,draggableNodes,over}=(0,react.useContext)(InternalContext),{role=defaultRole,roleDescription="draggable",tabIndex=0}=null!=attributes?attributes:{},isDragging=(null==active?void 0:active.id)===id,transform=(0,react.useContext)(isDragging?ActiveDraggableContext:NullContext),[node,setNodeRef]=(0,utilities_esm.lk)(),[activatorNode,setActivatorNodeRef]=(0,utilities_esm.lk)(),listeners=function useSyntheticListeners(listeners,id){return(0,react.useMemo)((()=>listeners.reduce(((acc,_ref)=>{let{eventName,handler}=_ref;return acc[eventName]=event=>{handler(event,id)},acc}),{})),[listeners,id])}(activators,id),dataRef=(0,utilities_esm.YN)(data);(0,utilities_esm.Es)((()=>(draggableNodes.set(id,{id,key,node,activatorNode,data:dataRef}),()=>{const node=draggableNodes.get(id);node&&node.key===key&&draggableNodes.delete(id)})),[draggableNodes,id]);return{active,activatorEvent,activeNodeRect,attributes:(0,react.useMemo)((()=>({role,tabIndex,"aria-disabled":disabled,"aria-pressed":!(!isDragging||role!==defaultRole)||void 0,"aria-roledescription":roleDescription,"aria-describedby":ariaDescribedById.draggable})),[disabled,role,tabIndex,isDragging,roleDescription,ariaDescribedById.draggable]),isDragging,listeners:disabled?void 0:listeners,node,over,setNodeRef,setActivatorNodeRef,transform}}function useDndContext(){return(0,react.useContext)(PublicContext)}const ID_PREFIX$1="Droppable",defaultResizeObserverConfig={timeout:25};function useDroppable(_ref){let{data,disabled=!1,id,resizeObserverConfig}=_ref;const key=(0,utilities_esm.YG)(ID_PREFIX$1),{active,dispatch,over,measureDroppableContainers}=(0,react.useContext)(InternalContext),previous=(0,react.useRef)({disabled}),resizeObserverConnected=(0,react.useRef)(!1),rect=(0,react.useRef)(null),callbackId=(0,react.useRef)(null),{disabled:resizeObserverDisabled,updateMeasurementsFor,timeout:resizeObserverTimeout}={...defaultResizeObserverConfig,...resizeObserverConfig},ids=(0,utilities_esm.YN)(null!=updateMeasurementsFor?updateMeasurementsFor:id),resizeObserver=useResizeObserver({callback:(0,react.useCallback)((()=>{resizeObserverConnected.current?(null!=callbackId.current&&clearTimeout(callbackId.current),callbackId.current=setTimeout((()=>{measureDroppableContainers(Array.isArray(ids.current)?ids.current:[ids.current]),callbackId.current=null}),resizeObserverTimeout)):resizeObserverConnected.current=!0}),[resizeObserverTimeout]),disabled:resizeObserverDisabled||!active}),handleNodeChange=(0,react.useCallback)(((newElement,previousElement)=>{resizeObserver&&(previousElement&&(resizeObserver.unobserve(previousElement),resizeObserverConnected.current=!1),newElement&&resizeObserver.observe(newElement))}),[resizeObserver]),[nodeRef,setNodeRef]=(0,utilities_esm.lk)(handleNodeChange),dataRef=(0,utilities_esm.YN)(data);return(0,react.useEffect)((()=>{resizeObserver&&nodeRef.current&&(resizeObserver.disconnect(),resizeObserverConnected.current=!1,resizeObserver.observe(nodeRef.current))}),[nodeRef,resizeObserver]),(0,utilities_esm.Es)((()=>(dispatch({type:Action.RegisterDroppable,element:{id,key,disabled,node:nodeRef,rect,data:dataRef}}),()=>dispatch({type:Action.UnregisterDroppable,key,id}))),[id]),(0,react.useEffect)((()=>{disabled!==previous.current.disabled&&(dispatch({type:Action.SetDroppableDisabled,id,key,disabled}),previous.current.disabled=disabled)}),[id,key,disabled,dispatch]),{active,rect,isOver:(null==over?void 0:over.id)===id,node:nodeRef,over,setNodeRef}}},"./node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{FN:()=>restrictToVerticalAxis,Mk:()=>restrictToFirstScrollableAncestor,Q_:()=>restrictToWindowEdges});__webpack_require__("./node_modules/@dnd-kit/utilities/dist/utilities.esm.js");function restrictToBoundingRect(transform,rect,boundingRect){const value={...transform};return rect.top+transform.y<=boundingRect.top?value.y=boundingRect.top-rect.top:rect.bottom+transform.y>=boundingRect.top+boundingRect.height&&(value.y=boundingRect.top+boundingRect.height-rect.bottom),rect.left+transform.x<=boundingRect.left?value.x=boundingRect.left-rect.left:rect.right+transform.x>=boundingRect.left+boundingRect.width&&(value.x=boundingRect.left+boundingRect.width-rect.right),value}const restrictToFirstScrollableAncestor=_ref=>{let{draggingNodeRect,transform,scrollableAncestorRects}=_ref;const firstScrollableAncestorRect=scrollableAncestorRects[0];return draggingNodeRect&&firstScrollableAncestorRect?restrictToBoundingRect(transform,draggingNodeRect,firstScrollableAncestorRect):transform},restrictToVerticalAxis=_ref=>{let{transform}=_ref;return{...transform,x:0}},restrictToWindowEdges=_ref=>{let{transform,draggingNodeRect,windowRect}=_ref;return draggingNodeRect&&windowRect?restrictToBoundingRect(transform,draggingNodeRect,windowRect):transform}},"./node_modules/@dnd-kit/sortable/dist/sortable.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{JR:()=>sortableKeyboardCoordinates,_G:()=>verticalListSortingStrategy,be:()=>arrayMove,gB:()=>SortableContext,gl:()=>useSortable});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@dnd-kit/core/dist/core.esm.js"),_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@dnd-kit/utilities/dist/utilities.esm.js");function arrayMove(array,from,to){const newArray=array.slice();return newArray.splice(to<0?newArray.length+to:to,0,newArray.splice(from,1)[0]),newArray}function getSortedRects(items,rects){return items.reduce(((accumulator,id,index)=>{const rect=rects.get(id);return rect&&(accumulator[index]=rect),accumulator}),Array(items.length))}function isValidIndex(index){return null!==index&&index>=0}const rectSortingStrategy=_ref=>{let{rects,activeIndex,overIndex,index}=_ref;const newRects=arrayMove(rects,overIndex,activeIndex),oldRect=rects[index],newRect=newRects[index];return newRect&&oldRect?{x:newRect.left-oldRect.left,y:newRect.top-oldRect.top,scaleX:newRect.width/oldRect.width,scaleY:newRect.height/oldRect.height}:null},defaultScale$1={scaleX:1,scaleY:1},verticalListSortingStrategy=_ref=>{var _rects$activeIndex;let{activeIndex,activeNodeRect:fallbackActiveRect,index,rects,overIndex}=_ref;const activeNodeRect=null!=(_rects$activeIndex=rects[activeIndex])?_rects$activeIndex:fallbackActiveRect;if(!activeNodeRect)return null;if(index===activeIndex){const overIndexRect=rects[overIndex];return overIndexRect?{x:0,y:activeIndex<overIndex?overIndexRect.top+overIndexRect.height-(activeNodeRect.top+activeNodeRect.height):overIndexRect.top-activeNodeRect.top,...defaultScale$1}:null}const itemGap=function getItemGap$1(clientRects,index,activeIndex){const currentRect=clientRects[index],previousRect=clientRects[index-1],nextRect=clientRects[index+1];if(!currentRect)return 0;if(activeIndex<index)return previousRect?currentRect.top-(previousRect.top+previousRect.height):nextRect?nextRect.top-(currentRect.top+currentRect.height):0;return nextRect?nextRect.top-(currentRect.top+currentRect.height):previousRect?currentRect.top-(previousRect.top+previousRect.height):0}(rects,index,activeIndex);return index>activeIndex&&index<=overIndex?{x:0,y:-activeNodeRect.height-itemGap,...defaultScale$1}:index<activeIndex&&index>=overIndex?{x:0,y:activeNodeRect.height+itemGap,...defaultScale$1}:{x:0,y:0,...defaultScale$1}};const ID_PREFIX="Sortable",Context=react__WEBPACK_IMPORTED_MODULE_0__.createContext({activeIndex:-1,containerId:ID_PREFIX,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:rectSortingStrategy,disabled:{draggable:!1,droppable:!1}});function SortableContext(_ref){let{children,id,items:userDefinedItems,strategy=rectSortingStrategy,disabled:disabledProp=!1}=_ref;const{active,dragOverlay,droppableRects,over,measureDroppableContainers}=(0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.fF)(),containerId=(0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.YG)(ID_PREFIX,id),useDragOverlay=Boolean(null!==dragOverlay.rect),items=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)((()=>userDefinedItems.map((item=>"object"==typeof item&&"id"in item?item.id:item))),[userDefinedItems]),isDragging=null!=active,activeIndex=active?items.indexOf(active.id):-1,overIndex=over?items.indexOf(over.id):-1,previousItemsRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(items),itemsHaveChanged=!function itemsEqual(a,b){if(a===b)return!0;if(a.length!==b.length)return!1;for(let i=0;i<a.length;i++)if(a[i]!==b[i])return!1;return!0}(items,previousItemsRef.current),disableTransforms=-1!==overIndex&&-1===activeIndex||itemsHaveChanged,disabled=function normalizeDisabled(disabled){return"boolean"==typeof disabled?{draggable:disabled,droppable:disabled}:disabled}(disabledProp);(0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.Es)((()=>{itemsHaveChanged&&isDragging&&measureDroppableContainers(items)}),[itemsHaveChanged,items,isDragging,measureDroppableContainers]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{previousItemsRef.current=items}),[items]);const contextValue=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)((()=>({activeIndex,containerId,disabled,disableTransforms,items,overIndex,useDragOverlay,sortedRects:getSortedRects(items,droppableRects),strategy})),[activeIndex,containerId,disabled.draggable,disabled.droppable,disableTransforms,items,overIndex,droppableRects,useDragOverlay,strategy]);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Context.Provider,{value:contextValue},children)}const defaultNewIndexGetter=_ref=>{let{id,items,activeIndex,overIndex}=_ref;return arrayMove(items,activeIndex,overIndex).indexOf(id)},defaultAnimateLayoutChanges=_ref2=>{let{containerId,isSorting,wasDragging,index,items,newIndex,previousItems,previousContainerId,transition}=_ref2;return!(!transition||!wasDragging)&&((previousItems===items||index!==newIndex)&&(!!isSorting||newIndex!==index&&containerId===previousContainerId))},defaultTransition={duration:200,easing:"ease"},transitionProperty="transform",disabledTransition=_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.Ks.Transition.toString({property:transitionProperty,duration:0,easing:"linear"}),defaultAttributes={roleDescription:"sortable"};function useSortable(_ref){let{animateLayoutChanges=defaultAnimateLayoutChanges,attributes:userDefinedAttributes,disabled:localDisabled,data:customData,getNewIndex=defaultNewIndexGetter,id,strategy:localStrategy,resizeObserverConfig,transition=defaultTransition}=_ref;const{items,containerId,activeIndex,disabled:globalDisabled,disableTransforms,sortedRects,overIndex,useDragOverlay,strategy:globalStrategy}=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(Context),disabled=function normalizeLocalDisabled(localDisabled,globalDisabled){var _localDisabled$dragga,_localDisabled$droppa;if("boolean"==typeof localDisabled)return{draggable:localDisabled,droppable:!1};return{draggable:null!=(_localDisabled$dragga=null==localDisabled?void 0:localDisabled.draggable)?_localDisabled$dragga:globalDisabled.draggable,droppable:null!=(_localDisabled$droppa=null==localDisabled?void 0:localDisabled.droppable)?_localDisabled$droppa:globalDisabled.droppable}}(localDisabled,globalDisabled),index=items.indexOf(id),data=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)((()=>({sortable:{containerId,index,items},...customData})),[containerId,customData,index,items]),itemsAfterCurrentSortable=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)((()=>items.slice(items.indexOf(id))),[items,id]),{rect,node,isOver,setNodeRef:setDroppableNodeRef}=(0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.zM)({id,data,disabled:disabled.droppable,resizeObserverConfig:{updateMeasurementsFor:itemsAfterCurrentSortable,...resizeObserverConfig}}),{active,activatorEvent,activeNodeRect,attributes,setNodeRef:setDraggableNodeRef,listeners,isDragging,over,setActivatorNodeRef,transform}=(0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.PM)({id,data,attributes:{...defaultAttributes,...userDefinedAttributes},disabled:disabled.draggable}),setNodeRef=(0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.jn)(setDroppableNodeRef,setDraggableNodeRef),isSorting=Boolean(active),displaceItem=isSorting&&!disableTransforms&&isValidIndex(activeIndex)&&isValidIndex(overIndex),shouldDisplaceDragSource=!useDragOverlay&&isDragging,dragSourceDisplacement=shouldDisplaceDragSource&&displaceItem?transform:null,finalTransform=displaceItem?null!=dragSourceDisplacement?dragSourceDisplacement:(null!=localStrategy?localStrategy:globalStrategy)({rects:sortedRects,activeNodeRect,activeIndex,overIndex,index}):null,newIndex=isValidIndex(activeIndex)&&isValidIndex(overIndex)?getNewIndex({id,items,activeIndex,overIndex}):index,activeId=null==active?void 0:active.id,previous=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({activeId,items,newIndex,containerId}),itemsHaveChanged=items!==previous.current.items,shouldAnimateLayoutChanges=animateLayoutChanges({active,containerId,isDragging,isSorting,id,index,items,newIndex:previous.current.newIndex,previousItems:previous.current.items,previousContainerId:previous.current.containerId,transition,wasDragging:null!=previous.current.activeId}),derivedTransform=function useDerivedTransform(_ref){let{disabled,index,node,rect}=_ref;const[derivedTransform,setDerivedtransform]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),previousIndex=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(index);return(0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.Es)((()=>{if(!disabled&&index!==previousIndex.current&&node.current){const initial=rect.current;if(initial){const current=(0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.Sj)(node.current,{ignoreTransform:!0}),delta={x:initial.left-current.left,y:initial.top-current.top,scaleX:initial.width/current.width,scaleY:initial.height/current.height};(delta.x||delta.y)&&setDerivedtransform(delta)}}index!==previousIndex.current&&(previousIndex.current=index)}),[disabled,index,node,rect]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{derivedTransform&&setDerivedtransform(null)}),[derivedTransform]),derivedTransform}({disabled:!shouldAnimateLayoutChanges,index,node,rect});return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{isSorting&&previous.current.newIndex!==newIndex&&(previous.current.newIndex=newIndex),containerId!==previous.current.containerId&&(previous.current.containerId=containerId),items!==previous.current.items&&(previous.current.items=items)}),[isSorting,newIndex,containerId,items]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{if(activeId===previous.current.activeId)return;if(activeId&&!previous.current.activeId)return void(previous.current.activeId=activeId);const timeoutId=setTimeout((()=>{previous.current.activeId=activeId}),50);return()=>clearTimeout(timeoutId)}),[activeId]),{active,activeIndex,attributes,data,rect,index,newIndex,items,isOver,isSorting,isDragging,listeners,node,overIndex,over,setNodeRef,setActivatorNodeRef,setDroppableNodeRef,setDraggableNodeRef,transform:null!=derivedTransform?derivedTransform:finalTransform,transition:function getTransition(){if(derivedTransform||itemsHaveChanged&&previous.current.newIndex===index)return disabledTransition;if(shouldDisplaceDragSource&&!(0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.kx)(activatorEvent)||!transition)return;if(isSorting||shouldAnimateLayoutChanges)return _dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.Ks.Transition.toString({...transition,property:transitionProperty});return}()}}function hasSortableData(entry){if(!entry)return!1;const data=entry.data.current;return!!(data&&"sortable"in data&&"object"==typeof data.sortable&&"containerId"in data.sortable&&"items"in data.sortable&&"index"in data.sortable)}const directions=[_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.vL.Down,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.vL.Right,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.vL.Up,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.vL.Left],sortableKeyboardCoordinates=(event,_ref)=>{let{context:{active,collisionRect,droppableRects,droppableContainers,over,scrollableAncestors}}=_ref;if(directions.includes(event.code)){if(event.preventDefault(),!active||!collisionRect)return;const filteredContainers=[];droppableContainers.getEnabled().forEach((entry=>{if(!entry||null!=entry&&entry.disabled)return;const rect=droppableRects.get(entry.id);if(rect)switch(event.code){case _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.vL.Down:collisionRect.top<rect.top&&filteredContainers.push(entry);break;case _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.vL.Up:collisionRect.top>rect.top&&filteredContainers.push(entry);break;case _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.vL.Left:collisionRect.left>rect.left&&filteredContainers.push(entry);break;case _dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.vL.Right:collisionRect.left<rect.left&&filteredContainers.push(entry)}}));const collisions=(0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.y$)({active,collisionRect,droppableRects,droppableContainers:filteredContainers,pointerCoordinates:null});let closestId=(0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.Vy)(collisions,"id");if(closestId===(null==over?void 0:over.id)&&collisions.length>1&&(closestId=collisions[1].id),null!=closestId){const activeDroppable=droppableContainers.get(active.id),newDroppable=droppableContainers.get(closestId),newRect=newDroppable?droppableRects.get(newDroppable.id):null,newNode=null==newDroppable?void 0:newDroppable.node.current;if(newNode&&newRect&&activeDroppable&&newDroppable){const hasDifferentScrollAncestors=(0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_1__.sl)(newNode).some(((element,index)=>scrollableAncestors[index]!==element)),hasSameContainer=isSameContainer(activeDroppable,newDroppable),isAfterActive=function isAfter(a,b){if(!hasSortableData(a)||!hasSortableData(b))return!1;if(!isSameContainer(a,b))return!1;return a.data.current.sortable.index<b.data.current.sortable.index}(activeDroppable,newDroppable),offset=hasDifferentScrollAncestors||!hasSameContainer?{x:0,y:0}:{x:isAfterActive?collisionRect.width-newRect.width:0,y:isAfterActive?collisionRect.height-newRect.height:0},rectCoordinates={x:newRect.left,y:newRect.top};return offset.x&&offset.y?rectCoordinates:(0,_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.Re)(rectCoordinates,offset)}}}};function isSameContainer(a,b){return!(!hasSortableData(a)||!hasSortableData(b))&&a.data.current.sortable.containerId===b.data.current.sortable.containerId}},"./node_modules/@dnd-kit/utilities/dist/utilities.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$$:()=>useInterval,Es:()=>useIsomorphicLayoutEffect,KG:()=>useLazyMemo,Ks:()=>CSS,Ll:()=>isNode,Re:()=>subtract,Sw:()=>canUseDOM,TW:()=>getOwnerDocument,WQ:()=>add,YG:()=>useUniqueId,YN:()=>useLatestValue,ZC:()=>usePrevious,_q:()=>useEvent,ag:()=>findFirstFocusableNode,e_:()=>getEventCoordinates,jn:()=>useCombinedRefs,kx:()=>isKeyboardEvent,l6:()=>isWindow,lk:()=>useNodeRef,sb:()=>isHTMLElement,wz:()=>isDocument,xZ:()=>isSVGElement,zk:()=>getWindow});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");function useCombinedRefs(){for(var _len=arguments.length,refs=new Array(_len),_key=0;_key<_len;_key++)refs[_key]=arguments[_key];return(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)((()=>node=>{refs.forEach((ref=>ref(node)))}),refs)}const canUseDOM="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function isWindow(element){const elementString=Object.prototype.toString.call(element);return"[object Window]"===elementString||"[object global]"===elementString}function isNode(node){return"nodeType"in node}function getWindow(target){var _target$ownerDocument,_target$ownerDocument2;return target?isWindow(target)?target:isNode(target)&&null!=(_target$ownerDocument=null==(_target$ownerDocument2=target.ownerDocument)?void 0:_target$ownerDocument2.defaultView)?_target$ownerDocument:window:window}function isDocument(node){const{Document}=getWindow(node);return node instanceof Document}function isHTMLElement(node){return!isWindow(node)&&node instanceof getWindow(node).HTMLElement}function isSVGElement(node){return node instanceof getWindow(node).SVGElement}function getOwnerDocument(target){return target?isWindow(target)?target.document:isNode(target)?isDocument(target)?target:isHTMLElement(target)||isSVGElement(target)?target.ownerDocument:document:document:document}const useIsomorphicLayoutEffect=canUseDOM?react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect:react__WEBPACK_IMPORTED_MODULE_0__.useEffect;function useEvent(handler){const handlerRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(handler);return useIsomorphicLayoutEffect((()=>{handlerRef.current=handler})),(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return null==handlerRef.current?void 0:handlerRef.current(...args)}),[])}function useInterval(){const intervalRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);return[(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(((listener,duration)=>{intervalRef.current=setInterval(listener,duration)}),[]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{null!==intervalRef.current&&(clearInterval(intervalRef.current),intervalRef.current=null)}),[])]}function useLatestValue(value,dependencies){void 0===dependencies&&(dependencies=[value]);const valueRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(value);return useIsomorphicLayoutEffect((()=>{valueRef.current!==value&&(valueRef.current=value)}),dependencies),valueRef}function useLazyMemo(callback,dependencies){const valueRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();return(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)((()=>{const newValue=callback(valueRef.current);return valueRef.current=newValue,newValue}),[...dependencies])}function useNodeRef(onChange){const onChangeHandler=useEvent(onChange),node=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),setNodeRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((element=>{element!==node.current&&(null==onChangeHandler||onChangeHandler(element,node.current)),node.current=element}),[]);return[node,setNodeRef]}function usePrevious(value){const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{ref.current=value}),[value]),ref.current}let ids={};function useUniqueId(prefix,value){return(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)((()=>{if(value)return value;const id=null==ids[prefix]?0:ids[prefix]+1;return ids[prefix]=id,prefix+"-"+id}),[prefix,value])}function createAdjustmentFn(modifier){return function(object){for(var _len=arguments.length,adjustments=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)adjustments[_key-1]=arguments[_key];return adjustments.reduce(((accumulator,adjustment)=>{const entries=Object.entries(adjustment);for(const[key,valueAdjustment]of entries){const value=accumulator[key];null!=value&&(accumulator[key]=value+modifier*valueAdjustment)}return accumulator}),{...object})}}const add=createAdjustmentFn(1),subtract=createAdjustmentFn(-1);function isKeyboardEvent(event){if(!event)return!1;const{KeyboardEvent}=getWindow(event.target);return KeyboardEvent&&event instanceof KeyboardEvent}function getEventCoordinates(event){if(function isTouchEvent(event){if(!event)return!1;const{TouchEvent}=getWindow(event.target);return TouchEvent&&event instanceof TouchEvent}(event)){if(event.touches&&event.touches.length){const{clientX:x,clientY:y}=event.touches[0];return{x,y}}if(event.changedTouches&&event.changedTouches.length){const{clientX:x,clientY:y}=event.changedTouches[0];return{x,y}}}return function hasViewportRelativeCoordinates(event){return"clientX"in event&&"clientY"in event}(event)?{x:event.clientX,y:event.clientY}:null}const CSS=Object.freeze({Translate:{toString(transform){if(!transform)return;const{x,y}=transform;return"translate3d("+(x?Math.round(x):0)+"px, "+(y?Math.round(y):0)+"px, 0)"}},Scale:{toString(transform){if(!transform)return;const{scaleX,scaleY}=transform;return"scaleX("+scaleX+") scaleY("+scaleY+")"}},Transform:{toString(transform){if(transform)return[CSS.Translate.toString(transform),CSS.Scale.toString(transform)].join(" ")}},Transition:{toString(_ref){let{property,duration,easing}=_ref;return property+" "+duration+"ms "+easing}}}),SELECTOR="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function findFirstFocusableNode(element){return element.matches(SELECTOR)?element:element.querySelector(SELECTOR)}},"./node_modules/@pqina/filepond-plugin-image-editor/dist/FilePondPluginImageEditor.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>Le});const Q=e=>e instanceof File,te=e=>/^image/.test(e.type),$=(e,o,g=[])=>{const T=document.createElement(e),E=Object.getOwnPropertyDescriptors(T.__proto__);for(const l in o)"style"===l?T.style.cssText=o[l]:E[l]&&E[l].set||/textContent|innerHTML/.test(l)||"function"==typeof o[l]?T[l]=o[l]:T.setAttribute(l,o[l]);return g.forEach((l=>T.appendChild(l))),T};let j=null;const w=()=>(null===j&&(j=typeof window<"u"&&typeof window.document<"u"),j),de=w()&&!!Node.prototype.replaceChildren?(e,o)=>e.replaceChildren(o):(e,o)=>{for(;e.lastChild;)e.removeChild(e.lastChild);void 0!==o&&e.append(o)},B=w()&&$("div",{class:"PinturaMeasure",style:"position:absolute;left:0;top:0;width:99999px;height:0;pointer-events:none;contain:strict;margin:0;padding:0;"});let X;let H=null;const Ie=e=>new Promise(((o,g)=>{let T=!1;!e.parentNode&&(null===H&&(H=w()&&/^((?!chrome|android).)*(safari|iphone|ipad)/i.test(navigator.userAgent)),H)&&(T=!0,e.style.cssText="position:absolute;visibility:hidden;pointer-events:none;left:0;top:0;width:0;height:0;",(e=>{de(B,e),B.parentNode||document.body.append(B),clearTimeout(X),X=setTimeout((()=>{B.remove()}),500)})(e));const E=()=>{const S=e.naturalWidth,y=e.naturalHeight;S&&y&&(T&&e.remove(),clearInterval(l),o({width:S,height:y}))};e.onerror=S=>{clearInterval(l),g(S)};const l=setInterval(E,1);E()})),ge=async e=>{let o,g;o=e.src?e:await(e=>new Promise((o=>{const g=(e=>"string"==typeof e)(e)?e:URL.createObjectURL(e),T=()=>{const l=new Image;l.src=g,o(l)};if(e instanceof Blob&&te(e))return T();const E=document.createElement("video");E.preload="metadata",E.onloadedmetadata=()=>o(E),E.onerror=T,E.src=g})))(e);try{g=(e=>"VIDEO"===e.nodeName)(o)?await(e=>new Promise(((o,g)=>{const T=()=>{o({width:e.videoWidth,height:e.videoHeight})};if(e.readyState>=1)return T();e.onloadedmetadata=T,e.onerror=()=>g(e.error)})))(o):await Ie(o)}finally{Q(e)&&URL.revokeObjectURL(o.src)}return g},Z=e=>e instanceof Blob&&!(e instanceof File),q=(...e)=>{},ie=e=>{e.width=1,e.height=1;const o=e.getContext("2d");o&&o.clearRect(0,0,1,1)};let W=null;const pe=(e,o)=>(()=>{if(null===W)if("WebGL2RenderingContext"in window){let e;try{e=$("canvas"),W=!!e.getContext("webgl2")}catch{W=!1}e&&ie(e),e=void 0}else W=!1;return W})()?e.getContext("webgl2",o):e.getContext("webgl",o)||e.getContext("experimental-webgl",o);let k=null;const Oe=()=>{if(null===k){let e=$("canvas");k=!!pe(e),ie(e),e=void 0}return k};let z=null;const ee=()=>(null===z&&(z=w()&&!("[object OperaMini]"===Object.prototype.toString.call(window.operamini))&&"visibilityState"in document&&"Promise"in window&&"File"in window&&"URL"in window&&"createObjectURL"in window.URL&&"performance"in window),z),Le=e=>{const{addFilter:o,utils:g,views:T}=e,{Type:E,createRoute:l}=g,{fileActionButton:S}=T,x=(({parallel:i=1,autoShift:n=!0})=>{const r=[];let t=0;const s=()=>{if(!r.length)return f.oncomplete();t++,r.shift()((()=>{t--,t<i&&I()}))},I=()=>{for(let _=0;_<i-t;_++)s()},f={queue:_=>{r.push(_),n&&I()},runJobs:I,oncomplete:()=>{}};return f})({parallel:1}),v=i=>null===i?{}:i;o("SHOULD_REMOVE_ON_REVERT",((i,{item:n,query:r})=>new Promise((t=>{const{file:s}=n;t(!(r("GET_ALLOW_IMAGE_EDITOR")&&r("GET_IMAGE_EDITOR_ALLOW_EDIT")&&r("GET_IMAGE_EDITOR_SUPPORT_EDIT")&&r("GET_IMAGE_EDITOR_SUPPORT_IMAGE")(s)))})))),o("DID_LOAD_ITEM",((i,{query:n,dispatch:r})=>new Promise(((t,s)=>{if(i.origin>1)return void t(i);const{file:I}=i;if(!n("GET_ALLOW_IMAGE_EDITOR")||!n("GET_IMAGE_EDITOR_INSTANT_EDIT")||!n("GET_IMAGE_EDITOR_SUPPORT_IMAGE")(I))return t(i);const f=()=>{if(!b.length)return;const{item:p,resolve:m,reject:O}=b[0];r("EDIT_ITEM",{id:p.id,handleEditorResponse:_(p,m,O)})},_=(p,m,O)=>h=>{b.shift(),h?m(p):O(p),r("KICK"),f()};ne({item:i,resolve:t,reject:s}),1===b.length&&f()})))),o("DID_CREATE_ITEM",((i,{query:n,dispatch:r})=>{i.getMetadata("color")&&i.setMetadata("colors",i.getMetadata("color")),i.extend("edit",(()=>{r("EDIT_ITEM",{id:i.id})}))}));const b=[],ne=i=>(b.push(i),i),J=(i,n,r=(()=>{}))=>{if(!n)return;if(!i("GET_FILE_POSTER_FILTER_ITEM")(n))return r();const{imageProcessor:t,imageReader:s,imageWriter:I,editorOptions:f,legacyDataToImageState:_,imageState:p}=v(i("GET_IMAGE_EDITOR"));if(!t)return;const[m,O]=s,[h=q,L]=I,P=n.file,G=n.getMetadata("imageState"),D=((i,n)=>{const r=i("GET_FILE_POSTER_HEIGHT"),t=i("GET_FILE_POSTER_MAX_HEIGHT");return r?(n.width=2*r,n.height=2*r):t&&(n.width=2*t,n.height=2*t),n})(i,{width:512,height:512}),U={...f,imageReader:m(O),imageWriter:h({...L||{},canvasMemoryLimit:D.width*D.height*2,preprocessImageState:(A,M,K,N)=>!G&&_?{...A,..._(void 0,N.size,{...n.getMetadata()})}:A}),imageState:{...p,...G}};x.queue((A=>{t(P,U).then((({dest:M})=>{n.setMetadata("poster",URL.createObjectURL(M),!0),A(),r()}))}))};o("CREATE_VIEW",(i=>{const{is:n,view:r,query:t}=i;if(!t("GET_ALLOW_IMAGE_EDITOR")||!t("GET_IMAGE_EDITOR_SUPPORT_WRITE_IMAGE"))return;const s=t("GET_ALLOW_FILE_POSTER");if(!(n("file-info")&&!s||n("file")&&s))return;const{createEditor:f,imageReader:_,imageWriter:p,editorOptions:m,legacyDataToImageState:O,imageState:h}=v(t("GET_IMAGE_EDITOR"));if(!(_&&p&&m&&m.locale))return;delete m.imageReader,delete m.imageWriter;const[L,P]=_,G=a=>{const{id:d}=a;return t("GET_ITEM",d)},M=(a,d)=>{if(a.ref.handleEdit||(a.ref.handleEdit=c=>{c.stopPropagation(),a.dispatch("EDIT_ITEM",{id:d.id})}),(a=>{if(!t("GET_ALLOW_FILE_POSTER"))return!1;const d=G(a);return d?!!t("GET_FILE_POSTER_FILTER_ITEM")(d)&&!!d.getMetadata("poster"):void 0})(d)){a.ref.editButton&&a.ref.editButton.parentNode&&a.ref.editButton.parentNode.removeChild(a.ref.editButton);const c=r.createChildView(S,{label:"edit",icon:t("GET_IMAGE_EDITOR_ICON_EDIT"),opacity:0});c.element.classList.add("filepond--action-edit-item"),c.element.dataset.align=t("GET_STYLE_IMAGE_EDITOR_BUTTON_EDIT_ITEM_POSITION"),c.on("click",a.ref.handleEdit),a.ref.buttonEditItem=r.appendChildView(c)}else{a.ref.buttonEditItem&&a.removeChildView(a.ref.buttonEditItem);const c=r.element.querySelector(".filepond--file-info-main"),u=document.createElement("button");u.className="filepond--action-edit-item-alt",u.innerHTML=t("GET_IMAGE_EDITOR_ICON_EDIT")+"<span>edit</span>",u.addEventListener("click",a.ref.handleEdit),c.appendChild(u),a.ref.editButton=u}};r.registerDestroyer((({root:a})=>{a.ref.buttonEditItem&&a.ref.buttonEditItem.off("click",a.ref.handleEdit),a.ref.editButton&&a.ref.editButton.removeEventListener("click",a.ref.handleEdit)}));const N={EDIT_ITEM:({root:a,props:d,action:c})=>{const{handleEditorResponse:u}=c,R=G(d),Y=Q(R.file)||Z(R.file),se=Y?R.file:R.source,C=f({...m,imageReader:L(P),src:se});C.on("load",(({size:V})=>{let F=R.getMetadata("imageState");!F&&O&&(F=O(C,V,R.getMetadata())),C.imageState={...h,...F}})),C.on("process",(({src:V,imageState:F})=>{Y||R.setFile(V),R.setMetadata("imageState",F),u&&u(!0)})),C.on("close",(()=>{u&&u(!1)}))},DID_LOAD_ITEM:({root:a,props:d})=>{const{id:c}=d,u=t("GET_ITEM",c);if(!u)return;const R=u.file;t("GET_IMAGE_EDITOR_SUPPORT_IMAGE")(R)&&(t("GET_ALLOW_FILE_POSTER")&&!u.getMetadata("poster")&&a.dispatch("REQUEST_CREATE_IMAGE_POSTER",{id:c}),t("GET_IMAGE_EDITOR_ALLOW_EDIT")&&t("GET_IMAGE_EDITOR_SUPPORT_EDIT")&&M(a,d))},DID_UPDATE_ITEM_METADATA:({root:a,props:d,action:c})=>{if(/imageState/.test(c.change.key)&&t("GET_ALLOW_FILE_POSTER"))return a.dispatch("REQUEST_CREATE_IMAGE_POSTER",{id:d.id});/poster/.test(c.change.key)&&(!t("GET_IMAGE_EDITOR_ALLOW_EDIT")||!t("GET_IMAGE_EDITOR_SUPPORT_EDIT")||M(a,d))},DID_REMOVE_ITEM:({props:a})=>{const{id:d}=a,c=t("GET_ITEM",d);if(!c)return;const u=c.getMetadata("poster");u&&URL.revokeObjectURL(u)},REQUEST_CREATE_IMAGE_POSTER:({root:a,props:d})=>J(a.query,G(d)),DID_FILE_POSTER_LOAD:void 0};if(s){const a=({root:d})=>{d.ref.buttonEditItem&&(d.ref.buttonEditItem.opacity=1)};N.DID_FILE_POSTER_LOAD=a}r.registerWriter(l(N))})),o("SHOULD_PREPARE_OUTPUT",((i,{query:n,change:r,item:t})=>new Promise((s=>{if(!n("GET_IMAGE_EDITOR_SUPPORT_IMAGE")(t.file)||r&&!/imageState/.test(r.key))return s(!1);s(!n("IS_ASYNC"))}))));const ae=(i,n,r)=>new Promise((t=>{if(!(i=>{const{imageProcessor:n,imageReader:r,imageWriter:t}=v(i("GET_IMAGE_EDITOR"));return i("GET_IMAGE_EDITOR_WRITE_IMAGE")&&i("GET_IMAGE_EDITOR_SUPPORT_WRITE_IMAGE")&&n&&r&&t})(i)||r.archived||!Q(n)&&!Z(n)||!i("GET_IMAGE_EDITOR_SUPPORT_IMAGE")(n))return t(!1);ge(n).then((()=>{const s=i("GET_IMAGE_TRANSFORM_IMAGE_FILTER");if(s){const I=s(n);if("boolean"==typeof I)return t(I);if("function"==typeof I.then)return I.then(t)}t(!0)})).catch((()=>{const s=i("GET_IMAGE_EDITOR_SUPPORT_IMAGE_FORMAT");s&&s(n)?t(!0):t(!1)}))}));return o("PREPARE_OUTPUT",((i,{query:n,item:r})=>new Promise((s=>{ae(n,i,r).then((I=>{if(!I)return s(i);(s=>new Promise(((I,f)=>{const _=()=>{x.queue((p=>{const m=r.getMetadata("imageState"),{imageProcessor:O,imageReader:h,imageWriter:L,editorOptions:P,imageState:G}=v(n("GET_IMAGE_EDITOR"));if(!(O&&h&&L&&P))return;const[D,U]=h,[A=q,M]=L;O(s,{...P,imageReader:D(U),imageWriter:A(M),imageState:{...G,...m}}).then(I).catch(f).finally(p)}))};n("GET_ALLOW_FILE_POSTER")&&!r.getMetadata("poster")?J(n,r,_):_()})))(i).then((f=>{const _=n("GET_IMAGE_EDITOR_AFTER_WRITE_IMAGE");if(_)return Promise.resolve(_(f)).then(s);s(f.dest)}))}))})))),{options:{allowImageEditor:[!0,E.BOOLEAN],imageEditorInstantEdit:[!1,E.BOOLEAN],imageEditorAllowEdit:[!0,E.BOOLEAN],imageEditorSupportEdit:[w()&&ee()&&Oe(),E.BOOLEAN],imageEditorSupportImage:[te,E.FUNCTION],imageEditorSupportImageFormat:[null,E.FUNCTION],imageEditorSupportWriteImage:[ee(),E.BOOLEAN],imageEditorWriteImage:[!0,E.BOOLEAN],imageEditorBeforeOpenImage:[void 0,E.FUNCTION],imageEditorAfterWriteImage:[void 0,E.FUNCTION],imageEditor:[null,E.OBJECT],imageEditorIconEdit:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M8.5 17h1.586l7-7L15.5 8.414l-7 7V17zm-1.707-2.707l8-8a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-8 8A1 1 0 0 1 10.5 19h-3a1 1 0 0 1-1-1v-3a1 1 0 0 1 .293-.707z" fill="currentColor" fill-rule="nonzero"/></svg>',E.STRING],styleImageEditorButtonEditItemPosition:["bottom center",E.STRING]}}};w()&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Le}))},"./node_modules/@pqina/pintura/pintura.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{BO:()=>tw,Dv:()=>Hv,EC:()=>Jv,FM:()=>Qv,GY:()=>_v,IN:()=>Vv,JF:()=>Ts,S4:()=>hw,TX:()=>ow,Wo:()=>uw,do:()=>Sg,ep:()=>bw,g1:()=>gw,if:()=>yw,ii:()=>Lw,k3:()=>Pw,ll:()=>iw,o9:()=>ww,tc:()=>ew,yF:()=>$w,zB:()=>mw});const e=[{value:65504,name:"jfif"},{value:65498,name:"sos"},{value:65505,subvalue:17784,name:"exif"},{value:65505,subvalue:26740,name:"xmp"},{value:65506,subvalue:19792,name:"mpf"}];var t=t=>{if(65496!==t.getUint16(0))return;const o=t.byteLength;let i,r,n=2;for(;n<o&&255===t.getUint8(n);){i=t.getUint16(n);const o=e.find((e=>e.value===i&&(!e.subvalue||e.subvalue===t.getUint16(n+2+2))));if(o){const{name:e}=o;r||(r={}),r[e]||(r[e]={offset:n,size:t.getUint16(n+2)})}if(65498===i)break;n+=2+t.getUint16(n+2)}return r},o=(e,o,i)=>{if(!e)return;const n=new DataView(e),r=t(n);if(!r||!r.exif)return;const a=((e,t)=>{if(65505!==e.getUint16(t))return;const o=e.getUint16(t+2);if(t+=4,1165519206!==e.getUint32(t))return;t+=6;const i=e.getUint16(t);if(18761!==i&&19789!==i)return;const n=18761===i;if(t+=2,42!==e.getUint16(t,n))return;t+=e.getUint32(t+2,n);const r=i=>{const r=[];let a=t;const s=Math.min(e.byteLength,t+o-16);for(;a<s;a+=12){const t=a;e.getUint16(t,n)===i&&r.push(t)}return r};return{read:t=>{const o=r(t);if(o.length)return e.getUint16(o[0]+8,n)},write:(t,o)=>{const i=r(t);return!!i.length&&(i.forEach((t=>e.setUint16(t+8,o,n))),!0)}}})(n,r.exif.offset);return a?void 0===i?a.read(o):a.write(o,i):void 0},i=e=>window.__pqina_webapi__?window.__pqina_webapi__[e]:window[e],n=(...e)=>{};const r={ArrayBuffer:"readAsArrayBuffer"};var a=async(e,t=[0,e.size],o)=>await((e,t=n,o={})=>new Promise(((n,a)=>{const{dataFormat:s=r.ArrayBuffer}=o,l=new(i("FileReader"));l.onload=()=>n(l.result),l.onerror=()=>a(l.error),l.onprogress=t,l[s](e)})))(e.slice(...t),o),s=async(e,t)=>{const i=await a(e,[0,262144],t);return o(i,274)||1};let l=null;var c=()=>(null===l&&(l="undefined"!=typeof window&&void 0!==window.document),l);let d=null;var u=()=>new Promise((e=>{if(null===d){const t="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=";let o=c()?new Image:{};return o.onload=()=>{d=1===o.naturalWidth,o=void 0,e(d)},void(o.src=t)}return e(d)})),h=e=>e.getContext("2d").getImageData(0,0,e.width,e.height),p=(e,t,o=[])=>{const i=document.createElement(e),n=Object.getOwnPropertyDescriptors(i.__proto__);for(const e in t)"style"===e?i.style.cssText=t[e]:n[e]&&n[e].set||/textContent|innerHTML/.test(e)||"function"==typeof t[e]?i[e]=t[e]:i.setAttribute(e,t[e]);return o.forEach((e=>i.appendChild(e))),i};const m={1:()=>[1,0,0,1,0,0],2:e=>[-1,0,0,1,e,0],3:(e,t)=>[-1,0,0,-1,e,t],4:(e,t)=>[1,0,0,-1,0,t],5:()=>[0,1,1,0,0,0],6:(e,t)=>[0,1,-1,0,t,0],7:(e,t)=>[0,-1,-1,0,t,e],8:e=>[0,-1,1,0,0,e]};var g=e=>{e.width=1,e.height=1;const t=e.getContext("2d");t&&t.clearRect(0,0,1,1)},$=e=>"data"in e,f=e=>c()?RegExp(e).test(window.navigator.userAgent):void 0;let y=null;var b=()=>(null===y&&(y=f(/Android/)),y),x=(e,t)=>{const o=p("canvas",{width:e.width,height:e.height});return o.getContext("2d",t).drawImage(e,0,0),o},v=async(e,t=1)=>{const o=await u(),[i,n]=o||t<5?[e.width,e.height]:[e.height,e.width],r=p("canvas",{width:i,height:n}),a=r.getContext("2d",{willReadFrequently:!0});if($(e)&&!o&&t>1){const t=p("canvas",{width:e.width,height:e.height});t.getContext("2d",{willReadFrequently:!0}).putImageData(e,0,0),e=t}if(!o&&t>1&&a.transform.apply(a,((e,t,o=-1)=>(-1===o&&(o=1),m[o](e,t)))(e.width,e.height,t)),$(e)){if(a.putImageData(e,0,0),b())return x(r)}else a.drawImage(e,0,0);return e instanceof HTMLCanvasElement&&g(e),r},w=async(e,t=1)=>1===t||await u()?e:h(await v(e,t)),S=e=>"object"==typeof e;const k=e=>e instanceof HTMLElement?e:S(e)?C(e):e,C=e=>{let t;return Array.isArray(e)?(t=[],e.forEach(((e,o)=>{t[o]=k(e)}))):(t={},Object.keys(e).forEach((o=>{const i=e[o];t[o]=k(i)}))),t};var T=e=>"string"==typeof e,M=e=>"function"==typeof e,P=()=>"createImageBitmap"in window,E=e=>/svg/.test(e.type),I=()=>Math.random().toString(36).substring(2,9);const A=new Map;var L=(e,t,o)=>new Promise(((i,n)=>{const r=e.toString();let a=A.get(r);if(!a){const t=(e=>`function () {self.onmessage = function (message) {(${e.toString()}).apply(null, message.data.content.concat([function (err, response) {\n response = response || {};\n const transfer = 'data' in response ? [response.data.buffer] : 'width' in response ? [response] : [];\n return self.postMessage({ id: message.data.id, content: response, error: err }, transfer);\n}]))}}`)(e),o=URL.createObjectURL((e=>new Blob(["(","function"==typeof e?e.toString():e,")()"],{type:"application/javascript"}))(t)),i=new Map,n=new Worker(o);a={url:o,worker:n,messages:i,terminationTimeout:void 0,terminate:()=>{clearTimeout(a.terminationTimeout),a.worker.terminate(),URL.revokeObjectURL(o),A.delete(r)}},n.onmessage=function(e){const{id:t,content:o,error:n}=e.data;if(clearTimeout(a.terminationTimeout),a.terminationTimeout=setTimeout((()=>{i.size>0||a.terminate()}),500),!i.has(t))return;const r=i.get(t);i.delete(t),null!=n?r.reject(n):r.resolve(o)},A.set(r,a)}const s=I();a.messages.set(s,{resolve:i,reject:n}),a.worker.postMessage({id:s,content:t},o)}));let z=null;var F=()=>(null===z&&(z=f(/Firefox/)),z);const D=async(e,t)=>{const o=await(async(e,t)=>{const o=p("img",{src:URL.createObjectURL(e)}),i=await((e,t)=>new Promise(((o,i)=>{const n=()=>o(((e,{width:t,height:o,canvasMemoryLimit:i,contextOptions:n})=>{let r=t||e.naturalWidth,a=o||e.naturalHeight;r||a||(r=300,a=150);const s=r*a;if(i&&s>i){const e=Math.sqrt(i)/Math.sqrt(s);r=Math.floor(r*e),a=Math.floor(a*e)}const l=p("canvas");return l.width=r,l.height=a,l.getContext("2d",n).drawImage(e,0,0,r,a),l})(e,t));e.complete&&e.width?n():(e.onload=n,e.onerror=()=>i(new Error("Failed to load image")))})))(o,t);return URL.revokeObjectURL(o.src),i})(e,{canvasMemoryLimit:t,contextOptions:{willReadFrequently:!0}}),i=h(o);return g(o),i};var O=async(e,t)=>{if(b()&&!F())return await D(e,t);let o;if(P()&&!E(e)&&"OffscreenCanvas"in window)try{o=await L(((e,t,o)=>{createImageBitmap(e).then((e=>{let i=e.width,n=e.height;const r=i*n;if(t&&r>t){const e=Math.sqrt(t)/Math.sqrt(r);i=Math.floor(i*e),n=Math.floor(n*e)}const a=new OffscreenCanvas(i,n),s=a.getContext("2d",{willReadFrequently:!0});s.drawImage(e,0,0,i,n);const l=s.getImageData(0,0,a.width,a.height);o(null,l)})).catch((e=>{o(e)}))}),[e,t])}catch(e){}return o&&o.width?o:await D(e,t)},B=(e,t,o)=>new Promise(((i,n)=>{try{e.toBlob((e=>{if(!e)return n(new Error("Failed to create blob"));i(e)}),t,o)}catch(e){n(e)}})),W=async(e,t,o)=>{const i=await v(e),n=await B(i,t,o);return g(i),n};const V={matroska:"mkv"};var _=e=>{const t=(e.match(/\/([a-z0-9]+)/)||[])[1];if(/^x/.test(t)){const[,t=""]=e.split("/x-");return V[t]}return t},N=e=>e.substr(0,e.lastIndexOf("."))||e;const H=/avif|bmp|gif|jpg|jpeg|jpe|jif|jfif|png|svg|tiff|webp/;var j=e=>{return e&&(t=(o=e,o.split(".").pop()).toLowerCase(),H.test(t)?"image/"+(/jfif|jif|jpe|jpg/.test(t)?"jpeg":"svg"===t?"svg+xml":t):"");var t,o},U=(e,t,o)=>{const n=(new Date).getTime(),r=e.type.length&&!/null|text/.test(e.type),a=r?e.type:o,s=((e,t)=>{const o=j(e);if(o===t)return e;const i=_(t)||o;return`${N(e)}.${i}`})(t,a);try{return new(i("File"))([e],s,{lastModified:n,type:r?e.type:a})}catch(t){const o=r?e.slice():e.slice(0,e.size,a);return o.lastModified=n,o.name=s,o}},G=(e,t)=>e/t,Z=e=>e;const X=Math.PI,Y=Math.PI/2,q=Y/2;var K=e=>{const t=Math.abs(e)%Math.PI;return t>q&&t<Math.PI-q};const J={Top:"t",Right:"r",Bottom:"b",Left:"l",TopLeft:"tl",TopRight:"tr",BottomRight:"br",BottomLeft:"bl"},{Top:Q,Right:ee,Bottom:te,Left:oe,TopLeft:ie,TopRight:ne,BottomRight:re,BottomLeft:ae}=J;var se={[Q]:[.5,0],[ee]:[1,.5],[te]:[.5,1],[oe]:[0,.5],[ie]:[0,0],[ne]:[1,0],[re]:[1,1],[ae]:[0,1]},le=(e,t=12)=>parseFloat(e.toFixed(t));const ce=(e,t,o)=>o+(e-o)*t,de=e=>({x:e.x+.5*e.width,y:e.y+.5*e.height,rx:.5*e.width,ry:.5*e.height}),ue=()=>he(0,0),he=(e,t)=>({x:e,y:t}),pe=e=>he(e.pageX,e.pageY),me=e=>he(e.x,e.y),ge=e=>(e.x=-e.x,e.y=-e.y,e),$e=(e,t,o=ue())=>{const i=Math.cos(t),n=Math.sin(t),r=e.x-o.x,a=e.y-o.y;return e.x=o.x+i*r-n*a,e.y=o.y+n*r+i*a,e},fe=e=>Math.sqrt(e.x*e.x+e.y*e.y),ye=e=>{const t=Math.sqrt(e.x*e.x+e.y*e.y);return 0===t?ue():(e.x/=t,e.y/=t,e)},be=(e,t)=>Math.atan2(t.y-e.y,t.x-e.x),xe=(e,t)=>e.x===t.x&&e.y===t.y,ve=(e,t)=>(e.x=t(e.x),e.y=t(e.y),e),we=(e,t)=>(e.x+=t.x,e.y+=t.y,e),Se=(e,t)=>(e.x-=t.x,e.y-=t.y,e),ke=(e,t)=>(e.x/=t,e.y/=t,e),Ce=(e,t)=>(e.x*=t,e.y*=t,e),Te=(e,t)=>e.x*t.x+e.y*t.y,Me=(e,t)=>e.x*t.y-e.y*t.x,Re=(e,t=ue())=>{const o=e.x-t.x,i=e.y-t.y;return o*o+i*i},Pe=(e,t=ue())=>Math.sqrt(Re(e,t)),Ie=e=>{let t=0,o=0;return e.forEach((e=>{t+=e.x,o+=e.y})),he(t/e.length,o/e.length)},Ae=(e,t,o,i,n)=>(e.forEach((e=>{e.x=t?i-(e.x-i):e.x,e.y=o?n-(e.y-n):e.y})),e),Le=(e,t,o,i)=>{const n=Math.sin(t),r=Math.cos(t);return e.forEach((e=>{e.x-=o,e.y-=i;const t=e.x*r-e.y*n,a=e.x*n+e.y*r;e.x=o+t,e.y=i+a})),e},ze=(e,t)=>({width:e,height:t}),Fe=e=>ze(e.width,e.height),De=e=>ze(e.width,e.height),Oe=e=>ze(e.width,e.height),Be=e=>ze(e[0],e[1]),We=e=>{return/img/i.test(e.nodeName)?ze((t=e).naturalWidth,t.naturalHeight):De(e);var t},Ve=(e,t)=>ze(e,t),_e=(e,t,o=Z)=>o(e.width)===o(t.width)&&o(e.height)===o(t.height),Ne=(e,t)=>(e.width*=t,e.height*=t,e),He=e=>he(.5*e.width,.5*e.height),je=(e,t)=>{const o=Math.abs(t),i=Math.abs(Math.cos(o)),n=Math.abs(Math.sin(o)),r=i*e.width+n*e.height,a=n*e.width+i*e.height;return e.width=r,e.height=a,e},Ue=(e,t)=>e.width>=t.width&&e.height>=t.height,Ge=(e,t)=>(e.width=t(e.width),e.height=t(e.height),e),Ze=(e,t)=>({start:e,end:t}),Xe=e=>Ze(me(e.start),me(e.end)),Ye=(e,t)=>{if(0===t)return e;const o=he(e.start.x-e.end.x,e.start.y-e.end.y),i=ye(o),n=Ce(i,t);return e.start.x+=n.x,e.start.y+=n.y,e.end.x-=n.x,e.end.y-=n.y,e},qe=[he(-1,-1),he(-1,1),he(1,1),he(1,-1)],Ke=(e,t,o,i)=>({x:e,y:t,width:o,height:i}),Je=e=>Ke(e.x,e.y,e.width,e.height),Qe=()=>Ke(0,0,0,0),et=e=>Ke(0,0,e.width,e.height),tt=e=>Ke(e[3],e[0],e[1]-e[3],e[2]-e[0]),ot=e=>Ke(e.x||0,e.y||0,e.width||0,e.height||0),it=e=>{let t=e[0].x,o=e[0].x,i=e[0].y,n=e[0].y;return e.forEach((e=>{t=Math.min(t,e.x),o=Math.max(o,e.x),i=Math.min(i,e.y),n=Math.max(n,e.y)})),Ke(t,i,o-t,n-i)},nt=e=>at(e.x-e.rx,e.y-e.ry,2*e.rx,2*e.ry),rt=(e,t)=>Ke(e.x-.5*t.width,e.y-.5*t.height,t.width,t.height),at=(e,t,o,i)=>Ke(e,t,o,i),st=e=>he(e.x+.5*e.width,e.y+.5*e.height),lt=(e,t)=>(e.x+=t.x,e.y+=t.y,e),ct=(e,t,o)=>(o=o||st(e),e.x=t*(e.x-o.x)+o.x,e.y=t*(e.y-o.y)+o.y,e.width=t*e.width,e.height=t*e.height,e),dt=(e,t,o,i)=>{const n=(i.x-e.x)/e.width,r=(i.y-e.y)/e.height;let a=Math.max(t.width,e.width),s=Math.max(t.height,e.height);return a=Math.min(o.width,a),s=Math.min(o.height,s),e.x=i.x-n*a,e.y=i.y-r*s,e.width=a,e.height=s,e},ut=(e,t)=>{const[o,i]=se[t],n=o*e.width,r=i*e.height;return he(e.x+n,e.y+r)},ht=(e,t)=>(e.x*=t,e.y*=t,e.width*=t,e.height*=t,e),pt=(e,t,o=Z)=>o(e.x)===o(t.x)&&o(e.y)===o(t.y)&&o(e.width)===o(t.width)&&o(e.height)===o(t.height),mt=e=>G(e.width,e.height),gt=(e,t,o,i,n)=>(e.x=t,e.y=o,e.width=i,e.height=n,e),$t=(e,t)=>(e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e),ft=(e,t,o)=>(o||(o=st(e)),St(e).map((e=>$e(e,t,o)))),yt=(e,t)=>Ke(.5*e.width-.5*t.width,.5*e.height-.5*t.height,t.width,t.height),bt=(e,t)=>!(t.x<e.x||t.y<e.y||t.x>e.x+e.width||t.y>e.y+e.height),xt=(e,t,o=ue())=>{if(0===e.width||0===e.height)return Qe();const i=mt(e);t||(t=i);let n=e.width,r=e.height;return t>i?n=r*t:r=n/t,Ke(o.x+.5*(e.width-n),o.y+.5*(e.height-r),n,r)},vt=(e,t=mt(e),o=ue())=>{if(0===e.width||0===e.height)return Qe();let i=e.width,n=i/t;return n>e.height&&(n=e.height,i=n*t),Ke(o.x+.5*(e.width-i),o.y+.5*(e.height-n),i,n)},wt=e=>[Math.min(e.y,e.y+e.height),Math.max(e.x,e.x+e.width),Math.max(e.y,e.y+e.height),Math.min(e.x,e.x+e.width)],St=e=>[he(e.x,e.y),he(e.x+e.width,e.y),he(e.x+e.width,e.y+e.height),he(e.x,e.y+e.height)],kt=(e,t)=>{if(e)return e.x=t(e.x),e.y=t(e.y),e.width=t(e.width),e.height=t(e.height),e},Ct=(e,t,o=st(e))=>St(e).map(((e,i)=>{const n=qe[i];return he(ce(e.x,1+n.x*t.x,o.x),ce(e.y,1+n.y*t.y,o.y))})),Tt=e=>(e.x=0,e.y=0,e),Mt=e=>{const t=e[0],o=e[e.length-1];e=xe(t,o)?e:[...e,t];const i=t.x,n=t.y;let r,a,s,l=0,c=0,d=0,u=0;const h=e.length;for(;c<h;c++)r=e[c],a=e[c+1>h-1?0:c+1],s=(r.y-n)*(a.x-i)-(a.y-n)*(r.x-i),l+=s,d+=(r.x+a.x-2*i)*s,u+=(r.y+a.y-2*n)*s;return s=3*l,he(i+d/s,n+u/s)},Rt=(e,t)=>Pt(e.start,e.end,t.start,t.end),Pt=(e,t,o,i)=>{const n=(i.y-o.y)*(t.x-e.x)-(i.x-o.x)*(t.y-e.y);if(0===n)return;const r=((i.x-o.x)*(e.y-o.y)-(i.y-o.y)*(e.x-o.x))/n,a=((t.x-e.x)*(e.y-o.y)-(t.y-e.y)*(e.x-o.x))/n;return r<0||r>1||a<0||a>1?void 0:he(e.x+r*(t.x-e.x),e.y+r*(t.y-e.y))},Et=(e,t,{ignoreIdenticalLines:o=!1,breakOnIntersection:i=!1}={})=>{const n=t.length,r=[];for(let a=0;a<n-1;a++){if(o&&(xe(e.start,t[a])||xe(e.start,t[a+1])||xe(e.end,t[a])||xe(e.end,t[a+1])))continue;const n=Pt(e.start,e.end,t[a],t[a+1]);if(n){if(i)return[n];r.push(n)}}return r.length?r:void 0},It=(e,t)=>{let o=0,i=0,n=!1;const r=t.length;for(o=0,i=r-1;o<r;i=o++)t[o].y>e.y!=t[i].y>e.y&&e.x<(t[i].x-t[o].x)*(e.y-t[o].y)/(t[i].y-t[o].y)+t[o].x&&(n=!n);return n},At=e=>{const t=[];for(let o=0;o<e.length;o++){let i=o+1;i===e.length&&(i=0),t.push(Ze(me(e[o]),me(e[i])))}return t},Lt=(e,t=0)=>At(e).map((e=>Ye(e,t))),zt=(e,t,o,i=0,n=!1,r=!1,a=12)=>{const s=[];for(let i=0;i<a;i++)s.push(he(e.x+t*Math.cos(i*(2*Math.PI)/a),e.y+o*Math.sin(i*(2*Math.PI)/a)));return(n||r)&&Ae(s,n,r,e.x,e.y),i&&Le(s,i,e.x,e.y),s},Ft=(e,t,o,i)=>{const n=he(e.x-o.x,e.y-o.y),r=he(i.x-o.x,i.y-o.y),a=Te(r,r);let s=Te(n,r)/a;s=s<0?0:s,s=s>1?1:s;const l=he(r.x*s+o.x-e.x,r.y*s+o.y-e.y);return Te(l,l)<=t*t},Dt=(e,t,o)=>{const i=o.length;for(let n=0;n<i-1;n++)if(Ft(e,t,o[n],o[n+1]))return!0;return!1},Ot=(e,t,o)=>!!It(e,o)||!!Dt(e,t,o)||Ft(e,t,o[0],o[o.length-1]),Bt=(e,t,o,i,n)=>Ot(e,t,ft(o,i,n||st(o)));var Wt=(e,t)=>{const o=et(e),i=st(o),n=ft(o,t,i);return Tt(it(n))},Vt=(e,t)=>e instanceof HTMLElement&&(!t||new RegExp(`^${t}$`,"i").test(e.nodeName)),_t=e=>e instanceof File,Nt=async(e,t,o)=>{const i=await B(e,t,o);return U(i,"canvas")},Ht=e=>e.split("/").pop().split(/\?|\#/).shift();const jt=c()&&Node.prototype.replaceChildren?(e,t)=>e.replaceChildren(t):(e,t)=>{for(;e.lastChild;)e.removeChild(e.lastChild);void 0!==t&&e.append(t)},Ut=c()&&p("div",{class:"PinturaMeasure",style:"position:absolute;left:0;top:0;width:99999px;height:0;pointer-events:none;contain:strict;margin:0;padding:0;"});let Gt;var Zt=e=>(jt(Ut,e),Ut.parentNode||document.body.append(Ut),clearTimeout(Gt),Gt=setTimeout((()=>{Ut.remove()}),500),e);let Xt=null;var Yt=()=>(null===Xt&&(Xt=c()&&/^((?!chrome|android).)*(safari|iphone|ipad)/i.test(navigator.userAgent)),Xt),qt=e=>new Promise(((t,o)=>{let i=!1;!e.parentNode&&Yt()&&(i=!0,e.style.cssText="position:absolute;visibility:hidden;pointer-events:none;left:0;top:0;width:0;height:0;",Zt(e));const n=()=>{const o=e.naturalWidth,n=e.naturalHeight;o&&n&&(i&&e.remove(),clearInterval(r),t({width:o,height:n}))};e.onerror=e=>{clearInterval(r),o(e)};const r=setInterval(n,1);n()})),Kt=e=>new Promise(((t,o)=>{const i=()=>{t({width:e.videoWidth,height:e.videoHeight})};if(e.readyState>=1)return i();e.onloadedmetadata=i,e.onerror=()=>o(e.error)})),Jt=e=>/^image/.test(e.type),Qt=e=>new Promise((t=>{const o=T(e)?e:URL.createObjectURL(e),i=()=>{const e=new Image;e.src=o,t(e)};if(e instanceof Blob&&Jt(e))return i();const n=document.createElement("video");n.preload="metadata",n.onloadedmetadata=()=>t(n),n.onerror=i,n.src=o})),eo=e=>"VIDEO"===e.nodeName,to=async e=>{let t,o;t=e.src?e:await Qt(e);try{o=eo(t)?await Kt(t):await qt(t)}finally{_t(e)&&URL.revokeObjectURL(t.src)}return o},io=(e=0,t=!0)=>new(i("ProgressEvent"))("progress",{loaded:100*e,total:100,lengthComputable:t}),no=(e,t,o=(e=>e))=>e.getAllResponseHeaders().indexOf(t)>=0?o(e.getResponseHeader(t)):void 0,ro=e=>{if(!e)return null;const t=e.split(/filename=|filename\*=.+''/).splice(1).map((e=>e.trim().replace(/^["']|[;"']{0,2}$/g,""))).filter((e=>e.length));return t.length?decodeURI(t[t.length-1]):null};class so extends Error{constructor(e,t,o){super(e),this.name="EditorError",this.code=t,this.metadata=o}}var lo=(e,t)=>{const{headers:o={},credentials:i}=t||{};Object.entries(o).forEach((([t,o])=>e.setRequestHeader(t,o))),i&&(e.withCredentials="omit"!==i)},uo=e=>e instanceof Blob&&!(e instanceof File),ho=e=>"close"in e,po=async(e,t,o)=>{if(_t(e)||uo(e))return e;if(T(e))return await((e,t,o)=>/^data:/.test(e)?(async(e,t="data-uri",o=n)=>{o(io(0));const i=await fetch(e);o(io(.33));const r=await i.blob();let a;Jt(r)||(a="image/"+(e.includes(",/9j/")?"jpeg":"png")),o(io(.66));const s=U(r,t,a);return o(io(1)),s})(e,void 0,t):((e,t,o)=>new Promise(((i,n)=>{const r=()=>n(new so("Error fetching image","URL_REQUEST",a)),a=new XMLHttpRequest;a.onprogress=t,a.onerror=r,a.onload=()=>{if(!a.response||a.status>=300||a.status<200)return r();const t=no(a,"Content-Type"),o=no(a,"Content-Disposition",ro)||Ht(e);i(U(a.response,o,t||j(o)))};const{willRequest:s}=o;Promise.resolve(s&&s(e,{resourceType:"image"})).then((t=>{if(!1===t)return n("Image load rejected");a.open("GET",e),lo(a,t),a.responseType="blob",a.send()})).catch(console.error)})))(e,t,o))(e,t,o);if(Vt(e,"canvas"))return await Nt(e);if(Vt(e,"img"))return await(async e=>{const t=await to(e),o=await(e=>new Promise(((t,o)=>{if(e.complete)return t(e);e.onload=()=>t(e),e.onerror=()=>o(new Error("Failed to load image"))})))(e),i=p("canvas",t);i.getContext("2d",{willReadFrequently:!0}).drawImage(o,0,0);const n=await B(i);return U(n,Ht(o.src))})(e);if($(e)||ho(e))return await Nt(await v(e));throw new so("Invalid image source","invalid-image-source")};let mo=null;var go=()=>(null===mo&&(mo=c()&&/^mac/i.test(navigator.platform)),mo);let $o=null;var fo=()=>(null===$o&&($o=c()&&(f(/iPhone|iPad|iPod/)||go()&&navigator.maxTouchPoints>=1)),$o),yo=async(e,t=1)=>await u()||fo()||t<5?e:Ve(e.height,e.width),bo=e=>/jpeg/.test(e.type),xo=e=>{return"object"!=typeof(t=e)||t.constructor!=Object?e:JSON.stringify(e);var t},vo=(e,t=0,o)=>(0===t||(e.translate(o.x,o.y),e.rotate(t),e.translate(-o.x,-o.y)),e),wo=(e,t,o)=>(e.scale(t,o),e),So=async(e,t={})=>{const{flipX:o,flipY:i,rotation:n,crop:r}=t,a=De(e),s=o||i,l=!!n,c=r&&(r.x||r.y||r.width||r.height),d=c&&pt(r,et(a)),u=c&&!d;if(!s&&!l&&!u)return e;let h,m=p("canvas",{width:e.width,height:e.height});if(m.getContext("2d",{willReadFrequently:!0}).putImageData(e,0,0),s){const e=p("canvas",{width:m.width,height:m.height}).getContext("2d",{willReadFrequently:!0});wo(e,o?-1:1,i?-1:1),e.drawImage(m,o?-m.width:0,i?-m.height:0),e.restore(),g(m),m=e.canvas}if(l){const e=Ge(Oe(it(ft(ot(m),n))),Math.floor),t=p("canvas",{width:r.width,height:r.height}).getContext("2d",{willReadFrequently:!0});((e,t,o)=>{e.translate(t,o)})(t,-r.x,-r.y),vo(t,n,He(e)),t.drawImage(m,.5*(e.width-m.width),.5*(e.height-m.height)),t.restore(),g(m),m=t.canvas}else if(u)return h=m.getContext("2d",{willReadFrequently:!0}).getImageData(r.x,r.y,r.width,r.height),g(m),h;return h=m.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,m.width,m.height),g(m),h},ko=(e,t)=>{const{imageData:o,width:i,height:n}=e,r=o.width,a=o.height,s=Math.round(i),l=Math.round(n),c=o.data,d=new Uint8ClampedArray(s*l*4),u=r/s,h=a/l,p=Math.ceil(.5*u),m=Math.ceil(.5*h);for(let e=0;e<l;e++)for(let t=0;t<s;t++){const o=4*(t+e*s);let i=0,n=0,a=0,l=0,g=0,$=0,f=0;const y=(e+.5)*h;for(let o=Math.floor(e*h);o<(e+1)*h;o++){const e=Math.abs(y-(o+.5))/m,s=(t+.5)*u,d=e*e;for(let e=Math.floor(t*u);e<(t+1)*u;e++){let t=Math.abs(s-(e+.5))/p;const u=Math.sqrt(d+t*t);if(u<-1||u>1)continue;if(i=2*u*u*u-3*u*u+1,i<=0)continue;t=4*(e+o*r);const h=c[t+3];f+=i*h,a+=i,h<255&&(i=i*h/250),l+=i*c[t],g+=i*c[t+1],$+=i*c[t+2],n+=i}}d[o]=l/n,d[o+1]=g/n,d[o+2]=$/n,d[o+3]=f/a}t(null,{data:d,width:s,height:l})},Co=e=>{if(e instanceof ImageData)return e;let t;try{t=new ImageData(e.width,e.height)}catch(o){t=p("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(e.data),t},To=async(e,t={},o)=>{const{width:i,height:n,fit:r,upscale:a}=t;if(!i&&!n)return e;let s=i,l=n;if(i?n||(l=i):s=n,"force"!==r){const t=s/e.width,o=l/e.height;let i=1;if("cover"===r?i=Math.max(t,o):"contain"===r&&(i=Math.min(t,o)),i>1&&!1===a)return e;s=Math.round(e.width*i),l=Math.round(e.height*i)}return s=Math.max(s,1),l=Math.max(l,1),e.width===s&&e.height===l?e:o?o(e,s,l):(e=await L(ko,[{imageData:e,width:s,height:l}],[e.data.buffer]),Co(e))},Mo=(e,t)=>{const{imageData:o,matrix:i}=e;if(!i)return t(null,o);const n=new Uint8ClampedArray(o.width*o.height*4),r=o.data,a=r.length,s=i[0],l=i[1],c=i[2],d=i[3],u=i[4],h=i[5],p=i[6],m=i[7],g=i[8],$=i[9],f=i[10],y=i[11],b=i[12],x=i[13],v=i[14],w=i[15],S=i[16],k=i[17],C=i[18],T=i[19];let M=0,R=0,P=0,E=0,I=0,A=0,L=0,z=0,F=0,D=0,O=0,B=0;for(;M<a;M+=4)R=r[M]/255,P=r[M+1]/255,E=r[M+2]/255,I=r[M+3]/255,A=R*s+P*l+E*c+I*d+u,L=R*h+P*p+E*m+I*g+$,z=R*f+P*y+E*b+I*x+v,F=R*w+P*S+E*k+I*C+T,D=Math.max(0,A*F)+(1-F),O=Math.max(0,L*F)+(1-F),B=Math.max(0,z*F)+(1-F),n[M]=255*Math.max(0,Math.min(1,D)),n[M+1]=255*Math.max(0,Math.min(1,O)),n[M+2]=255*Math.max(0,Math.min(1,B)),n[M+3]=255*I;t(null,{data:n,width:o.width,height:o.height})},Ro=(e,t)=>{const{imageData:o,matrix:i}=e;if(!i)return t(null,o);let n=i.reduce(((e,t)=>e+t));n=n<=0?1:n;const r=o.width,a=o.height,s=o.data;let l=0,c=0,d=0;const u=Math.round(Math.sqrt(i.length)),h=Math.floor(u/2);let p=0,m=0,g=0,$=0,f=0,y=0,b=0,x=0,v=0,w=0;const S=new Uint8ClampedArray(r*a*4);for(d=0;d<a;d++)for(c=0;c<r;c++){for(p=0,m=0,g=0,$=0,y=0;y<u;y++)for(f=0;f<u;f++)b=d+y-h,x=c+f-h,b<0&&(b=a-1),b>=a&&(b=0),x<0&&(x=r-1),x>=r&&(x=0),v=4*(b*r+x),w=i[y*u+f],p+=s[v]*w,m+=s[v+1]*w,g+=s[v+2]*w,$+=s[v+3]*w;S[l]=p/n,S[l+1]=m/n,S[l+2]=g/n,S[l+3]=$/n,l+=4}t(null,{data:S,width:r,height:a})},Po=(e,t)=>{let{imageData:o,strength:i}=e;if(!i)return t(null,o);const n=new Uint8ClampedArray(o.width*o.height*4),r=o.width,a=o.height,s=o.data,l=(e,t)=>(c=e-w,d=t-S,Math.sqrt(c*c+d*d));let c,d,u,h,p,m,g,$,f,y,b,x=0,v=0,w=.5*r,S=.5*a,k=l(0,0);for(i>0?(u=0,h=0,p=0):(i=Math.abs(i),u=1,h=1,p=1),v=0;v<a;v++)for(x=0;x<r;x++)C=4*(x+v*r),T=s,M=n,R=l(x,v)*i/k,m=T[C]/255,g=T[C+1]/255,$=T[C+2]/255,f=T[C+3]/255,y=1-R,b=y*f+R,M[C]=(y*f*m+R*u)/b*255,M[C+1]=(y*f*g+R*h)/b*255,M[C+2]=(y*f*$+R*p)/b*255,M[C+3]=255*b;var C,T,M,R;t(null,{data:n,width:o.width,height:o.height})},Eo=(e,t)=>{const{imageData:o,level:i,monochrome:n=!1}=e;if(!i)return t(null,o);const r=new Uint8ClampedArray(o.width*o.height*4),a=o.data,s=a.length;let l,c,d,u=0;const h=()=>255*(2*Math.random()-1)*i,p=n?()=>{const e=h();return[e,e,e]}:()=>[h(),h(),h()];for(;u<s;u+=4)[l,c,d]=p(),r[u]=a[u]+l,r[u+1]=a[u+1]+c,r[u+2]=a[u+2]+d,r[u+3]=a[u+3];t(null,{data:r,width:o.width,height:o.height})},Io=(e,t)=>{const{imageData:o,level:i}=e;if(!i)return t(null,o);const n=new Uint8ClampedArray(o.width*o.height*4),r=o.data,a=r.length;let s,l,c,d=0;for(;d<a;d+=4)s=r[d]/255,l=r[d+1]/255,c=r[d+2]/255,n[d]=255*Math.pow(s,i),n[d+1]=255*Math.pow(l,i),n[d+2]=255*Math.pow(c,i),n[d+3]=r[d+3];t(null,{data:n,width:o.width,height:o.height})},Ao=async(e,t={})=>{const{colorMatrix:o,convolutionMatrix:i,gamma:n,noise:r,vignette:a}=t,s=[];if(i&&s.push([Ro,{matrix:i.clarity}]),n>0&&s.push([Io,{level:1/n}]),o&&!(e=>{const t=e.length;let o;const i=t>=20?6:t>=16?5:3;for(let n=0;n<t;n++){if(o=e[n],1===o&&n%i!=0)return!1;if(0!==o&&1!==o)return!1}return!0})(o)&&s.push([Mo,{matrix:o}]),(r>0||r<0)&&s.push([Eo,{level:r}]),(a>0||a<0)&&s.push([Po,{strength:a}]),!s.length)return e;const l=(e,t)=>`(err, imageData) => {\n (${e[t][0].toString()})(Object.assign({ imageData: imageData }, filterInstructions[${t}]), \n ${e[t+1]?l(e,t+1):"done"})\n }`,c=`function (options, done) {\n const filterInstructions = options.filterInstructions;\n const imageData = options.imageData;\n (${l(s,0)})(null, imageData)\n }`;return e=await L(c,[{imageData:e,filterInstructions:s.map((e=>e[1]))}],[e.data.buffer]),Co(e)},Lo=e=>"number"==typeof e,zo=e=>T(e)&&null!==e.match(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g),Fo=(e,t)=>e.hasOwnProperty(t),Do=e=>Array.isArray(e);let Oo=64,Bo=102,Wo=112,Vo=!1;var _o=(e,t)=>(!Vo&&c()&&(/^win/i.test(navigator.platform)&&(Bo=103),(fo()||go())&&(Oo=63.5,Bo=110,Wo=123),Vo=!0),`<svg${t?` aria-label="${t}"`:""} width="128" height="128" viewBox="0 0 128 128" preserveAspectRatio="xMinYMin meet" xmlns="http://www.w3.org/2000/svg"><text x="${Oo}" y="${Bo}" alignment-baseline="text-top" dominant-baseline="text-top" text-anchor="middle" font-size="${Wo}px">${e}</text></svg>`),No=e=>e instanceof Blob,Ho=(e,t)=>e/t*100+"%",jo=e=>`rgba(${Math.round(255*e[0])}, ${Math.round(255*e[1])}, ${Math.round(255*e[2])}, ${Lo(e[3])?e[3]:1})`,Uo=e=>Object.values(e).join("_");const Go=async(e,t=0)=>{const o=p("canvas",{width:80,height:80}).getContext("2d");return await((e=0)=>new Promise((t=>{setTimeout(t,e)})))(t),o.drawImage(e,0,0,80,80),!((e=>!new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data.buffer).some((e=>0!==e)))(o)&&t<=256)||await Go(e,t+16)},Zo=new Map;var Xo=e=>new Promise(((t,o)=>{const i=new FileReader;i.onerror=()=>o(i.error),i.onload=()=>t(i.result),i.readAsDataURL(e)})),Yo=()=>{let e=[];return{sub:(t,o)=>(e.push({event:t,callback:o}),()=>e=e.filter((e=>e.event!==t||e.callback!==o))),pub:(t,o)=>{e.filter((e=>e.event===t)).forEach((e=>e.callback(o)))}}};const qo=32,Ko=({color:e=[0,0,0],fontSize:t=16,fontFamily:o="sans-serif",fontVariant:i="normal",fontWeight:n="normal",fontStyle:r="normal",textAlign:a="left",letterSpacing:s="normal",lineHeight:l=20},c=1)=>`font-size:${t*c}px;font-style:${r};font-weight:${n};font-family:${o};font-variant:${i};line-height:${l*c}px;text-align:${a};letter-spacing:${Lo(s)?s+"px":"normal"};color:${jo(e)};`,Jo=(e,t,o=1)=>{const{width:i,height:n,disableNewline:r}=t,a=!i,s=!1===r?((e="")=>e.split("\n").length)(e):void 0,l=a?"normal":"break-word",c=a&&!s?"nowrap":"pre-line";return`max-width:none;min-width:auto;width:${a?"auto":i*o+"px"};height:${n?n*o+"px":"auto"};margin-top:0;margin-bottom:0;padding-top:${(({fontSize:e=16,lineHeight:t=20}={})=>.5*Math.max(0,e-t))(t)*o}px;word-break:${l};word-wrap:normal;white-space:${c};`},Qo=new Map,ei=e=>{const t=[];for(const o of Array.from(e.childNodes))o.nodeType===Node.TEXT_NODE?t.push(oi(o)):t.push(...ei(o));return t},ti="pointer-events:none;visibility:hidden;position:absolute;left:0;top:0;",oi=e=>{const t=e.nodeValue;if(!t)return[];const o=t.length,i=document.createRange();i.selectNodeContents(e);const n=[];for(let r=0;r<o;r++){i.setStart(e,0),i.setEnd(e,r+1);const o=i.getClientRects().length-1,a=t.charAt(r);n[o]?n[o]+=a:n.push(a)}const r=i.getClientRects();return n.map(((e,t)=>({rect:r[t],text:e})))},ii=new Map,ni=(e="",t)=>{const{width:o=0,height:i=0}=t;if(o&&i)return Ve(o,i);let{fontSize:n=16,fontFamily:r,lineHeight:a=20,fontWeight:s,fontStyle:l,fontVariant:c,letterSpacing:d}=t;const u=Uo({text:e,fontFamily:r,fontWeight:s,fontStyle:l,fontVariant:c,fontSize:n,letterSpacing:d,lineHeight:a,width:o});let h=ii.get(u);if(h)return h;let m=1;n>1e3&&F()&&(m=n/1e3,n=1e3,a/=m);const g=Zt(p("pre",{contenteditable:"true",spellcheck:"false",style:`${ti}${Ko({...t,fontSize:n,lineHeight:a})};${Jo(e,t)}"`,innerHTML:e})).getBoundingClientRect();return h=De(g),h.height+=Math.max(0,n-a),h=Ge(h,(e=>e*m)),o&&(h.width=o),ii.set(u,h),h},ri=new Map,si=async(e,t)=>{let o;try{o=await((e,t)=>new Promise(((o,i)=>{let n=ri.get(e);void 0===n&&(n=((e,t)=>{const{sub:o,pub:i}=Yo();let n,r;return Promise.resolve(t&&t(e,{resourceType:"stylesheet"})).then((t=>{if(!1===t)return r="requestPrevented",i("error",r);const{headers:o,credentials:a}=t||{};fetch(e,{headers:o,credentials:a}).then((e=>e.text())).then((e=>{n=e,i("load",n)})).catch((e=>{r=e,i("error",r)}))})),{sub:(e,t)=>"load"===e&&n?t(n):"error"===e&&r?t(r):void o(e,t)}})(e,t),ri.set(e,n)),n.sub("load",o),n.sub("error",i)})))(e,t)}catch(e){return[]}const i=p("style",{innerHTML:o,id:I()});document.head.append(i);const n=Array.from(document.styleSheets).find((e=>e.ownerNode.id===i.id));return i.remove(),Array.from(n.cssRules)},li=new Map,di=(e,t)=>e.style.getPropertyValue(t),ui=(e,t)=>!!e.style&&di(e,"font-family").replace(/^"|"$/g,"")==t,hi=async(e,t)=>{const o=((e,t)=>{const o=[];for(const i of e)ui(i,t)&&o.push(i);return o})(await(async e=>{const t=Array.from(document.styleSheets).map((t=>(async(e,t)=>{if(li.has(e.href))return li.get(e.href);let o;try{o=Array.from(e.cssRules);for(const e of(e=>e.filter((e=>e instanceof CSSImportRule)))(o)){const i=e.href;if(li.has(i)){const e=li.get(i);o=[...o,...e];continue}const n=await si(i,t);li.set(i,n),o=[...o,...n]}}catch(i){const n=e.href;o=await si(n,t),li.set(n,o)}return(e=>e.filter((e=>e instanceof CSSFontFaceRule)))(o)})(t,e))),o=await Promise.all(t),i=[];return o.forEach((e=>i.push(...e))),i})(t),e);return o.length?o.map((e=>{const t=e.parentStyleSheet.href&&new URL(e.parentStyleSheet.href),o=t?t.origin+(e=>e.pathname.split("/").slice(0,-1).join("/"))(t)+"/":"",i=e.style.getPropertyValue("src").match(/url\("?(.*?)"?\)/)[1],n=Array.from(e.style).filter((e=>"src"!=e)).reduce(((t,o)=>t+(o+":")+di(e,o)+";"),"");return[/^http/.test(i)?i:o+i,n]})):[]},pi=new Map,mi=new Map;var gi=async(e="",t)=>{if(!e.length)return;let{color:o,imageWidth:i=300,imageHeight:n=150,paddingTop:r=0,paddingRight:a=qo,paddingBottom:s=0,paddingLeft:l=qo,fontFamily:c,fontSize:d,pixelRatio:u=1,willRequest:h,outline:p,blur:m}=t,g=1,$="";d>1e3&&F()&&(g=d/1e3,$=`transform-origin:0 0;transform:scale(${g})`);const f=u/g,y=(i+l+a)*u,b=(n+s+r)*u,x=await(async(e,t)=>{if(pi.get(e))return;let o=mi.get(e);if(!o){const n=await hi(e,t);if(!n.length)return void pi.set(e,!0);const r=[];for(const[e,t]of n){const o=await fetch(e).then((e=>e.blob())),n=!(i=o.type)||/woff2/.test(i)?"woff2":/woff/.test(i)?"woff":/ttf|truetype/.test(i)?"truetype":/otf|opentype/.test(i)?"opentype":/svg/.test(i)?"svg":"woff2",a=await Xo(o);r.push(`@font-face { src:url(${a}) format('${n}');${t};font-display:block; }`)}o=r.join(""),mi.set(e,o)}var i;return o})(c,h),v=e.replace(/%/g,"%25").replace(/#/g,"%23").replace(/&nbsp;/g," ").replace(/&(?!#\d{4};|[a-z]+;)/gi,"&amp;").replace(/<br>|\n/g,"<br/>"),w=`top:${r*f}px;right:${a*f}px;bottom:${s*f}px;left:${l*f}px`;let S=o,k="",C="";if(p||m){const e=jo(o);p&&(S=[0,0,0,0],k=`-webkit-text-stroke: ${2*p*f}px ${e}`),m&&(Yt()?C=`filter:blur(${m*f*.4}px)`:(S=[0,0,0,0],C=`text-shadow: 0 0 ${m*f}px ${e}`))}return((e,{safariCacheKey:t="*"}={})=>new Promise(((o,i)=>{const n=new Image;n.onerror=()=>i(new Error("Failed to load SVG")),n.onload=()=>{if(!Yt()||!e.includes("@font-face")||Zo.has(t))return o(n);Go(n).then((()=>{Zo.set(t,!0),o(n)}))},n.src="data:image/svg+xml,"+e})))(`<svg xmlns="http://www.w3.org/2000/svg" width="${y}" height="${b}" viewBox="0 0 ${y} ${b}"><foreignObject x="0" y="0" width="${y}" height="${b}"><div xmlns="http://www.w3.org/1999/xhtml">${x?`<style>${x}</style>`:""}<pre contenteditable="true" spellcheck="false" style="position:absolute;${w};${Ko({...t,color:S,fontSize:d},f)};${Jo(e,t,f)};${$};${k};${C}">${v}</pre></div></foreignObject></svg>`,{safariCacheKey:c})};const $i=e=>{const t={...e};return C(t)},fi=(e,t={})=>{const o=mt(e);let i,n;const r=t.width||t.rx,a=t.height||t.ry;if(r&&a)return Fe(t);if(r||a){i=parseFloat(r||Number.MAX_SAFE_INTEGER),n=parseFloat(a||Number.MAX_SAFE_INTEGER);const e=Math.min(i,n);T(r)||T(a)?(i=e+"%",n=e*o+"%"):(i=e,n=e)}else{const e=10;i=e+"%",n=e*o+"%"}return{[(t.width?"width":t.rx?"rx":void 0)||"width"]:i,[(t.width?"height":t.rx?"ry":void 0)||"height"]:n}},yi=(e,t={})=>{return{width:void 0,height:void 0,...t,aspectRatio:1,backgroundImage:(o=_o(e),"data:image/svg+xml,"+o.replace("<","%3C").replace(">","%3E"))};var o},bi=(e,t={})=>({backgroundColor:[0,0,0,0],...Mi(t)?{}:{width:void 0,height:void 0,aspectRatio:void 0},...t,backgroundImage:T(e)?e:No(e)?URL.createObjectURL(e):e}),xi=(e,t)=>{let o;if(T(e)||No(e)){const i={...fi(t),backgroundSize:"contain"};o=zo(e)?yi(e,i):bi(e,i)}else if(e.src){const i=fi(t,e.shape||e),n={...e.shape,...i};if(e.width&&e.height&&!Fo(n,"aspectRatio")){const e=fn(i,"width",t),o=fn(i,"height",t);n.aspectRatio=G(e,o)}n.backgroundSize||e.shape||e.width&&e.height||(n.backgroundSize="contain"),o=zo(e.src)?yi(e.src,n):bi(e.src,n)}else e.shape&&(o=$i(e.shape));return Fo(o,"backgroundImage")&&(Fo(o,"backgroundColor")||(o.backgroundColor=[0,0,0,0]),Fo(o,"disableStyle")||(o.disableStyle=["cornerRadius","backgroundColor","strokeColor","strokeWidth"])),t?gn(o,t):o},vi=e=>he(e.x1,e.y1),wi=e=>he(e.x2,e.y2),Si=e=>Fo(e,"text"),ki=e=>Si(e)&&!(Oi(e)||Fo(e,"width")),Ci=e=>Si(e)&&(Oi(e)||Fo(e,"width")),Ti=e=>!Si(e)&&Bi(e),Mi=e=>Fo(e,"rx"),Ri=e=>Fo(e,"x1"),Pi=e=>Fo(e,"points"),Ei=e=>Si(e)&&e.isEditing,Ii=e=>!Fo(e,"opacity")||e.opacity>0,Ai=e=>e.isSelected,Li=e=>e.isEditing,zi=e=>e._isDraft,Fi=e=>Fo(e,"width")&&Fo(e,"height"),Di=e=>{const t=Fo(e,"right"),o=Fo(e,"bottom");return t||o},Oi=e=>(Fo(e,"x")||Fo(e,"left"))&&Fo(e,"right")||(Fo(e,"y")||Fo(e,"top"))&&Fo(e,"bottom"),Bi=e=>Fi(e)||Oi(e),Wi=e=>(e._isDraft=!0,e),Vi=e=>(e._isDraft=!1,e),_i=(e,t)=>!(!0===e.disableStyle||Do(e.disableStyle)&&t&&e.disableStyle.includes(t)),Ni=e=>!0!==e.disableSelect,Hi=e=>!0!==e.disableRemove,ji=e=>!e.disableFlip&&!zi(e)&&!Di(e)&&(e=>Fo(e,"backgroundImage")||Fo(e,"text"))(e),Ui=(e,t)=>!!Si(e)&&!0!==e.disableInput&&(M(e.disableInput)?e.disableInput(null!=t?t:e.text):t||!0),Gi=(e,t)=>!(!0===e.disableTextLayout||Do(e.disableTextLayout)&&t&&e.disableTextLayout.includes(t)),Zi=e=>Xi(e)&&e.points.length>3,Xi=e=>!!Pi(e)&&void 0!==e.disableAddPoints&&!0!==e.disableAddPoints,Yi=e=>!0!==e.disableManipulate&&!zi(e)&&!Di(e),qi=e=>Yi(e)&&!0!==e.disableMove,Ki=e=>(delete e.left,delete e.right,delete e.top,delete e.bottom,e),Ji=e=>(delete e.rotation,e),Qi=e=>(e.strokeWidth=e.strokeWidth||1,e.strokeColor=e.strokeColor||[0,0,0],e),en=e=>(e.backgroundColor=e.backgroundColor?e.backgroundColor:e.strokeWidth||e.backgroundImage?void 0:[0,0,0],e),tn=e=>{let t=e.text;t=t.replace(/&(#[0-9]+|[a-z]+);/gi,((e,t)=>`___${t}___`)),t=t.replace(/&/,"&amp;"),e.text=t.replace(/___(#[0-9]+|[a-z]+)___/gi,((e,t)=>`&${t};`))},nn=e=>(!1!==e.disableNewline&&(delete e.textAlign,e.text=e.text.replace(/\n/g," ")),Ki(e)),rn=e=>(e.textAlign=e.textAlign||"left",e),an=e=>((e=>{T(e.id)||(e.id=I()),Fo(e,"rotation")||(e.rotation=0),Fo(e,"opacity")||(e.opacity=1),Fo(e,"disableErase")||(e.disableErase=!0)})(e),Si(e)?(e=>{if(e.fontSize=e.fontSize||"4%",e.fontFamily=e.fontFamily||"sans-serif",e.fontWeight=e.fontWeight||"normal",e.fontStyle=e.fontStyle||"normal",e.fontVariant=e.fontVariant||"normal",e.lineHeight=e.lineHeight||"120%",e.color=e.color||[0,0,0],e.format="html"===e.format?"html":"text",e.textShadow){const[t,o,i,n]=e.textShadow;e.textShadowX=t,e.textShadowY=o,e.textShadowBlur=i,e.textShadowColor=n,delete e.textShadow}if(e.textOutline){const[t,o]=e.textOutline;e.textOutlineWidth=t,e.textOutlineColor=o,delete e.textOutline}"html"===e.format?tn(e):(e=>{tn(e);let t=e.text;t=t.replace(/</g,"&gt;"),t=t.replace(/>/g,"&lt;"),e.text=t})(e),ki(e)?nn(e):rn(e)})(e):Ti(e)?(e=>{e.cornerRadius=e.cornerRadius||0,e.strokeWidth=e.strokeWidth||0,e.strokeColor=e.strokeColor||[0,0,0],en(e)})(e):Pi(e)?(e=>{Qi(e),Ji(e),Fo(e,"pathClose")||(e.disableResize=!0,Fo(e,"disableMove")||(e.disableMove=!0)),Ki(e)})(e):Ri(e)?(e=>{Qi(e),e.lineStart=e.lineStart||void 0,e.lineEnd=e.lineEnd||void 0,Ji(e),Ki(e)})(e):Mi(e)&&(e=>{e.strokeWidth=e.strokeWidth||0,e.strokeColor=e.strokeColor||[0,0,0],en(e)})(e),e),sn=e=>Si(e)?"text":Ti(e)?"rectangle":Pi(e)?"path":Ri(e)?"line":Mi(e)?"ellipse":void 0,ln=(e,t)=>parseFloat(e)/100*t,cn=new RegExp(/^x|left|right|^width|rx|fontSize|eraseRadius|feather|cornerRadius|strokeWidth|strokeDash/,"i"),dn=new RegExp(/^y|top|bottom|^height|ry/,"i"),un=(e,t,{width:o,height:i})=>{if(Array.isArray(t))return t.map((t=>(S(t)&&mn(t,{width:o,height:i}),T(t)&&(t=un(e,t,{width:o,height:i})),t)));if("string"!=typeof t)return t;if(!t.endsWith("%"))return t;const n=parseFloat(t)/100;return cn.test(e)?le(o*n,6):dn.test(e)?le(i*n,6):t},hn=un,pn=["lineHeight","textOutlineWidth","textShadowX","textShadowY","textShadowBlur"],mn=(e,t)=>{Object.entries(e).map((([o,i])=>{e[o]=un(o,i,t)})),e.text&&pn.filter((t=>T(e[t]))).forEach((t=>{var o,i;e[t]=(o=e[t],i=e.fontSize,Math.round(i*(parseFloat(o)/100)))}))},gn=(e,t)=>(mn(e,t),wn(e,t),e),$n=(e,t)=>{let o;return/^x|width|rx|fontSize|strokeWidth|cornerRadius/.test(e)?o=t.width:/^y|height|ry/.test(e)&&(o=t.height),o},fn=(e,t,o)=>Array.isArray(e[t])?e[t].map((e=>Object.entries(e).reduce(((e,[t,i])=>(e[t]=T(i)?ln(i,$n(t,o)):i,e)),{}))):T(e[t])?ln(e[t],$n(t,o)):e[t],yn=(e,t,o)=>t.reduce(((t,i)=>{const n=fn(e,i,o);return t[i]=n,t}),{}),bn=(e,t,o)=>(Object.keys(t).forEach((i=>((e,t,o,i)=>{if(!T(e[t]))return e[t]=o,e;const n=$n(t,i);return e[t]=void 0===n?o:Ho(o,n),e})(e,i,t[i],o))),e),xn=(e,t)=>{const o=e.filter((e=>e.x<0||e.y<0||e.x1<0||e.y1<0)).reduce(((e,t)=>{const[o,i,n,r]=(e=>{const t=Qe(),o=e.strokeWidth||0;if(Ti(e))t.x=e.x-.5*o,t.y=e.y-.5*o,t.width=e.width+o,t.height=e.height+o;else if(Ri(e)){const{x1:i,y1:n,x2:r,y2:a}=e,s=Math.abs(Math.min(i,r)),l=Math.abs(Math.max(i,r)),c=Math.abs(Math.min(n,a)),d=Math.abs(Math.min(n,a));t.x=s+.5*o,t.y=l+.5*o,t.width=l-s+o,t.height=d-c+o}else Mi(e)&&(t.x=e.x-e.rx+.5*o,t.y=e.y-e.ry+.5*o,t.width=2*e.rx+o,t.height=2*e.ry+o);return t&&Fo(e,"rotation")&&ft(t,e.rotation),wt(t)})(t);return e.top=Math.min(o,e.top),e.left=Math.min(r,e.left),e.bottom=Math.max(n,e.bottom),e.right=Math.max(i,e.right),e}),{top:0,right:0,bottom:0,left:0});return o.right>0&&(o.right-=t.width),o.bottom>0&&(o.bottom-=t.height),o},vn=(e,t,o)=>{const i=$i(e);gn(i,t);const n=o(i);return Array.isArray(n)?n:[n]},wn=(e,t)=>{if(Fo(e,"left")&&(e.x=e.left),Fo(e,"right")&&!T(e.right)){const o=t.width-e.right;Fo(e,"left")?(e.x=e.left,e.width=Math.max(0,o-e.left)):Fo(e,"width")&&(e.x=o-e.width)}if(Fo(e,"top")&&(e.y=e.top),Fo(e,"bottom")&&!T(e.bottom)){const o=t.height-e.bottom;Fo(e,"top")?(e.y=e.top,e.height=Math.max(0,o-e.top)):Fo(e,"height")&&(e.y=o-e.height)}return e},Sn=(e,t)=>(Pi(e)&&e.points.filter((e=>Lo(e.x))).forEach((e=>{e.x*=t,e.y*=t})),Ri(e)&&Lo(e.x1)&&(e.x1*=t,e.y1*=t,e.x2*=t,e.y2*=t),Lo(e.x)&&Lo(e.y)&&(e.x*=t,e.y*=t),Lo(e.width)&&Lo(e.height)&&(e.width*=t,e.height*=t),Lo(e.rx)&&Lo(e.ry)&&(e.rx*=t,e.ry*=t),(e=>Lo(e.strokeWidth)&&e.strokeWidth>0)(e)&&(e.strokeWidth*=t),Si(e)&&(e._scale=t,Lo(e.fontSize)&&(e.fontSize*=t),Lo(e.lineHeight)&&(e.lineHeight*=t),Lo(e.width)&&!Lo(e.height)&&(e.width*=t)),Fo(e,"cornerRadius")&&Lo(e.cornerRadius)&&(e.cornerRadius*=t),e),Cn=e=>{if(Ti(e))return he(e.x+.5*e.width,e.y+.5*e.height);if(Mi(e))return he(e.x,e.y);if(e.text){if(Ci(e)){const t=e.height||ni(e.text,e).height;return he(e.x+.5*e.width,e.y+.5*t)}const t=ni(e.text,e);return he(e.x+.5*t.width,e.y+.5*t.height)}return Pi(e)?Ie(e.points):Ri(e)?Ie([vi(e),wi(e)]):void 0};var Mn=e=>/canvas/i.test(e.nodeName);const Pn=new Map([]),En=(e,t={})=>new Promise(((o,i)=>{const{onMetadata:r=n,onLoad:a=o,onError:s=i,onComplete:l=n}=t;let c=Pn.get(e);if(c||(c={loading:!1,complete:!1,error:!1,image:void 0,size:void 0,bus:Yo()},Pn.set(e,c)),c.bus.sub("meta",r),c.bus.sub("load",a),c.bus.sub("error",s),c.bus.sub("complete",l),Mn(e)){const t=e,o=t.cloneNode();c.complete=!0,c.image=o,c.size=We(t)}if(c.complete)return c.bus.pub("meta",{size:c.size}),c.error?c.bus.pub("error",c.error):c.bus.pub("load",c.image),c.bus.pub("complete"),void(c.bus=Yo());c.loading||(c.loading=!0,((e,t)=>new Promise(((o,i)=>{let n=e,r=!1;const a=()=>{r||(r=!0,M(t)&&Promise.resolve().then((()=>t(Ve(n.naturalWidth,n.naturalHeight)))))};if(n.src||(n=new Image,T(e)&&new URL(e,location.href).origin!==location.origin&&(n.crossOrigin="anonymous"),n.src=T(e)?e:URL.createObjectURL(e)),n.complete)return a(),o(n);M(t)&&qt(n).then(a).catch(i),n.onload=()=>{a(),o(n)},n.onerror=()=>i(new Error("Failed to load image"))})))(e,(e=>{c.size=e,c.bus.pub("meta",{size:e})})).then((e=>{c.image=e,c.bus.pub("load",e)})).catch((e=>{c.error=e,c.bus.pub("error",e)})).finally((()=>{c.complete=!0,c.loading=!1,c.bus.pub("complete"),c.bus=Yo()})))})),In=(e,t,o,i)=>e.drawImage(t,o.x,o.x,o.width,o.height,i.x,i.y,i.width,i.height);var An=async(e,t,o,i,n=In,r)=>{e.save(),e.clip(),await n(e,t,o,i,r),e.restore()};const Ln=(e,t,o,i,n)=>{const r=Je(e);if(i){const e=kt(it(i),le);return e.x*=o.width,e.width*=o.width,e.y*=o.height,e.height*=o.height,{srcRect:e,destRect:r}}const a=at(0,0,o.width,o.height);if("contain"===t){const t=vt(e,mt(a));r.width=t.width,r.height=t.height,n?(r.x+=n.x,r.y+=n.y):(r.x+=t.x,r.y+=t.y)}else if("cover"===t){const e=xt(r,a.width/a.height);r.width=e.width,r.height=e.height,n?(r.x+=n.x,r.y+=n.y):(r.x+=e.x,r.y+=e.y)}else t?(r.width=t.width,r.height=t.height,n&&(r.x+=n.x,r.y+=n.y)):n&&(r.width=o.width,r.height=o.height,r.x+=n.x,r.y+=n.y);return{srcRect:a,destRect:r}},zn=(e,t)=>(t.cornerRadius>0?((e,t,o,i,n,r)=>{i<2*r&&(r=i/2),n<2*r&&(r=n/2),e.beginPath(),e.moveTo(t+r,o),e.arcTo(t+i,o,t+i,o+n,r),e.arcTo(t+i,o+n,t,o+n,r),e.arcTo(t,o+n,t,o,r),e.arcTo(t,o,t+i,o,r),e.closePath()})(e,t.x,t.y,t.width,t.height,t.cornerRadius):e.rect(t.x,t.y,t.width,t.height),e),Fn=(e,t)=>(t.backgroundColor&&e.fill(),e),Dn=(e,t)=>(t.strokeWidth&&e.stroke(),e);var On=async(e,t,o={})=>{const{drawImage:i}=o;if(e.lineWidth=t.strokeWidth?t.strokeWidth:1,e.strokeStyle=t.strokeColor?jo(t.strokeColor):"none",e.fillStyle=t.backgroundColor?jo(t.backgroundColor):"none",e.globalAlpha=t.opacity,t.backgroundImage){let o;if(o=Mn(t.backgroundImage)?t.backgroundImage:await En(t.backgroundImage),zn(e,t),Fn(e,t),"repeat"===t.backgroundRepeat){const n=t.backgroundPosition||{x:0,y:0},{srcRect:r,destRect:a}=Ln(t,t.backgroundSize||We(o),We(o),t.backgroundCorners,{x:0,y:0}),s=document.createElement("canvas");s.width=a.width,s.height=a.height;const l=s.getContext("2d",{willReadFrequently:!1,desynchronized:!0});await i(l,o,r,{...a,x:0,y:0});const c=e.createPattern(s,"repeat");e.fillStyle=c,e.save(),e.beginPath(),e.rect(t.x+n.x,t.y+n.y,t.width-n.x,t.height-n.y),e.clip(),e.translate(a.x+n.x,a.y+n.y),e.fill(),g(s),e.restore()}else{const{srcRect:n,destRect:r}=Ln(t,t.backgroundSize,We(o),t.backgroundCorners,t.backgroundPosition);await An(e,o,n,r,i,{feather:t.feather})}return e.beginPath(),zn(e,t),Dn(e,t),[]}return zn(e,t),Fn(e,t),Dn(e,t),[]},Bn=async(e,t,o={})=>new Promise((async(i,n)=>{const{drawImage:r}=o;if(e.lineWidth=t.strokeWidth||1,e.strokeStyle=t.strokeColor?jo(t.strokeColor):"none",e.fillStyle=t.backgroundColor?jo(t.backgroundColor):"none",e.globalAlpha=t.opacity,e.ellipse(t.x,t.y,t.rx,t.ry,0,0,2*Math.PI),t.backgroundColor&&e.fill(),t.backgroundImage){let o;try{o=await En(t.backgroundImage)}catch(e){n(e)}const a=at(t.x-t.rx,t.y-t.ry,2*t.rx,2*t.ry),{srcRect:s,destRect:l}=Ln(a,t.backgroundSize,We(o),t.backgroundCorners,t.backgroundPosition);await An(e,o,s,l,r),t.strokeWidth&&e.stroke(),i([])}else t.strokeWidth&&e.stroke(),i([])})),Wn=async(e,t,o)=>{const i=t.width&&t.height?De(t):ni(t.text,t),n={x:t.x,y:t.y,width:i.width,height:i.height};if(On(e,{...t,...n,options:o}),!t.text.length)return[];const{textOutlineWidth:r=0,textShadowX:a=0,textShadowY:s=0,textShadowBlur:l=0,textShadowColor:c,outline:d,blur:u,...h}=t;return t.height&&(e.rect(n.x-r+Math.min(a,0),n.y-r+Math.min(s,0),n.width+r+r+Math.abs(a)+l,n.height+r+Math.abs(s)+l),e.save(),e.clip()),(a||s||l)&&(e.save(),e.translate(a,s),await Vn(e,n,t,{...o,paddingLeft:qo+l,paddingRight:qo+l,paddingTop:l,paddingBottom:l,shapeExtendedProps:{color:c,blur:l}}),e.restore()),r&&await Vn(e,n,t,{...o,paddingLeft:qo+r,paddingRight:qo+r,paddingTop:r,paddingBottom:r,shapeExtendedProps:{color:t.textOutlineColor,outline:r}}),t.height&&e.restore(),await Vn(e,n,h,{...o,paddingLeft:qo,paddingRight:qo,paddingTop:0,paddingBottom:0}),[]};const Vn=async(e,t,o,i)=>{const{willRequest:n,shapeExtendedProps:r,paddingLeft:a,paddingRight:s,paddingTop:l,paddingBottom:c}=i,d=await gi(o.text,{...o,...r,...t,paddingLeft:a,paddingRight:s,paddingTop:l,paddingBottom:c,imageWidth:t.width,imageHeight:t.height,willRequest:n});e.drawImage(d,o.x-a,o.y-l,d.width,d.height)};var _n=async(e,t)=>new Promise((async o=>{e.lineWidth=t.strokeWidth||1,e.strokeStyle=t.strokeColor?jo(t.strokeColor):"none",e.globalAlpha=t.opacity;let i=vi(t),n=wi(t);e.moveTo(i.x,i.y),e.lineTo(n.x,n.y),t.strokeWidth&&e.stroke(),o([])})),Nn=async(e,t)=>new Promise(((o,i)=>{if(t.bitmap&&1===t.points.length)return void Bn(e,{x:t.points[0].x,y:t.points[0].y,rx:.5*t.strokeWidth,ry:.5*t.strokeWidth,backgroundColor:t.strokeColor}).then((()=>o([])));e.lineWidth=t.strokeWidth||1,e.strokeStyle=t.strokeColor?jo(t.strokeColor):"none",e.fillStyle=t.backgroundColor?jo(t.backgroundColor):"none",e.globalAlpha=t.opacity;const{points:n}=t;e.lineCap=t.strokeCap,e.lineJoin=t.strokeJoin,e.setLineDash(t.strokeDash||[]),t.pathClose&&e.beginPath(),e.moveTo(n[0].x,n[0].y);const r=n.length;for(let t=1;t<r;t++)e.lineTo(n[t].x,n[t].y);t.pathClose&&e.closePath(),t.strokeWidth&&e.stroke(),t.backgroundColor&&e.fill(),o([])})),Hn=(e,t,o,i)=>t||o?(e.translate(i.x,i.y),e.scale(t?-1:1,o?-1:1),e.translate(-i.x,-i.y),e):e;const jn=async(e,t,o)=>{e.globalCompositeOperation="subtract"===t.drawMode?"destination-out":"source-over";const i=Cn(t);let n;if(vo(e,t.rotation,i),Hn(e,t.flipX,t.flipY,i),Ti(t)?n=On:Mi(t)?n=Bn:Ri(t)?n=_n:Pi(t)?n=Nn:Si(t)&&(n=Wn),n){const i=await n(e,t,o);return i.length?[t,...await Un(e,i,o)]:[]}return[]};var Un=async(e,t,o)=>{let i=[];for(const n of t)e.save(),e.beginPath(),i=[...i,...await jn(e,n,o)],e.restore();return i},Gn=async(e,t={})=>{const{shapes:o=[],contextBounds:i=e,transform:r=n,drawImage:a,willRequest:s,canvasMemoryLimit:l,computeShape:c=Z,preprocessShape:d=Z}=t;if(!o.length)return e;const u=p("canvas");u.width=i.width,u.height=i.height;const h=u.getContext("2d",{willReadFrequently:!0});h.putImageData(e,i.x||0,i.y||0);const m=o.map($i).map(c).map(d).flat();r(h),await Un(h,m,{drawImage:a,canvasMemoryLimit:l,willRequest:s});const $=h.getImageData(0,0,u.width,u.height);return g(u),$},Zn=async(e,t={})=>{const{backgroundColor:o,backgroundImage:i}=t,n=!(!o||o&&0===o[3]);if(!i&&!n)return e;const r=p("canvas");r.width=e.width,r.height=e.height;const a=r.getContext("2d",{willReadFrequently:!0});if(a.putImageData(e,0,0),a.globalCompositeOperation="destination-over",n&&(a.fillStyle=jo(o),a.fillRect(0,0,r.width,r.height)),i){let t;t=Mn(i)?i:await En(i);const{srcRect:o,destRect:n}=Ln({x:0,y:0,width:e.width,height:e.height},"cover",{width:t.width,height:t.height});a.drawImage(t,o.x,o.y,o.width,o.height,n.x,n.y,n.width,n.height)}const s=a.getImageData(0,0,r.width,r.height);return g(r),s},Xn=e=>e.length?e.reduce(((e,t)=>((e,t)=>{const o=new Array(20);return o[0]=e[0]*t[0]+e[1]*t[5]+e[2]*t[10]+e[3]*t[15],o[1]=e[0]*t[1]+e[1]*t[6]+e[2]*t[11]+e[3]*t[16],o[2]=e[0]*t[2]+e[1]*t[7]+e[2]*t[12]+e[3]*t[17],o[3]=e[0]*t[3]+e[1]*t[8]+e[2]*t[13]+e[3]*t[18],o[4]=e[0]*t[4]+e[1]*t[9]+e[2]*t[14]+e[3]*t[19]+e[4],o[5]=e[5]*t[0]+e[6]*t[5]+e[7]*t[10]+e[8]*t[15],o[6]=e[5]*t[1]+e[6]*t[6]+e[7]*t[11]+e[8]*t[16],o[7]=e[5]*t[2]+e[6]*t[7]+e[7]*t[12]+e[8]*t[17],o[8]=e[5]*t[3]+e[6]*t[8]+e[7]*t[13]+e[8]*t[18],o[9]=e[5]*t[4]+e[6]*t[9]+e[7]*t[14]+e[8]*t[19]+e[9],o[10]=e[10]*t[0]+e[11]*t[5]+e[12]*t[10]+e[13]*t[15],o[11]=e[10]*t[1]+e[11]*t[6]+e[12]*t[11]+e[13]*t[16],o[12]=e[10]*t[2]+e[11]*t[7]+e[12]*t[12]+e[13]*t[17],o[13]=e[10]*t[3]+e[11]*t[8]+e[12]*t[13]+e[13]*t[18],o[14]=e[10]*t[4]+e[11]*t[9]+e[12]*t[14]+e[13]*t[19]+e[14],o[15]=e[15]*t[0]+e[16]*t[5]+e[17]*t[10]+e[18]*t[15],o[16]=e[15]*t[1]+e[16]*t[6]+e[17]*t[11]+e[18]*t[16],o[17]=e[15]*t[2]+e[16]*t[7]+e[17]*t[12]+e[18]*t[17],o[18]=e[15]*t[3]+e[16]*t[8]+e[17]*t[13]+e[18]*t[18],o[19]=e[15]*t[4]+e[16]*t[9]+e[17]*t[14]+e[18]*t[19]+e[19],o})([...e],t)),e.shift()):[],Yn=(e,t)=>{const o=e.width*e.height,i=t.reduce(((e,t)=>(t.width>e.width&&t.height>e.height&&(e.width=t.width,e.height=t.height),e)),{width:0,height:0}),n=i.width*i.height;return((e,t=2)=>Math.round(e*t)/t)(Math.max(.5,.5+(1-n/o)/2),5)};function qn(){}const Kn=e=>e;function Jn(e,t){for(const o in t)e[o]=t[o];return e}function Qn(e){return e()}function er(){return Object.create(null)}function tr(e){e.forEach(Qn)}function or(e){return"function"==typeof e}function ir(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function nr(e,...t){if(null==e)return qn;const o=e.subscribe(...t);return o.unsubscribe?()=>o.unsubscribe():o}function rr(e){let t;return nr(e,(e=>t=e))(),t}function ar(e,t,o){e.$$.on_destroy.push(nr(t,o))}function sr(e,t,o,i){if(e){const n=lr(e,t,o,i);return e[0](n)}}function lr(e,t,o,i){return e[1]&&i?Jn(o.ctx.slice(),e[1](i(t))):o.ctx}function cr(e,t,o,i){if(e[2]&&i){const n=e[2](i(o));if(void 0===t.dirty)return n;if("object"==typeof n){const e=[],o=Math.max(t.dirty.length,n.length);for(let i=0;i<o;i+=1)e[i]=t.dirty[i]|n[i];return e}return t.dirty|n}return t.dirty}function dr(e,t,o,i,n,r){if(n){const a=lr(t,o,i,r);e.p(a,n)}}function ur(e){if(e.ctx.length>32){const t=[],o=e.ctx.length/32;for(let e=0;e<o;e++)t[e]=-1;return t}return-1}function hr(e){const t={};for(const o in e)"$"!==o[0]&&(t[o]=e[o]);return t}function pr(e,t){const o={};t=new Set(t);for(const i in e)t.has(i)||"$"===i[0]||(o[i]=e[i]);return o}function mr(e,t,o){return e.set(o),t}function gr(e){return e&&or(e.destroy)?e.destroy:qn}const $r="undefined"!=typeof window;let fr=$r?()=>window.performance.now():()=>Date.now(),yr=$r?e=>requestAnimationFrame(e):qn;const br=new Set;function xr(e){br.forEach((t=>{t.c(e)||(br.delete(t),t.f())})),0!==br.size&&yr(xr)}function vr(e){let t;return 0===br.size&&yr(xr),{promise:new Promise((o=>{br.add(t={c:e,f:o})})),abort(){br.delete(t)}}}function wr(e,t){e.appendChild(t)}function Sr(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function kr(e){const t=Mr("style");return function(e,t){wr(e.head||e,t),t.sheet}(Sr(e),t),t.sheet}function Cr(e,t,o){e.insertBefore(t,o||null)}function Tr(e){e.parentNode.removeChild(e)}function Mr(e){return document.createElement(e)}function Rr(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Pr(e){return document.createTextNode(e)}function Er(){return Pr(" ")}function Ir(){return Pr("")}function Ar(e,t,o,i){return e.addEventListener(t,o,i),()=>e.removeEventListener(t,o,i)}function zr(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function Fr(e,t,o){null==o?e.removeAttribute(t):e.getAttribute(t)!==o&&e.setAttribute(t,o)}function Dr(e,t){const o=Object.getOwnPropertyDescriptors(e.__proto__);for(const i in t)null==t[i]?e.removeAttribute(i):"style"===i?e.style.cssText=t[i]:"__value"===i?e.value=e[i]=t[i]:o[i]&&o[i].set?e[i]=t[i]:Fr(e,i,t[i])}function Or(e,t){Object.keys(t).forEach((o=>{!function(e,t,o){t in e?e[t]="boolean"==typeof e[t]&&""===o||o:Fr(e,t,o)}(e,o,t[o])}))}function Br(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function Wr(e,t){e.value=null==t?"":t}function Vr(e,t,{bubbles:o=!1,cancelable:i=!1}={}){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,o,i,t),n}class _r{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,o=null){this.e||(this.is_svg?this.e=Rr(t.nodeName):this.e=Mr(t.nodeName),this.t=t,this.c(e)),this.i(o)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)Cr(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(Tr)}}function Nr(e,t){return new e(t)}const Hr=new Map;let jr,Ur=0;function Gr(e,t,o,i,n,r,a,s=0){const l=16.666/i;let c="{\n";for(let e=0;e<=1;e+=l){const i=t+(o-t)*r(e);c+=100*e+`%{${a(i,1-i)}}\n`}const d=c+`100% {${a(o,1-o)}}\n}`,u=`__svelte_${function(e){let t=5381,o=e.length;for(;o--;)t=(t<<5)-t^e.charCodeAt(o);return t>>>0}(d)}_${s}`,h=Sr(e),{stylesheet:p,rules:m}=Hr.get(h)||function(e,t){const o={stylesheet:kr(t),rules:{}};return Hr.set(e,o),o}(h,e);m[u]||(m[u]=!0,p.insertRule(`@keyframes ${u} ${d}`,p.cssRules.length));const g=e.style.animation||"";return e.style.animation=`${g?g+", ":""}${u} ${i}ms linear ${n}ms 1 both`,Ur+=1,u}function Xr(e){jr=e}function Yr(){if(!jr)throw new Error("Function called outside component initialization");return jr}function qr(e){Yr().$$.on_mount.push(e)}function Kr(e){Yr().$$.after_update.push(e)}function Jr(e){Yr().$$.on_destroy.push(e)}function Qr(){const e=Yr();return(t,o,{cancelable:i=!1}={})=>{const n=e.$$.callbacks[t];if(n){const r=Vr(t,o,{cancelable:i});return n.slice().forEach((t=>{t.call(e,r)})),!r.defaultPrevented}return!0}}function ea(e,t){return Yr().$$.context.set(e,t),t}function ta(e){return Yr().$$.context.get(e)}function oa(e,t){const o=e.$$.callbacks[t.type];o&&o.slice().forEach((e=>e.call(this,t)))}const ia=[],na=[],ra=[],aa=[],sa=Promise.resolve();let la=!1;function ca(){la||(la=!0,sa.then($a))}function da(){return ca(),sa}function ua(e){ra.push(e)}function ha(e){aa.push(e)}const pa=new Set;let ma,ga=0;function $a(){const e=jr;do{for(;ga<ia.length;){const e=ia[ga];ga++,Xr(e),fa(e.$$)}for(Xr(null),ia.length=0,ga=0;na.length;)na.pop()();for(let e=0;e<ra.length;e+=1){const t=ra[e];pa.has(t)||(pa.add(t),t())}ra.length=0}while(ia.length);for(;aa.length;)aa.pop()();la=!1,pa.clear(),Xr(e)}function fa(e){if(null!==e.fragment){e.update(),tr(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ua)}}function ya(e,t,o){e.dispatchEvent(Vr(`${t?"intro":"outro"}${o}`))}const ba=new Set;let xa;function va(){xa={r:0,c:[],p:xa}}function wa(){xa.r||tr(xa.c),xa=xa.p}function Sa(e,t){e&&e.i&&(ba.delete(e),e.i(t))}function ka(e,t,o,i){if(e&&e.o){if(ba.has(e))return;ba.add(e),xa.c.push((()=>{ba.delete(e),i&&(o&&e.d(1),i())})),e.o(t)}else i&&i()}const Ca={duration:0};function Ta(e,t,o,i){let n=t(e,o),r=i?0:1,a=null,s=null,l=null;function c(){l&&function Zr(e,t){const o=(e.style.animation||"").split(", "),i=o.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),n=o.length-i.length;n&&(e.style.animation=i.join(", "),Ur-=n,Ur||yr((()=>{Ur||(Hr.forEach((e=>{const{ownerNode:t}=e.stylesheet;t&&Tr(t)})),Hr.clear())})))}(e,l)}function d(e,t){const o=e.b-r;return t*=Math.abs(o),{a:r,b:e.b,d:o,duration:t,start:e.start,end:e.start+t,group:e.group}}function u(t){const{delay:o=0,duration:i=300,easing:u=Kn,tick:h=qn,css:p}=n||Ca,m={start:fr()+o,b:t};t||(m.group=xa,xa.r+=1),a||s?s=m:(p&&(c(),l=Gr(e,r,t,i,o,u,p)),t&&h(0,1),a=d(m,i),ua((()=>ya(e,t,"start"))),vr((t=>{if(s&&t>s.start&&(a=d(s,i),s=null,ya(e,a.b,"start"),p&&(c(),l=Gr(e,r,a.b,a.duration,0,u,n.css))),a)if(t>=a.end)h(r=a.b,1-r),ya(e,a.b,"end"),s||(a.b?c():--a.group.r||tr(a.group.c)),a=null;else if(t>=a.start){const e=t-a.start;r=a.a+a.d*u(e/a.duration),h(r,1-r)}return!(!a&&!s)})))}return{run(e){or(n)?(ma||(ma=Promise.resolve(),ma.then((()=>{ma=null}))),ma).then((()=>{n=n(),u(e)})):u(e)},end(){c(),a=s=null}}}const Ma="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:__webpack_require__.g;function Ra(e,t){e.d(1),t.delete(e.key)}function Pa(e,t){ka(e,1,1,(()=>{t.delete(e.key)}))}function Ea(e,t,o,i,n,r,a,s,l,c,d,u){let h=e.length,p=r.length,m=h;const g={};for(;m--;)g[e[m].key]=m;const $=[],f=new Map,y=new Map;for(m=p;m--;){const e=u(n,r,m),s=o(e);let l=a.get(s);l?i&&l.p(e,t):(l=c(s,e),l.c()),f.set(s,$[m]=l),s in g&&y.set(s,Math.abs(m-g[s]))}const b=new Set,x=new Set;function v(e){Sa(e,1),e.m(s,d),a.set(e.key,e),d=e.first,p--}for(;h&&p;){const t=$[p-1],o=e[h-1],i=t.key,n=o.key;t===o?(d=t.first,h--,p--):f.has(n)?!a.has(i)||b.has(i)?v(t):x.has(n)?h--:y.get(i)>y.get(n)?(x.add(i),v(t)):(b.add(n),h--):(l(o,a),h--)}for(;h--;){const t=e[h];f.has(t.key)||l(t,a)}for(;p;)v($[p-1]);return $}function Ia(e,t){const o={},i={},n={$$scope:1};let r=e.length;for(;r--;){const a=e[r],s=t[r];if(s){for(const e in a)e in s||(i[e]=1);for(const e in s)n[e]||(o[e]=s[e],n[e]=1);e[r]=s}else for(const e in a)n[e]=1}for(const e in i)e in o||(o[e]=void 0);return o}function Aa(e){return"object"==typeof e&&null!==e?e:{}}function La(e,t,o){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=o,o(e.$$.ctx[i]))}function za(e){e&&e.c()}function Fa(e,t,o,i){const{fragment:n,after_update:r}=e.$$;n&&n.m(t,o),i||ua((()=>{const t=e.$$.on_mount.map(Qn).filter(or);e.$$.on_destroy?e.$$.on_destroy.push(...t):tr(t),e.$$.on_mount=[]})),r.forEach(ua)}function Da(e,t){const o=e.$$;null!==o.fragment&&(tr(o.on_destroy),o.fragment&&o.fragment.d(t),o.on_destroy=o.fragment=null,o.ctx=[])}function Oa(e,t,o,i,n,r,a,s=[-1]){const l=jr;Xr(e);const c=e.$$={fragment:null,ctx:[],props:r,update:qn,not_equal:n,bound:er(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:er(),dirty:s,skip_bound:!1,root:t.target||l.$$.root};a&&a(c.root);let d=!1;if(c.ctx=o?o(e,t.props||{},((t,o,...i)=>{const r=i.length?i[0]:o;return c.ctx&&n(c.ctx[t],c.ctx[t]=r)&&(!c.skip_bound&&c.bound[t]&&c.bound[t](r),d&&function(e,t){-1===e.$$.dirty[0]&&(ia.push(e),ca(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),o})):[],c.update(),d=!0,tr(c.before_update),c.fragment=!!i&&i(c.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);c.fragment&&c.fragment.l(e),e.forEach(Tr)}else c.fragment&&c.fragment.c();t.intro&&Sa(e.$$.fragment),Fa(e,t.target,t.anchor,t.customElement),$a()}Xr(l)}class Ba{$destroy(){Da(this,1),this.$destroy=qn}$on(e,t){if(!or(t))return qn;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(t),()=>{const e=o.indexOf(t);-1!==e&&o.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Wa=[];function Va(e,t){return{subscribe:_a(e,t).subscribe}}function _a(e,t=qn){let o;const i=new Set;function n(t){if(ir(e,t)&&(e=t,o)){const t=!Wa.length;for(const t of i)t[1](),Wa.push(t,e);if(t){for(let e=0;e<Wa.length;e+=2)Wa[e][0](Wa[e+1]);Wa.length=0}}}return{set:n,update:function(t){n(t(e))},subscribe:function(r,a=qn){const s=[r,a];return i.add(s),1===i.size&&(o=t(n)||qn),r(e),()=>{i.delete(s),0===i.size&&(o(),o=null)}}}}function Na(e,t,o){const i=!Array.isArray(e),n=i?[e]:e,r=t.length<2;return Va(o,(e=>{let o=!1;const a=[];let s=0,l=qn;const c=()=>{if(s)return;l();const o=t(i?a[0]:a,e);r?e(o):l=or(o)?o:qn},d=n.map(((e,t)=>nr(e,(e=>{a[t]=e,s&=~(1<<t),o&&c()}),(()=>{s|=1<<t}))));return o=!0,c(),function(){tr(d),l()}}))}var Ha=e=>e.reduce(((e,t)=>Object.assign(e,t)),{});const ja=e=>({updateValue:e}),Ua=e=>({defaultValue:e}),Ga=e=>({store:e}),Za=e=>({store:(t,o)=>Na(...e(o))}),Xa=e=>({store:(t,o)=>{const[i,n,r=(()=>!1)]=e(o);let a,s=!0;return Na(i,((e,t)=>{n(e,(e=>{!s&&r(a,e)||(a=e,s=!1,t(e))}))}))}}),Ya=e=>({store:(t,o)=>{const[i,n={},r]=e(o);let a=[];const s={},l=e=>i(e,s),c=e=>{(a.length||e.length)&&(a=e,d())},d=()=>{const e=a.map(l);r&&e.sort(r),a=[...e],h(e)};Object.entries(n).map((([e,t])=>t.subscribe((t=>{s[e]=t,t&&d()}))));const{subscribe:u,set:h}=_a(t||[]);return{set:c,update:e=>c(e(a)),subscribe:u}}});var qa=e=>{const t={},o={};return e.forEach((([e,...i])=>{const r=Ha(i),a=t[e]=((e,t,o)=>{const{store:i=(e=>_a(e)),defaultValue:r=n,updateValue:a}=o,s=i(r(),t,e),{subscribe:l,update:c=n}=s;let d;const u=e=>{let t=!0;d&&d(),d=l((o=>{if(t)return t=!1;e(o),d(),d=void 0}))},h=a?a(e):Z;return s.set=e=>c((t=>h(e,t,u))),s.defaultValue=r,s})(o,t,r),s={get:()=>rr(a),set:a.set};Object.defineProperty(o,e,s)})),{stores:t,accessors:o}},Ka=[["src",Ga((()=>{let e;const{subscribe:t,set:o}=_a(),i=t=>{e!==t&&(e=t,o(e))};return{set:i,subscribe:t,update:t=>i(t(e))}}))],["imageReader"],["imageWriter"],["imageScrambler"],["imageRedactionRendering",Ua((()=>"pixelated"))],["images",Ua((()=>[]))],["shapePreprocessor"],["willRequestResource"],["willRequest"]],Ja=e=>e.charAt(0).toUpperCase()+e.slice(1),Qa=(e,t)=>{Object.keys(t).forEach((o=>{const i=M(t[o])?{value:t[o],writable:!1}:t[o];Object.defineProperty(e,o,i)}))};const es=(e,t)=>{let o,i,n,r,a,s,l,c,d,u;const h=t.length;for(o=0;o<h;o++)if(i=t[o],n=t[o+1>h-1?0:o+1],r=i.x-e.x,a=i.y-e.y,s=n.x-e.x,l=n.y-e.y,c=r-s,d=a-l,u=c*a-d*r,u<-1e-5)return!1;return!0};var ts=(e,t)=>{const o=At(t),i=ue();St(e).forEach((e=>{we(e,i),es(e,t)||o.forEach((t=>{const o=Math.atan2(t.start.y-t.end.y,t.start.x-t.end.x),n=1e4*Math.sin(Math.PI-o),r=1e4*Math.cos(Math.PI-o),a=he(e.x+n,e.y+r),s=Ye(Xe(t),1e4),l=Rt(Ze(e,a),s);l&&we(i,Se(me(l),e))}))}));const n=Je(e);return we(n,i),!!St(n).every((e=>es(e,t)))&&($t(e,n),!0)},os=(e,t)=>{const o=St(e),i=Lt(t,5),n=st(e),r=[];o.forEach((e=>{const t=((e,t)=>{const o=he(e.start.x-e.end.x,e.start.y-e.end.y),i=ye(o),n=Ce(i,t);return e.end.x+=n.x,e.end.y+=n.y,e})(Ze(me(n),me(e)),1e6);let o=!1;i.map(Xe).forEach((e=>{const i=Rt(t,e);i&&!o&&(r.push(i),o=!0)}))}));const a=Pe(r[0],r[2])<Pe(r[1],r[3])?[r[0],r[2]]:[r[1],r[3]],s=it(a);return s.width<e.width&&($t(e,s),!0)},is=(e,t,o={x:0,y:0})=>{const i=et(e),n=st(i),r=Ct(i,o,n).map((e=>$e(e,t,n))),a=it(r);return r.map((e=>Se(e,a)))},ns=(e,t=0,o=mt(e))=>{let i,n;if(0!==t){const r=Math.atan2(1,o),a=Math.sign(t)*t,s=a%Math.PI,l=a%Y;let c;c=s>q&&s<Y+q?l>q?a:Y-l:l>q?Y-l:a;const d=Math.min(Math.abs(e.height/Math.sin(r+c)),Math.abs(e.width/Math.cos(r-c)));i=Math.cos(r)*d,n=i/o}else i=e.width,n=i/o,n>e.height&&(n=e.height,i=n*o);return Ve(i,n)},as=(e,t,o)=>{const i=et(e),n=st(i),r=ft(i,o,n),a=st(Tt(it(r))),s=st(t),l=$e(s,-o,a),c=Se(l,a),d=ve(we(n,c),le);return at(d.x-.5*t.width,d.y-.5*t.height,t.width,t.height)},ss=(e,t,o)=>Math.max(t,Math.min(e,o));const ls=["cropLimitToImage","cropMinSize","cropMaxSize","cropAspectRatio","flipX","flipY","rotation","crop","colorMatrix","convolutionMatrix","gamma","vignette","manipulation","redaction","annotation","decoration","selection","frame","backgroundColor","backgroundImage","targetSize","metadata","trim","volume","minDuration","maxDuration","currentTime"],cs=e=>Do(e)?e.map(cs):uo(e)||_t(e)?e:S(e)?{...e}:e,ds=e=>e.map((e=>Object.entries(e).reduce(((e,[t,o])=>(t.startsWith("_")||(e[t]=o),e)),{}))),us=(e,t)=>e===t;var hs=(e,t,o=us)=>{if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!o(e[i],t[i]))return!1;return!0};const ps=(e,t,o)=>{const i=ve(st(e),(e=>le(e,8))),n=et(t),r=st(n),a=ft(n,o,r),s=ve(He(it(a)),(e=>le(e,8))),l=Math.abs(s.x-i.x),c=Math.abs(s.y-i.y);return l<1&&c<1},gs=(e,t)=>{const{context:o,props:i}=t;return e._isFormatted||((e=an(e))._isFormatted=!0,Object.assign(e,i)),e._isDraft||!Oi(e)||e._context&&pt(o,e._context)||(wn(e,o),e._context={...o}),e},$s=(e,t)=>(e._isFormatted||(e.disableMove=!0,e.disableSelect=!0,e.disableResize=!0,e.disableRotate=!0),gs(e,t));var fs=[["file"],["size"],["loadState"],["processState"],["aspectRatio",Za((({size:e})=>[e,e=>e?mt(e):void 0]))],["perspectiveX",Ua((()=>0))],["perspectiveY",Ua((()=>0))],["perspective",Za((({perspectiveX:e,perspectiveY:t})=>[[e,t],([e,t])=>({x:e,y:t})]))],["rotation",Ua((()=>0)),ja((e=>(t,o,i)=>{if(t===o)return t;const{loadState:n,size:r,rotationRange:a,cropMinSize:s,cropMaxSize:l,crop:c,perspective:d,cropLimitToImage:u,cropOrigin:h}=e;if(!c||!n||!n.beforeComplete)return t;const p=u&&((e,t,o)=>{const i=ns(t,o,mt(e));return _e(Ge(i,Math.round),Ge(Fe(e),Math.round))})(c,r,o),m=u&&ps(c,r,o),g=((e,t,o,i,n,r,a,s,l,c)=>{const d=Fe(l),u=Fe(c);a&&(u.width=Math.min(c.width,n.width),u.height=Math.min(c.height,n.height));let h=!1;const p=(t,o)=>{const l=as(n,i,t),c=et(n),m=st(c),g=Ct(c,r,m),$=Se(me(m),Mt(g)),f=$e(st(l),o,m),y=Se(me(m),f);g.forEach((e=>$e(e,o,m)));const b=it(g),x=Mt(g),v=we(Se(Se(x,y),b),$),w=at(v.x-.5*l.width,v.y-.5*l.height,l.width,l.height);if(s&&ct(w,s.width/w.width),a){const e=is(n,o,r);os(w,e)}const S=le(Math.min(w.width/d.width,w.height/d.height),8),k=le(Math.max(w.width/u.width,w.height/u.height),8);return(S<1||k>1)&&le(Math.abs(o-t))===le(Math.PI/2)&&!h?(h=!0,p(e,e+Math.sign(o-t)*Math.PI)):{rotation:o,crop:kt(w,(e=>le(e,8)))}},m=Math.sign(t)*Math.round(Math.abs(t)/Y)*Y,g=ss(t,m+o[0],m+o[1]);return p(e,g)})(o,t,a,c,r,d,u,h,s,l);if(p&&m){const e=ns(r,t,mt(g.crop));g.crop.x+=.5*g.crop.width,g.crop.y+=.5*g.crop.height,g.crop.x-=.5*e.width,g.crop.y-=.5*e.height,g.crop.width=e.width,g.crop.height=e.height}return i((()=>{e.crop=kt(g.crop,(e=>le(e,8)))})),g.rotation}))],["flipX",Ua((()=>!1))],["flipY",Ua((()=>!1))],["flip",Za((({flipX:e,flipY:t})=>[[e,t],([e,t])=>({x:e,y:t})]))],["isRotatedSideways",Xa((({rotation:e})=>[[e],([e],t)=>t(K(e)),(e,t)=>e!==t]))],["crop",ja((e=>(t,o=t)=>{const{loadState:i,size:n,cropMinSize:r,cropMaxSize:a,cropLimitToImage:s,cropAspectRatio:l,rotation:c,perspective:d}=e;if(!t&&!o||!i||!i.beforeComplete)return t;t||(t=et(ns(n,c,l||mt(n))));const u=((e,t,o,i,n,r,a,s)=>{const l=Fe(a),c=Fe(s),d=le(Math.max(t.width/c.width,t.height/c.height)),u=le(Math.min(t.width/l.width,t.height/l.height)),h=Je(t);if(u<1||d>1){const o=st(e),i=st(t),n=u<1?u:d,r=(i.x+o.x)/2,a=(i.y+o.y)/2,s=h.width/n,l=h.height/n;gt(h,r-.5*s,a-.5*l,s,l)}return r?(((e,t,o=0,i=ue(),n)=>{if(Lo(o)&&0!==o||i.x||i.y){const n=mt(e),r=is(t,o,i),a=ns(t,o,n);if(!(e.width<a.width&&e.height<a.height)){const t=.5*e.width-.5*a.width,o=.5*e.height-.5*a.height;e.width>a.width&&(e.width=a.width,e.x+=t),e.height>a.height&&(e.height=a.height,e.y+=o)}ts(e,r),os(e,r)&&ts(e,r)}else{const o=mt(e);e.width=Math.min(e.width,t.width),e.height=Math.min(e.height,t.height),e.x=Math.max(e.x,0),e.x+e.width>t.width&&(e.x-=e.x+e.width-t.width),e.y=Math.max(e.y,0),e.y+e.height>t.height&&(e.y-=e.y+e.height-t.height);const i=st(e),r=vt(e,o);r.width=Math.max(n.width,r.width),r.height=Math.max(n.height,r.height),r.x=i.x-.5*r.width,r.y=i.y-.5*r.height,$t(e,r)}})(h,o,i,n,l),{crop:h}):{crop:h}})(o,t,n,c,d,s,r,a),h=kt(u.crop,(e=>le(e,8)));return pt(o,h)?o:h}))],["cropAspectRatio",ja((e=>(t,o)=>{const{loadState:i,crop:n,size:r,rotation:a,cropLimitToImage:s}=e,l=(e=>{if(e){if(/:/.test(e)){const[t,o]=e.split(":");return t/o}return parseFloat(e)}})(t);if(!l)return;if(!n||!i||!i.beforeComplete)return l;const c=o?Math.abs(t-o):1;if(ps(n,r,a)&&s&&c>=.1){const o=((e,t)=>{const o=e.width,i=e.height;return K(t)&&(e.width=i,e.height=o),e})(Fe(r),a);e.crop=kt(vt(et(o),t),le)}else{const t={width:n.height*l,height:n.height},o=.5*(n.width-t.width),i=.5*(n.height-t.height);e.crop=kt(at(n.x+o,n.y+i,t.width,t.height),le)}return l}))],["cropOrigin"],["cropMinSize",Ua((()=>({width:1,height:1})))],["cropMaxSize",Ua((()=>({width:32768,height:32768})))],["cropLimitToImage",Ua((()=>!0)),ja((e=>(t,o,i)=>{const{crop:n}=e;return n?(!o&&t&&i((()=>e.crop=Je(e.crop))),t):t}))],["cropSize",Xa((({crop:e})=>[[e],([e],t)=>{e&&t(Ve(e.width,e.height))},(e,t)=>_e(e,t)]))],["cropRectAspectRatio",Za((({cropSize:e})=>[[e],([e],t)=>{e&&t(le(mt(e),5))}]))],["cropRange",Xa((({size:e,rotation:t,cropRectAspectRatio:o,cropMinSize:i,cropMaxSize:n,cropLimitToImage:r})=>[[e,t,o,i,n,r],([e,t,o,i,n,r],a)=>{e&&a(((e,t,o,i,n,r)=>{const a=Fe(i),s=Fe(n);return r?[a,Ge(ns(e,t,o),Math.round)]:[a,s]})(e,t,o,i,n,r))},(e,t)=>hs(e,t)]))],["rotationRange",Xa((({size:e,isRotatedSideways:t,cropMinSize:o,cropSize:i,cropLimitToImage:n})=>[[e,t,o,i,n],([e,t,o,i,n],r)=>{e&&i&&r(((e,t,o,i,n)=>{if(!n)return[-1/0,1/0];const r=Math.max(o.width/i.width,o.height/i.height),a=Ve(i.width*r,i.height*r),s=(l=a,Math.sqrt(l.width*l.width+l.height*l.height));var l;if(s<Math.min(e.width,e.height))return[-1/0,1/0];const c=t?e.height:e.width,d=t?e.width:e.height,u=Math.acos(a.height/s),h=u-Math.acos(d/s),p=Math.asin(c/s)-u;if(Number.isNaN(h)&&Number.isNaN(p))return[-1/0,1/0];const m=Number.isNaN(h)?p:Number.isNaN(p)?h:Math.min(h,p);return[-m,m]})(e,t,o,i,n))},(e,t)=>hs(e,t)]))],["backgroundColor",ja((()=>e=>((e=[0,0,0,0],t=1)=>4===e.length?e:[...e,t])(e)))],["backgroundImage"],["targetSize"],["colorMatrix"],["convolutionMatrix"],["gamma"],["noise"],["vignette"],["duration"],["currentTime"],["minDuration",Ua((()=>1/24))],["maxDuration",Ua((()=>1/0))],["volume",Ua((()=>1))],["trim"],["redaction",Ya((({size:e})=>[gs,{context:e}]))],["manipulation",Ya((({size:e})=>[gs,{context:e}]))],["annotation",Ya((({size:e})=>[gs,{context:e}]))],["decoration",Ya((({crop:e})=>[gs,{context:e}]))],["selection",Ya((({size:e})=>[$s,{context:e}]))],["frame",ja((()=>e=>{if(!e)return;const t={frameStyle:void 0,x:0,y:0,width:"100%",height:"100%",disableStyle:["backgroundColor","strokeColor","strokeWidth"]};return T(e)?t.frameStyle=e:Object.assign(t,e),t}))],["metadata"],["state",Ga(((e,t,o)=>{const i=ls.map((e=>t[e]));let n=!1;const r=_a({}),{subscribe:a}=Na([...i,r],((e,t)=>{if(n)return;const o=ls.reduce(((t,o,i)=>(t[o]=cs(e[i]),t)),{});o.crop&&kt(o.crop,Math.round),o.manipulation=o.manipulation&&ds(o.manipulation),o.redaction=o.redaction&&ds(o.redaction),o.annotation=o.annotation&&ds(o.annotation),o.decoration=o.decoration&&ds(o.decoration),o.selection=o.selection&&ds(o.selection),t(o)})),s=e=>{e&&(n=!0,o.cropOrigin=void 0,ls.filter((t=>Fo(e,t))).forEach((t=>{const i=e[t];o[t]=null===i?void 0:cs(i)})),n=!1,r.set({}))};return{set:s,update:e=>s(e(null)),subscribe:a}}))]],ys=async(e,t,o={},i)=>{const{ontaskstart:r,ontaskprogress:a,ontaskend:s,token:l}=i;let c=!1;const d={cancel:n};l.cancel=()=>{c=!0,d.cancel()};for(const[i,n]of t.entries()){if(c)return;const[t,l]=n;r(i,l);try{e=await t(e,{...o,taskCancelToken:d},(e=>a(i,l,e)))}catch(e){throw c=!0,e}s(i,l)}return e};const bs=["loadstart","loadabort","loaderror","loadprogress","load","processstart","processabort","processerror","processprogress","process"],xs=["flip","cropOrigin","isRotatedSideways","perspective","perspectiveX","perspectiveY","cropRange"],ws=fs.map((([e])=>e)).filter((e=>!xs.includes(e))),Ss=e=>"image"+Ja(e),ks=e=>Fo(e,"crop");var Cs=()=>{const{stores:e,accessors:t}=qa(Ka),{sub:o,pub:i}=Yo(),r=()=>t.images?t.images[0]:{};let a={};const s={};ws.forEach((e=>{Object.defineProperty(t,Ss(e),{get:()=>{const t=r();if(t)return t.accessors[e]},set:t=>{a[Ss(e)]=t,s[Ss(e)]=t;const o=r();o&&(o.accessors[e]=t)}})}));const l=()=>t.images&&t.images[0],c=e.src.subscribe((e=>{if(!e)return t.images=[];t.imageReader&&(t.images.length&&(a={}),u(e))})),d=e.imageReader.subscribe((e=>{e&&(t.images.length||t.src&&u(t.src))})),u=e=>{Promise.resolve().then((()=>p(e,a))).catch((()=>{}))};let h;const p=(e,o={})=>new Promise(((r,c)=>{let d=l();const u=!(!1===o.cropLimitToImage||!1===o.imageCropLimitToImage||!1===s.imageCropLmitedToImage),p=o.cropMinSize||o.imageCropMinSize||s.imageCropMinSize,m=u?p:d&&d.accessors.cropMinSize,$=o.minDuration||o.imageMinDuration;d&&g(),d=(({minSize:e={width:1,height:1},minDuration:t=0}={})=>{const{stores:o,accessors:i}=qa(fs),{pub:r,sub:a}=Yo(),s=(e,t)=>{const o=()=>i[e]||{},n=t=>{i[e]={...o(),...t,timeStamp:Date.now()}},a=()=>o().error,s=e=>{a()||(n({error:e}),r(t+"error",{...o()}))};return{start(){r(t+"start")},onabort(){n({abort:!0}),r(t+"abort",{...o()})},ontaskstart(e,i){a()||(n({index:e,task:i,taskProgress:void 0,taskLengthComputable:void 0}),r(t+"taskstart",{...o()}))},ontaskprogress(e,i,s){a()||(n({index:e,task:i,taskProgress:s.loaded/s.total,taskLengthComputable:s.lengthComputable}),r(t+"taskprogress",{...o()}),r(t+"progress",{...o()}))},ontaskend(e,i){a()||(n({index:e,task:i}),r(t+"taskend",{...o()}))},ontaskerror(e){s(e)},error(e){s(e)},beforeComplete(e){a()||(n({beforeComplete:!0}),r("before"+t,e))},complete(e){a()||(n({complete:!0}),r(t,e))}}};return Qa(i,{read:(o,{reader:r},a={})=>{if(!r)return;Object.assign(i,{file:void 0,size:void 0,loadState:void 0});let l={cancel:n},c=!1;const d=s("loadState","load"),u={token:l,...d},h={src:o,size:void 0,dest:void 0,duration:void 0};return Promise.resolve().then((async()=>{try{if(d.start(),c)return d.onabort();const o=await ys(h,r,a,u);if(c)return d.onabort();const{size:n,duration:s,dest:p}=o||{};if(!n||!n.width||!n.height)throw new so("Image size missing","IMAGE_SIZE_MISSING",o);if(s>0&&s<t)throw new so("Video too short","VIDEO_TOO_SHORT",{...o,minDuration:t});if(n.width<e.width||n.height<e.height)throw new so("Image too small","IMAGE_TOO_SMALL",{...o,minWidth:e.width,minHeight:e.height});Object.assign(i,{file:p,size:n,duration:s}),d.beforeComplete(o),d.complete(o)}catch(e){d.error(e)}finally{l=void 0}})),()=>{c=!0,l&&l.cancel(),d.onabort()}},write:(e,t)=>{if(!i.loadState.complete)return;i.processState=void 0;const o=s("processState","process"),r={src:i.file,imageState:i.state,dest:void 0};if(M(e)&&(e=e(i.file,i.state)),!e)return o.start(),void o.complete(r);let a={cancel:n},l=!1;const c=t,d={token:a,...o};return Promise.resolve().then((async()=>{try{if(o.start(),l)return o.onabort();const t=await ys(r,e,c,d);if(l)return o.onabort();o.complete(t)}catch(e){o.error(e)}finally{a=void 0}})),()=>{l=!0,a&&a.cancel()}},on:a}),{accessors:i,stores:o}})({minSize:m,minDuration:$}),bs.map((e=>{return d.accessors.on(e,(t=e,e=>i(t,e)));var t}));const f=()=>{a={},y.forEach((e=>e()))},y=[];y.push(d.accessors.on("loaderror",(e=>{f(),c(e)}))),y.push(d.accessors.on("loadabort",(()=>{f(),c({name:"AbortError"})}))),y.push(d.accessors.on("load",(e=>{h=void 0,f(),r(e)}))),y.push(d.accessors.on("beforeload",(()=>((e,o)=>{if(ks(o))return void(t.imageState=o);if(!o.imageCrop){const t=e.accessors.size,i=o.imageRotation||0,n=je(Fe(t),i),r=et(n);r.width=le(Math.abs(r.width),6),r.height=le(Math.abs(r.height),6);const a=o.imageCropAspectRatio||(o.imageCropLimitToImage?mt(t):mt(r));let s;o.imageCropLimitToImage?s=vt(r,a):(s=xt(r,a),s.x=(t.width-s.width)/2,s.y=(t.height-s.height)/2),o.imageCrop=s}if(e.accessors.duration&&!o.imageTrim&&o.imageMaxDuration){const{duration:t}=e.accessors;o.imageTrim=[[0,Math.min(o.imageMaxDuration/t,1)]]}const i=["imageCropLimitToImage","imageCrop","imageCropAspectRatio","imageRotation"];i.filter((e=>Fo(o,e))).forEach((e=>{t[e]=o[e],delete o[e]}));const n=Object.keys(o).filter((e=>!i.includes(e))).reduce(((e,t)=>(e[t]=o[t],e)),{});Object.assign(t,n)})(d,o)))),t.images=[d],o.imageReader&&(t.imageReader=o.imageReader),o.imageWriter&&(t.imageWriter=o.imageWriter),h=d.accessors.read(e,{reader:t.imageReader},{willRequest:t.willRequest})}));let m;const g=()=>{const e=l();e&&(h&&h(),e.accessors.loadState=void 0,t.images=[])};return Object.defineProperty(t,"stores",{get:()=>e}),Qa(t,{on:o,loadImage:p,abortLoadImage:()=>{h&&h(),t.images=[]},editImage:(e,o)=>new Promise(((i,n)=>{p(e,o).then((()=>{const{images:e}=t,o=e[0],r=()=>{a(),s()},a=o.accessors.on("processerror",(e=>{r(),n(e)})),s=o.accessors.on("process",(e=>{r(),i(e)}))})).catch(n)})),removeImage:g,processImage:(e,o)=>new Promise(((i,n)=>{try{const r=[],a=()=>{m=void 0,r.forEach((e=>e()))};(async()=>{if((e=>T(e)||No(e)||Vt(e))(e))try{await p(e,o)}catch(e){n(e)}else e&&(ks(e)?t.imageState=e:Object.assign(t,e));const s=l();if(!s)return n("no image");r.push(s.accessors.on("processerror",(e=>{a(),n(e)}))),r.push(s.accessors.on("processabort",(()=>{a(),n({name:"AbortError"})}))),r.push(s.accessors.on("process",(e=>{a(),i(e)}))),m=s.accessors.write(t.imageWriter,{redactionRenderStyle:t.imageRedactionRendering,shapePreprocessor:t.shapePreprocessor||Z,imageScrambler:t.imageScrambler,willRequest:t.willRequest,willRequestResource:t.willRequestResource})})()}catch(e){n(e)}})),abortProcessImage:()=>{const e=l();e&&(m&&m(),e.accessors.processState=void 0)},destroy:()=>{c&&c(),d&&d()}}),t};const Ts=(e,t)=>{const{processImage:o}=Cs();return o(e,t)};var Ms=()=>Yt()?fo()?/15_|16_/.test(navigator.userAgent)?14745600:16777216:/15_/.test(navigator.userAgent)?16777216:1/0:1/0,Rs=(e,t)=>Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,o)=>(t[o]=e[o],t)),{}),Ps=e=>new Promise((t=>{if(e.duration===1/0)return e.ontimeupdate=()=>{e.ontimeupdate=void 0,t(e)},void(e.currentTime=Number.MAX_SAFE_INTEGER);t(e)}));const Is=(e,t=0,o=e.byteLength)=>{const i=[],n=t+o;for(;t<n;){const o=e.getUint32(t);if(o<0)break;const n=e.getUint32(t+4);if(i.push({type:n,size:o,offset:t,bodyOffset:t+8,bodySize:o-8}),o<8)break;t+=o}return i};var Ls=e=>new Promise(((t,o)=>{(F()?(async e=>{const t=await(e=>new Promise((t=>{const o=new FileReader;o.onload=()=>t(o.result),o.readAsArrayBuffer(e)})))(e);return((e,{limit:t=1024}={})=>{let o=0;if(o+=4,1718909296!==e.getUint32(o))return 0;o+=4;const i=e.getUint32(o);return 1836069938===i?((e,t,o)=>{let i=!1,n=-1;for(let r=t;r<o;r++)if(i||1953653099!==e.getUint32(r)||(i=!0,r+=4),i&&64==e.getUint8(r)){n=r;break}if(n<0)return 0;const r=e.getUint32(n-28),a=e.getUint32(n-20),s=e.getUint32(n-32),l=e.getUint32(n-16);return 65536===r&&4294901760===a?90:4294901760===s&&4294901760===l?180:4294901760===r&&65536===a?270:0})(e,o,t):1903435808===i?(e=>{const t=Is(e).find((e=>1836019574===e.type));if(!t)return 0;const o=Is(e,t.bodyOffset,t.bodySize);o.filter((e=>1953653099===e.type)).forEach((t=>{o.push(...Is(e,t.bodyOffset,t.bodySize))}));const i=[1836476516,1953196132],n=o.filter((e=>i.includes(e.type)));for(const{type:t,bodyOffset:o}of n){let n=o+4;n+=1836476516===t?32:36,n+=1===e.getUint8(o)?12:0;const r=e.getInt32(n),a=e.getInt32(n+4);if(0===r&&a>0)return 90;if(r<0&&0===a)return 180;if(0===r&&a<0)return 270}return 0})(e):0})(new DataView(t))})(e):Promise.resolve(0)).then((i=>{const n=document.createElement("video");n.onerror=()=>o(n.error),n.playsInline=!0,n.preload="auto",n.onseeked=()=>{n.onseeked=void 0,t(n)},n.onloadeddata=()=>{n.onloadeddata=void 0,n.dataset.rotation=i?""+i:"0",Ps(n).then(t),n.currentTime=0},n.src=URL.createObjectURL(e),n.load()}))})),zs=(e,t)=>new Promise((o=>{if(e.currentTime===t)return o(e);let i=e.onseeked;e.onseeked=()=>{e.onseeked=i,o(e)},e.currentTime=ss(t,0,e.duration)})),Fs=(e,t=0)=>new Promise(((o,i)=>{Ls(e).then((e=>{zs(e,t).then((e=>{const t=p("canvas");Kt(e).then((({width:i,height:n})=>{t.width=i,t.height=n;const r=t.getContext("2d",{willReadFrequently:!0}),a=()=>{r.drawImage(e,0,0,t.width,t.height);const i=r.getImageData(0,0,t.width,t.height);g(t),URL.revokeObjectURL(e.src),o(i)};Yt()?setTimeout(a,16):a()}))}))}))})),Ds=e=>/video/.test(e.type);const Os=({imageDataResizer:e,canvasMemoryLimit:t}={})=>async(o,i,n,r,a)=>{n.width=Math.max(n.width,1),n.height=Math.max(n.height,1),r.width=Math.max(r.width,1),r.height=Math.max(r.height,1);const{dest:s}=await Ts(i,{imageReader:hl(),imageWriter:ml({format:"canvas",targetSize:{...r,upscale:!0},imageDataResizer:e,canvasMemoryLimit:t}),imageCrop:n}),{feather:l=0}=a||{};if(l>0){const e=p("canvas");e.width=s.width,e.height=s.height;const t=e.getContext("2d",{willReadFrequently:!0}),o=1/l;let i=0;for(i=0;i<l;i++){const e=i*o;t.strokeStyle=`rgba(0,0,0,${e*e})`,t.strokeRect(i+.5,i+.5,s.width-2*i-1,s.height-2*i-1)}t.fillStyle="#000",t.fillRect(i,i,s.width+.5-2*i,s.height+.5-2*i);const n=s.getContext("2d");n.globalCompositeOperation="destination-in",n.drawImage(e,0,0),g(e)}o.drawImage(s,r.x,r.y,r.width,r.height),g(s)},Bs=(e,t=((...e)=>e),o)=>async(i,n,r)=>{r(io(0,!1));let a=!1;const s=await e(...t(i,n,(e=>{a=!0,r(e)})));return o&&o(i,s),a||r(io(1,!1)),i},Ws=({willRequest:e,srcProp:t="src",destProp:o="dest"}={})=>[Bs(po,((o,i,n)=>[o[t],n,{...i,willRequest:e}]),((e,t)=>e[o]=t)),"any-to-file"],Vs=({srcProp:e="dest",destProp:t="dest"}={})=>[Bs((async e=>{if(/octet-stream/.test(e.type)){console.warn(`Pintura: File has unknown mime type "${e.type}", make sure your server sets the correct Content-Type header.`);let t="image";const o=await Qt(e);/video/i.test(o.nodeName)&&(t="video");const i={type:t+"/unknown"};return _t(e)?new File([e],e.name,{...i,lastModified:e.lastModified}):new Blob([e],i)}return e}),(t=>[t[e]]),((e,o)=>e[t]=o)),"any-to-file"],_s=({srcProp:e="src",destProp:t="size"}={})=>[Bs(to,(t=>[t[e]]),((e,o)=>e[t]=o)),"read-image-size"],Ns=async e=>{const t=await Qt(e);if(eo(t))return await(e=>new Promise(((t,o)=>{const i=()=>{Ps(e).then((()=>{t(e.duration)}))};if(e.readyState>=1)return i();e.onloadedmetadata=i,e.onerror=()=>o(e.error)})))(t)},Hs=({srcProp:e="src",destProp:t="duration"}={})=>[Bs(Ns,(t=>[t[e]]),((e,o)=>e[t]=o)),"read-media-duration"],js=({srcSize:e="size",srcOrientation:t="orientation",destSize:o="size"}={})=>[Bs(yo,(o=>[o[e],o[t]]),((e,t)=>e[o]=t)),"image-size-match-orientation"],Us=({srcProp:e="src",destProp:t="head"}={})=>[Bs(((e,t)=>bo(e)?a(e,t):void 0),(t=>[t[e],[0,262144],onprogress]),((e,o)=>e[t]=o)),"read-image-head"],Gs=({srcProp:e="head",destProp:t="orientation"}={})=>[Bs(o,(t=>[t[e],274]),((e,o=1)=>e[t]=o)),"read-exif-orientation-tag"],Zs=({srcProp:e="head"}={})=>[Bs(o,(t=>[t[e],274,1])),"clear-exif-orientation-tag"],Xs=({srcImageSize:e="size",srcCanvasSize:t="imageData",srcImageState:o="imageState",destImageSize:i="size",destScalar:n="scalar"}={})=>[Bs(((e,t)=>[Math.min(t.width/e.width,t.height/e.height),De(t)]),(i=>[i[e],i[t],i[o]]),((e,[t,o])=>{e[n]=t,e[i]=o})),"calculate-canvas-scalar"],Ys=({srcProp:e="src",destProp:t="imageData",canvasMemoryLimit:o,srcImageState:i="imageState"}={})=>[Bs(((e,t,o)=>Ds(e)?Fs(e,o.currentTime):O(e,t)),(t=>[t[e],o,t[i]]),((e,o)=>e[t]=o)),"blob-to-image-data"],qs=({srcImageData:e="imageData",srcOrientation:t="orientation"}={})=>[Bs(w,(o=>[o[e],o[t]]),((e,t)=>e.imageData=t)),"image-data-match-orientation"],Ks=({srcImageData:e="imageData",srcImageState:t="imageState"}={})=>[Bs(Zn,(o=>[o[e],{backgroundColor:o[t].backgroundColor,backgroundImage:o[t].backgroundImage}]),((e,t)=>e.imageData=t)),"image-data-fill"],Js=({srcImageData:e="imageData",srcImageState:t="imageState",destScalar:o="scalar"}={})=>[Bs(So,(i=>{const n=i[o];let{crop:r}=i[t];return r&&1!==n&&(r=ct(Je(r),n,ue())),[i[e],{crop:r,rotation:i[t].rotation,flipX:i[t].flipX,flipY:i[t].flipY}]}),((e,t)=>e.imageData=t)),"image-data-crop"],Qs=({targetSize:e={width:void 0,height:void 0,fit:void 0,upscale:void 0},imageDataResizer:t,srcProp:o="imageData",srcImageState:i="imageState",destImageScaledSize:n="imageScaledSize"})=>[Bs(To,(n=>{const r=Math.min(e.width||Number.MAX_SAFE_INTEGER,n[i].targetSize&&n[i].targetSize.width||Number.MAX_SAFE_INTEGER),a=Math.min(e.height||Number.MAX_SAFE_INTEGER,n[i].targetSize&&n[i].targetSize.height||Number.MAX_SAFE_INTEGER);return[n[o],{width:r,height:a,fit:e.fit||"contain",upscale:(s=n[i],!!(s.targetSize&&s.targetSize.width||s.targetSize&&s.targetSize.height)||e.upscale||!1)},t];var s}),((e,t)=>{_e(e.imageData,t)||(e[n]=De(t)),e.imageData=t})),"image-data-resize"],el=({srcImageData:e="imageData",srcImageState:t="imageState",destImageData:o="imageData"}={})=>[Bs(Ao,(o=>{const{colorMatrix:i}=o[t],n=i&&Object.keys(i).map((e=>i[e])).filter(Boolean);return[o[e],{colorMatrix:n&&Xn(n),convolutionMatrix:o[t].convolutionMatrix,gamma:o[t].gamma,noise:o[t].noise,vignette:o[t].vignette}]}),((e,t)=>e[o]=t)),"image-data-filter"],tl=({srcImageData:e="imageData",srcImageState:t="imageState",destImageData:o="imageData",destScalar:i="scalar"}={})=>[Bs((async(e,t,o,i,n,r)=>{if(!t||!i.length)return e;let a;try{const n={dataSizeScalar:Yn(e,i)};o&&o[3]>0&&(n.backgroundColor=[...o]),a=await t(e,n)}catch(e){}const s=p("canvas");s.width=e.width,s.height=e.height;const l=s.getContext("2d",{willReadFrequently:!0});if(l.putImageData(e,0,0),"auto"===r){const t=Math.sqrt(e.width*e.height);l.filter=`blur(${Math.round(t/100)}px)`}const c=new Path2D;i.forEach((e=>{const t=at(e.x,e.y,e.width,e.height);ht(t,n);const o=ft(Je(t),e.rotation),i=new Path2D;o.forEach(((e,t)=>{if(0===t)return i.moveTo(e.x,e.y);i.lineTo(e.x,e.y)})),c.addPath(i)})),l.clip(c,"nonzero"),l.imageSmoothingEnabled=!1,l.drawImage(a,0,0,s.width,s.height),g(a);const d=l.getImageData(0,0,s.width,s.height);return g(s),d}),((o,{imageScrambler:n,redactionRenderStyle:r})=>[o[e],n,o[t].backgroundColor,o[t].redaction,o[i],r]),((e,t)=>e[o]=t)),"image-data-redact"],ol=({srcImageData:e="imageData",srcSize:t="size",srcImageState:o="imageState",srcShapes:i="annotation",destImageData:n="imageData",destImageScaledSize:r="imageScaledSize",destScalar:a="scalar",imageDataResizer:s,canvasMemoryLimit:l,shapeFilter:c=Z,shapeClip:d=!0,destImageContext:u="imageContext"}={})=>[Bs(Gn,((n,{shapePreprocessor:h,willRequestResource:p,willRequest:m})=>{const g=n[o][i].filter(c);if(!g.length)return[n[e]];const $=n[a],{crop:f}=n[o],y=n[t];let b=$;const x=n[r];x&&(b=Math.min(x.width/f.width,x.height/f.height));const v={width:y.width/$,height:y.height/$};return[n[e],{shapes:g,computeShape:e=>(e=gn(e,v),e=Rs(e,["left","right","top","bottom"]),Sn(e,b)),transform:e=>{const i=n[t],{rotation:s=0,flipX:l,flipY:c,cropLimitToImage:h}=n[o],p=n[a],{crop:m=et(i)}=n[o],g=n[r],$=g?Math.min(g.width/m.width,g.height/m.height):1,f={width:i.width/p*$,height:i.height/p*$},y=Wt(f,s),b=y.width,x=y.height,v=.5*f.width-.5*b,w=.5*f.height-.5*x,S=He(f);e.translate(-v,-w),e.translate(-m.x*$,-m.y*$),e.translate(S.x,S.y),e.rotate(s),e.translate(-S.x,-S.y);const k=n[u]||{x:0,y:0};e.translate(k.x,k.y),e.scale(l?-1:1,c?-1:1),e.translate(l?-f.width*p:0,c?-f.height*p:0),h&&d&&(e.rect(0,0,f.width,f.height),e.clip())},drawImage:Os({imageDataResizer:s,canvasMemoryLimit:l}),preprocessShape:e=>h(e,{isPreview:!1,...n[o]}),canvasMemoryLimit:l,willRequest:m||p}]}),((e,t)=>e[n]=t)),"image-data-annotate"],il=({srcImageData:e="imageData",srcImageState:t="imageState",destImageData:o="imageData",destImageScaledSize:i="imageScaledSize",imageDataResizer:n,canvasMemoryLimit:r,destScalar:a="scalar",shapeFilter:s=Z,destImageContext:l="imageContext"}={})=>[Bs(Gn,((o,{shapePreprocessor:c,willRequestResource:d,willRequest:u})=>{let h=o[t].decoration.filter(s);if("undefined"!=typeof window&&(e=>{if(e&&e._qnr6q7e)return;const[i]=[[85,110,108,105,99,101,110,115,101,100,32,80,105,110,116,117,114,97,32,105,110,115,116,97,110,99,101,32]].map((e=>e.map((e=>String.fromCharCode(e))).join(""))),{width:n,height:r}=o[t].crop,a=r/15;h=[...h,{x:.5*-a,y:.5*-a,width:1.5*n,height:1.25*r,text:Array(50).fill(i).join(""),fontWeight:900,lineHeight:a,fontSize:a,color:[1,1,1,.05]}]})(window),!h.length)return[o[e]];let p=o[a];const{crop:m}=o[t],g=o[i];if(g){const e=Math.min(g.width/m.width,g.height/m.height);p=e}return[o[e],{shapes:h,drawImage:Os({imageDataResizer:n,canvasMemoryLimit:r}),computeShape:e=>(e=gn(e,m),e=Rs(e,["left","right","top","bottom"]),Sn(e,p)),preprocessShape:e=>c(e,{isPreview:!1,...o[t]}),canvasMemoryLimit:r,willRequest:u||d,transform:e=>{const t=o[l]||{x:0,y:0};e.translate(t.x,t.y)}}]}),((e,t)=>e[o]=t)),"image-data-decorate"],nl=({srcImageData:e="imageData",srcImageState:t="imageState",destImageData:o="imageData",destImageScaledSize:i="imageScaledSize",imageDataResizer:n,canvasMemoryLimit:r,destScalar:a="scalar",destImageContext:s="imageContext"}={})=>[Bs(((e,t)=>new Promise((o=>{if(!t)return o([e]);Gn(e,t).then((e=>{o([e,t.contextBounds])}))}))),((o,{shapePreprocessor:s,willRequestResource:l,willRequest:c})=>{const d=o[t].frame;if(!d)return[o[e]];const u=o[a];let{crop:h}=o[t];h&&1!==u&&(h=ct(Je(h),u,ue()));const p={...h},m=xn(vn(d,p,s),p);p.x=Math.abs(m.left),p.y=Math.abs(m.top),p.width+=Math.abs(m.left)+Math.abs(m.right),p.height+=Math.abs(m.top)+Math.abs(m.bottom);const g=o[i],$=g?Math.min(g.width/h.width,g.height/h.height):1;return ht(p,$),p.x=Math.floor(p.x),p.y=Math.floor(p.y),p.width=Math.floor(p.width),p.height=Math.floor(p.height),[o[e],{shapes:[d],contextBounds:p,computeShape:t=>gn(t,o[e]),transform:e=>{e.translate(p.x,p.y)},drawImage:Os({imageDataResizer:n,canvasMemoryLimit:r}),preprocessShape:e=>s(e,{isPreview:!1,...o[t]}),canvasMemoryLimit:r,willRequest:c||l}]}),((e,[t,i])=>{e[s]=i,e[o]=t})),"image-data-frame"],rl=({mimeType:e,quality:t,srcImageData:o="imageData",srcFile:i="src",destBlob:n="blob"}={})=>[Bs(W,(n=>[n[o],e||j(n[i].name)||n[i].type,t]),((e,t)=>e[n]=t)),"image-data-to-blob"],al=({srcImageData:e="imageData",srcOrientation:t="orientation",destCanvas:o="dest"}={})=>[Bs(v,(o=>[o[e],o[t]]),((e,t)=>e[o]=t)),"image-data-to-canvas"],sl=async(e,o)=>{if(!bo(e)||!o)return e;const i=new DataView(o),n=t(i);if(!n||!n.exif)return e;const r=["exif","mpf","xmp"].reduce(((e,t)=>n[t]?Math.max(e,n[t].offset+n[t].size):e),0);return((e,t,o=[0,e.size])=>t?new Blob([t,e.slice(...o)],{type:e.type}):e)(e,o.slice(0,r+2),[20])},ll=(e="blob",t="head",o="blob")=>[Bs(sl,(o=>[o[e],o[t]]),((e,t)=>e[o]=t)),"blob-write-image-head"],cl=({renameFile:e,srcBlob:t="blob",srcFile:o="src",destFile:i="dest",defaultFilename:n}={})=>[Bs(U,(i=>[i[t],e?e(i[o]):i[o].name||`${n}.${_(i[t].type)}`]),((e,t)=>e[i]=t)),"blob-to-file"],dl=({url:e="./",dataset:t=(e=>[["dest",e.dest,e.dest.name],["imageState",e.imageState]]),destStore:o="store",credentials:i,headers:r={}})=>[Bs((async(t,o)=>await((e,t,o)=>new Promise(((i,r)=>{const{token:a={},beforeSend:s=n,onprogress:l=n}=o;a.cancel=()=>c.abort();const c=new XMLHttpRequest;c.upload.onprogress=l,c.onload=()=>c.status>=200&&c.status<300?i(c):r(c),c.onerror=()=>r(c),c.ontimeout=()=>r(c),c.open("POST",encodeURI(e)),s(c),c.send(t instanceof FormData?t:t.reduce(((e,t)=>(e.append(...t.map(xo)),e)),new FormData))})))(e,t,{onprogress:o,beforeSend:e=>lo(e,{headers:r,credentials:i})})),((e,o,i)=>[t(e),i]),((e,t)=>e[o]=t)),"store"],ul=e=>[Bs((t=>e&&e.length?(Object.keys(t).forEach((o=>{e.includes(o)||delete t[o]})),t):t)),"prop-filter"],hl=(e={})=>{const{orientImage:t=!0,outputProps:o=["src","dest","size","duration"],preprocessImageFile:i,request:n={}}=e;return[Ws({willRequest:()=>n}),Vs(),i&&[Bs(i,((e,t,o)=>[e.dest,t,o]),((e,t)=>e.dest=t)),"preprocess-image-file"],_s({srcProp:"dest"}),Hs({srcProp:"dest"}),t&&Us({srcProp:"dest"}),t&&Gs(),t&&js(),ul(o)].filter(Boolean)},pl=e=>e&&(T(e)?dl({url:e}):M(e)?[e,"store"]:dl(e)),ml=(e={})=>(t,o,i={})=>{let{canvasMemoryLimit:n=Ms(),orientImage:r=!0,copyImageHead:a=!0,mimeType:s,quality:l,renameFile:c,targetSize:d,imageDataResizer:u,store:h,format:p="file",outputProps:m=["src","dest","imageState","store"],preprocessImageSource:g,preprocessImageState:$,postprocessImageData:f,postprocessImageBlob:y,testSrcSupport:b=!1}={...e,...i};if(!b||Jt(t))return"blob"===p&&(p="file"),[g&&[Bs(g,((e,t,o)=>[e.src,t,o,e.imageState]),((e,t)=>e.src=t)),"preprocess-image-source"],(r||a)&&Us(),r&&Gs(),_s(),$&&[Bs($,((e,t,o,i)=>[e.imageState,t,o,{size:e.size,orientation:e.orientation}]),((e,t)=>e.imageState=t)),"preprocess-image-state"],Ys({canvasMemoryLimit:n}),r&&js(),r&&qs(),Xs(),tl(),Js(),Qs({imageDataResizer:u,targetSize:d}),ol({imageDataResizer:u,canvasMemoryLimit:n,srcShapes:"manipulation"}),el(),Ks(),ol({imageDataResizer:u,canvasMemoryLimit:n,srcShapes:"annotation",shapeFilter:e=>!e.aboveFrame}),il({imageDataResizer:u,canvasMemoryLimit:n,shapeFilter:e=>!e.aboveFrame}),nl({imageDataResizer:u,canvasMemoryLimit:n}),ol({imageDataResizer:u,canvasMemoryLimit:n,srcShapes:"annotation",shapeFilter:e=>e.aboveFrame,shapeClip:!1}),il({imageDataResizer:u,canvasMemoryLimit:n,shapeFilter:e=>e.aboveFrame}),f&&[Bs(f,((e,t,o)=>[e.imageData,t,o]),((e,t)=>e.imageData=t)),"postprocess-image-data"],"file"===p?rl({mimeType:s,quality:l}):"canvas"===p?al():[e=>(e.dest=e.imageData,e)],"file"===p&&r&&Zs(),"file"===p&&a&&ll(),y&&[Bs(y,(({blob:e,imageData:t,src:o},i,n)=>[{blob:e,imageData:t,src:o},i,n]),((e,t)=>e.blob=t)),"postprocess-image-file"],"file"===p&&cl({defaultFilename:"image",renameFile:c}),"file"===p?pl(h):M(h)&&[h,"store"],ul(m)].filter(Boolean)};var gl=(e,t,o,i,n,r,a,s,l,c,d)=>{if(!(e&&t&&o&&i&&s))return;s*=r;const u=Tt(Je(t)),h=st(u),p=st(e),m=et(o),g=st(m),$=as(o,i,l),f=st($),y=Se(me(g),f),b=Se(me(p),h);y.x+=b.x,y.y+=b.y;const x=ge(me(y));x.x+=b.x,x.y+=b.y;const v=st(lt(lt(Je(n),a),e)),w=Se(v,p);return we(y,w),{origin:x,translation:y,rotation:{x:d?Math.PI:0,y:c?Math.PI:0,z:l},scale:s}};let $l=null;var fl=()=>{if(null===$l)if("WebGL2RenderingContext"in window){let e;try{e=p("canvas"),$l=!!e.getContext("webgl2")}catch(e){$l=!1}e&&g(e),e=void 0}else $l=!1;return $l},yl=e=>!(e&e-1),bl=(e,t={},o="",i="")=>Object.keys(t).filter((e=>!S(t[e]))).reduce(((e,n)=>e.replace(new RegExp(o+n+i),t[n])),e);const xl={head:"#version 300 es\n\nin vec4 aPosition;uniform mat4 uMatrix;",text:"\nin vec2 aTexCoord;out vec2 vTexCoord;",matrix:"\ngl_Position=uMatrix*vec4(aPosition.x,aPosition.y,0,1);"},vl={head:"#version 300 es\nprecision highp float;\n\nout vec4 fragColor;",mask:"\nuniform float uMaskFeather[8];uniform float uMaskBounds[4];uniform float uMaskOpacity;float mask(float x,float y,float bounds[4],float opacity){return 1.0-(1.0-(smoothstep(bounds[3],bounds[3]+1.0,x)*(1.0-smoothstep(bounds[1]-1.0,bounds[1],x))*(1.0-step(bounds[0],y))*step(bounds[2],y)))*(1.0-opacity);}",init:"\nfloat a=1.0;vec4 fillColor=uColor;vec4 textureColor=texture(uTexture,vTexCoord);textureColor*=(1.0-step(uRepeat.y,vTexCoord.y))*step(0.0,vTexCoord.y)*(1.0-step(uRepeat.x,vTexCoord.x))*step(0.0,vTexCoord.x);",colorize:"\nif(uTextureColor.a!=0.0&&textureColor.a>0.0){vec3 colorFlattened=textureColor.rgb/textureColor.a;if(colorFlattened.r>=.9999&&colorFlattened.g==0.0&&colorFlattened.b>=.9999){textureColor.rgb=uTextureColor.rgb*textureColor.a;}textureColor*=uTextureColor.a;}",maskapply:"\nfloat m=mask(gl_FragCoord.x,gl_FragCoord.y,uMaskBounds,uMaskOpacity);",maskfeatherapply:"\nfloat leftFeatherOpacity=step(uMaskFeather[1],gl_FragCoord.x)*uMaskFeather[0]+((1.0-uMaskFeather[0])*smoothstep(uMaskFeather[1],uMaskFeather[3],gl_FragCoord.x));float rightFeatherOpacity=(1.0-step(uMaskFeather[7],gl_FragCoord.x))*uMaskFeather[4]+((1.0-uMaskFeather[4])*smoothstep(uMaskFeather[7],uMaskFeather[5],gl_FragCoord.x));a*=leftFeatherOpacity*rightFeatherOpacity;",rectaa:"\nvec2 scaledPoint=vec2(vRectCoord.x*uSize.x,vRectCoord.y*uSize.y);a*=smoothstep(0.0,uEdgeFeather,uSize.x-scaledPoint.x);a*=smoothstep(0.0,uEdgeFeather,uSize.y-scaledPoint.y);a*=smoothstep(0.0,uEdgeFeather,scaledPoint.x);a*=smoothstep(0.0,uEdgeFeather,scaledPoint.y);",cornerradius:"\nvec2 s=(uSize-2.0)*.5;vec2 r=(vRectCoord*uSize)-1.0;vec2 p=r-s;float cornerRadius=uCornerRadius[0];bool left=r.x<s.x;bool top=r.y<s.y;if(!left&&top){cornerRadius=uCornerRadius[1];}if(!left&&!top){cornerRadius=uCornerRadius[3];}if(left&&!top){cornerRadius=uCornerRadius[2];}a*=1.0-clamp(length(max(abs(p)-(s-cornerRadius),0.0))-cornerRadius,0.0,1.0);",fragcolor:"\nif(m<=0.0)discard;fillColor.a*=a;fillColor.rgb*=fillColor.a;fillColor.rgb*=m;fillColor.rgb+=(1.0-m)*(uCanvasColor.rgb*fillColor.a);textureColor*=uTextureOpacity;textureColor.a*=a;textureColor.rgb*=m*a;textureColor.rgb+=(1.0-m)*(uCanvasColor.rgb*textureColor.a);fragColor=textureColor+(fillColor*(1.0-textureColor.a));"},wl=(e,t,o)=>{const i=e.createShader(o),n=((e,t,o)=>(t=bl(t,o===e.VERTEX_SHADER?xl:vl,"##").trim(),fl()?t:(t=(t=t.replace(/#version.+/gm,"").trim()).replace(/^\/\/\#/gm,"#"),o===e.VERTEX_SHADER&&(t=t.replace(/in /gm,"attribute ").replace(/out /g,"varying ")),o===e.FRAGMENT_SHADER&&(t=t.replace(/in /gm,"varying ").replace(/out.*?;/gm,"").replace(/texture\(/g,"texture2D(").replace(/fragColor/g,"gl_FragColor")),""+t)))(e,t,o);return e.shaderSource(i,n),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)||console.error(e.getShaderInfoLog(i)),i},Sl=(e,t,o,i,n)=>{const r=wl(e,t,e.VERTEX_SHADER),a=wl(e,o,e.FRAGMENT_SHADER),s=e.createProgram();e.attachShader(s,r),e.attachShader(s,a),e.linkProgram(s);const l={};return i.forEach((t=>{l[t]=e.getAttribLocation(s,t)})),n.forEach((t=>{l[t]=e.getUniformLocation(s,t)})),{program:s,locations:l,destroy(){e.detachShader(s,r),e.detachShader(s,a),e.deleteShader(r),e.deleteShader(a),e.deleteProgram(s)}}},kl=e=>"VIDEO"!==e.nodeName&&(!!fl()||yl(e.width)&&yl(e.height)),Tl=(e,t=1)=>e?[e[0],e[1],e[2],Lo(e[3])?t*e[3]:t]:[0,0,0,0],Ml=()=>{const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},Rl=(e,t,o,i,n,r,a)=>{const s=1/(t-o),l=1/(i-n),c=1/(r-a);e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+o)*s,e[13]=(n+i)*l,e[14]=(a+r)*c,e[15]=1},Pl=(e,t,o,i)=>{e[12]=e[0]*t+e[4]*o+e[8]*i+e[12],e[13]=e[1]*t+e[5]*o+e[9]*i+e[13],e[14]=e[2]*t+e[6]*o+e[10]*i+e[14],e[15]=e[3]*t+e[7]*o+e[11]*i+e[15]},El=(e,t)=>{e[0]*=t,e[1]*=t,e[2]*=t,e[3]*=t,e[4]*=t,e[5]*=t,e[6]*=t,e[7]*=t,e[8]*=t,e[9]*=t,e[10]*=t,e[11]*=t},Il=(e,t)=>{const o=Math.sin(t),i=Math.cos(t),n=e[4],r=e[5],a=e[6],s=e[7],l=e[8],c=e[9],d=e[10],u=e[11];e[4]=n*i+l*o,e[5]=r*i+c*o,e[6]=a*i+d*o,e[7]=s*i+u*o,e[8]=l*i-n*o,e[9]=c*i-r*o,e[10]=d*i-a*o,e[11]=u*i-s*o},Al=(e,t)=>{const o=Math.sin(t),i=Math.cos(t),n=e[0],r=e[1],a=e[2],s=e[3],l=e[8],c=e[9],d=e[10],u=e[11];e[0]=n*i-l*o,e[1]=r*i-c*o,e[2]=a*i-d*o,e[3]=s*i-u*o,e[8]=n*o+l*i,e[9]=r*o+c*i,e[10]=a*o+d*i,e[11]=s*o+u*i},Ll=(e,t)=>{const o=Math.sin(t),i=Math.cos(t),n=e[0],r=e[1],a=e[2],s=e[3],l=e[4],c=e[5],d=e[6],u=e[7];e[0]=n*i+l*o,e[1]=r*i+c*o,e[2]=a*i+d*o,e[3]=s*i+u*o,e[4]=l*i-n*o,e[5]=c*i-r*o,e[6]=d*i-a*o,e[7]=u*i-s*o};var Fl=(e,t)=>fl()?e.getContext("webgl2",t):e.getContext("webgl",t)||e.getContext("experimental-webgl",t);const Dl=(e,t)=>{const o=e.length;return t>=o?e[t%o]:t<0?e[t%o+o]:e[t]},Ol=(e,t,o,i)=>{const n=he(o.x-t.x,o.y-t.y),r=he(i.x-o.x,i.y-o.y),a=he(t.x-i.x,t.y-i.y),s=he(e.x-t.x,e.y-t.y),l=he(e.x-o.x,e.y-o.y),c=he(e.x-i.x,e.y-i.y),d=Me(n,s),u=Me(r,l),h=Me(a,c);return d<=0&&u<=0&&h<=0},Wl=(e,t,o,i,n)=>{const r=ye(he(i.x-o.x,i.y-o.y)),a=ye(he(n.x-i.x,n.y-i.y)),s=ye(he(r.x+a.x,r.y+a.y)),l=he(-s.y,s.x),c=he(-r.y,r.x),d=Math.min(1/Te(l,c),5);e[t]=i.x,e[t+1]=i.y,e[t+2]=l.x*d,e[t+3]=l.y*d,e[t+4]=-1,e[t+5]=i.x,e[t+6]=i.y,e[t+7]=l.x*d,e[t+8]=l.y*d,e[t+9]=1},Vl=e=>{const t=new Float32Array(8);return t[0]=e[3].x,t[1]=e[3].y,t[2]=e[0].x,t[3]=e[0].y,t[4]=e[2].x,t[5]=e[2].y,t[6]=e[1].x,t[7]=e[1].y,t},_l=(e,t=0,o,i)=>{const n=St(e),r=e.x+.5*e.width,a=e.y+.5*e.height;return(o||i)&&Ae(n,o,i,r,a),0!==t&&Le(n,t,r,a),n},Nl=(e,t,o,i,n)=>{const r=Math.min(20,Math.max(4,Math.round(i/2)));let a=0,s=0,l=0,c=0,d=0;for(;d<r;d++)a=d/r,s=n*Y+a*Y,l=i*Math.cos(s),c=i*Math.sin(s),e.push(he(t+l,o+c))};let Hl=null;var jl=()=>{if(null!==Hl)return Hl;let e=p("canvas");const t=Fl(e);return Hl=t?t.getParameter(t.MAX_TEXTURE_SIZE):void 0,g(e),e=void 0,Hl},Ul=()=>c()&&!!window.chrome;const Gl=new Float32Array([0,1,0,0,1,1,1,0]),Zl=new Float32Array([1,0,0,0,1,1,0,1]),Xl=c()&&F(),Yl=[0,0,0,0,1,0,0,0,0],ql=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Kl=[0,0,0,0],Jl=[0,0,0,0],Ql=(e,t,o,i,n)=>{if(!o||!i)return Gl;let r=i.x/o.width,a=i.y/o.height,s=e/o.width/n,l=t/o.height/n;return s-=r,l-=a,new Float32Array([-r,l,-r,-a,s,l,s,-a])};var ec=(e,t={})=>{const{alpha:o=!1}=t,i={width:0,height:0},n={width:0,height:0},r=jl()||1024;let a,s,l;const c=Ml(),d=Ml();let u,h,p,m,$,f,y,b,x,v=0,w=0,S=0,k=1;const C=new Map([]),T=()=>{P.stencilOp(P.KEEP,P.KEEP,P.KEEP),P.stencilFunc(P.ALWAYS,1,255),P.stencilMask(255)},M=(e=>e*Math.PI/180)(30),R=Math.tan(M/2),P=Fl(e,{alpha:o,antialias:!1,premultipliedAlpha:!0,stencil:!0});if(!P)return;P.getExtension("OES_standard_derivatives"),P.disable(P.DEPTH_TEST),P.enable(P.STENCIL_TEST),P.enable(P.BLEND),P.blendFunc(P.ONE,P.ONE_MINUS_SRC_ALPHA),P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!(!o&&F())),T();const E=P.createTexture();P.bindTexture(P.TEXTURE_2D,E),P.texImage2D(P.TEXTURE_2D,0,P.RGBA,1,1,0,P.RGBA,P.UNSIGNED_BYTE,new Uint8Array(Kl)),C.set(0,E);const I=P.createTexture();C.set(2,I);const A=P.createFramebuffer(),L=P.createTexture();C.set(1,L);const z=P.createFramebuffer(),D=Sl(P,"\n##head\n##text\nvoid main(){vTexCoord=aTexCoord;gl_Position=uMatrix*aPosition;}","\n##head\nin vec2 vTexCoord;uniform sampler2D uTexture;uniform sampler2D uTextureOverlay;uniform sampler2D uTextureBlend;uniform vec2 uTextureSize;uniform float uOpacity;uniform int uAntialias;uniform vec4 uOverlayColor;uniform mat4 uColorMatrix;uniform vec4 uColorOffset;uniform float uClarityKernel[9];uniform float uClarityKernelWeight;uniform float uColorGamma;uniform float uColorVignette;uniform float uMaskClip;uniform float uMaskOpacity;uniform float uMaskBounds[4];uniform float uMaskCornerRadius[4];uniform float uMaskFeather[8];vec4 applyGamma(vec4 c,float g){c.r=pow(c.r,g);c.g=pow(c.g,g);c.b=pow(c.b,g);return c;}vec4 applyColorMatrix(vec4 c,mat4 m,vec4 o){return(c*m)+(o*c.a);}vec4 applyConvolutionMatrix(vec4 c,float k0,float k1,float k2,float k3,float k4,float k5,float k6,float k7,float k8,float w){vec2 pixel=vec2(1)/uTextureSize;vec4 colorSum=texture(uTexture,vTexCoord-pixel)*k0+texture(uTexture,vTexCoord+pixel*vec2(0.0,-1.0))*k1+texture(uTexture,vTexCoord+pixel*vec2(1.0,-1.0))*k2+texture(uTexture,vTexCoord+pixel*vec2(-1.0,0.0))*k3+texture(uTexture,vTexCoord)*k4+texture(uTexture,vTexCoord+pixel*vec2(1.0,0.0))*k5+texture(uTexture,vTexCoord+pixel*vec2(-1.0,1.0))*k6+texture(uTexture,vTexCoord+pixel*vec2(0.0,1.0))*k7+texture(uTexture,vTexCoord+pixel)*k8;vec4 color=vec4(clamp((colorSum/w),0.0,1.0).rgb,c.a);return color;}vec4 applyVignette(vec4 c,vec2 pos,vec2 center,float v){float d=distance(pos,center)/length(center);float f=1.0-(d*abs(v));if(v>0.0){c.rgb*=f;}else if(v<0.0){c.rgb+=(1.0-f)*(1.0-c.rgb);}return c;}vec4 blendPremultipliedAlpha(vec4 back,vec4 front){return front+(back*(1.0-front.a));}void main(){float x=gl_FragCoord.x;float y=gl_FragCoord.y;float a=1.0;float maskTop=uMaskBounds[0];float maskRight=uMaskBounds[1];float maskBottom=uMaskBounds[2];float maskLeft=uMaskBounds[3];float leftFeatherOpacity=step(uMaskFeather[1],x)*uMaskFeather[0]+((1.0-uMaskFeather[0])*smoothstep(uMaskFeather[1],uMaskFeather[3],x));float rightFeatherOpacity=(1.0-step(uMaskFeather[7],x))*uMaskFeather[4]+((1.0-uMaskFeather[4])*smoothstep(uMaskFeather[7],uMaskFeather[5],x));a*=leftFeatherOpacity*rightFeatherOpacity;float overlayColorAlpha=(smoothstep(maskLeft,maskLeft+1.0,x)*(1.0-smoothstep(maskRight-1.0,maskRight,x))*(1.0-step(maskTop,y))*step(maskBottom,y));if(uOverlayColor.a==0.0){a*=overlayColorAlpha;}vec2 offset=vec2(maskLeft,maskBottom);vec2 size=vec2(maskRight-maskLeft,maskTop-maskBottom)*.5;vec2 center=offset.xy+size.xy;int pixelX=int(step(center.x,x));int pixelY=int(step(y,center.y));float cornerRadius=0.0;if(pixelX==0&&pixelY==0)cornerRadius=uMaskCornerRadius[0];if(pixelX==1&&pixelY==0)cornerRadius=uMaskCornerRadius[1];if(pixelX==0&&pixelY==1)cornerRadius=uMaskCornerRadius[2];if(pixelX==1&&pixelY==1)cornerRadius=uMaskCornerRadius[3];float cornerOffset=sign(cornerRadius)*length(max(abs(gl_FragCoord.xy-size-offset)-size+cornerRadius,0.0))-cornerRadius;float cornerOpacity=1.0-smoothstep(0.0,1.0,cornerOffset);a*=cornerOpacity;if(uAntialias==1){vec2 scaledPoint=vec2(vTexCoord.x*uTextureSize.x,vTexCoord.y*uTextureSize.y);a*=smoothstep(0.0,1.0,uTextureSize.x-scaledPoint.x);a*=smoothstep(0.0,1.0,uTextureSize.y-scaledPoint.y);a*=smoothstep(0.0,1.0,scaledPoint.x);a*=smoothstep(0.0,1.0,scaledPoint.y);}vec4 color=texture(uTexture,vTexCoord);if(uClarityKernelWeight!=-1.0){color=applyConvolutionMatrix(color,uClarityKernel[0],uClarityKernel[1],uClarityKernel[2],uClarityKernel[3],uClarityKernel[4],uClarityKernel[5],uClarityKernel[6],uClarityKernel[7],uClarityKernel[8],uClarityKernelWeight);}color=blendPremultipliedAlpha(color,texture(uTextureBlend,vTexCoord));color=applyGamma(color,uColorGamma);color=applyColorMatrix(color,uColorMatrix,uColorOffset);color*=a;if(uColorVignette!=0.0){vec2 pos=gl_FragCoord.xy-offset;color=applyVignette(color,pos,center-offset,uColorVignette);}color=blendPremultipliedAlpha(color,texture(uTextureOverlay,vTexCoord));if(overlayColorAlpha<=0.0){color*=1.0-uOverlayColor.a;}color*=uOpacity;fragColor=color;}",["aPosition","aTexCoord"],["uMatrix","uTexture","uTextureBlend","uTextureOverlay","uTextureSize","uColorGamma","uColorVignette","uColorOffset","uColorMatrix","uClarityKernel","uClarityKernelWeight","uOpacity","uMaskOpacity","uMaskBounds","uMaskCornerRadius","uMaskFeather","uOverlayColor","uAntialias"]),O=P.createBuffer(),B=P.createBuffer();P.bindBuffer(P.ARRAY_BUFFER,B),P.bufferData(P.ARRAY_BUFFER,Gl,P.STATIC_DRAW);const W=P.createBuffer();P.bindBuffer(P.ARRAY_BUFFER,W),P.bufferData(P.ARRAY_BUFFER,Zl,P.STATIC_DRAW);const V=Sl(P,"#version 300 es\n\nin vec4 aPosition;in vec2 aNormal;in float aMiter;out vec2 vNormal;out float vMiter;out float vWidth;uniform float uWidth;uniform float uSharpness;uniform mat4 uMatrix;void main(){vMiter=aMiter;vNormal=aNormal;vWidth=(uWidth*.5)+uSharpness;gl_Position=uMatrix*vec4(aPosition.x+(aNormal.x*vWidth*aMiter),aPosition.y+(aNormal.y*vWidth*aMiter),0,1);}","\n##head\n##mask\nin vec2 vNormal;in float vMiter;in float vWidth;uniform float uWidth;uniform vec4 uColor;uniform vec4 uCanvasColor;void main(){vec4 fillColor=uColor;float m=mask(gl_FragCoord.x,gl_FragCoord.y,uMaskBounds,uMaskOpacity);if(m<=0.0)discard;fillColor.a*=clamp(smoothstep(vWidth-.5,vWidth-1.0,abs(vMiter)*vWidth),0.0,1.0);fillColor.rgb*=fillColor.a;fillColor.rgb*=m;fillColor.rgb+=(1.0-m)*(uCanvasColor.rgb*fillColor.a);fragColor=fillColor;}",["aPosition","aNormal","aMiter"],["uColor","uCanvasColor","uMatrix","uWidth","uSharpness","uMaskBounds","uMaskOpacity"]),_=P.createBuffer();Ul()&&(P.bindBuffer(P.ARRAY_BUFFER,_),P.bufferData(P.ARRAY_BUFFER,1,P.DYNAMIC_DRAW));const N=(e,t,o,i=!1)=>{const{program:n,locations:r}=V;P.useProgram(n),P.enableVertexAttribArray(r.aPosition),P.enableVertexAttribArray(r.aNormal),P.enableVertexAttribArray(r.aMiter);const a=((e,t)=>{let o,i,n,r=0;const a=e.length,s=new Float32Array(10*(t?a+1:a)),l=e[0],c=e[a-1];for(r=0;r<a;r++)o=e[r-1],i=e[r],n=e[r+1],o||(o=t?c:he(i.x+(i.x-n.x),i.y+(i.y-n.y))),n||(n=t?l:he(i.x+(i.x-o.x),i.y+(i.y-o.y))),Wl(s,10*r,o,i,n);return t&&Wl(s,10*a,c,l,e[1]),s})(e,i),s=5*Float32Array.BYTES_PER_ELEMENT,c=2*Float32Array.BYTES_PER_ELEMENT,d=4*Float32Array.BYTES_PER_ELEMENT;P.uniform1f(r.uWidth,t),P.uniform1f(r.uSharpness,l),P.uniform4fv(r.uColor,o),P.uniformMatrix4fv(r.uMatrix,!1,u),P.uniform4f(r.uCanvasColor,v,w,S,k),P.uniform1fv(r.uMaskBounds,y),P.uniform1f(r.uMaskOpacity,f),P.bindBuffer(P.ARRAY_BUFFER,_),P.bufferData(P.ARRAY_BUFFER,a,P.STATIC_DRAW),P.vertexAttribPointer(r.aPosition,2,P.FLOAT,!1,s,0),P.vertexAttribPointer(r.aNormal,2,P.FLOAT,!1,s,c),P.vertexAttribPointer(r.aMiter,1,P.FLOAT,!1,s,d),P.drawArrays(P.TRIANGLE_STRIP,0,a.length/5),P.disableVertexAttribArray(r.aPosition),P.disableVertexAttribArray(r.aNormal),P.disableVertexAttribArray(r.aMiter)},H=Sl(P,"\n##head\nvoid main(){\n##matrix\n}","\n##head\n##mask\nuniform vec4 uColor;uniform vec4 uCanvasColor;void main(){vec4 fillColor=uColor;\n##maskapply\nfillColor.rgb*=fillColor.a;fillColor.rgb*=m;fillColor.rgb+=(1.0-m)*(uCanvasColor.rgb*fillColor.a);fragColor=fillColor;}",["aPosition"],["uColor","uCanvasColor","uMatrix","uMaskBounds","uMaskOpacity"]),j=P.createBuffer(),U=Sl(P,"\n##head\n##text\nin vec2 aRectCoord;out vec2 vRectCoord;void main(){vTexCoord=aTexCoord;vRectCoord=aRectCoord;\n##matrix\n}","\n##head\n##mask\nin vec2 vTexCoord;in vec2 vRectCoord;uniform sampler2D uTexture;uniform vec4 uTextureColor;uniform float uTextureOpacity;uniform vec2 uRepeat;uniform vec4 uColor;uniform float uCornerRadius[4];uniform vec2 uSize;uniform vec2 uPosition;uniform vec4 uCanvasColor;uniform int uInverted;uniform float uEdgeFeather;void main(){\n##init\n##colorize\n##rectaa\n##cornerradius\n##maskfeatherapply\nif(uInverted==1)a=1.0-a;\n##maskapply\n##fragcolor\n}",["aPosition","aTexCoord","aRectCoord"],["uTexture","uColor","uMatrix","uCanvasColor","uTextureColor","uTextureOpacity","uRepeat","uPosition","uSize","uMaskBounds","uMaskOpacity","uMaskFeather","uCornerRadius","uInverted","uEdgeFeather"]),Z=P.createBuffer(),X=P.createBuffer(),Y=P.createBuffer(),q=Sl(P,"\n##head\n##text\nout vec2 vTexCoordDouble;void main(){vTexCoordDouble=vec2(aTexCoord.x*2.0-1.0,aTexCoord.y*2.0-1.0);vTexCoord=aTexCoord;\n##matrix\n}","\n##head\n##mask\nin vec2 vTexCoord;in vec2 vTexCoordDouble;uniform sampler2D uTexture;uniform float uTextureOpacity;uniform vec2 uRepeat;uniform vec2 uRadius;uniform vec4 uColor;uniform int uInverted;uniform vec4 uCanvasColor;void main(){\n##init\nfloat ar=uRadius.x/uRadius.y;vec2 rAA=vec2(uRadius.x-1.0,uRadius.y-(1.0/ar));vec2 scaledPointSq=vec2((vTexCoordDouble.x*uRadius.x)*(vTexCoordDouble.x*uRadius.x),(vTexCoordDouble.y*uRadius.y)*(vTexCoordDouble.y*uRadius.y));float p=(scaledPointSq.x/(uRadius.x*uRadius.x))+(scaledPointSq.y/(uRadius.y*uRadius.y));float pAA=(scaledPointSq.x/(rAA.x*rAA.x))+(scaledPointSq.y/(rAA.y*rAA.y));a=smoothstep(1.0,p/pAA,p);if(uInverted==1)a=1.0-a;\n##maskapply\n##fragcolor\n}",["aPosition","aTexCoord"],["uTexture","uTextureOpacity","uRepeat","uColor","uCanvasColor","uMatrix","uRadius","uInverted","uMaskBounds","uMaskOpacity"]),K=P.createBuffer(),J=P.createBuffer(),Q=new Map,ee={2:{width:0,height:0},1:{width:0,height:0}},te=(e,t,o,n=1)=>{const a=Math.min(Math.min(4096,r)/o.width,Math.min(4096,r)/o.height,n),l=Math.floor(a*o.width),c=Math.floor(a*o.height);_e(o,ee[e])?P.bindFramebuffer(P.FRAMEBUFFER,t):(P.bindTexture(P.TEXTURE_2D,C.get(e)),P.texImage2D(P.TEXTURE_2D,0,P.RGBA,l,c,0,P.RGBA,P.UNSIGNED_BYTE,null),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,P.LINEAR),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,P.CLAMP_TO_EDGE),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,P.CLAMP_TO_EDGE),P.bindFramebuffer(P.FRAMEBUFFER,t),P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_2D,C.get(e),0),ee[e]=o);const h=o.width*s,p=o.height*s;var m;Rl(d,0,h,p,0,-1,1),Pl(d,0,p,0),(m=d)[0]*=1,m[1]*=1,m[2]*=1,m[3]*=1,((e,t)=>{e[4]*=-1,e[5]*=-1,e[6]*=-1,e[7]*=-1})(d),u=d,P.viewport(0,0,l,c),P.colorMask(!0,!0,!0,!0),P.clearColor(0,0,0,0),P.clear(P.COLOR_BUFFER_BIT),x=[1,0,1,0,1,Math.max(i.width,o.width),1,Math.max(i.width,o.width)]},oe=(e,t)=>{const{forceRelease:o=!1}=t||{},{src:i}=Q.get(e);i instanceof HTMLCanvasElement&&(o||i.dataset.retain||g(i)),Q.delete(e),P.deleteTexture(e)};return{drawPath:(e,t=0,o=!1,i=!1,n,r,a,l,c)=>{if(e.length<2)return;const d=e.map((e=>({x:e.x*s,y:e.y*s}))),h=n*s;if(h>0&&N(d,h,Tl(r,c),a),d.length<3||!l||0===l[3]||!a)return;const p=(e=>{if(e.length<3)return[];if((e=>{const t=e.length;for(let o=0;o<t;o++){const t=Ze(e[o],Dl(e,o+1));if(Et(t,e,{ignoreIdenticalLines:!0,breakOnIntersection:!0}))return!0}return!1})(e))return[];(e=>{let t,o,i,n,r,a=0;const s=e.length;for(t=0;t<s;t++)o=e[t],i=e[(t+1)%s],n=i.x-o.x,r=(i.y+o.y)/2,a+=n*r;return a})(e)<0&&e.reverse();const t=e.length,o=[...Array(t).keys()],i=[];let n,r,a,s,l,c,d,u,h,p,m,g,$=128;for(;o.length>3;){if($<=0)return[];for($--,n=0;n<o.length;n++)if(a=o[n],s=Dl(o,n-1),l=Dl(o,n+1),c=e[a],d=e[s],u=e[l],h=he(d.x-c.x,d.y-c.y),p=he(u.x-c.x,u.y-c.y),!(Me(h,p)<0)){for(m=!0,r=0;r<t;r++)if(r!==a&&r!==s&&r!==l&&(g=e[r],Ol(g,d,c,u))){m=!1;break}if(m){i.push([d,c,u]),o.splice(n,1);break}}}return i.push([e[o[0]],e[o[1]],e[o[2]]]),i})(d),m=new Float32Array(6*p.length);p.forEach((([e,t,o],i)=>{const n=6*i;m[n+0]=e.x,m[n+1]=e.y,m[n+2]=t.x,m[n+3]=t.y,m[n+4]=o.x,m[n+5]=o.y})),((e,t)=>{const{program:o,locations:i}=H;P.useProgram(o),P.enableVertexAttribArray(i.aPosition),P.uniform4fv(i.uColor,t),P.uniformMatrix4fv(i.uMatrix,!1,u),P.uniform1fv(i.uMaskBounds,y),P.uniform1f(i.uMaskOpacity,f),P.uniform4f(i.uCanvasColor,v,w,S,k),P.bindBuffer(P.ARRAY_BUFFER,j),P.bufferData(P.ARRAY_BUFFER,e,P.STATIC_DRAW),P.vertexAttribPointer(i.aPosition,2,P.FLOAT,!1,0,0),P.drawArrays(P.TRIANGLES,0,e.length/2),P.disableVertexAttribArray(i.aPosition)})(m,Tl(l,c))},drawRect:(e,t=0,o=!1,i=!1,n,r,a,l,c,d=!1,h,p,m,g,$,b=1/s,C,T)=>{const M=ht(Je(e),s),R=n.map((t=>((e,t)=>Math.floor(ss(e,0,Math.min(.5*(t.width-1),.5*(t.height-1)))))(t||0,e))).map((e=>e*s));if(r||a){const e=Je(M);e.x-=.5,e.y-=.5,e.width+=1,e.height+=1;const n=_l(e,t,o,i),p=Vl(n);let m;C&&(m=Tl(C),0===m[3]&&(m[3]=.001));const I=l&&d?[e.width/l.width,e.height/l.height]:[1,1];((e,t,o,i,n,r=E,a,l=1,c=Kl,d=Gl,h=x,p=1,m)=>{const{program:g,locations:$}=U;P.useProgram(g),P.enableVertexAttribArray($.aPosition),P.enableVertexAttribArray($.aTexCoord),P.enableVertexAttribArray($.aRectCoord),P.uniform4fv($.uColor,n),P.uniform2fv($.uSize,[t,o]),P.uniform2fv($.uPosition,[e[2],e[3]]),P.uniform2fv($.uRepeat,a),P.uniform1i($.uInverted,m?1:0),P.uniform1fv($.uCornerRadius,i),P.uniform4f($.uCanvasColor,v,w,S,k),P.uniform1fv($.uMaskFeather,h.map(((e,t)=>t%2==0?e:e*s))),P.uniform1fv($.uMaskBounds,y),P.uniform1f($.uMaskOpacity,f),P.uniform1f($.uEdgeFeather,Math.max(0,p)),P.uniformMatrix4fv($.uMatrix,!1,u),P.uniform1i($.uTexture,4),P.uniform4fv($.uTextureColor,c),P.uniform1f($.uTextureOpacity,l),P.activeTexture(P.TEXTURE0+4),P.bindTexture(P.TEXTURE_2D,r),P.bindBuffer(P.ARRAY_BUFFER,X),P.bufferData(P.ARRAY_BUFFER,d,P.STATIC_DRAW),P.vertexAttribPointer($.aTexCoord,2,P.FLOAT,!1,0,0),P.bindBuffer(P.ARRAY_BUFFER,Y),P.bufferData(P.ARRAY_BUFFER,Gl,P.STATIC_DRAW),P.vertexAttribPointer($.aRectCoord,2,P.FLOAT,!1,0,0),P.bindBuffer(P.ARRAY_BUFFER,Z),P.bufferData(P.ARRAY_BUFFER,e,P.STATIC_DRAW),P.vertexAttribPointer($.aPosition,2,P.FLOAT,!1,0,0),P.drawArrays(P.TRIANGLE_STRIP,0,e.length/2),P.disableVertexAttribArray($.aPosition),P.disableVertexAttribArray($.aTexCoord),P.disableVertexAttribArray($.aRectCoord)})(p,e.width,e.height,R,Tl(r,g),a,I,g,m,h?new Float32Array(h):Ql(e.width,e.height,l,c,s),$,b*s,T)}p&&(p=Math.min(p,M.width,M.height),N(((e,t,o,i,n,r,a,s)=>{const l=[];if(r.every((e=>0===e)))l.push(he(e,t),he(e+o,t),he(e+o,t+i),he(e,t+i));else{const[n,a,s,c]=r,d=e,u=e+o,h=t,p=t+i;l.push(he(d+n,h)),Nl(l,u-a,h+a,a,-1),l.push(he(u,h+a)),Nl(l,u-c,p-c,c,0),l.push(he(u-c,p)),Nl(l,d+s,p-s,s,1),l.push(he(d,p-s)),Nl(l,d+n,h+n,n,2)}return(a||s)&&Ae(l,a,s,e+.5*o,t+.5*i),n&&Le(l,n,e+.5*o,t+.5*i),l})(M.x,M.y,M.width,M.height,t,R,o,i),p*s,Tl(m,g),!0))},drawEllipse:(e,t,o,i,n,r,a,l,c,d,h,p,m,g,$)=>{const b=ht(at(e.x-t,e.y-o,2*t,2*o),s);if(a||l){const e=Je(b);e.x-=.5,e.y-=.5,e.width+=1,e.height+=1;const t=_l(e,i,n,r);((e,t,o,i,n=E,r=Gl,a=1,s=!1)=>{const{program:l,locations:c}=q;P.useProgram(l),P.enableVertexAttribArray(c.aPosition),P.enableVertexAttribArray(c.aTexCoord),P.uniformMatrix4fv(c.uMatrix,!1,u),P.uniform2fv(c.uRadius,[.5*t,.5*o]),P.uniform1i(c.uInverted,s?1:0),P.uniform4fv(c.uColor,i),P.uniform4f(c.uCanvasColor,v,w,S,k),P.uniform2fv(c.uRepeat,[1,1]),P.uniform1fv(c.uMaskBounds,y),P.uniform1f(c.uMaskOpacity,f),P.uniform1i(c.uTexture,4),P.uniform1f(c.uTextureOpacity,a),P.activeTexture(P.TEXTURE0+4),P.bindTexture(P.TEXTURE_2D,n),P.bindBuffer(P.ARRAY_BUFFER,J),P.bufferData(P.ARRAY_BUFFER,r,P.STATIC_DRAW),P.vertexAttribPointer(c.aTexCoord,2,P.FLOAT,!1,0,0),P.bindBuffer(P.ARRAY_BUFFER,K),P.bufferData(P.ARRAY_BUFFER,e,P.STATIC_DRAW),P.vertexAttribPointer(c.aPosition,2,P.FLOAT,!1,0,0),P.drawArrays(P.TRIANGLE_STRIP,0,e.length/2),P.disableVertexAttribArray(c.aPosition),P.disableVertexAttribArray(c.aTexCoord)})(Vl(t),e.width,e.height,Tl(a,g),l,h?new Float32Array(h):Ql(e.width,e.height,c,d,s),g,$)}p&&N(((e,t,o,i,n,r,a)=>{const s=.5*Math.abs(o),l=.5*Math.abs(i),c=Math.abs(o)+Math.abs(i),d=Math.max(20,Math.round(c/6));return zt(he(e+s,t+l),s,l,n,r,a,d)})(b.x,b.y,b.width,b.height,i,n,r),p*s,Tl(m,g),!0)},drawImage:(e,t,o,n,r,l,c,d,u,h,p=ql,m=1,g,$=1,x=0,v=b,w=Jl,S=Kl,k=!1,T=!1,E=!0)=>{const I=t.width*s,A=t.height*s,L=-.5*I,z=.5*A,F=.5*I,V=-.5*A,_=new Float32Array([L,V,0,L,z,0,F,V,0,F,z,0]);P.bindBuffer(P.ARRAY_BUFFER,O),P.bufferData(P.ARRAY_BUFFER,_,P.STATIC_DRAW);const N=t.height/2/R*(i.height/t.height)*-1;r*=s,l*=s,o*=s,n*=s;const{program:H,locations:j}=D,U=Ml();((e,t,o,i,n)=>{const r=1/Math.tan(t/2),a=1/(1-n);e[0]=r/o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+1)*a,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*1*a,e[15]=0})(U,M,a,0,2*-N),Pl(U,r,-l,N),Pl(U,o,-n,0),Ll(U,-u),El(U,h),Pl(U,-o,n,0),Al(U,d),Il(U,c),P.useProgram(H),P.enableVertexAttribArray(j.aPosition),P.enableVertexAttribArray(j.aTexCoord),P.uniform1i(j.uTexture,3),P.uniform2f(j.uTextureSize,t.width,t.height),P.activeTexture(P.TEXTURE0+3),P.bindTexture(P.TEXTURE_2D,e);const G=T?1:0,Z=C.get(G);P.uniform1i(j.uTextureBlend,G),P.activeTexture(P.TEXTURE0+G),P.bindTexture(P.TEXTURE_2D,Z);const X=k?2:0,Y=C.get(X);P.uniform1i(j.uTextureOverlay,X),P.activeTexture(P.TEXTURE0+X),P.bindTexture(P.TEXTURE_2D,Y),P.bindBuffer(P.ARRAY_BUFFER,O),P.vertexAttribPointer(j.aPosition,3,P.FLOAT,!1,0,0);const q=Xl&&(e=>Q.get(e).isRotatedVideo)(e);let K;P.bindBuffer(P.ARRAY_BUFFER,q?W:B),P.vertexAttribPointer(j.aTexCoord,2,P.FLOAT,!1,0,0),P.uniformMatrix4fv(j.uMatrix,!1,U),P.uniform4fv(j.uOverlayColor,S),!g||hs(g,Yl)?(g=Yl,K=-1):(K=g.reduce(((e,t)=>e+t),0),K=K<=0?1:K),P.uniform1fv(j.uClarityKernel,g),P.uniform1f(j.uClarityKernelWeight,K),P.uniform1f(j.uColorGamma,1/$),P.uniform1f(j.uColorVignette,x),P.uniform1i(j.uAntialias,E?1:0),P.uniform4f(j.uColorOffset,p[4],p[9],p[14],p[19]),P.uniformMatrix4fv(j.uColorMatrix,!1,[p[0],p[1],p[2],p[3],p[5],p[6],p[7],p[8],p[10],p[11],p[12],p[13],p[15],p[16],p[17],p[18]]),P.uniform1f(j.uOpacity,m),P.uniform1f(j.uMaskOpacity,f),P.uniform1fv(j.uMaskBounds,y),P.uniform1fv(j.uMaskCornerRadius,w.map((e=>e*s))),P.uniform1fv(j.uMaskFeather,v.map(((e,t)=>t%2==0?e:e*s))),P.drawArrays(P.TRIANGLE_STRIP,0,4),P.disableVertexAttribArray(j.aPosition),P.disableVertexAttribArray(j.aTexCoord)},textureFilterNearest:P.NEAREST,textureFilterLinear:P.LINEAR,textureClamp:P.CLAMP_TO_EDGE,textureRepeat:P.REPEAT,textureCreate:()=>P.createTexture(),textureUpdate:(e,t,o)=>(Q.set(e,{src:t,options:o,isRotatedVideo:"VIDEO"===t.nodeName&&(t.dataset&&90==t.dataset.rotation||270==t.dataset.rotation)}),((e,t,o,i)=>(e.bindTexture(e.TEXTURE_2D,t),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),((e,t,o)=>{e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,kl(t)?e.LINEAR_MIPMAP_LINEAR:e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,o.filterParam),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,o.wrapParam),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,o.wrapParam),kl(t)&&e.generateMipmap(e.TEXTURE_2D)})(e,o,i),e.bindTexture(e.TEXTURE_2D,null),t))(P,e,t,o)),textureGetSize:e=>{const{src:t,options:o}=Q.get(e),i=De(t);return o.scalar?Ge(i,(e=>e/o.scalar)):i},textureDelete:oe,enablePreviewStencil:()=>{P.stencilOp(P.KEEP,P.KEEP,P.REPLACE),P.stencilFunc(P.ALWAYS,1,255),P.stencilMask(255)},applyPreviewStencil:()=>{P.stencilFunc(P.EQUAL,1,255),P.stencilMask(0)},disablePreviewStencil:T,setCanvasColor(e){v=e[0],w=e[1],S=e[2],k=o?e[3]:1,P.clear(P.COLOR_BUFFER_BIT)},resetCanvasMatrix:()=>{Rl(c,0,i.width,i.height,0,-1,1)},updateCanvasMatrix(e,t,o,n,r){const a=e.width,l=e.height,d=i.width*(.5/s),u=i.height*(.5/s),h={x:d+(o.x+t.x),y:u+(o.y+t.y)},p={x:h.x-t.x,y:h.y-t.y},m=.5*a,g=.5*l;$e(p,r.z,h),((e,t,o)=>{e.x=ce(e.x,t,o.x),e.y=ce(e.y,t,o.y)})(p,n,h),Pl(c,(p.x-m)*s,(p.y-g)*s,0),Pl(c,m*s,g*s,0),Ll(c,r.z);const $=r.x>Math.PI/2;Il(c,$?Math.PI:0);const f=r.y>Math.PI/2;Al(c,f?Math.PI:0),El(c,n),Pl(c,-m*s,-g*s,0)},drawToCanvas(){P.bindFramebuffer(P.FRAMEBUFFER,null),u=c,P.viewport(0,0,P.drawingBufferWidth,P.drawingBufferHeight),P.colorMask(!0,!0,!0,!0),P.clearColor(v,w,S,k),P.clear(P.COLOR_BUFFER_BIT),x=[1,0,1,0,1,i.width,1,i.width]},drawToImageBlendBuffer(e,t){te(1,z,e,t)},drawToImageOverlayBuffer(e,t){te(2,A,e,t)},enableMask(e,t){const o=e.x*s,n=e.y*s,r=e.width*s,a=e.height*s;$=o,p=$+r,h=i.height-n,m=i.height-(n+a),f=1-t,y=[h,p,m,$]},disableMask(){$=0,p=i.width,h=i.height,m=0,f=1,y=[h,p,m,$]},resize:(t,o,r)=>{s=Math.max(1,r),l=1===s?.75:1,n.width=t,n.height=o,i.width=t*s,i.height=o*s,a=G(i.width,i.height),e.width=i.width,e.height=i.height,Rl(c,0,i.width,i.height,0,-1,1),b=[1,0,1,0,1,n.width,1,n.width]},release(){Array.from(Q.keys()).forEach((e=>oe(e,{forceRelease:!0}))),Q.clear(),C.forEach((e=>{P.deleteTexture(e)})),C.clear(),D.destroy(),V.destroy(),H.destroy(),U.destroy(),q.destroy(),e.width=1,e.height=1,e=void 0}}};function rc(e){return Math.sqrt(1- --e*e)}function ac(e){return"[object Date]"===Object.prototype.toString.call(e)}function sc(e,t){if(e===t||e!=e)return()=>e;const o=typeof e;if(o!==typeof t||Array.isArray(e)!==Array.isArray(t))throw new Error("Cannot interpolate values of different type");if(Array.isArray(e)){const o=t.map(((t,o)=>sc(e[o],t)));return e=>o.map((t=>t(e)))}if("object"===o){if(!e||!t)throw new Error("Object cannot be null");if(ac(e)&&ac(t)){e=e.getTime();const o=(t=t.getTime())-e;return t=>new Date(e+t*o)}const o=Object.keys(t),i={};return o.forEach((o=>{i[o]=sc(e[o],t[o])})),e=>{const t={};return o.forEach((o=>{t[o]=i[o](e)})),t}}if("number"===o){const o=t-e;return t=>e+t*o}throw new Error(`Cannot interpolate ${o} values`)}function lc(e,t={}){const o=_a(e);let i,n=e;function r(r,a){if(null==e)return o.set(e=r),Promise.resolve();n=r;let s=i,l=!1,{delay:c=0,duration:d=400,easing:u=Kn,interpolate:h=sc}=Jn(Jn({},t),a);if(0===d)return s&&(s.abort(),s=null),o.set(e=n),Promise.resolve();const p=fr()+c;let m;return i=vr((t=>{if(t<p)return!0;l||(m=h(e,r),"function"==typeof d&&(d=d(e,r)),l=!0),s&&(s.abort(),s=null);const i=t-p;return i>d?(o.set(e=r),!1):(o.set(e=m(u(i/d))),!0)})),i.promise}return{set:r,update:(t,o)=>r(t(n,e),o),subscribe:o.subscribe}}function cc(e,t,o,i){if("number"==typeof o){const n=i-o,r=(o-t)/(e.dt||1/60),a=(r+(e.opts.stiffness*n-e.opts.damping*r)*e.inv_mass)*e.dt;return Math.abs(a)<e.opts.precision&&Math.abs(n)<e.opts.precision?i:(e.settled=!1,o+a)}if(Do(o))return o.map(((n,r)=>cc(e,t[r],o[r],i[r])));if("object"==typeof o){const n={};for(const r in o)n[r]=cc(e,t[r],o[r],i[r]);return n}throw new Error(`Cannot spring ${typeof o} values`)}function dc(e,t={}){const o=_a(e),{stiffness:i=.15,damping:n=.8,precision:r=.01}=t;let a,s,l,c=e,d=e,u=1,h=0,p=!1;function m(t,i={}){d=t;const n=l={};if(null==e||i.hard||g.stiffness>=1&&g.damping>=1)return p=!0,a=null,c=t,o.set(e=d),Promise.resolve();if(i.soft){const e=!0===i.soft?.5:+i.soft;h=1/(60*e),u=0}if(!s){a=null,p=!1;const t={inv_mass:void 0,opts:g,settled:!0,dt:void 0};s=vr((i=>{if(null===a&&(a=i),p)return p=!1,s=null,!1;u=Math.min(u+h,1),t.inv_mass=u,t.opts=g,t.settled=!0,t.dt=60*(i-a)/1e3;const n=cc(t,c,e,d);return a=i,c=e,o.set(e=n),t.settled&&(s=null),!t.settled}))}return new Promise((e=>{s.promise.then((()=>{n===l&&e()}))}))}const g={set:m,update:(t,o)=>m(t(d,e),o),subscribe:o.subscribe,stiffness:i,damping:n,precision:r};return g}var uc=Va(!1,(e=>{const t=window.matchMedia("(prefers-reduced-motion:reduce)"),o=()=>e(t.matches);return o(),t.addListener(o),()=>t.removeListener(o)})),hc=()=>"ResizeObserver"in window;const pc=Qe(),mc=(e,t,o,i,n)=>{e.rect||(e.rect=Qe());const r=e.rect;gt(pc,t,o,i,n),pt(r,pc)||($t(r,pc),e.dispatchEvent(new CustomEvent("measure",{detail:r})))},gc=Math.round,$c=e=>{const t=e.getBoundingClientRect();vc&&mc(e,gc(t.x),gc(t.y),gc(t.width),gc(t.height))},fc=e=>{vc&&mc(e,e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight)},yc=[];let bc,xc,vc;function wc(){yc.length?(yc.forEach((e=>e.measure(e))),vc=requestAnimationFrame(wc)):vc=void 0}let Sc=new Map([]),kc=0,Cc=0;var Tc=(e,t={})=>{const{observePosition:o=!1,observeViewRect:i=!1,once:n=!1,disabled:r=!1,isMeasureRoot:a=!1}=t;if(hc()&&a&&(xc||(xc=new ResizeObserver((e=>{e.forEach((e=>{Sc.set(e.target,e.contentRect)}));const t=Array.from(Sc.values()).some((({width:e,height:t})=>e>0&&t>0));t?t&&!1===vc&&wc():(vc&&cancelAnimationFrame(vc),vc=!1)}))),xc.observe(e),kc++),!r)return!hc()||o||i?(e.measure=i?$c:fc,yc.push(e),void 0===vc&&(vc=requestAnimationFrame(wc)),e.measure(e),{destroy(){a&&xc&&(Sc.delete(e),xc.unobserve(e),kc--,0===kc&&(xc.disconnect(),xc=void 0));const t=yc.indexOf(e);yc.splice(t,1),delete e.measure}}):(bc||(bc=new ResizeObserver((e=>{e.forEach((e=>{vc&&fc(e.target)}))}))),bc.observe(e),fc(e),n?bc.unobserve(e):Cc++,{destroy(){a&&xc&&(Sc.delete(e),xc.unobserve(e),kc--,0===kc&&(xc.disconnect(),xc=void 0)),n||(bc.unobserve(e),Cc--,0===Cc&&(bc.disconnect(),bc=void 0))}})},Mc=e=>{let t=!1;const o={pointerdown:()=>{t=!1},keydown:()=>{t=!0},keyup:()=>{t=!1},focus:e=>{t&&(e.target.dataset.focusVisible="")},blur:e=>{delete e.target.dataset.focusVisible}};return Object.keys(o).forEach((t=>e.addEventListener(t,o[t],!0))),{destroy(){Object.keys(o).forEach((t=>e.removeEventListener(t,o[t],!0)))}}};const Rc=async e=>new Promise((t=>{if("file"===e.kind)return t(e.getAsFile());e.getAsString(t)}));var Pc=(e,t={})=>{const o=e=>{e.preventDefault()},i=async o=>{o.preventDefault(),o.stopPropagation();try{const i=await(e=>new Promise(((t,o)=>{const{items:i}=e.dataTransfer;if(!i)return t([]);Promise.all(Array.from(i).map(Rc)).then((e=>{t(e.filter((e=>No(e)&&Jt(e)||/^http/.test(e))))})).catch(o)})))(o);e.dispatchEvent(new CustomEvent("dropfiles",{detail:{event:o,resources:i},...t}))}catch(e){}};return e.addEventListener("drop",i),e.addEventListener("dragover",o),{destroy(){e.removeEventListener("drop",i),e.removeEventListener("dragover",o)}}};let Ec=null;var Ic=()=>{if(null===Ec)if(c()){const e=p("canvas");Ec=!Fl(e,{failIfMajorPerformanceCaveat:!0}),g(e)}else Ec=!1;return Ec},Ac=e=>e instanceof WebGLTexture,Lc=([e,t,o,i])=>[i.x,i.y,e.x,e.y,o.x,o.y,t.x,t.y];function zc(e){let t,o,i,n;return{c(){t=Mr("div"),o=Mr("canvas"),Fr(t,"class","PinturaCanvas")},m(r,a){Cr(r,t,a),wr(t,o),e[36](o),i||(n=[Ar(o,"measure",e[37]),gr(Tc.call(null,o))],i=!0)},p:qn,i:qn,o:qn,d(o){o&&Tr(t),e[36](null),i=!1,tr(n)}}}function Fc(e,t,o){let i,r,a,s,l,d,u;const h=[0,0,0,0],m=ue(),f=c()&&(e=>{const t=64,o=p("canvas",{"data-retain":!0,width:128,height:128}),i=o.getContext("2d");return i.fillStyle="#f0f",i.fillRect(0,0,t,t),i.fillRect(t,t,t,t),o})(),y=Qr();let b,{isAnimated:x}=t,{isTransparent:v}=t,{maskRect:w}=t,{maskOpacity:S=1}=t,{maskFrameOpacity:k=.95}=t,{maskMarkupOpacity:C=1}=t,{clipAnnotationsToImage:M=!0}=t,{pixelRatio:R=1}=t,{textPixelRatio:P=R}=t,{backgroundColor:E}=t,{willRender:I=Z}=t,{didRender:A=Z}=t,{willRequest:L}=t,{loadImageData:z=Z}=t,{enableGrid:D=!1}=t,{gridColors:O}=t,{gridSize:B}=t,{gridOpacity:W=0}=t,{images:V=[]}=t,{interfaceImages:_=[]}=t,{selectionColor:N}=t,H=null,j=null,U=null;const X=(e,t)=>e.set(t,{hard:!x}),Y={precision:1e-4*.01};let q=0;const K=lc(void 0,{duration:0});ar(e,K,(e=>o(35,u=e)));const J=dc(1,Y);ar(e,J,(e=>o(34,l=e)));const Q=dc(1,Y);ar(e,Q,(e=>o(50,a=e)));const ee=_a();ar(e,ee,(e=>o(52,d=e)));const te=_a();ar(e,te,(e=>o(51,s=e)));const oe={},ie=(e,t)=>{let o=oe[e.id];const i=Math.min(1,2048/t.width);let n=o?o.element:p("canvas",{width:t.width*i,height:t.height*i,"data-retain":!0});if(!o||((e,t)=>{if(e.total!==t.length)return!0;const o=e.last,i=t[t.length-1];return o.drawMode!==i.drawMode||!(!Ti(o)||Ti(i)&&pt(o,i))||!(!Mi(o)||Mi(i)&&o.x===i.x&&o.y===i.y&&o.rx===i.rx&&o.ry===i.ry)||!(!Pi(o)||Pi(i)&&i.points.length===o.points.length)})(o,e.actions)){n=n.cloneNode(),((e,t,o)=>{const{selectionColor:i=[1,1,1],scalar:n=1}=o||{};let r=!1;for(const o of t){const t="subtract"===o.drawMode;if(t&&!r)continue;e.globalCompositeOperation=t?"destination-out":"source-over",e.save(),e.beginPath();const a=Cn(o);wo(e,n,n),vo(e,o.rotation,a),Hn(e,o.flipX,o.flipY,a),o.width?On(e,{...o,backgroundColor:i}):o.points?Nn(e,Object.assign({},o,o.pathClose?{backgroundColor:i,strokeColor:[0,0,0,0]}:{strokeColor:i,strokeJoin:"round",strokeCap:"round"})):o.rx&&Bn(e,{...o,backgroundColor:i,strokeColor:[0,0,0,0],strokeJoin:"round",strokeCap:"round"}),e.restore(),r=!0}})(n.getContext("2d"),e.actions,{selectionColor:[1,0,1],scalar:i});const t=e.actions.length;oe[e.id]={total:t,last:{...e.actions[t-1]},element:n}}return{x:0,y:0,...t,fillColor:e.color||[1,1,1],backgroundImage:n}};let ne;const re=()=>{cancelAnimationFrame(ne),ne=requestAnimationFrame((()=>{Te=!0,We=0,r()}))},ae=new Map([]),se=new Map([]),le=(e,t)=>({filterParam:"pixelated"===e?H.textureFilterNearest:H.textureFilterLinear,wrapParam:"repeat"===t?H.textureRepeat:H.textureClamp}),ce=(e,t,o)=>{if(!ae.has(e)){ae.set(e,e);const n=le(t,o);if(!T(i=e)&&(ho(i)||$(i)||Mn(i)||eo(i))){const t=H.textureCreate();H.textureUpdate(t,e,n),ae.set(e,t)}else z(e).then((t=>{if(!H||!t)return;const o=H.textureCreate();H.textureUpdate(o,t,n),ae.set(e,o),re()})).catch((t=>{ae.set(e,t)}))}var i,n;if(eo(e)&&((n=e).currentTime>0&&!n.paused&&!n.ended&&n.readyState>2||"true"===e.dataset.redraw)){const i=ae.get(e),n=le(t,o);return H.textureUpdate(i,e,n),e.dataset.redraw=!1,i}return ae.get(e)},pe=new Map,me=(e,t)=>{let o;if(e.backgroundImage)o=ce(e.backgroundImage,e.backgroundImageRendering,"repeat"===e.backgroundRepeat?"repeat":void 0);else if(T(e.text)){if(e.width&&e.width<1||e.height&&e.height<1)return;o=((e,t={})=>{const o=t.id||e.id;if(!e.text.length)return void se.delete(o);let{text:i,textAlign:n,fontFamily:r,fontSize:a=16,fontWeight:s,fontVariant:l,fontStyle:c,letterSpacing:d,lineHeight:u=a,width:h,height:m}=e,{outline:g=0,blur:$=0,paddingTop:f=0,paddingRight:y=qo,paddingBottom:b=0,paddingLeft:x=qo}=t;h=Lo(h)?Math.floor(h):h,m=Lo(m)?Math.floor(m):m;const{textSize:v,signature:w}=((e="",t)=>{let{width:o=0,height:i="auto",fontSize:n,fontFamily:r,lineHeight:a,fontWeight:s,fontStyle:l,fontVariant:c,letterSpacing:d}=t;const u=Uo({text:e,fontFamily:r,fontWeight:s,fontStyle:l,fontVariant:c,fontSize:n,lineHeight:a,letterSpacing:d,width:o,height:i});let h=Qo.get(u);if(h)return h;let m=1;n>1e3&&F()&&(m=n/1e3,n=1e3,a*=m);const g=Zt(p("pre",{contenteditable:"true",spellcheck:"false",style:`${ti}${Ko({fontFamily:r,fontWeight:s,fontStyle:l,fontVariant:c,fontSize:n,letterSpacing:d,lineHeight:a})};${Jo(e,t)}"`,innerHTML:e})),$=g.getBoundingClientRect();return h={signature:ei(g).flat().map((e=>e.text)).join("_;_"),textSize:Ge(De($),(e=>Math.ceil(e*m)))},Qo.set(u,h),g.remove(),h})(i,{...e,width:h,height:void 0}),S=Uo({text:i,textAlign:n,fontFamily:r,fontSize:a,fontWeight:s,fontVariant:l,fontStyle:c,lineHeight:u,letterSpacing:d,outline:g,blur:$,signature:w});if(!ae.has(S)){ae.set(S,i);const e=Math.ceil(v.width),t=Math.ceil(v.height/u)*u;if(0===e||0===t)return;const p=jl(),w=Math.min(1,(p-(x+y)*P)/(e*P),(p-(f+b)*P)/(t*P));gi(i,{fontSize:a,fontFamily:r,fontWeight:s,fontVariant:l,fontStyle:c,letterSpacing:d,textAlign:n,lineHeight:u,width:h,height:m,imageWidth:e,imageHeight:t,paddingLeft:x,paddingTop:f,paddingRight:y,paddingBottom:b,pixelRatio:P*w,willRequest:L,outline:g,blur:$,color:[1,0,1]}).then((e=>{if(!H)return;const t=H.textureCreate();H.textureUpdate(t,e,{filterParam:H.textureFilterLinear,wrapParam:H.textureClamp,scalar:w}),ae.set(S,t),se.set(o,t),re()})).catch(console.error)}const k=ae.get(S);return Ac(k)?k:se.get(o)})(e,t)}else e.bitmap&&e.points&&(o=(e=>{const{id:t,points:o,strokeWidth:i,strokeCap:n,strokeJoin:r,strokeColor:a}=e;let s=ae.get(t),l=pe.get(t);const c=Uo({points:o.map((e=>`${e.x},${e.y}`)).join(","),strokeWidth:i,strokeCap:n,strokeJoin:r,strokeColor:a});if(l){const{hash:e}=l;if(ae.has(t)){if(c===e)return ae.get(t)}else l=void 0}if(!l){const o=p("canvas",{width:1,height:1});l={canvas:o,hash:void 0},pe.set(e.id,l),s=H.textureCreate(),H.textureUpdate(s,o,{filterParam:H.textureFilterLinear,wrapParam:H.textureClamp}),ae.set(t,s)}const{canvas:d}=l,u=Math.ceil(e.strokeWidth),h=it(o),m=Math.floor(h.x)-.5*u,g=Math.floor(h.y)-.5*u,$=Math.ceil(h.width+u),f=Math.ceil(h.height+u);d.width=Math.max($,1),d.height=Math.max(f,1);const y=d.getContext("2d");return y.clearRect(0,0,d.width,d.height),$>=1&&f>=1&&(y.translate(-m,-g),Nn(y,e),y.resetTransform()),H.textureUpdate(s,d,{filterParam:H.textureFilterLinear,wrapParam:H.textureClamp}),pe.set(t,{canvas:d,hash:c}),ae.get(t)})(e));return o},ge=({texture:e,size:t,origin:o,translation:i,rotation:n,scale:r,colorMatrix:a,opacity:s,convolutionMatrix:l,gamma:c,vignette:d,maskFeather:u,maskCornerRadius:h,overlayColor:p,enableOverlay:m,enableManipulation:g,enableAntialiasing:$})=>{let f=0,y=0;if(1===R){const e=Math.abs(1-r)<Number.EPSILON;f=e&&j%2!=0?.5:0,y=e&&U%2!=0?.5:0}return H.drawImage(e,t,o.x,o.y,i.x+f,i.y+y,n.x,n.y,n.z,r,a,ss(s,0,1),l,c,d,u,h,p,m,g,$),e},fe=(e,t,o,i,n,r,a,s,l)=>{const c={...t},d={width:n.width/P*o,height:n.height/P*o},u=he(0,0),h={width:d.width,height:d.height};return c.x-=l*o,c.y-=r*o,e.width?(c.height=c.height?c.height+r*o/i:d.height,c.width+=(l+a)*o/i,"center"===e.textAlign?u.x=.5*(c.width-h.width/i):"right"===e.textAlign&&(u.x=c.width-h.width/i)):(c.width=d.width,c.height=d.height),{rect:c,backgroundPosition:u,backgroundSize:h}},ye=(e=[],t)=>{e.forEach((e=>{let o=me(e);const i="complete"!==e.status&&("loading"===e.status||e.backgroundImage&&o===e.backgroundImage);i&&re();const n="error"===e.status||e.backgroundImage&&o instanceof Error;let r=Ac(o)?o:void 0;const a=e._scale||1,s=e._translate||m,l=e.strokeWidth&&e.strokeWidth*a,c=!!e.width,d=!c&&T(e.text)&&r,u=Do(e.points),h=Mi(e);if(u){const i=e.points.map((e=>he(e.x*a+s.x,e.y*a+s.y)));if(e.bitmap){o&&t.push(o);const n=it(i),s=Math.ceil(e.strokeWidth*a);H.drawRect({x:Math.floor(n.x)-.5*s,y:Math.floor(n.y)-.5*s,width:Math.ceil(n.width+s),height:Math.ceil(n.height+s)},e.rotation,e.flipX,e.flipY,[0,0,0,0],void 0,r,void 0,void 0,void 0,void 0,void 0,void 0,e.opacity,void 0,void 0,!1,!1)}else H.drawPath(i,e.rotation,e.flipX,e.flipY,l,e.strokeColor,e.pathClose,e.backgroundColor,e.opacity)}else if(h){let c=e.x,d=e.y;c*=a,d*=a,c+=s.x,d+=s.y;const u=he(c,d);H.drawEllipse(u,e.rx*a,e.ry*a,e.rotation,e.flipX,e.flipY,e.backgroundColor,r,void 0,void 0,e.backgroundCorners&&Lc(e.backgroundCorners),l,e.strokeColor,e.opacity,e.inverted),o&&t.push(o),(i||n)&&(e.backgroundColor||e.strokeColor&&e.strokeWidth||H.drawEllipse(u,e.rx*a,e.ry*a,e.rotation,e.flipX,e.flipY,n?[1,0,0,.25*e.opacity]:[0,0,0,.25*e.opacity]),n&&ke(u),i&&Se(u))}else if(d||c){const c=r&&H.textureGetSize(r);let d,u,h,p=e.fillColor,m=e.backgroundColor,g=e.strokeColor,$=[e.cornerRadius,e.cornerRadius,e.cornerRadius,e.cornerRadius].map((e=>e*a));d=e.width?ot(e):{x:e.x,y:e.y,...c},a&&s&&(d.x*=a,d.y*=a,d.x+=s.x,d.y+=s.y,d.width*=a,d.height*=a),o&&t.push(o);const{backgroundRepeat:f="no-repeat"}=e;if(c)if(e.backgroundImage&&(e.backgroundSize||e.backgroundPosition||e.backgroundRepeat)){const t=G(c.width,c.height);if("repeat"===e.backgroundRepeat&&(u={...c},h={x:0,y:0}),"contain"===e.backgroundSize){const o=vt(d,t,d);u=Oe(o),h=e.backgroundPosition?e.backgroundPosition:he(.5*(d.width-u.width),.5*(d.height-u.height))}else if("cover"===e.backgroundSize){const o=xt(d,t,d);u=Oe(o),e.backgroundPosition?h=e.backgroundPosition:(h=he(o.x,o.y),h=he(.5*(d.width-u.width),.5*(d.height-u.height)))}else e.backgroundSize?(u=e.backgroundSize,h=e.backgroundPosition||{x:0,y:0}):e.backgroundPosition&&(u={...c},h=e.backgroundPosition)}else if(e.text){const o={...d};if(e.backgroundColor||e.strokeColor){m=void 0,g=void 0;const t={width:c.width/P,height:c.height/P},o=(e.width||t.width-2*qo)*a,i=(e.height||t.height)*a;H.drawRect({...d,width:o,height:i},e.rotation,e.flipX,e.flipY,$,e.backgroundColor,void 0,void 0,void 0,!1,void 0,l,e.strokeColor,e.opacity,void 0,void 0,void 0,e.inverted)}let i=1;e.fontSize>1e3&&F()&&(i=e.fontSize/1e3),p=e.color||[0,0,0],e._prerender&&(p[3]=0);const n=fe(e,o,a,i,c,0,qo,0,qo);d=n.rect,h=n.backgroundPosition,u=n.backgroundSize;const{textShadowX:r,textShadowY:s,textShadowBlur:f}=e;if(r||s||f){const n=Math.ceil(.5*f),l=n,c=Math.max(qo,n),u=n,h=Math.max(qo,n),p=me(e,{id:e.id+"shadow",blur:f,paddingTop:l,paddingRight:c,paddingBottom:u,paddingLeft:h});if(p&&!e._prerender){t.push(p);const n=H.textureGetSize(p),{rect:u,backgroundPosition:m,backgroundSize:g}=fe(e,o,a,i,n,l,c,0,h),$=st(d),f=st(u);f.x+=r,f.y+=s;const y=$e(f,e.rotation,$),b={x:y.x-.5*u.width,y:y.y-.5*u.height,width:u.width,height:u.height};e.height&&(b.height-=s),H.drawRect(b,e.rotation,e.flipX,e.flipY,[0,0,0,0],void 0,p,g,m,!1,void 0,void 0,void 0,e.opacity,void 0,0,e.textShadowColor)}}if(e.textOutlineWidth){const n=Math.ceil(.5*e.textOutlineWidth),r=n,s=qo+n,l=n,c=qo+n,d=me(e,{id:e.id+"outline",outline:e.textOutlineWidth,paddingTop:r,paddingRight:s,paddingBottom:l,paddingLeft:c});if(d&&!e._prerender){const n=H.textureGetSize(d);t.push(d);const{rect:l,backgroundPosition:u,backgroundSize:h}=fe(e,o,a,i,n,r,s,0,c);H.drawRect(l,e.rotation,e.flipX,e.flipY,[0,0,0,0],void 0,d,h,u,!1,void 0,void 0,void 0,e.opacity,void 0,0,e.textOutlineColor)}}}if(H.drawRect(d,e.rotation,e.flipX,e.flipY,$,m,r,u,h,"repeat"===f,e.backgroundCorners&&Lc(e.backgroundCorners),l,g,e.opacity,void 0,e.feather,p,e.inverted),i||n){e.backgroundColor&&0!==e.backgroundColor[3]||e.strokeColor&&e.strokeWidth||H.drawRect(d,e.rotation,e.flipX,e.flipY,$,n?[1,.2549,.2118,.25*e.opacity]:[0,0,0,.25*e.opacity]);const t=st(d);n&&ke(t),i&&Se(t)}}else o&&t.push(o)}))};let be=0;const xe=[{x:-5,y:-5},{x:5,y:5}],ve=[{x:5,y:-5},{x:-5,y:5}],we=zt({x:0,y:0},10,10,0,!1,!1,16);we.length=9;const Se=e=>{be=Date.now()/50,H.drawEllipse(e,15,15,0,!1,!1,[0,0,0,.5]);const t=Le(we.map((t=>({x:t.x+e.x,y:t.y+e.y}))),be,e.x,e.y);H.drawPath(t,0,!1,!1,2,[1,1,1])},ke=e=>{H.drawEllipse(e,13,13,0,!1,!1,[1,.2549,.2118,.75]);const t=xe.map((t=>({x:t.x+e.x,y:t.y+e.y}))),o=ve.map((t=>({x:t.x+e.x,y:t.y+e.y})));H.drawPath(t,0,!1,!1,3,[1,1,1]),H.drawPath(o,0,!1,!1,3,[1,1,1])},Ce=(e,t,o,i,n,r)=>H.drawRect(t,0,!1,!1,h,h,e,i,o,!0,void 0,0,void 0,r,void 0,void 0,n);let Te=!1,Me=!0,Re=!1;const Pe=[],Ee=[],Ie=[],Ae=e=>!e.aboveFrame,ze=e=>e.aboveFrame,Fe=()=>{Ie.length=0;const e=V[0],{manipulationShapes:t,manipulationShapesDirty:o,annotationShapes:i,annotationShapesDirty:n,interfaceShapes:r,decorationShapes:c,frameShapes:p,selectionShapes:m}=I({opacity:e.opacity,rotation:e.rotation,scale:e.scale,images:V,size:Ve(j,U),backgroundColor:[...u],selectionRect:d}),g=[...u],$=d,y=ss(l,0,1),b=s,x=Math.abs(e.rotation.x/Math.PI*2-1),S=Math.abs(e.rotation.y/Math.PI*2-1),k=x<.99||S<.99,T={...e.size},R=e.backgroundColor,E=e.backgroundImage,L=t.length>0,z=i.length>0,F=i.filter(ze).length>0,G=c.filter(ze).length>0,Z=R[3]>0,X=!!M&&C>=1;if(y<1&&Z){const e=g[0],t=g[1],o=g[2],i=1-y,n=R[0]*i,r=R[1]*i,a=R[2]*i,s=1-i;g[0]=n+e*s,g[1]=r+t*s,g[2]=a+o*s,g[3]=1}if(H.setCanvasColor(v?h:g),L&&(o||Te)?(H.disableMask(),H.drawToImageBlendBuffer(T),Pe.length=0,ye(t,Pe)):L||(Pe.length=0),Ie.push(...Pe),Me&&(H.drawToImageOverlayBuffer(T,P),Me=!1),k){if(z&&(n||Te)||!Re){H.disableMask(),H.drawToImageOverlayBuffer(T,P),Ee.length=0;const e=F?i.filter(Ae):i;ye(e,Ee)}else z||(Ee.length=0);Re=!0}else Re=!1;if(H.drawToCanvas(),H.enableMask($,y),D&&B>=1&&2===O.length&&W&&((e,t,o,i,n)=>{const r=Ve(t,t),a=ce(f,"pixelated","repeat"),s=he(-e.x%t,-e.y%t),l=he(s.x+.5*r.width,s.y);Ce(a,e,s,r,o,n),Ce(a,e,l,r,i,n)})($,B,O[0],O[1],W),Z&&H.drawRect($,0,!1,!1,h,R),E){H.enableMask($,1);const e=Math.max(w.width/E.width,w.height/E.height),t=E.width*e,o=E.height*e,i={x:w.x+.5*w.width-.5*t,y:w.y+.5*w.height-.5*o,width:t,height:o};H.drawRect(i,0,!1,!1,h,h,ce(E,"linear")),H.enableMask($,y)}if(X&&H.enablePreviewStencil(),Ie.push(...[...V].reverse().map((e=>ge({...e,texture:ce(e.data),enableOverlay:k&&z,enableManipulation:L,enableAntialiasing:!0,mask:$,maskOpacity:y,overlayColor:b})))),H.enableMask($,C),!k){X&&H.applyPreviewStencil(),H.resetCanvasMatrix(),H.updateCanvasMatrix(T,e.origin,e.translation,e.scale,e.rotation),Ee.length=0;const t=F?i.filter(Ae):i;ye(t,Ee),X&&H.disablePreviewStencil()}if(Ie.push(...Ee),H.resetCanvasMatrix(),H.enableMask($,C),ye(c,G?c.filter(Ae):c),p.length){H.enableMask($,1);const e=p.filter((e=>!e.expandsCanvas)),t=p.filter((e=>e.expandsCanvas));e.length&&ye(e,Ie),t.length&&(H.enableMask({x:$.x+.5,y:$.y+.5,width:$.width-1,height:$.height-1},a),ye(t,Ie))}if(F&&(H.resetCanvasMatrix(),H.updateCanvasMatrix(T,e.origin,e.translation,e.scale,e.rotation),ye(i.filter(ze),Ie),H.resetCanvasMatrix()),G&&(H.resetCanvasMatrix(),ye(c.filter(ze),Ie),H.resetCanvasMatrix()),N&&m.length&&!k){H.resetCanvasMatrix(),H.updateCanvasMatrix(T,e.origin,e.translation,e.scale,e.rotation);const t=[...N];t[3]=.5;const o=[{id:"selection",color:t,actions:[...m]}].map((e=>ie(e,T)));ye(o,Ie),H.resetCanvasMatrix()}H.disableMask(),ye(r,Ie),_.forEach((e=>{if(H.enableMask(e.mask,e.maskOpacity),e.backgroundColor){const t=E&&xt({...e.mask},E.width/E.height),o=E&&ce(E,"linear");H.drawRect(e.mask,0,!1,!1,e.maskCornerRadius,e.backgroundColor,o,t,t,void 0,void 0,void 0,void 0,e.opacity,e.maskFeather),o&&Ie.push(o)}const t=ge({...e,texture:ce(e.data),enableAntialiasing:!1,translation:{x:e.translation.x+e.offset.x-.5*j,y:e.translation.y+e.offset.y-.5*U}});Ie.push(t)})),H.disableMask(),(e=>{ae.forEach(((t,o)=>{!e.find((e=>e===t))&&Ac(t)&&(Array.from(se.values()).includes(t)||(ae.delete(o),H.textureDelete(t)))}))})(Ie),A(),Te=!1};let Be,We=0;const _e=()=>{clearTimeout(Be);const e=Date.now();e-We<48?Be=setTimeout(_e,48):(We=e,Fe())};return Kr((()=>r())),qr((()=>o(30,H=ec(b,{alpha:v})))),Jr((()=>{H&&(pe.forEach((({canvas:e})=>g(e))),pe.clear(),H.release(),o(30,H=void 0),o(0,b=void 0))})),e.$$set=e=>{"isAnimated"in e&&o(9,x=e.isAnimated),"isTransparent"in e&&o(10,v=e.isTransparent),"maskRect"in e&&o(11,w=e.maskRect),"maskOpacity"in e&&o(12,S=e.maskOpacity),"maskFrameOpacity"in e&&o(13,k=e.maskFrameOpacity),"maskMarkupOpacity"in e&&o(14,C=e.maskMarkupOpacity),"clipAnnotationsToImage"in e&&o(15,M=e.clipAnnotationsToImage),"pixelRatio"in e&&o(16,R=e.pixelRatio),"textPixelRatio"in e&&o(17,P=e.textPixelRatio),"backgroundColor"in e&&o(18,E=e.backgroundColor),"willRender"in e&&o(19,I=e.willRender),"didRender"in e&&o(20,A=e.didRender),"willRequest"in e&&o(21,L=e.willRequest),"loadImageData"in e&&o(22,z=e.loadImageData),"enableGrid"in e&&o(23,D=e.enableGrid),"gridColors"in e&&o(24,O=e.gridColors),"gridSize"in e&&o(25,B=e.gridSize),"gridOpacity"in e&&o(26,W=e.gridOpacity),"images"in e&&o(27,V=e.images),"interfaceImages"in e&&o(28,_=e.interfaceImages),"selectionColor"in e&&o(29,N=e.selectionColor)},e.$$.update=()=>{if(1&e.$$.dirty[0]&&b){const e=getComputedStyle(b).getPropertyValue("--color-transition-duration");o(31,q=(e=>{let t=parseFloat(e);return/^[0-9]+s$/.test(e)?1e3*t:t})(e))}262656&e.$$.dirty[0]|1&e.$$.dirty[1]&&E&&K.set(E,{duration:x?q:0}),4096&e.$$.dirty[0]&&X(J,Lo(S)?S:1),8192&e.$$.dirty[0]&&X(Q,Lo(k)?k:1),2048&e.$$.dirty[0]&&w&&ee.set(w),24&e.$$.dirty[1]&&u&&te.set([u[0],u[1],u[2],ss(l,0,1)]),1207959558&e.$$.dirty[0]&&o(33,i=!!(H&&j&&U&&V.length)),1073807366&e.$$.dirty[0]&&j&&U&&H&&(We=0,H.resize(j,U,R)),4&e.$$.dirty[1]&&o(32,r=i?Ic()?_e:Fe:n),6&e.$$.dirty[1]&&i&&r&&r()},[b,j,U,y,K,J,Q,ee,te,x,v,w,S,k,C,M,R,P,E,I,A,L,z,D,O,B,W,V,_,N,H,q,r,i,l,u,function(e){na[e?"unshift":"push"]((()=>{b=e,o(0,b)}))},e=>{o(1,j=e.detail.width),o(2,U=e.detail.height),y("measure",{width:j,height:U})}]}class Dc extends Ba{constructor(e){super(),Oa(this,e,Fc,zc,ir,{isAnimated:9,isTransparent:10,maskRect:11,maskOpacity:12,maskFrameOpacity:13,maskMarkupOpacity:14,clipAnnotationsToImage:15,pixelRatio:16,textPixelRatio:17,backgroundColor:18,willRender:19,didRender:20,willRequest:21,loadImageData:22,enableGrid:23,gridColors:24,gridSize:25,gridOpacity:26,images:27,interfaceImages:28,selectionColor:29},null,[-1,-1,-1])}}var Oc=(e,t=Boolean,o=" ")=>e.filter(t).join(o);function Bc(e,t,o){const i=e.slice();return i[17]=t[o],i}const Wc=e=>({tab:4&e}),Vc=e=>({tab:e[17]});function _c(e){let t,o,i,n=[],r=new Map,a=e[2];const s=e=>e[17].id;for(let t=0;t<a.length;t+=1){let o=Bc(e,a,t),i=s(o);r.set(i,n[t]=Nc(i,o))}return{c(){t=Mr("ul");for(let e=0;e<n.length;e+=1)n[e].c();Fr(t,"class",o=Oc(["PinturaTabList",e[0]])),Fr(t,"role","tablist"),Fr(t,"data-layout",e[1])},m(o,r){Cr(o,t,r);for(let e=0;e<n.length;e+=1)n[e].m(t,null);e[14](t),i=!0},p(e,l){1124&l&&(a=e[2],va(),n=Ea(n,l,s,1,e,a,r,t,Pa,Nc,null,Bc),wa()),(!i||1&l&&o!==(o=Oc(["PinturaTabList",e[0]])))&&Fr(t,"class",o),(!i||2&l)&&Fr(t,"data-layout",e[1])},i(e){if(!i){for(let e=0;e<a.length;e+=1)Sa(n[e]);i=!0}},o(e){for(let e=0;e<n.length;e+=1)ka(n[e]);i=!1},d(o){o&&Tr(t);for(let e=0;e<n.length;e+=1)n[e].d();e[14](null)}}}function Nc(e,t){let o,i,n,r,a,s,l,c,d,u;const h=t[11].default,p=sr(h,t,t[10],Vc);function m(...e){return t[12](t[17],...e)}function g(...e){return t[13](t[17],...e)}return{key:e,first:null,c(){o=Mr("li"),i=Mr("button"),p&&p.c(),r=Er(),Fr(i,"type","button"),i.disabled=n=t[17].disabled,Fr(o,"role","tab"),Fr(o,"aria-controls",a=t[17].href.substr(1)),Fr(o,"id",s=t[17].tabId),Fr(o,"aria-selected",l=t[17].selected),this.first=o},m(e,t){Cr(e,o,t),wr(o,i),p&&p.m(i,null),wr(o,r),c=!0,d||(u=[Ar(i,"keydown",m),Ar(i,"click",g)],d=!0)},p(e,r){t=e,p&&p.p&&(!c||1028&r)&&dr(p,h,t,t[10],c?cr(h,t[10],r,Wc):ur(t[10]),Vc),(!c||4&r&&n!==(n=t[17].disabled))&&(i.disabled=n),(!c||4&r&&a!==(a=t[17].href.substr(1)))&&Fr(o,"aria-controls",a),(!c||4&r&&s!==(s=t[17].tabId))&&Fr(o,"id",s),(!c||4&r&&l!==(l=t[17].selected))&&Fr(o,"aria-selected",l)},i(e){c||(Sa(p,e),c=!0)},o(e){ka(p,e),c=!1},d(e){e&&Tr(o),p&&p.d(e),d=!1,tr(u)}}}function Hc(e){let t,o,i=e[4]&&_c(e);return{c(){i&&i.c(),t=Ir()},m(e,n){i&&i.m(e,n),Cr(e,t,n),o=!0},p(e,[o]){e[4]?i?(i.p(e,o),16&o&&Sa(i,1)):(i=_c(e),i.c(),Sa(i,1),i.m(t.parentNode,t)):i&&(va(),ka(i,1,1,(()=>{i=null})),wa())},i(e){o||(Sa(i),o=!0)},o(e){ka(i),o=!1},d(e){i&&i.d(e),e&&Tr(t)}}}function jc(e,t,o){let i,n,r,{$$slots:a={},$$scope:s}=t,{class:l}=t,{name:c}=t,{selected:d}=t,{tabs:u=[]}=t,{layout:h}=t;const p=Qr(),m=e=>{const t=r.querySelectorAll('[role="tab"] button')[e];t&&t.focus()},g=(e,t)=>{e.preventDefault(),e.stopPropagation(),p("select",t)},$=({key:e},t)=>{if(!/arrow/i.test(e))return;const o=u.findIndex((e=>e.id===t));return/right|down/i.test(e)?m(o<u.length-1?o+1:0):/left|up/i.test(e)?m(o>0?o-1:u.length-1):void 0};return e.$$set=e=>{"class"in e&&o(0,l=e.class),"name"in e&&o(7,c=e.name),"selected"in e&&o(8,d=e.selected),"tabs"in e&&o(9,u=e.tabs),"layout"in e&&o(1,h=e.layout),"$$scope"in e&&o(10,s=e.$$scope)},e.$$.update=()=>{896&e.$$.dirty&&o(2,i=u.map((e=>{const t=e.id===d;return{...e,tabId:`tab-${c}-${e.id}`,href:`#panel-${c}-${e.id}`,selected:t}}))),4&e.$$.dirty&&o(4,n=i.length>1)},[l,h,i,r,n,g,$,c,d,u,s,a,(e,t)=>$(t,e.id),(e,t)=>g(t,e.id),function(e){na[e?"unshift":"push"]((()=>{r=e,o(3,r)}))}]}class Uc extends Ba{constructor(e){super(),Oa(this,e,jc,Hc,ir,{class:0,name:7,selected:8,tabs:9,layout:1})}}const Gc=e=>({panel:16&e}),Zc=e=>({panel:e[4][0].id,panelIsActive:!0});function Xc(e,t,o){const i=e.slice();return i[14]=t[o].id,i[15]=t[o].shouldDraw,i[16]=t[o].panelId,i[17]=t[o].tabindex,i[18]=t[o].labelledBy,i[19]=t[o].isActive,i[20]=t[o].hidden,i[3]=t[o].visible,i}const Yc=e=>({panel:16&e,panelIsActive:16&e}),qc=e=>({panel:e[14],panelIsActive:e[19]});function Kc(e){let t,o,i,n,r,a;const s=e[11].default,l=sr(s,e,e[10],Zc);return{c(){t=Mr("div"),o=Mr("div"),l&&l.c(),Fr(o,"class",i=Oc([e[1]])),Fr(t,"class",e[0]),Fr(t,"style",e[2])},m(i,s){Cr(i,t,s),wr(t,o),l&&l.m(o,null),n=!0,r||(a=[Ar(t,"measure",e[13]),gr(Tc.call(null,t))],r=!0)},p(e,r){l&&l.p&&(!n||1040&r)&&dr(l,s,e,e[10],n?cr(s,e[10],r,Gc):ur(e[10]),Zc),(!n||2&r&&i!==(i=Oc([e[1]])))&&Fr(o,"class",i),(!n||1&r)&&Fr(t,"class",e[0]),(!n||4&r)&&Fr(t,"style",e[2])},i(e){n||(Sa(l,e),n=!0)},o(e){ka(l,e),n=!1},d(e){e&&Tr(t),l&&l.d(e),r=!1,tr(a)}}}function Jc(e){let t,o,i,n,r,a=[],s=new Map,l=e[4];const c=e=>e[14];for(let t=0;t<l.length;t+=1){let o=Xc(e,l,t),i=c(o);s.set(i,a[t]=ed(i,o))}return{c(){t=Mr("div");for(let e=0;e<a.length;e+=1)a[e].c();Fr(t,"class",o=Oc(["PinturaTabPanels",e[0]])),Fr(t,"style",e[2])},m(o,s){Cr(o,t,s);for(let e=0;e<a.length;e+=1)a[e].m(t,null);i=!0,n||(r=[Ar(t,"measure",e[12]),gr(Tc.call(null,t,{observePosition:!0}))],n=!0)},p(e,n){1042&n&&(l=e[4],va(),a=Ea(a,n,c,1,e,l,s,t,Pa,ed,null,Xc),wa()),(!i||1&n&&o!==(o=Oc(["PinturaTabPanels",e[0]])))&&Fr(t,"class",o),(!i||4&n)&&Fr(t,"style",e[2])},i(e){if(!i){for(let e=0;e<l.length;e+=1)Sa(a[e]);i=!0}},o(e){for(let e=0;e<a.length;e+=1)ka(a[e]);i=!1},d(e){e&&Tr(t);for(let e=0;e<a.length;e+=1)a[e].d();n=!1,tr(r)}}}function Qc(e){let t;const o=e[11].default,i=sr(o,e,e[10],qc);return{c(){i&&i.c()},m(e,o){i&&i.m(e,o),t=!0},p(e,n){i&&i.p&&(!t||1040&n)&&dr(i,o,e,e[10],t?cr(o,e[10],n,Yc):ur(e[10]),qc)},i(e){t||(Sa(i,e),t=!0)},o(e){ka(i,e),t=!1},d(e){i&&i.d(e)}}}function ed(e,t){let o,i,n,r,a,s,l,c,d,u=t[15]&&Qc(t);return{key:e,first:null,c(){o=Mr("div"),u&&u.c(),i=Er(),Fr(o,"class",n=Oc(["PinturaTabPanel",t[1]])),o.hidden=r=t[20],Fr(o,"id",a=t[16]),Fr(o,"tabindex",s=t[17]),Fr(o,"aria-labelledby",l=t[18]),Fr(o,"data-inert",c=!t[3]),this.first=o},m(e,t){Cr(e,o,t),u&&u.m(o,null),wr(o,i),d=!0},p(e,h){(t=e)[15]?u?(u.p(t,h),16&h&&Sa(u,1)):(u=Qc(t),u.c(),Sa(u,1),u.m(o,i)):u&&(va(),ka(u,1,1,(()=>{u=null})),wa()),(!d||2&h&&n!==(n=Oc(["PinturaTabPanel",t[1]])))&&Fr(o,"class",n),(!d||16&h&&r!==(r=t[20]))&&(o.hidden=r),(!d||16&h&&a!==(a=t[16]))&&Fr(o,"id",a),(!d||16&h&&s!==(s=t[17]))&&Fr(o,"tabindex",s),(!d||16&h&&l!==(l=t[18]))&&Fr(o,"aria-labelledby",l),(!d||16&h&&c!==(c=!t[3]))&&Fr(o,"data-inert",c)},i(e){d||(Sa(u),d=!0)},o(e){ka(u),d=!1},d(e){e&&Tr(o),u&&u.d()}}}function td(e){let t,o,i,n;const r=[Jc,Kc],a=[];function s(e,t){return e[5]?0:1}return t=s(e),o=a[t]=r[t](e),{c(){o.c(),i=Ir()},m(e,o){a[t].m(e,o),Cr(e,i,o),n=!0},p(e,[n]){let l=t;t=s(e),t===l?a[t].p(e,n):(va(),ka(a[l],1,1,(()=>{a[l]=null})),wa(),o=a[t],o?o.p(e,n):(o=a[t]=r[t](e),o.c()),Sa(o,1),o.m(i.parentNode,i))},i(e){n||(Sa(o),n=!0)},o(e){ka(o),n=!1},d(e){a[t].d(e),e&&Tr(i)}}}function od(e,t,o){let i,n,{$$slots:r={},$$scope:a}=t,{class:s}=t,{name:l}=t,{selected:c}=t,{panelClass:d}=t,{panels:u=[]}=t,{visible:h}=t,{style:p}=t;const m={};return e.$$set=e=>{"class"in e&&o(0,s=e.class),"name"in e&&o(6,l=e.name),"selected"in e&&o(7,c=e.selected),"panelClass"in e&&o(1,d=e.panelClass),"panels"in e&&o(8,u=e.panels),"visible"in e&&o(3,h=e.visible),"style"in e&&o(2,p=e.style),"$$scope"in e&&o(10,a=e.$$scope)},e.$$.update=()=>{968&e.$$.dirty&&o(4,i=u.map((e=>{const t=e===c;t&&o(9,m[e]=!0,m);const i=h?-1!==h.indexOf(e):t;return{id:e,panelId:`panel-${l}-${e}`,labelledBy:`tab-${l}-${e}`,isActive:t,hidden:!t,visible:i,tabindex:t?0:-1,shouldDraw:t||m[e]}}))),16&e.$$.dirty&&o(5,n=i.length>1)},[s,d,p,h,i,n,l,c,u,m,a,r,function(t){oa.call(this,e,t)},function(t){oa.call(this,e,t)}]}class id extends Ba{constructor(e){super(),Oa(this,e,od,td,ir,{class:0,name:6,selected:7,panelClass:1,panels:8,visible:3,style:2})}}var nd=e=>{const t=Object.getOwnPropertyDescriptors(e.prototype);return Object.keys(t).filter((e=>!!t[e].get))};function rd(e){let t,o,i,n;const r=[e[5],{locale:e[1]}];function a(t){e[22](t)}var s=e[10];function l(e){let t={};for(let e=0;e<r.length;e+=1)t=Jn(t,r[e]);return void 0!==e[3]&&(t.name=e[3]),{props:t}}return s&&(t=Nr(s,l(e)),na.push((()=>La(t,"name",a))),e[23](t),t.$on("measure",e[11])),{c(){t&&za(t.$$.fragment),i=Ir()},m(e,o){t&&Fa(t,e,o),Cr(e,i,o),n=!0},p(e,n){const c=34&n[0]?Ia(r,[32&n[0]&&Aa(e[5]),2&n[0]&&{locale:e[1]}]):{};if(!o&&8&n[0]&&(o=!0,c.name=e[3],ha((()=>o=!1))),s!==(s=e[10])){if(t){va();const e=t;ka(e.$$.fragment,1,0,(()=>{Da(e,1)})),wa()}s?(t=Nr(s,l(e)),na.push((()=>La(t,"name",a))),e[23](t),t.$on("measure",e[11]),za(t.$$.fragment),Sa(t.$$.fragment,1),Fa(t,i.parentNode,i)):t=null}else s&&t.$set(c)},i(e){n||(t&&Sa(t.$$.fragment,e),n=!0)},o(e){t&&ka(t.$$.fragment,e),n=!1},d(o){e[23](null),o&&Tr(i),t&&Da(t,o)}}}function ad(e){let t,o,i,n=e[6]&&rd(e);return{c(){t=Mr("div"),n&&n.c(),Fr(t,"data-util",e[3]),Fr(t,"class",o=Oc(["PinturaUtilPanel",e[2]])),Fr(t,"style",e[7])},m(o,r){Cr(o,t,r),n&&n.m(t,null),e[24](t),i=!0},p(e,r){e[6]?n?(n.p(e,r),64&r[0]&&Sa(n,1)):(n=rd(e),n.c(),Sa(n,1),n.m(t,null)):n&&(va(),ka(n,1,1,(()=>{n=null})),wa()),(!i||8&r[0])&&Fr(t,"data-util",e[3]),(!i||4&r[0]&&o!==(o=Oc(["PinturaUtilPanel",e[2]])))&&Fr(t,"class",o),(!i||128&r[0])&&Fr(t,"style",e[7])},i(e){i||(Sa(n),i=!0)},o(e){ka(n),i=!1},d(o){o&&Tr(t),n&&n.d(),e[24](null)}}}function sd(e,t,o){let i,n,r,a,s;const l=Qr();let{isActive:c=!0}=t,{stores:d}=t,{view:u}=t,{props:h}=t,{component:p}=t,{locale:m}=t,{class:g}=t;const $=ta("isAnimated");let f;ar(e,$,(e=>o(21,s=e)));const y=dc(0),b=Na(y,(e=>ss(e,0,1)));ar(e,b,(e=>o(20,a=e)));let x=!c;const v=_a(c),w={isActive:Na(v,(async(e,t)=>{if(!e)return t(e);await da(),t(e)}),!1),isActiveFraction:Na(b,(e=>e)),isVisible:Na(b,(e=>e>0))},S=u,k=nd(S),C=Object.keys(h||{}).reduce(((e,t)=>k.includes(t)?(e[t]=h[t],e):e),{}),T=Object.keys(w).reduce(((e,t)=>k.includes(t)?(e[t]=w[t],e):e),{});let M,R;const P=e=>{o(17,f={...e.detail}),I&&c&&l("measure",{...f})};ea("measurable",Tc);const E=Yr().$$.context;let I=!1;return qr((()=>{if(o(19,I=!0),r)return;o(0,p=new S({target:R,props:{...n,locale:m},context:E})),o(3,M=p.name);const e=p.$on("measure",P);return()=>{e(),p.$destroy()}})),e.$$set=e=>{"isActive"in e&&o(12,c=e.isActive),"stores"in e&&o(13,d=e.stores),"view"in e&&o(14,u=e.view),"props"in e&&o(15,h=e.props),"component"in e&&o(0,p=e.component),"locale"in e&&o(1,m=e.locale),"class"in e&&o(2,g=e.class)},e.$$.update=()=>{135169&e.$$.dirty[0]&&f&&c&&p&&l("measure",f),2101248&e.$$.dirty[0]&&y.set(c?1:0,{hard:!1===s}),1310720&e.$$.dirty[0]&&(a<=0&&!x?o(18,x=!0):a>0&&x&&o(18,x=!1)),786432&e.$$.dirty[0]&&I&&l(x?"hide":"show"),1048576&e.$$.dirty[0]&&l("fade",a),1048576&e.$$.dirty[0]&&o(7,i=a<1?"opacity: "+a:void 0),4096&e.$$.dirty[0]&&v.set(c),8192&e.$$.dirty[0]&&o(5,n={...C,...T,stores:d})},o(6,r=!k.includes("external")),[p,m,g,M,R,n,r,i,$,b,S,P,c,d,u,h,y,f,x,I,a,s,function(e){M=e,o(3,M)},function(e){na[e?"unshift":"push"]((()=>{p=e,o(0,p)}))},function(e){na[e?"unshift":"push"]((()=>{R=e,o(4,R)}))}]}class ld extends Ba{constructor(e){super(),Oa(this,e,sd,ad,ir,{isActive:12,stores:13,view:14,props:15,component:0,locale:1,class:2,opacity:16},null,[-1,-1])}get opacity(){return this.$$.ctx[16]}}function cd(e){let t,o,i;const n=e[5].default,r=sr(n,e,e[4],null);return{c(){t=Rr("svg"),r&&r.c(),Fr(t,"class",e[3]),Fr(t,"style",e[2]),Fr(t,"width",e[0]),Fr(t,"height",e[1]),Fr(t,"viewBox",o="0 0 "+e[0]+"\n "+e[1]),Fr(t,"xmlns","http://www.w3.org/2000/svg"),Fr(t,"aria-hidden","true"),Fr(t,"focusable","false"),Fr(t,"stroke-linecap","round"),Fr(t,"stroke-linejoin","round")},m(e,o){Cr(e,t,o),r&&r.m(t,null),i=!0},p(e,[a]){r&&r.p&&(!i||16&a)&&dr(r,n,e,e[4],i?cr(n,e[4],a,null):ur(e[4]),null),(!i||8&a)&&Fr(t,"class",e[3]),(!i||4&a)&&Fr(t,"style",e[2]),(!i||1&a)&&Fr(t,"width",e[0]),(!i||2&a)&&Fr(t,"height",e[1]),(!i||3&a&&o!==(o="0 0 "+e[0]+"\n "+e[1]))&&Fr(t,"viewBox",o)},i(e){i||(Sa(r,e),i=!0)},o(e){ka(r,e),i=!1},d(e){e&&Tr(t),r&&r.d(e)}}}function dd(e,t,o){let{$$slots:i={},$$scope:n}=t,{width:r=24}=t,{height:a=24}=t,{style:s}=t,{class:l}=t;return e.$$set=e=>{"width"in e&&o(0,r=e.width),"height"in e&&o(1,a=e.height),"style"in e&&o(2,s=e.style),"class"in e&&o(3,l=e.class),"$$scope"in e&&o(4,n=e.$$scope)},[r,a,s,l,n,i]}class ud extends Ba{constructor(e){super(),Oa(this,e,dd,cd,ir,{width:0,height:1,style:2,class:3})}}var hd=(e,t)=>t===e.target||t.contains(e.target),pd=(e,t,o)=>{const i=T(t)?t:e;return o?`${i} (${n=o,n.map((e=>"CMD"===e?go()?"⌘":"Ctrl":e)).join("+")})`:i;var n};function md(e){let t,o;return t=new ud({props:{class:"PinturaButtonIcon",$$slots:{default:[gd]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};536870920&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function gd(e){let t;return{c(){t=Rr("g")},m(o,i){Cr(o,t,i),t.innerHTML=e[3]},p(e,o){8&o&&(t.innerHTML=e[3])},d(e){e&&Tr(t)}}}function $d(e){let t;return{c(){t=Mr("span"),Fr(t,"class",e[11])},m(o,i){Cr(o,t,i),t.innerHTML=e[0]},p(e,o){1&o&&(t.innerHTML=e[0]),2048&o&&Fr(t,"class",e[11])},d(e){e&&Tr(t)}}}function fd(e){let t,o,i,n,r;const a=e[27].default,s=sr(a,e,e[29],null),l=s||function(e){let t,o,i,n=e[3]&&md(e),r=e[0]&&$d(e);return{c(){t=Mr("span"),n&&n.c(),o=Er(),r&&r.c(),Fr(t,"class",e[13])},m(e,a){Cr(e,t,a),n&&n.m(t,null),wr(t,o),r&&r.m(t,null),i=!0},p(e,a){e[3]?n?(n.p(e,a),8&a&&Sa(n,1)):(n=md(e),n.c(),Sa(n,1),n.m(t,o)):n&&(va(),ka(n,1,1,(()=>{n=null})),wa()),e[0]?r?r.p(e,a):(r=$d(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null),(!i||8192&a)&&Fr(t,"class",e[13])},i(e){i||(Sa(n),i=!0)},o(e){ka(n),i=!1},d(e){e&&Tr(t),n&&n.d(),r&&r.d()}}}(e);return{c(){t=Mr("button"),l&&l.c(),Fr(t,"type",e[6]),Fr(t,"style",e[4]),t.disabled=e[5],Fr(t,"class",e[12]),Fr(t,"title",o=pd(e[0],e[1],e[2]))},m(o,a){Cr(o,t,a),l&&l.m(t,null),e[28](t),i=!0,n||(r=[Ar(t,"keydown",(function(){or(e[8])&&e[8].apply(this,arguments)})),Ar(t,"click",(function(){or(e[7])&&e[7].apply(this,arguments)})),Ar(t,"pointerdown",(function(){or(e[14])&&e[14].apply(this,arguments)})),gr(e[9].call(null,t))],n=!0)},p(n,[r]){e=n,s?s.p&&(!i||536870912&r)&&dr(s,a,e,e[29],i?cr(a,e[29],r,null):ur(e[29]),null):l&&l.p&&(!i||10249&r)&&l.p(e,i?r:-1),(!i||64&r)&&Fr(t,"type",e[6]),(!i||16&r)&&Fr(t,"style",e[4]),(!i||32&r)&&(t.disabled=e[5]),(!i||4096&r)&&Fr(t,"class",e[12]),(!i||7&r&&o!==(o=pd(e[0],e[1],e[2])))&&Fr(t,"title",o)},i(e){i||(Sa(l,e),i=!0)},o(e){ka(l,e),i=!1},d(o){o&&Tr(t),l&&l.d(o),e[28](null),n=!1,tr(r)}}}function yd(e,t,o){let i,r,a,s,l,c,{$$slots:d={},$$scope:u}=t,{class:h}=t,{label:p}=t,{title:m}=t,{shortcut:g}=t,{labelClass:$}=t,{innerClass:f}=t,{hideLabel:y=!1}=t,{icon:b}=t,{style:x}=t,{disabled:v}=t,{type:w="button"}=t,{onclick:S}=t,{onkeydown:k}=t,{onhold:C}=t,{action:T=(()=>{})}=t,{holdThreshold:M=500}=t,{holdSpeedUpFactor:R=.5}=t,{holdSpeedMin:P=20}=t;const E=e=>{o(25,c=setTimeout((()=>{C(),E(Math.max(e*R,P))}),e))};let I;return e.$$set=e=>{"class"in e&&o(15,h=e.class),"label"in e&&o(0,p=e.label),"title"in e&&o(1,m=e.title),"shortcut"in e&&o(2,g=e.shortcut),"labelClass"in e&&o(16,$=e.labelClass),"innerClass"in e&&o(17,f=e.innerClass),"hideLabel"in e&&o(18,y=e.hideLabel),"icon"in e&&o(3,b=e.icon),"style"in e&&o(4,x=e.style),"disabled"in e&&o(5,v=e.disabled),"type"in e&&o(6,w=e.type),"onclick"in e&&o(7,S=e.onclick),"onkeydown"in e&&o(8,k=e.onkeydown),"onhold"in e&&o(19,C=e.onhold),"action"in e&&o(9,T=e.action),"holdThreshold"in e&&o(20,M=e.holdThreshold),"holdSpeedUpFactor"in e&&o(21,R=e.holdSpeedUpFactor),"holdSpeedMin"in e&&o(22,P=e.holdSpeedMin),"$$scope"in e&&o(29,u=e.$$scope)},e.$$.update=()=>{101187584&e.$$.dirty&&o(26,r=C?()=>{c&&(clearTimeout(c),o(25,c=void 0),document.documentElement.removeEventListener("pointerup",r))}:n),68681728&e.$$.dirty&&o(14,i=C?()=>{document.documentElement.addEventListener("pointerup",r),E(M)}:n),131072&e.$$.dirty&&o(13,a=Oc(["PinturaButtonInner",f])),294912&e.$$.dirty&&o(12,s=Oc(["PinturaButton",y&&"PinturaButtonIconOnly",h])),327680&e.$$.dirty&&o(11,l=Oc([y?"implicit":"PinturaButtonLabel",$]))},[p,m,g,b,x,v,w,S,k,T,I,l,s,a,i,h,$,f,y,C,M,R,P,e=>hd(e,I),()=>I,c,r,d,function(e){na[e?"unshift":"push"]((()=>{I=e,o(10,I)}))},u]}class bd extends Ba{constructor(e){super(),Oa(this,e,yd,fd,ir,{class:15,label:0,title:1,shortcut:2,labelClass:16,innerClass:17,hideLabel:18,icon:3,style:4,disabled:5,type:6,onclick:7,onkeydown:8,onhold:19,action:9,holdThreshold:20,holdSpeedUpFactor:21,holdSpeedMin:22,isEventTarget:23,getElement:24})}get isEventTarget(){return this.$$.ctx[23]}get getElement(){return this.$$.ctx[24]}}var xd=(e,t)=>{const o=e.findIndex(t);if(o>=0)return e.splice(o,1)};const vd=80;var wd=(e,t={})=>{const{inertia:o=!1,inertiaDurationMultiplier:i=vd,shouldStartInteraction:n=(()=>!0),pinch:r=!1,multiTouch:a,getEventPosition:s=(e=>he(e.clientX,e.clientY)),observeKeys:l=!1}=t;function c(t,o){e.dispatchEvent(new CustomEvent(t,{detail:o}))}function d(){w&&w(),w=void 0}const u=[],h=e=>0===e.timeStamp?Date.now():e.timeStamp,p=()=>{const e=me(u[0].position);if(u[1]){const t=.5*(u[1].position.x-e.x),o=.5*(u[1].position.y-e.y);e.x+=t,e.y+=o}return e},m=e=>{e.origin.x=e.position.x,e.origin.y=e.position.y,e.translation.x=0,e.translation.y=0},g=e=>{const t=(e=>u.findIndex((t=>t.event.pointerId===e.pointerId)))(e);if(!(t<0))return u[t]},$=()=>1===u.length,f=()=>2===u.length,y=e=>{const t=Ie(e.map((e=>e.position)));return{center:t,distance:((e,t)=>e.reduce(((e,o)=>e+Pe(t,o.position)),0)/e.length)(e,t),velocity:Ie(e.map((e=>e.velocity))),translation:Ie(e.map((e=>e.translation)))}};let b,x,v,w,S,k,C,T,R,M=0;e.addEventListener("pointerdown",L);const P=["Meta","Control","Alt","Shift"];function E(e){if(!P.includes(e.key))return;const{metaKey:t,ctrlKey:o,altKey:i,shiftKey:n}=e;A({metaKey:t,ctrlKey:o,altKey:i,shiftKey:n})}let I=Date.now();const A=e=>{const t=me(u[0].translation);let o=C;r&&f()&&(o*=Pe(u[0].position,u[1].position)/S,we(t,u[1].translation)),we(t,k);const i=Date.now();i-I<16||(I=i,c("interactionupdate",{position:p(),translation:t,scalar:r?o:void 0,isMultiTouching:f(),...e}))};function L(t){if(!f()&&!(e=>Lo(e.button)&&0!==e.button)(t)&&n(t,e))if(d(),(e=>{const t=h(e),o={timeStamp:t,timeStampInitial:t,position:s(e),origin:s(e),velocity:ue(),velocityHistory:[],velocityAverage:ue(),translation:ue(),interactionState:void 0,event:e};u.push(o),o.interactionState=y(u)})(t),l&&(window.addEventListener("keydown",E),window.addEventListener("keyup",E)),$())document.documentElement.addEventListener("pointermove",z),document.documentElement.addEventListener("pointerup",F),document.documentElement.addEventListener("pointercancel",F),document.addEventListener("visibilitychange",O),T=!1,C=1,k=ue(),S=void 0,c("interactionstart",{origin:me(g(t).origin)});else if(r)T=!0,S=Pe(u[0].position,u[1].position),k.x+=u[0].translation.x,k.y+=u[0].translation.y,m(u[0]);else if(!1===a)return u.length=0,W(),c("interactioncancel")}function z(e){e.preventDefault(),(e=>{const t=g(e);if(!t)return;const o=h(e),i=s(e),n=Math.max(1,o-t.timeStamp);t.velocity.x=(i.x-t.position.x)/n,t.velocity.y=(i.y-t.position.y)/n,t.velocityHistory.push(me(t.velocity)),t.velocityHistory=t.velocityHistory.slice(-3),t.velocityAverage=t.velocityHistory.reduce(((e,t,o,i)=>(e.x+=t.x/i.length,e.y+=t.y/i.length,e)),ue()),t.translation.x=i.x-t.origin.x,t.translation.y=i.y-t.origin.y,t.timeStamp=o,t.position.x=i.x,t.position.y=i.y,t.event=e})(e);const{metaKey:t=!1,ctrlKey:o=!1,altKey:i=!1,shiftKey:n=!1}=l?e:{};A({metaKey:t,ctrlKey:o,altKey:i,shiftKey:n})}function F(e){if(!g(e))return;const t=p(),n=(e=>{const t=xd(u,(t=>t.event.pointerId===e.pointerId));if(t)return t[0]})(e);if(r&&$()){const e=Pe(u[0].position,n.position);C*=e/S,k.x+=u[0].translation.x+n.translation.x,k.y+=u[0].translation.y+n.translation.y,m(u[0])}let a=!1,s=!1;if(!T&&n){const e=performance.now(),t=e-n.timeStampInitial,o=Re(n.translation);a=o<64&&t<300,s=!!(R&&a&&e-M<700&&Re(R,n.position)<128),a&&(R=me(n.position),M=e)}if(u.length>0)return;W();const l=me(n.translation),d=me(n.velocityAverage);let h=!1;c("interactionrelease",{isTap:a,isDoubleTap:s,position:t,translation:l,scalar:C,preventInertia:()=>h=!0});const f=Pe(d);if(h||!o||f<.25)return B(l,{isTap:a,isDoubleTap:s});x=me(t),v=me(l),b=lc(me(l),{easing:rc,duration:f*i}),b.set({x:l.x+50*d.x,y:l.y+50*d.y}).then((()=>{w&&B(rr(b),{isTap:a,isDoubleTap:s})})),w=b.subscribe(D)}function D(e){e&&c("interactionupdate",{position:he(x.x+(e.x-v.x),x.y+(e.y-v.y)),translation:e,scalar:r?C:void 0})}function O(e){if("visible"===document.visibilityState||!u.length)return;const t=y(u);d(),c("interactionend",{...t}),u.length=0,W()}function B(e,t){d(),c("interactionend",{...t,translation:e,scalar:r?C:void 0})}function W(){l&&window.removeEventListener("keydown",E),l&&window.removeEventListener("keyup",E),document.documentElement.removeEventListener("pointermove",z),document.documentElement.removeEventListener("pointerup",F),document.documentElement.removeEventListener("pointercancel",F),document.addEventListener("visibilitychange",O)}return{destroy(){d(),e.removeEventListener("pointerdown",L)}}},Sd=(e,t={})=>{const{direction:o,shiftMultiplier:i=10,bubbles:n=!1,preventDefault:r=!1,stopKeydownPropagation:a=!0}=t,s="horizontal"===o,l="vertical"===o,c=t=>{const{key:o}=t,c=t.shiftKey,d=/up|down/i.test(o),u=/left|right/i.test(o);if(!u&&!d)return;if(s&&d)return;if(l&&u)return;const h=c?i:1;a&&t.stopPropagation(),r&&t.preventDefault(),e.dispatchEvent(new CustomEvent("nudge",{bubbles:n,detail:he((/left/i.test(o)?-1:/right/i.test(o)?1:0)*h,(/up/i.test(o)?-1:/down/i.test(o)?1:0)*h)}))};return e.addEventListener("keydown",c),{destroy(){e.removeEventListener("keydown",c)}}};function kd(e,t){return t?t*Math.sign(e)*Math.log10(1+Math.abs(e)/t):e}const Cd=(e,t,o)=>{if(!t||!o)return{...e};const i=e.x+kd(t.x-e.x,o),n=e.x+e.width+kd(t.x+t.width-(e.x+e.width),o),r=e.y+kd(t.y-e.y,o);return{x:i,y:r,width:n-i,height:e.y+e.height+kd(t.y+t.height-(e.y+e.height),o)-r}};var Md=(e,t)=>{if(e)return/em/.test(e)?16*parseInt(e,10):/px/.test(e)?parseInt(e,10):void 0},Rd=(e,t)=>{let o=e.detail||0;const{deltaX:i,deltaY:n,wheelDelta:r,wheelDeltaX:a,wheelDeltaY:s}=e,{fixScrollDirection:l=!1}=t||{};return Lo(a)&&Math.abs(a)>Math.abs(s)?o=a/-120:Lo(i)&&Math.abs(i)>Math.abs(n)?o=i/20:(r||s)&&(o=(r||s)/-120),o||(o=n/20),(F()||Yt())&&(o*=2),l&&go()&&(o*=-1),o};function Pd(e){let t,o,i,n,r,a,s;const l=e[37].default,c=sr(l,e,e[36],null);return{c(){t=Mr("div"),o=Mr("div"),c&&c.c(),Fr(o,"style",e[5]),Fr(t,"class",i=Oc(["PinturaScrollable",e[0]])),Fr(t,"style",e[4]),Fr(t,"data-direction",e[1]),Fr(t,"data-state",e[6])},m(i,l){Cr(i,t,l),wr(t,o),c&&c.m(o,null),e[39](t),r=!0,a||(s=[Ar(o,"interactionstart",e[9]),Ar(o,"interactionupdate",e[11]),Ar(o,"interactionend",e[12]),Ar(o,"interactionrelease",e[10]),gr(wd.call(null,o,{inertia:!0})),Ar(o,"measure",e[38]),gr(Tc.call(null,o)),Ar(t,"wheel",e[14],{passive:!1}),Ar(t,"scroll",e[16]),Ar(t,"focusin",e[15]),Ar(t,"nudge",e[17]),Ar(t,"measure",e[13]),gr(Tc.call(null,t,{observePosition:!0})),gr(n=Sd.call(null,t,{direction:"x"===e[1]?"horizontal":"vertical",stopKeydownPropagation:!1}))],a=!0)},p(e,a){c&&c.p&&(!r||32&a[1])&&dr(c,l,e,e[36],r?cr(l,e[36],a,null):ur(e[36]),null),(!r||32&a[0])&&Fr(o,"style",e[5]),(!r||1&a[0]&&i!==(i=Oc(["PinturaScrollable",e[0]])))&&Fr(t,"class",i),(!r||16&a[0])&&Fr(t,"style",e[4]),(!r||2&a[0])&&Fr(t,"data-direction",e[1]),(!r||64&a[0])&&Fr(t,"data-state",e[6]),n&&or(n.update)&&2&a[0]&&n.update.call(null,{direction:"x"===e[1]?"horizontal":"vertical",stopKeydownPropagation:!1})},i(e){r||(Sa(c,e),r=!0)},o(e){ka(c,e),r=!1},d(o){o&&Tr(t),c&&c.d(o),e[39](null),a=!1,tr(s)}}}function Ed(e,t,o){let i,r,a,s,l,c,d,u,h,{$$slots:p={},$$scope:m}=t;const g=Qr();let $,f,y,b,x="idle",v=dc(0);ar(e,v,(e=>o(35,u=e)));let{class:w}=t,{scrollBlockInteractionDist:S=5}=t,{scrollStep:k=10}=t,{scrollFocusMargin:C=64}=t,{scrollDirection:T="x"}=t,{scrollAutoCancel:M=!1}=t,{elasticity:R=0}=t,{onscroll:P=n}=t,{maskFeatherSize:E}=t,{maskFeatherStartOpacity:I}=t,{maskFeatherEndOpacity:A}=t,{scroll:L}=t;const z=ta("fixScrollDirection");let F;ar(e,z,(e=>o(46,h=e)));let D="",O=!0;const B=v.subscribe((e=>{const t=ue();t[T]=e,P(t)})),W=e=>Math.max(Math.min(0,e),y[i]-f[i]);let V,_,N;const H=(e,t={})=>{const{elastic:i=!1,animate:n=!1,preventScrollState:r=!1}=t;Math.abs(e-$)>S&&"idle"===x&&!b&&!r&&o(28,x="scrolling");const a=W(e),s=i&&R&&!b?a+kd(e-a,R):a;let l=!0;n?l=!1:O||(l=!b),O=!1,v.set(s,{hard:l}).then((e=>{b&&(O=!0)}))};return Jr((()=>{B()})),e.$$set=e=>{"class"in e&&o(0,w=e.class),"scrollBlockInteractionDist"in e&&o(21,S=e.scrollBlockInteractionDist),"scrollStep"in e&&o(22,k=e.scrollStep),"scrollFocusMargin"in e&&o(23,C=e.scrollFocusMargin),"scrollDirection"in e&&o(1,T=e.scrollDirection),"scrollAutoCancel"in e&&o(24,M=e.scrollAutoCancel),"elasticity"in e&&o(25,R=e.elasticity),"onscroll"in e&&o(26,P=e.onscroll),"maskFeatherSize"in e&&o(20,E=e.maskFeatherSize),"maskFeatherStartOpacity"in e&&o(18,I=e.maskFeatherStartOpacity),"maskFeatherEndOpacity"in e&&o(19,A=e.maskFeatherEndOpacity),"scroll"in e&&o(27,L=e.scroll),"$$scope"in e&&o(36,m=e.$$scope)},e.$$.update=()=>{if(2&e.$$.dirty[0]&&o(32,i="x"===T?"width":"height"),2&e.$$.dirty[0]&&o(30,r=T.toUpperCase()),8&e.$$.dirty[0]&&o(34,a=F&&getComputedStyle(F)),8&e.$$.dirty[0]|8&e.$$.dirty[1]&&o(33,s=a&&Md(a.getPropertyValue("--scrollable-feather-size"))),537657348&e.$$.dirty[0]|22&e.$$.dirty[1]&&null!=u&&y&&null!=s&&f){const e=-1*u/s,t=-(y[i]-f[i]-u)/s;o(18,I=ss(1-e,0,1)),o(19,A=ss(1-t,0,1)),o(20,E=s),o(4,D=`--scrollable-feather-start-opacity: ${I};--scrollable-feather-end-opacity: ${A}`)}134217736&e.$$.dirty[0]&&F&&void 0!==L&&(Lo(L)?H(L):H(L.scrollOffset,L)),536870916&e.$$.dirty[0]|2&e.$$.dirty[1]&&o(31,l=y&&f?f[i]>y[i]:void 0),268435456&e.$$.dirty[0]|1&e.$$.dirty[1]&&o(6,c=Oc([x,l?"overflows":void 0])),1073741824&e.$$.dirty[0]|17&e.$$.dirty[1]&&o(5,d=l?`transform: translate${r}(${u}px)`:void 0)},[w,T,f,F,D,d,c,v,z,()=>{l&&(_=!1,V=!0,N=he(0,0),b=!1,o(28,x="idle"),$=rr(v))},({detail:e})=>{l&&(b=!0,o(28,x="idle"))},({detail:e})=>{l&&(_||V&&(V=!1,Re(e.translation)<.1)||(!M||"x"!==T||(e=>{const t=ve(he(e.x-N.x,e.y-N.y),Math.abs);N=me(e);const o=Re(t),i=t.x-t.y;return!(o>1&&i<-.5)})(e.translation)?H($+e.translation[T],{elastic:!0}):_=!0))},({detail:e})=>{if(!l)return;if(_)return;const t=$+e.translation[T],o=W(t);O=!1,v.set(o).then((e=>{b&&(O=!0)}))},({detail:e})=>{o(29,y=e),g("measure",{x:e.x,y:e.y,width:e.width,height:e.height})},e=>{if(!l)return;e.preventDefault(),e.stopPropagation();const t=e.shiftKey,o=Rd(e,{fixScrollDirection:h})*(t?-1:1),i=rr(v);H(i+o*k,{animate:!0})},e=>{if(!l)return;if(!b)return;let t=e.target;e.target.classList.contains("implicit")&&(t=t.parentNode);const o=t["x"===T?"offsetLeft":"offsetTop"],n=o+t["x"===T?"offsetWidth":"offsetHeight"],r=rr(v),a=C+E;r+o<a?H(-o+a):r+n>y[i]-a&&H(y[i]-n-a,{animate:!0})},()=>{o(3,F["x"===T?"scrollLeft":"scrollTop"]=0,F)},({detail:e})=>{if(F.querySelector("[data-focus-visible]"))return;const t=-2*e[T],o=rr(v);H(o+t*k,{animate:!0,preventScrollState:!0})},I,A,E,S,k,C,M,R,P,L,x,y,r,l,i,s,a,u,m,p,e=>o(2,f=e.detail),function(e){na[e?"unshift":"push"]((()=>{F=e,o(3,F)}))}]}class Id extends Ba{constructor(e){super(),Oa(this,e,Ed,Pd,ir,{class:0,scrollBlockInteractionDist:21,scrollStep:22,scrollFocusMargin:23,scrollDirection:1,scrollAutoCancel:24,elasticity:25,onscroll:26,maskFeatherSize:20,maskFeatherStartOpacity:18,maskFeatherEndOpacity:19,scroll:27},null,[-1,-1])}}function Ad(e,{delay:t=0,duration:o=400,easing:i=Kn}={}){const n=+getComputedStyle(e).opacity;return{delay:t,duration:o,easing:i,css:e=>"opacity: "+e*n}}function Ld(e){let t,o,i;return{c(){t=Mr("span"),Fr(t,"class","PinturaStatusMessage")},m(n,r){Cr(n,t,r),t.innerHTML=e[0],o||(i=[Ar(t,"measure",(function(){or(e[1])&&e[1].apply(this,arguments)})),gr(Tc.call(null,t))],o=!0)},p(o,i){e=o,1&i&&(t.innerHTML=e[0])},i:qn,o:qn,d(e){e&&Tr(t),o=!1,tr(i)}}}function zd(e){let t,o,i,n,r;return{c(){t=Mr("span"),Fr(t,"class","PinturaStatusMessage")},m(o,a){Cr(o,t,a),t.innerHTML=e[0],i=!0,n||(r=[Ar(t,"measure",(function(){or(e[1])&&e[1].apply(this,arguments)})),gr(Tc.call(null,t))],n=!0)},p(o,n){e=o,(!i||1&n)&&(t.innerHTML=e[0])},i(e){i||(ua((()=>{o||(o=Ta(t,Ad,{duration:500},!0)),o.run(1)})),i=!0)},o(e){o||(o=Ta(t,Ad,{duration:500},!1)),o.run(0),i=!1},d(e){e&&Tr(t),e&&o&&o.end(),n=!1,tr(r)}}}function Fd(e){let t,o,i,n;const r=[zd,Ld],a=[];function s(e,t){return e[2]?0:1}return t=s(e),o=a[t]=r[t](e),{c(){o.c(),i=Ir()},m(e,o){a[t].m(e,o),Cr(e,i,o),n=!0},p(e,[n]){let l=t;t=s(e),t===l?a[t].p(e,n):(va(),ka(a[l],1,1,(()=>{a[l]=null})),wa(),o=a[t],o?o.p(e,n):(o=a[t]=r[t](e),o.c()),Sa(o,1),o.m(i.parentNode,i))},i(e){n||(Sa(o),n=!0)},o(e){ka(o),n=!1},d(e){a[t].d(e),e&&Tr(i)}}}function Dd(e,t,o){let i,{text:r}=t,{onmeasure:a=n}=t;const s=ta("isAnimated");return ar(e,s,(e=>o(2,i=e))),e.$$set=e=>{"text"in e&&o(0,r=e.text),"onmeasure"in e&&o(1,a=e.onmeasure)},[r,a,i,s]}class Od extends Ba{constructor(e){super(),Oa(this,e,Dd,Fd,ir,{text:0,onmeasure:1})}}function Bd(e){let t,o,i,n,r,a,s,l,c;return{c(){t=Mr("span"),o=Rr("svg"),i=Rr("g"),n=Rr("circle"),r=Rr("circle"),a=Er(),s=Mr("span"),l=Pr(e[3]),Fr(n,"class","PinturaProgressIndicatorBar"),Fr(n,"r","8.5"),Fr(n,"cx","10"),Fr(n,"cy","10"),Fr(n,"stroke-linecap","round"),Fr(n,"opacity",".25"),Fr(r,"class","PinturaProgressIndicatorFill"),Fr(r,"r","8.5"),Fr(r,"stroke-dasharray",e[2]),Fr(r,"cx","10"),Fr(r,"cy","10"),Fr(r,"transform","rotate(-90) translate(-20)"),Fr(i,"fill","none"),Fr(i,"stroke","currentColor"),Fr(i,"stroke-width","2.5"),Fr(i,"stroke-linecap","round"),Fr(i,"opacity",e[1]),Fr(o,"width","20"),Fr(o,"height","20"),Fr(o,"viewBox","0 0 20 20"),Fr(o,"xmlns","http://www.w3.org/2000/svg"),Fr(o,"aria-hidden","true"),Fr(o,"focusable","false"),Fr(s,"class","implicit"),Fr(t,"class","PinturaProgressIndicator"),Fr(t,"data-status",e[0]),Fr(t,"style",c="opacity:"+e[4])},m(e,c){Cr(e,t,c),wr(t,o),wr(o,i),wr(i,n),wr(i,r),wr(t,a),wr(t,s),wr(s,l)},p(e,[o]){4&o&&Fr(r,"stroke-dasharray",e[2]),2&o&&Fr(i,"opacity",e[1]),8&o&&Br(l,e[3]),1&o&&Fr(t,"data-status",e[0]),16&o&&c!==(c="opacity:"+e[4])&&Fr(t,"style",c)},i:qn,o:qn,d(e){e&&Tr(t)}}}function Wd(e,t,o){let i,n,r,a,s,l,c;const d=Qr();let{progress:u}=t,{min:h=0}=t,{max:p=100}=t,{labelBusy:m="Busy"}=t,{opacity:g}=t;const $=dc(g,{precision:.01});ar(e,$,(e=>o(4,c=e)));const f=dc(0,{precision:.01}),y=dc(0,{precision:.01});ar(e,y,(e=>o(13,s=e)));const b=Na([f],(e=>ss(e,h,p)));ar(e,b,(e=>o(14,l=e)));const x=b.subscribe((e=>{1===u&&Math.round(e)>=100&&d("complete")}));return qr((()=>{y.set(1)})),Jr((()=>{x()})),e.$$set=e=>{"progress"in e&&o(8,u=e.progress),"min"in e&&o(9,h=e.min),"max"in e&&o(10,p=e.max),"labelBusy"in e&&o(11,m=e.labelBusy),"opacity"in e&&o(12,g=e.opacity)},e.$$.update=()=>{4096&e.$$.dirty&&Lo(g)&&$.set(g),256&e.$$.dirty&&u&&u!==1/0&&f.set(100*u),18688&e.$$.dirty&&o(3,i=u===1/0?m:Math.round(l)+"%"),16640&e.$$.dirty&&o(2,n=u===1/0?"26.5 53":l/100*53+" 53"),8192&e.$$.dirty&&o(1,r=s),256&e.$$.dirty&&o(0,a=u===1/0?"busy":"loading")},[a,r,n,i,c,$,y,b,u,h,p,m,g,s,l]}class Vd extends Ba{constructor(e){super(),Oa(this,e,Wd,Bd,ir,{progress:8,min:9,max:10,labelBusy:11,opacity:12})}}function _d(e){let t,o,i;const n=e[5].default,r=sr(n,e,e[4],null);return{c(){t=Mr("span"),r&&r.c(),Fr(t,"class",o="PinturaStatusAside "+e[0]),Fr(t,"style",e[1])},m(e,o){Cr(e,t,o),r&&r.m(t,null),i=!0},p(e,[a]){r&&r.p&&(!i||16&a)&&dr(r,n,e,e[4],i?cr(n,e[4],a,null):ur(e[4]),null),(!i||1&a&&o!==(o="PinturaStatusAside "+e[0]))&&Fr(t,"class",o),(!i||2&a)&&Fr(t,"style",e[1])},i(e){i||(Sa(r,e),i=!0)},o(e){ka(r,e),i=!1},d(e){e&&Tr(t),r&&r.d(e)}}}function Nd(e,t,o){let i,{$$slots:n={},$$scope:r}=t,{offset:a=0}=t,{opacity:s=0}=t,{class:l}=t;return e.$$set=e=>{"offset"in e&&o(2,a=e.offset),"opacity"in e&&o(3,s=e.opacity),"class"in e&&o(0,l=e.class),"$$scope"in e&&o(4,r=e.$$scope)},e.$$.update=()=>{12&e.$$.dirty&&o(1,i=`transform:translateX(${a}px);opacity:${s}`)},[l,i,a,s,r,n]}class Hd extends Ba{constructor(e){super(),Oa(this,e,Nd,_d,ir,{offset:2,opacity:3,class:0})}}const{document:jd}=Ma;function Ud(e){let t,o,i,n;return{c(){t=Er(),o=Mr("button"),Fr(o,"class","PinturaImageButton"),Fr(o,"type","button"),Fr(o,"title",e[1]),o.disabled=e[2]},m(r,a){Cr(r,t,a),Cr(r,o,a),o.innerHTML=e[0],e[11](o),i||(n=[Ar(jd.body,"load",e[5],!0),Ar(jd.body,"error",e[6],!0),Ar(o,"pointerdown",e[4])],i=!0)},p(e,[t]){1&t&&(o.innerHTML=e[0]),2&t&&Fr(o,"title",e[1]),4&t&&(o.disabled=e[2])},i:qn,o:qn,d(r){r&&Tr(t),r&&Tr(o),e[11](null),i=!1,tr(n)}}}function Gd(e,t,o){let i,{html:r}=t,{title:a}=t,{onclick:s}=t,{disabled:l=!1}=t,{ongrab:c=n}=t,{ondrag:d=n}=t,{ondrop:u=n}=t;const h=e=>Re(p,he(e.pageX,e.pageY))<256;let p;const m=e=>{document.documentElement.removeEventListener("pointermove",g),document.documentElement.removeEventListener("pointerup",m);const t=he(e.pageX,e.pageY);if(Re(p,t)<32)return s(e);h(e)||u(e)},g=e=>{h(e)||d(e)},$=e=>i&&i.contains(e)&&"IMG"===e.nodeName;return e.$$set=e=>{"html"in e&&o(0,r=e.html),"title"in e&&o(1,a=e.title),"onclick"in e&&o(7,s=e.onclick),"disabled"in e&&o(2,l=e.disabled),"ongrab"in e&&o(8,c=e.ongrab),"ondrag"in e&&o(9,d=e.ondrag),"ondrop"in e&&o(10,u=e.ondrop)},e.$$.update=()=>{8&e.$$.dirty&&i&&i.querySelector("img")&&o(3,i.dataset.loader=!0,i)},[r,a,l,i,e=>{p=he(e.pageX,e.pageY),c(e),document.documentElement.addEventListener("pointermove",g),document.documentElement.addEventListener("pointerup",m)},({target:e})=>{$(e)&&o(3,i.dataset.load=!0,i)},({target:e})=>{$(e)&&o(3,i.dataset.error=!0,i)},s,c,d,u,function(e){na[e?"unshift":"push"]((()=>{i=e,o(3,i)}))}]}class Zd extends Ba{constructor(e){super(),Oa(this,e,Gd,Ud,ir,{html:0,title:1,onclick:7,disabled:2,ongrab:8,ondrag:9,ondrop:10})}}function Xd(e,t,o){const i=e.slice();return i[14]=t[o],i}function Yd(e,t){let o,i,n,r,a,s,l;function c(){return t[10](t[14])}function d(...e){return t[11](t[14],...e)}function u(...e){return t[12](t[14],...e)}function h(...e){return t[13](t[14],...e)}return i=new Zd({props:{onclick:c,ongrab:d,ondrag:u,ondrop:h,disabled:t[1]||t[14].disabled,title:t[14].title,html:t[14].thumb}}),{key:e,first:null,c(){o=Mr("li"),za(i.$$.fragment),n=Er(),Fr(o,"style",t[6]),this.first=o},m(e,c){Cr(e,o,c),Fa(i,o,null),wr(o,n),a=!0,s||(l=gr(r=t[8].call(null,o,t[14])),s=!0)},p(e,n){t=e;const s={};5&n&&(s.onclick=c),9&n&&(s.ongrab=d),17&n&&(s.ondrag=u),33&n&&(s.ondrop=h),3&n&&(s.disabled=t[1]||t[14].disabled),1&n&&(s.title=t[14].title),1&n&&(s.html=t[14].thumb),i.$set(s),(!a||64&n)&&Fr(o,"style",t[6]),r&&or(r.update)&&1&n&&r.update.call(null,t[14])},i(e){a||(Sa(i.$$.fragment,e),a=!0)},o(e){ka(i.$$.fragment,e),a=!1},d(e){e&&Tr(o),Da(i),s=!1,l()}}}function qd(e){let t,o,i=[],n=new Map,r=e[0];const a=e=>e[14].id;for(let t=0;t<r.length;t+=1){let o=Xd(e,r,t),s=a(o);n.set(s,i[t]=Yd(s,o))}return{c(){t=Mr("ul");for(let e=0;e<i.length;e+=1)i[e].c();Fr(t,"class","PinturaImageButtonList")},m(e,n){Cr(e,t,n);for(let e=0;e<i.length;e+=1)i[e].m(t,null);o=!0},p(e,[o]){127&o&&(r=e[0],va(),i=Ea(i,o,a,1,e,r,n,t,Pa,Yd,null,Xd),wa())},i(e){if(!o){for(let e=0;e<r.length;e+=1)Sa(i[e]);o=!0}},o(e){for(let e=0;e<i.length;e+=1)ka(i[e]);o=!1},d(e){e&&Tr(t);for(let e=0;e<i.length;e+=1)i[e].d()}}}function Kd(e,t,o){let i,n,{items:r}=t,{disabled:a}=t,{onclickitem:s}=t,{ongrabitem:l}=t,{ondragitem:c}=t,{ondropitem:d}=t;const u=dc(0,{stiffness:.25,damping:.9});return ar(e,u,(e=>o(9,n=e))),qr((()=>u.set(1))),e.$$set=e=>{"items"in e&&o(0,r=e.items),"disabled"in e&&o(1,a=e.disabled),"onclickitem"in e&&o(2,s=e.onclickitem),"ongrabitem"in e&&o(3,l=e.ongrabitem),"ondragitem"in e&&o(4,c=e.ondragitem),"ondropitem"in e&&o(5,d=e.ondropitem)},e.$$.update=()=>{512&e.$$.dirty&&o(6,i="opacity:"+n)},[r,a,s,l,c,d,i,u,(e,t)=>t.mount&&t.mount(e.firstChild,t),n,e=>s(e.id),(e,t)=>l&&l(e.id,t),(e,t)=>c&&c(e.id,t),(e,t)=>d&&d(e.id,t)]}class Jd extends Ba{constructor(e){super(),Oa(this,e,Kd,qd,ir,{items:0,disabled:1,onclickitem:2,ongrabitem:3,ondragitem:4,ondropitem:5})}}var Qd=()=>c()&&window.devicePixelRatio||1;let eu=null;var tu=e=>(null===eu&&(eu=1===Qd()?Math.round:e=>e),eu(e)),ou=(e,t={})=>{if(e){if(t.preventScroll&&Yt()){const t=document.body.scrollTop;return e.focus(),void(document.body.scrollTop=t)}e.focus(t)}},iu=e=>/date|email|number|search|text|url/.test(e.type),nu=e=>(e=>/textarea/i.test(e.nodeName))(e)||iu(e)||e.isContentEditable;const ru=e=>({}),au=e=>({}),su=e=>({}),lu=e=>({});function cu(e){let t,o;const i=[e[7]];let n={$$slots:{default:[uu]},$$scope:{ctx:e}};for(let e=0;e<i.length;e+=1)n=Jn(n,i[e]);return t=new bd({props:n}),e[46](t),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const n=128&o[0]?Ia(i,[Aa(e[7])]):{};524288&o[1]&&(n.$$scope={dirty:o,ctx:e}),t.$set(n)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(o){e[46](null),Da(t,o)}}}function du(e){let t,o;const i=[e[7]];let n={};for(let e=0;e<i.length;e+=1)n=Jn(n,i[e]);return t=new bd({props:n}),e[45](t),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const n=128&o[0]?Ia(i,[Aa(e[7])]):{};t.$set(n)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(o){e[45](null),Da(t,o)}}}function uu(e){let t;const o=e[44].label,i=sr(o,e,e[50],lu);return{c(){i&&i.c()},m(e,o){i&&i.m(e,o),t=!0},p(e,n){i&&i.p&&(!t||524288&n[1])&&dr(i,o,e,e[50],t?cr(o,e[50],n,su):ur(e[50]),lu)},i(e){t||(Sa(i,e),t=!0)},o(e){ka(i,e),t=!1},d(e){i&&i.d(e)}}}function hu(e){let t,o,i,n,r,a,s;const l=e[44].details,c=sr(l,e,e[50],au);return{c(){t=Mr("div"),c&&c.c(),o=Er(),i=Mr("span"),Fr(i,"class","PinturaPanelTip"),Fr(i,"style",e[10]),Fr(t,"class",n=Oc(["PinturaPanel","pintura-editor-panel",e[2]])),Fr(t,"tabindex","-1"),Fr(t,"style",e[11])},m(n,l){Cr(n,t,l),c&&c.m(t,null),wr(t,o),wr(t,i),e[47](t),r=!0,a||(s=[Ar(t,"close",e[48]),Ar(t,"keydown",e[18]),Ar(t,"measure",e[49]),gr(Tc.call(null,t))],a=!0)},p(e,o){c&&c.p&&(!r||524288&o[1])&&dr(c,l,e,e[50],r?cr(l,e[50],o,ru):ur(e[50]),au),(!r||1024&o[0])&&Fr(i,"style",e[10]),(!r||4&o[0]&&n!==(n=Oc(["PinturaPanel","pintura-editor-panel",e[2]])))&&Fr(t,"class",n),(!r||2048&o[0])&&Fr(t,"style",e[11])},i(e){r||(Sa(c,e),r=!0)},o(e){ka(c,e),r=!1},d(o){o&&Tr(t),c&&c.d(o),e[47](null),a=!1,tr(s)}}}function pu(e){let t,o,i,n,r,a,s,l,c;const d=[du,cu],u=[];function h(e,t){return e[1]?0:1}o=h(e),i=u[o]=d[o](e);let p=e[6]&&hu(e);return{c(){t=Er(),i.c(),n=Er(),p&&p.c(),r=Er(),a=Ir()},m(i,d){Cr(i,t,d),u[o].m(i,d),Cr(i,n,d),p&&p.m(i,d),Cr(i,r,d),Cr(i,a,d),s=!0,l||(c=[Ar(document.body,"pointerdown",(function(){or(e[9])&&e[9].apply(this,arguments)})),Ar(document.body,"pointerup",(function(){or(e[8])&&e[8].apply(this,arguments)}))],l=!0)},p(t,a){let s=o;o=h(e=t),o===s?u[o].p(e,a):(va(),ka(u[s],1,1,(()=>{u[s]=null})),wa(),i=u[o],i?i.p(e,a):(i=u[o]=d[o](e),i.c()),Sa(i,1),i.m(n.parentNode,n)),e[6]?p?(p.p(e,a),64&a[0]&&Sa(p,1)):(p=hu(e),p.c(),Sa(p,1),p.m(r.parentNode,r)):p&&(va(),ka(p,1,1,(()=>{p=null})),wa())},i(e){s||(Sa(i),Sa(p),Sa(!1),s=!0)},o(e){ka(i),ka(p),ka(!1),s=!1},d(e){e&&Tr(t),u[o].d(e),e&&Tr(n),p&&p.d(e),e&&Tr(r),e&&Tr(a),l=!1,tr(c)}}}function mu(e,t,o){let i,r,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,{$$slots:S={},$$scope:k}=t,{buttonClass:C}=t,{buttonLabel:T}=t,{buttonLabelClass:M}=t,{buttonHideLabel:R}=t,{buttonIcon:P}=t,{buttonTitle:E}=t,{panelClass:I}=t,{isActive:A=!1}=t,{onshow:L=(({panel:e})=>ou(e,{preventScroll:!0}))}=t,{onhide:z=n}=t;const F=ta("isAnimated");ar(e,F,(e=>o(43,w=e)));const D=ta("rootPortal");ar(e,D,(e=>o(38,f=e)));const O=ta("rootRect");let B,W,V;ar(e,O,(e=>o(41,x=e)));const _=()=>o(26,V=i&&i.getBoundingClientRect());let N=ue(),H=dc(0);ar(e,H,(e=>o(40,b=e)));let j=ue();const U=_a({x:0,y:0});ar(e,U,(e=>o(39,y=e)));const G=dc(-5,{stiffness:.1,damping:.35,precision:.001});ar(e,G,(e=>o(42,v=e)));let Z=!0;const X=e=>hd(e,f)||W.isEventTarget(e);let Y,q,K=!1;const J=e=>{nu(e.target)||(A||_(),o(31,q=e),o(0,A=!A))},Q=e=>{/down/i.test(e.key)&&(o(0,A=!0),o(31,q=e))};return Jr((()=>{if(!f)return;if(!Y)return;const e=Y;da().then((()=>{e.parentNode&&e.remove()}))})),e.$$set=e=>{"buttonClass"in e&&o(19,C=e.buttonClass),"buttonLabel"in e&&o(1,T=e.buttonLabel),"buttonLabelClass"in e&&o(20,M=e.buttonLabelClass),"buttonHideLabel"in e&&o(21,R=e.buttonHideLabel),"buttonIcon"in e&&o(22,P=e.buttonIcon),"buttonTitle"in e&&o(23,E=e.buttonTitle),"panelClass"in e&&o(2,I=e.panelClass),"isActive"in e&&o(0,A=e.isActive),"onshow"in e&&o(24,L=e.onshow),"onhide"in e&&o(25,z=e.onhide),"$$scope"in e&&o(50,k=e.$$scope)},e.$$.update=()=>{if(16&e.$$.dirty[0]&&(i=W&&W.getElement()),1073741825&e.$$.dirty[0]&&o(8,g=A?e=>{K&&(o(30,K=!1),X(e)||o(0,A=!1))}:void 0),1&e.$$.dirty[0]|4096&e.$$.dirty[1]&&H.set(A?1:0,{hard:!1===w}),1&e.$$.dirty[0]|4096&e.$$.dirty[1]&&G.set(A?0:-5,{hard:!1===w}),2048&e.$$.dirty[1]&&o(34,r=1-v/-5),1&e.$$.dirty[0]|1024&e.$$.dirty[1]&&x&&A&&_(),67108873&e.$$.dirty[0]|1024&e.$$.dirty[1]&&x&&B&&V&&A){o(29,Z=!0);let e=V.x-x.x+.5*V.width-.5*B.width,t=V.y-x.y+V.height;const i=12,n=12,r=x.width-12,a=x.height-12,s=e,l=t,c=s+B.width,d=l+B.height;s<i&&(o(28,j.x=s-i,j),e=i),c>r&&(o(28,j.x=c-r,j),e=r-B.width),d>a?(o(27,N.y=-1,N),n<t-B.height-V.height?(o(28,j.y=0,j),t-=B.height+V.height):(o(28,j.y=t-(d-a),j),t-=d-a-12,o(29,Z=!1))):o(27,N.y=1,N),mr(U,y=ve(he(e,t),tu),y)}512&e.$$.dirty[1]&&o(6,a=b>0),512&e.$$.dirty[1]&&o(37,s=b<1),134217728&e.$$.dirty[0]|2304&e.$$.dirty[1]&&o(36,l=`translateX(${Math.round(y.x)+12*N.x}px) translateY(${Math.round(y.y)+12*N.y+N.y*v}px)`),1024&e.$$.dirty[1]&&o(35,c=`--panel-max-height:${x.height-24}px`),624&e.$$.dirty[1]&&o(11,d=s?`opacity: ${b}; pointer-events: ${b<1?"none":"all"}; transform: ${l};${c}`:`transform: ${l};${c}`),8&e.$$.dirty[1]&&o(32,u=.5+.5*r),8&e.$$.dirty[1]&&o(33,h=r),939524104&e.$$.dirty[0]|262&e.$$.dirty[1]&&o(10,p=y&&B&&`opacity:${Z?h:0};transform:scaleX(${u})rotate(45deg);top:${N.y<0?j.y+B.height:0}px;left:${j.x+.5*B.width}px`),1&e.$$.dirty[0]&&o(9,m=A?e=>{X(e)||o(30,K=!0)}:void 0),96&e.$$.dirty[0]|128&e.$$.dirty[1]&&a&&f&&Y&&Y.parentNode!==f&&f.append(Y),1&e.$$.dirty[0]&&(A||o(31,q=void 0)),16777313&e.$$.dirty[0]|1&e.$$.dirty[1]&&A&&a&&Y&&L({e:q,panel:Y}),33554497&e.$$.dirty[0]&&a&&!A&&z(),16252930&e.$$.dirty[0]&&o(7,$={label:T,icon:P,class:Oc(["PinturaPanelButton",C]),onkeydown:Q,onclick:J,hideLabel:R,labelClass:M,title:E})},[A,T,I,B,W,Y,a,$,g,m,p,d,F,D,O,H,U,G,e=>{/esc/i.test(e.key)&&(o(0,A=!1),i.focus())},C,M,R,P,E,L,z,V,N,j,Z,K,q,u,h,r,c,l,s,f,y,b,x,v,w,S,function(e){na[e?"unshift":"push"]((()=>{W=e,o(4,W)}))},function(e){na[e?"unshift":"push"]((()=>{W=e,o(4,W)}))},function(e){na[e?"unshift":"push"]((()=>{Y=e,o(5,Y)}))},e=>{e.stopPropagation(),o(0,A=!1)},e=>o(3,B=De(e.detail)),k]}class gu extends Ba{constructor(e){super(),Oa(this,e,mu,pu,ir,{buttonClass:19,buttonLabel:1,buttonLabelClass:20,buttonHideLabel:21,buttonIcon:22,buttonTitle:23,panelClass:2,isActive:0,onshow:24,onhide:25},null,[-1,-1])}}var $u={Up:38,Down:40,Left:37,Right:39};function fu(e){let t,o,i,n,r,a,s,l;const c=e[15].default,d=sr(c,e,e[14],null);return{c(){t=Mr("li"),o=Mr("input"),i=Er(),n=Mr("label"),d&&d.c(),Fr(o,"type","radio"),Fr(o,"class","implicit"),Fr(o,"id",e[7]),Fr(o,"name",e[0]),o.value=e[3],o.disabled=e[6],o.hidden=e[5],o.checked=e[4],Fr(n,"for",e[7]),Fr(n,"title",e[2]),Fr(t,"class",r=Oc(["PinturaRadioGroupOption",e[1]])),Fr(t,"data-hidden",e[5]),Fr(t,"data-disabled",e[6]),Fr(t,"data-selected",e[4])},m(r,c){Cr(r,t,c),wr(t,o),wr(t,i),wr(t,n),d&&d.m(n,null),a=!0,s||(l=[Ar(o,"change",zr(e[16])),Ar(o,"keydown",e[9]),Ar(o,"click",e[10])],s=!0)},p(e,[i]){(!a||128&i)&&Fr(o,"id",e[7]),(!a||1&i)&&Fr(o,"name",e[0]),(!a||8&i)&&(o.value=e[3]),(!a||64&i)&&(o.disabled=e[6]),(!a||32&i)&&(o.hidden=e[5]),(!a||16&i)&&(o.checked=e[4]),d&&d.p&&(!a||16384&i)&&dr(d,c,e,e[14],a?cr(c,e[14],i,null):ur(e[14]),null),(!a||128&i)&&Fr(n,"for",e[7]),(!a||4&i)&&Fr(n,"title",e[2]),(!a||2&i&&r!==(r=Oc(["PinturaRadioGroupOption",e[1]])))&&Fr(t,"class",r),(!a||32&i)&&Fr(t,"data-hidden",e[5]),(!a||64&i)&&Fr(t,"data-disabled",e[6]),(!a||16&i)&&Fr(t,"data-selected",e[4])},i(e){a||(Sa(d,e),a=!0)},o(e){ka(d,e),a=!1},d(e){e&&Tr(t),d&&d.d(e),s=!1,tr(l)}}}function yu(e,t,o){let i,n,{$$slots:r={},$$scope:a}=t,{name:s}=t,{class:l}=t,{label:c}=t,{id:d}=t,{value:u}=t,{checked:h}=t,{onkeydown:p}=t,{onclick:m}=t,{hidden:g=!1}=t,{disabled:$=!1}=t;const f=Object.values($u),y=ta("keysPressed");return ar(e,y,(e=>o(17,n=e))),e.$$set=e=>{"name"in e&&o(0,s=e.name),"class"in e&&o(1,l=e.class),"label"in e&&o(2,c=e.label),"id"in e&&o(11,d=e.id),"value"in e&&o(3,u=e.value),"checked"in e&&o(4,h=e.checked),"onkeydown"in e&&o(12,p=e.onkeydown),"onclick"in e&&o(13,m=e.onclick),"hidden"in e&&o(5,g=e.hidden),"disabled"in e&&o(6,$=e.disabled),"$$scope"in e&&o(14,a=e.$$scope)},e.$$.update=()=>{2049&e.$$.dirty&&o(7,i=`${s}-${d}`)},[s,l,c,u,h,g,$,i,y,e=>{p(e)},e=>{n.some((e=>f.includes(e)))||m(e)},d,p,m,a,r,function(t){oa.call(this,e,t)}]}class bu extends Ba{constructor(e){super(),Oa(this,e,yu,fu,ir,{name:0,class:1,label:2,id:11,value:3,checked:4,onkeydown:12,onclick:13,hidden:5,disabled:6})}}var xu=(e=[])=>e.reduce(((e,t)=>(Do(t)?Do(t[1]):t.options)?e.concat(Do(t)?t[1]:t.options):(e.push(t),e)),[]);const vu=(e,t,o)=>{let i;return Do(e)?i={id:t,value:e[0],label:e[1],...e[2]||{}}:(i=e,i.id=null!=i.id?i.id:t),o?o(i):i};var wu=(e,t,o)=>M(e)?e(t,o):e;const Su=(e,t)=>e.map((([e,o,i])=>{if(Do(o))return[wu(e,t),Su(o,t)];{const n=[e,wu(o,t)];if(i){let e={...i};i.icon&&(e.icon=wu(i.icon,t)),n.push(e)}return n}}));var ku=(e,t)=>Su(e,t),Cu=(e,t)=>Array.isArray(e)&&Array.isArray(t)?hs(e,t):e===t;function Tu(e,t,o){const i=e.slice();return i[27]=t[o],i}const Mu=e=>({option:1024&e[0]}),Ru=e=>({option:e[27]});function Pu(e,t,o){const i=e.slice();return i[27]=t[o],i}const Eu=e=>({option:1024&e[0]}),Iu=e=>({option:e[27]}),Au=e=>({option:1024&e[0]}),Lu=e=>({option:e[27]});function zu(e){let t,o,i,n,r,a=[],s=new Map,l=e[1]&&Fu(e),c=e[10];const d=e=>e[27].id;for(let t=0;t<c.length;t+=1){let o=Tu(e,c,t),i=d(o);s.set(i,a[t]=Zu(i,o))}return{c(){t=Mr("fieldset"),l&&l.c(),o=Er(),i=Mr("ul");for(let e=0;e<a.length;e+=1)a[e].c();Fr(i,"class","PinturaRadioGroupOptions"),Fr(t,"class",n=Oc(["PinturaRadioGroup",e[3]])),Fr(t,"data-layout",e[5]),Fr(t,"title",e[7])},m(e,n){Cr(e,t,n),l&&l.m(t,null),wr(t,o),wr(t,i);for(let e=0;e<a.length;e+=1)a[e].m(i,null);r=!0},p(e,u){e[1]?l?l.p(e,u):(l=Fu(e),l.c(),l.m(t,o)):l&&(l.d(1),l=null),8419153&u[0]&&(c=e[10],va(),a=Ea(a,u,d,1,e,c,s,i,Pa,Zu,null,Tu),wa()),(!r||8&u[0]&&n!==(n=Oc(["PinturaRadioGroup",e[3]])))&&Fr(t,"class",n),(!r||32&u[0])&&Fr(t,"data-layout",e[5]),(!r||128&u[0])&&Fr(t,"title",e[7])},i(e){if(!r){for(let e=0;e<c.length;e+=1)Sa(a[e]);r=!0}},o(e){for(let e=0;e<a.length;e+=1)ka(a[e]);r=!1},d(e){e&&Tr(t),l&&l.d();for(let e=0;e<a.length;e+=1)a[e].d()}}}function Fu(e){let t,o,i;return{c(){t=Mr("legend"),o=Pr(e[1]),Fr(t,"class",i=e[2]&&"implicit")},m(e,i){Cr(e,t,i),wr(t,o)},p(e,n){2&n[0]&&Br(o,e[1]),4&n[0]&&i!==(i=e[2]&&"implicit")&&Fr(t,"class",i)},d(e){e&&Tr(t)}}}function Du(e){let t,o;return t=new bu({props:{name:e[4],label:e[27].label,id:e[27].id,value:e[27].value,disabled:e[27].disabled,hidden:e[27].hidden,class:e[8],checked:e[12](e[27])===e[0],onkeydown:e[13](e[27]),onclick:e[14](e[27]),$$slots:{default:[_u]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.name=e[4]),1024&o[0]&&(i.label=e[27].label),1024&o[0]&&(i.id=e[27].id),1024&o[0]&&(i.value=e[27].value),1024&o[0]&&(i.disabled=e[27].disabled),1024&o[0]&&(i.hidden=e[27].hidden),256&o[0]&&(i.class=e[8]),1025&o[0]&&(i.checked=e[12](e[27])===e[0]),1024&o[0]&&(i.onkeydown=e[13](e[27])),1024&o[0]&&(i.onclick=e[14](e[27])),8389696&o[0]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Ou(e){let t,o,i,n,r,a,s=[],l=new Map;const c=e[22].group,d=sr(c,e,e[23],Lu),u=d||function(e){let t,o,i=e[27].label+"";return{c(){t=Mr("span"),o=Pr(i),Fr(t,"class","PinturaRadioGroupOptionGroupLabel")},m(e,i){Cr(e,t,i),wr(t,o)},p(e,t){1024&t[0]&&i!==(i=e[27].label+"")&&Br(o,i)},d(e){e&&Tr(t)}}}(e);let h=e[27].options;const p=e=>e[27].id;for(let t=0;t<h.length;t+=1){let o=Pu(e,h,t),i=p(o);l.set(i,s[t]=Gu(i,o))}return{c(){t=Mr("li"),u&&u.c(),o=Er(),i=Mr("ul");for(let e=0;e<s.length;e+=1)s[e].c();n=Er(),Fr(i,"class","PinturaRadioGroupOptions"),Fr(t,"class",r=Oc(["PinturaRadioGroupOptionGroup",e[9]]))},m(e,r){Cr(e,t,r),u&&u.m(t,null),wr(t,o),wr(t,i);for(let e=0;e<s.length;e+=1)s[e].m(i,null);wr(t,n),a=!0},p(e,o){d?d.p&&(!a||8389632&o[0])&&dr(d,c,e,e[23],a?cr(c,e[23],o,Au):ur(e[23]),Lu):u&&u.p&&(!a||1024&o[0])&&u.p(e,a?o:[-1,-1]),8418641&o[0]&&(h=e[27].options,va(),s=Ea(s,o,p,1,e,h,l,i,Pa,Gu,null,Pu),wa()),(!a||512&o[0]&&r!==(r=Oc(["PinturaRadioGroupOptionGroup",e[9]])))&&Fr(t,"class",r)},i(e){if(!a){Sa(u,e);for(let e=0;e<h.length;e+=1)Sa(s[e]);a=!0}},o(e){ka(u,e);for(let e=0;e<s.length;e+=1)ka(s[e]);a=!1},d(e){e&&Tr(t),u&&u.d(e);for(let e=0;e<s.length;e+=1)s[e].d()}}}function Bu(e){let t,o;return t=new ud({props:{$$slots:{default:[Wu]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};8389632&o[0]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Wu(e){let t,o=e[27].icon+"";return{c(){t=Rr("g")},m(e,i){Cr(e,t,i),t.innerHTML=o},p(e,i){1024&i[0]&&o!==(o=e[27].icon+"")&&(t.innerHTML=o)},d(e){e&&Tr(t)}}}function Vu(e){let t,o,i=e[27].label+"";return{c(){t=Mr("span"),o=Pr(i),Fr(t,"class",e[6])},m(e,i){Cr(e,t,i),wr(t,o)},p(e,n){1024&n[0]&&i!==(i=e[27].label+"")&&Br(o,i),64&n[0]&&Fr(t,"class",e[6])},d(e){e&&Tr(t)}}}function _u(e){let t;const o=e[22].option,i=sr(o,e,e[23],Ru),n=i||function(e){let t,o,i,n=e[27].icon&&Bu(e),r=!e[27].hideLabel&&Vu(e);return{c(){n&&n.c(),t=Er(),r&&r.c(),o=Er()},m(e,a){n&&n.m(e,a),Cr(e,t,a),r&&r.m(e,a),Cr(e,o,a),i=!0},p(e,i){e[27].icon?n?(n.p(e,i),1024&i[0]&&Sa(n,1)):(n=Bu(e),n.c(),Sa(n,1),n.m(t.parentNode,t)):n&&(va(),ka(n,1,1,(()=>{n=null})),wa()),e[27].hideLabel?r&&(r.d(1),r=null):r?r.p(e,i):(r=Vu(e),r.c(),r.m(o.parentNode,o))},i(e){i||(Sa(n),i=!0)},o(e){ka(n),i=!1},d(e){n&&n.d(e),e&&Tr(t),r&&r.d(e),e&&Tr(o)}}}(e);return{c(){n&&n.c()},m(e,o){n&&n.m(e,o),t=!0},p(e,r){i?i.p&&(!t||8389632&r[0])&&dr(i,o,e,e[23],t?cr(o,e[23],r,Mu):ur(e[23]),Ru):n&&n.p&&(!t||1088&r[0])&&n.p(e,t?r:[-1,-1])},i(e){t||(Sa(n,e),t=!0)},o(e){ka(n,e),t=!1},d(e){n&&n.d(e)}}}function Nu(e){let t,o;return t=new ud({props:{$$slots:{default:[Hu]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};8389632&o[0]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Hu(e){let t,o=e[27].icon+"";return{c(){t=Rr("g")},m(e,i){Cr(e,t,i),t.innerHTML=o},p(e,i){1024&i[0]&&o!==(o=e[27].icon+"")&&(t.innerHTML=o)},d(e){e&&Tr(t)}}}function ju(e){let t,o,i=e[27].label+"";return{c(){t=Mr("span"),o=Pr(i),Fr(t,"class",e[6])},m(e,i){Cr(e,t,i),wr(t,o)},p(e,n){1024&n[0]&&i!==(i=e[27].label+"")&&Br(o,i),64&n[0]&&Fr(t,"class",e[6])},d(e){e&&Tr(t)}}}function Uu(e){let t;const o=e[22].option,i=sr(o,e,e[23],Iu),n=i||function(e){let t,o,i,n=e[27].icon&&Nu(e),r=!e[27].hideLabel&&ju(e);return{c(){n&&n.c(),t=Er(),r&&r.c(),o=Er()},m(e,a){n&&n.m(e,a),Cr(e,t,a),r&&r.m(e,a),Cr(e,o,a),i=!0},p(e,i){e[27].icon?n?(n.p(e,i),1024&i[0]&&Sa(n,1)):(n=Nu(e),n.c(),Sa(n,1),n.m(t.parentNode,t)):n&&(va(),ka(n,1,1,(()=>{n=null})),wa()),e[27].hideLabel?r&&(r.d(1),r=null):r?r.p(e,i):(r=ju(e),r.c(),r.m(o.parentNode,o))},i(e){i||(Sa(n),i=!0)},o(e){ka(n),i=!1},d(e){n&&n.d(e),e&&Tr(t),r&&r.d(e),e&&Tr(o)}}}(e);return{c(){n&&n.c()},m(e,o){n&&n.m(e,o),t=!0},p(e,r){i?i.p&&(!t||8389632&r[0])&&dr(i,o,e,e[23],t?cr(o,e[23],r,Eu):ur(e[23]),Iu):n&&n.p&&(!t||1088&r[0])&&n.p(e,t?r:[-1,-1])},i(e){t||(Sa(n,e),t=!0)},o(e){ka(n,e),t=!1},d(e){n&&n.d(e)}}}function Gu(e,t){let o,i,n;return i=new bu({props:{name:t[4],label:t[27].label,id:t[27].id,value:t[27].value,disabled:t[27].disabled,hidden:t[27].hidden,class:t[8],checked:t[12](t[27])===t[0],onkeydown:t[13](t[27]),onclick:t[14](t[27]),$$slots:{default:[Uu]},$$scope:{ctx:t}}}),{key:e,first:null,c(){o=Ir(),za(i.$$.fragment),this.first=o},m(e,t){Cr(e,o,t),Fa(i,e,t),n=!0},p(e,o){t=e;const n={};16&o[0]&&(n.name=t[4]),1024&o[0]&&(n.label=t[27].label),1024&o[0]&&(n.id=t[27].id),1024&o[0]&&(n.value=t[27].value),1024&o[0]&&(n.disabled=t[27].disabled),1024&o[0]&&(n.hidden=t[27].hidden),256&o[0]&&(n.class=t[8]),1025&o[0]&&(n.checked=t[12](t[27])===t[0]),1024&o[0]&&(n.onkeydown=t[13](t[27])),1024&o[0]&&(n.onclick=t[14](t[27])),8389696&o[0]&&(n.$$scope={dirty:o,ctx:t}),i.$set(n)},i(e){n||(Sa(i.$$.fragment,e),n=!0)},o(e){ka(i.$$.fragment,e),n=!1},d(e){e&&Tr(o),Da(i,e)}}}function Zu(e,t){let o,i,n,r,a;const s=[Ou,Du],l=[];function c(e,t){return e[27].options?0:1}return i=c(t),n=l[i]=s[i](t),{key:e,first:null,c(){o=Ir(),n.c(),r=Ir(),this.first=o},m(e,t){Cr(e,o,t),l[i].m(e,t),Cr(e,r,t),a=!0},p(e,o){let a=i;i=c(t=e),i===a?l[i].p(t,o):(va(),ka(l[a],1,1,(()=>{l[a]=null})),wa(),n=l[i],n?n.p(t,o):(n=l[i]=s[i](t),n.c()),Sa(n,1),n.m(r.parentNode,r))},i(e){a||(Sa(n),a=!0)},o(e){ka(n),a=!1},d(e){e&&Tr(o),l[i].d(e),e&&Tr(r)}}}function Xu(e){let t,o,i,n=e[11].length&&zu(e);return{c(){n&&n.c(),t=Er(),o=Ir()},m(e,r){n&&n.m(e,r),Cr(e,t,r),Cr(e,o,r),i=!0},p(e,o){e[11].length?n?(n.p(e,o),2048&o[0]&&Sa(n,1)):(n=zu(e),n.c(),Sa(n,1),n.m(t.parentNode,t)):n&&(va(),ka(n,1,1,(()=>{n=null})),wa())},i(e){i||(Sa(n),Sa(!1),i=!0)},o(e){ka(n),ka(!1),i=!1},d(e){n&&n.d(e),e&&Tr(t),e&&Tr(o)}}}function Yu(e,t,o){let i,n,r,{$$slots:a={},$$scope:s}=t;const l=Qr();let{label:c}=t,{hideLabel:d=!0}=t,{class:u}=t,{name:h="radio-group-"+I()}=t,{selectedIndex:p=-1}=t,{options:m=[]}=t,{onchange:g}=t,{layout:$}=t,{optionMapper:f}=t,{optionFilter:y}=t,{value:b}=t,{optionLabelClass:x}=t,{title:v}=t,{locale:w}=t,{optionClass:S}=t,{optionGroupClass:k}=t;const C=e=>r.findIndex((t=>t.id===e.id)),T=(e,t)=>{o(0,p=C(e));const i={index:p,...e};((e,...t)=>{e&&e(...t)})(g,i,t),l("change",i)};return e.$$set=e=>{"label"in e&&o(1,c=e.label),"hideLabel"in e&&o(2,d=e.hideLabel),"class"in e&&o(3,u=e.class),"name"in e&&o(4,h=e.name),"selectedIndex"in e&&o(0,p=e.selectedIndex),"options"in e&&o(15,m=e.options),"onchange"in e&&o(16,g=e.onchange),"layout"in e&&o(5,$=e.layout),"optionMapper"in e&&o(17,f=e.optionMapper),"optionFilter"in e&&o(18,y=e.optionFilter),"value"in e&&o(19,b=e.value),"optionLabelClass"in e&&o(6,x=e.optionLabelClass),"title"in e&&o(7,v=e.title),"locale"in e&&o(20,w=e.locale),"optionClass"in e&&o(8,S=e.optionClass),"optionGroupClass"in e&&o(9,k=e.optionGroupClass),"$$scope"in e&&o(23,s=e.$$scope)},e.$$.update=()=>{1343488&e.$$.dirty[0]&&o(11,i=ku(y?m.filter(y):m,w)),133120&e.$$.dirty[0]&&o(10,n=((e=[],t)=>{let o=0;return e.map((e=>(o++,Do(e)?Do(e[1])?{id:o,label:e[0],options:e[1].map((e=>vu(e,++o,t)))}:vu(e,o,t):e.options?{id:e.id||o,label:e.label,options:e.options.map((e=>vu(e,++o,t)))}:vu(e,o,t))))})(i,f)),1024&e.$$.dirty[0]&&o(21,r=xu(n)),2654209&e.$$.dirty[0]&&p<0&&(o(0,p=r.findIndex((e=>Cu(e.value,b)))),p<0&&o(0,p=(e=>e.findIndex((e=>void 0===e[0])))(m)))},[p,c,d,u,h,$,x,v,S,k,n,i,C,e=>t=>{var o;o=t.key,/enter| /i.test(o)&&T(e,t)},e=>t=>{T(e,t)},m,g,f,y,b,w,r,a,s]}class qu extends Ba{constructor(e){super(),Oa(this,e,Yu,Xu,ir,{label:1,hideLabel:2,class:3,name:4,selectedIndex:0,options:15,onchange:16,layout:5,optionMapper:17,optionFilter:18,value:19,optionLabelClass:6,title:7,locale:20,optionClass:8,optionGroupClass:9},null,[-1,-1])}}function Ku(e){let t,o,i,n,r,a,s,l,c,d;return{c(){t=Mr("div"),o=Mr("button"),i=Pr("▲"),r=Er(),a=Mr("button"),s=Pr("▼"),Fr(o,"type","button"),Fr(o,"tabindex","-1"),Fr(o,"aria-label",n="increase "+e[7]),Fr(a,"type","button"),Fr(a,"tabindex","-1"),Fr(a,"aria-label",l="decrease "+e[7]),Fr(t,"class","PinturaInputSpinners")},m(n,l){Cr(n,t,l),wr(t,o),wr(o,i),wr(t,r),wr(t,a),wr(a,s),c||(d=[Ar(o,"click",e[17]),Ar(a,"click",e[18])],c=!0)},p(e,t){128&t&&n!==(n="increase "+e[7])&&Fr(o,"aria-label",n),128&t&&l!==(l="decrease "+e[7])&&Fr(a,"aria-label",l)},d(e){e&&Tr(t),c=!1,tr(d)}}}function Ju(e){let t,o,i,n,r,a,s="number"===e[1]&&e[9]&&Ku(e);return{c(){t=Mr("div"),o=Mr("input"),n=Er(),s&&s.c(),Fr(o,"class","PinturaInputField"),Fr(o,"title",e[7]),Fr(o,"type",e[1]),Fr(o,"min",e[4]),Fr(o,"max",e[5]),Fr(o,"step",e[6]),Fr(o,"inputmode",e[3]),o.value=i=e[14]?e[13]:e[0],Fr(o,"style",e[11]),Fr(o,"placeholder",e[8]),Fr(o,"maxlength",e[12]),o.disabled=e[2],Fr(o,"spellcheck","false"),Fr(o,"autocorrect","off"),Fr(o,"autocapitalize","off"),Fr(t,"class","PinturaInput")},m(i,l){Cr(i,t,l),wr(t,o),e[27](o),wr(t,n),s&&s.m(t,null),r||(a=[Ar(o,"input",e[16]),Ar(o,"blur",(function(){or(e[14]&&e[15])&&(e[14]&&e[15]).apply(this,arguments)})),Ar(o,"keydown",e[19]),Ar(o,"keyup",e[20])],r=!0)},p(n,[r]){e=n,128&r&&Fr(o,"title",e[7]),2&r&&Fr(o,"type",e[1]),16&r&&Fr(o,"min",e[4]),32&r&&Fr(o,"max",e[5]),64&r&&Fr(o,"step",e[6]),8&r&&Fr(o,"inputmode",e[3]),24577&r&&i!==(i=e[14]?e[13]:e[0])&&o.value!==i&&(o.value=i),2048&r&&Fr(o,"style",e[11]),256&r&&Fr(o,"placeholder",e[8]),4096&r&&Fr(o,"maxlength",e[12]),4&r&&(o.disabled=e[2]),"number"===e[1]&&e[9]?s?s.p(e,r):(s=Ku(e),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},i:qn,o:qn,d(o){o&&Tr(t),e[27](null),s&&s.d(),r=!1,tr(a)}}}function Qu(e,t,o){let i,r,a,s,l,c,d,{value:u}=t,{type:h="text"}=t,{disabled:p=!1}=t,{inputmode:m}=t,{min:g}=t,{max:$}=t,{step:f}=t,{onchange:y=n}=t,{onkeydown:b=n}=t,{title:x}=t,{stepMultiplier:v=10}=t,{placeholder:w}=t,{enableSpinButtons:S=!0}=t,{enableStopPropagation:k=!1}=t;const C=()=>{let e=c.value;return"number"===h&&(e="numeric"===m?parseInt(e,10):parseFloat(e),!Lo(e)||Number.isNaN(e)?e=g||0:i&&(e=ss(e,g,$))),e};let T=u;const M=()=>{const e=ss(C()+(d?f*v:f),g,$);e!==u&&(o(25,T=e),o(0,u=e),y(u))},R=()=>{const e=ss(C()-(d?f*v:f),g,$);e!==u&&(o(25,T=e),o(0,u=e),y(u))};return e.$$set=e=>{"value"in e&&o(0,u=e.value),"type"in e&&o(1,h=e.type),"disabled"in e&&o(2,p=e.disabled),"inputmode"in e&&o(3,m=e.inputmode),"min"in e&&o(4,g=e.min),"max"in e&&o(5,$=e.max),"step"in e&&o(6,f=e.step),"onchange"in e&&o(21,y=e.onchange),"onkeydown"in e&&o(22,b=e.onkeydown),"title"in e&&o(7,x=e.title),"stepMultiplier"in e&&o(23,v=e.stepMultiplier),"placeholder"in e&&o(8,w=e.placeholder),"enableSpinButtons"in e&&o(9,S=e.enableSpinButtons),"enableStopPropagation"in e&&o(24,k=e.enableStopPropagation)},e.$$.update=()=>{48&e.$$.dirty&&o(14,i=Lo(g)&&Lo($)),33555457&e.$$.dirty&&o(13,r=c===document.activeElement?T:u),32&e.$$.dirty&&o(26,a=$?($+"").length:void 0),67108872&e.$$.dirty&&o(12,s="numeric"===m&&a?a:void 0),67108864&e.$$.dirty&&o(11,l=a?`min-width:${a}em`:void 0)},[u,h,p,m,g,$,f,x,w,S,c,l,s,r,i,()=>{o(25,T=C()),y(u)},()=>{o(25,T=c.value),y(C())},M,R,e=>{d=e.shiftKey,b(e);const{key:t}=e;k&&e.stopPropagation(),/up|down/i.test(t)&&(/up/i.test(t)&&M(),/down/i.test(t)&&R(),e.preventDefault(),e.stopPropagation())},e=>{const{key:t}=e;/up|down/i.test(t)&&(e.preventDefault(),e.stopPropagation())},y,b,v,k,T,a,function(e){na[e?"unshift":"push"]((()=>{c=e,o(10,c)}))}]}class eh extends Ba{constructor(e){super(),Oa(this,e,Qu,Ju,ir,{value:0,type:1,disabled:2,inputmode:3,min:4,max:5,step:6,onchange:21,onkeydown:22,title:7,stepMultiplier:23,placeholder:8,enableSpinButtons:9,enableStopPropagation:24})}}const th=e=>({}),oh=e=>({});function ih(e){let t,o,i,n,r=(e[2]||e[21])+"",a=e[6]&&rh(e);return{c(){a&&a.c(),t=Er(),o=Mr("span"),Fr(o,"class",i=Oc(["PinturaButtonLabel",e[3],e[5]&&"implicit"]))},m(e,i){a&&a.m(e,i),Cr(e,t,i),Cr(e,o,i),o.innerHTML=r,n=!0},p(e,s){e[6]?a?(a.p(e,s),64&s[0]&&Sa(a,1)):(a=rh(e),a.c(),Sa(a,1),a.m(t.parentNode,t)):a&&(va(),ka(a,1,1,(()=>{a=null})),wa()),(!n||2097156&s[0])&&r!==(r=(e[2]||e[21])+"")&&(o.innerHTML=r),(!n||40&s[0]&&i!==(i=Oc(["PinturaButtonLabel",e[3],e[5]&&"implicit"])))&&Fr(o,"class",i)},i(e){n||(Sa(a),n=!0)},o(e){ka(a),n=!1},d(e){a&&a.d(e),e&&Tr(t),e&&Tr(o)}}}function nh(e){let t,o;return t=new eh({props:{value:e[10],onchange:e[17],enableStopPropagation:!0,type:"number",inputmode:"numeric",min:e[8].reduce($h,1/0),max:e[8].reduce(fh,-1/0),enableSpinButtons:!1}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};1024&o[0]&&(i.value=e[10]),131072&o[0]&&(i.onchange=e[17]),256&o[0]&&(i.min=e[8].reduce($h,1/0)),256&o[0]&&(i.max=e[8].reduce(fh,-1/0)),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function rh(e){let t,o;return t=new ud({props:{class:"PinturaButtonIcon",$$slots:{default:[ah]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};536870976&o[0]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function ah(e){let t;return{c(){t=Rr("g")},m(o,i){Cr(o,t,i),t.innerHTML=e[6]},p(e,o){64&o[0]&&(t.innerHTML=e[6])},d(e){e&&Tr(t)}}}function sh(e){let t,o,i,n,r,a;const s=[nh,ih],l=[];function c(e,t){return e[18]?0:1}return o=c(e),i=l[o]=s[o](e),{c(){t=Mr("span"),i.c(),Fr(t,"slot","label"),Fr(t,"title",n=wu(e[1],e[16])),Fr(t,"class",r=Oc(["PinturaButtonInner",e[18]&&"PinturaComboBox",e[4]]))},m(e,i){Cr(e,t,i),l[o].m(t,null),a=!0},p(e,d){let u=o;o=c(e),o===u?l[o].p(e,d):(va(),ka(l[u],1,1,(()=>{l[u]=null})),wa(),i=l[o],i?i.p(e,d):(i=l[o]=s[o](e),i.c()),Sa(i,1),i.m(t,null)),(!a||65538&d[0]&&n!==(n=wu(e[1],e[16])))&&Fr(t,"title",n),(!a||262160&d[0]&&r!==(r=Oc(["PinturaButtonInner",e[18]&&"PinturaComboBox",e[4]])))&&Fr(t,"class",r)},i(e){a||(Sa(i),a=!0)},o(e){ka(i),a=!1},d(e){e&&Tr(t),l[o].d()}}}function lh(e){let t,o,i=e[31].label+"";return{c(){t=Mr("span"),o=Pr(i),Fr(t,"slot","group")},m(e,i){Cr(e,t,i),wr(t,o)},p(e,t){1&t[1]&&i!==(i=e[31].label+"")&&Br(o,i)},d(e){e&&Tr(t)}}}function ch(e){let t,o;return t=new ud({props:{style:M(e[14])?e[14](e[31].value):e[14],$$slots:{default:[dh]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};16384&o[0]|1&o[1]&&(i.style=M(e[14])?e[14](e[31].value):e[14]),536870912&o[0]|1&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function dh(e){let t,o=e[31].icon+"";return{c(){t=Rr("g")},m(e,i){Cr(e,t,i),t.innerHTML=o},p(e,i){1&i[1]&&o!==(o=e[31].icon+"")&&(t.innerHTML=o)},d(e){e&&Tr(t)}}}function uh(e){let t,o,i,n,r,a=e[31].label+"",s=e[31].sublabel&&hh(e);return{c(){t=Mr("span"),o=new _r(!1),i=Er(),s&&s.c(),o.a=i,Fr(t,"style",n=M(e[15])?e[15](e[31].value):e[15]),Fr(t,"class",r=Oc(["PinturaDropdownOptionLabel",e[11]]))},m(e,n){Cr(e,t,n),o.m(a,t),wr(t,i),s&&s.m(t,null)},p(e,i){1&i[1]&&a!==(a=e[31].label+"")&&o.p(a),e[31].sublabel?s?s.p(e,i):(s=hh(e),s.c(),s.m(t,null)):s&&(s.d(1),s=null),32768&i[0]|1&i[1]&&n!==(n=M(e[15])?e[15](e[31].value):e[15])&&Fr(t,"style",n),2048&i[0]&&r!==(r=Oc(["PinturaDropdownOptionLabel",e[11]]))&&Fr(t,"class",r)},d(e){e&&Tr(t),s&&s.d()}}}function hh(e){let t,o=e[31].sublabel+"";return{c(){t=Mr("span"),Fr(t,"class","PinturaDropdownOptionSublabel")},m(e,i){Cr(e,t,i),t.innerHTML=o},p(e,i){1&i[1]&&o!==(o=e[31].sublabel+"")&&(t.innerHTML=o)},d(e){e&&Tr(t)}}}function ph(e){let t,o,i,n=e[31].icon&&ch(e),r=!e[31].hideLabel&&uh(e);return{c(){t=Mr("span"),n&&n.c(),o=Er(),r&&r.c(),Fr(t,"slot","option")},m(e,a){Cr(e,t,a),n&&n.m(t,null),wr(t,o),r&&r.m(t,null),i=!0},p(e,i){e[31].icon?n?(n.p(e,i),1&i[1]&&Sa(n,1)):(n=ch(e),n.c(),Sa(n,1),n.m(t,o)):n&&(va(),ka(n,1,1,(()=>{n=null})),wa()),e[31].hideLabel?r&&(r.d(1),r=null):r?r.p(e,i):(r=uh(e),r.c(),r.m(t,null))},i(e){i||(Sa(n),i=!0)},o(e){ka(n),i=!1},d(e){e&&Tr(t),n&&n.d(),r&&r.d()}}}function mh(e){let t,o,i,n,r,a;const s=e[27].controls,l=sr(s,e,e[29],oh);return i=new qu({props:{class:"PinturaOptionsList PinturaScrollableContent",name:e[7],value:e[10],selectedIndex:e[9],optionFilter:e[12],optionMapper:e[13],optionLabelClass:Oc(["PinturaDropdownOptionLabel",e[11]]),optionGroupClass:"PinturaListOptionGroup",optionClass:"PinturaListOption",options:e[19],onchange:e[22],$$slots:{option:[ph,({option:e})=>({31:e}),({option:e})=>[0,e?1:0]],group:[lh,({option:e})=>({31:e}),({option:e})=>[0,e?1:0]]},$$scope:{ctx:e}}}),{c(){t=Mr("div"),l&&l.c(),o=Er(),za(i.$$.fragment),Fr(t,"slot","details"),Fr(t,"class","PinturaOptionsListWrapper")},m(s,c){Cr(s,t,c),l&&l.m(t,null),wr(t,o),Fa(i,t,null),n=!0,r||(a=Ar(t,"keydown",e[24]),r=!0)},p(e,t){l&&l.p&&(!n||536870912&t[0])&&dr(l,s,e,e[29],n?cr(s,e[29],t,th):ur(e[29]),oh);const o={};128&t[0]&&(o.name=e[7]),1024&t[0]&&(o.value=e[10]),512&t[0]&&(o.selectedIndex=e[9]),4096&t[0]&&(o.optionFilter=e[12]),8192&t[0]&&(o.optionMapper=e[13]),2048&t[0]&&(o.optionLabelClass=Oc(["PinturaDropdownOptionLabel",e[11]])),524288&t[0]&&(o.options=e[19]),536922112&t[0]|1&t[1]&&(o.$$scope={dirty:t,ctx:e}),i.$set(o)},i(e){n||(Sa(l,e),Sa(i.$$.fragment,e),n=!0)},o(e){ka(l,e),ka(i.$$.fragment,e),n=!1},d(e){e&&Tr(t),l&&l.d(e),Da(i),r=!1,a()}}}function gh(e){let t,o,i;function n(t){e[28](t)}let r={onshow:e[23],buttonClass:Oc(["PinturaDropdownButton",e[0],e[5]&&"PinturaDropdownIconOnly"]),$$slots:{details:[mh],label:[sh]},$$scope:{ctx:e}};return void 0!==e[20]&&(r.isActive=e[20]),t=new gu({props:r}),na.push((()=>La(t,"isActive",n))),{c(){za(t.$$.fragment)},m(e,o){Fa(t,e,o),i=!0},p(e,i){const n={};33&i[0]&&(n.buttonClass=Oc(["PinturaDropdownButton",e[0],e[5]&&"PinturaDropdownIconOnly"])),540016638&i[0]&&(n.$$scope={dirty:i,ctx:e}),!o&&1048576&i[0]&&(o=!0,n.isActive=e[20],ha((()=>o=!1))),t.$set(n)},i(e){i||(Sa(t.$$.fragment,e),i=!0)},o(e){ka(t.$$.fragment,e),i=!1},d(e){Da(t,e)}}}const $h=(e,[t])=>t<e?t:e,fh=(e,[t])=>t>e?t:e;function yh(e,t,o){let i,r,P,{$$slots:a={},$$scope:s}=t,{class:l}=t,{title:c}=t,{label:d}=t,{labelClass:u}=t,{innerClass:h}=t,{hideLabel:p=!1}=t,{icon:m}=t,{name:g}=t,{options:$=[]}=t,{selectedIndex:f=-1}=t,{value:y}=t,{optionLabelClass:b}=t,{optionFilter:x}=t,{optionMapper:v}=t,{optionIconStyle:w}=t,{optionLabelStyle:S}=t,{locale:k}=t,{onchange:C=n}=t,{onload:T=n}=t,{ondestroy:M=n}=t,{enableInput:R=!1}=t;return qr((()=>T({options:$}))),Jr((()=>M({options:$}))),e.$$set=e=>{"class"in e&&o(0,l=e.class),"title"in e&&o(1,c=e.title),"label"in e&&o(2,d=e.label),"labelClass"in e&&o(3,u=e.labelClass),"innerClass"in e&&o(4,h=e.innerClass),"hideLabel"in e&&o(5,p=e.hideLabel),"icon"in e&&o(6,m=e.icon),"name"in e&&o(7,g=e.name),"options"in e&&o(8,$=e.options),"selectedIndex"in e&&o(9,f=e.selectedIndex),"value"in e&&o(10,y=e.value),"optionLabelClass"in e&&o(11,b=e.optionLabelClass),"optionFilter"in e&&o(12,x=e.optionFilter),"optionMapper"in e&&o(13,v=e.optionMapper),"optionIconStyle"in e&&o(14,w=e.optionIconStyle),"optionLabelStyle"in e&&o(15,S=e.optionLabelStyle),"locale"in e&&o(16,k=e.locale),"onchange"in e&&o(17,C=e.onchange),"onload"in e&&o(25,T=e.onload),"ondestroy"in e&&o(26,M=e.ondestroy),"enableInput"in e&&o(18,R=e.enableInput),"$$scope"in e&&o(29,s=e.$$scope)},e.$$.update=()=>{65792&e.$$.dirty[0]&&o(19,i=k?ku($,k):$),525312&e.$$.dirty[0]&&o(21,r=i.reduce(((e,t)=>{if(e)return e;const o=Array.isArray(t)?t:[t,t],[i,n]=o;return Cu(i,y)?n:void 0}),void 0)||(e=>{const t=e.find((e=>void 0===e[0]));if(t)return t[1]})(i)||y)},[l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,R,i,P,r,e=>{o(21,r=e.value),C(e),o(20,P=!1)},({e,panel:t})=>{if(e&&e.key&&/up|down/i.test(e.key))return ou(t.querySelector("input:not([disabled])"));ou(t.querySelector("fieldset"))},e=>{/tab/i.test(e.key)&&e.preventDefault()},T,M,a,function(e){P=e,o(20,P)},s]}class bh extends Ba{constructor(e){super(),Oa(this,e,yh,gh,ir,{class:0,title:1,label:2,labelClass:3,innerClass:4,hideLabel:5,icon:6,name:7,options:8,selectedIndex:9,value:10,optionLabelClass:11,optionFilter:12,optionMapper:13,optionIconStyle:14,optionLabelStyle:15,locale:16,onchange:17,onload:25,ondestroy:26,enableInput:18},null,[-1,-1])}}function xh(e){let t;return{c(){t=Mr("div"),Fr(t,"slot","details")},m(o,i){Cr(o,t,i),e[14](t)},p:qn,d(o){o&&Tr(t),e[14](null)}}}function vh(e){let t,o,i;function n(t){e[15](t)}let r={buttonLabel:e[0],buttonClass:e[1],buttonIcon:e[2],buttonHideLabel:e[3],buttonTitle:e[4],buttonLabelClass:e[5],onshow:e[6],onhide:e[7],$$slots:{details:[xh]},$$scope:{ctx:e}};return void 0!==e[9]&&(r.isActive=e[9]),t=new gu({props:r}),na.push((()=>La(t,"isActive",n))),{c(){za(t.$$.fragment)},m(e,o){Fa(t,e,o),i=!0},p(e,[i]){const n={};1&i&&(n.buttonLabel=e[0]),2&i&&(n.buttonClass=e[1]),4&i&&(n.buttonIcon=e[2]),8&i&&(n.buttonHideLabel=e[3]),16&i&&(n.buttonTitle=e[4]),32&i&&(n.buttonLabelClass=e[5]),64&i&&(n.onshow=e[6]),128&i&&(n.onhide=e[7]),65792&i&&(n.$$scope={dirty:i,ctx:e}),!o&&512&i&&(o=!0,n.isActive=e[9],ha((()=>o=!1))),t.$set(n)},i(e){i||(Sa(t.$$.fragment,e),i=!0)},o(e){ka(t.$$.fragment,e),i=!1},d(e){Da(t,e)}}}function wh(e,t,o){let m,{buttonLabel:i}=t,{buttonClass:r}=t,{buttonIcon:a}=t,{buttonHideLabel:s}=t,{buttonTitle:l}=t,{buttonLabelClass:c}=t,{root:d}=t,{ondestroy:u=n}=t,{onshow:h=n}=t,{onhide:p=n}=t,g=!1;return Jr(u),e.$$set=e=>{"buttonLabel"in e&&o(0,i=e.buttonLabel),"buttonClass"in e&&o(1,r=e.buttonClass),"buttonIcon"in e&&o(2,a=e.buttonIcon),"buttonHideLabel"in e&&o(3,s=e.buttonHideLabel),"buttonTitle"in e&&o(4,l=e.buttonTitle),"buttonLabelClass"in e&&o(5,c=e.buttonLabelClass),"root"in e&&o(10,d=e.root),"ondestroy"in e&&o(11,u=e.ondestroy),"onshow"in e&&o(6,h=e.onshow),"onhide"in e&&o(7,p=e.onhide)},e.$$.update=()=>{1280&e.$$.dirty&&m&&d&&m.firstChild!==d&&(m.hasChildNodes()?m.replaceChild(d,m.firstChild):m.append(d))},[i,r,a,s,l,c,h,p,m,g,d,u,()=>o(9,g=!1),()=>o(9,g=!0),function(e){na[e?"unshift":"push"]((()=>{m=e,o(8,m)}))},function(e){g=e,o(9,g)}]}class Sh extends Ba{constructor(e){super(),Oa(this,e,wh,vh,ir,{buttonLabel:0,buttonClass:1,buttonIcon:2,buttonHideLabel:3,buttonTitle:4,buttonLabelClass:5,root:10,ondestroy:11,onshow:6,onhide:7,hide:12,show:13})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}}var kh=(e,t,o)=>(e-t)/(o-t);const Ch=e=>({}),Th=e=>({});function Mh(e){let t,o,i,n,r,a,s,l;return o=new ud({props:{$$slots:{default:[Rh]},$$scope:{ctx:e}}}),r=new ud({props:{$$slots:{default:[Ph]},$$scope:{ctx:e}}}),{c(){t=Mr("button"),za(o.$$.fragment),i=Er(),n=Mr("button"),za(r.$$.fragment),Fr(t,"type","button"),Fr(t,"aria-label","Increase"),Fr(n,"type","button"),Fr(n,"aria-label","Decrease")},m(c,d){Cr(c,t,d),Fa(o,t,null),Cr(c,i,d),Cr(c,n,d),Fa(r,n,null),a=!0,s||(l=[Ar(t,"pointerdown",e[20](1)),Ar(n,"pointerdown",e[20](-1))],s=!0)},p(e,t){const i={};128&t[1]&&(i.$$scope={dirty:t,ctx:e}),o.$set(i);const n={};128&t[1]&&(n.$$scope={dirty:t,ctx:e}),r.$set(n)},i(e){a||(Sa(o.$$.fragment,e),Sa(r.$$.fragment,e),a=!0)},o(e){ka(o.$$.fragment,e),ka(r.$$.fragment,e),a=!1},d(e){e&&Tr(t),Da(o),e&&Tr(i),e&&Tr(n),Da(r),s=!1,tr(l)}}}function Rh(e){let t;return{c(){t=Rr("path"),Fr(t,"d","M8 12 h8 M12 8 v8")},m(e,o){Cr(e,t,o)},p:qn,d(e){e&&Tr(t)}}}function Ph(e){let t;return{c(){t=Rr("path"),Fr(t,"d","M9 12 h6")},m(e,o){Cr(e,t,o)},p:qn,d(e){e&&Tr(t)}}}function Eh(e){let t,o,i,n,r,a,s,l,c,d,u,h,p,m,g,$,f;const y=e[36].default,b=sr(y,e,e[38],null),x=e[36].knob,v=sr(x,e,e[38],Th);let w=e[9]&&Mh(e);return{c(){t=Mr("div"),o=Mr("div"),i=Mr("input"),r=Er(),a=Mr("div"),b&&b.c(),l=Er(),c=Mr("div"),d=Mr("div"),v&&v.c(),p=Er(),w&&w.c(),Fr(i,"type","range"),Fr(i,"id",e[3]),Fr(i,"min",e[0]),Fr(i,"max",e[1]),Fr(i,"step",e[2]),i.value=e[14],Fr(i,"style",n=e[10]?"pointer-events:none":""),Fr(a,"class",s=Oc(["PinturaSliderTrack",e[5]])),Fr(a,"style",e[4]),Fr(d,"class",u=Oc(["PinturaSliderKnob",e[7]])),Fr(d,"style",e[6]),Fr(c,"class","PinturaSliderKnobController"),Fr(c,"style",e[17]),Fr(o,"class","PinturaSliderControl"),Fr(o,"style",h="--slider-position:"+Math.round(e[15])),Fr(t,"class",m=Oc(["PinturaSlider",e[12]])),Fr(t,"data-direction",e[8])},m(n,s){Cr(n,t,s),wr(t,o),wr(o,i),e[37](i),wr(o,r),wr(o,a),b&&b.m(a,null),wr(o,l),wr(o,c),wr(c,d),v&&v.m(d,null),wr(t,p),w&&w.m(t,null),g=!0,$||(f=[Ar(i,"input",e[18]),Ar(i,"nudge",e[19]),gr(Sd.call(null,i)),Ar(o,"pointerdown",(function(){or(e[11]&&e[13])&&(e[11]&&e[13]).apply(this,arguments)}))],$=!0)},p(r,l){e=r,(!g||8&l[0])&&Fr(i,"id",e[3]),(!g||1&l[0])&&Fr(i,"min",e[0]),(!g||2&l[0])&&Fr(i,"max",e[1]),(!g||4&l[0])&&Fr(i,"step",e[2]),(!g||16384&l[0])&&(i.value=e[14]),(!g||1024&l[0]&&n!==(n=e[10]?"pointer-events:none":""))&&Fr(i,"style",n),b&&b.p&&(!g||128&l[1])&&dr(b,y,e,e[38],g?cr(y,e[38],l,null):ur(e[38]),null),(!g||32&l[0]&&s!==(s=Oc(["PinturaSliderTrack",e[5]])))&&Fr(a,"class",s),(!g||16&l[0])&&Fr(a,"style",e[4]),v&&v.p&&(!g||128&l[1])&&dr(v,x,e,e[38],g?cr(x,e[38],l,Ch):ur(e[38]),Th),(!g||128&l[0]&&u!==(u=Oc(["PinturaSliderKnob",e[7]])))&&Fr(d,"class",u),(!g||64&l[0])&&Fr(d,"style",e[6]),(!g||131072&l[0])&&Fr(c,"style",e[17]),(!g||32768&l[0]&&h!==(h="--slider-position:"+Math.round(e[15])))&&Fr(o,"style",h),e[9]?w?(w.p(e,l),512&l[0]&&Sa(w,1)):(w=Mh(e),w.c(),Sa(w,1),w.m(t,null)):w&&(va(),ka(w,1,1,(()=>{w=null})),wa()),(!g||4096&l[0]&&m!==(m=Oc(["PinturaSlider",e[12]])))&&Fr(t,"class",m),(!g||256&l[0])&&Fr(t,"data-direction",e[8])},i(e){g||(Sa(b,e),Sa(v,e),Sa(w),g=!0)},o(e){ka(b,e),ka(v,e),ka(w),g=!1},d(o){o&&Tr(t),e[37](null),b&&b.d(o),v&&v.d(o),w&&w.d(),$=!1,tr(f)}}}function Ih(e,t,o){let i,r,a,s,l,c,d,u,h,p,m,g,$,f,y,{$$slots:b={},$$scope:x}=t,{min:v=0}=t,{max:w=100}=t,{step:S=1}=t,{id:k}=t,{value:C=0}=t,{valueMin:M}=t,{valueMax:R}=t,{trackStyle:P}=t,{trackClass:E}=t,{knobStyle:I}=t,{knobClass:A}=t,{ongrab:L=n}=t,{onchange:z=n}=t,{onrelease:F=n}=t,{onexceed:D=n}=t,{direction:O="x"}=t,{getValue:B=Z}=t,{setValue:W=Z}=t,{enableSpinButtons:V=!0}=t,{enableForceUseKnob:_=!1}=t,{enableStopPropagation:N=!0}=t,{enablePointerdownListener:H=!0}=t,{maxInteractionDistance:j=6}=t,{class:U}=t;const G=e=>W(((e,t)=>(t=1/t,Math.round(e*t)/t))(ss(e,v,w),S),C),X=(e,t,i={})=>{const{grabbed:n=!1,released:a=!1}=i,s=G(v+e/t*r),l=M||v,c=R||w;o(21,C=T(s)?s:ss(s,l,c)),y!==s&&(y=s,!T(s)&&(s<l||s>c)&&D(C,s),C!==f&&(f=C,n&&L(C),z(C),a&&F(C)))};let Y;const q=e=>{const t=e[u]-$;X(g+t,m)},K=e=>{m=void 0,document.documentElement.removeEventListener("pointermove",q),document.documentElement.removeEventListener("pointerup",K),z(C),F(C)},J=()=>{o(21,C=G(i+ee*S)),z(C)};let Q,ee=1,te=!1;const oe=e=>{clearTimeout(Q),te||J(),F(C),document.removeEventListener("pointerup",oe)};return e.$$set=e=>{"min"in e&&o(0,v=e.min),"max"in e&&o(1,w=e.max),"step"in e&&o(2,S=e.step),"id"in e&&o(3,k=e.id),"value"in e&&o(21,C=e.value),"valueMin"in e&&o(22,M=e.valueMin),"valueMax"in e&&o(23,R=e.valueMax),"trackStyle"in e&&o(4,P=e.trackStyle),"trackClass"in e&&o(5,E=e.trackClass),"knobStyle"in e&&o(6,I=e.knobStyle),"knobClass"in e&&o(7,A=e.knobClass),"ongrab"in e&&o(24,L=e.ongrab),"onchange"in e&&o(25,z=e.onchange),"onrelease"in e&&o(26,F=e.onrelease),"onexceed"in e&&o(27,D=e.onexceed),"direction"in e&&o(8,O=e.direction),"getValue"in e&&o(28,B=e.getValue),"setValue"in e&&o(29,W=e.setValue),"enableSpinButtons"in e&&o(9,V=e.enableSpinButtons),"enableForceUseKnob"in e&&o(10,_=e.enableForceUseKnob),"enableStopPropagation"in e&&o(30,N=e.enableStopPropagation),"enablePointerdownListener"in e&&o(11,H=e.enablePointerdownListener),"maxInteractionDistance"in e&&o(31,j=e.maxInteractionDistance),"class"in e&&o(12,U=e.class),"$$scope"in e&&o(38,x=e.$$scope)},e.$$.update=()=>{270532608&e.$$.dirty[0]&&o(14,i=void 0!==C?B(C):0),3&e.$$.dirty[0]&&(r=w-v),16387&e.$$.dirty[0]&&o(33,a=kh(i,v,w)),4&e.$$.dirty[1]&&o(15,s=100*a),256&e.$$.dirty[0]&&o(34,l=O.toUpperCase()),256&e.$$.dirty[0]&&o(35,c="x"===O?"Width":"Height"),16&e.$$.dirty[1]&&(d="offset"+c),e.$$.dirty[1],8&e.$$.dirty[1]&&(u="page"+l),32768&e.$$.dirty[0]|8&e.$$.dirty[1]&&o(17,h=`transform: translate${l}(${s}%)`)},[v,w,S,k,P,E,I,A,O,V,_,H,U,e=>{let t=!1;N&&e.stopPropagation(),clearTimeout(Y);const o=p.getBoundingClientRect();if(m=p[d],$=e[u],g=$-o[O],_){if(Math.abs(g-a*m)>j)return;t=!0,e.stopPropagation()}return document.activeElement!==p&&p.focus(),X(g,m,{grabbed:!0}),document.documentElement.addEventListener("pointermove",q),document.documentElement.addEventListener("pointerup",K),t},i,s,p,h,e=>{m||(o(21,C=W(parseFloat(e.target.value))),C!==f&&(f=C,z(C)))},e=>{const t=p[d];X(i/r*t+e.detail[O],t),clearTimeout(Y),Y=setTimeout((()=>{F(C)}),250)},e=>t=>{clearTimeout(Y),ee=e,te=!1,Q=setInterval((()=>{te=!0,J()}),100),document.addEventListener("pointercancel",oe),document.addEventListener("pointerup",oe)},C,M,R,L,z,F,D,B,W,N,j,e=>{const t=p.getBoundingClientRect(),o=e[u]-t[O],i=p[d];return Math.abs(o-a*i)},a,l,c,b,function(e){na[e?"unshift":"push"]((()=>{p=e,o(16,p)}))},x]}class Ah extends Ba{constructor(e){super(),Oa(this,e,Ih,Eh,ir,{min:0,max:1,step:2,id:3,value:21,valueMin:22,valueMax:23,trackStyle:4,trackClass:5,knobStyle:6,knobClass:7,ongrab:24,onchange:25,onrelease:26,onexceed:27,direction:8,getValue:28,setValue:29,enableSpinButtons:9,enableForceUseKnob:10,enableStopPropagation:30,enablePointerdownListener:11,maxInteractionDistance:31,class:12,eventDistanceToKnob:32,handlePointerDown:13},null,[-1,-1])}get eventDistanceToKnob(){return this.$$.ctx[32]}get handlePointerDown(){return this.$$.ctx[13]}}function Lh(e){let t,o;return t=new ud({props:{class:"PinturaButtonIcon",$$slots:{default:[zh]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};1048580&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function zh(e){let t;return{c(){t=Rr("g")},m(o,i){Cr(o,t,i),t.innerHTML=e[2]},p(e,o){4&o&&(t.innerHTML=e[2])},d(e){e&&Tr(t)}}}function Fh(e){let t,o,i=wu(e[8],e[6])+"";return{c(){t=Mr("span"),o=Pr(i),Fr(t,"class","PinturaButtonLabelPrefix")},m(e,i){Cr(e,t,i),wr(t,o)},p(e,t){320&t&&i!==(i=wu(e[8],e[6])+"")&&Br(o,i)},d(e){e&&Tr(t)}}}function Dh(e){let t,o,i,n,r,a,s,l,c,d=e[2]&&Lh(e),u=e[8]&&Fh(e);return{c(){t=Mr("span"),d&&d.c(),o=Er(),u&&u.c(),i=Er(),n=Mr("span"),r=Pr(e[9]),Fr(n,"class",a=Oc(["PinturaButtonLabel",e[3],e[5]&&"implicit"])),Fr(t,"slot","label"),Fr(t,"title",s=wu(e[1],e[6])),Fr(t,"class",l=Oc(["PinturaButtonInner",e[4]]))},m(e,a){Cr(e,t,a),d&&d.m(t,null),wr(t,o),u&&u.m(t,null),wr(t,i),wr(t,n),wr(n,r),c=!0},p(e,h){e[2]?d?(d.p(e,h),4&h&&Sa(d,1)):(d=Lh(e),d.c(),Sa(d,1),d.m(t,o)):d&&(va(),ka(d,1,1,(()=>{d=null})),wa()),e[8]?u?u.p(e,h):(u=Fh(e),u.c(),u.m(t,i)):u&&(u.d(1),u=null),(!c||512&h)&&Br(r,e[9]),(!c||40&h&&a!==(a=Oc(["PinturaButtonLabel",e[3],e[5]&&"implicit"])))&&Fr(n,"class",a),(!c||66&h&&s!==(s=wu(e[1],e[6])))&&Fr(t,"title",s),(!c||16&h&&l!==(l=Oc(["PinturaButtonInner",e[4]])))&&Fr(t,"class",l)},i(e){c||(Sa(d),c=!0)},o(e){ka(d),c=!1},d(e){e&&Tr(t),d&&d.d(),u&&u.d()}}}function Oh(e){let t,o,i,n,r;const a=[e[12],{value:e[7]},{onchange:e[11]}];let s={};for(let e=0;e<a.length;e+=1)s=Jn(s,a[e]);return o=new Ah({props:s}),{c(){t=Mr("div"),za(o.$$.fragment),Fr(t,"slot","details")},m(a,s){Cr(a,t,s),Fa(o,t,null),i=!0,n||(r=Ar(t,"keydown",e[10]),n=!0)},p(e,t){const i=6272&t?Ia(a,[4096&t&&Aa(e[12]),128&t&&{value:e[7]},2048&t&&{onchange:e[11]}]):{};o.$set(i)},i(e){i||(Sa(o.$$.fragment,e),i=!0)},o(e){ka(o.$$.fragment,e),i=!1},d(e){e&&Tr(t),Da(o),n=!1,r()}}}function Bh(e){let t,o;return t=new gu({props:{panelClass:"PinturaSliderPanel",buttonClass:Oc(["PinturaSliderButton",e[0],e[5]&&"PinturaSliderIconOnly"]),$$slots:{details:[Oh],label:[Dh]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,[o]){const i={};33&o&&(i.buttonClass=Oc(["PinturaSliderButton",e[0],e[5]&&"PinturaSliderIconOnly"])),1053694&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Wh(e,t,o){const i=["class","title","label","icon","labelClass","innerClass","hideLabel","locale","value","onchange","labelPrefix"];let r=pr(t,i),{class:a}=t,{title:s}=t,{label:l=Math.round}=t,{icon:c}=t,{labelClass:d}=t,{innerClass:u}=t,{hideLabel:h=!1}=t,{locale:p}=t,{value:m}=t,{onchange:g=n}=t,{labelPrefix:$}=t;const{min:f,max:y,getValue:b=Z}=r;let x;const v=e=>o(9,x=(e=>M(l)?l(b(e),f,y,e):l)(e));return e.$$set=e=>{t=Jn(Jn({},t),hr(e)),o(12,r=pr(t,i)),"class"in e&&o(0,a=e.class),"title"in e&&o(1,s=e.title),"label"in e&&o(13,l=e.label),"icon"in e&&o(2,c=e.icon),"labelClass"in e&&o(3,d=e.labelClass),"innerClass"in e&&o(4,u=e.innerClass),"hideLabel"in e&&o(5,h=e.hideLabel),"locale"in e&&o(6,p=e.locale),"value"in e&&o(7,m=e.value),"onchange"in e&&o(14,g=e.onchange),"labelPrefix"in e&&o(8,$=e.labelPrefix)},e.$$.update=()=>{8320&e.$$.dirty&&v(m)},[a,s,c,d,u,h,p,m,$,x,e=>{/tab/i.test(e.key)&&e.preventDefault()},e=>{v(e),g(e)},r,l,g]}class Vh extends Ba{constructor(e){super(),Oa(this,e,Wh,Bh,ir,{class:0,title:1,label:13,icon:2,labelClass:3,innerClass:4,hideLabel:5,locale:6,value:7,onchange:14,labelPrefix:8})}}function _h(e){let t,o,i=wu(e[0],e[1])+"";return{c(){t=Mr("span"),o=Pr(i),Fr(t,"class",e[3])},m(e,i){Cr(e,t,i),wr(t,o)},p(e,n){3&n&&i!==(i=wu(e[0],e[1])+"")&&Br(o,i),8&n&&Fr(t,"class",e[3])},d(e){e&&Tr(t)}}}function Nh(e){let t,o,i,n,r=e[0]&&_h(e);return i=new Cp({props:{items:e[2]}}),{c(){t=Mr("li"),r&&r.c(),o=Er(),za(i.$$.fragment),Fr(t,"class","PinturaShapeStyle")},m(e,a){Cr(e,t,a),r&&r.m(t,null),wr(t,o),Fa(i,t,null),n=!0},p(e,[n]){e[0]?r?r.p(e,n):(r=_h(e),r.c(),r.m(t,o)):r&&(r.d(1),r=null);const a={};4&n&&(a.items=e[2]),i.$set(a)},i(e){n||(Sa(i.$$.fragment,e),n=!0)},o(e){ka(i.$$.fragment,e),n=!1},d(e){e&&Tr(t),r&&r.d(),Da(i)}}}function Hh(e,t,o){let i,{title:n}=t,{locale:r}=t,{items:a}=t,{hideTitle:s=!1}=t;return e.$$set=e=>{"title"in e&&o(0,n=e.title),"locale"in e&&o(1,r=e.locale),"items"in e&&o(2,a=e.items),"hideTitle"in e&&o(4,s=e.hideTitle)},e.$$.update=()=>{16&e.$$.dirty&&o(3,i="PinturaShapeStyleLabel"+(s?" implicit":""))},[n,r,a,i,s]}class jh extends Ba{constructor(e){super(),Oa(this,e,Hh,Nh,ir,{title:0,locale:1,items:2,hideTitle:4})}}var Uh=(e,t,o)=>{let i,n,r;const a=Math.floor(6*e),s=6*e-a,l=o*(1-t),c=o*(1-s*t),d=o*(1-(1-s)*t);switch(a%6){case 0:i=o,n=d,r=l;break;case 1:i=c,n=o,r=l;break;case 2:i=l,n=o,r=d;break;case 3:i=l,n=c,r=o;break;case 4:i=d,n=l,r=o;break;case 5:i=o,n=l,r=c}return[i,n,r]};function Gh(e){let t,o,i;return{c(){t=Mr("div"),o=Mr("span"),Fr(t,"class","PinturaColorPreview"),Fr(t,"title",e[0]),Fr(t,"style",i="--color:"+e[1])},m(e,i){Cr(e,t,i),wr(t,o)},p(e,[o]){1&o&&Fr(t,"title",e[0]),2&o&&i!==(i="--color:"+e[1])&&Fr(t,"style",i)},i:qn,o:qn,d(e){e&&Tr(t)}}}function Zh(e,t,o){let i,{color:n}=t,{title:r}=t;return e.$$set=e=>{"color"in e&&o(2,n=e.color),"title"in e&&o(0,r=e.title)},e.$$.update=()=>{4&e.$$.dirty&&o(1,i=n?jo(n):"transparent")},[r,i,n]}class Xh extends Ba{constructor(e){super(),Oa(this,e,Zh,Gh,ir,{color:2,title:0})}}var Yh=e=>(e=e.trim(),/^rgba/.test(e)?e.substr(5).split(",").map(parseFloat).map(((e,t)=>e/(3===t?1:255))):/^rgb/.test(e)?e.substr(4).split(",").map(parseFloat).map((e=>e/255)):/^#/.test(e)?(e=>{const[,t,o,i,n]=e.split("");e=e.length>=4&&e.length<=5?`#${t}${t}${o}${o}${i}${i}${n?`${n}${n}`:""}`:e;const[r,a,s,l,c]=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e)||[];if(r)return[a,s,l,c].filter((e=>void 0!==e)).map((e=>parseInt(e,16)/255))})(e):/[0-9]{1,3}\s?,\s?[0-9]{1,3}\s?,\s?[0-9]{1,3}/.test(e)?e.split(",").map((e=>parseInt(e,10))).map((e=>e/255)):void 0);function qh(e){let t,o;return{c(){t=Mr("span"),o=Pr(e[0])},m(e,i){Cr(e,t,i),wr(t,o)},p(e,t){1&t[0]&&Br(o,e[0])},d(e){e&&Tr(t)}}}function Kh(e){let t,o,i,n;o=new Xh({props:{color:e[4],title:wu(e[8],e[10])}});let r=!e[9]&&qh(e);return{c(){t=Mr("span"),za(o.$$.fragment),i=Er(),r&&r.c(),Fr(t,"slot","label"),Fr(t,"class","PinturaButtonLabel")},m(e,a){Cr(e,t,a),Fa(o,t,null),wr(t,i),r&&r.m(t,null),n=!0},p(e,i){const n={};16&i[0]&&(n.color=e[4]),1280&i[0]&&(n.title=wu(e[8],e[10])),o.$set(n),e[9]?r&&(r.d(1),r=null):r?r.p(e,i):(r=qh(e),r.c(),r.m(t,null))},i(e){n||(Sa(o.$$.fragment,e),n=!0)},o(e){ka(o.$$.fragment,e),n=!1},d(e){e&&Tr(t),Da(o),r&&r.d()}}}function Jh(e){let t,o,i,n,r,a,s,l,c,d,u,h,p,m;c=new Ah({props:{class:"PinturaHuePicker",knobStyle:"background-color:"+e[20],onchange:e[26],value:e[15],min:0,max:1,step:.01}});let g=e[11]&&Qh(e),$=e[14]&&ep(e);return{c(){t=Mr("div"),o=Mr("div"),i=Mr("div"),n=Mr("div"),l=Er(),za(c.$$.fragment),d=Er(),g&&g.c(),u=Er(),$&&$.c(),Fr(n,"role","button"),Fr(n,"aria-label","Saturation slider"),Fr(n,"class","PinturaPickerKnob"),Fr(n,"tabindex","0"),Fr(n,"style",r=`background-color:${e[19]};`),Fr(i,"class","PinturaPickerKnobController"),Fr(i,"style",a=`transform:translate(${e[24]}%,${e[23]}%)`),Fr(o,"class","PinturaSaturationPicker"),Fr(o,"style",s="background-color: "+e[20]),Fr(t,"class","PinturaPicker")},m(r,a){Cr(r,t,a),wr(t,o),wr(o,i),wr(i,n),e[38](o),wr(t,l),Fa(c,t,null),wr(t,d),g&&g.m(t,null),wr(t,u),$&&$.m(t,null),h=!0,p||(m=[Ar(n,"nudge",e[29]),gr(Sd.call(null,n,{preventDefault:!0})),Ar(o,"pointerdown",e[28])],p=!0)},p(e,l){(!h||524288&l[0]&&r!==(r=`background-color:${e[19]};`))&&Fr(n,"style",r),(!h||25165824&l[0]&&a!==(a=`transform:translate(${e[24]}%,${e[23]}%)`))&&Fr(i,"style",a),(!h||1048576&l[0]&&s!==(s="background-color: "+e[20]))&&Fr(o,"style",s);const d={};1048576&l[0]&&(d.knobStyle="background-color:"+e[20]),32768&l[0]&&(d.value=e[15]),c.$set(d),e[11]?g?(g.p(e,l),2048&l[0]&&Sa(g,1)):(g=Qh(e),g.c(),Sa(g,1),g.m(t,u)):g&&(va(),ka(g,1,1,(()=>{g=null})),wa()),e[14]?$?$.p(e,l):($=ep(e),$.c(),$.m(t,null)):$&&($.d(1),$=null)},i(e){h||(Sa(c.$$.fragment,e),Sa(g),h=!0)},o(e){ka(c.$$.fragment,e),ka(g),h=!1},d(o){o&&Tr(t),e[38](null),Da(c),g&&g.d(),$&&$.d(),p=!1,tr(m)}}}function Qh(e){let t,o;return t=new Ah({props:{class:"PinturaOpacityPicker",knobStyle:"background-color:"+e[17],trackStyle:`background-image:linear-gradient(to right,${e[18]},${e[19]})`,onchange:e[27],value:e[16],min:0,max:1,step:.01}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};131072&o[0]&&(i.knobStyle="background-color:"+e[17]),786432&o[0]&&(i.trackStyle=`background-image:linear-gradient(to right,${e[18]},${e[19]})`),65536&o[0]&&(i.value=e[16]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function ep(e){let t,o,i;return{c(){t=Mr("input"),Fr(t,"class","PinturaColorPickerInput"),Fr(t,"type","text"),t.value=e[22]},m(n,r){Cr(n,t,r),o||(i=[Ar(t,"keydown",e[31]),Ar(t,"input",e[30])],o=!0)},p(e,o){4194304&o[0]&&t.value!==e[22]&&(t.value=e[22])},d(e){e&&Tr(t),o=!1,tr(i)}}}function tp(e){let t,o;return t=new qu({props:{label:wu(e[10].labelColorPalette,e[10]),class:Oc(["PinturaColorPresets",e[9]?"PinturaColorPresetsGrid":"PinturaColorPresetsList"]),hideLabel:!1,name:e[1],value:e[4],optionGroupClass:"PinturaListOptionGroup",optionClass:"PinturaListOption",options:e[2].map(e[39]),selectedIndex:e[3],optionMapper:e[7],optionLabelClass:e[6],onchange:e[40],$$slots:{option:[np,({option:e})=>({52:e}),({option:e})=>[0,e?2097152:0]],group:[op,({option:e})=>({52:e}),({option:e})=>[0,e?2097152:0]]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};1024&o[0]&&(i.label=wu(e[10].labelColorPalette,e[10])),512&o[0]&&(i.class=Oc(["PinturaColorPresets",e[9]?"PinturaColorPresetsGrid":"PinturaColorPresetsList"])),2&o[0]&&(i.name=e[1]),16&o[0]&&(i.value=e[4]),1028&o[0]&&(i.options=e[2].map(e[39])),8&o[0]&&(i.selectedIndex=e[3]),128&o[0]&&(i.optionMapper=e[7]),64&o[0]&&(i.optionLabelClass=e[6]),512&o[0]|6291456&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function op(e){let t,o,i=e[52].label+"";return{c(){t=Mr("span"),o=Pr(i),Fr(t,"slot","group")},m(e,i){Cr(e,t,i),wr(t,o)},p(e,t){2097152&t[1]&&i!==(i=e[52].label+"")&&Br(o,i)},d(e){e&&Tr(t)}}}function ip(e){let t,o,i=e[52].label+"";return{c(){t=Mr("span"),o=Pr(i),Fr(t,"class","PinturaButtonLabel")},m(e,i){Cr(e,t,i),wr(t,o)},p(e,t){2097152&t[1]&&i!==(i=e[52].label+"")&&Br(o,i)},d(e){e&&Tr(t)}}}function np(e){let t,o,i,n;o=new Xh({props:{title:e[52].label,color:e[52].value}});let r=!e[9]&&ip(e);return{c(){t=Mr("span"),za(o.$$.fragment),i=Er(),r&&r.c(),Fr(t,"slot","option")},m(e,a){Cr(e,t,a),Fa(o,t,null),wr(t,i),r&&r.m(t,null),n=!0},p(e,i){const n={};2097152&i[1]&&(n.title=e[52].label),2097152&i[1]&&(n.color=e[52].value),o.$set(n),e[9]?r&&(r.d(1),r=null):r?r.p(e,i):(r=ip(e),r.c(),r.m(t,null))},i(e){n||(Sa(o.$$.fragment,e),n=!0)},o(e){ka(o.$$.fragment,e),n=!1},d(e){e&&Tr(t),Da(o),r&&r.d()}}}function rp(e){let t,o,i,n=e[13]&&Jh(e),r=e[12]&&tp(e);return{c(){t=Mr("div"),n&&n.c(),o=Er(),r&&r.c(),Fr(t,"slot","details"),Fr(t,"class","PinturaColorPickerPanel")},m(e,a){Cr(e,t,a),n&&n.m(t,null),wr(t,o),r&&r.m(t,null),i=!0},p(e,i){e[13]?n?(n.p(e,i),8192&i[0]&&Sa(n,1)):(n=Jh(e),n.c(),Sa(n,1),n.m(t,o)):n&&(va(),ka(n,1,1,(()=>{n=null})),wa()),e[12]?r?(r.p(e,i),4096&i[0]&&Sa(r,1)):(r=tp(e),r.c(),Sa(r,1),r.m(t,null)):r&&(va(),ka(r,1,1,(()=>{r=null})),wa())},i(e){i||(Sa(n),Sa(r),i=!0)},o(e){ka(n),ka(r),i=!1},d(e){e&&Tr(t),n&&n.d(),r&&r.d()}}}function ap(e){let t,o;return t=new gu({props:{buttonClass:Oc(["PinturaColorPickerButton",e[5]]),$$slots:{details:[rp],label:[Kh]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};32&o[0]&&(i.buttonClass=Oc(["PinturaColorPickerButton",e[5]])),33554399&o[0]|4194304&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function sp(e,t,o){let i,n,r,a,s,l,c,d,u,h,p,m,g,$,{label:f}=t,{name:y}=t,{options:b=[]}=t,{selectedIndex:x=-1}=t,{value:v}=t,{buttonClass:w}=t,{optionLabelClass:S}=t,{optionMapper:k}=t,{onchange:C}=t,{title:T}=t,{hidePresetLabel:R=!0}=t,{locale:P}=t,{enableOpacity:E=!0}=t,{enablePresets:I=!0}=t,{enablePicker:A=!0}=t,{enableInput:L=!1}=t;const z=(e,t)=>{if(u=[e[0],e[1],e[2]],t){let t=((e,t,o)=>{let i=Math.max(e,t,o),n=i-Math.min(e,t,o),r=n&&(i==e?(t-o)/n:i==t?2+(o-e)/n:4+(e-t)/n);return[60*(r<0?r+6:r)/360,i&&n/i,i]})(...u);o(15,s=t[0]),o(33,l=t[1]),o(34,c=t[2]),o(16,d=Lo(e[3])?e[3]:1)}o(17,h=jo(e)),o(18,p=jo([...u,0])),o(19,m=jo([...u,1])),o(20,g=jo(Uh(s,1,1)))},F=()=>{const e=[...Uh(s,l,c),d];z(e),C(e)},D=e=>{const t=3===e.length?[...e,1]:e;z(t,!0),C(t)},O=(e,t)=>{const i=ss(e.x/t.width,0,1);var r;r=1-ss(e.y/t.height,0,1),o(33,l=i),o(34,c=r),0===d&&o(16,d=1),F()};let B,W,V,_;const N=e=>{const t=Se(pe(e),_);O(we(me(V),t),W)},H=e=>{W=void 0,document.documentElement.removeEventListener("pointermove",N),document.documentElement.removeEventListener("pointerup",H)};let j;return e.$$set=e=>{"label"in e&&o(0,f=e.label),"name"in e&&o(1,y=e.name),"options"in e&&o(2,b=e.options),"selectedIndex"in e&&o(3,x=e.selectedIndex),"value"in e&&o(4,v=e.value),"buttonClass"in e&&o(5,w=e.buttonClass),"optionLabelClass"in e&&o(6,S=e.optionLabelClass),"optionMapper"in e&&o(7,k=e.optionMapper),"onchange"in e&&o(32,C=e.onchange),"title"in e&&o(8,T=e.title),"hidePresetLabel"in e&&o(9,R=e.hidePresetLabel),"locale"in e&&o(10,P=e.locale),"enableOpacity"in e&&o(11,E=e.enableOpacity),"enablePresets"in e&&o(12,I=e.enablePresets),"enablePicker"in e&&o(13,A=e.enablePicker),"enableInput"in e&&o(14,L=e.enableInput)},e.$$.update=()=>{16&e.$$.dirty[0]|16&e.$$.dirty[1]&&(!v||$&&hs(v,$)||(o(35,$=[...v]),z(v,!0))),4&e.$$.dirty[1]&&o(24,i=100*l),8&e.$$.dirty[1]&&o(23,n=100-100*c),32&e.$$.dirty[1]&&o(37,r=!!j&&j.length>=4&&j.length<=5),18448&e.$$.dirty[0]|64&e.$$.dirty[1]&&o(22,a=L&&v?((e,t,o)=>{let i=e.map((e=>Math.round(255*e).toString(16).toLowerCase().padStart(2,"0")));return(!t&&i.length>3||"ff"===i[3])&&i.pop(),o&&(i=i.map((e=>e.substring(0,1)))),"#"+i.join("")})(v,E,r):void 0)},[f,y,b,x,v,w,S,k,T,R,P,E,I,A,L,s,d,h,p,m,g,B,a,n,i,D,e=>{o(15,s=e),0===d&&o(16,d=1),F()},e=>{o(16,d=e),F()},e=>{e.stopPropagation(),W=Ve(B.offsetWidth,B.offsetHeight),V=(e=>he(e.offsetX,e.offsetY))(e),_=pe(e),O(V,W),document.documentElement.addEventListener("pointermove",N),document.documentElement.addEventListener("pointerup",H)},e=>{W=Ve(B.offsetWidth,B.offsetHeight);const t=i/100*W.width,o=n/100*W.height;O({x:t+e.detail.x,y:o+e.detail.y},W)},e=>{const{value:t}=e.target,i=t.length;if(!t.startsWith("#")||i<4||6===i||8===i||i>9)return;if(!E&&i>7)return;const n=Yh(t);n&&(o(36,j=t),z(n),C(n))},e=>{e.stopPropagation()},C,l,c,$,j,r,function(e){na[e?"unshift":"push"]((()=>{B=e,o(21,B)}))},([e,t])=>[e,M(t)?t(P):t],e=>D(e.value)]}class lp extends Ba{constructor(e){super(),Oa(this,e,sp,ap,ir,{label:0,name:1,options:2,selectedIndex:3,value:4,buttonClass:5,optionLabelClass:6,optionMapper:7,onchange:32,title:8,hidePresetLabel:9,locale:10,enableOpacity:11,enablePresets:12,enablePicker:13,enableInput:14},null,[-1,-1])}}function cp(e){let t,o,i;return o=new Cp({props:{items:e[0]}}),{c(){t=Mr("div"),za(o.$$.fragment),Fr(t,"class","PinturaShorthandControl PinturaShapeStyle")},m(e,n){Cr(e,t,n),Fa(o,t,null),i=!0},p(e,[t]){const i={};1&t&&(i.items=e[0]),o.$set(i)},i(e){i||(Sa(o.$$.fragment,e),i=!0)},o(e){ka(o.$$.fragment,e),i=!1},d(e){e&&Tr(t),Da(o)}}}function dp(e,t,o){let i,n,{value:r}=t,{onchange:a}=t,{controls:s=[]}=t;return e.$$set=e=>{o(6,t=Jn(Jn({},t),hr(e))),"value"in e&&o(1,r=e.value),"onchange"in e&&o(2,a=e.onchange),"controls"in e&&o(3,s=e.controls)},e.$$.update=()=>{o(4,i=(e=>{const{controls:t,...o}=e;return o})(t)),30&e.$$.dirty&&o(0,n=s.map(((e,t)=>{const[o,n,s]=e;return[o,n,{...i,...s,value:r[t],onchange:e=>{const o=[...r];o[t]=e,a(o)}}]})))},t=hr(t),[n,r,a,s,i]}class up extends Ba{constructor(e){super(),Oa(this,e,dp,cp,ir,{value:1,onchange:2,controls:3})}}function hp(e){let t,o;return t=new bh({props:{label:e[4],options:e[1],title:e[2],selectedIndex:e[5],onchange:e[10]}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,[o]){const i={};16&o&&(i.label=e[4]),2&o&&(i.options=e[1]),4&o&&(i.title=e[2]),32&o&&(i.selectedIndex=e[5]),9&o&&(i.onchange=e[10]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function pp(e,t,o){let i,n,r,a,{options:s}=t,{title:l}=t,{onchange:c}=t,{selectedIndex:d=-1}=t,{value:u}=t,{label:h}=t;return e.$$set=e=>{"options"in e&&o(1,s=e.options),"title"in e&&o(2,l=e.title),"onchange"in e&&o(3,c=e.onchange),"selectedIndex"in e&&o(0,d=e.selectedIndex),"value"in e&&o(6,u=e.value),"label"in e&&o(7,h=e.label)},e.$$.update=()=>{67&e.$$.dirty&&o(9,i=((e,t,o)=>{if(e)return t>-1?e[t]:void 0!==o?e.find((e=>e[0]===o)):e[0]})(s,d,u)),514&e.$$.dirty&&o(5,n=s&&s.findIndex((e=>e===i))),512&e.$$.dirty&&o(8,r=i&&i[1]),384&e.$$.dirty&&o(4,a=h||r)},[d,s,l,c,a,n,u,h,r,i,e=>{o(0,d=e.index),c&&c(e)}]}class mp extends Ba{constructor(e){super(),Oa(this,e,pp,hp,ir,{options:1,title:2,onchange:3,selectedIndex:0,value:6,label:7})}}function gp(e,t,o){const i=e.slice();return i[9]=t[o][0],i[0]=t[o][1],i[10]=t[o][2],i[2]=t[o][3],i}function $p(e){let t,o,i;const n=[e[10]];var r=e[3][e[9]]||e[9];function a(e){let t={};for(let e=0;e<n.length;e+=1)t=Jn(t,n[e]);return{props:t}}return r&&(t=Nr(r,a())),{c(){t&&za(t.$$.fragment),o=Ir()},m(e,n){t&&Fa(t,e,n),Cr(e,o,n),i=!0},p(e,i){const s=4&i?Ia(n,[Aa(e[10])]):{};if(r!==(r=e[3][e[9]]||e[9])){if(t){va();const e=t;ka(e.$$.fragment,1,0,(()=>{Da(e,1)})),wa()}r?(t=Nr(r,a()),za(t.$$.fragment),Sa(t.$$.fragment,1),Fa(t,o.parentNode,o)):t=null}else r&&t.$set(s)},i(e){i||(t&&Sa(t.$$.fragment,e),i=!0)},o(e){t&&ka(t.$$.fragment,e),i=!1},d(e){e&&Tr(o),t&&Da(t,e)}}}function fp(e){let t,o=e[9],i=e[9]&&vp(e);return{c(){i&&i.c(),t=Ir()},m(e,o){i&&i.m(e,o),Cr(e,t,o)},p(e,n){e[9]?o?ir(o,e[9])?(i.d(1),i=vp(e),i.c(),i.m(t.parentNode,t)):i.p(e,n):(i=vp(e),i.c(),i.m(t.parentNode,t)):o&&(i.d(1),i=null),o=e[9]},i:qn,o(e){ka(i)},d(e){e&&Tr(t),i&&i.d(e)}}}function yp(e){let t,o,i=e[10].innerHTML+"";return{c(){t=new _r(!1),o=Ir(),t.a=o},m(e,n){t.m(i,e,n),Cr(e,o,n)},p(e,o){4&o&&i!==(i=e[10].innerHTML+"")&&t.p(i)},i:qn,o:qn,d(e){e&&Tr(o),e&&t.d()}}}function bp(e){let t,o=e[10].textContent+"";return{c(){t=Pr(o)},m(e,o){Cr(e,t,o)},p(e,i){4&i&&o!==(o=e[10].textContent+"")&&Br(t,o)},i:qn,o:qn,d(e){e&&Tr(t)}}}function xp(e){let t,o;return t=new Cp({props:{items:e[2],discardEmptyItems:!0}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};4&o&&(i.items=e[2]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function vp(e){let t,o,i,n,r;const a=[xp,bp,yp],s=[];function l(e,t){return e[2]&&e[2].length?0:e[10].textContent?1:e[10].innerHTML?2:-1}~(o=l(e))&&(i=s[o]=a[o](e));let c=[e[4](e[10])],d={};for(let e=0;e<c.length;e+=1)d=Jn(d,c[e]);return{c(){t=Mr(e[9]),i&&i.c(),n=Er(),/-/.test(e[9])?Or(t,d):Dr(t,d)},m(e,i){Cr(e,t,i),~o&&s[o].m(t,null),wr(t,n),r=!0},p(e,r){let u=o;o=l(e),o===u?~o&&s[o].p(e,r):(i&&(va(),ka(s[u],1,1,(()=>{s[u]=null})),wa()),~o?(i=s[o],i?i.p(e,r):(i=s[o]=a[o](e),i.c()),Sa(i,1),i.m(t,n)):i=null),d=Ia(c,[4&r&&e[4](e[10])]),/-/.test(e[9])?Or(t,d):Dr(t,d)},i(e){r||(Sa(i),r=!0)},o(e){ka(i),r=!1},d(e){e&&Tr(t),~o&&s[o].d()}}}function wp(e,t){let o,i,n,r,a,s;const l=[fp,$p],c=[];function d(e,t){return 4&t&&(i=null),null==i&&(i=!e[5](e[9])),i?0:1}return n=d(t,-1),r=c[n]=l[n](t),{key:e,first:null,c(){o=Ir(),r.c(),a=Ir(),this.first=o},m(e,t){Cr(e,o,t),c[n].m(e,t),Cr(e,a,t),s=!0},p(e,o){let i=n;n=d(t=e,o),n===i?c[n].p(t,o):(va(),ka(c[i],1,1,(()=>{c[i]=null})),wa(),r=c[n],r?r.p(t,o):(r=c[n]=l[n](t),r.c()),Sa(r,1),r.m(a.parentNode,a))},i(e){s||(Sa(r),s=!0)},o(e){ka(r),s=!1},d(e){e&&Tr(o),c[n].d(e),e&&Tr(a)}}}function Sp(e){let t,o,i=[],n=new Map,r=e[2];const a=e=>e[0]+e[1];for(let t=0;t<r.length;t+=1){let o=gp(e,r,t),s=a(o);n.set(s,i[t]=wp(s,o))}return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=Ir()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);Cr(e,t,n),o=!0},p(e,[o]){62&o&&(r=e[2],va(),i=Ea(i,o,a,1,e,r,n,t.parentNode,Pa,wp,t,gp),wa())},i(e){if(!o){for(let e=0;e<r.length;e+=1)Sa(i[e]);o=!0}},o(e){for(let e=0;e<i.length;e+=1)ka(i[e]);o=!1},d(e){for(let t=0;t<i.length;t+=1)i[t].d(e);e&&Tr(t)}}}function kp(e,t,o){let i,n,{items:r}=t,{discardEmptyItems:a=!0}=t,{key:s=""}=t;const l={Button:bd,ImageButton:Zd,ImageButtonList:Jd,Dropdown:bh,Select:mp,RadioGroup:qu,Input:eh,Panel:Sh,ProgressIndicator:Vd,ShapeStyle:jh,ToggleSlider:Vh,ColorPicker:lp,ShorthandControl:up},c=e=>!T(e)||!!l[e],d=e=>{if(!e)return!1;const[t,,o,i=[]]=e;return!!c(t)||i.some(d)||o.textContent||o.innerHTML};return e.$$set=e=>{"items"in e&&o(6,r=e.items),"discardEmptyItems"in e&&o(7,a=e.discardEmptyItems),"key"in e&&o(0,s=e.key)},e.$$.update=()=>{1&e.$$.dirty&&o(1,i=s),192&e.$$.dirty&&o(2,n=(r&&a?r.filter(d):r)||[])},[s,i,n,l,(e={})=>{const{textContent:t,innerHTML:o,...i}=e;return i},c,r,a]}class Cp extends Ba{constructor(e){super(),Oa(this,e,kp,Sp,ir,{items:6,discardEmptyItems:7,key:0})}get items(){return this.$$.ctx[6]}set items(e){this.$$set({items:e}),$a()}get discardEmptyItems(){return this.$$.ctx[7]}set discardEmptyItems(e){this.$$set({discardEmptyItems:e}),$a()}get key(){return this.$$.ctx[0]}set key(e){this.$$set({key:e}),$a()}}let Tp=null;var Mp=e=>{if(null===Tp&&(Tp=c()&&"visualViewport"in window),!Tp)return!1;const t=visualViewport.height,o=()=>{e(visualViewport.height<t?"visible":"hidden")};return visualViewport.addEventListener("resize",o),()=>visualViewport.removeEventListener("resize",o)};function Rp(e){let t,o;const i=[{onclick:e[1]},e[3]];let n={};for(let e=0;e<i.length;e+=1)n=Jn(n,i[e]);return t=new bd({props:n}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const n=10&o[0]?Ia(i,[2&o[0]&&{onclick:e[1]},8&o[0]&&Aa(e[3])]):{};t.$set(n)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Pp(e){let t,o;const i=[{onclick:e[0]},{class:"PinturaInputFormButtonConfirm"},e[2]];let n={};for(let e=0;e<i.length;e+=1)n=Jn(n,i[e]);return t=new bd({props:n}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const n=5&o[0]?Ia(i,[1&o[0]&&{onclick:e[0]},i[1],4&o[0]&&Aa(e[2])]):{};t.$set(n)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Ep(e){let t,o,i,n,r,a,s,l,c=e[3]&&Rp(e);const d=e[24].default,u=sr(d,e,e[23],null);let h=e[2]&&Pp(e);return{c(){t=Mr("div"),o=Mr("div"),c&&c.c(),i=Er(),n=Mr("div"),u&&u.c(),r=Er(),h&&h.c(),Fr(n,"class","PinturaInputFormFields"),Fr(o,"class","PinturaInputFormInner"),Fr(t,"class","PinturaInputForm"),Fr(t,"data-layout",e[4]),Fr(t,"style",e[6])},m(d,p){Cr(d,t,p),wr(t,o),c&&c.m(o,null),wr(o,i),wr(o,n),u&&u.m(n,null),wr(o,r),h&&h.m(o,null),e[25](t),a=!0,s||(l=[Ar(n,"keydown",e[10]),Ar(t,"focusin",e[7]),Ar(t,"focusout",e[8]),Ar(t,"measure",e[9]),gr(Tc.call(null,t))],s=!0)},p(e,n){e[3]?c?(c.p(e,n),8&n[0]&&Sa(c,1)):(c=Rp(e),c.c(),Sa(c,1),c.m(o,i)):c&&(va(),ka(c,1,1,(()=>{c=null})),wa()),u&&u.p&&(!a||8388608&n[0])&&dr(u,d,e,e[23],a?cr(d,e[23],n,null):ur(e[23]),null),e[2]?h?(h.p(e,n),4&n[0]&&Sa(h,1)):(h=Pp(e),h.c(),Sa(h,1),h.m(o,null)):h&&(va(),ka(h,1,1,(()=>{h=null})),wa()),(!a||16&n[0])&&Fr(t,"data-layout",e[4]),(!a||64&n[0])&&Fr(t,"style",e[6])},i(e){a||(Sa(c),Sa(u,e),Sa(h),a=!0)},o(e){ka(c),ka(u,e),ka(h),a=!1},d(o){o&&Tr(t),c&&c.d(),u&&u.d(o),h&&h.d(),e[25](null),s=!1,tr(l)}}}function Ip(e,t,o){let i,n,r,a,s,k,C,{$$slots:l={},$$scope:c}=t,{onconfirm:d}=t,{oncancel:u}=t,{autoFocus:h=!0}=t,{autoPositionCursor:p=!0}=t,{buttonConfirm:m}=t,{buttonCancel:g}=t,{layout:$="stack"}=t,{parentRect:f}=t,{align:y}=t,{justify:x}=t,{parentMargin:v=16}=t,{panelOffset:w=ue()}=t,S=!1,T="",M=0;const R=()=>{const e=s.querySelector("input, textarea");e.focus(),M>=1||e.select()},P=()=>{S=!0,I||!fo()&&!b()||o(19,T="top:1em;bottom:auto;"),fo()&&(e=>{let t;e.addEventListener("touchstart",(e=>t=e.touches[0].screenY)),e.addEventListener("touchmove",(e=>{const o=e.touches[0].screenY,i=e.target;/textarea/i.test(i.nodeName)?(o>t?0==i.scrollTop&&e.preventDefault():o<t?i.scrollTop+i.offsetHeight==i.scrollHeight&&e.preventDefault():e.preventDefault(),t=o):e.preventDefault()}))})(s),o(20,M=1)};let E;const I=Mp((e=>{r?"hidden"!==e||S?(clearTimeout(C),C=void 0,o(19,T=`top:${visualViewport.height-k.height-w.y}px`),"visible"===e?(o(5,s.dataset.stick=!0,s),R(),P()):(S=!1,o(20,M=0))):R():o(19,T="top: 4.5em; bottom: auto")}));return qr((()=>{h&&R()})),Jr((()=>{I&&I()})),e.$$set=e=>{"onconfirm"in e&&o(0,d=e.onconfirm),"oncancel"in e&&o(1,u=e.oncancel),"autoFocus"in e&&o(11,h=e.autoFocus),"autoPositionCursor"in e&&o(12,p=e.autoPositionCursor),"buttonConfirm"in e&&o(2,m=e.buttonConfirm),"buttonCancel"in e&&o(3,g=e.buttonCancel),"layout"in e&&o(4,$=e.layout),"parentRect"in e&&o(13,f=e.parentRect),"align"in e&&o(14,y=e.align),"justify"in e&&o(15,x=e.justify),"parentMargin"in e&&o(16,v=e.parentMargin),"panelOffset"in e&&o(17,w=e.panelOffset),"$$scope"in e&&o(23,c=e.$$scope)},e.$$.update=()=>{385024&e.$$.dirty[0]&&o(21,i=f&&k?((e,t,o,i,n)=>{let r,a;return r="center"===i?e.x+.5*e.width-.5*t.width:"right"===i?e.x+e.width-t.width-n:e.x+n,a="center"===o?e.y+.5*e.height-.5*t.height:"bottom"===o?e.y+e.height-t.height-n:e.y+n,`left:${r}px;top:${a}px;right:auto;bottom:auto;`})(f,k,y,x,v):void 0),32&e.$$.dirty[0]&&o(22,n=s&&getComputedStyle(s)),4194304&e.$$.dirty[0]&&(r=n&&"1"===n.getPropertyValue("--editor-modal")),3670016&e.$$.dirty[0]&&o(6,a=`opacity:${M};${i||T}`)},[d,u,m,g,$,s,a,e=>{var t;((e=>/textarea/i.test(e))(e.target)||iu(e.target))&&(E=Date.now(),p&&((t=e.target).selectionStart=t.selectionEnd=t.value.length),clearTimeout(C),C=setTimeout(P,200))},e=>{Date.now()-E>50||(e.stopPropagation(),R())},({detail:e})=>{o(18,k={width:e.width,height:e.height})},e=>"Enter"===e.key?d():"Escape"===e.key?u():void 0,h,p,f,y,x,v,w,k,T,M,i,n,c,l,function(e){na[e?"unshift":"push"]((()=>{s=e,o(5,s)}))}]}class Ap extends Ba{constructor(e){super(),Oa(this,e,Ip,Ep,ir,{onconfirm:0,oncancel:1,autoFocus:11,autoPositionCursor:12,buttonConfirm:2,buttonCancel:3,layout:4,parentRect:13,align:14,justify:15,parentMargin:16,panelOffset:17},null,[-1,-1])}}var Lp=(e,t)=>{e.fastSeek&&e.fastSeek(t),e.currentTime=t};const zp=["aspectRatio","isRotatedSideways","flip","cropSize"],Fp=fs.map((([e])=>e)).filter((e=>!zp.includes(e)));var Dp=(e,t)=>new CustomEvent("ping",{detail:{type:e,data:t},cancelable:!0,bubbles:!0}),Op=(e,t)=>(t?bl(e,t):e).replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase(),Bp=(e,t=Z)=>{const{subscribe:o,set:i}=_a(void 0);return{subscribe:o,destroy:((e,t)=>{const o=matchMedia(e);return o.addListener(t),t(o),{get matches(){return o.matches},destroy:()=>o.removeListener(t)}})(e,(({matches:e})=>i(t(e)))).destroy}},Wp=(e,t,o)=>new Promise(((i,n)=>{(async()=>{Ds(e)&&i(await Fs(e));const r=await t.read(e),a=e=>O(e,o).then((e=>t.apply(e,r))).then(i).catch(n);if(E(e)||!P()||Yt()||fo())return a(e);let s;try{s=await L(((e,t)=>createImageBitmap(e).then((e=>t(null,e))).catch(t)),[e])}catch(e){}s&&s.width?await u()?Ul()&&r>1?i(await(async e=>h(await v(e)))(s)):i(s):i(t.apply(s,r)):a(e)})()})),Vp=(e,t)=>new Promise((async o=>{if(e.width<t.width&&e.height<t.height)return o(e);const i=Math.min(t.width/e.width,t.height/e.height),n=i*e.width,r=i*e.height,a=p("canvas",{width:n,height:r}),s=a.getContext("2d",{willReadFrequently:!0}),l=$(e)?await v(e):e;s.drawImage(l,0,0,n,r),o(h(a))}));let _p=null;var Np=()=>{if(null===_p){let e=p("canvas");_p=!!Fl(e),g(e),e=void 0}return _p};const Hp=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],jp={precision:1e-4},Up={precision:.01*jp.precision};var Zp=e=>e[0]<.25&&e[1]<.25&&e[2]<.25,Xp=(e={})=>new Promise((t=>{const{accept:o="image/*"}=e,i=p("input",{style:"position:absolute;visibility:hidden;width:0;height:0;",type:"file",accept:o}),n=()=>{const[e]=i.files;i.parentNode&&i.remove(),i.removeEventListener("change",n),t(e)};i.addEventListener("change",n),fo()&&document.body.append(i),i.click()})),Yp=e=>{try{return e()}catch(e){console.error(e)}},qp=([e,t])=>e+.5*(t-e),Kp=e=>Math.round(100*e),Jp=e=>he(e.clientX,e.clientY),Qp=(e,t,o)=>{const i=Jp(e);return Se(Se(i,t),o)};function em(e,t,o){let i,n,r,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,{root:k}=t,{locale:C}=t,{stores:T}=t,{allowPan:M=!0}=t,{allowZoom:R=!0}=t,{enablePan:P=!0}=t,{enableZoom:E=!0}=t,{enableZoomControls:I=E}=t,{enableZoomInput:A=!0}=t,{enablePanInput:L=!0}=t,{enablePanLimit:z=!0}=t,{panLimitGutterScalar:F=0}=t,{zoomOptions:D=[.25,.5,1,1.25,1.5,2,3,4,6,8,16]}=t,{zoomAdjustStep:O=.25}=t,{zoomAdjustFactor:B=.1}=t,{zoomAdjustWheelFactor:W=1}=t,{elasticity:V=5}=t,{imageSelectionRectCentered:_}=t,{imageSelectionRectScalar:N}=t,{zoomLevel:H=null}=t,{zoomControls:j}=t,{zoomMultiTouching:U=!1}=t;const{isAnimated:G,isInteracting:Z,rootRect:X,stageRect:Y,stageScalar:q,imageSelectionPan:K,imageSelectionZoom:J,imageSelectionStageFitScalar:Q,imageSelectionRect:ee,imageSelectionStoredState:te,imagePreviewUpscale:oe}=T;ar(e,G,(e=>o(70,w=e))),ar(e,Z,(e=>o(69,x=e))),ar(e,X,(e=>o(66,f=e))),ar(e,Y,(e=>o(65,$=e))),ar(e,q,(e=>o(46,v=e))),ar(e,K,(e=>o(64,p=e))),ar(e,J,(e=>o(43,h=e))),ar(e,Q,(e=>o(44,m=e))),ar(e,ee,(e=>o(67,y=e))),ar(e,te,(e=>o(71,S=e))),ar(e,oe,(e=>o(45,g=e)));const ie=ta("fixScrollDirection");ar(e,ie,(e=>o(68,b=e)));let re,ae,se,le,ne=!1;const ce=e=>{const t=k.querySelector(".PinturaMain > .PinturaUtilMain")||k.querySelector('div[tabindex="0"] .PinturaUtilMain');return!!t&&!!t.contains(e.target)&&!nu(e.target)},de=(e={})=>{const{pan:t=p,zoom:o=h}=e;mr(te,S={translation:t,zoom:o},S)},pe=()=>p&&0===p.x&&0===p.y,ge=()=>{mr(J,h=void 0,h),pe()||mr(K,p=ue(),p),ye.set(void 0,{hard:!0})},$e=()=>{ge(),de()},ye=dc(void 0,{precision:.01});ye.subscribe((e=>{if(void 0===e)return mr(J,h=void 0,h),void(pe()||mr(K,p=ue(),p));const t=h;e<=1?pe()||mr(K,p=ue(),p):e<=t&&mr(K,p=Ce(p,.8),p),mr(J,h=e,h)}));const be=e=>{ye.update((t=>{const o=e(t||m);return de({zoom:o}),o}))},xe=e=>{e?ye.set(e,{hard:!1===w}):(e=void 0,ye.set(void 0,{hard:!0})),mr(J,h=e,h),de({zoom:e})},ve=(e,t)=>{const o=N*t,i={..._},n=1-ss(F,0,1);ct(i,o<n?o:n);const r={..._};ct(r,o),lt(r,e);const a={...r};return r.x>i.x&&(a.x=i.x),r.y>i.y&&(a.y=i.y),r.x+r.width<i.x+i.width&&(a.x=i.x+i.width-r.width),r.y+r.height<i.y+i.height&&(a.y=i.y+i.height-r.height),Se(st(a),st(i))},we=({translation:e,zoom:t=1,elastify:o=!0})=>{if(!re)return;let i=e;const n=he(re.x+i.x,re.y+i.y);if(!z)return n;const r=ve(n,t);return o?((e,t,o)=>t&&o?he(e.x+kd(t.x-e.x,o),e.y+kd(t.y-e.y,o)):{...e})(r,n,V):r};let Te,Me;const Re=()=>{Me=void 0,mr(Z,x=!0,x),o(34,ne=L),Te=!1,se=!1,re={...p},ae=g?h||m:r?h||1:h||m},Pe=e=>{const{scalar:t,translation:n,isMultiTouching:r}=e.detail;if(!re||!r&&!L)return;r&&Ce(n,.5),(L||r)&&(Te=!0),U||o(13,U=r);const a=i?ss(ae*t,s,l):1,c=we({translation:n,zoom:a,elastify:!0}),d=fe(c);le=fe(p),se=d<le,i&&J.set(a),K.set(c),Me=U&&{translation:e.detail.translation,scalar:t}},Ee=e=>{mr(Z,x=!1,x),o(34,ne=!1),o(13,U=!1),se&&le<50&&(re=void 0,ae=void 0,K.set(ue()))},Ie=e=>{mr(Z,x=!1,x),o(34,ne=!1),o(13,U=!1),Promise.resolve().then((()=>{if(Te&&re){const t=Me||e.detail,o=i?ss(ae*t.scalar,s,l):1,n=we({elastify:!1,translation:t.translation,zoom:o});K.set(n)}re=void 0,ae=void 0,L&&e.detail.isDoubleTap&&$e(),de()}))};let Ae,Le=Date.now(),ze=0,Fe=!1,De=!1;const Oe=e=>{if(!ce(e))return;if(e.preventDefault(),e.stopPropagation(),De)return;clearTimeout(Ae);const t=Rd(e,{fixScrollDirection:b}),o=Date.now(),i=o-Le;Le=o;const n=Math.abs(t/i)>.2;ze=n?ze+1:0;const r=1+-1*t*W/(n?50:100),a=Qp(e,f,$);Be(a,r,{isZoomingFast:n})},Be=(e,t,{isZoomingFast:o})=>{const i=g?h||m:r?h||1:h||m,n=i*t,a=ue(),c=p,d=g?m:r?1:m,u=Math.abs(n-d),$=n<i,f=i>d&&$||i<d&&n>i,b=ze>=5;if(o||(Fe=!1),ze>0&&!Fe&&(Fe=f),b&&Fe)return $e(),De=!0,void setTimeout((()=>{De=!1}),100);if(b)return;!o&&f&&u<=.05&&(Ae=setTimeout((()=>{$e()}),250)),mr(J,h=ss(n,s,l),h);const x=Je(y);ct(x,i),lt(x,c);const v=st(x),w=Je(x);ct(w,h-i+1,e);const S=st(w),k=ke(Se(S,v),i);((e,t,o)=>{e.x=t,e.y=o})(a,c.x+k.x,c.y+k.y),mr(K,p=$&&o?Ce(me(p),.85):ve(a,i),p),de()},We=e=>(e?"add":"remove")+"EventListener";let Ve,_e,Ne,He;const je=e=>{e.preventDefault(),_e={...p},He=Je(y),Ne=Qp(e,f,$),Ve=g?h||m:r?h||1:h||m},Ue=e=>{e.preventDefault(),mr(J,h=ss(e.scale*Ve,s,l),h);const t=Je(He);ct(t,Ve),lt(t,_e);const o=st(t),i=Je(t);ct(i,h-Ve+1,Ne);const n=st(i),r=ke(Se(n,o),Ve),a={x:_e.x+r.x,y:_e.y+r.y};mr(K,p=ve(a,h),p)},Ge=e=>{e.preventDefault()},Ze=e=>{k[We(e)]("wheel",Oe),fo()||(k[We(e)]("gesturestart",je),k[We(e)]("gesturechange",Ue),k[We(e)]("gestureend",Ge))},Xe=e=>{const t=We(e);k[t]("interactionstart",Re),k[t]("interactionupdate",Pe),k[t]("interactionrelease",Ee),k[t]("interactionend",Ie)};let Ye;return qr((()=>{Ye=wd(k,{drag:!0,pinch:!0,inertia:!0,inertiaDurationMultiplier:10,shouldStartInteraction:ce})})),Jr((()=>{Ze(!1),Xe(!1),Ye.destroy(),Ye=void 0})),e.$$set=e=>{"root"in e&&o(14,k=e.root),"locale"in e&&o(15,C=e.locale),"stores"in e&&o(16,T=e.stores),"allowPan"in e&&o(17,M=e.allowPan),"allowZoom"in e&&o(18,R=e.allowZoom),"enablePan"in e&&o(19,P=e.enablePan),"enableZoom"in e&&o(20,E=e.enableZoom),"enableZoomControls"in e&&o(21,I=e.enableZoomControls),"enableZoomInput"in e&&o(22,A=e.enableZoomInput),"enablePanInput"in e&&o(23,L=e.enablePanInput),"enablePanLimit"in e&&o(24,z=e.enablePanLimit),"panLimitGutterScalar"in e&&o(25,F=e.panLimitGutterScalar),"zoomOptions"in e&&o(26,D=e.zoomOptions),"zoomAdjustStep"in e&&o(27,O=e.zoomAdjustStep),"zoomAdjustFactor"in e&&o(28,B=e.zoomAdjustFactor),"zoomAdjustWheelFactor"in e&&o(29,W=e.zoomAdjustWheelFactor),"elasticity"in e&&o(30,V=e.elasticity),"imageSelectionRectCentered"in e&&o(31,_=e.imageSelectionRectCentered),"imageSelectionRectScalar"in e&&o(32,N=e.imageSelectionRectScalar),"zoomLevel"in e&&o(33,H=e.zoomLevel),"zoomControls"in e&&o(12,j=e.zoomControls),"zoomMultiTouching"in e&&o(13,U=e.zoomMultiTouching)},e.$$.update=()=>{var t,$;5505024&e.$$.dirty[0]&&o(36,i=R&&E&&A),655360&e.$$.dirty[0]&&o(35,n=M&&P),393216&e.$$.dirty[0]&&(M||R?(mr(J,h=E?S.zoom:void 0,h),mr(K,p=P?me(S.translation):pe()?p:ue(),p),ye.set(h)):ge()),32768&e.$$.dirty[1]&&(r=v>=1),67141632&e.$$.dirty[0]|57344&e.$$.dirty[1]&&o(40,a=[(g||v<1)&&[m,Kp(m)+"%",{sublabel:C.labelZoomFit}],...D.map((e=>[e,Kp(e)+"%"]))].filter(Boolean).map((e=>(1===e[0]&&(e[2]={sublabel:C.labelZoomActual}),e))).sort(((e,t)=>{const o=e[0]||m,i=t[0]||m;return o<i?-1:i<o?1:0}))),8704&e.$$.dirty[1]&&o(38,s=Math.min(a.reduce(((e,[t])=>t<e?t:e),Number.MAX_SAFE_INTEGER),m)),512&e.$$.dirty[1]&&o(37,l=a.reduce(((e,[t])=>t>e?t:e),Number.MIN_SAFE_INTEGER)),4&e.$$.dirty[1]&&null!==H&&xe(H),61440&e.$$.dirty[1]&&o(42,d=h||(g||v<1?m:1)),2560&e.$$.dirty[1]&&o(39,(t=a.map((([e])=>e)),$=d,c=t.findIndex((e=>e===$)))),2048&e.$$.dirty[1]&&o(41,u=Kp(d)+"%"),405045248&e.$$.dirty[0]|6080&e.$$.dirty[1]&&o(12,j=(R||R)&&I?[["Button","zoom-out",{hideLabel:!0,label:C.labelZoomOut,icon:C.iconZoomOut,disabled:h===s,onclick:()=>be((e=>Math.max(s,e-O))),onhold:()=>be((e=>Math.max(s,e*(1-B))))}],["Dropdown","zoom-level",{label:u,labelClass:"PinturaFixedWidthCharacters",options:a,selectedIndex:c,onchange:e=>xe(e.value)}],["Button","zoom-in",{hideLabel:!0,label:C.labelZoomIn,icon:C.iconZoomIn,disabled:h===l,onclick:()=>be((e=>Math.min(l,e+O))),onhold:()=>be((e=>Math.min(l,e*(1+B))))}]]:[]),16384&e.$$.dirty[0]|32&e.$$.dirty[1]&&k&&Ze(i),16384&e.$$.dirty[0]|16&e.$$.dirty[1]&&k&&Xe(n),8404992&e.$$.dirty[0]|24&e.$$.dirty[1]&&k&&k.style.setProperty("--cursor",n&&L?ne?"grabbing":"grab":"")},[G,Z,X,Y,q,K,J,Q,ee,te,oe,ie,j,U,k,C,T,M,R,P,E,I,A,L,z,F,D,O,B,W,V,_,N,H,ne,n,i,l,s,c,a,u,d,h,m,g,v]}class tm extends Ba{constructor(e){super(),Oa(this,e,em,null,ir,{root:14,locale:15,stores:16,allowPan:17,allowZoom:18,enablePan:19,enableZoom:20,enableZoomControls:21,enableZoomInput:22,enablePanInput:23,enablePanLimit:24,panLimitGutterScalar:25,zoomOptions:26,zoomAdjustStep:27,zoomAdjustFactor:28,zoomAdjustWheelFactor:29,elasticity:30,imageSelectionRectCentered:31,imageSelectionRectScalar:32,zoomLevel:33,zoomControls:12,zoomMultiTouching:13},null,[-1,-1,-1,-1])}}const{window:om}=Ma;function im(e){let t,o,i,n=e[41]&&nm(e),r=e[38]&&pm(e);return{c(){n&&n.c(),t=Er(),r&&r.c(),o=Ir()},m(e,a){n&&n.m(e,a),Cr(e,t,a),r&&r.m(e,a),Cr(e,o,a),i=!0},p(e,i){e[41]?n?(n.p(e,i),1024&i[1]&&Sa(n,1)):(n=nm(e),n.c(),Sa(n,1),n.m(t.parentNode,t)):n&&(va(),ka(n,1,1,(()=>{n=null})),wa()),e[38]?r?(r.p(e,i),128&i[1]&&Sa(r,1)):(r=pm(e),r.c(),Sa(r,1),r.m(o.parentNode,o)):r&&(va(),ka(r,1,1,(()=>{r=null})),wa())},i(e){i||(Sa(n),Sa(r),i=!0)},o(e){ka(n),ka(r),i=!1},d(e){n&&n.d(e),e&&Tr(t),r&&r.d(e),e&&Tr(o)}}}function nm(e){let t,o,i,n,r,a;const s=[am,rm],l=[];function c(e,t){return e[39]?0:e[35]?1:-1}return~(i=c(e))&&(n=l[i]=s[i](e)),{c(){t=Mr("div"),o=Mr("p"),n&&n.c(),Fr(o,"style",e[72]),Fr(t,"class","PinturaStatus"),Fr(t,"style",r="opacity: "+e[54])},m(e,n){Cr(e,t,n),wr(t,o),~i&&l[i].m(o,null),a=!0},p(e,d){let u=i;i=c(e),i===u?~i&&l[i].p(e,d):(n&&(va(),ka(l[u],1,1,(()=>{l[u]=null})),wa()),~i?(n=l[i],n?n.p(e,d):(n=l[i]=s[i](e),n.c()),Sa(n,1),n.m(o,null)):n=null),(!a||1024&d[2])&&Fr(o,"style",e[72]),(!a||8388608&d[1]&&r!==(r="opacity: "+e[54]))&&Fr(t,"style",r)},i(e){a||(Sa(n),a=!0)},o(e){ka(n),a=!1},d(e){e&&Tr(t),~i&&l[i].d()}}}function rm(e){let t,o,i,n;t=new Od({props:{text:e[35].text||"",onmeasure:e[219]}});let r=e[35].aside&&sm(e);return{c(){za(t.$$.fragment),o=Er(),r&&r.c(),i=Ir()},m(e,a){Fa(t,e,a),Cr(e,o,a),r&&r.m(e,a),Cr(e,i,a),n=!0},p(e,o){const n={};16&o[1]&&(n.text=e[35].text||""),t.$set(n),e[35].aside?r?(r.p(e,o),16&o[1]&&Sa(r,1)):(r=sm(e),r.c(),Sa(r,1),r.m(i.parentNode,i)):r&&(va(),ka(r,1,1,(()=>{r=null})),wa())},i(e){n||(Sa(t.$$.fragment,e),Sa(r),n=!0)},o(e){ka(t.$$.fragment,e),ka(r),n=!1},d(e){Da(t,e),e&&Tr(o),r&&r.d(e),e&&Tr(i)}}}function am(e){let t,o,i,n;return t=new Od({props:{text:e[39],onmeasure:e[219]}}),i=new Hd({props:{class:"PinturaStatusIcon",offset:e[82],opacity:e[83],$$slots:{default:[hm]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment),o=Er(),za(i.$$.fragment)},m(e,r){Fa(t,e,r),Cr(e,o,r),Fa(i,e,r),n=!0},p(e,o){const n={};256&o[1]&&(n.text=e[39]),t.$set(n);const r={};1048576&o[2]&&(r.offset=e[82]),2097152&o[2]&&(r.opacity=e[83]),8&o[0]|256&o[19]&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(e){n||(Sa(t.$$.fragment,e),Sa(i.$$.fragment,e),n=!0)},o(e){ka(t.$$.fragment,e),ka(i.$$.fragment,e),n=!1},d(e){Da(t,e),e&&Tr(o),Da(i,e)}}}function sm(e){let t,o;return t=new Hd({props:{class:"PinturaStatusButton",offset:e[82],opacity:e[83],$$slots:{default:[dm]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};1048576&o[2]&&(i.offset=e[82]),2097152&o[2]&&(i.opacity=e[83]),16&o[1]|256&o[19]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function lm(e){let t,o;return t=new Vd({props:{progress:e[35].progressIndicator.progress}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};16&o[1]&&(i.progress=e[35].progressIndicator.progress),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function cm(e){let t,o;const i=[e[35].closeButton,{hideLabel:!0}];let n={};for(let e=0;e<i.length;e+=1)n=Jn(n,i[e]);return t=new bd({props:n}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const n=16&o[1]?Ia(i,[Aa(e[35].closeButton),i[1]]):{};t.$set(n)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function dm(e){let t,o,i,n=e[35].progressIndicator.visible&&lm(e),r=e[35].closeButton&&e[35].text&&cm(e);return{c(){n&&n.c(),t=Er(),r&&r.c(),o=Ir()},m(e,a){n&&n.m(e,a),Cr(e,t,a),r&&r.m(e,a),Cr(e,o,a),i=!0},p(e,i){e[35].progressIndicator.visible?n?(n.p(e,i),16&i[1]&&Sa(n,1)):(n=lm(e),n.c(),Sa(n,1),n.m(t.parentNode,t)):n&&(va(),ka(n,1,1,(()=>{n=null})),wa()),e[35].closeButton&&e[35].text?r?(r.p(e,i),16&i[1]&&Sa(r,1)):(r=cm(e),r.c(),Sa(r,1),r.m(o.parentNode,o)):r&&(va(),ka(r,1,1,(()=>{r=null})),wa())},i(e){i||(Sa(n),Sa(r),i=!0)},o(e){ka(n),ka(r),i=!1},d(e){n&&n.d(e),e&&Tr(t),r&&r.d(e),e&&Tr(o)}}}function um(e){let t,o=e[3].iconSupportError+"";return{c(){t=Rr("g")},m(e,i){Cr(e,t,i),t.innerHTML=o},p(e,i){8&i[0]&&o!==(o=e[3].iconSupportError+"")&&(t.innerHTML=o)},d(e){e&&Tr(t)}}}function hm(e){let t,o;return t=new ud({props:{$$slots:{default:[um]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};8&o[0]|256&o[19]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function pm(e){let t,o,i,n,r,a,s,l,c,d,u,h,p,m,g=e[10]&&mm(e),$=e[46]&&e[45]&&gm(e);const f=[wm,vm],y=[];function b(e,t){return e[46]?0:1}function x(t){e[436](t)}function v(t){e[437](t)}function w(t){e[438](t)}i=b(e),n=y[i]=f[i](e),a=new Dc({props:{isAnimated:e[53],isTransparent:e[20],pixelRatio:e[57],textPixelRatio:e[6],backgroundColor:e[56],maskRect:e[58],maskOpacity:e[73]?e[73].maskOpacity:1,maskMarkupOpacity:e[7],maskFrameOpacity:e[5],clipAnnotationsToImage:e[85],images:e[55],interfaceImages:e[86],loadImageData:e[28],enableGrid:e[11],gridSize:e[87],gridColors:[e[88],e[89]],gridOpacity:e[90],selectionColor:e[91],willRequest:e[81]||e[92],willRender:e[433],didRender:e[434]}});let S={root:e[2],locale:e[3],stores:e[200],allowPan:e[94],enablePan:e[17],enablePanLimit:e[21],panLimitGutterScalar:e[22],enablePanInput:e[95],allowZoom:e[96],enableZoom:e[18],enableZoomInput:void 0!==e[19]?e[19]:e[97],enableZoomControls:e[98],zoomOptions:e[13]||e[23],zoomAdjustStep:e[14]||e[24],zoomAdjustFactor:e[15]||e[25],zoomAdjustWheelFactor:e[16]||e[26],imageSelectionRectCentered:e[99],imageSelectionRectScalar:e[100],elasticity:Rm*e[8]};return void 0!==e[0]&&(S.zoomLevel=e[0]),void 0!==e[33]&&(S.zoomControls=e[33]),void 0!==e[34]&&(S.zoomMultiTouching=e[34]),d=new tm({props:S}),na.push((()=>La(d,"zoomLevel",x))),na.push((()=>La(d,"zoomControls",v))),na.push((()=>La(d,"zoomMultiTouching",w))),{c(){g&&g.c(),t=Er(),$&&$.c(),o=Er(),n.c(),r=Er(),za(a.$$.fragment),s=Er(),l=Mr("div"),c=Er(),za(d.$$.fragment),Fr(l,"class","PinturaRootPortal")},m(n,u){g&&g.m(n,u),Cr(n,t,u),$&&$.m(n,u),Cr(n,o,u),y[i].m(n,u),Cr(n,r,u),Fa(a,n,u),Cr(n,s,u),Cr(n,l,u),e[435](l),Cr(n,c,u),Fa(d,n,u),m=!0},p(e,s){e[10]?g?(g.p(e,s),1024&s[0]&&Sa(g,1)):(g=mm(e),g.c(),Sa(g,1),g.m(t.parentNode,t)):g&&(va(),ka(g,1,1,(()=>{g=null})),wa()),e[46]&&e[45]?$?($.p(e,s),49152&s[1]&&Sa($,1)):($=gm(e),$.c(),Sa($,1),$.m(o.parentNode,o)):$&&(va(),ka($,1,1,(()=>{$=null})),wa());let l=i;i=b(e),i===l?y[i].p(e,s):(va(),ka(y[l],1,1,(()=>{y[l]=null})),wa(),n=y[i],n?n.p(e,s):(n=y[i]=f[i](e),n.c()),Sa(n,1),n.m(r.parentNode,r));const c={};4194304&s[1]&&(c.isAnimated=e[53]),1048576&s[0]&&(c.isTransparent=e[20]),67108864&s[1]&&(c.pixelRatio=e[57]),64&s[0]&&(c.textPixelRatio=e[6]),33554432&s[1]&&(c.backgroundColor=e[56]),134217728&s[1]&&(c.maskRect=e[58]),2048&s[2]&&(c.maskOpacity=e[73]?e[73].maskOpacity:1),128&s[0]&&(c.maskMarkupOpacity=e[7]),32&s[0]&&(c.maskFrameOpacity=e[5]),8388608&s[2]&&(c.clipAnnotationsToImage=e[85]),16777216&s[1]&&(c.images=e[55]),16777216&s[2]&&(c.interfaceImages=e[86]),268435456&s[0]&&(c.loadImageData=e[28]),2048&s[0]&&(c.enableGrid=e[11]),33554432&s[2]&&(c.gridSize=e[87]),201326592&s[2]&&(c.gridColors=[e[88],e[89]]),268435456&s[2]&&(c.gridOpacity=e[90]),536870912&s[2]&&(c.selectionColor=e[91]),1074266112&s[2]&&(c.willRequest=e[81]||e[92]),512&s[0]|270991424&s[1]|1&s[3]&&(c.willRender=e[433]),62&s[2]&&(c.didRender=e[434]),a.$set(c);const m={};4&s[0]&&(m.root=e[2]),8&s[0]&&(m.locale=e[3]),2&s[3]&&(m.allowPan=e[94]),131072&s[0]&&(m.enablePan=e[17]),2097152&s[0]&&(m.enablePanLimit=e[21]),4194304&s[0]&&(m.panLimitGutterScalar=e[22]),4&s[3]&&(m.enablePanInput=e[95]),8&s[3]&&(m.allowZoom=e[96]),262144&s[0]&&(m.enableZoom=e[18]),524288&s[0]|16&s[3]&&(m.enableZoomInput=void 0!==e[19]?e[19]:e[97]),32&s[3]&&(m.enableZoomControls=e[98]),8396800&s[0]&&(m.zoomOptions=e[13]||e[23]),16793600&s[0]&&(m.zoomAdjustStep=e[14]||e[24]),33587200&s[0]&&(m.zoomAdjustFactor=e[15]||e[25]),67174400&s[0]&&(m.zoomAdjustWheelFactor=e[16]||e[26]),64&s[3]&&(m.imageSelectionRectCentered=e[99]),128&s[3]&&(m.imageSelectionRectScalar=e[100]),256&s[0]&&(m.elasticity=Rm*e[8]),!u&&1&s[0]&&(u=!0,m.zoomLevel=e[0],ha((()=>u=!1))),!h&&4&s[1]&&(h=!0,m.zoomControls=e[33],ha((()=>h=!1))),!p&&8&s[1]&&(p=!0,m.zoomMultiTouching=e[34],ha((()=>p=!1))),d.$set(m)},i(e){m||(Sa(g),Sa($),Sa(n),Sa(a.$$.fragment,e),Sa(d.$$.fragment,e),m=!0)},o(e){ka(g),ka($),ka(n),ka(a.$$.fragment,e),ka(d.$$.fragment,e),m=!1},d(n){g&&g.d(n),n&&Tr(t),$&&$.d(n),n&&Tr(o),y[i].d(n),n&&Tr(r),Da(a,n),n&&Tr(s),n&&Tr(l),e[435](null),n&&Tr(c),Da(d,n)}}}function mm(e){let t,o,i,n,r;return o=new Cp({props:{items:e[69]}}),{c(){t=Mr("div"),za(o.$$.fragment),Fr(t,"class","PinturaNav PinturaNavTools")},m(a,s){Cr(a,t,s),Fa(o,t,null),i=!0,n||(r=[Ar(t,"measure",e[422]),gr(Tc.call(null,t))],n=!0)},p(e,t){const i={};128&t[2]&&(i.items=e[69]),o.$set(i)},i(e){i||(Sa(o.$$.fragment,e),i=!0)},o(e){ka(o.$$.fragment,e),i=!1},d(e){e&&Tr(t),Da(o),n=!1,tr(r)}}}function gm(e){let t,o,i;return o=new Id({props:{elasticity:e[8]*Pm,scrollDirection:e[76]?"y":"x",$$slots:{default:[xm]},$$scope:{ctx:e}}}),{c(){t=Mr("div"),za(o.$$.fragment),Fr(t,"class","PinturaNav PinturaNavMain")},m(e,n){Cr(e,t,n),Fa(o,t,null),i=!0},p(e,t){const i={};256&t[0]&&(i.elasticity=e[8]*Pm),16384&t[2]&&(i.scrollDirection=e[76]?"y":"x"),12288&t[1]|135168&t[2]|256&t[19]&&(i.$$scope={dirty:t,ctx:e}),o.$set(i)},i(e){i||(Sa(o.$$.fragment,e),i=!0)},o(e){ka(o.$$.fragment,e),i=!1},d(e){e&&Tr(t),Da(o)}}}function $m(e){let t,o;const i=[e[79],{tabs:e[44]}];let n={$$slots:{default:[bm,({tab:e})=>({596:e}),({tab:e})=>[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e?128:0]]},$$scope:{ctx:e}};for(let e=0;e<i.length;e+=1)n=Jn(n,i[e]);return t=new Uc({props:n}),t.$on("select",e[423]),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const n=8192&o[1]|131072&o[2]?Ia(i,[131072&o[2]&&Aa(e[79]),8192&o[1]&&{tabs:e[44]}]):{};384&o[19]&&(n.$$scope={dirty:o,ctx:e}),t.$set(n)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function fm(e){let t,o;return t=new Cp({props:{items:e[44]}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};8192&o[1]&&(i.items=e[44]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function ym(e){let t,o=e[596].icon+"";return{c(){t=Rr("g")},m(e,i){Cr(e,t,i),t.innerHTML=o},p(e,i){128&i[19]&&o!==(o=e[596].icon+"")&&(t.innerHTML=o)},d(e){e&&Tr(t)}}}function bm(e){let t,o,i,n,r,a=e[596].label+"";return t=new ud({props:{$$slots:{default:[ym]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment),o=Er(),i=Mr("span"),n=Pr(a)},m(e,a){Fa(t,e,a),Cr(e,o,a),Cr(e,i,a),wr(i,n),r=!0},p(e,o){const i={};384&o[19]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i),(!r||128&o[19])&&a!==(a=e[596].label+"")&&Br(n,a)},i(e){r||(Sa(t.$$.fragment,e),r=!0)},o(e){ka(t.$$.fragment,e),r=!1},d(e){Da(t,e),e&&Tr(o),e&&Tr(i)}}}function xm(e){let t,o,i,n;const r=[fm,$m],a=[];function s(e,t){return e[74]?0:1}return t=s(e),o=a[t]=r[t](e),{c(){o.c(),i=Ir()},m(e,o){a[t].m(e,o),Cr(e,i,o),n=!0},p(e,n){let l=t;t=s(e),t===l?a[t].p(e,n):(va(),ka(a[l],1,1,(()=>{a[l]=null})),wa(),o=a[t],o?o.p(e,n):(o=a[t]=r[t](e),o.c()),Sa(o,1),o.m(i.parentNode,i))},i(e){n||(Sa(o),n=!0)},o(e){ka(o),n=!1},d(e){a[t].d(e),e&&Tr(i)}}}function vm(e){let t,o,i;function n(t){e[429](t)}let r={locale:e[3],class:"PinturaMain",view:e[205](e[43]),props:e[204](e[43],e[27]),stores:e[200]};return void 0!==e[1][e[43]]&&(r.component=e[1][e[43]]),t=new ld({props:r}),na.push((()=>La(t,"component",n))),t.$on("measure",e[231]),t.$on("show",e[430]),t.$on("hide",e[431]),t.$on("fade",e[432]),{c(){za(t.$$.fragment)},m(e,o){Fa(t,e,o),i=!0},p(e,i){const n={};8&i[0]&&(n.locale=e[3]),4096&i[1]&&(n.view=e[205](e[43])),134217728&i[0]|4096&i[1]&&(n.props=e[204](e[43],e[27])),!o&&2&i[0]|4096&i[1]&&(o=!0,n.component=e[1][e[43]],ha((()=>o=!1))),t.$set(n)},i(e){i||(Sa(t.$$.fragment,e),i=!0)},o(e){ka(t.$$.fragment,e),i=!1},d(e){Da(t,e)}}}function wm(e){let t,o;const i=[{class:"PinturaMain"},{visible:e[62]},e[79],{panels:e[78]}];let n={$$slots:{default:[Sm,({panel:e,panelIsActive:t})=>({594:e,595:t}),({panel:e,panelIsActive:t})=>[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(e?32:0)|(t?64:0)]]},$$scope:{ctx:e}};for(let e=0;e<i.length;e+=1)n=Jn(n,i[e]);return t=new id({props:n}),t.$on("measure",e[428]),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const n=196609&o[2]?Ia(i,[i[0],1&o[2]&&{visible:e[62]},131072&o[2]&&Aa(e[79]),65536&o[2]&&{panels:e[78]}]):{};134217738&o[0]|352&o[19]&&(n.$$scope={dirty:o,ctx:e}),t.$set(n)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Sm(e){let t,o,i;function n(t){e[424](t,e[594])}let r={locale:e[3],view:e[205](e[594]),props:e[204](e[594],e[27]),isActive:e[595],stores:e[200]};return void 0!==e[1][e[594]]&&(r.component=e[1][e[594]]),t=new ld({props:r}),na.push((()=>La(t,"component",n))),t.$on("measure",e[231]),t.$on("show",(function(){return e[425](e[594])})),t.$on("hide",(function(){return e[426](e[594])})),t.$on("fade",(function(...t){return e[427](e[594],...t)})),{c(){za(t.$$.fragment)},m(e,o){Fa(t,e,o),i=!0},p(i,n){e=i;const r={};8&n[0]&&(r.locale=e[3]),32&n[19]&&(r.view=e[205](e[594])),134217728&n[0]|32&n[19]&&(r.props=e[204](e[594],e[27])),64&n[19]&&(r.isActive=e[595]),!o&&2&n[0]|32&n[19]&&(o=!0,r.component=e[1][e[594]],ha((()=>o=!1))),t.$set(r)},i(e){i||(Sa(t.$$.fragment,e),i=!0)},o(e){ka(t.$$.fragment,e),i=!1},d(e){Da(t,e)}}}function km(e){let t,o;return{c(){t=Mr("span"),Fr(t,"class","PinturaEditorOverlay"),Fr(t,"style",o="opacity:"+e[101])},m(e,o){Cr(e,t,o)},p(e,i){256&i[3]&&o!==(o="opacity:"+e[101])&&Fr(t,"style",o)},d(e){e&&Tr(t)}}}function Cm(e){let t,o;const i=[{layout:"row"},{parentRect:e[50]},e[60]];let n={$$slots:{default:[Tm]},$$scope:{ctx:e}};for(let e=0;e<i.length;e+=1)n=Jn(n,i[e]);return t=new Ap({props:n}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const n=537395200&o[1]?Ia(i,[i[0],524288&o[1]&&{parentRect:e[50]},536870912&o[1]&&Aa(e[60])]):{};1610612736&o[1]|256&o[19]&&(n.$$scope={dirty:o,ctx:e}),t.$set(n)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Tm(e){let t,o,i;return{c(){t=Mr("input"),t.value=o=e[60].text,Fr(t,"placeholder",i=e[60].placeholder),Fr(t,"type","text"),Fr(t,"spellcheck","false"),Fr(t,"autocorrect","off"),Fr(t,"autocapitalize","off")},m(o,i){Cr(o,t,i),e[439](t)},p(e,n){536870912&n[1]&&o!==(o=e[60].text)&&t.value!==o&&(t.value=o),536870912&n[1]&&i!==(i=e[60].placeholder)&&Fr(t,"placeholder",i)},d(o){o&&Tr(t),e[439](null)}}}function Mm(e){let t,o,i,r,a,s;ua(e[421]);let l=e[40]&&im(e),c=e[101]>0&&km(e),d=e[60]&&Cm(e);return{c(){t=Mr("div"),l&&l.c(),o=Er(),c&&c.c(),i=Er(),d&&d.c(),Fr(t,"id",e[4]),Fr(t,"class",e[77]),Fr(t,"data-env",e[75]),Fr(t,"dir",e[12])},m(u,h){Cr(u,t,h),l&&l.m(t,null),wr(t,o),c&&c.m(t,null),wr(t,i),d&&d.m(t,null),e[440](t),r=!0,a||(s=[Ar(om,"keydown",e[222]),Ar(om,"keyup",e[223]),Ar(om,"blur",e[224]),Ar(om,"paste",e[228]),Ar(om,"resize",e[421]),Ar(t,"ping",(function(){or(e[68])&&e[68].apply(this,arguments)})),Ar(t,"contextmenu",e[225]),Ar(t,"touchstart",e[220],{passive:!1}),Ar(t,"touchmove",(function(){or(e[71])&&e[71].apply(this,arguments)})),Ar(t,"pointermove",(function(){or(e[70])&&e[70].apply(this,arguments)})),Ar(t,"transitionend",e[210]),Ar(t,"dropfiles",e[226]),Ar(t,"measure",e[441]),Ar(t,"click",(function(){or(e[42]?e[227]:n)&&(e[42]?e[227]:n).apply(this,arguments)})),gr(Tc.call(null,t,{observeViewRect:!0,isMeasureRoot:!0})),gr(Mc.call(null,t)),gr(Pc.call(null,t))],a=!0)},p(n,a){(e=n)[40]?l?(l.p(e,a),512&a[1]&&Sa(l,1)):(l=im(e),l.c(),Sa(l,1),l.m(t,o)):l&&(va(),ka(l,1,1,(()=>{l=null})),wa()),e[101]>0?c?c.p(e,a):(c=km(e),c.c(),c.m(t,i)):c&&(c.d(1),c=null),e[60]?d?(d.p(e,a),536870912&a[1]&&Sa(d,1)):(d=Cm(e),d.c(),Sa(d,1),d.m(t,null)):d&&(va(),ka(d,1,1,(()=>{d=null})),wa()),(!r||16&a[0])&&Fr(t,"id",e[4]),(!r||32768&a[2])&&Fr(t,"class",e[77]),(!r||8192&a[2])&&Fr(t,"data-env",e[75]),(!r||4096&a[0])&&Fr(t,"dir",e[12])},i(e){r||(Sa(l),Sa(d),r=!0)},o(e){ka(l),ka(d),r=!1},d(o){o&&Tr(t),l&&l.d(),c&&c.d(),d&&d.d(),e[440](null),a=!1,tr(s)}}}const Rm=1,Pm=10;function Em(e,t,o){let i,r,a,s,l,c,d,u,p,m,$,f,y,v,w,S,k,C,M,R,P,E,A,L,z,D,O,B,W,V,_,N,H,j,U,G,X,Y,q,K,J,Q,ee,te,oe,ie,ne,re,ae,se,ce,de,pe,me,ge,$e,fe,ye,be,xe,we,Se,ke,Ce,Te,Me,Re,Pe,Ee,Ie,Ae,Le,ze,Fe,De,Oe,Be,We,_e,Ne,He,je,Ue,Ge,Ze,Xe,Ye,qe,Ke,tt,ot,nt,rt,st,dt,ut,gt,$t,bt,xt,St,Ct,Mt,Rt,Pt,Et,It,At,Lt,zt,Ft,Dt,Ot,Bt,Wt,Nt,Ht,jt,Ut,Gt,Zt,Xt,qt,Kt,Jt,Qt,eo,to,oo,io,no,ro,ao,so,lo,co,ho,po,mo,go,$o,yo,bo,xo,vo,wo,So,ko,Co,To,Mo,Ro,Po,Eo,Io,Ao,zo,Fo,Do,Oo,Bo,Wo,Vo,_o,Ho,jo,Uo,Go,Zo,Xo,qo,Ko,Jo,Qo,ei,ti,oi,ii,ni,ri,ai,si,li,ci,di,ui,hi,pi,mi,gi,fi,yi,bi,xi,vi,wi,Ci,Ti,Mi,Pi,Ei,Ai,Li,zi,Fi,Di,Oi,Bi,Wi,Vi,_i,Ni,Hi=qn,ji=qn;ar(e,uc,(e=>o(409,Qo=e))),e.$$.on_destroy.push((()=>Hi())),e.$$.on_destroy.push((()=>ji()));const Ui=Yo(),Gi=Qr();let{class:Zi}=t,{layout:Xi}=t,{stores:Yi}=t,{locale:qi}=t,{id:Ki}=t,{util:Ji}=t,{utils:Qi}=t,{animations:en="auto"}=t,{disabled:tn=!1}=t,{status:on}=t,{previewUpscale:nn=!1}=t,{previewPad:rn=!1}=t,{previewMaskOpacity:an=.95}=t,{previewImageDataMaxSize:sn}=t,{previewImageTextPixelRatio:ln}=t,{markupMaskOpacity:cn=1}=t,{zoomMaskOpacity:dn=.85}=t,{elasticityMultiplier:un=10}=t,{willRevert:hn=(()=>Promise.resolve(!0))}=t,{willProcessImage:pn=(()=>Promise.resolve(!0))}=t,{willRenderCanvas:mn=Z}=t,{willRenderToolbar:$n=Z}=t,{willRenderUtilTabs:fn=Z}=t,{willSetHistoryInitialState:yn=Z}=t,{enableButtonExport:bn=!0}=t,{enableButtonRevert:wn=!0}=t,{enableNavigateHistory:Sn=!0}=t,{enableToolbar:kn=!0}=t,{enableUtils:Cn=!0}=t,{enableButtonClose:Tn=!1}=t,{enableDropImage:Rn=!1}=t,{enablePasteImage:Pn=!1}=t,{enableBrowseImage:En=!1}=t,{enableTransparencyGrid:In=!1}=t,{layoutDirectionPreference:An="auto"}=t,{layoutHorizontalUtilsPreference:Ln="left"}=t,{layoutVerticalUtilsPreference:zn="bottom"}=t,{layoutVerticalToolbarPreference:Fn="top"}=t,{layoutVerticalControlGroupsPreference:Dn="bottom"}=t,{layoutVerticalControlTabsPreference:On="bottom"}=t,{textDirection:Bn}=t,{markupEditorZoomLevel:Wn=null}=t,{markupEditorZoomLevels:Vn}=t,{markupEditorZoomAdjustStep:_n}=t,{markupEditorZoomAdjustFactor:Nn}=t,{markupEditorZoomAdjustWheelFactor:Hn}=t,{markupEditorInteractionMode:jn=!1}=t,{muteAudio:Un=!0}=t,{willSetMediaInitialTimeOffset:Gn=((e,t)=>e*qp(t[0]))}=t,{enablePan:Zn=!0}=t,{enableZoom:Kn=!0}=t,{enableZoomControls:Jn=!0}=t,{enableZoomInput:Qn}=t,{enablePanInput:er}=t,{enableCanvasAlpha:tr=!1}=t,{enablePanLimit:or}=t,{panLimitGutterScalar:ir}=t,{zoomPresetOptions:sr=[.25,.5,1,1.25,1.5,2,3,4,6,8,16]}=t,{zoomAdjustStep:lr=.25}=t,{zoomAdjustFactor:cr=.1}=t,{zoomAdjustWheelFactor:dr=1}=t,{zoomLevel:ur=null}=t,{fixScrollDirection:hr=!1}=t;const pr=_a(hr);let gr,$r;ea("fixScrollDirection",pr);let{imagePreviewSrc:fr}=t,{imageOrienter:yr={read:()=>1,apply:e=>e}}=t,{pluginComponents:br}=t,{pluginOptions:xr={}}=t;const vr=Ui.sub,wr={};let{root:Sr}=t;const kr=()=>{xt.setAttribute("data-redraw","true"),Gr.set({})},Cr=_a(!0);ar(e,Cr,(e=>o(473,Gt=e)));const Tr=_a(void 0);ar(e,Tr,(e=>o(419,fi=e)));const Mr=_a(0);ar(e,Mr,(e=>o(416,pi=e)));const Rr=_a(!1),Pr=e=>{Rr.set("play"===e.type),Ui.pub(e.type)};let Er,Ir,Ar,Lr,zr=!1;const Fr=()=>{if(!a||!Or())return;Lr=p,mr(Tr,fi=void 0,fi);const e=xt;zr=!1;const t=1/24,o=Hr();(Math.abs(d*o-pi*o)<=t||o-o*pi<=t)&&mr(Mr,pi=c,pi),Ur(pi*Hr()),e.play().catch((()=>{}));let i=jr();const n=()=>{if(Or())return;Ar=requestAnimationFrame(n);let e=jr();e-i<=0&&(e=i+.01),i=e,mr(Mr,pi=e/Hr(),pi),Lr>=0&&pi>=d&&(mr(Mr,pi=d,pi),Dr()),p>-1&&(zr=!0),zr&&-1===p&&m>0&&(mr(Mr,pi=l[m][0],pi),Ur(pi*Hr())),mr(ca,ci=pi*Hr(),ci),kr()};n()},Dr=()=>{a&&!Or()&&(mr(Tr,fi=void 0,fi),Lr=void 0,xt.pause(),cancelAnimationFrame(Ar),kr())},Or=()=>xt&&xt.paused,Br=()=>{if(a)return Or()?Fr():Dr()},Wr=()=>{a&&(xt.muted=!0)},Vr=()=>{a&&(xt.muted=!1)},_r=()=>{a&&mr(Nr,gi=!gi,gi)},Nr=_a(Un);ar(e,Nr,(e=>o(418,gi=e)));const Hr=()=>{if(a)return xt.duration},jr=()=>{if(a)return xt.currentTime},Ur=e=>{a&&(Lp(xt,e),mr(Mr,pi=e/mi,pi))},Gr=_a({});ar(e,Gr,(e=>o(52,qt=e))),ea("redrawTrigger",Gr);const Zr=_a(un);ar(e,Zr,(e=>o(490,ui=e))),ea("elasticityMultiplier",Zr);let Xr=[];const Yr=dc();ar(e,Yr,(e=>o(101,Ni=e)));const qr=jl()||1024,Kr=Ve(qr,qr),ta=Ms(),oa=e=>Promise.resolve(di&&di(e,{resourceType:"image"})).then((t=>{if(!1===t)return;const{headers:o,credentials:i}=t||{};return fetch(e,{headers:o,credentials:i}).then((e=>{if(200!==e.status)throw`${e.status} (${e.statusText})`;return e.blob()})).then((e=>Wp(e,yr,ta))).then((e=>Vp(e,y)))}));let{imageSourceToImageData:ia=(e=>T(e)?oa(e):Vt(e)?new Promise((t=>t(h(e)))):uo(e)||_t(e)?Wp(e,yr,ta).then((e=>Vp(e,y))):void 0)}=t;const ra=(()=>{let e,t;const o=Fp.reduce(((e,o)=>(e[o]=function(e,t,o){let i=[];return{set:t,update:o,publish:e=>{i.forEach((t=>t(e)))},subscribe:t=>(i.push(t),e(t),()=>{i=i.filter((e=>e!==t))})}}((e=>{if(!t)return e();t.stores[o].subscribe(e)()}),(e=>{t&&t.stores[o].set(e)}),(e=>{t&&t.stores[o].update(e)})),e)),{});return{update:i=>{if(t=i,e&&(e.forEach((e=>e())),e=void 0),!i)return o.file.publish(void 0),void o.loadState.publish(void 0);e=Fp.map((e=>i.stores[e].subscribe((t=>{o[e].publish(t)}))))},stores:o,destroy:()=>{e&&e.forEach((e=>e()))}}})(),{file:aa,size:sa,duration:la,currentTime:ca,trim:da,volume:ua,minDuration:ha,maxDuration:pa,loadState:ma,processState:ga,cropAspectRatio:$a,cropLimitToImage:fa,crop:ya,cropMinSize:ba,cropMaxSize:xa,cropRange:va,cropOrigin:wa,cropRectAspectRatio:Sa,rotation:ka,rotationRange:Ca,targetSize:Ta,flipX:Ma,flipY:Ra,backgroundColor:Pa,backgroundImage:Ea,colorMatrix:Ia,convolutionMatrix:Aa,gamma:La,vignette:za,noise:Fa,decoration:Da,annotation:Oa,manipulation:Ba,redaction:Wa,frame:Ha,selection:ja,state:Ua}=ra.stores;ar(e,aa,(e=>o(393,bo=e))),ar(e,sa,(e=>o(366,Mt=e))),ar(e,la,(e=>o(417,mi=e))),ar(e,ca,(e=>o(489,ci=e))),ar(e,da,(e=>o(414,li=e))),ar(e,ua,(e=>o(415,hi=e))),ar(e,pa,(e=>o(420,yi=e))),ar(e,ma,(e=>o(385,ao=e))),ar(e,ga,(e=>o(384,ro=e))),ar(e,$a,(e=>o(486,ti=e))),ar(e,fa,(e=>o(85,wi=e))),ar(e,ya,(e=>o(404,Bo=e))),ar(e,ka,(e=>o(369,Et=e))),ar(e,Ma,(e=>o(368,Pt=e))),ar(e,Ra,(e=>o(367,Rt=e))),ar(e,Pa,(e=>o(375,Ht=e))),ar(e,Da,(e=>o(48,Ct=e))),ar(e,Oa,(e=>o(49,It=e))),ar(e,Ba,(e=>o(372,Bt=e))),ar(e,Wa,(e=>o(373,Wt=e))),ar(e,Ha,(e=>o(47,St=e))),ar(e,ja,(e=>o(59,ri=e))),ar(e,Ua,(e=>o(475,wo=e))),ea("components",{DynamicComponentTree:Cp}),ea("previewcontrols",{play:Fr,pause:Dr,togglePlayPause:Br,mute:Wr,unmute:Vr,toggleMute:_r,setCurrentTime:Ur,getCurrentTime:jr,getDuration:Hr,frameOffset:Mr,framePeekOffset:Tr,isPlaying:Rr,isMuted:Nr});const Ga=(e,t,o=0)=>new Promise(((i,n)=>{if(Ds(e))return void Ls(e).then((e=>{const t=Lo(ci)?ci:Gn(e.duration,li||[[0,1]]);zs(e,t).then(i)}));let r,a=!1;t.cancel=()=>a=!0;const s=Date.now();ia(e).then((e=>{const t=Date.now()-s;clearTimeout(r),r=setTimeout((()=>{a||i(e)}),Math.max(0,o-t))})).catch(n)})),{images:Za,shapePreprocessor:Xa,imageScrambler:Ya,imageRedactionRendering:qa,willRequest:Ka,willRequestResource:Ja}=Yi;let Qa;ar(e,Za,(e=>o(413,si=e))),ar(e,Xa,(e=>o(412,ai=e))),ar(e,Ya,(e=>o(376,jt=e))),ar(e,qa,(e=>o(374,Nt=e))),ar(e,Ka,(e=>o(81,di=e))),ar(e,Ja,(e=>o(92,Li=e)));const es=Na(Ea,((e,t)=>{if(!e)return t(void 0);Qa&&(Qa.cancel(),Qa=void 0),Qa={cancel:n},Ga(e,Qa).then(t).catch((e=>{}))})),ts=Ua.subscribe((e=>Ui.pub("update",e))),os=_a();ea("ui",_a({})),ea("selection",ja);const is=_a(!0);ar(e,is,(e=>o(94,Fi=e)));const ns=_a(!0);ar(e,ns,(e=>o(96,Oi=e)));const rs=_a(!0);ar(e,rs,(e=>o(411,ni=e)));const as=_a(!0);ar(e,as,(e=>o(487,oi=e)));const ls=_a(!0);ar(e,ls,(e=>o(97,Bi=e)));const cs=_a();ar(e,cs,(e=>o(98,Wi=e)));const ds=_a();ar(e,ds,(e=>o(488,ii=e)));const us=Na([ds,as],(()=>void 0!==ii?ii:oi));ar(e,us,(e=>o(95,Di=e)));const ps=_a([0,0,0]);ar(e,ps,(e=>o(56,Mo=e)));const ms=_a([1,1,1]);ar(e,ms,(e=>o(471,Ot=e)));const gs=dc([1,1,1]);ar(e,gs,(e=>o(470,Dt=e)));const $s=_a();ar(e,$s,(e=>o(91,Ai=e)));const fs=_a(),ys=_a();ar(e,ys,(e=>o(51,Zt=e)));const bs=_a();ar(e,bs,(e=>o(370,Lt=e)));const xs=_a(Qe());ar(e,xs,(e=>o(80,So=e)));const vs=_a(0);ar(e,vs,(e=>o(410,ei=e)));const ws=_a(Qe());ar(e,ws,(e=>o(84,vi=e)));const Ss=_a();ar(e,Ss,(e=>o(468,bt=e)));const ks=Bp("(pointer: fine)",(e=>e?"pointer-fine":"pointer-coarse"));ar(e,ks,(e=>o(391,$o=e)));const Cs=Bp("(hover: hover)",(e=>e?"pointer-hover":"pointer-no-hover"));ar(e,Cs,(e=>o(390,go=e)));const Ts=_a(!1),Rs=_a(!1);ar(e,Rs,(e=>o(371,Ft=e)));const Ps=Va(void 0,(e=>{const t=dc(0),o=[Rs.subscribe((e=>{t.set(e?1:0,{hard:!Jt})})),t.subscribe(e)];return()=>o.forEach((e=>e()))}));ar(e,Ps,(e=>o(469,zt=e)));const Es=_a();ar(e,Es,(e=>o(474,ho=e)));const Is=_a();let As;ar(e,Is,(e=>o(53,Jt=e))),ea("isAnimated",Is);const Fs=_a(nn);ar(e,Fs,(e=>o(394,xo=e)));const Os=_a(!1);ar(e,Os,(e=>o(480,_o=e))),ea("imageIsStatic",Os);const Bs=_a();ar(e,Bs,(e=>o(481,Ho=e)));const Ws=_a();ar(e,Ws,(e=>o(478,Wo=e)));const Vs=Va(void 0,(e=>{const t=_a(void 0),o=[ya.subscribe((()=>{if(!Bo)return;if(_o)return t.set(Je(Bo));const e=Cd(Bo,Wo,5*un);t.set(e)})),t.subscribe(e)];return()=>o.forEach((e=>e()))})),_s=_a();ar(e,_s,(e=>o(477,Oo=e)));const Ns=_a();ar(e,Ns,(e=>o(479,Vo=e)));const Hs=_a(void 0);ar(e,Hs,(e=>o(484,qo=e)));const js=_a(ue());ar(e,js,(e=>o(485,Ko=e)));const Us=(e,t)=>{if(!t||!e)return{top:0,right:0,bottom:0,left:0};const o=vn(t,e,v),i=xn(o,e);return{top:Math.abs(i.top),right:Math.abs(i.right),bottom:Math.abs(i.bottom),left:Math.abs(i.left)}},Gs=_a({}),Zs=Na([Ss,xs,ws,Gs],(([e,t,o,i],n)=>{if(!e)return n(void 0);let r=0;1!==W.length||$||"bottom"===Fn||(r=o.y+o.height),n(at(e.x+t.x,e.y+t.y+r,e.width,e.height))}));let Xs={left:0,right:0,top:0,bottom:0};const Ys=_a(!1),qs=Na([Ys,Ha,Zs,Rs],(([e,t,o,i],n)=>{if(!o)return n({left:0,right:0,top:0,bottom:0});if(!e)return;const r=Math.min(o.width,o.height),a=Us({width:r,height:r},t);le(Xs.top,4)===le(a.top,4)&&le(Xs.bottom,4)===le(a.bottom,4)&&le(Xs.right,4)===le(a.right,4)&&le(Xs.left,4)===le(a.left,4)||(Xs=a,n(a))}));ar(e,qs,(e=>o(402,zo=e)));const Ks=Na([Ys,qs],(([e,t],o)=>{if(!e)return o(!1);o(Object.values(t).some((e=>e>0)))}));ar(e,Ks,(e=>o(403,Fo=e)));const Js=Na([Ys,Ss,Ks,qs],(([e,t,o,i],n)=>{if(t)return e&&o?void n(at(t.x+i.left,t.y+i.top,t.width-i.left-i.right,t.height-i.top-i.bottom)):n({...t})})),Qs=Na([Zs,Ks,qs],(([e,t,o],i)=>e?t?void i(at(e.x+o.left,e.y+o.top,e.width-o.left-o.right,e.height-o.top-o.bottom)):i(e):i(void 0)));ar(e,Qs,(e=>o(50,At=e)));const el=Na([Os,sa,ka],(([e,t,o],i)=>{if(!e||!t)return i(void 0);const n=et(t);i(ft(n,o))})),tl=Na([el],(([e],t)=>{if(!e)return t(void 0);const o=it(e);t(Tt(o))}));ar(e,tl,(e=>o(406,Go=e)));const ol=Na([Qs,ya,tl,Fs],(([e,t,o,i],n)=>{if(!e||!t||Ho||Wo)return;const{width:r,height:a}=o||t,s=Math.min(e.width/r,e.height/a);n(i?s:Math.min(1,s))}));ar(e,ol,(e=>o(405,Uo=e))),ea("imageStaticVisualCorners",Na([Os,sa,ka,Qs,Ss,ol],(([e,t,o,i,n,r],a)=>{if(!(e&&i&&n&&t))return a(void 0);const s=et(t),l=Tt(ct(s,r)),c=yt(i,l);l.x=c.x,l.y=c.y,a(ft(l,o))})));const il=_a(void 0);ar(e,il,(e=>o(408,Jo=e)));const nl=Na([ya,Qs],(([e,t])=>{if(t&&e)return Math.min(t.width/e.width,t.height/e.height)})),rl=Na([ya,_s],(([e,t])=>e&&t?Math.min(e.width/t.width,e.height/t.height):1));ar(e,rl,(e=>o(100,_i=e)));const al=Na([il,rl],(([e,t])=>e&&t?t*e:1));ar(e,al,(e=>o(483,Zo=e)));const sl=_a(ue());ar(e,sl,(e=>o(407,Xo=e)));const ll=_a({scalar:Zo,translation:Xo}),cl=()=>{ll.set({scalar:void 0,translation:ue()})},dl=Va(void 0,(e=>{const t=dc(void 0,{precision:1e-4}),o=1===Qd()?e=>kt(e,Math.round):Z,i=()=>{if(!Oo)return;const e=Ft||!ho;if(_o){const o=Je(Oo);return lt(o,Ko),lt(o,At),t.set(o,{hard:e})}const i=Cd(Oo,qo,Rm*un);i.width<0&&(i.width=0,i.x=Oo.x),i.height<0&&(i.height=0,i.y=Oo.y),lt(i,At),lt(i,Xo),ct(i,Zo),!e&&o(i),t.set(i,{hard:e})},n=[Qs.subscribe(i),_s.subscribe(i),al.subscribe(i),sl.subscribe(i),Ha.subscribe(i),t.subscribe(e)];return()=>n.forEach((e=>e()))}));ar(e,dl,(e=>o(58,Ao=e)));const ul=_a(1);ar(e,ul,(e=>o(476,Do=e)));const hl=()=>{if(!Bo||!At)return;let e=ht(Je(Bo),Uo||1);const t=yt(At,ht(Je(Go),Uo));lt(e,t);const o=bt.width/e.width,i=bt.height/e.height,n=Math.min(1,o,i);ul.set(n),ct(e,n),((e,t)=>{const[o,i,n,r]=wt(e);o<t.y&&(e.y=Math.max(t.y,e.y)),i>t.width&&(e.x=t.width-e.width),n>t.height&&(e.y=t.height-e.height),r<t.x&&(e.x=Math.max(t.x,e.x))})(e,{...bt,x:0,y:0}),_s.set(e)},pl=Na([Qs,ol,ya,sa],(([e,t,o,i],n)=>{e&&(o||i)&&n(ml(e,t||1,o||i))}));ar(e,pl,(e=>o(99,Vi=e)));const ml=(e,t,o)=>o.width<=e.width&&o.height<=e.height?yt(e,ht(Je(o),t)):vt(e,mt(o));let $l,fl;const yl=e=>{if($&&$l&&pt($l,e)&&fl===Uo)return;if(_o)return hl();$l=e,fl=Uo;const t=ml(e,Uo,Bo||Mt);_s.set(t)};let xl=!1;const vl=ol.subscribe((e=>{!xl&&void 0!==e&&Bo&&(yl(At),xl=!0)})),wl=Qs.subscribe((e=>{e&&void 0!==Uo&&Bo&&yl(e)})),Sl=Os.subscribe((e=>{!e&&At&&yl(At)}));let kl;const Cl=Ns.subscribe((e=>{if(!e)return kl=void 0,void mr(Bs,Ho=void 0,Ho);kl=jo;const t=Je(Bo);Bs.set(t)})),Tl=_s.subscribe((e=>{if(!e||!Vo)return;const t=(o=Je(e),i=Vo,o.x-=i.x,o.y-=i.y,o.width-=i.width,o.height-=i.height,o);var o,i;((e,t)=>{e.x/=t,e.y/=t,e.width/=t,e.height/=t})(t,kl);const n=((e,t)=>(e.x+=t.x,e.y+=t.y,e.width+=t.width,e.height+=t.height,e))(Je(Ho),t);ya.set(n)})),Ml=ya.subscribe((e=>{if(!e||!Oo)return;if(_o)return void(Vo||hl());if(Ft||Vo||Wo)return;const t=mt(Oo),o=mt(e);if(le(t,6)===le(o,6))return;const{width:i,height:n}=Bo,r=Math.min(At.width/i,At.height/n),a=Ve(e.width*r,e.height*r),s=.5*(Oo.width-a.width),l=.5*(Oo.height-a.height),c=at(Math.max(0,Math.min(At.width-a.width,Oo.x+s)),Math.max(0,Math.min(At.height-a.height,Oo.y+l)),a.width,a.height);_s.set(c)})),Rl=Na([ol,ya,_s,Os],(([e,t,o,i],n)=>{if(!e||!t||!o)return;if(i)return n(Do);const r=o.width/t.width,a=o.height/t.height;n(Math.max(r,a)/e)})),Pl=Na([ol,Rl],(([e,t],o)=>{t&&o(e*t)}));ar(e,Pl,(e=>o(482,jo=e)));let El={left:0,right:0,top:0,bottom:0};const Il=Na([Ha,_s],(([e,t],o)=>{if(!t)return o(El);const i=Us(t,e);le(El.top,4)===le(i.top,4)&&le(El.bottom,4)===le(i.bottom,4)&&le(El.right,4)===le(i.right,4)&&le(El.left,4)===le(i.left,4)||(El=i,o(i))})),Al=Na([Il],(([e],t)=>{t(Object.values(e).some((e=>e>0)))})),Ll=dc(.075,{stiffness:.03,damping:.4,precision:.001}),zl=Na([gs,ps,Ll,dl,al,Ha,Al,Il,Ks],(([e,t,o,i,n,r,a,s,l],c)=>{if(!i||$)return c([]);let{x:d,y:u,width:h,height:p}=i;d+=.5,u+=.5,h-=.5,p-=.5;const m=[];if(r){if(a){let{left:e,right:o,top:i,bottom:r}=s;e*=n,o*=n,i*=n,r*=n;const a=Zp(t)?[1,1,1,.125]:[0,0,0,.075];m.push({x:d-e-.5,y:u-i-.5,width:h+e+o+1,height:p+i+r+1,strokeWidth:1,strokeColor:a,opacity:l?1:.5})}const i=Zp(e);r&&r.frameColor&&Zp(r.frameColor)||i||(m.push({x:d-1,y:u-1,width:h+2,height:p+2,strokeWidth:2,strokeColor:[0,0,0,.1],opacity:o}),m.push({x:d+1,y:u+1,width:h-2,height:p-2,strokeWidth:2,strokeColor:[0,0,0,.1],opacity:o}))}c([...m,{x:d,y:u,width:h,height:p,strokeWidth:1,strokeColor:e,opacity:o}])})),Fl=_a([]);ar(e,Fl,(e=>o(396,ko=e)));const Dl=Na([zl,Fl],(([e,t],o)=>{o([...e,...t])}));ar(e,Dl,(e=>o(93,zi=e)));const Ol=dc(0,{precision:.001});ar(e,Ol,(e=>o(398,To=e)));const Bl=dc();ar(e,Bl,(e=>o(401,Eo=e)));const Wl=dc();ar(e,Wl,(e=>o(400,Po=e)));const Vl=dc();ar(e,Vl,(e=>o(399,Ro=e)));const _l=dc();ar(e,_l,(e=>o(397,Co=e)));const Nl=_a(!1);ar(e,Nl,(e=>o(383,no=e)));const Hl=_a();let Gl;ar(e,Hl,(e=>o(386,so=e)));const Zl=Na([Nl,Hl],(([e,t],i)=>{if(!e||!t)return void i(void 0);if(Gl&&(Gl.cancel(),o(289,Gl=void 0)),Mn(t))return i(x(t));const r=gc.length?0:Jt?250:0;o(289,Gl={cancel:n}),Ga(t,Gl,r).then(i).catch((e=>{mr(ma,ao.error=e,ao)})).finally((()=>{o(289,Gl=void 0)}))}));Hi(),Hi=nr(Zl,(e=>o(365,xt=e)));let{imagePreviewCurrent:Xl}=t;const Yl=_a({});ar(e,Yl,(e=>o(388,po=e)));const ql=_a([]);ar(e,ql,(e=>o(86,Ci=e)));const Kl=Na([Qs,bs,sa,Vs,_s,Pl,ka,Ma,Ra,al,sl,Ts],(([e,t,o,i,n,r,a,s,l,c,d,u],h)=>{if(!e||!n)return;const p=gl(e,t,o,i,n,c,d,r,a,s,l);!u&&D(p),h(p)}));ar(e,Kl,(e=>o(389,mo=e)));const Jl=Na([Ia,Aa,La,za,Fa],(([e,t,o,i,n],r)=>{const a=e&&Object.keys(e).map((t=>e[t])).filter(Boolean);r({gamma:o||void 0,vignette:i||void 0,noise:n||void 0,convolutionMatrix:t||void 0,colorMatrix:a&&a.length&&Xn(a)})}));let Ql,ec;const tc=(()=>{if(!fo())return!1;const e=navigator.userAgent.match(/OS (\d+)_(\d+)_?(\d+)?/i)||[],[,t,o]=e.map((e=>parseInt(e,10)||0));return t>13||13===t&&o>=4})(),oc=_a({});ar(e,oc,(e=>o(377,Xt=e))),ea("env",oc);const ic=Qd(),nc=Va(ic,(e=>{const t=()=>e(Qd()),o=matchMedia(`(resolution: ${ic}dppx)`);return o.addListener(t),()=>o.removeListener(t)}));ar(e,nc,(e=>o(57,Io=e)));const rc=((e,t)=>{const{sub:o,pub:i}=Yo(),n=[],r=_a(0),a=[],s=()=>a.forEach((e=>e({index:rr(r),length:n.length}))),l={get index(){return rr(r)},set index(e){e=Number.isInteger(e)?e:0,e=ss(e,0,n.length-1),r.set(e),t(n[l.index]),s()},get state(){return n[n.length-1]},length:()=>n.length,undo(){const e=l.index--;return i("undo",e),e},redo(){const e=l.index++;return i("redo",l.index),e},revert(){n.length=1,l.index=0,i("revert")},write(o){o&&t({...e(),...o});const a=e(),c=n[n.length-1];JSON.stringify(a)!==JSON.stringify(c)&&(n.length=l.index+1,n.push(a),r.set(n.length-1),s(),i("writehistory"))},set(e={}){n.length=0,l.index=0;const t=Array.isArray(e)?e:[e];n.push(...t),l.index=n.length-1},get:()=>[...n],subscribe:e=>(a.push(e),e({index:l.index,length:n.length}),()=>a.splice(a.indexOf(e),1)),on:o};return l})((()=>wo),(e=>{mr(Ua,wo=e,wo),xs.set(So)}));ji(),ji=nr(rc,(e=>o(395,vo=e)));const ac=()=>{const e={x:0,y:0,...Mt},t=kt(vt(e,wo.cropAspectRatio),Math.round),o=yn({...wo,rotation:0,crop:t},wo),i=[o];JSON.stringify(o)!==JSON.stringify(wo)&&i.push({...wo}),rc.set(i)},sc=ma.subscribe((e=>{e&&e.complete&&ac()})),cc=()=>hn().then((e=>e&&rc.revert())),hc=_a(!1);ar(e,hc,(e=>o(378,Kt=e)));const pc=()=>{mr(hc,Kt=!0,Kt),pn().then((e=>{if(!e)return void mr(hc,Kt=!1,Kt);let t;t=Uc.subscribe((e=>{1===e&&(t&&t(),Gi("processImage"))}))}))},mc=ga.subscribe((e=>{if(!e)return void mr(hc,Kt=!1,Kt);mr(hc,Kt=!0,Kt);const{complete:t,abort:o}=e;(t||o)&&mr(hc,Kt=!1,Kt)})),gc=(()=>{const e=[],t=[],o=[],i=()=>{t.forEach((e=>e(o)))},n=t=>{t.unsub=t.subscribe((n=>((t,n)=>{const r=e.indexOf(t);r<0||(o[r]=n,i())})(t,n))),i()};return{get length(){return e.length},clear:()=>{e.forEach((e=>e.unsub())),e.length=0,o.length=0},unshift:t=>{e.unshift(t),n(t)},get:t=>e[t],push:t=>{e.push(t),n(t)},remove:t=>{t.unsub();const i=e.indexOf(t);e.splice(i,1),o.splice(i,1)},forEach:t=>e.forEach(t),filter:t=>e.filter(t),subscribe:e=>(t.push(e),e(o),()=>{t.splice(t.indexOf(e),1)})}})();ar(e,gc,(e=>o(55,lo=e)));const $c=Na([gc],(([e],t)=>{if(!e.length)return t();const{origin:o,translation:i,rotation:n,scale:r}=e[0];t({origin:o,translation:i,rotation:n,scale:r})})),fc=_a();ar(e,fc,(e=>o(392,yo=e)));let yc,bc=[];const xc=_a(),vc=_a(),wc=Na([il,vc,ol,nl],(([e,t,o,i])=>e||(t||o<1?i:1))),Sc={...Yi,imageFile:aa,imageSize:sa,mediaDuration:la,mediaMinDuration:ha,mediaMaxDuration:pa,mediaTrim:da,imageBackgroundColor:Pa,imageBackgroundImage:Ea,imageCropAspectRatio:$a,imageCropMinSize:ba,imageCropMaxSize:xa,imageCropLimitToImage:fa,imageCropRect:ya,imageCropRectOrigin:wa,imageCropRectSnapshot:Bs,imageCropRectAspectRatio:Sa,imageCropRange:va,imageRotation:ka,imageRotationRange:Ca,imageFlipX:Ma,imageFlipY:Ra,imageOutputSize:Ta,imageColorMatrix:Ia,imageConvolutionMatrix:Aa,imageGamma:La,imageVignette:za,imageNoise:Fa,imageManipulation:Ba,imageDecoration:Da,imageAnnotation:Oa,imageRedaction:Wa,imageFrame:Ha,imagePreview:Zl,imagePreviewSource:Hl,imageTransforms:Kl,imagePreviewModifiers:Yl,history:rc,animation:Es,pixelRatio:nc,elasticityMultiplier:un,scrollElasticity:Pm,rangeInputElasticity:5,redrawTrigger:Gr,pointerAccuracy:ks,pointerHoverable:Cs,env:oc,rootRect:bs,stageRect:Qs,stageRectBase:Zs,stageRecenter:Gs,stageScalar:ol,stagePadding:qs,stagePadded:Ks,presentationScalar:Pl,imagePreviewUpscale:vc,utilRect:Ss,utilRectPadded:Js,allowPlayPause:Cr,allowPan:is,allowZoom:ns,allowZoomControls:rs,enableZoomInput:ls,enablePanInput:as,enablePanInputStatus:us,imageSelectionMultiTouching:xc,rootBackgroundColor:ps,rootForegroundColor:ms,rootLineColor:gs,rootColorSecondary:fs,imageOutlineOpacity:Ll,utilTools:fc,imageSelectionPan:sl,imageSelectionZoom:il,imageSelectionZoomCurrent:wc,imageSelectionStageFitScalar:nl,imageSelectionStoredState:ll,imageOverlayMarkup:Fl,interfaceImages:ql,isInteracting:Rs,isTransformingImage:Ts,isInteractingFraction:Ps,imageCropRectIntent:Ws,imageCropRectPresentation:Vs,imageSelectionRect:_s,imageSelectionRectIntent:Hs,imageSelectionRectPresentation:dl,imageSelectionRectSnapshot:Ns,imageScalar:Rl,imageTransformsInterpolated:$c,imageEffects:Jl};delete Sc.image;const kc="util-"+I();let Cc=[];const Tc=e=>V.find((([t])=>e===t));let Mc=[];const Rc=e=>{o(62,Mc=Mc.concat(e))},Pc=e=>{o(62,Mc=Mc.filter((t=>t!==e)))},Ec=(e,t)=>{o(295,j[e]=t,j)};let Ac=fo();const Lc=(e,t,o)=>{let i=xe.getPropertyValue(e);i=o?o(i):/^[0-9]+$/.test(i)?parseFloat(i):void 0,t.set(i,{hard:!Jt})},zc=(e,t,o=!1)=>{const i=(e=>{const t=xe.getPropertyValue(e);return Yh(t)})(e);i&&0!==i[3]&&(o||(i.length=3),t.set(i,{hard:!Jt}))},Fc=_a();ar(e,Fc,(e=>o(87,Ti=e)));const Dc=_a();ar(e,Dc,(e=>o(88,Mi=e)));const Bc=_a();ar(e,Bc,(e=>o(89,Pi=e)));const Wc=dc(0,{damping:.9});ar(e,Wc,(e=>o(90,Ei=e)));const Vc=()=>{zc("color",ms),zc(tr?"--color-background":"background-color",ps),zc("outline-color",gs),zc("--color-primary",$s),zc("--color-secondary",fs),zc("--grid-color-even",Dc,!0),zc("--grid-color-odd",Bc,!0),Lc("--grid-size",Fc),Lc("--editor-inset-top",vs,(e=>parseInt(e,10)))},_c=Na([Kl,Jl,Pa,es],(([e,t,o,i])=>e&&{...e,...t,backgroundColor:o,backgroundImage:i}));ar(e,_c,(e=>o(387,co=e)));const Hc=e=>{gc.forEach(((t,o)=>{const i=0===o?1:0;t.set({...e,opacity:i,resize:1},ho)}))};let jc;const Uc=lc(void 0,{duration:500});let Gc;ar(e,Uc,(e=>o(54,oo=e)));const Zc=_a(!1);let Xc;ar(e,Zc,(e=>o(382,io=e)));const Yc=dc(void 0,{stiffness:.1,damping:.7,precision:.25});ar(e,Yc,(e=>o(82,bi=e)));const qc=dc(0,{stiffness:.1,precision:.05});ar(e,qc,(e=>o(83,xi=e)));const Kc=dc(0,{stiffness:.02,damping:.5,precision:.25});ar(e,Kc,(e=>o(380,eo=e)));const Jc=dc(void 0,{stiffness:.02,damping:.5,precision:.25});ar(e,Jc,(e=>o(381,to=e)));const Qc=dc(void 0,{stiffness:.02,damping:.5,precision:.25});let ed;ar(e,Qc,(e=>o(379,Qt=e)));const td=()=>{Gi("abortLoadImage")},od=()=>{Gi("abortProcessImage"),mr(hc,Kt=!1,Kt)},id=e=>{e.target&&"true"===e.target.dataset.touchScroll||e.preventDefault()},nd=tc?e=>{const t=e.touches?e.touches[0]:e;t.pageX>20&&t.pageX<window.innerWidth-20||id(e)}:n,rd=_a([]);ar(e,rd,(e=>o(472,Ut=e))),ea("keysPressed",rd);const ad=e=>{!e||No(e)&&!(e=>/^image/.test(e.type)&&!/svg/.test(e.type))(e)||!No(e)&&!/^http/.test(e)||Gi("loadImage",e)},sd=e=>{e&&ad(e)};let ld,cd,dd=[];const ud=_a();ea("rootPortal",ud),ea("rootRect",bs);const hd=()=>({foregroundColor:[...Ot],lineColor:[...Dt],utilVisibility:{...j},isInteracting:Ft,isInteractingFraction:zt,rootRect:Je(Lt),stageRect:Je(At),manipulationShapesDirty:Ed,annotationShapesDirty:Td,decorationShapesDirty:Rd,frameShapesDirty:Pd}),pd=(e,t,o)=>gn(e,Ve(Math.round(t.width/o),Math.round(t.height/o))),md=(e,t,o)=>{var i;return e._translate=he((i=t).x,i.y),e._scale=o,e},gd=e=>{const t=[];return e.forEach((e=>t.push($d(e)))),t.filter(Boolean)},$d=e=>Ri(e)?(e.points=[he(e.x1,e.y1),he(e.x2,e.y2)],e):(!(e=>Si(e)&&!e.text.length)(e)||e.backgroundColor&&0!==e.backgroundColor[3]||(ki(e)&&(e.width=5,e.height=e.lineHeight),e.strokeWidth=1,e.strokeColor=[1,1,1,.5],e.backgroundColor=[0,0,0,.1]),e);let fd,yd=[],bd=[],xd=[],vd=[],wd=[],Sd={};const kd=(e,t,o,i,n,r,a)=>{const{manipulationShapesDirty:s,annotationShapesDirty:l,decorationShapesDirty:c,frameShapesDirty:d,selectionRect:u,scale:h}=e,p=fd!==h,m=p||!pt(Sd,u);m&&(fd=h,Sd=u),s&&(xd=t.filter(Ii).map($i).map((e=>gn(e,Mt)))),(l||o!==It)&&(yd=o.filter(Ii).map($i).sort(((e,t)=>e.alwaysOnTop?1:t.alwaysOnTop?-1:0)).map((e=>gn(e,Mt)))),(p||Md||l||o!==It)&&(bd=gd(yd.map((e=>v(e,{flipX:Pt,flipY:Rt,rotation:Et,scale:h,context:et(Mt)}))).flat())),(c||i!==Ct||m)&&(vd=gd(i.filter(Ii).map($i).sort(((e,t)=>e.alwaysOnTop?1:t.alwaysOnTop?-1:0)).map((e=>pd(e,u,h))).map((e=>v(e,{context:u}))).flat().map((e=>md(e,u,h))))),(d||r!==St||m)&&(wd=r?gd([r].map($i).map((e=>pd(e,u,h))).map(v).flat().map((e=>md(e,u,h)))):[]);let g=gd(n.filter(Ii));return"undefined"!=typeof window&&(e=>{if(e&&e._qnr6q7e)return;const[t]=[[85,110,108,105,99,101,110,115,101,100,32,80,105,110,116,117,114,97,32,105,110,115,116,97,110,99,101]].map((e=>e.map((e=>String.fromCharCode(e))).join("")));g=[...g,{x:u.x+.5*u.width-82,y:u.y+u.height-16-12,width:164,height:16,text:t,fontWeight:900,fontSize:12,color:[1,1,1,.25]}]})(window),{manipulationShapesDirty:s,manipulationShapes:xd,annotationShapesDirty:l,annotationShapes:bd,decorationShapesDirty:c,decorationShapes:vd,frameShapesDirty:d,frameShapes:wd,interfaceShapes:g,selectionShapes:a.map($i).map((e=>gn(e,Mt)))}};let Td=!0,Md=!0,Rd=!0,Pd=!0,Ed=!0;return Jr((()=>{Dr(),xt&&T(xt.src)&&/^blob:/.test(xt.src)&&URL.revokeObjectURL(xt.src),ts(),wl(),vl(),Sl(),Cl(),Tl(),Ml(),sc(),mc(),ks.destroy(),Cs.destroy(),ra.destroy(),gc.clear(),yd.length=0,bd.length=0,xd.length=0,vd.length=0,wd.length=0;try{o(233,Xl=void 0),o(290,jc=void 0)}catch(e){}})),e.$$set=e=>{"class"in e&&o(234,Zi=e.class),"layout"in e&&o(235,Xi=e.layout),"stores"in e&&o(236,Yi=e.stores),"locale"in e&&o(3,qi=e.locale),"id"in e&&o(4,Ki=e.id),"util"in e&&o(237,Ji=e.util),"utils"in e&&o(238,Qi=e.utils),"animations"in e&&o(239,en=e.animations),"disabled"in e&&o(240,tn=e.disabled),"status"in e&&o(232,on=e.status),"previewUpscale"in e&&o(241,nn=e.previewUpscale),"previewPad"in e&&o(242,rn=e.previewPad),"previewMaskOpacity"in e&&o(5,an=e.previewMaskOpacity),"previewImageDataMaxSize"in e&&o(243,sn=e.previewImageDataMaxSize),"previewImageTextPixelRatio"in e&&o(6,ln=e.previewImageTextPixelRatio),"markupMaskOpacity"in e&&o(7,cn=e.markupMaskOpacity),"zoomMaskOpacity"in e&&o(244,dn=e.zoomMaskOpacity),"elasticityMultiplier"in e&&o(8,un=e.elasticityMultiplier),"willRevert"in e&&o(245,hn=e.willRevert),"willProcessImage"in e&&o(246,pn=e.willProcessImage),"willRenderCanvas"in e&&o(9,mn=e.willRenderCanvas),"willRenderToolbar"in e&&o(247,$n=e.willRenderToolbar),"willRenderUtilTabs"in e&&o(248,fn=e.willRenderUtilTabs),"willSetHistoryInitialState"in e&&o(249,yn=e.willSetHistoryInitialState),"enableButtonExport"in e&&o(250,bn=e.enableButtonExport),"enableButtonRevert"in e&&o(251,wn=e.enableButtonRevert),"enableNavigateHistory"in e&&o(252,Sn=e.enableNavigateHistory),"enableToolbar"in e&&o(10,kn=e.enableToolbar),"enableUtils"in e&&o(253,Cn=e.enableUtils),"enableButtonClose"in e&&o(254,Tn=e.enableButtonClose),"enableDropImage"in e&&o(255,Rn=e.enableDropImage),"enablePasteImage"in e&&o(256,Pn=e.enablePasteImage),"enableBrowseImage"in e&&o(257,En=e.enableBrowseImage),"enableTransparencyGrid"in e&&o(11,In=e.enableTransparencyGrid),"layoutDirectionPreference"in e&&o(258,An=e.layoutDirectionPreference),"layoutHorizontalUtilsPreference"in e&&o(259,Ln=e.layoutHorizontalUtilsPreference),"layoutVerticalUtilsPreference"in e&&o(260,zn=e.layoutVerticalUtilsPreference),"layoutVerticalToolbarPreference"in e&&o(261,Fn=e.layoutVerticalToolbarPreference),"layoutVerticalControlGroupsPreference"in e&&o(262,Dn=e.layoutVerticalControlGroupsPreference),"layoutVerticalControlTabsPreference"in e&&o(263,On=e.layoutVerticalControlTabsPreference),"textDirection"in e&&o(12,Bn=e.textDirection),"markupEditorZoomLevel"in e&&o(264,Wn=e.markupEditorZoomLevel),"markupEditorZoomLevels"in e&&o(13,Vn=e.markupEditorZoomLevels),"markupEditorZoomAdjustStep"in e&&o(14,_n=e.markupEditorZoomAdjustStep),"markupEditorZoomAdjustFactor"in e&&o(15,Nn=e.markupEditorZoomAdjustFactor),"markupEditorZoomAdjustWheelFactor"in e&&o(16,Hn=e.markupEditorZoomAdjustWheelFactor),"markupEditorInteractionMode"in e&&o(265,jn=e.markupEditorInteractionMode),"muteAudio"in e&&o(266,Un=e.muteAudio),"willSetMediaInitialTimeOffset"in e&&o(267,Gn=e.willSetMediaInitialTimeOffset),"enablePan"in e&&o(17,Zn=e.enablePan),"enableZoom"in e&&o(18,Kn=e.enableZoom),"enableZoomControls"in e&&o(268,Jn=e.enableZoomControls),"enableZoomInput"in e&&o(19,Qn=e.enableZoomInput),"enablePanInput"in e&&o(269,er=e.enablePanInput),"enableCanvasAlpha"in e&&o(20,tr=e.enableCanvasAlpha),"enablePanLimit"in e&&o(21,or=e.enablePanLimit),"panLimitGutterScalar"in e&&o(22,ir=e.panLimitGutterScalar),"zoomPresetOptions"in e&&o(23,sr=e.zoomPresetOptions),"zoomAdjustStep"in e&&o(24,lr=e.zoomAdjustStep),"zoomAdjustFactor"in e&&o(25,cr=e.zoomAdjustFactor),"zoomAdjustWheelFactor"in e&&o(26,dr=e.zoomAdjustWheelFactor),"zoomLevel"in e&&o(0,ur=e.zoomLevel),"fixScrollDirection"in e&&o(270,hr=e.fixScrollDirection),"imagePreviewSrc"in e&&o(273,fr=e.imagePreviewSrc),"imageOrienter"in e&&o(274,yr=e.imageOrienter),"pluginComponents"in e&&o(275,br=e.pluginComponents),"pluginOptions"in e&&o(27,xr=e.pluginOptions),"root"in e&&o(2,Sr=e.root),"imageSourceToImageData"in e&&o(28,ia=e.imageSourceToImageData),"imagePreviewCurrent"in e&&o(233,Xl=e.imagePreviewCurrent)},e.$$.update=()=>{if(4194304&e.$$.dirty[8]&&pr.set(hr),8&e.$$.dirty[0]&&o(347,i=!!qi),1&e.$$.dirty[0]|65536&e.$$.dirty[8]&&o(0,ur=null===ur?Wn:ur),2&e.$$.dirty[0]|134217728&e.$$.dirty[8]){let e=!1;br.forEach((([t])=>{wr[t]||(o(1,wr[t]={},wr),e=!0)})),e&&o(287,Xr=[...br])}var t,h,b,x;if(2097152&e.$$.dirty[7]|256&e.$$.dirty[9]|64&e.$$.dirty[11]&&o(345,W=i&&Xr.length?Qi||Xr.map((([e])=>e)):[]),134217728&e.$$.dirty[0]|256&e.$$.dirty[9]|16&e.$$.dirty[11]|2097152&e.$$.dirty[12]&&o(346,V=((e,t,o,i)=>{const n=t.filter((([t])=>e.includes(t))).filter((([e,{isSupported:t}])=>t({...i,...o[e]}))).map((([e,t])=>[e,t.Component]));return hs(n,Cc,((e,t)=>e[0]===t[0]&&e[1]===t[1]))?Cc:(Cc=n,n)})(W,Xr,xr,{src:bo})),32&e.$$.dirty[11]&&o(299,_=V.length),8&e.$$.dirty[0]|1048576&e.$$.dirty[9]|16&e.$$.dirty[11]&&o(344,N=_&&W.map((e=>{const t=Tc(e);if(t)return{id:e,view:t[1],tabIcon:qi[e+"Icon"],tabLabel:qi[e+"Label"]}})).filter(Boolean)||[]),8&e.$$.dirty[11]&&o(364,r=!!N.find((e=>"trim"===e.id))),25165824&e.$$.dirty[11]|16384&e.$$.dirty[13]&&o(298,a=!!(mi&&xt&&r)),1048576&e.$$.dirty[7]|1048576&e.$$.dirty[9]&&o(43,H=_&&Ji&&"string"==typeof Ji&&Tc(Ji)?Ji:_>0?V[0][0]:void 0),4096&e.$$.dirty[1]|524288&e.$$.dirty[9]&&a&&H&&Dr(),524288&e.$$.dirty[9]|16777216&e.$$.dirty[11]&&(a?(xt.addEventListener("play",Pr),xt.addEventListener("pause",Pr)):xt&&"video"===xt.nodeName&&(xt.removeEventListener("play",Pr),xt.removeEventListener("pause",Pr))),524288&e.$$.dirty[9]&&a&&Mr.set(jr()/Hr()),73728&e.$$.dirty[13]&&(e=>{if(!Or())return;const t=Date.now();if(Ir&&t-Ir<16)return;Ir=t;const o=mi*e;if(o.toFixed(1)===Er)return;Er=o.toFixed(1);const i=xt,n=()=>{i.removeEventListener("seeked",n),kr()};i.addEventListener("seeked",n),Lp(i,o)})(fi||pi),8192&e.$$.dirty[13]&&o(362,s=pi&&le(pi,6)),149504&e.$$.dirty[13]&&o(360,l=li||[[0,Math.min(mi,yi)/mi]]),524288&e.$$.dirty[11]&&(c=l[0][0]),524288&e.$$.dirty[11]&&(d=l[l.length-1][1]),524288&e.$$.dirty[11]&&o(363,u=l.map((([e,t])=>[le(e,6),le(t,6)]))),6291456&e.$$.dirty[11]&&o(361,p=u.findIndex((([e,t])=>s>=e&&s<=t))),7340032&e.$$.dirty[11]&&(m=-1===p&&u.findIndex(((e,t,o)=>{const i=o[t-1];return i?s<=e[0]&&s>=i[1]:s<=e[0]}))),262144&e.$$.dirty[8]&&Nr.set(Un),16777216&e.$$.dirty[11]|32768&e.$$.dirty[13]&&(xt&&gi?Wr():Vr()),524288&e.$$.dirty[9]|8192&e.$$.dirty[13]&&a&&ca.set(Hr()*pi),16777216&e.$$.dirty[11]|4096&e.$$.dirty[13]&&xt&&(e=>{a&&(xt.volume=Math.min(1,e))})(hi),256&e.$$.dirty[0]&&mr(Zr,ui=un,ui),262144&e.$$.dirty[7]&&o(356,$="overlay"===Xi),32&e.$$.dirty[8]|32768&e.$$.dirty[11]&&o(45,f=Cn&&!$),134217730&e.$$.dirty[0]&&xr&&Object.entries(xr).forEach((([e,t])=>{Object.entries(t).forEach((([t,i])=>{wr[e]&&o(1,wr[e][t]=i,wr)}))})),64&e.$$.dirty[13]&&o(357,k=!Qo),4194304&e.$$.dirty[7]|196608&e.$$.dirty[11]&&mr(Is,Jt="always"===en?w:"never"!==en&&w&&k,Jt),4194304&e.$$.dirty[1]|8388608&e.$$.dirty[7]&&Yr.set(tn?1:0,{hard:!Jt}),67108864&e.$$.dirty[7]&&(y=sn?(t=sn,h=Kr,Ve(Math.min(t.width,h.width),Math.min(t.height,h.height))):Kr),1024&e.$$.dirty[13]&&ra.update(si[0]),512&e.$$.dirty[13]&&(v=ai?(e,t)=>ai(e,{flipX:void 0,flipY:void 0,rotation:void 0,...t,isPreview:!0}):Z),268435456&e.$$.dirty[1]&&Array.isArray(ri)&&Gi("selectionchange",[...ri]),1048576&e.$$.dirty[8]|256&e.$$.dirty[13]&&cs.set(ni&&Jn),2228224&e.$$.dirty[8]&&ds.set("pan"===jn||er),1048576&e.$$.dirty[1]&&Zt&&bs.set(at(Zt.x,Zt.y,Zt.width,Zt.height)),536903680&e.$$.dirty[11]|8192&e.$$.dirty[12]&&Lt&&$&&ao&&ao.complete&&(()=>{const e=ti,t=mt(Lt);e&&e===t||($a.set(mt(Lt)),ac())})(),16&e.$$.dirty[11]&&o(46,Y=W.length>1),32768&e.$$.dirty[1]&&(Y||xs.set(Qe())),1024&e.$$.dirty[0]|128&e.$$.dirty[13]&&(kn||ws.set(at(0,ei,0,0))),1073872896&e.$$.dirty[11]&&o(359,S=!Ft&&w),1048576&e.$$.dirty[1]&&o(300,nt=Zt&&Zt.width>0&&Zt.height>0),8&e.$$.dirty[0]|3145728&e.$$.dirty[9]&&o(40,rt=nt&&qi&&!!_),512&e.$$.dirty[1]&&setTimeout((()=>o(288,As=rt)),1),4194304&e.$$.dirty[7]|512&e.$$.dirty[9]|327680&e.$$.dirty[11]&&mr(Es,ho="always"===en?S:"never"!==en&&S&&As&&k,ho),16777216&e.$$.dirty[7]|32768&e.$$.dirty[11]&&Fs.set(nn||$),33554432&e.$$.dirty[7]&&Ys.set(rn),4&e.$$.dirty[0]|36&e.$$.dirty[13]&&Sr&&(Sr.dispatchEvent(Dp("markupzoom",Jo)),Sr.dispatchEvent(Dp("zoom",Lo(Jo)?Jo:Uo))),4&e.$$.dirty[0]|16&e.$$.dirty[13]&&Sr&&(Sr.dispatchEvent(Dp("markuppan",Xo)),Sr.dispatchEvent(Dp("pan",Xo))),2&e.$$.dirty[13]&&Bo&&cl(),8&e.$$.dirty[13]&&Go&&hl(),4198400&e.$$.dirty[1]&&H&&Ll.set(.075,{hard:!Jt}),134217728&e.$$.dirty[7]&&o(354,C=dn),1073741824&e.$$.dirty[12]|1&e.$$.dirty[13]&&o(355,M=Fo?-Math.max(...Object.values(zo)):0),138936320&e.$$.dirty[1]|24576&e.$$.dirty[11]&&Ao){let e=Ao.x-At.x,t=At.x+At.width-(Ao.x+Ao.width),o=Ao.y-At.y,i=At.y+At.height-(Ao.y+Ao.height),n=Math.min(e,o,t,i);Ol.set(n>M?0:Math.min(C,Math.abs(n/64)),{hard:!Jt})}if(67108864&e.$$.dirty[1]&&o(353,R=.55/Io),4718592&e.$$.dirty[1]|4096&e.$$.dirty[11]&&At&&Bl.set({x:0,y:At.y,width:At.x<64?0:At.x,height:At.height+R},{hard:!Jt}),4718592&e.$$.dirty[1]|536875008&e.$$.dirty[11]&&At&&Wl.set({x:0,y:0,width:Lt.width,height:At.y+R},{hard:!Jt}),4718592&e.$$.dirty[1]|536875008&e.$$.dirty[11]&&At){let e=At.x+At.width,t=Lt.width-(At.x+At.width);t<64&&(e+=t,t=0),Vl.set({x:e,y:At.y,width:t,height:At.height+R},{hard:!Jt})}if(4718592&e.$$.dirty[1]|536870912&e.$$.dirty[11]&&At&&_l.set({x:0,y:At.y+At.height,width:Lt.width,height:Lt.height-(At.y+At.height)},{hard:!Jt}),33554432&e.$$.dirty[1]|603979776&e.$$.dirty[12]&&o(349,P=Eo&&{id:"stage-overlay",backgroundColor:Mo,opacity:To,...Eo}),33554432&e.$$.dirty[1]|335544320&e.$$.dirty[12]&&o(352,E=Po&&{id:"stage-overlay",backgroundColor:Mo,opacity:To,...Po}),33554432&e.$$.dirty[1]|201326592&e.$$.dirty[12]&&o(351,A=Ro&&{id:"stage-overlay",backgroundColor:Mo,opacity:To,...Ro}),33554432&e.$$.dirty[1]|100663296&e.$$.dirty[12]&&o(350,L=Co&&{id:"stage-overlay",backgroundColor:Mo,opacity:To,...Co}),3840&e.$$.dirty[11]&&o(348,z=[E,A,L,P].filter(Boolean)),128&e.$$.dirty[11]|16777216&e.$$.dirty[12]&&z&&ko&&Fl.update((e=>[...e.filter((e=>"stage-overlay"!==e.id)),...z])),33554432&e.$$.dirty[8]|2097152&e.$$.dirty[12]&&Hl.set(fr||bo||void 0),4&e.$$.dirty[0]|65536&e.$$.dirty[7]|16777216&e.$$.dirty[11]&&(o(233,Xl=xt),xt&&Sr.dispatchEvent(Dp("loadpreview",Xl))),16384&e.$$.dirty[12]&&so&&(sl.set(ue()),il.set(void 0),cl(),ql.set([])),8388608&e.$$.dirty[12]&&o(304,O=vo.index>0),8388608&e.$$.dirty[12]&&o(303,B=vo.index<vo.length-1),8&e.$$.dirty[1]&&xc.set(yc),4194304&e.$$.dirty[12]&&vc.set(xo),4096&e.$$.dirty[1]&&os.set(H),65536&e.$$.dirty[9]|8&e.$$.dirty[11]&&o(295,j=N.reduce(((e,t)=>(e[t.id]=j&&j[t.id]||0,e)),{})),4096&e.$$.dirty[1]&&o(79,U={name:kc,selected:H}),8&e.$$.dirty[11]&&o(326,G=N.map((e=>({id:e.id,icon:e.tabIcon,label:e.tabLabel})))),8&e.$$.dirty[11]&&o(78,X=N.map((e=>e.id))),131072&e.$$.dirty[7]&&o(77,q=Oc(["PinturaRoot","PinturaRootComponent",Zi])),536870912&e.$$.dirty[11]&&o(340,K=Lt&&(Lt.width>1e3?"wide":Lt.width<600?"narrow":void 0)),536870912&e.$$.dirty[11]&&o(327,J=Lt&&(Lt.width<=320||Lt.height<=460)),536870912&e.$$.dirty[11]&&o(339,Q=Lt&&(Lt.height>1e3?"tall":Lt.height<600?"short":void 0)),4&e.$$.dirty[0]&&o(306,ee=Sr&&Sr.parentNode&&Sr.parentNode.classList.contains("PinturaModal")),1&e.$$.dirty[1]|134217728&e.$$.dirty[9]|536870912&e.$$.dirty[11]&&o(332,te=ee&&Lt&&Ql>Lt.width),2&e.$$.dirty[1]|134217728&e.$$.dirty[9]|536870912&e.$$.dirty[11]&&o(331,oe=ee&&Lt&&ec>Lt.height),6291456&e.$$.dirty[10]&&o(333,ie=te&&oe),1048576&e.$$.dirty[0]&&o(330,ne=tr),1073741824&e.$$.dirty[10]&&o(301,re="narrow"===K),1024&e.$$.dirty[8]|536870912&e.$$.dirty[11]&&o(341,(b=Lt,x=An,ae=Lt?"auto"===x?b.width>b.height?"landscape":"portrait":"horizontal"===x?b.width<500?"portrait":"landscape":"vertical"===x?b.height<400?"landscape":"portrait":void 0:"landscape")),1&e.$$.dirty[11]&&o(76,se="landscape"===ae),4194304&e.$$.dirty[9]|536870912&e.$$.dirty[10]&&o(329,ce=re||"short"===Q),1&e.$$.dirty[1]|536870912&e.$$.dirty[11]&&o(328,de=Ac&&Lt&&Ql===Lt.width&&!tc),4&e.$$.dirty[1]|1048576&e.$$.dirty[12]&&o(302,pe=[...yo||[],...bc].filter(Boolean)),2048&e.$$.dirty[8]&&o(338,me="has-navigation-preference-"+Ln),4096&e.$$.dirty[8]&&o(337,ge="has-navigation-preference-"+zn),8192&e.$$.dirty[8]&&o(334,$e="has-toolbar-preference-"+Fn),16384&e.$$.dirty[8]&&o(336,fe="has-controlgroups-preference-"+Dn),32768&e.$$.dirty[8]&&o(335,ye="has-controltabs-preference-"+On),536870912&e.$$.dirty[11]&&o(343,be=void 0!==Lt&&Lt.width>0&&Lt.height>0),4&e.$$.dirty[0]|4&e.$$.dirty[11]&&o(342,xe=be&&Sr&&getComputedStyle(Sr)),2&e.$$.dirty[11]&&xe&&Vc(),1024&e.$$.dirty[0]|4243456&e.$$.dirty[1]|8650752&e.$$.dirty[7]|134217728&e.$$.dirty[9]|2147352576&e.$$.dirty[10]|1&e.$$.dirty[11]|786464&e.$$.dirty[12]&&oc.set({...Xt,layoutMode:Xi,orientation:ae,horizontalSpace:K,verticalSpace:Q,navigationHorizontalPreference:me,navigationVerticalPreference:ge,controlGroupsVerticalPreference:fe,controlTabsVerticalpreference:ye,toolbarVerticalPreference:$e,isModal:ee,isDisabled:tn,isCentered:ie,isCenteredHorizontally:te,isCenteredVertically:oe,isAnimated:Jt,isTransparent:ne,pointerAccuracy:$o,pointerHoverable:go,isCompact:ce,hasSwipeNavigation:de,hasLimitedSpace:J,hasToolbar:kn,hasNavigation:Y&&f,isIOS:Ac,browserVersion:Ul()?"chrome-"+(navigator.userAgent.match(/Chrome\/([0-9]+)/)||[])[1]:void 0}),32&e.$$.dirty[12]&&o(75,we=Object.entries(Xt).map((([e,t])=>/^is|has/.test(e)?t?Op(e):void 0:t)).filter(Boolean).join(" ")),4096&e.$$.dirty[1]&&H&&fc.set([]),4096&e.$$.dirty[1]|1&e.$$.dirty[8]|65536&e.$$.dirty[10]|32&e.$$.dirty[12]&&o(44,Se=fn(G.map((e=>({...e,selected:H===e.id}))),{...Xt},(()=>Gr.set({})))),8192&e.$$.dirty[1]&&o(74,ke=!!Se.find((e=>Array.isArray(e)))),196608&e.$$.dirty[12]&&o(73,Ce=mo&&Object.entries(po).filter((([,e])=>null!=e)).reduce(((e,[,t])=>({...e,...t})),{})),8192&e.$$.dirty[12]&&o(323,Pe=ao&&"any-to-file"===ao.task),8192&e.$$.dirty[10]&&Pe&&gc&&gc.clear(),32768&e.$$.dirty[12]&&o(325,Te=!!co&&!!co.translation),2048&e.$$.dirty[9]|32768&e.$$.dirty[10]|16777216&e.$$.dirty[11]&&Te&&xt&&xt!==jc&&(o(290,jc=xt),(()=>{const e=gc.length?void 0:{resize:1.05},t=((e,t,o={})=>{const{resize:i=1,opacity:n=0}=o,r={opacity:[dc(n,{...jp,stiffness:.1}),Z],resize:[dc(i,{...jp,stiffness:.1}),Z],translation:[dc(void 0,jp),Z],rotation:[dc(void 0,Up),Z],origin:[dc(void 0,jp),Z],scale:[dc(void 0,Up),Z],gamma:[dc(void 0,Up),e=>e||1],vignette:[dc(void 0,Up),e=>e||0],colorMatrix:[dc([...Hp],jp),e=>e||[...Hp]],convolutionMatrix:[_a(void 0),e=>e&&e.clarity||void 0],backgroundColor:[dc(void 0,jp),(e,t,o)=>{if(Array.isArray(e)){if(Array.isArray(t)){const i=[...e];0===t[3]?(i[3]=0,o(i)):0===i[3]&&((e=[...t])[3]=0)}return e}}],backgroundImage:[_a(void 0),Z]},a=Object.entries(r).map((([e,t])=>[e,t[0]])),s=a.map((([,e])=>e)),l=Object.entries(r).reduce(((e,[t,o])=>{const[i,n]=o;return e[t]=(e,o)=>i.set(n(e,c[t],(e=>{i.set(e,{hard:!0})})),o),e}),{});let c;const d=Na(s,(o=>(c=o.reduce(((e,t,o)=>(e[a[o][0]]=t,e)),{}),c.data=e,c.size=t,c.scale*=o[1],c)));return d.get=()=>c,d.set=(e,t)=>{const o={hard:!t};Object.entries(e).forEach((([e,t])=>{l[e]&&l[e](t,o)}))},d})(xt,Mt,e);gc.unshift(t),Hc(co)})()),32768&e.$$.dirty[10]|32768&e.$$.dirty[12]&&Te&&Hc(co),16777216&e.$$.dirty[1]&&lo&&lo.length>1){let e=[];gc.forEach(((t,o)=>{0!==o&&t.get().opacity<=0&&e.push(t)})),e.forEach((e=>gc.remove(e)))}if(8&e.$$.dirty[0]|16384&e.$$.dirty[10]&&o(39,Re=qi&&Me.length&&qi.labelSupportError(Me)),8192&e.$$.dirty[12]&&o(315,Ee=ao&&!!ao.error),8192&e.$$.dirty[12]&&o(42,Ie=!ao||!ao.complete&&void 0===ao.task),8192&e.$$.dirty[12]&&o(316,Ae=ao&&(ao.taskLengthComputable?ao.taskProgress:1/0)),8192&e.$$.dirty[10]&&Pe&&mr(Nl,no=!1,no),4194304&e.$$.dirty[1]|4096&e.$$.dirty[9]|8192&e.$$.dirty[12]&&ao&&ao.complete){const e=Jt?250:0;clearTimeout(Gc),o(291,Gc=setTimeout((()=>{mr(Nl,no=!0,no)}),e))}if(2048&e.$$.dirty[1]|32&e.$$.dirty[10]|10240&e.$$.dirty[12]&&o(320,Le=ao&&!Ee&&!Ie&&!no),1024&e.$$.dirty[9]|16777216&e.$$.dirty[11]|16384&e.$$.dirty[12]&&o(319,ze=!(!so||xt&&!Gl)),4194304&e.$$.dirty[1]|2048&e.$$.dirty[12]&&(no?setTimeout((()=>Wc.set(1,{hard:!Jt})),Jt?500:0):Wc.set(0,{hard:!Jt})),4160&e.$$.dirty[12]&&o(314,Fe=!!(Kt||ro&&void 0!==ro.progress&&!ro.complete)),16&e.$$.dirty[10]&&Fe&&Dr(),2048&e.$$.dirty[1]|8192&e.$$.dirty[12]&&o(317,De=ao&&!(ao.error||Ie)),8&e.$$.dirty[0]|8192&e.$$.dirty[12]&&o(318,Oe=qi&&(ao?!ao.complete||ao.error?bl(qi.statusLabelLoadImage(ao),ao.error&&ao.error.metadata,"{","}"):qi.statusLabelLoadImage({progress:1/0,task:"blob-to-bitmap"}):qi.statusLabelLoadImage(ao))),8&e.$$.dirty[0]|4096&e.$$.dirty[12]&&o(313,Be=ro&&qi&&qi.statusLabelProcessImage(ro)),4096&e.$$.dirty[12]&&o(311,We=ro&&(ro.taskLengthComputable?ro.taskProgress:1/0)),4096&e.$$.dirty[12]&&o(312,_e=ro&&!ro.error),4096&e.$$.dirty[12]&&o(310,Ne=!(!ro||!ro.error)),8&e.$$.dirty[0]|2048&e.$$.dirty[1]|32768&e.$$.dirty[7]|2047&e.$$.dirty[10])if(on){let e,t,i,n,r;T(on)&&(e=on),Lo(on)?t=on:Array.isArray(on)&&([e,t,r]=on,!1===t&&(n=!0),Lo(t)&&(i=!0)),o(35,Xc=(e||t)&&{text:e,aside:n||i,progressIndicator:{visible:i,progress:t},closeButton:n&&{label:qi.statusLabelButtonClose,icon:qi.statusIconButtonClose,onclick:r||(()=>o(232,on=void 0))}})}else o(35,Xc=qi&&Ie||Ee||Le||ze?{text:Oe,aside:Ee||De,progressIndicator:{visible:De,progress:Ae},closeButton:Ee&&{label:qi.statusLabelButtonClose,icon:qi.statusIconButtonClose,onclick:td}}:qi&&Fe&&Be?{text:Be,aside:Ne||_e,progressIndicator:{visible:_e,progress:We},closeButton:Ne&&{label:qi.statusLabelButtonClose,icon:qi.statusIconButtonClose,onclick:od}}:void 0);if(32768&e.$$.dirty[7]&&o(322,He=void 0!==on),4194304&e.$$.dirty[1]|134217728&e.$$.dirty[9]|4096&e.$$.dirty[12]&&ee&&ro&&ro.complete&&(Zc.set(!0),setTimeout((()=>Zc.set(!1)),Jt?100:0)),4&e.$$.dirty[0]|4096&e.$$.dirty[1]|2048&e.$$.dirty[12]&&no&&Sr&&Sr.dispatchEvent(Dp("selectutil",H)),2304&e.$$.dirty[1]|5680&e.$$.dirty[10]|1024&e.$$.dirty[12]&&o(321,je=io||Re||Ie||Ee||Le||ze||Fe||He),2048&e.$$.dirty[10]&&mr(Uc,oo=je?1:0,oo),4194304&e.$$.dirty[1]|2048&e.$$.dirty[10]&&Uc.set(je?1:0,{duration:Jt?500:1}),8388608&e.$$.dirty[1]&&o(41,Ue=oo>0),16&e.$$.dirty[1]&&o(309,Ge=!(!Xc||!Xc.aside)),4195344&e.$$.dirty[1]|1073750016&e.$$.dirty[9]|512&e.$$.dirty[12]&&Ue&&Xc){clearTimeout(ed);const e={hard:!1===Jt};if(Ge){const t=!!Xc.error||!Jt;qc.set(1,e),Yc.set(to,{hard:t}),o(292,ed=setTimeout((()=>{Kc.set(16,e)}),1))}else qc.set(0,e),o(292,ed=setTimeout((()=>{Kc.set(0,e)}),1))}if(1024&e.$$.dirty[1]&&(Ue||(Qc.set(void 0,{hard:!0}),Yc.set(void 0,{hard:!0}),Kc.set(0,{hard:!0}))),256&e.$$.dirty[12]&&o(308,Ze=.5*eo),536870912&e.$$.dirty[9]|128&e.$$.dirty[12]&&o(72,Xe=`transform: translateX(${Qt-Ze}px)`),256&e.$$.dirty[1]|50331648&e.$$.dirty[11]&&o(38,$t=xt&&Mt&&!Re),128&e.$$.dirty[1]|402653184&e.$$.dirty[9]&&o(305,qe=Ye&&($t||ee)?id:n),67108864&e.$$.dirty[9]&&o(71,Ke=qe),67108864&e.$$.dirty[9]&&o(70,tt=qe),8&e.$$.dirty[0]|2097152&e.$$.dirty[1]|1073741824&e.$$.dirty[7]|92&e.$$.dirty[8]|62914560&e.$$.dirty[9]|32&e.$$.dirty[12]&&o(69,ot=qi&&qt&&Yp((()=>$n([["div","alpha",{class:"PinturaNavGroup"},[["div","alpha-set",{class:"PinturaNavSet"},[Tn&&["Button","close",{label:qi.labelClose,icon:qi.iconButtonClose,onclick:()=>Gi("close"),hideLabel:!0}],wn&&["Button","revert",{label:qi.labelButtonRevert,icon:qi.iconButtonRevert,disabled:!O,onclick:cc,hideLabel:!0}]]]]],["div","beta",{class:"PinturaNavGroup PinturaNavGroupFloat"},[Sn&&["div","history",{class:"PinturaNavSet"},[["Button","undo",{label:qi.labelButtonUndo,icon:qi.iconButtonUndo,disabled:!O,onclick:rc.undo,hideLabel:!0}],["Button","redo",{label:qi.labelButtonRedo,icon:qi.iconButtonRedo,disabled:!B,onclick:rc.redo,hideLabel:!0}]]],pe.length&&["div","plugin-tools",{class:"PinturaNavSet"},pe.filter(Boolean).map((([e,t,o])=>[e,t,{...o}]))]]],["div","gamma",{class:"PinturaNavGroup"},[bn&&["Button","export",{label:qi.labelButtonExport,icon:re&&qi.iconButtonExport,class:"PinturaButtonExport",onclick:pc,hideLabel:re}]]]],{...Xt},(()=>Gr.set({})))))),2&e.$$.dirty[12]&&o(297,st=Wt&&!!Wt.length),262144&e.$$.dirty[9]|33554432&e.$$.dirty[11]|2&e.$$.dirty[12]&&o(296,dt=st&&Yn(Mt,Wt)),393216&e.$$.dirty[9]|16777216&e.$$.dirty[11]|24&e.$$.dirty[12]&&st&&((e,t,i,n)=>{if(!t)return;const r={dataSizeScalar:i};n&&n[3]>0&&(r.backgroundColor=[...n]),t(e,r).then((e=>{ld&&g(ld),o(293,ld=e)}))})(xt,jt,dt,Ht),16384&e.$$.dirty[9]|33554432&e.$$.dirty[11]|6&e.$$.dirty[12]&&Wt&&ld&&Mt){const{width:e,height:t}=Mt,i=Yt()?"pixelated":"auto"===Nt?"auto":"pixelated";o(294,dd=Wt.map((o=>{const n=at(o.x,o.y,o.width,o.height),r=ft(Je(n),o.rotation).map((o=>he(o.x/e,o.y/t)));return{...o,id:"redaction",flipX:!1,flipY:!1,cornerRadius:0,strokeWidth:0,strokeColor:void 0,backgroundColor:[0,0,0,0],backgroundImage:ld,backgroundImageRendering:i,backgroundCorners:r}})))}32768&e.$$.dirty[9]|1&e.$$.dirty[12]&&o(37,ut=[...dd,...Bt||[]]),32&e.$$.dirty[1]&&cd&&ud.set(cd),4&e.$$.dirty[0]|128&e.$$.dirty[1]&&$t&&Sr&&Sr.dispatchEvent(Dp("ready")),262144&e.$$.dirty[1]&&o(63,Td=!0),503316480&e.$$.dirty[11]&&o(64,Md=!0),131072&e.$$.dirty[1]&&o(65,Rd=!0),65536&e.$$.dirty[1]&&o(66,Pd=!0),64&e.$$.dirty[1]&&o(67,Ed=!0)},o(358,w=!Ic()),D=1===Qd()?e=>{e&&(ve(e.origin,Math.round),ve(e.translation,Math.round))}:Z,o(324,Me=[!Np()&&"WebGL"].filter(Boolean)),o(307,Ye=fo()||b()&&F()),o(68,gt=((e,t=!0)=>o=>{"ping"===o.type&&(t&&o.stopPropagation(),e(o.detail.type,o.detail.data))})(Ui.pub)),[ur,wr,Sr,qi,Ki,an,ln,cn,un,mn,kn,In,Bn,Vn,_n,Nn,Hn,Zn,Kn,Qn,tr,or,ir,sr,lr,cr,dr,xr,ia,Zl,rc,Ql,ec,bc,yc,Xc,cd,ut,$t,Re,rt,Ue,Ie,H,Se,f,Y,St,Ct,It,At,Zt,qt,Jt,oo,lo,Mo,Io,Ao,ri,gr,$r,Mc,Td,Md,Rd,Pd,Ed,gt,ot,tt,Ke,Xe,Ce,ke,we,se,q,X,U,So,di,bi,xi,vi,wi,Ci,Ti,Mi,Pi,Ei,Ai,Li,zi,Fi,Di,Oi,Bi,Wi,Vi,_i,Ni,Cr,Tr,Mr,Nr,Gr,Zr,Yr,aa,sa,la,ca,da,ua,pa,ma,ga,$a,fa,ya,ka,Ma,Ra,Pa,Da,Oa,Ba,Wa,Ha,ja,Ua,Za,Xa,Ya,qa,Ka,Ja,is,ns,rs,as,ls,cs,ds,us,ps,ms,gs,$s,ys,bs,xs,vs,ws,Ss,ks,Cs,Rs,Ps,Es,Is,Fs,Os,Bs,Ws,_s,Ns,Hs,js,qs,Ks,Qs,tl,ol,il,rl,al,sl,dl,ul,pl,Pl,Fl,Dl,Ol,Bl,Wl,Vl,_l,Nl,Hl,Yl,ql,Kl,oc,nc,hc,gc,fc,Sc,Rc,Pc,Ec,(e,t)=>t[e],e=>N.find((t=>t.id===e)).view,Fc,Dc,Bc,Wc,({target:e,propertyName:t})=>{e===Sr&&/background|outline/.test(t)&&xe&&Vc()},_c,Uc,Zc,Yc,qc,Kc,Jc,Qc,e=>{const t=!(!Xc||!Xc.closeButton)||!Jt;Jc.set(e.detail.width,{hard:t}),Qc.set(Math.round(.5*-e.detail.width),{hard:t})},nd,rd,e=>{const{keyCode:t,metaKey:o,ctrlKey:i,shiftKey:n}=e;if(9===t&&tn)return void e.preventDefault();if(e.target&&32===t&&Sr.contains(e.target)&&!nu(e.target)&&(Gt&&a&&Br(),e.preventDefault()),90===t&&(o||i))return void(n&&o?rc.redo():rc.undo());if(89===t&&i)return void rc.redo();if(229===t)return;const r=new Set([...Ut,t]);rd.set(Array.from(r))},({key:e,keyCode:t})=>{if("Meta"===e)return rd.set([]);rd.set(Ut.filter((e=>e!==t)))},()=>{rd.set([])},e=>{nu(e.target)||e.preventDefault()},e=>{Rn&&ad(e.detail.resources[0])},()=>{En&&Xp().then(sd)},e=>{if(!Pn)return;const t=ss((window.innerWidth-Math.abs(Lt.x))/Lt.width,0,1),o=ss((window.innerHeight-Math.abs(Lt.y))/Lt.height,0,1);t<.75&&o<.75||ad((e.clipboardData||window.clipboardData).files[0])},hd,kd,e=>{bt&&pt(e.detail,bt)||mr(Ss,bt=e.detail,bt)},on,Xl,Zi,Xi,Yi,Ji,Qi,en,tn,nn,rn,sn,dn,hn,pn,$n,fn,yn,bn,wn,Sn,Cn,Tn,Rn,Pn,En,An,Ln,zn,Fn,Dn,On,Wn,jn,Un,Gn,Jn,er,hr,()=>o(60,gr=void 0),(e,t,i)=>{const{text:n="",placeholder:r="",autoClose:a=!0,align:s="top",justify:l="center",buttonConfirm:c,buttonCancel:d}=i;o(60,gr={align:s,justify:l,text:n,placeholder:r,buttonConfirm:c,buttonCancel:d,onconfirm:()=>{e($r.value),a&&o(60,gr=void 0)},oncancel:()=>{t(void 0),o(60,gr=void 0)}})},fr,yr,br,vr,Fr,Dr,Or,Br,Wr,Vr,_r,Hr,jr,Ur,Xr,As,Gl,jc,Gc,ed,ld,dd,j,dt,st,a,_,nt,re,pe,B,O,qe,ee,Ye,Ze,Ge,Ne,We,_e,Be,Fe,Ee,Ae,De,Oe,ze,Le,je,He,Pe,Me,Te,G,J,de,ce,ne,oe,te,ie,$e,ye,fe,ge,me,Q,K,ae,xe,be,N,W,V,i,z,P,L,A,E,R,C,M,$,k,w,S,l,p,s,u,r,xt,Mt,Rt,Pt,Et,Lt,Ft,Bt,Wt,Nt,Ht,jt,Xt,Kt,Qt,eo,to,io,no,ro,ao,so,co,po,mo,go,$o,yo,bo,xo,vo,ko,Co,To,Ro,Po,Eo,zo,Fo,Bo,Uo,Go,Xo,Jo,Qo,ei,ni,ai,si,li,hi,pi,mi,gi,fi,yi,function(){o(31,Ql=om.innerWidth),o(32,ec=om.innerHeight)},e=>mr(ws,vi=e.detail,vi),({detail:e})=>o(43,H=e),function(t,i){e.$$.not_equal(wr[i],t)&&(wr[i]=t,o(1,wr),o(275,br),o(27,xr))},e=>Rc(e),e=>Pc(e),(e,{detail:t})=>Ec(e,t),e=>mr(xs,So=e.detail,So),function(t){e.$$.not_equal(wr[H],t)&&(wr[H]=t,o(1,wr),o(275,br),o(27,xr))},()=>Rc(H),()=>Pc(H),({detail:e})=>Ec(H,e),e=>{const t={...e,...hd()},{annotationShapes:o,decorationShapes:i,interfaceShapes:n,frameShapes:r,selectionShapes:a}=mn({annotationShapes:It,decorationShapes:Ct,interfaceShapes:zi,frameShapes:St,selectionShapes:ri},t);return kd(t,ut,o,i,n,r,a)},()=>{o(63,Td=!1),o(64,Md=!1),o(65,Rd=!1),o(66,Pd=!1),o(67,Ed=!1)},function(e){na[e?"unshift":"push"]((()=>{cd=e,o(36,cd)}))},function(e){ur=e,o(0,ur),o(264,Wn)},function(e){bc=e,o(33,bc)},function(e){yc=e,o(34,yc)},function(e){na[e?"unshift":"push"]((()=>{$r=e,o(61,$r)}))},function(e){na[e?"unshift":"push"]((()=>{Sr=e,o(2,Sr)}))},e=>mr(ys,Zt=e.detail,Zt)]}class Im extends Ba{constructor(e){super(),Oa(this,e,Em,Mm,ir,{class:234,layout:235,stores:236,locale:3,id:4,util:237,utils:238,animations:239,disabled:240,status:232,previewUpscale:241,previewPad:242,previewMaskOpacity:5,previewImageDataMaxSize:243,previewImageTextPixelRatio:6,markupMaskOpacity:7,zoomMaskOpacity:244,elasticityMultiplier:8,willRevert:245,willProcessImage:246,willRenderCanvas:9,willRenderToolbar:247,willRenderUtilTabs:248,willSetHistoryInitialState:249,enableButtonExport:250,enableButtonRevert:251,enableNavigateHistory:252,enableToolbar:10,enableUtils:253,enableButtonClose:254,enableDropImage:255,enablePasteImage:256,enableBrowseImage:257,enableTransparencyGrid:11,layoutDirectionPreference:258,layoutHorizontalUtilsPreference:259,layoutVerticalUtilsPreference:260,layoutVerticalToolbarPreference:261,layoutVerticalControlGroupsPreference:262,layoutVerticalControlTabsPreference:263,textDirection:12,markupEditorZoomLevel:264,markupEditorZoomLevels:13,markupEditorZoomAdjustStep:14,markupEditorZoomAdjustFactor:15,markupEditorZoomAdjustWheelFactor:16,markupEditorInteractionMode:265,muteAudio:266,willSetMediaInitialTimeOffset:267,enablePan:17,enableZoom:18,enableZoomControls:268,enableZoomInput:19,enablePanInput:269,enableCanvasAlpha:20,enablePanLimit:21,panLimitGutterScalar:22,zoomPresetOptions:23,zoomAdjustStep:24,zoomAdjustFactor:25,zoomAdjustWheelFactor:26,zoomLevel:0,fixScrollDirection:270,hideTextInput:271,showTextInput:272,imagePreviewSrc:273,imageOrienter:274,pluginComponents:275,pluginOptions:27,sub:276,pluginInterface:1,root:2,play:277,pause:278,isPaused:279,togglePlayPause:280,mute:281,unmute:282,toggleMute:283,getDuration:284,getCurrentTime:285,setCurrentTime:286,imageSourceToImageData:28,imagePreview:29,imagePreviewCurrent:233,history:30},null,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1])}get class(){return this.$$.ctx[234]}set class(e){this.$$set({class:e}),$a()}get layout(){return this.$$.ctx[235]}set layout(e){this.$$set({layout:e}),$a()}get stores(){return this.$$.ctx[236]}set stores(e){this.$$set({stores:e}),$a()}get locale(){return this.$$.ctx[3]}set locale(e){this.$$set({locale:e}),$a()}get id(){return this.$$.ctx[4]}set id(e){this.$$set({id:e}),$a()}get util(){return this.$$.ctx[237]}set util(e){this.$$set({util:e}),$a()}get utils(){return this.$$.ctx[238]}set utils(e){this.$$set({utils:e}),$a()}get animations(){return this.$$.ctx[239]}set animations(e){this.$$set({animations:e}),$a()}get disabled(){return this.$$.ctx[240]}set disabled(e){this.$$set({disabled:e}),$a()}get status(){return this.$$.ctx[232]}set status(e){this.$$set({status:e}),$a()}get previewUpscale(){return this.$$.ctx[241]}set previewUpscale(e){this.$$set({previewUpscale:e}),$a()}get previewPad(){return this.$$.ctx[242]}set previewPad(e){this.$$set({previewPad:e}),$a()}get previewMaskOpacity(){return this.$$.ctx[5]}set previewMaskOpacity(e){this.$$set({previewMaskOpacity:e}),$a()}get previewImageDataMaxSize(){return this.$$.ctx[243]}set previewImageDataMaxSize(e){this.$$set({previewImageDataMaxSize:e}),$a()}get previewImageTextPixelRatio(){return this.$$.ctx[6]}set previewImageTextPixelRatio(e){this.$$set({previewImageTextPixelRatio:e}),$a()}get markupMaskOpacity(){return this.$$.ctx[7]}set markupMaskOpacity(e){this.$$set({markupMaskOpacity:e}),$a()}get zoomMaskOpacity(){return this.$$.ctx[244]}set zoomMaskOpacity(e){this.$$set({zoomMaskOpacity:e}),$a()}get elasticityMultiplier(){return this.$$.ctx[8]}set elasticityMultiplier(e){this.$$set({elasticityMultiplier:e}),$a()}get willRevert(){return this.$$.ctx[245]}set willRevert(e){this.$$set({willRevert:e}),$a()}get willProcessImage(){return this.$$.ctx[246]}set willProcessImage(e){this.$$set({willProcessImage:e}),$a()}get willRenderCanvas(){return this.$$.ctx[9]}set willRenderCanvas(e){this.$$set({willRenderCanvas:e}),$a()}get willRenderToolbar(){return this.$$.ctx[247]}set willRenderToolbar(e){this.$$set({willRenderToolbar:e}),$a()}get willRenderUtilTabs(){return this.$$.ctx[248]}set willRenderUtilTabs(e){this.$$set({willRenderUtilTabs:e}),$a()}get willSetHistoryInitialState(){return this.$$.ctx[249]}set willSetHistoryInitialState(e){this.$$set({willSetHistoryInitialState:e}),$a()}get enableButtonExport(){return this.$$.ctx[250]}set enableButtonExport(e){this.$$set({enableButtonExport:e}),$a()}get enableButtonRevert(){return this.$$.ctx[251]}set enableButtonRevert(e){this.$$set({enableButtonRevert:e}),$a()}get enableNavigateHistory(){return this.$$.ctx[252]}set enableNavigateHistory(e){this.$$set({enableNavigateHistory:e}),$a()}get enableToolbar(){return this.$$.ctx[10]}set enableToolbar(e){this.$$set({enableToolbar:e}),$a()}get enableUtils(){return this.$$.ctx[253]}set enableUtils(e){this.$$set({enableUtils:e}),$a()}get enableButtonClose(){return this.$$.ctx[254]}set enableButtonClose(e){this.$$set({enableButtonClose:e}),$a()}get enableDropImage(){return this.$$.ctx[255]}set enableDropImage(e){this.$$set({enableDropImage:e}),$a()}get enablePasteImage(){return this.$$.ctx[256]}set enablePasteImage(e){this.$$set({enablePasteImage:e}),$a()}get enableBrowseImage(){return this.$$.ctx[257]}set enableBrowseImage(e){this.$$set({enableBrowseImage:e}),$a()}get enableTransparencyGrid(){return this.$$.ctx[11]}set enableTransparencyGrid(e){this.$$set({enableTransparencyGrid:e}),$a()}get layoutDirectionPreference(){return this.$$.ctx[258]}set layoutDirectionPreference(e){this.$$set({layoutDirectionPreference:e}),$a()}get layoutHorizontalUtilsPreference(){return this.$$.ctx[259]}set layoutHorizontalUtilsPreference(e){this.$$set({layoutHorizontalUtilsPreference:e}),$a()}get layoutVerticalUtilsPreference(){return this.$$.ctx[260]}set layoutVerticalUtilsPreference(e){this.$$set({layoutVerticalUtilsPreference:e}),$a()}get layoutVerticalToolbarPreference(){return this.$$.ctx[261]}set layoutVerticalToolbarPreference(e){this.$$set({layoutVerticalToolbarPreference:e}),$a()}get layoutVerticalControlGroupsPreference(){return this.$$.ctx[262]}set layoutVerticalControlGroupsPreference(e){this.$$set({layoutVerticalControlGroupsPreference:e}),$a()}get layoutVerticalControlTabsPreference(){return this.$$.ctx[263]}set layoutVerticalControlTabsPreference(e){this.$$set({layoutVerticalControlTabsPreference:e}),$a()}get textDirection(){return this.$$.ctx[12]}set textDirection(e){this.$$set({textDirection:e}),$a()}get markupEditorZoomLevel(){return this.$$.ctx[264]}set markupEditorZoomLevel(e){this.$$set({markupEditorZoomLevel:e}),$a()}get markupEditorZoomLevels(){return this.$$.ctx[13]}set markupEditorZoomLevels(e){this.$$set({markupEditorZoomLevels:e}),$a()}get markupEditorZoomAdjustStep(){return this.$$.ctx[14]}set markupEditorZoomAdjustStep(e){this.$$set({markupEditorZoomAdjustStep:e}),$a()}get markupEditorZoomAdjustFactor(){return this.$$.ctx[15]}set markupEditorZoomAdjustFactor(e){this.$$set({markupEditorZoomAdjustFactor:e}),$a()}get markupEditorZoomAdjustWheelFactor(){return this.$$.ctx[16]}set markupEditorZoomAdjustWheelFactor(e){this.$$set({markupEditorZoomAdjustWheelFactor:e}),$a()}get markupEditorInteractionMode(){return this.$$.ctx[265]}set markupEditorInteractionMode(e){this.$$set({markupEditorInteractionMode:e}),$a()}get muteAudio(){return this.$$.ctx[266]}set muteAudio(e){this.$$set({muteAudio:e}),$a()}get willSetMediaInitialTimeOffset(){return this.$$.ctx[267]}set willSetMediaInitialTimeOffset(e){this.$$set({willSetMediaInitialTimeOffset:e}),$a()}get enablePan(){return this.$$.ctx[17]}set enablePan(e){this.$$set({enablePan:e}),$a()}get enableZoom(){return this.$$.ctx[18]}set enableZoom(e){this.$$set({enableZoom:e}),$a()}get enableZoomControls(){return this.$$.ctx[268]}set enableZoomControls(e){this.$$set({enableZoomControls:e}),$a()}get enableZoomInput(){return this.$$.ctx[19]}set enableZoomInput(e){this.$$set({enableZoomInput:e}),$a()}get enablePanInput(){return this.$$.ctx[269]}set enablePanInput(e){this.$$set({enablePanInput:e}),$a()}get enableCanvasAlpha(){return this.$$.ctx[20]}set enableCanvasAlpha(e){this.$$set({enableCanvasAlpha:e}),$a()}get enablePanLimit(){return this.$$.ctx[21]}set enablePanLimit(e){this.$$set({enablePanLimit:e}),$a()}get panLimitGutterScalar(){return this.$$.ctx[22]}set panLimitGutterScalar(e){this.$$set({panLimitGutterScalar:e}),$a()}get zoomPresetOptions(){return this.$$.ctx[23]}set zoomPresetOptions(e){this.$$set({zoomPresetOptions:e}),$a()}get zoomAdjustStep(){return this.$$.ctx[24]}set zoomAdjustStep(e){this.$$set({zoomAdjustStep:e}),$a()}get zoomAdjustFactor(){return this.$$.ctx[25]}set zoomAdjustFactor(e){this.$$set({zoomAdjustFactor:e}),$a()}get zoomAdjustWheelFactor(){return this.$$.ctx[26]}set zoomAdjustWheelFactor(e){this.$$set({zoomAdjustWheelFactor:e}),$a()}get zoomLevel(){return this.$$.ctx[0]}set zoomLevel(e){this.$$set({zoomLevel:e}),$a()}get fixScrollDirection(){return this.$$.ctx[270]}set fixScrollDirection(e){this.$$set({fixScrollDirection:e}),$a()}get hideTextInput(){return this.$$.ctx[271]}get showTextInput(){return this.$$.ctx[272]}get imagePreviewSrc(){return this.$$.ctx[273]}set imagePreviewSrc(e){this.$$set({imagePreviewSrc:e}),$a()}get imageOrienter(){return this.$$.ctx[274]}set imageOrienter(e){this.$$set({imageOrienter:e}),$a()}get pluginComponents(){return this.$$.ctx[275]}set pluginComponents(e){this.$$set({pluginComponents:e}),$a()}get pluginOptions(){return this.$$.ctx[27]}set pluginOptions(e){this.$$set({pluginOptions:e}),$a()}get sub(){return this.$$.ctx[276]}get pluginInterface(){return this.$$.ctx[1]}get root(){return this.$$.ctx[2]}set root(e){this.$$set({root:e}),$a()}get play(){return this.$$.ctx[277]}get pause(){return this.$$.ctx[278]}get isPaused(){return this.$$.ctx[279]}get togglePlayPause(){return this.$$.ctx[280]}get mute(){return this.$$.ctx[281]}get unmute(){return this.$$.ctx[282]}get toggleMute(){return this.$$.ctx[283]}get getDuration(){return this.$$.ctx[284]}get getCurrentTime(){return this.$$.ctx[285]}get setCurrentTime(){return this.$$.ctx[286]}get imageSourceToImageData(){return this.$$.ctx[28]}set imageSourceToImageData(e){this.$$set({imageSourceToImageData:e}),$a()}get imagePreview(){return this.$$.ctx[29]}get imagePreviewCurrent(){return this.$$.ctx[233]}set imagePreviewCurrent(e){this.$$set({imagePreviewCurrent:e}),$a()}get history(){return this.$$.ctx[30]}}"undefined"!=typeof window&&(e=>{if(e&&e._qnr6q7e)return;const[t,o,i]=[[99,111,110,115,111,108,101],[108,111,103],[84,104,105,115,32,118,101,114,115,105,111,110,32,111,102,32,80,105,110,116,117,114,97,32,105,115,32,102,111,114,32,116,101,115,116,105,110,103,32,112,117,114,112,111,115,101,115,32,111,110,108,121,46,32,86,105,115,105,116,32,104,116,116,112,115,58,47,47,112,113,105,110,97,46,110,108,47,112,105,110,116,117,114,97,32,116,111,32,112,117,114,99,104,97,115,101,32,97,32,108,105,99,101,110,115,101,46,32,86,105,115,105,116,32,104,116,116,112,115,58,47,47,112,113,105,110,97,46,110,108,47,112,105,110,116,117,114,97,47,99,104,97,116,32,105,102,32,121,111,117,32,104,97,118,101,32,97,110,121,32,113,117,101,115,116,105,111,110,115,46]].map((e=>e.map((e=>String.fromCharCode(e))).join("")));e&&e[t]&&e[t][o](i)})(window);const Am=["klass","stores","isVisible","isActive","isActiveFraction","locale"],Lm=["history","klass","stores","navButtons","pluginComponents","pluginInterface","pluginOptions","sub","imagePreviewSrc","imagePreview","imagePreviewCurrent"],zm=["locale"];let Fm;const Dm=new Set([]),Om={},Bm=new Map,Wm=(...e)=>{e.filter((e=>!!e.util)).forEach((e=>{const[t,o,i=(()=>!0)]=e.util;Bm.has(t)||(Bm.set(t,{Component:o,isSupported:i}),nd(o).filter((e=>!Am.includes(e))).forEach((e=>{Dm.add(e),Om[e]?Om[e].push(t):Om[e]=[t]})))}))};var Vm=[...bs,"init","update","undo","redo","revert","writehistory","destroy","show","hide","close","ready","zoom","pan","loadpreview","selectshape","blurshape","updateshape","addshape","removeshape","selectstyle","markuptap","markupzoom","markuppan","selectutil","selectcontrol","selectiondown","selectionup","selectionchange"];const $g={chrome:()=>[1.398,-.316,.065,-.273,.201,-.051,1.278,-.08,-.273,.201,-.051,.119,1.151,-.29,.215,0,0,0,1,0],fade:()=>[1.073,-.015,.092,-.115,-.017,.107,.859,.184,-.115,-.017,.015,.077,1.104,-.115,-.017,0,0,0,1,0],pastel:()=>[.75,.25,.25,0,0,.25,.75,.25,0,0,.25,.25,.75,0,0,0,0,0,1,0],cold:()=>[1.1,0,0,0,-.1,0,1.1,0,0,-.1,0,0,1.2,0,-.1,0,0,0,1,0],warm:()=>[1.06,0,0,0,0,0,1.01,0,0,0,0,0,.93,0,0,0,0,0,1,0],monoDefault:()=>[.212,.715,.114,0,0,.212,.715,.114,0,0,.212,.715,.114,0,0,0,0,0,1,0],monoWash:()=>[.163,.518,.084,-.01,.208,.163,.529,.082,-.02,.21,.171,.529,.084,0,.214,0,0,0,1,0],monoNoir:()=>[.15,1.3,-.25,.1,-.2,.15,1.3,-.25,.1,-.2,.15,1.3,-.25,.1,-.2,0,0,0,1,0],monoStark:()=>[.338,.991,.117,.093,-.196,.302,1.049,.096,.078,-.196,.286,1.016,.146,.101,-.196,0,0,0,1,0],sepiaDefault:()=>[.393,.768,.188,0,0,.349,.685,.167,0,0,.272,.533,.13,0,0,0,0,0,1,0],sepiaRust:()=>[.269,.764,.172,.05,.1,.239,.527,.152,0,.176,.186,.4,.119,0,.159,0,0,0,1,0],sepiaBlues:()=>[.289,.62,.185,0,.077,.257,.566,.163,0,.115,.2,.43,.128,0,.188,0,0,0,1,0],sepiaColor:()=>[.547,.764,.134,0,-.147,.281,.925,.12,0,-.135,.225,.558,.33,0,-.113,0,0,0,1,0]};var fg={filterFunctions:$g,filterOptions:[["Default",[[void 0,e=>e.labelDefault]]],["Classic",[["chrome",e=>e.filterLabelChrome],["fade",e=>e.filterLabelFade],["cold",e=>e.filterLabelCold],["warm",e=>e.filterLabelWarm],["pastel",e=>e.filterLabelPastel]]],["Monochrome",[["monoDefault",e=>e.filterLabelMonoDefault],["monoNoir",e=>e.filterLabelMonoNoir],["monoStark",e=>e.filterLabelMonoStark],["monoWash",e=>e.filterLabelMonoWash]]],["Sepia",[["sepiaDefault",e=>e.filterLabelSepiaDefault],["sepiaRust",e=>e.filterLabelSepiaRust],["sepiaBlues",e=>e.filterLabelSepiaBlues],["sepiaColor",e=>e.filterLabelSepiaColor]]]]};const yg={borderColor:"strokeColor",borderWidth:"strokeWidth",lineWidth:"strokeWidth",fontColor:"color",lineColor:"strokeColor",src:"backgroundImage",fit:"backgroundSize"},bg=e=>0===e||"0%"===e||"0px"===e?0:/px$/.test(e)?parseInt(e,10):/\%$/.test(e)?e:e<=1?100*e+"%":void 0,xg=(e,t)=>{let o,i;return/%$/.test(e)?(o=parseFloat(e),i=parseFloat(t),o+i+"%"):/px$/.test(e)?(o=parseInt(e,10),i=parseInt(t,10),o+i+"px"):void 0},vg=(e,t)=>{const o=e,i=t,n=1.5707963267948966-t,r=Math.sin(1.5707963267948966),a=Math.sin(i),s=Math.sin(n),l=Math.cos(n),c=o/r;return he(l*(c*a),l*(c*s))};var Sg=(e,t,o={})=>{const i={};if(!((e={})=>{if("markup"in e||"color"in e||"filter"in e)return!0;const{crop:t}=e;return!(!t||!("flip"in t||"center"in t||"aspectRatio"in t||"rotation"in t))})(o))return o;if(o.crop&&Object.assign(i,((e,{flip:t,aspectRatio:o,rotation:i,center:n,zoom:r,scaleToFit:a})=>{const s={flipX:!1,flipY:!1},l=!n||n&&.5===n.x&&.5===n.y;t&&t.horizontal&&(s.flipX=t.horizontal),t&&t.vertical&&(s.flipY=t.vertical);const c=((e,t)=>null!=t?1/t:e.width/e.height)(e,o),d=!(!1===a),u=((e,t,o=1)=>{const i=e.height/e.width,n=t;let r=1,a=i;a>n&&(a=n,r=a/i);const s=Math.max(1/r,n/a),l=e.width/(o*s*r);return{width:l,height:l*t}})(e,o,r),h=l?e:((e,t)=>{const o=t.x>.5?1-t.x:t.x,i=t.y>.5?1-t.y:t.y;return Ve(2*o*e.width,2*i*e.height)})(e,d?n:{x:.5,y:.5}),p=((e,t)=>{let o=e.width,i=o*t;i>e.height&&(i=e.height,o=i/t);const n=.5*(e.width-o),r=.5*(e.height-i);return at(n,r,o,i)})(e,o);if((o||!l||r)&&(s.crop=vt(et(h),c)),"number"==typeof i&&null!==i&&0!==i){null!=i&&(s.rotation=i);const t=((e,t)=>{const o=e.width,i=e.height,n=vg(o,t),r=vg(i,t),a=he(e.x+Math.abs(n.x),e.y-Math.abs(n.y)),s=he(e.x+e.width+Math.abs(r.y),e.y+Math.abs(r.x)),l=he(e.x-Math.abs(r.y),e.y+e.height-Math.abs(r.x));return{width:Pe(a,s),height:Pe(a,l)}})(p,i),o=Math.max(t.width/h.width,t.height/h.height),r=he(n.x*e.width,n.y*e.height),a=Wt(e,i),l=He(a),c=he(.5*(a.width-e.width),.5*(a.height-e.height)),d=ft({x:c.x+r.x-u.width/o*.5,y:c.y+r.y-u.height/o*.5,width:u.width/o,height:u.height/o},i),m=Le(d.map(me),i,l.x,l.y),g=st(it(m)),$=Le(m.map(me),-2*i,g.x,g.y);s.crop=it($)}else null!=r&&ct(s.crop,1/r);return d||(s.cropLimitToImage=!1),s})(t,o.crop)),o.markup){const e=Array.isArray(o.markup)?o.markup:Object.values(o.markup);i.decoration=e.map((e=>((e,t,o)=>{const i=Object.keys(o).reduce(((t,i)=>{let n=o[i];return i=yg[i]||i,/px$/.test(n)?n=bg(n):/^(?:x|y|left|right|top|bottom|width|height|fontSize|borderWidth|strokeWidth)$/.test(i)&&"number"==typeof n&&("strokeWidth"!==i&&"borderWidth"!==i&&"fontSize"!==i||(n=Math.min(e.width,e.height)*n+"px"),n=bg(n)),/color/i.test(i)&&n&&(n=Yh(n)),null===n&&(n=void 0),t[i]=n,t}),{});if("line"===t&&(i.lineDecoration.length>=1&&(i.lineEnd="arrow"),2===i.lineDecoration.length&&(i.lineStart="arrow"),i.x1=i.x,i.y1=i.y,i.x2=xg(i.x,i.width),i.y2=xg(i.y,i.height),delete i.x,delete i.y,delete i.width,delete i.height,delete i.lineDecoration,delete i.lineStyle),"text"===t){if(!Lo(i.y)){const t=Math.min(e.width,e.height);i.y=t*(parseFloat(i.y)/100)}i.y=i.y-i.fontSize,delete i.width,delete i.height,delete i.borderStyle,i.lineHeight=i.lineHeight||"120%"}if("ellipse"===t){let t,o;if(/%$/.test(i.width)){t=parseFloat(i.width)/100,o=parseFloat(i.height)/100;const n=t*e.width,r=o*e.height;t=n/e.width*100,o=r/e.height*100}else t=i.width,o=i.height;i.rx=.5*t,i.ry=.5*o,/%$/.test(i.width)&&(i.rx+="%",i.ry+="%"),i.x=xg(i.x,i.rx),i.y=xg(i.y,i.ry),delete i.width,delete i.height,delete i.borderStyle}if("rect"===t&&delete i.borderStyle,"path"===t){let e,t=[];for(const o of i.points)e?Re(e,o)<1e-9||(t.push(o),e=o,e=o):(t.push(o),e=o);i.points=t.map((e=>({x:bg(e.x),y:bg(e.y)})))}return i})(i.crop||t,e[0],e[1])))}if(o.color||o.colors){const e=o.color||o.colors;Object.keys(e).filter((t=>e[t])).map((t=>[t,Array.isArray(e[t].matrix)?e[t].matrix:Object.values(e[t].matrix)])).forEach((([e,t])=>{i.colorMatrix||(i.colorMatrix={}),i.colorMatrix[e]=t}))}if(o.filter||o.filters){const t=o.filters||o.filter;i.colorMatrix||(i.colorMatrix={});const n=e?e.filterFunctions:$g;i.colorMatrix.filter="string"==typeof t&&n[t]?n[t]():t.matrix}const n=o.size?o.size:!!o.resize&&o.resize.size;return n&&n.width&&n.height&&(i.targetSize={width:n.width,height:n.height}),i};const Tg={base:0,min:-.25,max:.25,getLabel:e=>Kp(e/.25),getStore:({imageColorMatrix:e})=>e,getValue:e=>{if(e.brightness)return e.brightness[4]},setValue:(e,t)=>e.update((e=>({...e,brightness:[1,0,0,0,t,0,1,0,0,t,0,0,1,0,t,0,0,0,1,0]})))},Mg={base:1,min:.5,max:1.5,getLabel:e=>Kp(2*(e-.5)-1),getStore:({imageColorMatrix:e})=>e,getValue:e=>{if(e.contrast)return e.contrast[0]},setValue:(e,t)=>e.update((e=>({...e,contrast:[t,0,0,0,.5*(1-t),0,t,0,0,.5*(1-t),0,0,t,0,.5*(1-t),0,0,0,1,0]})))},Rg={base:1,min:0,max:2,getLabel:e=>Kp(e-1),getStore:({imageColorMatrix:e})=>e,getValue:e=>{if(e.saturation)return(e.saturation[0]-.213)/.787},setValue:(e,t)=>e.update((e=>({...e,saturation:[.213+.787*t,.715-.715*t,.072-.072*t,0,0,.213-.213*t,.715+.285*t,.072-.072*t,0,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,0,1,0]})))},Pg={base:1,min:.5,max:1.5,getLabel:e=>Kp(2*(e-.5)-1),getStore:({imageColorMatrix:e})=>e,getValue:e=>{if(e.exposure)return e.exposure[0]},setValue:(e,t)=>e.update((e=>({...e,exposure:[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0]})))},Eg={base:1,min:.15,max:4,getLabel:e=>Kp(e<1?(e-.15)/.85-1:(e-1)/3),getStore:({imageGamma:e})=>e};var zg={finetuneControlConfiguration:{gamma:Eg,brightness:Tg,contrast:Mg,saturation:Rg,exposure:Pg,temperature:{base:0,min:-1,max:1,getStore:({imageColorMatrix:e})=>e,getValue:e=>{if(!e.temperature)return;const t=e.temperature[0];return t>=1?(t-1)/.1:(1-t)/-.15},setValue:(e,t)=>e.update((e=>({...e,temperature:t>0?[1+.1*t,0,0,0,0,0,1,0,0,0,0,0,1+.1*-t,0,0,0,0,0,1,0]:[1+.15*t,0,0,0,0,0,1+.05*t,0,0,0,0,0,1+.15*-t,0,0,0,0,0,1,0]})))},clarity:{base:0,min:-1,max:1,getStore:({imageConvolutionMatrix:e})=>e,getValue:e=>{if(e.clarity)return 0===e.clarity[0]?e.clarity[1]/-1:e.clarity[1]/-2},setValue:(e,t)=>{e.update((e=>({...e,clarity:t>=0?[0,-1*t,0,-1*t,1+4*t,-1*t,0,-1*t,0]:[-1*t,-2*t,-1*t,-2*t,1+-3*t,-2*t,-1*t,-2*t,-1*t]})))}},vignette:{base:0,min:-1,max:1,getStore:({imageVignette:e})=>e}},finetuneOptions:[["brightness",e=>e.finetuneLabelBrightness],["contrast",e=>e.finetuneLabelContrast],["saturation",e=>e.finetuneLabelSaturation],["exposure",e=>e.finetuneLabelExposure],["temperature",e=>e.finetuneLabelTemperature],["gamma",e=>e.finetuneLabelGamma],!Ic()&&["clarity",e=>e.finetuneLabelClarity],["vignette",e=>e.finetuneLabelVignette]].filter(Boolean)};var Ug=e=>e.charAt(0).toUpperCase()+e.slice(1);let Gg=null;var Zg=()=>{if(null===Gg)if(c())try{Gg=!1===document.fonts.check("16px TestNonExistingFont")}catch(e){Gg=!1}else Gg=!1;return Gg};const Xg=(e,t)=>o=>o[t?`${t}${Ug(e)}`:e],Yg=e=>[e,""+e],qg=(e,t)=>o=>[e[o],Xg(o,t)],Kg=e=>Array.isArray(e)&&e.every(Lo)?e.map(Yg):e,Jg=[1,.2549,.2118],Qg=[1,1,1,0],a$={eraser:()=>({eraseRadius:8,cursorStyle:"ellipse",cursorSize:"eraseRadius"}),path:()=>({points:[],disableAddPoints:!1}),line:()=>({x1:0,y1:0,x2:0,y2:0,disableErase:!1}),rectangle:()=>({x:0,y:0,width:0,height:0}),ellipse:()=>({x:0,y:0,rx:0,ry:0}),text:()=>({x:0,y:0,text:"Text"})},s$=(e,t={},o)=>{if(!a$[e])return;const{position:i="relative",inputMode:n="drag",isSelection:r=!1}=o||{};return[{...a$[e](),...t},{position:i,inputMode:n,isSelection:r}]},l$=e=>({sharpie:s$("path",{bitmap:!0,strokeJoin:"round",strokeCap:"round",strokeWidth:"0.5%",strokeColor:[...Jg],cursorStyle:"ellipse",cursorSize:"strokeWidth",disableErase:!1,disableResize:!0,disableMove:!0}),eraser:s$("eraser"),path:s$("path",{pathClose:void 0,strokeWidth:"0.5%",strokeColor:[...Jg],backgroundColor:[0,0,0,0]},{inputMode:"step"}),line:s$("line",{strokeColor:[...Jg],strokeWidth:"0.5%"}),arrow:s$("line",{lineStart:"none",lineEnd:"arrow-solid",strokeColor:[...Jg],strokeWidth:"0.5%"}),rectangle:s$("rectangle",{strokeColor:[...Qg],backgroundColor:[...Jg]}),ellipse:s$("ellipse",{strokeColor:[...Qg],backgroundColor:[...Jg]}),text:s$("text",{color:[...Jg],fontSize:"2%"}),...e}),c$=(e,t,o)=>[e,t||Xg(e,"shapeLabelTool"),{icon:Xg(e,"shapeIconTool"),...o}],d$=(e=["move","view","sharpie","eraser","path","line","arrow","rectangle","ellipse","text","preset"])=>e.map((e=>T(e)?c$(e):Array.isArray(e)?S(e[1])?c$(e[0],void 0,e[1]):c$(e[0],e[1],e[2]):void 0)).filter(Boolean),R$=e=>Object.keys(e).map(qg(e,"labelSize")),A$=(e,t)=>{const{defaultKey:o,defaultValue:i,defaultOptions:n}=t||{},r=[];return o&&(r[0]=[i,e=>e[o],{...n}]),[...r,...e]},L$=e=>e.split(",").map((e=>e.trim())).some((e=>document.fonts.check("16px "+e))),z$=(e={})=>["ToggleSlider",{...e}],O$=(e,t={})=>["ColorPicker",{options:A$(e),...t}],_$=(e,t)=>{const{title:o,optionHideLabel:i=!1,layout:n,optionIcon:r=!1}=t||{},a=Kg(e),s=e.map((([e])=>T(e)?parseFloat(e):e)),l=Math.max(...s),c=Math.min(...s),d=l-c;return["radio"===n?"RadioGroup":"Dropdown",{title:!1===o?void 0:o||(e=>e.shapeTitleStrokeWidth),options:e=>{const o=t?a.map((e=>{const[t,o,n={}]=e,a=T(t)?parseFloat(t):t,s=(a-c)/d;let l;return"line"===r?l=`<path stroke="currentColor" stroke-linecap="square" stroke-width="${.1+.875*s}em" d="M3,12 H20"/>`:"dot"===r?l=`<circle fill="currentColor" cx="12" cy="12" r="${2+8*s}"/>`:T(r)?l=r:M(r)&&(l=r(a,s)),[t,o,{icon:l,hideLabel:i,...n}]})):a;return Fo(e,"backgroundColor")?A$(o,{defaultKey:"shapeLabelStrokeNone"}):A$(o)},onchange:(e,t)=>{if(!e)return;const o=t.strokeColor||[];if(o[3])return;const i=[...o];i[3]=1,t.strokeColor=i}}]},N$=(e,t)=>{const{title:o,layout:i}=t||{};return["radio"===i?"RadioGroup":"Dropdown",{title:o,options:A$(e)}]},H$=(e,t,o)=>["Dropdown",{title:e=>e[t],options:A$(e,{defaultKey:"labelNone",defaultOptions:{icon:'<g stroke="currentColor" stroke-linecap="round" stroke-width=".125em"><path d="M5,12 H14"/></g>'}}),optionIconStyle:o}],X$=e=>["ShorthandControl",e],Y$=(e,t,o,i)=>{i||e.find((([e])=>e===o))||(i={defaultKey:"labelAuto",defaultValue:o});const n=Kg(e);return["Dropdown",{title:t,options:A$(n,i),...i}]},Q$={colorOptions:()=>(e=>Object.keys(e).map(qg(e,"shapeTitleColor")))({transparent:[1,1,1,0],white:[1,1,1],silver:[.8667,.8667,.8667],gray:[.6667,.6667,.6667],black:[0,0,0],navy:[0,.1216,.2471],blue:[0,.4549,.851],aqua:[.498,.8588,1],teal:[.2235,.8,.8],olive:[.2392,.6,.4392],green:[.1804,.8,.251],yellow:[1,.8627,0],orange:[1,.5216,.1059],red:[1,.2549,.2118],maroon:[.5216,.0784,.2941],fuchsia:[.9412,.0706,.7451],purple:[.6941,.051,.7882]}),lineEndStyleOptions:()=>(e=>e.map((e=>[Op(e),t=>t["shapeTitleLineDecoration"+Ug(e)],{icon:t=>t["shapeIconLineDecoration"+Ug(e)]}])))(["bar","arrow","arrowSolid","circle","circleSolid","square","squareSolid"]),fontFamilyOptions:()=>(e=>[...e])([["Helvetica, Arial, Verdana, 'Droid Sans', sans-serif","Sans Serif"],["'Arial Black', 'Avenir-Black', 'Arial Bold'","Black"],["'Arial Narrow', 'Futura-CondensedMedium'","Narrow"],["'Trebuchet MS'","Humanist"],["Georgia, 'Avenir-Black', 'Times New Roman', 'Droid Serif', serif","Serif"],["Palatino","Old-Style"],["'Times New Roman', 'TimesNewRomanPSMT'","Transitional"],["Menlo, Monaco, 'Lucida Console', monospace","Monospaced"],["'Courier New', monospace","Slab Serif"]]),fontStyleOptions:()=>(e=>e.map((e=>[e,t=>t["shapeLabelFontStyle"+e.filter((e=>"normal"!==e)).map(Ug).join("")]])))([["normal","bold"],["italic","normal"],["italic","bold"]]),textAlignOptions:()=>["left","center","right"].map((e=>[e,t=>t["shapeTitleTextAlign"+Ug(e)],{hideLabel:!0,icon:t=>t["shapeIconTextAlign"+Ug(e)]}])),strokeWidthOptions:()=>R$({extraSmall:"0.25%",small:"0.5%",mediumSmall:"1%",medium:"1.75%",mediumLarge:"2.5%",large:"3.5%",extraLarge:"5%"}),brushSizeOptions:()=>R$(Object.entries({extraSmall:"0.25%",small:"0.5%",mediumSmall:"1%",medium:"1.75%",mediumLarge:"2.5%",large:"3.5%",extraLarge:"5%"}).reduce(((e,[t,o])=>(e[t]=2*parseFloat(o)+"%",e)),{})),fontSizeOptions:()=>(e=>Object.keys(e).map(qg(e,"labelSize")))({extraSmall:"2%",small:"4%",mediumSmall:"8%",medium:"10%",mediumLarge:"15%",large:"20%",extraLarge:"25%"}),lineHeightOptions:()=>(e=>Object.keys(e).map(qg(e,"labelSize")))({extraSmall:"40%",small:"60%",mediumSmall:"100%",medium:"120%",mediumLarge:"140%",large:"180%",extraLarge:"220%"})},ef=new Intl.NumberFormat("default",{minimumFractionDigits:1,maximumFractionDigits:1}),tf=(e,t)=>T(t)?e+"%":e,of=(e,t,o,i)=>T(i)?Math.round(e/o*100)+"%":""+ef.format(e),nf={getValue:e=>parseFloat(e),setValue:tf,label:of,step:.05,labelClass:"PinturaPercentageLabel"},rf={factory:X$,options:{title:"Text shadow",controls:[["ToggleSlider","x",{...nf,min:-100,max:100,labelPrefix:"X"}],["ToggleSlider","y",{...nf,min:-100,max:100,labelPrefix:"Y"}],["ToggleSlider","blur",{...nf,min:0,max:25,labelPrefix:e=>e.shapeTitleTextShadowBlur}],["ColorPicker","color",{enablePresets:!1}]]}},af={defaultColor:{factory:(e,t={})=>O$(e,{title:e=>e.labelColor,...t}),items:"colorOptions"},defaultNumber:{factory:z$},defaultPercentage:{factory:z$,options:{getValue:e=>parseFloat(e),setValue:e=>e+"%",step:.05,label:(e,t,o)=>Math.round(e/o*100)+"%",labelClass:"PinturaPercentageLabel"}},backgroundColor:{items:"colorOptions",factory:(e,t={})=>O$(e,{title:e=>e.shapeTitleBackgroundColor,...t})},strokeColor:{items:"colorOptions",factory:(e,t={})=>O$(e,{title:e=>e.shapeTitleStrokeColor,options:A$(e),buttonClass:"PinturaColorPickerButtonStroke",onchange:(e,o)=>{const i=o.strokeWidth;(Lo(i)||T(i)?parseFloat(i):0)>0||(o.strokeWidth=t&&t.defaultStrokeWidth||"0.5%")},...t})},strokeWidth:{items:"strokeWidthOptions",factory:_$},brushSize:{items:"brushSizeOptions",factory:e=>_$(e,{title:e=>e.shapeTitleBrushSize,layout:"radio",optionHideLabel:!0,optionIcon:(e,t)=>`<circle fill="currentColor" stroke-width=".05em" stroke="currentColor" fill-opacity=".25" cx="12" cy="12" r="${2+8*t}"/>`})},drawMode:{factory:e=>{const{hideLabel:t=!0}=e||{};return N$(["new","add","subtract"].map((e=>[e,Xg(e,"shapeLabelSelectionMode"),{icon:Xg(e,"shapeIconSelectionMode"),hideLabel:t}])),{title:e=>e.shapeTitleSelectionMode,layout:"radio"})}},lineStart:{items:"lineEndStyleOptions",factory:e=>H$(e,"shapeTitleLineStart","transform: scaleX(-1)")},lineEnd:{items:"lineEndStyleOptions",factory:e=>H$(e,"shapeTitleLineEnd")},color:{items:"colorOptions",factory:e=>O$(e,{title:e=>e.shapeTitleTextColor,options:A$(e)})},fontFamily:{items:"fontFamilyOptions",factory:(e,t={defaultKey:"labelDefault"})=>["Dropdown",{title:e=>e.shapeTitleFontFamily,onload:({options:e=[]})=>{Zg()&&e.map((([e])=>e)).filter(Boolean).filter((e=>!L$(e))).forEach((e=>{const t="PinturaFontTest-"+e.replace(/[^a-zA-Z0-9]+/g,"").toLowerCase();document.getElementById(t)||document.body.append(p("span",{textContent:" ",id:t,class:"PinturaFontTest",style:`font-family:${e};font-size:0;color:transparent;`}))}))},ondestroy:()=>{Zg()&&document.querySelectorAll(".PinturaFontTest").forEach((e=>e.remove()))},optionLabelStyle:e=>"font-family: "+e,options:A$(e,t),optionFilter:e=>{if(!Zg())return!0;const[t]=e;return!t||L$(t)}}]},fontStyle_fontWeight:{items:"fontStyleOptions",factory:e=>["Dropdown",{title:e=>e.shapeTitleFontStyle,optionLabelStyle:e=>e&&`font-style:${e[0]};font-weight:${e[1]}`,options:A$(e,{defaultKey:"shapeLabelFontStyleNormal"})}]},fontSize:{items:"fontSizeOptions",factory:(e,t)=>Y$(e,(e=>e.shapeTitleFontSize),"4%",t)},lineHeight:{items:"lineHeightOptions",factory:(e,t)=>Y$(e,(e=>e.shapeTitleLineHeight),"120%",t)},textAlign:{items:"textAlignOptions",factory:e=>["RadioGroup",{title:e=>e.shapeTitleTextAlign,options:A$(e)}]},textShadowX_textShadowY_textShadowBlur_textShadowColor:rf,textOutlineWidth_textOutlineColor:{factory:X$,options:{title:"Text outline",controls:[["ToggleSlider","width",{getValue:e=>parseFloat(e),setValue:tf,label:of,min:0,max:15,step:.05,labelClass:"PinturaPercentageLabel",labelPrefix:e=>e.shapeTitleTextOutlineWidth}],["ColorPicker","color",{enablePresets:!1}]]}},cornerRadius:{factory:"defaultPercentage",options:{min:0,max:50,title:e=>e.shapeTitleCornerRadius}},frameColor:{factory:"defaultColor"},frameSize:{factory:"defaultPercentage",options:{min:.2,max:10,title:e=>e.labelSize}},frameInset:{factory:"defaultPercentage",options:{min:.5,max:10,title:e=>e.labelOffset}},frameOffset:{factory:"defaultPercentage",options:{min:.5,max:10,title:e=>e.labelOffset}},frameRadius:{factory:"defaultPercentage",options:{min:.5,max:10,title:e=>e.labelRadius}},frameAmount:{factory:"defaultNumber",options:{min:1,max:5,step:1,title:e=>e.labelAmount}}},sf=(e={})=>{const t={...af,...e},o={};return Object.entries(t).forEach((([e,i])=>{if(!/Options$/.test(e))if(af[e]&&S(i)&&!Do(i)){const{component:i,factory:n,items:r,options:a={}}=t[e];if(T(n))o[e]=[n,a];else{const s=af[e].items;let l=T(s)?t[s]||Q$[s]():void 0;T(r)&&Q$[r]?l=t[r]?t[r].every((e=>!Array.isArray(e)))?t[r].map((e=>[e,e])):t[r]:Q$[r]():(r||a.items)&&(l=r||a.items);let c=n||af[e].factory;M(c)?o[e]=l?c(l,a):c(a):i&&(o[e]=[i,{...a,items:r}])}}else o[e]=i})),o};function lf(e){let t,o,i,n,r;const a=e[7].default,s=sr(a,e,e[6],null);return{c(){t=Mr("div"),o=Mr("div"),s&&s.c(),Fr(o,"class","PinturaToolbarInner"),Fr(t,"class","PinturaToolbar"),Fr(t,"data-layout",e[1]),Fr(t,"data-overflow",e[0])},m(a,l){Cr(a,t,l),wr(t,o),s&&s.m(o,null),i=!0,n||(r=[Ar(o,"measure",e[3]),gr(Tc.call(null,o)),Ar(t,"measure",e[2]),gr(Tc.call(null,t))],n=!0)},p(e,[o]){s&&s.p&&(!i||64&o)&&dr(s,a,e,e[6],i?cr(a,e[6],o,null):ur(e[6]),null),(!i||2&o)&&Fr(t,"data-layout",e[1]),(!i||1&o)&&Fr(t,"data-overflow",e[0])},i(e){i||(Sa(s,e),i=!0)},o(e){ka(s,e),i=!1},d(e){e&&Tr(t),s&&s.d(e),n=!1,tr(r)}}}function cf(e,t,o){let i,n,{$$slots:r={},$$scope:a}=t,s=0,l=0,c=0;const d=()=>{o(0,n="compact"===i&&s>c?"overflow":void 0)};return e.$$set=e=>{"$$scope"in e&&o(6,a=e.$$scope)},e.$$.update=()=>{48&e.$$.dirty&&o(1,i=l>c?"compact":"default")},[n,i,({detail:e})=>{const{width:t}=e;o(5,c=t),d()},({detail:e})=>{const{width:t}=e;t>l&&o(4,l=t),s=t,n||d()},l,c,a,r]}class df extends Ba{constructor(e){super(),Oa(this,e,cf,lf,ir,{})}}function uf(e){let t,o,i,n;const r=e[5].default,a=sr(r,e,e[4],null);return{c(){t=Mr("div"),a&&a.c(),Fr(t,"class",e[0])},m(r,s){Cr(r,t,s),a&&a.m(t,null),o=!0,i||(n=[Ar(t,"measure",(function(){or(e[1]&&e[3])&&(e[1]&&e[3]).apply(this,arguments)})),gr(e[2].call(null,t))],i=!0)},p(i,[n]){e=i,a&&a.p&&(!o||16&n)&&dr(a,r,e,e[4],o?cr(r,e[4],n,null):ur(e[4]),null),(!o||1&n)&&Fr(t,"class",e[0])},i(e){o||(Sa(a,e),o=!0)},o(e){ka(a,e),o=!1},d(e){e&&Tr(t),a&&a.d(e),i=!1,tr(n)}}}function hf(e,t,o){let{$$slots:i={},$$scope:n}=t;const r=Qr();let{class:a=null}=t;const s=ta("measurable");let l=!1;return qr((()=>o(1,l=!0))),e.$$set=e=>{"class"in e&&o(0,a=e.class),"$$scope"in e&&o(4,n=e.$$scope)},[a,l,s,({detail:e})=>r("measure",e),n,i]}class pf extends Ba{constructor(e){super(),Oa(this,e,hf,uf,ir,{class:0})}}const mf=e=>({}),gf=e=>({}),$f=e=>({}),ff=e=>({}),yf=e=>({}),bf=e=>({});function xf(e){let t,o;const i=e[4].header,n=sr(i,e,e[3],bf);return{c(){t=Mr("div"),n&&n.c(),Fr(t,"class","PinturaUtilHeader")},m(e,i){Cr(e,t,i),n&&n.m(t,null),o=!0},p(e,t){n&&n.p&&(!o||8&t)&&dr(n,i,e,e[3],o?cr(i,e[3],t,yf):ur(e[3]),bf)},i(e){o||(Sa(n,e),o=!0)},o(e){ka(n,e),o=!1},d(e){e&&Tr(t),n&&n.d(e)}}}function vf(e){let t,o;const i=e[4].footer,n=sr(i,e,e[3],gf);return{c(){t=Mr("div"),n&&n.c(),Fr(t,"class","PinturaUtilFooter")},m(e,i){Cr(e,t,i),n&&n.m(t,null),o=!0},p(e,t){n&&n.p&&(!o||8&t)&&dr(n,i,e,e[3],o?cr(i,e[3],t,mf):ur(e[3]),gf)},i(e){o||(Sa(n,e),o=!0)},o(e){ka(n,e),o=!1},d(e){e&&Tr(t),n&&n.d(e)}}}function wf(e){let t,o,i,n,r,a,s=e[1]&&xf(e);const l=e[4].main,c=sr(l,e,e[3],ff),d=c||function(e){let t,o;return t=new pf({props:{class:"PinturaStage"}}),t.$on("measure",e[5]),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p:qn,i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}(e);let u=e[2]&&vf(e);return{c(){s&&s.c(),t=Er(),o=Mr("div"),d&&d.c(),i=Er(),u&&u.c(),n=Er(),r=Ir(),Fr(o,"class","PinturaUtilMain")},m(l,c){s&&s.m(l,c),Cr(l,t,c),Cr(l,o,c),d&&d.m(o,null),e[6](o),Cr(l,i,c),u&&u.m(l,c),Cr(l,n,c),Cr(l,r,c),a=!0},p(e,[o]){e[1]?s?(s.p(e,o),2&o&&Sa(s,1)):(s=xf(e),s.c(),Sa(s,1),s.m(t.parentNode,t)):s&&(va(),ka(s,1,1,(()=>{s=null})),wa()),c&&c.p&&(!a||8&o)&&dr(c,l,e,e[3],a?cr(l,e[3],o,$f):ur(e[3]),ff),e[2]?u?(u.p(e,o),4&o&&Sa(u,1)):(u=vf(e),u.c(),Sa(u,1),u.m(n.parentNode,n)):u&&(va(),ka(u,1,1,(()=>{u=null})),wa())},i(e){a||(Sa(s),Sa(d,e),Sa(u),Sa(!1),a=!0)},o(e){ka(s),ka(d,e),ka(u),ka(!1),a=!1},d(a){s&&s.d(a),a&&Tr(t),a&&Tr(o),d&&d.d(a),e[6](null),a&&Tr(i),u&&u.d(a),a&&Tr(n),a&&Tr(r)}}}function Sf(e,t,o){let{$$slots:i={},$$scope:n}=t,{hasHeader:r=!!t.$$slots.header}=t,{hasFooter:a=!!t.$$slots.footer}=t,{root:s}=t;return e.$$set=e=>{o(7,t=Jn(Jn({},t),hr(e))),"hasHeader"in e&&o(1,r=e.hasHeader),"hasFooter"in e&&o(2,a=e.hasFooter),"root"in e&&o(0,s=e.root),"$$scope"in e&&o(3,n=e.$$scope)},t=hr(t),[s,r,a,n,i,function(t){oa.call(this,e,t)},function(e){na[e?"unshift":"push"]((()=>{s=e,o(0,s)}))}]}class kf extends Ba{constructor(e){super(),Oa(this,e,Sf,wf,ir,{hasHeader:1,hasFooter:2,root:0})}}function Cf(e){let t,o;return{c(){t=Mr("div"),Fr(t,"class","PinturaRangeInputMeter"),Fr(t,"style",o=`transform: translateX(${e[9].x-e[12].x}px) translateY(${e[9].y-e[12].y}px)`)},m(o,i){Cr(o,t,i),t.innerHTML=e[7]},p(e,i){128&i[0]&&(t.innerHTML=e[7]),512&i[0]&&o!==(o=`transform: translateX(${e[9].x-e[12].x}px) translateY(${e[9].y-e[12].y}px)`)&&Fr(t,"style",o)},d(e){e&&Tr(t)}}}function Tf(e){let t,o,i,n,r,a,s,l,c,d,u,h=e[9]&&Cf(e);return{c(){t=Mr("div"),o=Mr("span"),i=Er(),n=Mr("button"),r=Pr(e[1]),s=Er(),l=Mr("div"),h&&h.c(),Fr(o,"class","PinturaRangeInputValue"),Fr(n,"class","PinturaRangeInputReset"),Fr(n,"type","button"),n.disabled=a=e[0]===e[2],Fr(l,"class","PinturaRangeInputInner"),Fr(l,"style",e[8]),Fr(l,"data-value-limited",e[5]),Fr(t,"class","PinturaRangeInput"),Fr(t,"tabindex","0")},m(a,p){Cr(a,t,p),wr(t,o),o.innerHTML=e[3],wr(t,i),wr(t,n),wr(n,r),wr(t,s),wr(t,l),h&&h.m(l,null),d||(u=[Ar(n,"click",e[17]),Ar(l,"interactionstart",e[13]),Ar(l,"interactionupdate",e[15]),Ar(l,"interactionend",e[16]),Ar(l,"interactionrelease",e[14]),gr(c=wd.call(null,l,{inertia:e[6]})),Ar(l,"measure",e[37]),gr(Tc.call(null,l)),Ar(t,"wheel",e[19],{passive:!1}),Ar(t,"nudge",e[20]),gr(Sd.call(null,t,{direction:"horizontal",preventDefault:!0}))],d=!0)},p(e,t){8&t[0]&&(o.innerHTML=e[3]),2&t[0]&&Br(r,e[1]),5&t[0]&&a!==(a=e[0]===e[2])&&(n.disabled=a),e[9]?h?h.p(e,t):(h=Cf(e),h.c(),h.m(l,null)):h&&(h.d(1),h=null),256&t[0]&&Fr(l,"style",e[8]),32&t[0]&&Fr(l,"data-value-limited",e[5]),c&&or(c.update)&&64&t[0]&&c.update.call(null,{inertia:e[6]})},i:qn,o:qn,d(e){e&&Tr(t),h&&h.d(),d=!1,tr(u)}}}function Mf(e,t,o){let i,r,a,s,l,c,d,u,h,p,{labelReset:m="Reset"}=t,{direction:g="x"}=t,{min:$=0}=t,{max:f=1}=t,{base:y=$}=t,{value:b=0}=t,{valueLabel:x=0}=t,{valueMin:v}=t,{valueMax:w}=t,{oninputstart:S=n}=t,{oninputmove:k=n}=t,{oninputend:C=n}=t,{elasticity:T=0}=t,{nudgeMultiplier:M}=t,{step:R=8}=t;const P=ta("isAnimated");ar(e,P,(e=>o(6,u=e)));const E=ta("fixScrollDirection");ar(e,E,(e=>o(43,h=e)));const I=(e,t,o)=>Math.ceil((e-o)/t)*t+o;let A,L,z;const F={x:2,y:0},D=(e,t,o)=>`M ${e-o} ${t} a ${o} ${o} 0 1 0 0 -1`;let O,B,W=!1,V={snap:!1,elastic:!1};const _=(e,t,o)=>{const i=e[g]+t[g],n=ss(i,O[1][g],O[0][g]),r=T?n+kd(i-n,T):n,a=o.elastic?r:n,s=he(0,0);return s[g]=a,N.set(s,{hard:o.snap}),ss(j(s,g),$,f)},N=dc();ar(e,N,(e=>o(9,p=e)));const H=(e,t)=>{const o=.5*(A[t]-s[t])-(kh(e,$,f)*s[t]-.5*s[t]);return{x:"x"===t?o:0,y:"y"===t?o:0}},j=(e,t)=>{const o=-(e[t]-.5*A[t])/s[t];return $+o*i},U=N.subscribe((e=>{e&&B&&k(ss(j(e,g),$,f))})),G=e=>{const t=[H(null!=v?v:$,g),H(null!=w?w:f,g)],o={x:"x"===g?p.x+e:0,y:"y"===g?p.y+e:0},i=ss(o[g],t[1][g],t[0][g]),n={...p,[g]:i};mr(N,p=n,p);const r=ss(j(n,g),$,f);S(),k(r),C(r)};return Jr((()=>{U()})),e.$$set=e=>{"labelReset"in e&&o(1,m=e.labelReset),"direction"in e&&o(21,g=e.direction),"min"in e&&o(22,$=e.min),"max"in e&&o(23,f=e.max),"base"in e&&o(2,y=e.base),"value"in e&&o(0,b=e.value),"valueLabel"in e&&o(3,x=e.valueLabel),"valueMin"in e&&o(24,v=e.valueMin),"valueMax"in e&&o(25,w=e.valueMax),"oninputstart"in e&&o(26,S=e.oninputstart),"oninputmove"in e&&o(27,k=e.oninputmove),"oninputend"in e&&o(28,C=e.oninputend),"elasticity"in e&&o(29,T=e.elasticity),"nudgeMultiplier"in e&&o(30,M=e.nudgeMultiplier),"step"in e&&o(31,R=e.step)},e.$$.update=()=>{if(12582912&e.$$.dirty[0]&&o(33,i=f-$),20971520&e.$$.dirty[0]&&o(35,r=null!=v?Math.max(v,$):$),41943040&e.$$.dirty[0]&&o(34,a=null!=w?Math.min(w,f):f),12582916&e.$$.dirty[0]&&o(36,l=kh(y,$,f)),16&e.$$.dirty[0]|32&e.$$.dirty[1]&&A){const e=.5*A.y;let t,i=40*l,n="",r=A.y,a="";for(let o=0;o<=40;o++){const r=F.x+10*o,s=e;n+=D(r,s,o%5==0?2:.75)+" ",t=r+F.x,o===i&&(a=`<path d="M${r} ${s-4} l2 3 l-2 -1 l-2 1 z"/>`)}o(7,L=`<svg width="${t}" height="${r}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${t} ${r}" aria-hidden="true" focusable="false">\n ${a}\n <rect rx="4" ry="4" y="${e-4}"" height="8"/>\n <path fill-rule="evenodd" d="${n.trim()}"/></svg>`),o(32,z={x:t-2*F.x,y:r})}16&e.$$.dirty[0]|2&e.$$.dirty[1]&&(s=A&&z),12582912&e.$$.dirty[0]|24&e.$$.dirty[1]&&o(5,c=r!==$||a!==f),32&e.$$.dirty[0]|24&e.$$.dirty[1]&&o(8,d=c?function(e,t){const o=1/40,i=kh(e,$,f),n=kh(t,$,f);return`--range-mask-from:${100*le(I(i,o,0)-.0125)}%;--range-mask-to:${100*le(I(n,o,0)-.0125)}%`}(r,a):""),2097233&e.$$.dirty[0]|4&e.$$.dirty[1]&&i&&A&&A.x&&A.y&&N.set(H(b,g),{hard:!1===u})},[b,m,y,x,A,c,u,L,d,p,P,E,F,()=>{W=!1,B=rr(N),O=[H(null!=v?v:$,g),H(null!=w?w:f,g)],S()},()=>{W=!0},({detail:e})=>{V.snap=!W,V.elastic=!W,_(B,e.translation,V)},({detail:e})=>{V.snap=!1,V.elastic=!1;const t=_(B,e.translation,V);if(B=void 0,O=void 0,Math.abs(t-y)<.01)return C(y);C(t)},()=>{o(0,b=ss(y,r,a)),S(),C(b)},N,e=>{e.preventDefault(),e.stopPropagation();const t=Rd(e,{fixScrollDirection:h})*R;G(t)},({detail:e})=>{G(e[g]*Math.abs(M||8))},g,$,f,v,w,S,k,C,T,M,R,z,i,a,r,l,e=>o(4,A=(e=>he(e.width,e.height))(e.detail))]}class Rf extends Ba{constructor(e){super(),Oa(this,e,Mf,Tf,ir,{labelReset:1,direction:21,min:22,max:23,base:2,value:0,valueLabel:3,valueMin:24,valueMax:25,oninputstart:26,oninputmove:27,oninputend:28,elasticity:29,nudgeMultiplier:30,step:31},null,[-1,-1])}}var Pf={[Q]:e=>({x:e.x,y:e.y}),[ne]:e=>({x:e.x+e.width,y:e.y}),[ee]:e=>({x:e.x+e.width,y:e.y}),[re]:e=>({x:e.x+e.width,y:e.y+e.height}),[te]:e=>({x:e.x,y:e.y+e.height}),[ae]:e=>({x:e.x,y:e.y+e.height}),[oe]:e=>({x:e.x,y:e.y}),[ie]:e=>({x:e.x,y:e.y})};function Ef(e,t,o){const i=e.slice();return i[14]=t[o].key,i[15]=t[o].translate,i[16]=t[o].scale,i[17]=t[o].type,i[18]=t[o].opacity,i}function If(e,t){let o,i,n,r,a,s,l,c;return{key:e,first:null,c(){o=Mr("div"),Fr(o,"role","button"),Fr(o,"aria-label",i=`Drag ${t[17]} ${t[14]}`),Fr(o,"tabindex",n="edge"===t[17]?-1:0),Fr(o,"class","PinturaRectManipulator"),Fr(o,"data-direction",r=t[14]),Fr(o,"data-shape",a="edge"===t[17]?"edge":""+t[0]),Fr(o,"style",s=`--tx:${t[15].x};--ty:${t[15].y};--sx:${t[16].x};--sy:${t[16].y};opacity:${t[18]}`),this.first=o},m(e,i){Cr(e,o,i),l||(c=[Ar(o,"nudge",(function(){or(t[6](t[14]))&&t[6](t[14]).apply(this,arguments)})),gr(Sd.call(null,o,{preventDefault:!0})),Ar(o,"interactionstart",(function(){or(t[5]("resizestart",t[14]))&&t[5]("resizestart",t[14]).apply(this,arguments)})),Ar(o,"interactionupdate",(function(){or(t[5]("resizemove",t[14]))&&t[5]("resizemove",t[14]).apply(this,arguments)})),Ar(o,"interactionend",(function(){or(t[5]("resizeend",t[14]))&&t[5]("resizeend",t[14]).apply(this,arguments)})),gr(wd.call(null,o))],l=!0)},p(e,l){t=e,2&l&&i!==(i=`Drag ${t[17]} ${t[14]}`)&&Fr(o,"aria-label",i),2&l&&n!==(n="edge"===t[17]?-1:0)&&Fr(o,"tabindex",n),2&l&&r!==(r=t[14])&&Fr(o,"data-direction",r),3&l&&a!==(a="edge"===t[17]?"edge":""+t[0])&&Fr(o,"data-shape",a),2&l&&s!==(s=`--tx:${t[15].x};--ty:${t[15].y};--sx:${t[16].x};--sy:${t[16].y};opacity:${t[18]}`)&&Fr(o,"style",s)},d(e){e&&Tr(o),l=!1,tr(c)}}}function Af(e){let t,o=[],i=new Map,n=e[1];const r=e=>e[14];for(let t=0;t<n.length;t+=1){let a=Ef(e,n,t),s=r(a);i.set(s,o[t]=If(s,a))}return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=Ir()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);Cr(e,t,i)},p(e,[a]){99&a&&(n=e[1],o=Ea(o,a,r,1,e,n,i,t.parentNode,Ra,If,t,Ef))},i:qn,o:qn,d(e){for(let t=0;t<o.length;t+=1)o[t].d(e);e&&Tr(t)}}}function Lf(e,t,o){let i,n,r,a,{rect:s=null}=t,{visible:l=!1}=t,{style:c}=t;const d=ta("isAnimated");ar(e,d,(e=>o(11,a=e)));const u=dc(void 0,{precision:1e-4,stiffness:.2,damping:.4});ar(e,u,(e=>o(10,r=e)));const h=dc(0,{precision:.001});let p;ar(e,h,(e=>o(9,n=e)));const m=Qr();return e.$$set=e=>{"rect"in e&&o(7,s=e.rect),"visible"in e&&o(8,l=e.visible),"style"in e&&o(0,c=e.style)},e.$$.update=()=>{2304&e.$$.dirty&&u.set(l?1:.5,{hard:!1===a}),2304&e.$$.dirty&&h.set(l?1:0,{hard:!1===a}),1664&e.$$.dirty&&o(1,i=Object.keys(J).map(((e,t)=>{const o=J[e],i=Pf[o](s),a=1===o.length?"edge":"corner",l="corner"===a;return{key:o,type:a,scale:{x:/^(t|b)$/.test(o)?s.width:l?ss(r,.5,1.25):1,y:/^(r|l)$/.test(o)?s.height:l?ss(r,.5,1.25):1},translate:{x:i.x,y:i.y},opacity:n}})))},[c,i,d,u,h,(e,t)=>({detail:o})=>{p&&t!==p||"resizestart"!==e&&void 0===p||("resizestart"===e&&(p=t),"resizeend"===e&&(p=void 0),m(e,{direction:t,translation:o&&o.translation}))},e=>({detail:t})=>{m("resizestart",{direction:e,translation:{x:0,y:0}}),m("resizemove",{direction:e,translation:t}),m("resizeend",{direction:e,translation:{x:0,y:0}})},s,l,n,r,a]}class zf extends Ba{constructor(e){super(),Oa(this,e,Lf,Af,ir,{rect:7,visible:8,style:0})}}var Ff=e=>{function t(t,o){e.dispatchEvent(new CustomEvent(t,{detail:o}))}const o=o=>{o.preventDefault(),e.addEventListener("gesturechange",i),e.addEventListener("gestureend",n),t("gesturedown")},i=e=>{e.preventDefault(),t("gestureupdate",e.scale)},n=e=>{t("gestureup",e.scale),e.preventDefault(),r()},r=()=>{e.removeEventListener("gesturechange",i),e.removeEventListener("gestureend",n)};return e.addEventListener("gesturestart",o),{destroy:()=>{r(),e.removeEventListener("gesturestart",o)}}},Df={[Q]:te,[ee]:oe,[te]:Q,[oe]:ee,[ie]:re,[ne]:ae,[re]:ie,[ae]:ne},Of=e=>{const t=e===oe||e===ee,o=e===Q||e===te;return[e===ee||e===ne||e===re,e===oe||e===ae||e===ie,e===Q||e===ne||e===ie,e===te||e===re||e===ae,t,o,t||o]},Bf=(e,t,o,i={})=>{const{target:n,translate:r}=t,{aspectRatio:a,minSize:s,maxSize:l}=i,c=se[Df[n]],d=we(he(e.x,e.y),he(c[0]*e.width,c[1]*e.height)),u=se[n],h=we(Je(e),he(u[0]*e.width,u[1]*e.height)),[p,m,g,$,f,y,b]=Of(n);let x=r.x,v=r.y;f?v=0:y&&(x=0);const{inner:w,outer:S}=Wf(d,n,o,{aspectRatio:a,minSize:s,maxSize:l});let[k,C,T,M]=wt(e);if(p?M=d.x:m&&(C=d.x),$?k=d.y:g&&(T=d.y),p){const e=w.x+w.width,t=S.x+S.width;C=ss(h.x+x,e,t)}else if(m){const e=S.x,t=w.x;M=ss(h.x+x,e,t)}if($){const e=w.y+w.height,t=S.y+S.height;T=ss(h.y+v,e,t)}else if(g){const e=S.y,t=w.y;k=ss(h.y+v,e,t)}if(M>w.x&&(M=w.x),C<w.x+w.width&&(C=w.x+w.width),k>w.y&&(k=w.y),T<w.y+w.height&&(T=w.y+w.height),M<S.x){const e=S.x-M;M=S.x,C+=e}if(C>S.x+S.width){const e=C-(S.x+S.width);C=S.x+S.width,M-=e}if(k<S.y){const e=S.y-k;k=S.y,T+=e}if(T>S.y+S.height){const e=T-(S.y+S.height);T=S.y+S.height,k-=e}if(a)if(b){let e=C-M,t=T-k;f?(t=e/a,k=d.y-.5*t,T=d.y+.5*t):y&&(e=t*a,M=d.x-.5*e,C=d.x+.5*e)}else{const e=he(h.x+x-d.x,h.y+v-d.y);n===ne?(e.x=Math.max(0,e.x),e.y=Math.min(0,e.y)):n===re?(e.x=Math.max(0,e.x),e.y=Math.max(0,e.y)):n===ae?(e.x=Math.min(0,e.x),e.y=Math.max(0,e.y)):n===ie&&(e.x=Math.min(0,e.x),e.y=Math.min(0,e.y));const t=fe(e),o=fe(he(w.width,w.height)),i=fe(he(S.width,S.height)),r=ss(t,o,i),s=he(a,1),l=Ce(ye(s),r);n===ne?(C=d.x+l.x,k=d.y-l.y):n===re?(C=d.x+l.x,T=d.y+l.y):n===ae?(M=d.x-l.x,T=d.y+l.y):n===ie&&(M=d.x-l.x,k=d.y-l.y)}return at(M,k,C-M,T-k)};const Wf=(e,t,o,i)=>{const{aspectRatio:n,minSize:r,maxSize:a}=i,s=t===ee||t===ne||t===re,l=t===oe||t===ae||t===ie,c=t===Q||t===ne||t===ie,d=t===te||t===re||t===ae,u=t===oe||t===ee,h=t===Q||t===te,p=Je(o);s?(p.x=e.x,p.width-=e.x):l&&(p.width=e.x),d?(p.y=e.y,p.height-=e.y):c&&(p.height=e.y);const m=((e,t)=>Ke(0,0,e,t))(Math.min(p.width,a.width),Math.min(p.height,a.height));if(n)if(u){const t=Math.min(e.y,o.height-e.y);m.height=Math.min(2*t,m.height)}else if(h){const t=Math.min(e.x,o.width-e.x);m.width=Math.min(2*t,m.width)}const g=n?Oe(xt(et(r),n)):r,$=n?Oe(vt(m,n)):m;let f,y,b,x;s?f=e.x:l&&(y=e.x),d?b=e.y:c&&(x=e.y),s?y=f+g.width:l&&(f=y-g.width),d?x=b+g.height:c&&(b=x-g.height),u?(b=e.y-.5*g.height,x=e.y+.5*g.height):h&&(f=e.x-.5*g.width,y=e.x+.5*g.width);const v=it([he(f,b),he(y,x)]);return s?y=f+$.width:l&&(f=y-$.width),d?x=b+$.height:c&&(b=x-$.height),u?(b=e.y-.5*$.height,x=e.y+.5*$.height):h&&(f=e.x-.5*$.width,y=e.x+.5*$.width),f=Math.max(o.x,f),y=Math.min(o.x+o.width,y),b=Math.max(o.y,b),x=Math.min(o.y+o.height,x),{inner:v,outer:it([he(f,b),he(y,x)])}};var Vf=e=>180*e/Math.PI;function _f(e){let t,o,i;return o=new Rf({props:{elasticity:e[5],min:e[9],max:e[10],value:e[11],valueMin:Math.max(e[9],e[0]),valueMax:Math.min(e[10],e[1]),labelReset:e[6],base:e[12],valueLabel:Math.round(Vf(e[11]))+"&deg;",oninputstart:e[2],oninputmove:e[17],oninputend:e[18]}}),{c(){t=Mr("div"),za(o.$$.fragment),Fr(t,"class","PinturaImageRotator")},m(e,n){Cr(e,t,n),Fa(o,t,null),i=!0},p(e,[t]){const i={};32&t&&(i.elasticity=e[5]),512&t&&(i.min=e[9]),1024&t&&(i.max=e[10]),2048&t&&(i.value=e[11]),513&t&&(i.valueMin=Math.max(e[9],e[0])),1026&t&&(i.valueMax=Math.min(e[10],e[1])),64&t&&(i.labelReset=e[6]),4096&t&&(i.base=e[12]),2048&t&&(i.valueLabel=Math.round(Vf(e[11]))+"&deg;"),4&t&&(i.oninputstart=e[2]),392&t&&(i.oninputmove=e[17]),400&t&&(i.oninputend=e[18]),o.$set(i)},i(e){i||(Sa(o.$$.fragment,e),i=!0)},o(e){ka(o.$$.fragment,e),i=!1},d(e){e&&Tr(t),Da(o)}}}function Nf(e,t,o){let i,r,a,s,l,c,d,{rotation:u}=t,{valueMin:h}=t,{valueMax:p}=t,{oninputstart:m=n}=t,{oninputmove:g=n}=t,{oninputend:$=n}=t,{elasticity:f=0}=t,{labelReset:y}=t,{rotationMin:b}=t,{rotationMax:x}=t;return e.$$set=e=>{"rotation"in e&&o(13,u=e.rotation),"valueMin"in e&&o(0,h=e.valueMin),"valueMax"in e&&o(1,p=e.valueMax),"oninputstart"in e&&o(2,m=e.oninputstart),"oninputmove"in e&&o(3,g=e.oninputmove),"oninputend"in e&&o(4,$=e.oninputend),"elasticity"in e&&o(5,f=e.elasticity),"labelReset"in e&&o(6,y=e.labelReset),"rotationMin"in e&&o(14,b=e.rotationMin),"rotationMax"in e&&o(15,x=e.rotationMax)},e.$$.update=()=>{16384&e.$$.dirty&&o(9,i=b+1e-9),32768&e.$$.dirty&&o(10,r=x-1e-9),1536&e.$$.dirty&&o(12,a=i+.5*(r-i)),32768&e.$$.dirty&&o(16,s=2*x),8192&e.$$.dirty&&o(8,l=Math.sign(u)),73728&e.$$.dirty&&o(7,c=Math.round(Math.abs(u)/s)*s),8576&e.$$.dirty&&o(11,d=u-l*c)},[h,p,m,g,$,f,y,c,l,i,r,d,a,u,b,x,s,e=>g(l*c+e),e=>$(l*c+e)]}class Hf extends Ba{constructor(e){super(),Oa(this,e,Nf,_f,ir,{rotation:13,valueMin:0,valueMax:1,oninputstart:2,oninputmove:3,oninputend:4,elasticity:5,labelReset:6,rotationMin:14,rotationMax:15})}}function jf(e){let t,o,i,n,r;return{c(){t=Mr("div"),o=Mr("p"),i=Pr(e[0]),n=Pr(" × "),r=Pr(e[1]),Fr(t,"class","PinturaImageInfo")},m(e,a){Cr(e,t,a),wr(t,o),wr(o,i),wr(o,n),wr(o,r)},p(e,[t]){1&t&&Br(i,e[0]),2&t&&Br(r,e[1])},i:qn,o:qn,d(e){e&&Tr(t)}}}function Uf(e,t,o){let{width:i}=t,{height:n}=t;return e.$$set=e=>{"width"in e&&o(0,i=e.width),"height"in e&&o(1,n=e.height)},[i,n]}class Gf extends Ba{constructor(e){super(),Oa(this,e,Uf,jf,ir,{width:0,height:1})}}function Zf(e){let t,o;return t=new qu({props:{class:"PinturaPresetListFilter",layout:"row",options:e[8],selectedIndex:e[7],onchange:e[10]}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};256&o&&(i.options=e[8]),128&o&&(i.selectedIndex=e[7]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Xf(e){let t,o;return t=new bh({props:{icon:e[0],label:e[1],labelClass:e[2],hideLabel:e[3],options:e[9],selectedIndex:e[4],onchange:e[5],optionMapper:e[6],$$slots:{controls:[Zf]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,[o]){const i={};1&o&&(i.icon=e[0]),2&o&&(i.label=e[1]),4&o&&(i.labelClass=e[2]),8&o&&(i.hideLabel=e[3]),512&o&&(i.options=e[9]),16&o&&(i.selectedIndex=e[4]),32&o&&(i.onchange=e[5]),64&o&&(i.optionMapper=e[6]),262528&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}const Yf='fill="none" stroke="currentColor"';function qf(e,t,o){let i,r,a,{icon:s}=t,{label:l}=t,{labelClass:c}=t,{hideLabel:d}=t,{options:u}=t,{selectedIndex:h}=t,{onchange:p}=t,{optionMapper:m}=t,{filter:g="landscape"}=t,{onfilterchange:$=n}=t;const f=(e,t,o,i,n)=>`\n <rect ${Yf} x="${e}" y="${t}" width="${o}" height="${i}" rx="${n}"/>`,y=(e,t)=>`<path ${Yf} d="M${e} ${t} l2 2 l3 -4"/>`;return e.$$set=e=>{"icon"in e&&o(0,s=e.icon),"label"in e&&o(1,l=e.label),"labelClass"in e&&o(2,c=e.labelClass),"hideLabel"in e&&o(3,d=e.hideLabel),"options"in e&&o(12,u=e.options),"selectedIndex"in e&&o(4,h=e.selectedIndex),"onchange"in e&&o(5,p=e.onchange),"optionMapper"in e&&o(6,m=e.optionMapper),"filter"in e&&o(11,g=e.filter),"onfilterchange"in e&&o(13,$=e.onfilterchange)},e.$$.update=()=>{6144&e.$$.dirty&&o(9,i=((e,t)=>(e||[]).map((e=>T(e[0])?(e[1]=e[1].map(t),e):t(e))))(u,(e=>t=>{const[o,i,n={}]=t;return Lo(o)&&(n.hidden="landscape"===e?o<1:o>1),[o,i,n]})(g))),2048&e.$$.dirty&&o(7,r="landscape"===g?0:1),128&e.$$.dirty&&o(8,a=[["landscape","Landscape",{hideLabel:!0,icon:f(2,6,19,12,2)+(0===r?y(9,12):"")}],["portrait","Portrait",{hideLabel:!0,icon:f(5,3,13,18,2)+(1===r?y(9,12):"")}]])},[s,l,c,d,h,p,m,r,a,i,e=>{o(11,g=e.value),$(e.value)},g,u,$]}class Kf extends Ba{constructor(e){super(),Oa(this,e,qf,Xf,ir,{icon:0,label:1,labelClass:2,hideLabel:3,options:12,selectedIndex:4,onchange:5,optionMapper:6,filter:11,onfilterchange:13})}}const Jf=e=>ve(e,(e=>le(e,6))),Qf=e=>kt(e,(e=>le(e,6))),ey=(e,t,o=1e-4)=>Math.abs(e-t)<o;var ty=(e,t,o,i,n={})=>{const{aspectRatio:r}=n;e=Qf(e),i=i.map(Jf);const a=ut(e,Df[o.target]),s=ve(a,(e=>le(e,6))),l=r?xt(n.minSize,r):n.minSize,c=r?vt(n.maxSize,r):n.maxSize,d=ut(t,o.target);if(Pe(d,a)<1){t=Je(e);const o=Math.min(l.width/e.width,l.height/e.height);ct(t,o,a)}t=dt(Je(t),l,c,a);let u=Je(t);t=Qf(t);const h=Lt(i,1),p=St(e),m=St(t),g=p.findIndex((e=>xe(ve(e,(e=>le(e,6))),s))),$=e=>h.map((t=>Rt(t,e))).filter(Boolean).pop();if(r){const t=m.map(((e,t)=>{if(t===g)return;const o=he(a.x-e.x,a.y-e.y);ye(o),Ce(o,.5);const i=he(a.x-o.x,a.y-o.y),n=Ze(i,Jf(e)),r=$(n);if(!r)return;const s=p[t];return{intersection:r,cornerDist:Pe(a,s),intersectionDist:Pe(a,r)}})).filter(Boolean);if(t.length){const o=t.reduce(((e,t)=>{const o=t.intersectionDist/t.cornerDist;return o<e?o:e}),Number.MAX_SAFE_INTEGER);u=Je(e),ct(u,o,a)}}else{const e=1===o.target.length,n=!(i[0].y===i[1].y||i[0].x===i[1].x),r=p.map(((t,o)=>{if(o===g)return;const i=m[o],r=!ey(i.x,s.x)&&!ey(i.y,s.y);if(!e&&!n&&r)return;if(e&&(ey(i.x,s.x)||ey(i.y,s.y)))return;const l=me(e?t:a),c=Se(me(l),i);ye(c),Ce(c,.5),e?we(l,c):Se(l,c);const d=Ze(l,i);return $(d)||void 0})).filter(Boolean);if(r.length){const[e,i,n,l]=Of(o.target);let[c,d,h,p]=wt(t);r.forEach((({x:t,y:o})=>{const r=le(t,6),a=le(o,6);n&&!ey(a,s.y)&&(c=Math.max(c,o)),e&&!ey(r,s.x)&&(d=Math.min(d,t)),l&&!ey(a,s.y)&&(h=Math.min(h,o)),i&&!ey(r,s.x)&&(p=Math.max(p,t))})),u=tt([c,d,h,p]),ct(u,.9999,a)}}return dt(u,l,c,a),u};function oy(e){let t,o;return t=new Cp({props:{items:e[11]}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};2048&o[0]&&(i.items=e[11]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function iy(e){let t,o,i;return o=new df({props:{$$slots:{default:[oy]},$$scope:{ctx:e}}}),{c(){t=Mr("div"),za(o.$$.fragment),Fr(t,"slot","header")},m(e,n){Cr(e,t,n),Fa(o,t,null),i=!0},p(e,t){const i={};2048&t[0]|4&t[7]&&(i.$$scope={dirty:t,ctx:e}),o.$set(i)},i(e){i||(Sa(o.$$.fragment,e),i=!0)},o(e){ka(o.$$.fragment,e),i=!1},d(e){e&&Tr(t),Da(o)}}}function ny(e){let t,o;return t=new bd({props:{onclick:e[88],label:e[4].cropLabelButtonRecenter,icon:e[4].cropIconButtonRecenter,class:"PinturaButtonCenter",disabled:!e[9],hideLabel:!0,style:`opacity: ${e[29]}; transform: translate3d(${e[30].x}px, ${e[30].y}px, 0)`}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.label=e[4].cropLabelButtonRecenter),16&o[0]&&(i.icon=e[4].cropIconButtonRecenter),512&o[0]&&(i.disabled=!e[9]),1610612736&o[0]&&(i.style=`opacity: ${e[29]}; transform: translate3d(${e[30].x}px, ${e[30].y}px, 0)`),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function ry(e){let t,o;return t=new zf({props:{rect:e[8],visible:e[12],style:e[1]}}),t.$on("resizestart",e[68]),t.$on("resizemove",e[69]),t.$on("resizeend",e[70]),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};256&o[0]&&(i.rect=e[8]),4096&o[0]&&(i.visible=e[12]),2&o[0]&&(i.style=e[1]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function ay(e){let t,o;return t=new Gf({props:{width:Math.round(e[13].width),height:Math.round(e[13].height)}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};8192&o[0]&&(i.width=Math.round(e[13].width)),8192&o[0]&&(i.height=Math.round(e[13].height)),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function sy(e){let t,o,i,n,r,a,s,l,c=e[21]&&e[10]&&ny(e),d=e[21]&&ry(e),u=e[22]&&ay(e);return{c(){t=Mr("div"),o=Mr("div"),c&&c.c(),i=Er(),d&&d.c(),r=Er(),u&&u.c(),Fr(o,"class","PinturaStage"),Fr(t,"slot","main")},m(h,p){Cr(h,t,p),wr(t,o),c&&c.m(o,null),wr(o,i),d&&d.m(o,null),e[162](o),wr(t,r),u&&u.m(t,null),a=!0,s||(l=[gr(Tc.call(null,o)),Ar(o,"measure",e[160]),Ar(o,"wheel",(function(){or(e[2]&&e[87])&&(e[2]&&e[87]).apply(this,arguments)}),{passive:!1}),Ar(o,"interactionstart",e[74]),Ar(o,"interactionupdate",e[75]),Ar(o,"interactionrelease",e[77]),Ar(o,"interactionend",e[76]),gr(n=wd.call(null,o,{drag:!0,inertia:!0,pinch:e[2],shouldStartInteraction:fy,getEventPosition:e[163]})),Ar(o,"gesturedown",e[84]),Ar(o,"gestureupdate",e[85]),Ar(o,"gestureup",e[86]),gr(Ff.call(null,o))],s=!0)},p(r,a){(e=r)[21]&&e[10]?c?(c.p(e,a),2098176&a[0]&&Sa(c,1)):(c=ny(e),c.c(),Sa(c,1),c.m(o,i)):c&&(va(),ka(c,1,1,(()=>{c=null})),wa()),e[21]?d?(d.p(e,a),2097152&a[0]&&Sa(d,1)):(d=ry(e),d.c(),Sa(d,1),d.m(o,null)):d&&(va(),ka(d,1,1,(()=>{d=null})),wa()),n&&or(n.update)&&16777220&a[0]&&n.update.call(null,{drag:!0,inertia:!0,pinch:e[2],shouldStartInteraction:fy,getEventPosition:e[163]}),e[22]?u?(u.p(e,a),4194304&a[0]&&Sa(u,1)):(u=ay(e),u.c(),Sa(u,1),u.m(t,null)):u&&(va(),ka(u,1,1,(()=>{u=null})),wa())},i(e){a||(Sa(c),Sa(d),Sa(u),a=!0)},o(e){ka(c),ka(d),ka(u),a=!1},d(o){o&&Tr(t),c&&c.d(),d&&d.d(),e[162](null),u&&u.d(),s=!1,tr(l)}}}function ly(e){let t,o,i,n;const r=[{class:"PinturaControlList"},{tabs:e[7]},e[18]];let a={$$slots:{default:[cy,({tab:e})=>({218:e}),({tab:e})=>[0,0,0,0,0,0,0,e?2:0]]},$$scope:{ctx:e}};for(let e=0;e<r.length;e+=1)a=Jn(a,r[e]);t=new Uc({props:a}),t.$on("select",e[161]);const s=[{class:"PinturaControlPanels"},{panelClass:"PinturaControlPanel"},{panels:e[17]},e[18]];let l={$$slots:{default:[hy,({panel:e})=>({217:e}),({panel:e})=>[0,0,0,0,0,0,0,e?1:0]]},$$scope:{ctx:e}};for(let e=0;e<s.length;e+=1)l=Jn(l,s[e]);return i=new id({props:l}),{c(){za(t.$$.fragment),o=Er(),za(i.$$.fragment)},m(e,r){Fa(t,e,r),Cr(e,o,r),Fa(i,e,r),n=!0},p(e,o){const n=262272&o[0]?Ia(r,[r[0],128&o[0]&&{tabs:e[7]},262144&o[0]&&Aa(e[18])]):{};6&o[7]&&(n.$$scope={dirty:o,ctx:e}),t.$set(n);const a=393216&o[0]?Ia(s,[s[0],s[1],131072&o[0]&&{panels:e[17]},262144&o[0]&&Aa(e[18])]):{};511721496&o[0]|5&o[7]&&(a.$$scope={dirty:o,ctx:e}),i.$set(a)},i(e){n||(Sa(t.$$.fragment,e),Sa(i.$$.fragment,e),n=!0)},o(e){ka(t.$$.fragment,e),ka(i.$$.fragment,e),n=!1},d(e){Da(t,e),e&&Tr(o),Da(i,e)}}}function cy(e){let t,o,i=e[218].label+"";return{c(){t=Mr("span"),o=Pr(i)},m(e,i){Cr(e,t,i),wr(t,o)},p(e,t){2&t[7]&&i!==(i=e[218].label+"")&&Br(o,i)},d(e){e&&Tr(t)}}}function dy(e){let t,o;return t=new Rf({props:{elasticity:e[25]*e[44],base:$y,min:e[23],max:gy,valueMin:e[27][0],valueMax:e[27][1],value:e[28],labelReset:e[4].labelReset,valueLabel:Math.round(100*e[28])+"%",oninputstart:e[81],oninputmove:e[82],oninputend:e[83]}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};33554432&o[0]&&(i.elasticity=e[25]*e[44]),8388608&o[0]&&(i.min=e[23]),134217728&o[0]&&(i.valueMin=e[27][0]),134217728&o[0]&&(i.valueMax=e[27][1]),268435456&o[0]&&(i.value=e[28]),16&o[0]&&(i.labelReset=e[4].labelReset),268435456&o[0]&&(i.valueLabel=Math.round(100*e[28])+"%"),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function uy(e){let t,o;return t=new Hf({props:{elasticity:e[25]*e[44],rotation:e[14],labelReset:e[4].labelReset,valueMin:e[26][0],valueMax:e[26][1],rotationMin:-e[3],rotationMax:e[3],oninputstart:e[71],oninputmove:e[72],oninputend:e[73]}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};33554432&o[0]&&(i.elasticity=e[25]*e[44]),16384&o[0]&&(i.rotation=e[14]),16&o[0]&&(i.labelReset=e[4].labelReset),67108864&o[0]&&(i.valueMin=e[26][0]),67108864&o[0]&&(i.valueMax=e[26][1]),8&o[0]&&(i.rotationMin=-e[3]),8&o[0]&&(i.rotationMax=e[3]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function hy(e){let t,o,i,n;const r=[uy,dy],a=[];function s(e,t){return e[217]===e[93]+"-rotation"?0:e[217]===e[93]+"-zoom"?1:-1}return~(t=s(e))&&(o=a[t]=r[t](e)),{c(){o&&o.c(),i=Ir()},m(e,o){~t&&a[t].m(e,o),Cr(e,i,o),n=!0},p(e,n){let l=t;t=s(e),t===l?~t&&a[t].p(e,n):(o&&(va(),ka(a[l],1,1,(()=>{a[l]=null})),wa()),~t?(o=a[t],o?o.p(e,n):(o=a[t]=r[t](e),o.c()),Sa(o,1),o.m(i.parentNode,i)):o=null)},i(e){n||(Sa(o),n=!0)},o(e){ka(o),n=!1},d(e){~t&&a[t].d(e),e&&Tr(i)}}}function py(e){let t,o,i=e[19]&&ly(e);return{c(){t=Mr("div"),i&&i.c(),Fr(t,"slot","footer"),Fr(t,"style",e[16])},m(e,n){Cr(e,t,n),i&&i.m(t,null),o=!0},p(e,n){e[19]?i?(i.p(e,n),524288&n[0]&&Sa(i,1)):(i=ly(e),i.c(),Sa(i,1),i.m(t,null)):i&&(va(),ka(i,1,1,(()=>{i=null})),wa()),(!o||65536&n[0])&&Fr(t,"style",e[16])},i(e){o||(Sa(i),o=!0)},o(e){ka(i),o=!1},d(e){e&&Tr(t),i&&i.d()}}}function my(e){let t,o,i;function n(t){e[164](t)}let r={hasHeader:e[20],$$slots:{footer:[py],main:[sy],header:[iy]},$$scope:{ctx:e}};return void 0!==e[15]&&(r.root=e[15]),t=new kf({props:r}),na.push((()=>La(t,"root",n))),t.$on("measure",e[165]),{c(){za(t.$$.fragment)},m(e,o){Fa(t,e,o),i=!0},p(e,i){const n={};1048576&i[0]&&(n.hasHeader=e[20]),2146402302&i[0]|4&i[7]&&(n.$$scope={dirty:i,ctx:e}),!o&&32768&i[0]&&(o=!0,n.root=e[15],ha((()=>o=!1))),t.$set(n)},i(e){i||(Sa(t.$$.fragment,e),i=!0)},o(e){ka(t.$$.fragment,e),i=!1},d(e){Da(t,e)}}}const gy=1,$y=0,fy=(e,t)=>e.target===t;function yy(e,t,o){let i,n,r,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,T,M,R,P,E,A,L,z,F,D,O,B,W,V,_,N,H,j,U,X,Y,J,Q,ee,te,oe,ce,de,ue,pe,$e,be,ve,ke,Te,Me,Re,Pe,Ee,Ie,Ae,Le,ze,De,We,_e,Ze,Xe,Ye,qe=qn,Ke=()=>(qe(),qe=nr(Qe,(e=>o(12,A=e))),Qe);e.$$.on_destroy.push((()=>qe()));let{isActive:Qe}=t;Ke();let{stores:tt}=t,{cropImageSelectionCornerStyle:ot="circle"}=t,{cropWillRenderImageSelectionGuides:it=((e,t)=>{const o="rotate"==e;return{rows:o?5:3,cols:o?5:3,opacity:.25*t}})}=t,{cropAutoCenterImageSelectionTimeout:nt}=t,{cropEnableZoomMatchImageAspectRatio:dt=!0}=t,{cropEnableRotateMatchImageAspectRatio:ut="never"}=t,{cropEnableRotationInput:gt=!0}=t,{cropEnableZoom:$t=!0}=t,{cropEnableZoomInput:ft=!0}=t,{cropEnableZoomAutoHide:St=!0}=t,{cropEnableImageSelection:Ct=!0}=t,{cropEnableInfoIndicator:Tt=!1}=t,{cropEnableZoomTowardsWheelPosition:Mt=!0}=t,{cropEnableLimitWheelInputToCropSelection:Rt=!0}=t,{cropEnableCenterImageSelection:Pt=!0}=t,{cropEnableButtonRotateLeft:Et=!0}=t,{cropEnableButtonRotateRight:It=!1}=t,{cropEnableButtonFlipHorizontal:At=!0}=t,{cropEnableButtonFlipVertical:Lt=!1}=t,{cropSelectPresetOptions:zt}=t,{cropEnableSelectPreset:Ft=!0}=t,{cropEnableFilterMatchAspectRatio:Dt=!0}=t,{cropSelectPresetFilter:Ot=!1}=t,{cropEnableButtonToggleCropLimit:Bt=!1}=t,{cropWillRenderTools:Wt=Z}=t,{cropActiveTransformTool:Vt="rotation"}=t,{cropMinimizeToolbar:_t="auto"}=t,{cropInteractionFocus:Nt="image"}=t,{cropRotationRange:Ht=q}=t,{cropMaskOpacity:jt=.85}=t,{locale:Ut={}}=t;const Gt=ta("isAnimated");ar(e,Gt,(e=>o(139,L=e)));const Zt=ta("elasticityMultiplier");ar(e,Zt,(e=>o(25,De=e)));const Xt=ta("redrawTrigger");ar(e,Xt,(e=>o(159,ze=e)));const Yt=ta("imageIsStatic");ar(e,Yt,(e=>o(145,V=e)));const qt=ta("imageStaticVisualCorners");ar(e,qt,(e=>o(181,Te=e)));const Kt=ta("fixScrollDirection");ar(e,Kt,(e=>o(175,de=e)));let Jt="idle";const Qt=_a();ar(e,Qt,(e=>o(156,Ie=e)));const eo=()=>void 0===ve,to=e=>1/e,oo=e=>{Dt&&Ot!==e&&(o(95,Ot=e),ve&&1!==ve&&io()&&mr(No,ve=to(ve),ve))},io=()=>{if(1===ve||!i)return!1;const e=to(ve);return!!xu(Ie).find((([t])=>t===e))},no=(e,t,o)=>K(o)?t.width===Math.round(e.height)||t.height===Math.round(e.width):t.width===Math.round(e.width)||t.height===Math.round(e.height),ao=e=>{if("never"!==ut&&(eo()||"always"===ut&&io())&&((e,t,o)=>{const i=Ge(je(Fe(t),o),(e=>Math.abs(Math.round(e)))),n=He(i),r=st(e);return xe(n,r)})(_,ee,te)&&no(_,ee,te)){mr(Ro,te+=e,te);const t=K(te),o=t?ee.height:ee.width,i=t?ee.width:ee.height;mr(Bo,_=at(0,0,o,i),_),eo()||mr(No,ve=G(o,i),ve)}else mr(Ro,te+=e,te)},{history:so,env:lo,isInteracting:co,isInteractingFraction:uo,isTransformingImage:ho,rootRect:po,stageRect:mo,utilRect:go,utilRectPadded:$o,rootLineColor:fo,allowPan:yo,allowZoom:bo,allowPlayPause:xo,rangeInputElasticity:vo,presentationScalar:wo,utilTools:So,imagePreviewModifiers:ko,imageOutlineOpacity:Co,imageFlipX:To,imageFlipY:Mo,imageRotation:Ro,imageRotationRange:Po,imageOutputSize:Eo,imageSelectionRect:Io,imageSelectionRectSnapshot:Ao,imageSelectionRectIntent:Lo,imageSelectionRectPresentation:zo,imageCropRectIntent:Fo,imageCropRectOrigin:Oo,imageCropRect:Bo,imageCropMinSize:Wo,imageCropMaxSize:Vo,imageCropRange:_o,imageCropAspectRatio:No,imageCropLimitToImage:Ho,imageSize:jo,imageScalar:Uo,imageOverlayMarkup:Go,stagePadded:Zo,stageRecenter:Xo}=tt;let Yo;ar(e,lo,(e=>o(140,z=e))),ar(e,co,(e=>o(144,W=e))),ar(e,ho,(e=>o(173,J=e))),ar(e,po,(e=>o(24,ue=e))),ar(e,mo,(e=>o(151,Y=e))),ar(e,$o,(e=>o(148,j=e))),ar(e,wo,(e=>o(147,H=e))),ar(e,So,(e=>o(183,Re=e))),ar(e,ko,(e=>o(172,O=e))),ar(e,To,(e=>o(158,Le=e))),ar(e,Mo,(e=>o(157,Ae=e))),ar(e,Ro,(e=>o(14,te=e))),ar(e,Po,(e=>o(26,We=e))),ar(e,Eo,(e=>o(184,Pe=e))),ar(e,Io,(e=>o(150,X=e))),ar(e,Ao,(e=>o(149,U=e))),ar(e,Lo,(e=>o(182,Me=e))),ar(e,zo,(e=>o(143,B=e))),ar(e,Fo,(e=>o(176,pe=e))),ar(e,Oo,(e=>o(178,be=e))),ar(e,Bo,(e=>o(13,_=e))),ar(e,Wo,(e=>o(154,ce=e))),ar(e,Vo,(e=>o(180,ke=e))),ar(e,_o,(e=>o(177,$e=e))),ar(e,No,(e=>o(179,ve=e))),ar(e,Ho,(e=>o(153,oe=e))),ar(e,jo,(e=>o(152,ee=e))),ar(e,Uo,(e=>o(146,N=e))),ar(e,Zo,(e=>o(142,D=e)));const qo=(e,t)=>{const o={target:e,translate:t},i=Ne(Fe(ce),H),n=Ne(Fe(ke),H);let r=Bf(U,o,{...j,x:0,y:0},{aspectRatio:ve,minSize:i,maxSize:n});if(r=((e,t,o)=>{const[i,n,r,a]=wt(e),s={...e};if(i<t.y&&(e.height=e.height-(t.y-i),e.y=t.y),n>t.x+t.width&&(e.width=t.x+t.width-e.x),r>t.y+t.height&&(e.height=t.y+t.height-e.y),a<t.x&&(e.width=e.width-(t.x-a),e.x=t.x),o){const t=Math.min(1,s.width/e.width,s.height/e.height);return ht(s,t)}return e})(r,{...j,x:0,y:0},ve),!oe)return{boundsLimited:r,boundsIntent:r};let a=ty(U,r,o,Te,{aspectRatio:ve,minSize:i,maxSize:n});return{boundsLimited:a,boundsIntent:a}},Ko=(e,t)=>{const o={target:e,translate:t},i=Ne(Fe(ce),H),n=Ne(Fe(ke),H),r=((e,t,o={})=>{const{target:i,translate:n}=t,{aspectRatio:r,minSize:a}=o,s=se[Df[i]],l=we(Je(e),he(s[0]*e.width,s[1]*e.height)),c=se[i],d=we(Je(e),he(c[0]*e.width,c[1]*e.height)),[u,h,p,m,g,$,f]=Of(i);let y=n.x,b=n.y;g?b=0:$&&(y=0);let[x,v,w,S]=wt(e);if(u?S=l.x:h&&(v=l.x),m?x=l.y:p&&(w=l.y),u?v=d.x+y:h&&(S=d.x+y),m?w=d.y+b:p&&(x=d.y+b),a&&g&&w-x<a.height){const e=a.height-(w-x);x-=.5*e,w+=.5*e}if(a&&$&&v-S<a.width){const e=a.width-(v-S);S-=.5*e,v+=.5*e}if(r)if(f){let e=v-S,t=w-x;g?(t=e/r,x=l.y-.5*t,w=l.y+.5*t):$&&(e=t*r,S=l.x-.5*e,v=l.x+.5*e)}else{const e=he(d.x+y-l.x,d.y+b-l.y);i===ne?(e.x=Math.max(0,e.x),e.y=Math.min(0,e.y)):i===re?(e.x=Math.max(0,e.x),e.y=Math.max(0,e.y)):i===ae?(e.x=Math.min(0,e.x),e.y=Math.max(0,e.y)):i===ie&&(e.x=Math.min(0,e.x),e.y=Math.min(0,e.y));const t=fe(e),o=he(r,1),n=Ce(ye(o),t);i===ne?(v=l.x+n.x,x=l.y-n.y):i===re?(v=l.x+n.x,w=l.y+n.y):i===ae?(S=l.x-n.x,w=l.y+n.y):i===ie&&(S=l.x-n.x,x=l.y-n.y)}return at(S,x,v-S,w-x)})(U,o,{aspectRatio:ve,minSize:i});return{boundsLimited:Bf(U,o,{...j,x:0,y:0},{aspectRatio:ve,minSize:i,maxSize:n}),boundsIntent:r}};let Jo,Qo;const ei=({translation:e,scalar:t})=>{V&&(t=1,e=ge(me(e)));const o=Math.min(X.width/_.width,X.height/_.height),i=Ce(me(e),1/o);let n;if(Qo){const t=Se(me(Qo),e);Qo=e,n=lt(Je(_),t)}else n=lt(Je(Jo),ge(me(i))),void 0!==t&&ct(n,1/t);mr(Fo,pe=n,pe),mr(Bo,_=n,_)},ti=Na([_o,Bo],(([e,t],o)=>{if(!t)return;const[i,n]=e,r=mt(t);o([Oe(kt(xt(i,r),le)),Oe(kt(vt(n,r),le))])}));ar(e,ti,(e=>o(174,Q=e)));const oi=Na([jo,Ho,Wo,Vo,_o,Ro],(([e,t,o,i,n,r],a)=>{if(!e)return;const s=n[0],l=n[1];let c,d;t?(c=((e,t,o)=>K(o)?1-1/Math.min(e.height/t.width,e.width/t.height):1-1/Math.min(e.width/t.width,e.height/t.height))(e,l,r),d=Math.min(s.width/o.width,s.height/o.height)):(c=-1,d=1),a([c,d].map((e=>le(e))))}));ar(e,oi,(e=>o(27,_e=e)));const ii=Na([jo,Bo,_o,Ro],(([e,t,o,i],n)=>{if(!e||!t)return n(0);let r;const a=o[0],s=o[1],l=t.width,c=t.height,d=mt(t),u=K(i)?Ve(e.height,e.width):e,h=vt(u,d);if(l<=h.width||c<=h.height){const e=h.width-a.width,t=h.height-a.height;r=0===e||0===t?1:1-Math.min((l-a.width)/e,(c-a.height)/t)}else{const e=s.width-h.width,t=s.height-h.height,o=vt({width:e,height:t},d);r=-Math.min((l-h.width)/o.width,(c-h.height)/o.height)}n(r)}));ar(e,ii,(e=>o(28,Ze=e)));const ni=e=>{const t=mt(Jo);let o,i,n;const r=K(te)?Ve(ee.height,ee.width):ee,a=vt(r,t);if(e>=0){const r=a.width-$e[0].width,s=a.height-$e[0].height;o=a.width-r*e,i=a.height-s*e,n=xt({width:o,height:i},t)}else{const r=$e[1].width-a.width,s=$e[1].height-a.height;o=a.width+r*-e,i=a.height+s*-e,n=vt({width:o,height:i},t)}o=n.width,i=n.height;const s=Jo.x+.5*Jo.width-.5*o,l=Jo.y+.5*Jo.height-.5*i;mr(Bo,_={x:s,y:l,width:o,height:i},_)};let ri;const ai=e=>{const t=ct(Je(ri),1/e);mr(Fo,pe=t,pe),mr(Bo,_=t,_)};let si;const li=()=>{Xo.set({})};let ci;const di=dc(0,{precision:1e-4});ar(e,di,(e=>o(29,Xe=e)));const ui=dc();ar(e,ui,(e=>o(30,Ye=e)));const hi=Na([No,Eo,Qt],(([e,t,o],n)=>{if(!i)return;const r=xu(o),a=[...r].map((e=>e[0])).sort(((e,t)=>Do(e[0])&&!Do(t[0])?1:-1)).find((o=>{if(Do(o)&&t){const[i,n]=o,r=t.width===i&&t.height===n,a=e===G(i,n);return r&&a}return o===e}));if(!a)return n(void 0);n(r.map((e=>e[0])).findIndex((e=>Do(e)?hs(e,a):e===a)))}));ar(e,hi,(e=>o(155,Ee=e)));const pi=(e,t)=>{if(!i||-1===e||void 0===e)return;const o=xu(t)[e][0];return o?Do(o)?G(o[0],o[1]):o:void 0},mi=Na([fo,zo,uo],(([e,t,o],i)=>{const{rows:n,cols:r,opacity:a}=it(Jt,o);if(!t||a<=0)return i([]);const{x:s,y:l,width:c,height:d}=t,u=c/r,h=d/n,p=[];for(let t=1;t<=n-1;t++){const o=l+h*t;p.push({id:"image-selection-guide-row-"+t,points:[he(s,o),he(s+c,o)],opacity:a,strokeWidth:1,strokeColor:e})}for(let t=1;t<=r-1;t++){const o=s+u*t;p.push({id:"image-selection-guide-col-"+t,points:[he(o,l),he(o,l+d)],opacity:a,strokeWidth:1,strokeColor:e})}i(p)}));ar(e,mi,(e=>o(141,F=e)));const gi="crop-"+I();let $i,bi,fi=gi+"-"+(gt?Vt:"zoom"),yi=fi;const xi=dc(L?20:0);return ar(e,xi,(e=>o(138,E=e))),e.$$set=e=>{"isActive"in e&&Ke(o(0,Qe=e.isActive)),"stores"in e&&o(97,tt=e.stores),"cropImageSelectionCornerStyle"in e&&o(1,ot=e.cropImageSelectionCornerStyle),"cropWillRenderImageSelectionGuides"in e&&o(98,it=e.cropWillRenderImageSelectionGuides),"cropAutoCenterImageSelectionTimeout"in e&&o(99,nt=e.cropAutoCenterImageSelectionTimeout),"cropEnableZoomMatchImageAspectRatio"in e&&o(100,dt=e.cropEnableZoomMatchImageAspectRatio),"cropEnableRotateMatchImageAspectRatio"in e&&o(101,ut=e.cropEnableRotateMatchImageAspectRatio),"cropEnableRotationInput"in e&&o(102,gt=e.cropEnableRotationInput),"cropEnableZoom"in e&&o(2,$t=e.cropEnableZoom),"cropEnableZoomInput"in e&&o(103,ft=e.cropEnableZoomInput),"cropEnableZoomAutoHide"in e&&o(104,St=e.cropEnableZoomAutoHide),"cropEnableImageSelection"in e&&o(105,Ct=e.cropEnableImageSelection),"cropEnableInfoIndicator"in e&&o(106,Tt=e.cropEnableInfoIndicator),"cropEnableZoomTowardsWheelPosition"in e&&o(107,Mt=e.cropEnableZoomTowardsWheelPosition),"cropEnableLimitWheelInputToCropSelection"in e&&o(108,Rt=e.cropEnableLimitWheelInputToCropSelection),"cropEnableCenterImageSelection"in e&&o(109,Pt=e.cropEnableCenterImageSelection),"cropEnableButtonRotateLeft"in e&&o(110,Et=e.cropEnableButtonRotateLeft),"cropEnableButtonRotateRight"in e&&o(111,It=e.cropEnableButtonRotateRight),"cropEnableButtonFlipHorizontal"in e&&o(112,At=e.cropEnableButtonFlipHorizontal),"cropEnableButtonFlipVertical"in e&&o(113,Lt=e.cropEnableButtonFlipVertical),"cropSelectPresetOptions"in e&&o(114,zt=e.cropSelectPresetOptions),"cropEnableSelectPreset"in e&&o(115,Ft=e.cropEnableSelectPreset),"cropEnableFilterMatchAspectRatio"in e&&o(116,Dt=e.cropEnableFilterMatchAspectRatio),"cropSelectPresetFilter"in e&&o(95,Ot=e.cropSelectPresetFilter),"cropEnableButtonToggleCropLimit"in e&&o(117,Bt=e.cropEnableButtonToggleCropLimit),"cropWillRenderTools"in e&&o(118,Wt=e.cropWillRenderTools),"cropActiveTransformTool"in e&&o(119,Vt=e.cropActiveTransformTool),"cropMinimizeToolbar"in e&&o(120,_t=e.cropMinimizeToolbar),"cropInteractionFocus"in e&&o(121,Nt=e.cropInteractionFocus),"cropRotationRange"in e&&o(3,Ht=e.cropRotationRange),"cropMaskOpacity"in e&&o(122,jt=e.cropMaskOpacity),"locale"in e&&o(4,Ut=e.locale)},e.$$.update=()=>{4096&e.$$.dirty[0]|268435456&e.$$.dirty[3]&&Yt.set("selection"===Nt&&A),2097152&e.$$.dirty[3]&&o(129,i=zt&&Array.isArray(zt)&&zt.length),2097152&e.$$.dirty[3]|32&e.$$.dirty[4]&&Qt.set(i?zt:[]),4096&e.$$.dirty[0]|32768&e.$$.dirty[4]&&A&&Co.set(1,{hard:!L}),4096&e.$$.dirty[0]&&yo.set(!A),4096&e.$$.dirty[0]&&bo.set(!A),4096&e.$$.dirty[0]&&A&&xo.set(!0),65536&e.$$.dirty[4]&&o(124,p="overlay"===z.layoutMode),4194304&e.$$.dirty[3]|1&e.$$.dirty[4]&&o(128,v=Ft&&!p),83886080&e.$$.dirty[4]&&o(137,l=j&&X&&yt(j,X)),67117056&e.$$.dirty[4]&&o(135,c=!(!X||!l)),67119104&e.$$.dirty[4]&&o(133,d=c&&pt(X,l,(e=>le(e,5)))),16400&e.$$.dirty[0]|52297732&e.$$.dirty[3]|1879114288&e.$$.dirty[4]|31&e.$$.dirty[5]&&o(11,n=ze&&Wt([Et&&["Button","rotate-left",{label:Ut.cropLabelButtonRotateLeft,labelClass:"PinturaToolbarContentWide",icon:Ut.cropIconButtonRotateLeft,onclick:()=>{ao(-Math.PI/2),so.write()}}],It&&["Button","rotate-right",{label:Ut.cropLabelButtonRotateRight,labelClass:"PinturaToolbarContentWide",icon:Ut.cropIconButtonRotateRight,onclick:()=>{ao(Math.PI/2),so.write()}}],At&&["Button","flip-horizontal",{label:Ut.cropLabelButtonFlipHorizontal,labelClass:"PinturaToolbarContentWide",icon:Ut.cropIconButtonFlipHorizontal,onclick:()=>{K(te)?mr(Mo,Ae=!Ae,Ae):mr(To,Le=!Le,Le),so.write()}}],Lt&&["Button","flip-vertical",{label:Ut.cropLabelButtonFlipVertical,labelClass:"PinturaToolbarContentWide",icon:Ut.cropIconButtonFlipVertical,onclick:()=>{K(te)?mr(To,Le=!Le,Le):mr(Mo,Ae=!Ae,Ae),so.write()}}],v&&i&&[!1===Ot?"Dropdown":Kf,"select-preset",{icon:wu(Ut.cropIconSelectPreset,Ut,pi(Ee,Ie)),label:wu(Ut.cropLabelSelectPreset,Ut,pi(Ee,Ie)),labelClass:"PinturaToolbarContentWide",options:Ie,filter:Ot,onfilterchange:oo,selectedIndex:Ee,onchange:({value:e})=>{Do(e)?(mr(No,ve=G(e[0],e[1]),ve),mr(Eo,Pe=Be(e),Pe)):mr(No,ve=e,ve),d&&li(),so.write()},optionMapper:e=>{let t=!1;const o=Do(e.value)?e.value[0]/e.value[1]:e.value;if(o){const e=ns(ee,te,o);t=e.width<ce.width||e.height<ce.height}return e.icon=((e,t={})=>{const{width:o=24,height:i=24,bounds:n=16,radius:r=3}=t;let a,s,l,c,d=Do(e)?G(e[0],e[1]):e,u=!!d;return d=u?d:1,l=d>1?n:d*n,c=l/d,a=Math.round(.5*(o-l)),s=Math.round(.5*(i-c)),`<rect fill="${u?"currentColor":"none"}" stroke="${u?"none":"currentColor"}" stroke-width="${o/16}" stroke-dasharray="${[o/12,o/6].join(" ")}" x="${a}" y="${s}" width="${l}" height="${c}" rx="${r}"/>`})(e.value,{bounds:14}),{...e,disabled:t}}}],Bt&&["Dropdown","select-crop-limit",{icon:wu(Ut.cropIconCropBoundary,Ut,oe),label:Ut.cropLabelCropBoundary,labelClass:"PinturaToolbarContentWide",onchange:({value:e})=>{mr(Ho,oe=e,oe),so.write()},options:[[!0,Ut.cropLabelCropBoundaryEdge,{icon:wu(Ut.cropIconCropBoundary,Ut,!0)}],[!1,Ut.cropLabelCropBoundaryNone,{icon:wu(Ut.cropIconCropBoundary,Ut,!1)}]]}]].filter(Boolean),z,(()=>Xt.set({}))).filter(Boolean)),6144&e.$$.dirty[0]|134217728&e.$$.dirty[3]|65537&e.$$.dirty[4]&&mr(So,Re=A&&"never"!==_t&&("always"===_t||"short"===z.verticalSpace||p)?n.map((([e,t,o])=>Array.isArray(o)?[e,t,o]:[e,t,{...o,hideLabel:!0}])):[],Re),536870912&e.$$.dirty[4]&&o(23,r=oe?0:-1),150994944&e.$$.dirty[4]&&o(130,a=j&&he(-(Y.x-j.x),-(Y.y-j.y))),524352&e.$$.dirty[4]&&o(131,s=B&&a&&he(tu(B.x+.5*B.width+a.x),tu(B.y+.5*B.height+a.y))),33554432&e.$$.dirty[4]&&o(134,u=null!=U),16785408&e.$$.dirty[4]&&o(136,h=j&&l&&(l.height===j.height||l.width===j.width)),12587008&e.$$.dirty[4]&&o(132,m=!h&&H<1&&N<1),3840&e.$$.dirty[4]&&o(9,g=c&&!u&&(!d||m)),8192&e.$$.dirty[0]|8192&e.$$.dirty[3]|1&e.$$.dirty[4]&&o(22,$=Tt&&!!_&&!p),524352&e.$$.dirty[4]&&o(8,b=B&&a&&{x:B.x+a.x,y:B.y+a.y,width:B.width,height:B.height}),256&e.$$.dirty[0]|4096&e.$$.dirty[3]|1&e.$$.dirty[4]&&o(21,f=Ct&&!!b&&!p),65600&e.$$.dirty[3]|2097280&e.$$.dirty[4]&&o(10,y=Pt&&!!s&&!nt&&!V),512&e.$$.dirty[0]|1073741888&e.$$.dirty[3]|1048576&e.$$.dirty[4]&&g&&nt&&!W&&(clearTimeout(ci),o(123,ci=setTimeout(li,nt))),1073741824&e.$$.dirty[3]|1048576&e.$$.dirty[4]&&W&&clearTimeout(ci),1536&e.$$.dirty[0]|32768&e.$$.dirty[4]&&di.set(y&&g?1:0,{hard:!1===L}),32896&e.$$.dirty[4]&&ui.set(s,{hard:!1===L}),4096&e.$$.dirty[0]|262144&e.$$.dirty[4]&&(A&&!D?(mr(ko,O.crop={maskOpacity:jt,maskMarkupOpacity:jt},O),ko.set(O)):(delete O.crop,ko.set(O))),131072&e.$$.dirty[4]&&F&&Go.update((e=>{const t=e.filter((e=>!/^image\-selection\-guide/.test(e.id)));return A?[...t,...F]:t})),65536&e.$$.dirty[4]&&o(127,x="short"!==z.verticalSpace),134217728&e.$$.dirty[3]|9&e.$$.dirty[4]&&o(20,w="never"===_t&&!p||x&&"always"!==_t),4&e.$$.dirty[0]|1024&e.$$.dirty[3]&&o(126,S=$t&&ft),2048&e.$$.dirty[3]|12&e.$$.dirty[4]&&o(125,k=St?x&&S:S),512&e.$$.dirty[3]|2&e.$$.dirty[4]&&o(19,C=gt||k),2&e.$$.dirty[4]&&(k||o(5,yi=fi)),32&e.$$.dirty[0]&&o(18,T={name:gi,selected:yi}),16&e.$$.dirty[0]|512&e.$$.dirty[3]|2&e.$$.dirty[4]&&o(7,M=[gt&&{id:gi+"-rotation",label:Ut.cropLabelTabRotation},k&&{id:gi+"-zoom",label:Ut.cropLabelTabZoom}].filter(Boolean)),128&e.$$.dirty[0]&&o(17,R=M.map((e=>e.id))),64&e.$$.dirty[0]|1&e.$$.dirty[4]&&$i&&!$i.children.length&&p&&$i.dispatchEvent(new CustomEvent("measure",{detail:$i.rect})),4096&e.$$.dirty[0]|32768&e.$$.dirty[4]&&L&&xi.set(A?0:20),16384&e.$$.dirty[4]&&o(16,P=E?`transform: translateY(${E}px)`:void 0)},[Qe,ot,$t,Ht,Ut,yi,$i,M,b,g,y,n,A,_,te,bi,P,R,T,C,w,f,$,r,ue,De,We,_e,Ze,Xe,Ye,Gt,Zt,Xt,Yt,qt,Kt,Qt,lo,co,ho,po,mo,$o,vo,wo,So,ko,To,Mo,Ro,Po,Eo,Io,Ao,Lo,zo,Fo,Oo,Bo,Wo,Vo,_o,No,Ho,jo,Uo,Zo,()=>{Jt="select",mr(co,W=!0,W),mr(Ao,U=Je(X),U),Yo=V?qo:Ko},({detail:e})=>{const{boundsLimited:t,boundsIntent:o}=Yo(e.direction,e.translation);mr(ho,J=!0,J),mr(Lo,Me=o,Me),mr(Io,X=t,X)},({detail:e})=>{const{boundsLimited:t}=Yo(e.direction,e.translation);mr(ho,J=!1,J),mr(co,W=!1,W),mr(Lo,Me=void 0,Me),fe(e.translation)&&(mr(Io,X=t,X),so.write()),mr(Ao,U=void 0,U),Jt=void 0},()=>{Jt="rotate",mr(co,W=!0,W),mr(Oo,be=Je(_),be)},e=>{mr(ho,J=!0,J),mr(Ro,te=e,te)},e=>{mr(ho,J=!1,J),mr(co,W=!1,W),mr(Ro,te=e,te),so.write(),mr(Oo,be=void 0,be)},()=>{Jt="pan",Qo=void 0,mr(co,W=!0,W),Jo=Je(_)},({detail:e})=>{mr(ho,J=!0,J),ei(e)},({detail:e})=>{mr(ho,J=!1,J),mr(co,W=!1,W),(fe(e.translation)>0||0!==e.scalar)&&(ei(e),so.write()),mr(Fo,pe=void 0,pe),Jo=void 0},({detail:{translation:e}})=>{V&&(e=ge(me(e))),Qo=e,mr(co,W=!1,W)},ti,oi,ii,()=>{Jt="zoom",mr(co,W=!0,W),Jo=Je(_)},e=>{mr(ho,J=!1,J),ni(e)},e=>{ni(e),so.write(),mr(ho,J=!1,J),mr(co,W=!1,W),Jo=void 0},()=>{Jt="zoom",Jo||(ri=Je(_),mr(co,W=!0,W))},({detail:e})=>{ri&&(mr(ho,J=!0,J),ai(e))},({detail:e})=>{ri&&(mr(ho,J=!1,J),mr(co,W=!1,W),ai(e),mr(Fo,pe=void 0,pe),ri=void 0,so.write())},e=>{const t=Qp(e,ue,Y);if(Rt&&!bt(X,t))return;Jt="zoom",mr(co,W=!0,W),mr(ho,J=!0,J),e.preventDefault(),e.stopPropagation();const o=Rd(e,{fixScrollDirection:de}),i=1+o/100,n=Je(_),r=1===Math.min(_.width/ce.width,_.height/ce.height);if(dt&&oe){const e=no(_,ee,te);if(eo()&&e&&o>0&&d){mr(co,W=!1,W),mr(ho,J=!1,J);const e=K(te)?et({height:ee.width,width:ee.height}):et(ee);if(pt(n,e))return;if(clearTimeout(si),pt(so.state.crop,e))return;return mr(Bo,_=e,_),void so.write()}}let a=st(_);if(Mt&&"selection"!==Nt&&o<0&&!r){const e=Se(me(t),X),o=Math.min(X.width/_.width,X.height/_.height),i=ct(Je(X),1.1);a=bt(i,t)?we(Je(_),Ce(e,1/o)):a}let s=ct(Je(_),i,a);if(Ue(Q[1],s)||(s=rt(st(s),Q[1])),Ue(s,Q[0])||(s=rt(st(s),Q[0])),pt(n,s,le))return mr(co,W=!1,W),void mr(ho,J=!1,J);mr(Bo,_=kt(s,(e=>le(e,5))),_),mr(co,W=!1,W),mr(ho,J=!1,J),clearTimeout(si),si=setTimeout((()=>{so.write()}),500)},li,di,ui,hi,mi,gi,xi,Ot,"crop",tt,it,nt,dt,ut,gt,ft,St,Ct,Tt,Mt,Rt,Pt,Et,It,At,Lt,zt,Ft,Dt,Bt,Wt,Vt,_t,Nt,jt,ci,p,k,S,x,v,i,a,s,m,d,u,c,h,l,E,L,z,F,D,B,W,V,N,H,j,U,X,Y,ee,oe,ce,Ee,Ie,Ae,Le,ze,function(t){oa.call(this,e,t)},({detail:e})=>o(5,yi=e),function(e){na[e?"unshift":"push"]((()=>{$i=e,o(6,$i)}))},e=>Jp(e),function(e){bi=e,o(15,bi)},function(t){oa.call(this,e,t)}]}var by={util:["crop",class extends Ba{constructor(e){super(),Oa(this,e,yy,my,ir,{name:96,isActive:0,stores:97,cropImageSelectionCornerStyle:1,cropWillRenderImageSelectionGuides:98,cropAutoCenterImageSelectionTimeout:99,cropEnableZoomMatchImageAspectRatio:100,cropEnableRotateMatchImageAspectRatio:101,cropEnableRotationInput:102,cropEnableZoom:2,cropEnableZoomInput:103,cropEnableZoomAutoHide:104,cropEnableImageSelection:105,cropEnableInfoIndicator:106,cropEnableZoomTowardsWheelPosition:107,cropEnableLimitWheelInputToCropSelection:108,cropEnableCenterImageSelection:109,cropEnableButtonRotateLeft:110,cropEnableButtonRotateRight:111,cropEnableButtonFlipHorizontal:112,cropEnableButtonFlipVertical:113,cropSelectPresetOptions:114,cropEnableSelectPreset:115,cropEnableFilterMatchAspectRatio:116,cropSelectPresetFilter:95,cropEnableButtonToggleCropLimit:117,cropWillRenderTools:118,cropActiveTransformTool:119,cropMinimizeToolbar:120,cropInteractionFocus:121,cropRotationRange:3,cropMaskOpacity:122,locale:4},null,[-1,-1,-1,-1,-1,-1,-1,-1])}get name(){return this.$$.ctx[96]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),$a()}get stores(){return this.$$.ctx[97]}set stores(e){this.$$set({stores:e}),$a()}get cropImageSelectionCornerStyle(){return this.$$.ctx[1]}set cropImageSelectionCornerStyle(e){this.$$set({cropImageSelectionCornerStyle:e}),$a()}get cropWillRenderImageSelectionGuides(){return this.$$.ctx[98]}set cropWillRenderImageSelectionGuides(e){this.$$set({cropWillRenderImageSelectionGuides:e}),$a()}get cropAutoCenterImageSelectionTimeout(){return this.$$.ctx[99]}set cropAutoCenterImageSelectionTimeout(e){this.$$set({cropAutoCenterImageSelectionTimeout:e}),$a()}get cropEnableZoomMatchImageAspectRatio(){return this.$$.ctx[100]}set cropEnableZoomMatchImageAspectRatio(e){this.$$set({cropEnableZoomMatchImageAspectRatio:e}),$a()}get cropEnableRotateMatchImageAspectRatio(){return this.$$.ctx[101]}set cropEnableRotateMatchImageAspectRatio(e){this.$$set({cropEnableRotateMatchImageAspectRatio:e}),$a()}get cropEnableRotationInput(){return this.$$.ctx[102]}set cropEnableRotationInput(e){this.$$set({cropEnableRotationInput:e}),$a()}get cropEnableZoom(){return this.$$.ctx[2]}set cropEnableZoom(e){this.$$set({cropEnableZoom:e}),$a()}get cropEnableZoomInput(){return this.$$.ctx[103]}set cropEnableZoomInput(e){this.$$set({cropEnableZoomInput:e}),$a()}get cropEnableZoomAutoHide(){return this.$$.ctx[104]}set cropEnableZoomAutoHide(e){this.$$set({cropEnableZoomAutoHide:e}),$a()}get cropEnableImageSelection(){return this.$$.ctx[105]}set cropEnableImageSelection(e){this.$$set({cropEnableImageSelection:e}),$a()}get cropEnableInfoIndicator(){return this.$$.ctx[106]}set cropEnableInfoIndicator(e){this.$$set({cropEnableInfoIndicator:e}),$a()}get cropEnableZoomTowardsWheelPosition(){return this.$$.ctx[107]}set cropEnableZoomTowardsWheelPosition(e){this.$$set({cropEnableZoomTowardsWheelPosition:e}),$a()}get cropEnableLimitWheelInputToCropSelection(){return this.$$.ctx[108]}set cropEnableLimitWheelInputToCropSelection(e){this.$$set({cropEnableLimitWheelInputToCropSelection:e}),$a()}get cropEnableCenterImageSelection(){return this.$$.ctx[109]}set cropEnableCenterImageSelection(e){this.$$set({cropEnableCenterImageSelection:e}),$a()}get cropEnableButtonRotateLeft(){return this.$$.ctx[110]}set cropEnableButtonRotateLeft(e){this.$$set({cropEnableButtonRotateLeft:e}),$a()}get cropEnableButtonRotateRight(){return this.$$.ctx[111]}set cropEnableButtonRotateRight(e){this.$$set({cropEnableButtonRotateRight:e}),$a()}get cropEnableButtonFlipHorizontal(){return this.$$.ctx[112]}set cropEnableButtonFlipHorizontal(e){this.$$set({cropEnableButtonFlipHorizontal:e}),$a()}get cropEnableButtonFlipVertical(){return this.$$.ctx[113]}set cropEnableButtonFlipVertical(e){this.$$set({cropEnableButtonFlipVertical:e}),$a()}get cropSelectPresetOptions(){return this.$$.ctx[114]}set cropSelectPresetOptions(e){this.$$set({cropSelectPresetOptions:e}),$a()}get cropEnableSelectPreset(){return this.$$.ctx[115]}set cropEnableSelectPreset(e){this.$$set({cropEnableSelectPreset:e}),$a()}get cropEnableFilterMatchAspectRatio(){return this.$$.ctx[116]}set cropEnableFilterMatchAspectRatio(e){this.$$set({cropEnableFilterMatchAspectRatio:e}),$a()}get cropSelectPresetFilter(){return this.$$.ctx[95]}set cropSelectPresetFilter(e){this.$$set({cropSelectPresetFilter:e}),$a()}get cropEnableButtonToggleCropLimit(){return this.$$.ctx[117]}set cropEnableButtonToggleCropLimit(e){this.$$set({cropEnableButtonToggleCropLimit:e}),$a()}get cropWillRenderTools(){return this.$$.ctx[118]}set cropWillRenderTools(e){this.$$set({cropWillRenderTools:e}),$a()}get cropActiveTransformTool(){return this.$$.ctx[119]}set cropActiveTransformTool(e){this.$$set({cropActiveTransformTool:e}),$a()}get cropMinimizeToolbar(){return this.$$.ctx[120]}set cropMinimizeToolbar(e){this.$$set({cropMinimizeToolbar:e}),$a()}get cropInteractionFocus(){return this.$$.ctx[121]}set cropInteractionFocus(e){this.$$set({cropInteractionFocus:e}),$a()}get cropRotationRange(){return this.$$.ctx[3]}set cropRotationRange(e){this.$$set({cropRotationRange:e}),$a()}get cropMaskOpacity(){return this.$$.ctx[122]}set cropMaskOpacity(e){this.$$set({cropMaskOpacity:e}),$a()}get locale(){return this.$$.ctx[4]}set locale(e){this.$$set({locale:e}),$a()}}]};function xy(e){let t,o,i,n,r,a,s,l=e[77],c=(M(e[77].label)?e[77].label(e[2]):e[77].label)+"";function d(...t){return e[51](e[77],...t)}const u=()=>e[52](o,l),h=()=>e[52](null,l);return{c(){t=Mr("div"),o=Mr("div"),i=Er(),n=Mr("span"),r=Pr(c),Fr(o,"class",ky),Fr(t,"slot","option"),Fr(t,"class","PinturaFilterOption")},m(e,l){Cr(e,t,l),wr(t,o),u(),wr(t,i),wr(t,n),wr(n,r),a||(s=[Ar(o,"measure",d),gr(Tc.call(null,o))],a=!0)},p(t,o){l!==(e=t)[77]&&(h(),l=e[77],u()),4&o[0]|32768&o[2]&&c!==(c=(M(e[77].label)?e[77].label(e[2]):e[77].label)+"")&&Br(r,c)},d(e){e&&Tr(t),h(),a=!1,tr(s)}}}function vy(e){let t,o;return t=new qu({props:{locale:e[2],layout:"row",options:e[3],selectedIndex:e[12],onchange:e[32],$$slots:{option:[xy,({option:e})=>({77:e}),({option:e})=>[0,0,e?32768:0]]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};4&o[0]&&(i.locale=e[2]),8&o[0]&&(i.options=e[3]),4096&o[0]&&(i.selectedIndex=e[12]),1028&o[0]|98304&o[2]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function wy(e){let t,o,i,n,r,a,s,l;function c(t){e[54](t)}function d(t){e[55](t)}function u(t){e[56](t)}let h={elasticity:e[13]*e[19],onscroll:e[53],$$slots:{default:[vy]},$$scope:{ctx:e}};return void 0!==e[4]&&(h.maskFeatherStartOpacity=e[4]),void 0!==e[5]&&(h.maskFeatherEndOpacity=e[5]),void 0!==e[6]&&(h.maskFeatherSize=e[6]),o=new Id({props:h}),na.push((()=>La(o,"maskFeatherStartOpacity",c))),na.push((()=>La(o,"maskFeatherEndOpacity",d))),na.push((()=>La(o,"maskFeatherSize",u))),o.$on("measure",e[57]),{c(){t=Mr("div"),za(o.$$.fragment),Fr(t,"slot","footer"),Fr(t,"style",e[11])},m(i,n){Cr(i,t,n),Fa(o,t,null),a=!0,s||(l=[Ar(t,"transitionend",e[30]),Ar(t,"measure",e[58]),gr(Tc.call(null,t,{observePosition:!0}))],s=!0)},p(e,s){const l={};8192&s[0]&&(l.elasticity=e[13]*e[19]),128&s[0]&&(l.onscroll=e[53]),5132&s[0]|65536&s[2]&&(l.$$scope={dirty:s,ctx:e}),!i&&16&s[0]&&(i=!0,l.maskFeatherStartOpacity=e[4],ha((()=>i=!1))),!n&&32&s[0]&&(n=!0,l.maskFeatherEndOpacity=e[5],ha((()=>n=!1))),!r&&64&s[0]&&(r=!0,l.maskFeatherSize=e[6],ha((()=>r=!1))),o.$set(l),(!a||2048&s[0])&&Fr(t,"style",e[11])},i(e){a||(Sa(o.$$.fragment,e),a=!0)},o(e){ka(o.$$.fragment,e),a=!1},d(e){e&&Tr(t),Da(o),s=!1,tr(l)}}}function Sy(e){let t,o;return t=new kf({props:{$$slots:{footer:[wy]},$$scope:{ctx:e}}}),t.$on("measure",e[59]),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};16380&o[0]|65536&o[2]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}let ky="PinturaFilterPreview";function Cy(e,t,o){let i,n,r,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S=qn,k=()=>(S(),S=nr(P,(e=>o(43,d=e))),P),C=qn,T=()=>(C(),C=nr(R,(e=>o(49,b=e))),R);e.$$.on_destroy.push((()=>S())),e.$$.on_destroy.push((()=>C()));let{isActive:R}=t;T();let{isActiveFraction:P}=t;k();let{stores:E}=t,{locale:I}=t,{filterFunctions:A}=t,{filterOptions:L}=t;const z=ta("elasticityMultiplier");ar(e,z,(e=>o(13,w=e)));const{history:F,interfaceImages:D,stageRectBase:O,utilRect:B,animation:W,scrollElasticity:V,imageSize:_,imagePreview:N,imageCropRect:H,imageRotation:j,imageFlipX:U,imageFlipY:G,imageBackgroundColor:Z,imageGamma:X,imageColorMatrix:Y,allowPan:q,allowZoom:K,allowZoomControls:J,allowPlayPause:Q}=E;ar(e,D,(e=>o(60,u=e))),ar(e,O,(e=>o(48,y=e))),ar(e,B,(e=>o(47,f=e))),ar(e,W,(e=>o(50,x=e))),ar(e,_,(e=>o(62,p=e))),ar(e,N,(e=>o(42,c=e))),ar(e,Z,(e=>o(61,h=e))),ar(e,X,(e=>o(44,m=e))),ar(e,Y,(e=>o(40,s=e)));const ee=_a({});ar(e,ee,(e=>o(46,$=e)));const te=(e,t)=>mr(ee,$[e.value]=t,$),oe=Na(ee,(e=>{if(!e[void 0])return;const t=e[void 0];return v&&_e(v,t)?v:Fe(t)}));ar(e,oe,(e=>o(63,v=e)));const ie=Na([R,oe,H,_,j,U,G],(([e,t,o,i,n,r,a],s)=>{if(!e||!t||!i)return g;const l=et(i),c=st(l),d=as(i,o,n),u=st(d),h=Se(me(c),u),p=ge(me(h)),m=Math.max(t.width/o.width,t.height/o.height);s({origin:p,translation:h,rotation:{x:a?Math.PI:0,y:r?Math.PI:0,z:n},scale:m})}));ar(e,ie,(e=>o(45,g=e)));const ne=dc(x?20:0);let re;ar(e,ne,(e=>o(39,a=e)));const ae={};let se,le,ce,de,ue,pe,$e={x:0,y:0};const fe=_a([]);ar(e,fe,(e=>o(41,l=e)));const ye=e=>{const t={...e,data:c,size:p,offset:{...e.offset},mask:{...e.mask},backgroundColor:h};return t.opacity=d,t.offset.y+=a,t.mask.y+=a,t.id="filter",t},be=()=>u.filter((e=>"filter"!==e.id));return Jr((()=>{D.set([])})),e.$$set=e=>{"isActive"in e&&T(o(0,R=e.isActive)),"isActiveFraction"in e&&k(o(1,P=e.isActiveFraction)),"stores"in e&&o(34,E=e.stores),"locale"in e&&o(2,I=e.locale),"filterFunctions"in e&&o(35,A=e.filterFunctions),"filterOptions"in e&&o(3,L=e.filterOptions)},e.$$.update=()=>{if(262144&e.$$.dirty[1]&&q.set(b),262144&e.$$.dirty[1]&&K.set(b),262144&e.$$.dirty[1]&&J.set(b),262144&e.$$.dirty[1]&&b&&Q.set(!1),8&e.$$.dirty[0]&&o(38,i=xu(L)),640&e.$$.dirty[1]&&o(12,n=((e,t)=>{if(!e||!e.filter||!t)return 0;const o=e.filter;return t.findIndex((([e])=>{if(!A[e])return!1;const t=A[e]();return hs(t,o)}))})(s,i)),786432&e.$$.dirty[1]&&x&&ne.set(b?0:20),512&e.$$.dirty[0]|458752&e.$$.dirty[1]&&b&&f&&y&&pe&&o(37,ue={x:y.x-f.x,y:y.y-f.y+pe.y}),496&e.$$.dirty[0]|58096&e.$$.dirty[1]&&g&&ue&&$e&&de&&re){const e=ue.x+de.x+$e.x,t=ue.y,o=de.x+ue.x,n=o+de.width;fe.set(i.map((([i],r)=>{const a=$[i],l=$e.x+a.x,c=l+a.width;if(c<0||l>de.width)return!1;const d=e+a.x,u=t+a.y,h=(e=>({origin:me(e.origin),translation:me(e.translation),rotation:{...e.rotation},scale:e.scale}))(g);h.offset=he(.5*a.width+d,.5*a.height+u),h.maskOpacity=1,h.mask=at(d+0,u,a.width+0,a.height),h.maskFeather=[1,0,1,0,1,n,1,n],l<ce&&se<1&&(h.maskFeather[0]=se,h.maskFeather[1]=o,h.maskFeather[2]=1,h.maskFeather[3]=o+ce),c>de.width-ce&&le<1&&(h.maskFeather[4]=le,h.maskFeather[5]=n-ce,h.maskFeather[6]=1,h.maskFeather[7]=n),h.maskCornerRadius=re[i];let p=s&&Object.keys(s).filter((e=>"filter"!=e)).map((e=>s[e]))||[];return M(A[i])&&p.push(A[i]()),h.colorMatrix=p.length?Xn(p):void 0,h.gamma=m,h})).filter(Boolean))}if(7424&e.$$.dirty[1])if(d>0&&l){const e=[...be(),...l.map(ye)];D.set(e)}else D.set(be());256&e.$$.dirty[1]&&o(11,r=a?`transform: translateY(${a}px)`:void 0)},[R,P,I,L,se,le,ce,$e,de,pe,ae,r,n,w,z,D,O,B,W,V,_,N,Z,X,Y,ee,te,oe,ie,ne,e=>{e.target.className===ky&&o(36,re=Object.keys(ae).reduce(((e,t)=>{const o=ae[t],i=getComputedStyle(o),n=["top-left","top-right","bottom-left","bottom-right"].map((e=>i.getPropertyValue(`border-${e}-radius`))).map(Md).map((e=>1.25*e));return e[t]=n,e}),{}))},fe,({value:e})=>{mr(Y,s={...s,filter:M(A[e])?A[e]():void 0},s),F.write()},"filter",E,A,re,ue,i,a,s,l,c,d,m,g,$,f,y,b,x,(e,t)=>te(e,t.detail),function(e,t){na[e?"unshift":"push"]((()=>{ae[t.value]=e,o(10,ae)}))},e=>o(7,$e=e),function(e){se=e,o(4,se)},function(e){le=e,o(5,le)},function(e){ce=e,o(6,ce)},e=>o(8,de=e.detail),e=>o(9,pe=e.detail),function(t){oa.call(this,e,t)}]}var Ty={util:["filter",class extends Ba{constructor(e){super(),Oa(this,e,Cy,Sy,ir,{name:33,isActive:0,isActiveFraction:1,stores:34,locale:2,filterFunctions:35,filterOptions:3},null,[-1,-1,-1])}get name(){return this.$$.ctx[33]}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),$a()}get isActiveFraction(){return this.$$.ctx[1]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),$a()}get stores(){return this.$$.ctx[34]}set stores(e){this.$$set({stores:e}),$a()}get locale(){return this.$$.ctx[2]}set locale(e){this.$$set({locale:e}),$a()}get filterFunctions(){return this.$$.ctx[35]}set filterFunctions(e){this.$$set({filterFunctions:e}),$a()}get filterOptions(){return this.$$.ctx[3]}set filterOptions(e){this.$$set({filterOptions:e}),$a()}}]};function My(e){let t,o,i,n;t=new Id({props:{elasticity:e[6]*e[9],class:"PinturaControlListScroller",$$slots:{default:[Py]},$$scope:{ctx:e}}});const r=[{class:"PinturaControlPanels"},{panelClass:"PinturaControlPanel"},{panels:e[4]},e[5]];let a={$$slots:{default:[Ey,({panel:e})=>({42:e}),({panel:e})=>[0,e?2048:0]]},$$scope:{ctx:e}};for(let e=0;e<r.length;e+=1)a=Jn(a,r[e]);return i=new id({props:a}),{c(){za(t.$$.fragment),o=Er(),za(i.$$.fragment)},m(e,r){Fa(t,e,r),Cr(e,o,r),Fa(i,e,r),n=!0},p(e,o){const n={};64&o[0]&&(n.elasticity=e[6]*e[9]),38&o[0]|8192&o[1]&&(n.$$scope={dirty:o,ctx:e}),t.$set(n);const a=48&o[0]?Ia(r,[r[0],r[1],16&o[0]&&{panels:e[4]},32&o[0]&&Aa(e[5])]):{};128&o[0]|10240&o[1]&&(a.$$scope={dirty:o,ctx:e}),i.$set(a)},i(e){n||(Sa(t.$$.fragment,e),Sa(i.$$.fragment,e),n=!0)},o(e){ka(t.$$.fragment,e),ka(i.$$.fragment,e),n=!1},d(e){Da(t,e),e&&Tr(o),Da(i,e)}}}function Ry(e){let t,o,i=e[43].label+"";return{c(){t=Mr("span"),o=Pr(i)},m(e,i){Cr(e,t,i),wr(t,o)},p(e,t){4096&t[1]&&i!==(i=e[43].label+"")&&Br(o,i)},d(e){e&&Tr(t)}}}function Py(e){let t,o;const i=[{class:"PinturaControlList"},{tabs:e[1]},e[5]];let n={$$slots:{default:[Ry,({tab:e})=>({43:e}),({tab:e})=>[0,e?4096:0]]},$$scope:{ctx:e}};for(let e=0;e<i.length;e+=1)n=Jn(n,i[e]);return t=new Uc({props:n}),t.$on("select",e[24]),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const n=34&o[0]?Ia(i,[i[0],2&o[0]&&{tabs:e[1]},32&o[0]&&Aa(e[5])]):{};12288&o[1]&&(n.$$scope={dirty:o,ctx:e}),t.$set(n)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Ey(e){let t,o;const i=[e[7][e[42]]];let n={};for(let e=0;e<i.length;e+=1)n=Jn(n,i[e]);return t=new Rf({props:n}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const n=128&o[0]|2048&o[1]?Ia(i,[Aa(e[7][e[42]])]):{};t.$set(n)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Iy(e){let t,o,i=e[5]&&My(e);return{c(){t=Mr("div"),i&&i.c(),Fr(t,"slot","footer"),Fr(t,"style",e[3])},m(e,n){Cr(e,t,n),i&&i.m(t,null),o=!0},p(e,n){e[5]?i?(i.p(e,n),32&n[0]&&Sa(i,1)):(i=My(e),i.c(),Sa(i,1),i.m(t,null)):i&&(va(),ka(i,1,1,(()=>{i=null})),wa()),(!o||8&n[0])&&Fr(t,"style",e[3])},i(e){o||(Sa(i),o=!0)},o(e){ka(i),o=!1},d(e){e&&Tr(t),i&&i.d()}}}function Ay(e){let t,o;return t=new kf({props:{$$slots:{footer:[Iy]},$$scope:{ctx:e}}}),t.$on("measure",e[25]),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};254&o[0]|8192&o[1]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Ly(e,t,o){let i,n,r,a,s,l,c,d,u,h,p,m=qn,g=()=>(m(),m=nr(f,(e=>o(21,c=e))),f);e.$$.on_destroy.push((()=>m()));let{stores:$}=t,{isActive:f}=t;g();let{locale:y={}}=t,{finetuneControlConfiguration:b}=t,{finetuneOptions:x}=t,{finetuneNudgePrecision:v}=t;const{history:w,animation:S,scrollElasticity:k,rangeInputElasticity:C,imageColorMatrix:T,imageConvolutionMatrix:R,imageGamma:P,imageVignette:E,imageNoise:A,allowPan:L,allowZoom:z,allowZoomControls:F,allowPlayPause:D}=$;ar(e,S,(e=>o(22,d=e)));const O={imageColorMatrix:T,imageConvolutionMatrix:R,imageGamma:P,imageVignette:E,imageNoise:A},B=ta("elasticityMultiplier");ar(e,B,(e=>o(6,h=e)));const W="finetune-"+I(),V=_a({});ar(e,V,(e=>o(23,u=e)));const _=_a({});ar(e,_,(e=>o(7,p=e)));let N=[];const H=dc(d?20:0);return ar(e,H,(e=>o(20,l=e))),e.$$set=e=>{"stores"in e&&o(15,$=e.stores),"isActive"in e&&g(o(0,f=e.isActive)),"locale"in e&&o(16,y=e.locale),"finetuneControlConfiguration"in e&&o(17,b=e.finetuneControlConfiguration),"finetuneOptions"in e&&o(18,x=e.finetuneOptions),"finetuneNudgePrecision"in e&&o(19,v=e.finetuneNudgePrecision)},e.$$.update=()=>{var t;2097152&e.$$.dirty[0]&&L.set(c),2097152&e.$$.dirty[0]&&z.set(c),2097152&e.$$.dirty[0]&&F.set(c),2097152&e.$$.dirty[0]&&c&&D.set(!0),327680&e.$$.dirty[0]&&o(1,i=x?x.map((([e,t])=>({id:e,label:M(t)?t(y):t}))):[]),2&e.$$.dirty[0]&&o(2,n=i.length?i[0].id:void 0),4&e.$$.dirty[0]&&o(5,r=n&&{name:W,selected:n}),2&e.$$.dirty[0]&&o(4,a=i.map((e=>e.id))),131072&e.$$.dirty[0]&&b&&(t=b,N&&N.forEach((e=>e())),N=a.map((e=>{const{getStore:o,getValue:i=Z}=t[e];return o(O).subscribe((t=>{const o=null!=t?i(t):t;mr(V,u={...u,[e]:o},u)}))}))),8519680&e.$$.dirty[0]&&b&&u&&mr(_,p=Object.keys(u).reduce(((e,t)=>{const{base:o,min:i,max:n,getLabel:r,getStore:a,setValue:s=((e,t)=>e.set(t))}=b[t],l=a(O),c=null!=u[t]?u[t]:o;return e[t]={base:o,min:i,max:n,value:c,valueLabel:r?r(c,i,n,n-i):Math.round(100*c),oninputmove:e=>{s(l,e)},oninputend:e=>{s(l,e),w.write()},elasticity:h*C,labelReset:y.labelReset,nudgeMultiplier:v},e}),{}),p),6291456&e.$$.dirty[0]&&d&&H.set(c?0:20),1048576&e.$$.dirty[0]&&o(3,s=l?`transform: translateY(${l}px)`:void 0)},[f,i,n,s,a,r,h,p,S,k,B,V,_,H,"finetune",$,y,b,x,v,l,c,d,u,({detail:e})=>o(2,n=e),function(t){oa.call(this,e,t)}]}var zy={util:["finetune",class extends Ba{constructor(e){super(),Oa(this,e,Ly,Ay,ir,{name:14,stores:15,isActive:0,locale:16,finetuneControlConfiguration:17,finetuneOptions:18,finetuneNudgePrecision:19},null,[-1,-1])}get name(){return this.$$.ctx[14]}get stores(){return this.$$.ctx[15]}set stores(e){this.$$set({stores:e}),$a()}get isActive(){return this.$$.ctx[0]}set isActive(e){this.$$set({isActive:e}),$a()}get locale(){return this.$$.ctx[16]}set locale(e){this.$$set({locale:e}),$a()}get finetuneControlConfiguration(){return this.$$.ctx[17]}set finetuneControlConfiguration(e){this.$$set({finetuneControlConfiguration:e}),$a()}get finetuneOptions(){return this.$$.ctx[18]}set finetuneOptions(e){this.$$set({finetuneOptions:e}),$a()}get finetuneNudgePrecision(){return this.$$.ctx[19]}set finetuneNudgePrecision(e){this.$$set({finetuneNudgePrecision:e}),$a()}}]},Fy=(e,t)=>{const o=t.length;return e<0?e%o+o:e>=o?e%o:e};function Dy(e,t,o){const i=e.slice();return i[46]=t[o].key,i[47]=t[o].index,i[48]=t[o].translate,i[49]=t[o].scale,i[50]=t[o].selected,i[12]=t[o].rotate,i[51]=t[o].dir,i[52]=t[o].center,i[53]=t[o].type,i[2]=t[o].visible,i}function Oy(e){let t,o;return{c(){t=Mr("div"),Fr(t,"class","PinturaShapeManipulator"),Fr(t,"data-control","point"),Fr(t,"style",o=`pointer-events:none;transform: translate3d(${e[52].x}px, ${e[52].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`)},m(e,o){Cr(e,t,o)},p(e,i){56&i[0]&&o!==(o=`pointer-events:none;transform: translate3d(${e[52].x}px, ${e[52].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`)&&Fr(t,"style",o)},d(e){e&&Tr(t)}}}function By(e,t){let o,i,n,r,a,s,l,c,d,u;function h(...e){return t[18](t[47],...e)}let p="edge"===t[53]&&t[2]&&Oy(t);return{key:e,first:null,c(){o=Mr("div"),l=Er(),p&&p.c(),c=Ir(),Fr(o,"role","button"),Fr(o,"aria-label",i=`Drag ${t[53]} ${t[46]}`),Fr(o,"tabindex",n="edge"===t[53]?-1:0),Fr(o,"class","PinturaShapeManipulator"),Fr(o,"data-control",r=t[53]),Fr(o,"data-selected",a=t[50]),Fr(o,"style",s=`cursor:${t[51]?t[51]+"-resize":"move"};opacity:${t[4]};--tx:${t[48].x};--ty:${t[48].y};--r:${"edge"===t[53]?t[12]:0}rad;--sx:${"point"===t[53]?t[5]:t[49].x};--sy:${"point"===t[53]?t[5]:t[49].y};`),this.first=o},m(e,i){Cr(e,o,i),Cr(e,l,i),p&&p.m(e,i),Cr(e,c,i),d||(u=[Ar(o,"nudge",h),gr(Sd.call(null,o,{preventDefault:!0})),Ar(o,"interactionstart",(function(){or(t[9]("start",t[47]))&&t[9]("start",t[47]).apply(this,arguments)})),Ar(o,"interactionupdate",(function(){or(t[9]("move",t[47]))&&t[9]("move",t[47]).apply(this,arguments)})),Ar(o,"interactionend",(function(){or(t[9]("end",t[47]))&&t[9]("end",t[47]).apply(this,arguments)})),gr(wd.call(null,o,{observeKeys:!0}))],d=!0)},p(e,l){t=e,8&l[0]&&i!==(i=`Drag ${t[53]} ${t[46]}`)&&Fr(o,"aria-label",i),8&l[0]&&n!==(n="edge"===t[53]?-1:0)&&Fr(o,"tabindex",n),8&l[0]&&r!==(r=t[53])&&Fr(o,"data-control",r),8&l[0]&&a!==(a=t[50])&&Fr(o,"data-selected",a),56&l[0]&&s!==(s=`cursor:${t[51]?t[51]+"-resize":"move"};opacity:${t[4]};--tx:${t[48].x};--ty:${t[48].y};--r:${"edge"===t[53]?t[12]:0}rad;--sx:${"point"===t[53]?t[5]:t[49].x};--sy:${"point"===t[53]?t[5]:t[49].y};`)&&Fr(o,"style",s),"edge"===t[53]&&t[2]?p?p.p(t,l):(p=Oy(t),p.c(),p.m(c.parentNode,c)):p&&(p.d(1),p=null)},d(e){e&&Tr(o),e&&Tr(l),p&&p.d(e),e&&Tr(c),d=!1,tr(u)}}}function Wy(e){let t,o,i,n;return{c(){t=Mr("div"),Fr(t,"role","button"),Fr(t,"aria-label","Drag rotator"),Fr(t,"tabindex","0"),Fr(t,"class","PinturaShapeManipulator"),Fr(t,"data-control","rotate"),Fr(t,"style",o=`transform: translate3d(${e[0].x}px, ${e[0].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`)},m(o,r){Cr(o,t,r),i||(n=[Ar(t,"nudge",e[11]),gr(Sd.call(null,t,{preventDefault:!0})),Ar(t,"interactionstart",e[12]("start")),Ar(t,"interactionupdate",e[12]("move")),Ar(t,"interactionend",e[12]("end")),gr(wd.call(null,t,{observeKeys:!0}))],i=!0)},p(e,i){49&i[0]&&o!==(o=`transform: translate3d(${e[0].x}px, ${e[0].y}px, 0) scale(${e[5]}, ${e[5]}); opacity: ${e[4]}`)&&Fr(t,"style",o)},d(e){e&&Tr(t),i=!1,tr(n)}}}function Vy(e){let t,o,i=[],n=new Map,r=e[3];const a=e=>e[46];for(let t=0;t<r.length;t+=1){let o=Dy(e,r,t),s=a(o);n.set(s,i[t]=By(s,o))}let s=e[1]&&Wy(e);return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=Er(),s&&s.c(),o=Ir()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);Cr(e,t,n),s&&s.m(e,n),Cr(e,o,n)},p(e,l){1592&l[0]&&(r=e[3],i=Ea(i,l,a,1,e,r,n,t.parentNode,Ra,By,t,Dy)),e[1]?s?s.p(e,l):(s=Wy(e),s.c(),s.m(o.parentNode,o)):s&&(s.d(1),s=null)},i:qn,o:qn,d(e){for(let t=0;t<i.length;t+=1)i[t].d(e);e&&Tr(t),s&&s.d(e),e&&Tr(o)}}}function _y(e,t,o){let i,n,r,a;const s=Qr(),l=.5*q,c=Y-l,d=Y+l,u=-Y,h=u-l,p=u+l,m=X-l,g=-X+l,$=l,f=-l,y=Y-q,b=y-l,x=y+l,v=X-q,w=v-l,S=v+l,k=u-q,C=k+l,T=k-l,M=u+q,R=M+l,P=M-l;let{visible:E=!1}=t,{points:I=[]}=t,{rotatorPoint:A}=t,{selectedPoint:L}=t,{enableDragEdges:z=!0}=t,{enableDragPoints:F=!0}=t,{enableRotatePoints:D=!0}=t;const O=ta("isAnimated");ar(e,O,(e=>o(17,n=e)));const B=dc(.5,{precision:1e-4,stiffness:.3,damping:.7});ar(e,B,(e=>o(5,a=e)));const W=dc(0,{precision:.001,stiffness:.3,damping:.7});ar(e,W,(e=>o(4,r=e)));const V=e=>{let t="";return(e<=d&&e>=c||e>=h&&e<=p)&&(t="ns"),(e<=g||e>=m||e>=f&&e<=$)&&(t="ew"),(e>=w&&e<=S||e<=R&&e>=P)&&(t="nesw"),(e>=b&&e<=x||e<=C&&e>=T)&&(t="nwse"),t},_=(e,t)=>{s("resizestart",{indexes:e,translation:ue(),isNudge:!0}),s("resizemove",{indexes:e,translation:t,isNudge:!0}),s("resizeend",{indexes:e,translation:ue(),isNudge:!0})};return e.$$set=e=>{"visible"in e&&o(2,E=e.visible),"points"in e&&o(13,I=e.points),"rotatorPoint"in e&&o(0,A=e.rotatorPoint),"selectedPoint"in e&&o(14,L=e.selectedPoint),"enableDragEdges"in e&&o(15,z=e.enableDragEdges),"enableDragPoints"in e&&o(16,F=e.enableDragPoints),"enableRotatePoints"in e&&o(1,D=e.enableRotatePoints)},e.$$.update=()=>{131076&e.$$.dirty[0]&&B.set(E?1:.5,{hard:!1===n}),131076&e.$$.dirty[0]&&W.set(E?1:0,{hard:!1===n}),8192&e.$$.dirty[0]&&o(3,i=((e,t)=>{let o=0;const i=Ie(e),n=[],r=e.length;for(;o<r;o++){const t=Fy(o-1,e),r=Fy(o+1,e),a=e[t],s=e[o],l=e[r],c=Math.atan2(l.y-s.y,l.x-s.x);if(F){const e=ye(he(a.x-s.x,a.y-s.y)),t=ye(he(l.x-s.x,l.y-s.y)),i=he(e.x+t.x,e.y+t.y),r=z?F&&V(Math.atan2(i.y,i.x)):void 0;n.push({index:[o],key:"point-"+o,type:"point",selected:L===o,scale:{x:1,y:1},translate:{x:s.x,y:s.y},angle:void 0,rotate:D,center:s,dir:r})}if(!z)continue;if(Array.isArray(z)&&!z.some((([e,t])=>o===e&&r===t)))continue;const d=he(s.x+.5*(l.x-s.x),s.y+.5*(l.y-s.y));n.push({index:[o,r],key:"edge-"+o,type:"edge",scale:{x:Pe(s,l),y:1},translate:{x:s.x,y:s.y},angle:c,rotate:c,center:d,visible:Array.isArray(z),dir:V(Math.atan2(i.y-d.y,i.x-d.x))})}return n})(I))},[A,D,E,i,r,a,O,B,W,(e,t)=>({detail:o})=>{const i=o&&o.translation?o.translation:he(0,0);s("resize"+e,{...o,indexes:t,translation:i})},_,({detail:e})=>{s("rotatestart",{translation:ue(),isNudge:!0}),s("rotatemove",{translation:e,isNudge:!0}),s("rotateend",{translation:ue(),isNudge:!0})},e=>({detail:t})=>{const o=t&&t.translation?t.translation:he(0,0);s("rotate"+e,{...t,translation:o})},I,L,z,F,n,(e,{detail:t})=>_(e,t)]}class Ny extends Ba{constructor(e){super(),Oa(this,e,_y,Vy,ir,{visible:2,points:13,rotatorPoint:0,selectedPoint:14,enableDragEdges:15,enableDragPoints:16,enableRotatePoints:1},null,[-1,-1])}}var Hy=(e,t)=>{const o=Jp(e);return Se(o,t)},jy=e=>document.createTextNode(e),Uy=e=>(Yt()&&e.endsWith("<div><br></div>")?e.replace(/<div><br><\/div>$/,"<br><br>"):e).replace(/<div><br><\/div>/g,"<br>").replace(/<\/div>/g,"").replace(/<div>/g,"<br>");function Gy(e){let t,o;return{c(){t=Mr("pre"),Fr(t,"class","PinturaContentEditable"),Fr(t,"style",o=e[7]+";position:absolute;z-index:-1;pointer-events:none;")},m(o,i){Cr(o,t,i),t.innerHTML=e[0]},p(e,i){1&i[0]&&(t.innerHTML=e[0]),128&i[0]&&o!==(o=e[7]+";position:absolute;z-index:-1;pointer-events:none;")&&Fr(t,"style",o)},d(e){e&&Tr(t)}}}function Zy(e){let t,o,i,n,r,a,s=e[8]&&Gy(e);return{c(){s&&s.c(),t=Er(),o=Mr("pre"),Fr(o,"class","PinturaContentEditable"),Fr(o,"data-wrap-content",i=e[4]||e[5]?"wrap":"nowrap"),Fr(o,"contenteditable",""),Fr(o,"spellcheck",e[1]),Fr(o,"autocorrect",e[2]),Fr(o,"autocapitalize",e[3]),Fr(o,"style",n=e[8]?e[15](e[7]):e[7])},m(i,n){s&&s.m(i,n),Cr(i,t,n),Cr(i,o,n),e[26](o),r||(a=[Ar(o,"input",e[13]),Ar(o,"compositionend",e[12]),Ar(o,"paste",e[14]),Ar(o,"keydown",e[10]),Ar(o,"keyup",e[11]),Ar(o,"blur",e[9])],r=!0)},p(e,r){e[8]?s?s.p(e,r):(s=Gy(e),s.c(),s.m(t.parentNode,t)):s&&(s.d(1),s=null),48&r[0]&&i!==(i=e[4]||e[5]?"wrap":"nowrap")&&Fr(o,"data-wrap-content",i),2&r[0]&&Fr(o,"spellcheck",e[1]),4&r[0]&&Fr(o,"autocorrect",e[2]),8&r[0]&&Fr(o,"autocapitalize",e[3]),384&r[0]&&n!==(n=e[8]?e[15](e[7]):e[7])&&Fr(o,"style",n)},i:qn,o:qn,d(i){s&&s.d(i),i&&Tr(t),i&&Tr(o),e[26](null),r=!1,tr(a)}}}function Xy(e,t,o){let i,r,{spellcheck:a="false"}=t,{autocorrect:s="off"}=t,{autocapitalize:l="off"}=t,{wrapLines:c=!0}=t,{allowNewline:d=!0}=t,{textFormat:u="text"}=t,{formatInput:h=Z}=t,{formatPaste:m=Z}=t,{style:g}=t,{innerHTML:$}=t,{oninput:f=n}=t,{enableTextStyleShortcuts:y=!1}=t;const b=()=>{if(!v)return;const e=document.createRange();e.selectNodeContents(v);const t=R();t.removeAllRanges(),t.addRange(e)},x=Qr();let v;document.execCommand("defaultParagraphSeparator",!1,"br");const w=e=>e.replace(/<\/?(?:i|b|em|u|s|strike|strong|font)>/,"").replace(/style=".*?"/g,"").replace(/\n/gim,"<br>"),S=()=>{o(0,$=v.innerHTML);const e=Uy($);x("input",e),f(e),requestAnimationFrame((()=>v&&v.scrollTo(0,0)))},k=()=>{P(v);const e="html"===u?v.innerHTML:w(v.innerHTML);o(6,v.innerHTML=h(e),v),E(v),S()},C={b:"bold",i:"italic",u:"underline",s:"strikethrough"},T=e=>{const t=p("span");return t.dataset.bookmark=e,t},M=(e,t,o)=>{const i=T(o);if(e.nodeType===Node.TEXT_NODE){const n=e.textContent;if("start"===o){const o=jy(n.substr(0,t)),r=jy(n.substr(t));e.replaceWith(o,i,r)}else{const o=jy(n.substr(0,t)),r=jy(n.substr(t));e.replaceWith(o,i,r)}}else e.nodeType===Node.ELEMENT_NODE&&e.insertBefore(i,e.childNodes[t])},R=()=>{const e=v.getRootNode();return"getSelection"in e?e.getSelection():document.getSelection()},P=e=>{const t=R();if(!t.getRangeAt||!t.rangeCount)return;const o=t.getRangeAt(0),{startOffset:i,endOffset:n,startContainer:r,endContainer:a}=o;if(e.contains(o.startContainer)&&e.contains(o.endContainer))if(r.nodeType===Node.TEXT_NODE&&r===a){const e=r.textContent,t=e.substr(0,i),o=T("start"),a=n-i>0?e.substr(i,n):"",s=T("end"),l=e.substr(n);r.replaceWith(t,o,a,s,l)}else M(r,i,"start"),M(a,n+(r===a?1:0),"end")},E=e=>{const t=I(e,"start"),o=I(e,"end");if(!t||!o)return;const i=document.createRange();i.setStart(t,0),i.setEnd(o,0);const n=R();n.removeAllRanges(),n.addRange(i),t.remove(),o.remove()},I=(e,t)=>{const o=e.children;for(let e=0;e<o.length;e++){const i=o[e];if(i.dataset.bookmark===t)return i;if(i.children.length){const e=I(i,t);if(e)return e}}};let A;return e.$$set=e=>{"spellcheck"in e&&o(1,a=e.spellcheck),"autocorrect"in e&&o(2,s=e.autocorrect),"autocapitalize"in e&&o(3,l=e.autocapitalize),"wrapLines"in e&&o(4,c=e.wrapLines),"allowNewline"in e&&o(5,d=e.allowNewline),"textFormat"in e&&o(16,u=e.textFormat),"formatInput"in e&&o(17,h=e.formatInput),"formatPaste"in e&&o(18,m=e.formatPaste),"style"in e&&o(19,g=e.style),"innerHTML"in e&&o(0,$=e.innerHTML),"oninput"in e&&o(20,f=e.oninput),"enableTextStyleShortcuts"in e&&o(21,y=e.enableTextStyleShortcuts)},e.$$.update=()=>{var t;if(64&e.$$.dirty[0]&&o(25,i=!!v),33554433&e.$$.dirty[0]&&i&&$&&(t=$)!==v.innerHTML&&(o(6,v.innerHTML=t,v),v===document.activeElement&&b()),524336&e.$$.dirty[0])if(!c&&d){const e=g.includes(":right")?"text-indent:-100px!important":g.includes(":center")?"":"min-width:calc(100% + 100px)!important";o(7,A=g+";overflow:visible;"+e)}else o(7,A=g);524288&e.$$.dirty[0]&&o(8,r=g.includes("text-stroke"))},[$,a,s,l,c,d,v,A,r,()=>{x("blur")},e=>{if(/escape/i.test(e.code))return e.stopPropagation(),void x("cancel");const t=e.ctrlKey||e.metaKey;if("html"===u&&t&&/b|i|u|s/.test(e.key))return y&&(e=>{const t=C[e];t&&document.execCommand(t)})(e.key),void e.preventDefault();/enter/i.test(e.code)&&(e.stopPropagation(),e.isComposing||(t?x("confirm"):(d||e.preventDefault(),document.execCommand("insertLineBreak"),e.preventDefault())))},()=>{},e=>{""!==e.data&&k()},e=>{const{inputType:t}=e;"insertCompositionText"!==t&&"deleteCompositionText"!==t&&k()},e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain"),o="html"===u?t:w(t),i=m(o);if(!i.length)return;const n=R().getRangeAt(0);n.deleteContents(),n.insertNode(document.createTextNode(i)),S()},e=>e.replace("-webkit-text-stroke","--text-stroke").replace("text-shadow","--text-shadow"),u,h,m,g,f,y,()=>k(),()=>v&&v.focus(),b,i,function(e){na[e?"unshift":"push"]((()=>{v=e,o(6,v)}))}]}class Yy extends Ba{constructor(e){super(),Oa(this,e,Xy,Zy,ir,{spellcheck:1,autocorrect:2,autocapitalize:3,wrapLines:4,allowNewline:5,textFormat:16,formatInput:17,formatPaste:18,style:19,innerHTML:0,oninput:20,enableTextStyleShortcuts:21,confirm:22,focus:23,select:24},null,[-1,-1])}get spellcheck(){return this.$$.ctx[1]}set spellcheck(e){this.$$set({spellcheck:e}),$a()}get autocorrect(){return this.$$.ctx[2]}set autocorrect(e){this.$$set({autocorrect:e}),$a()}get autocapitalize(){return this.$$.ctx[3]}set autocapitalize(e){this.$$set({autocapitalize:e}),$a()}get wrapLines(){return this.$$.ctx[4]}set wrapLines(e){this.$$set({wrapLines:e}),$a()}get allowNewline(){return this.$$.ctx[5]}set allowNewline(e){this.$$set({allowNewline:e}),$a()}get textFormat(){return this.$$.ctx[16]}set textFormat(e){this.$$set({textFormat:e}),$a()}get formatInput(){return this.$$.ctx[17]}set formatInput(e){this.$$set({formatInput:e}),$a()}get formatPaste(){return this.$$.ctx[18]}set formatPaste(e){this.$$set({formatPaste:e}),$a()}get style(){return this.$$.ctx[19]}set style(e){this.$$set({style:e}),$a()}get innerHTML(){return this.$$.ctx[0]}set innerHTML(e){this.$$set({innerHTML:e}),$a()}get oninput(){return this.$$.ctx[20]}set oninput(e){this.$$set({oninput:e}),$a()}get enableTextStyleShortcuts(){return this.$$.ctx[21]}set enableTextStyleShortcuts(e){this.$$set({enableTextStyleShortcuts:e}),$a()}get confirm(){return this.$$.ctx[22]}get focus(){return this.$$.ctx[23]}get select(){return this.$$.ctx[24]}}const qy=["i","b","u","strike"].map((e=>({tag:e,tagOpen:new RegExp(`<${e}>`,"g"),tagClose:new RegExp(`</${e}>`,"g"),placeholderOpen:new RegExp(`___${e}O___`,"g"),placeholderClose:new RegExp(`___${e}C___`,"g")})));var Jy=(e,t)=>T(e)?parseFloat(e)/100*t:e,Qy=(e,t)=>({x:Ho(e.x,t.width),y:Ho(e.y,t.height)});function eb(e,t,o){const i=e.slice();return i[284]=t[o],i[286]=o,i}function tb(e,t){let o,i,n,r,a,s,l,c,d,u,h,p=t[284].name+"";function m(){return t[183](t[286])}return n=new Xh({props:{color:t[284].color}}),{key:e,first:null,c(){o=Mr("li"),i=Mr("button"),za(n.$$.fragment),r=Er(),a=Mr("span"),s=Pr(p),c=Er(),Fr(i,"class","PinturaShapeListItem"),Fr(i,"type","button"),Fr(i,"aria-label",l="Select shape "+t[284].name),this.first=o},m(e,t){Cr(e,o,t),wr(o,i),Fa(n,i,null),wr(i,r),wr(i,a),wr(a,s),wr(o,c),d=!0,u||(h=Ar(i,"click",m),u=!0)},p(e,o){t=e;const r={};2097152&o[0]&&(r.color=t[284].color),n.$set(r),(!d||2097152&o[0])&&p!==(p=t[284].name+"")&&Br(s,p),(!d||2097152&o[0]&&l!==(l="Select shape "+t[284].name))&&Fr(i,"aria-label",l)},i(e){d||(Sa(n.$$.fragment,e),d=!0)},o(e){ka(n.$$.fragment,e),d=!1},d(e){e&&Tr(o),Da(n),u=!1,h()}}}function ob(e){let t,o;return t=new Ny({props:{visible:!0,points:e[12],rotatorPoint:e[27],selectedPoint:e[16],enableDragEdges:e[17],enableDragPoints:e[29],enableRotatePoints:e[14]}}),t.$on("resizestart",e[38]),t.$on("resizemove",e[39]),t.$on("resizeend",e[40]),t.$on("rotatestart",e[41]),t.$on("rotatemove",e[42]),t.$on("rotateend",e[43]),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};4096&o[0]&&(i.points=e[12]),134217728&o[0]&&(i.rotatorPoint=e[27]),65536&o[0]&&(i.selectedPoint=e[16]),131072&o[0]&&(i.enableDragEdges=e[17]),536870912&o[0]&&(i.enableDragPoints=e[29]),16384&o[0]&&(i.enableRotatePoints=e[14]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function ib(e){let t,o,i,n;const r=[rb,nb],a=[];function s(e,t){return"modal"===e[4]?0:"inline"===e[4]?1:-1}return~(t=s(e))&&(o=a[t]=r[t](e)),{c(){o&&o.c(),i=Ir()},m(e,o){~t&&a[t].m(e,o),Cr(e,i,o),n=!0},p(e,n){let l=t;t=s(e),t===l?~t&&a[t].p(e,n):(o&&(va(),ka(a[l],1,1,(()=>{a[l]=null})),wa()),~t?(o=a[t],o?o.p(e,n):(o=a[t]=r[t](e),o.c()),Sa(o,1),o.m(i.parentNode,i)):o=null)},i(e){n||(Sa(o),n=!0)},o(e){ka(o),n=!1},d(e){~t&&a[t].d(e),e&&Tr(i)}}}function nb(e){let t,o,i,n,r,a={formatInput:e[45],wrapLines:!!e[13].width,textFormat:e[13].format,enableTextStyleShortcuts:e[5],allowNewline:e[28],style:e[26]};return o=new Yy({props:a}),e[186](o),o.$on("input",e[46]),o.$on("keyup",e[49]),o.$on("cancel",e[51]),o.$on("confirm",e[50]),{c(){t=Mr("div"),za(o.$$.fragment),Fr(t,"class","PinturaInlineInput"),Fr(t,"style",e[25])},m(a,s){Cr(a,t,s),Fa(o,t,null),i=!0,n||(r=Ar(t,"focusout",e[187]),n=!0)},p(e,n){const r={};8192&n[0]&&(r.wrapLines=!!e[13].width),8192&n[0]&&(r.textFormat=e[13].format),32&n[0]&&(r.enableTextStyleShortcuts=e[5]),268435456&n[0]&&(r.allowNewline=e[28]),67108864&n[0]&&(r.style=e[26]),o.$set(r),(!i||33554432&n[0])&&Fr(t,"style",e[25])},i(e){i||(Sa(o.$$.fragment,e),i=!0)},o(e){ka(o.$$.fragment,e),i=!1},d(i){i&&Tr(t),e[186](null),Da(o),n=!1,r()}}}function rb(e){let t,o;return t=new Ap({props:{panelOffset:e[2],onconfirm:e[50],oncancel:e[51],buttonCancel:{icon:e[6].shapeIconInputCancel,label:e[6].shapeLabelInputCancel},buttonConfirm:{icon:e[6].shapeIconInputConfirm,label:e[6].shapeLabelInputConfirm,hideLabel:!0},$$slots:{default:[ab]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};4&o[0]&&(i.panelOffset=e[2]),64&o[0]&&(i.buttonCancel={icon:e[6].shapeIconInputCancel,label:e[6].shapeLabelInputCancel}),64&o[0]&&(i.buttonConfirm={icon:e[6].shapeIconInputConfirm,label:e[6].shapeLabelInputConfirm,hideLabel:!0}),83886336&o[0]|256&o[9]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function ab(e){let t,o,i;return{c(){t=Mr("textarea"),Fr(t,"spellcheck","false"),Fr(t,"autocorrect","off"),Fr(t,"autocapitalize","off"),Fr(t,"style",e[26])},m(n,r){Cr(n,t,r),e[184](t),Wr(t,e[24]),o||(i=[Ar(t,"keydown",e[48]),Ar(t,"keypress",e[47]),Ar(t,"keyup",e[49]),Ar(t,"input",e[46]),Ar(t,"input",e[185])],o=!0)},p(e,o){67108864&o[0]&&Fr(t,"style",e[26]),16777216&o[0]&&Wr(t,e[24])},d(n){n&&Tr(t),e[184](null),o=!1,tr(i)}}}function sb(e){let t,o,i,n,r;return o=new Cp({props:{items:e[22],key:e[10]}}),{c(){t=Mr("div"),za(o.$$.fragment),Fr(t,"class","PinturaShapeControls"),Fr(t,"style",e[23])},m(a,s){Cr(a,t,s),Fa(o,t,null),i=!0,n||(r=[Ar(t,"measure",e[188]),gr(Tc.call(null,t))],n=!0)},p(e,n){const r={};4194304&n[0]&&(r.items=e[22]),1024&n[0]&&(r.key=e[10]),o.$set(r),(!i||8388608&n[0])&&Fr(t,"style",e[23])},i(e){i||(Sa(o.$$.fragment,e),i=!0)},o(e){ka(o.$$.fragment,e),i=!1},d(e){e&&Tr(t),Da(o),n=!1,tr(r)}}}function lb(e){let t,o,i,r,a,s,l,c,d,u,h=[],p=new Map,m=e[21];const g=e=>e[284].id;for(let t=0;t<m.length;t+=1){let o=eb(e,m,t),i=g(o);p.set(i,h[t]=tb(i,o))}let $=e[15]&&ob(e),f=e[11]&&ib(e),y=e[18]>0&&sb(e);return{c(){t=Mr("div"),o=Mr("nav"),i=Mr("ul");for(let e=0;e<h.length;e+=1)h[e].c();r=Er(),$&&$.c(),a=Er(),f&&f.c(),s=Er(),y&&y.c(),Fr(o,"class","PinturaShapeList"),Fr(o,"data-visible",e[19]),Fr(t,"class","PinturaShapeEditor"),Fr(t,"tabindex","0")},m(p,m){Cr(p,t,m),wr(t,o),wr(o,i);for(let e=0;e<h.length;e+=1)h[e].m(i,null);wr(t,r),$&&$.m(t,null),wr(t,a),f&&f.m(t,null),wr(t,s),y&&y.m(t,null),e[189](t),c=!0,d||(u=[Ar(o,"focusin",e[54]),Ar(o,"focusout",e[55]),Ar(t,"keydown",(function(){or(e[0]?n:e[44])&&(e[0]?n:e[44]).apply(this,arguments)})),Ar(t,"nudge",(function(){or(e[0]?n:e[53])&&(e[0]?n:e[53]).apply(this,arguments)})),Ar(t,"measure",e[182]),Ar(t,"pointermove",(function(){or(e[0]?n:e[56])&&(e[0]?n:e[56]).apply(this,arguments)})),Ar(t,"pointerleave",(function(){or(e[0]?n:e[57])&&(e[0]?n:e[57]).apply(this,arguments)})),Ar(t,"interactionstart",(function(){or(e[0]?n:e[32])&&(e[0]?n:e[32]).apply(this,arguments)})),Ar(t,"interactionupdate",(function(){or(e[0]?n:e[34])&&(e[0]?n:e[34]).apply(this,arguments)})),Ar(t,"interactioncancel",(function(){or(e[0]?n:e[33])&&(e[0]?n:e[33]).apply(this,arguments)})),Ar(t,"interactionrelease",(function(){or(e[0]?n:e[35])&&(e[0]?n:e[35]).apply(this,arguments)})),Ar(t,"interactionend",(function(){or(e[0]?n:e[36])&&(e[0]?n:e[36]).apply(this,arguments)})),gr(Tc.call(null,t)),gr(Sd.call(null,t)),gr(l=wd.call(null,t,{drag:!0,inertia:!0,multiTouch:!1,observeKeys:!0,shouldStartInteraction:cb,getEventPosition:e[190]}))],d=!0)},p(n,r){e=n,2097282&r[0]&&(m=e[21],va(),h=Ea(h,r,g,1,e,m,p,i,Pa,tb,null,eb),wa()),(!c||524288&r[0])&&Fr(o,"data-visible",e[19]),e[15]?$?($.p(e,r),32768&r[0]&&Sa($,1)):($=ob(e),$.c(),Sa($,1),$.m(t,a)):$&&(va(),ka($,1,1,(()=>{$=null})),wa()),e[11]?f?(f.p(e,r),2048&r[0]&&Sa(f,1)):(f=ib(e),f.c(),Sa(f,1),f.m(t,s)):f&&(va(),ka(f,1,1,(()=>{f=null})),wa()),e[18]>0?y?(y.p(e,r),262144&r[0]&&Sa(y,1)):(y=sb(e),y.c(),Sa(y,1),y.m(t,null)):y&&(va(),ka(y,1,1,(()=>{y=null})),wa()),l&&or(l.update)&&8&r[0]&&l.update.call(null,{drag:!0,inertia:!0,multiTouch:!1,observeKeys:!0,shouldStartInteraction:cb,getEventPosition:e[190]})},i(e){if(!c){for(let e=0;e<m.length;e+=1)Sa(h[e]);Sa($),Sa(f),Sa(y),c=!0}},o(e){for(let e=0;e<h.length;e+=1)ka(h[e]);ka($),ka(f),ka(y),c=!1},d(o){o&&Tr(t);for(let e=0;e<h.length;e+=1)h[e].d();$&&$.d(),f&&f.d(),y&&y.d(),e[189](null),d=!1,tr(u)}}}const cb=(e,t)=>e.target===t;function db(e,t,o){let i,r,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,M,R,P,E,A,L,z,D,O,B,W,V,_,N,H,j,U,G,X,Y,q,K,J,Q,ee,te,oe,ie,ne,re,ae,se,ce,pe,ge,fe=qn,ke=()=>(fe(),fe=nr(ze,(e=>o(178,ae=e))),ze);e.$$.on_destroy.push((()=>fe()));let{uid:Te=I()}=t,{ui:Me}=t,{disabled:Ee=!1}=t,{shapes:ze}=t;ke();let{selection:Fe}=t,{offset:Oe}=t,{contextRotation:Be=0}=t,{contextFlipX:We=!1}=t,{contextFlipY:_e=!1}=t,{contextZoom:Ne=1}=t,{active:He=!1}=t,{opacity:je=1}=t,{parentRect:Ue}=t,{rootRect:Xe}=t,{utilRect:qe}=t,{hoverColor:Ke}=t,{caretColor:Je}=t,{gridColor:Qe}=t,{snapColor:et}=t,{textInputMode:tt="inline"}=t,{oninteractionstart:rt=n}=t,{oninteractionupdate:lt=n}=t,{oninteractionrelease:ct=n}=t,{oninteractionend:dt=n}=t,{oninteractioncancel:ut=n}=t,{onaddshape:ht=n}=t,{onupdateshape:pt=n}=t,{onselectshape:mt=n}=t,{onblurshape:gt=n}=t,{onremoveshape:$t=n}=t,{ontapshape:yt=n}=t,{onhovershape:bt=n}=t,{onhovercanvas:xt=n}=t,{ontapcanvas:kt=n}=t,{onleavecanvas:Ct=n}=t,{beforeSelectShape:Tt=(()=>!0)}=t,{beforeDeselectShape:Mt=(()=>!0)}=t,{beforeRemoveShape:Rt=(()=>!0)}=t,{beforeUpdateShape:Pt=((e,t)=>t)}=t,{willRenderShapeControls:At=Z}=t,{willRenderShapeTextControls:Lt=Z}=t,{willStartInteraction:Wt=((e,t)=>!0)}=t,{mapEditorPointToImagePoint:Vt}=t,{mapImagePointToEditorPoint:_t}=t,{eraseRadius:Nt}=t,{selectRadius:Ht}=t,{enableButtonFlipVertical:jt=!1}=t,{enableTapToAddText:Ut=!0}=t,{enableTextStyleControls:Gt=!0}=t,{locale:Zt}=t,{snapThreshold:Xt=0}=t,{snapPointer:Yt=!0}=t,{enableSnapToContext:qt=!0}=t,{gridSize:Kt=0}=t;const Jt=e=>{if(0===Xt)return[];let t;return qt&&(t={...Ue,x:0,y:0}),[...ae.filter((t=>t!==e)).filter((e=>!zi(e))).map((e=>gn({...e},Ue))),t].filter(Boolean)},Qt=(e,t,o,i)=>0===e?{snapTargets:[]}:{snapThreshold:e,gridSize:t,gridRect:o,snapTargets:Jt(i)},eo=ta("isAnimated");ar(e,eo,(e=>o(179,ce=e)));const to=e=>e.set(rr(e)),oo=e=>rr(e).find(zi),io=(e,t)=>{if(!oo(t))return Wi(e),so(e,t)},no=e=>{oo(e)&&e.update((e=>e.filter((e=>!zi(e)))))},ro=e=>{const t=oo(e);if(t)return Vi(t),to(e),t},ao=(e,t,o=((e,t)=>({...e,...t})))=>{oo(t)&&t.update((t=>t.map((t=>zi(t)?o(t,e):t))))},so=(e,t=ze)=>(t.update((t=>[...t,e])),e),lo=(e,t,o)=>{const i=Pt({...e},t,{...o});return bn(e,i,o),e},co=(e,t)=>{const o=Pe(e,t),i=be(e,t),n=Math.PI/8,r=n*Math.round(i/n)-Be%n;t.x=e.x+o*Math.cos(r),t.y=e.y+o*Math.sin(r)},uo=ta("keysPressed");ar(e,uo,(e=>o(180,pe=e)));const ho=(e,t,o)=>0===e||t&&o?e:t||o?-e:e,po=e=>{if(null===e.x&&null===e.y)return mo();e.x&&o(139,go=Vt({x:e.x,y:0}).x),e.y&&o(140,$o=Vt({x:0,y:e.y}).y)},mo=()=>{o(139,go=null),o(140,$o=null)};let go=null,$o=null;const fo=(e,t)=>{const o=_t(e);return Vt(we(o,t))},yo=(e,t,o)=>{const i=(o-t)/e+1;return Array.from({length:i},((o,i)=>t+i*e))},bo=e=>{let t=[],o=[],i=e.points;if(void 0!==e.x1&&(i=[{x:e.x1,y:e.y1},{x:e.x2,y:e.y2}]),i){const e=i.map(_t),n=it(e),r=e[0],a=e[e.length-1];t=[n.x,n.x+.5*n.width,n.x+n.width,r.x,a.x],o=[n.y,n.y+.5*n.height,n.y+n.height,r.y,a.y]}else if(e.text||void 0!==e.width||void 0!==e.rx){let i;if(e.text&&void 0===e.height){const t=ni(e.text,e);i=at(e.x,e.y,t.width,t.height)}else i=void 0!==e.width?ot(e):ot({x:e.x-e.rx,y:e.y-e.ry,width:2*e.rx,height:2*e.ry});const n=St(i).map(_t),r=Math.abs(e.rotation)>0?ft(i,e.rotation).map(_t):n,a=it(r),s=st(a),l=.5*a.width,c=.5*a.height;t=[s.x-l,s.x,s.x+l],o=[s.y-c,s.y,s.y+c]}else if(void 0!==e.x){const i=_t(e);t=[i.x],o=[i.y]}return{x:t,y:o}},xo=(e,t,o)=>{let i,n,r,a=Number.Infinity,s=null,l=null;for(let c=0;c<e.length;c++){n=e[c];for(let e=0;e<t.length;e++)r=t[e],i=Math.abs(n-r),i<o&&(null===l||i<a)&&(a=i,s=n,l=r)}return{origin:s,target:l}},vo=(e,t,o,i,n)=>{const r={x:null,y:null},a={x:null,y:null},s=t.map(bo);if(i>0){const e=_t({x:0,y:0}),t=_t({x:i,y:i}),o=_t({x:n.width,y:n.height}),r=t.x-e.x,a=yo(r,e.x,o.x),l=yo(r,e.y,o.y);s.push({x:a,y:l})}return s.forEach((t=>{const{snapTranslation:i,snapLine:n}=((e,t,o)=>{const i={x:null,y:null},n={x:null,y:null},r=xo(e.x,t.x,o);null!==r.target&&(i.x=r.target,n.x=r.target-r.origin);const a=xo(e.y,t.y,o);return null!==a.target&&(i.y=a.target,n.y=a.target-a.origin),{snapTranslation:n,snapLine:i}})(e,t,o);null!==i.x&&(null===a.x||Math.abs(i.x)<Math.abs(a.x))&&(a.x=i.x||0,r.x=n.x),null!==i.y&&(null===a.y||Math.abs(i.y)<Math.abs(a.y))&&(a.y=i.y||0,r.y=n.y)})),{snapTranslation:a,snapLines:r}},wo=(e,t)=>(null!==t.x&&(e.x+=t.x),null!==t.y&&(e.y+=t.y),e),So=(e,t,o,i)=>{const{snapThreshold:n=0,gridSize:r=0,gridRect:a,snapTargets:s=[]}=i||{};let l=null;if(Ri(e)){if(n){const i=gn({...e},Ue),l=fo(vi(t),o),c=fo(wi(t),o),d=bo({...i,x1:l.x,y1:l.y,x2:c.x,y2:c.y}),{snapTranslation:u,snapLines:h}=vo(d,s,n,r,a);wo(o,u),po(h)}const i=fo(vi(t),o),c=fo(wi(t),o);l={x1:i.x,y1:i.y,x2:c.x,y2:c.y}}else if(e.points){if(Zi(si)&&Do(si,{selectedPoint:void 0}),n){const i=gn({...e},Ue),l=bo({...i,points:t.points.map((e=>fo(e,o)))}),{snapTranslation:c,snapLines:d}=vo(l,s,n,r,a);wo(o,c),po(d)}l={points:t.points.map((e=>fo(e,o)))}}else if(Ti(e)||Si(e)||Mi(e)){if(n){const i=gn({...e},Ue),l=fo(t,o),c=bo({...i,...l}),{snapTranslation:d,snapLines:u}=vo(c,s,n,r,a);wo(o,d),po(u)}l=fo(t,o)}l&&(lo(e,l,Ue),Ao())},ko={0:1,1:0,2:3,3:2},Co={0:3,1:2,2:1,3:0};let To;const Mo=(e,t)=>{const o=e.points.filter(((e,o)=>o!==t));Do(e,{points:o,selectedPoint:void 0})},Ro=()=>{if(ae.length)return ae.find(zi)},Po=()=>{if(ae.length)return ae.findIndex(zi)},Eo=()=>{const e=Ro();if(e)return Vi(e),Ao(),e},Io=()=>{if(!Ro())return;const e=[...ae];e.splice(Po(),1),ze.set(e)},Ao=()=>{ze.set(ae)},zo=(e,t=[],o=!0)=>{t.filter(Boolean).forEach((t=>delete e[t])),o&&Ao()},Do=(e,t,o=!0)=>{e=Object.assign(e,t),o&&Ao()},Oo=(e,t,o,i=!0)=>{e[t]=o,i&&Ao()},Bo=(e,t=!0)=>{ae.forEach((t=>Do(t,e,!1))),t&&Ao()},Wo=()=>[...ae].reverse().find(Ai),Vo=()=>!!Wo(),_o=e=>{if(!Rt(e))return!1;ze.set(ae.filter((t=>t!==e))),$t(e)},No=()=>{const e=Wo();if(!e)return;const t=ae.filter((e=>Hi(e)&&Ni(e))),o=t.findIndex((t=>t===e));if(!1===_o(e))return;if(Uo=e,t.length-1<=0)return Go();const i=o-1<0?t.length-1:o-1;Xo(t[i])};let Uo;const Go=(e={})=>{const{storePrevious:t=!0}=e;Object.keys(wn).forEach((e=>wn[e]={}));const o=Zo();t&&(Uo=o),Bo({isSelected:!1,isEditing:!1,_prerender:!1}),o&&gt(o)},Zo=()=>ae.find(Ai),Xo=(e,t=!0)=>{if(zi(e))return;const o=Zo()||Uo,i=Ai(e);Uo=void 0,Tt(o,e)&&(Go(),(e=>{e.isSelected=!0})(e),!i&&mt(e),t&&Ao())},Yo=e=>{un&&un.confirm&&e.isEditing&&un.confirm();const t={isSelected:!1,isEditing:!1,_prerender:!1};e.selectedPoint>-1&&(t.selectedPoint=void 0),Do(e,t),gt(e)},qo=e=>{Do(e,{isSelected:!0,isEditing:!0,_prerender:"inline"===tt})},Ko=e=>{Do(e,{isSelected:!0,isEditing:!1,_prerender:!1})},Jo=e=>{if(!e.length)return[];const t=e.filter(Rt);return ze.set(ae.filter((e=>!t.includes(e)))),t},Qo=e=>{const t=ni(e.text,e);return at(e.x,e.y,e.width?Math.min(e.width,t.width):t.width,e.height?Math.min(e.height,t.height):t.height)},ei=e=>{if(Fi(e))return ot(e);if(Mi(e))return nt(e);const t=Qo(e);return t.width=Math.max(10,e.width||t.width),t},ti=(e,t,o=0,i=(()=>!0))=>[...e].reverse().filter(i).map((e=>({shape:e,priority:1}))).filter((e=>{const{shape:i}=e,n=gn($i(i),Ue),r=o+.5*(n.strokeWidth||0);if(Ti(n))return Bt(t,r,n,i.rotation);if(Si(n)){const o=ei(n),a=Bt(t,r,o,i.rotation);let s=!1;if(a&&!Ai(i)){const a=Qo(n);"right"!==i.textAlign||i.flipX||(a.x=o.x+o.width-a.width),"center"===i.textAlign&&(a.x=o.x+.5*o.width-.5*a.width),s=Bt(t,r,a,i.rotation,st(o)),s||(e.priority=-1)}return a}return Mi(n)?((e,t,o,i,n,r)=>{const a=zt(he(o.x,o.y),o.rx,o.ry,i,n,r,12);return Ot(e,t,a)})(t,r,n,i.rotation,i.flipX,i.flipY):Ri(n)?Ft(t,Math.max(16,r),vi(n),wi(n)):Pi(n)&&n.pathClose?Ot(t,r,n.points):!!Pi(n)&&(1===n.points.length?Re(t,n.points[0])<r*r:Dt(t,Math.max(16,r),n.points))})).sort(((e,t)=>e.priority<t.priority?1:e.priority>t.priority?-1:0)).map((e=>e.shape)),oi=(e,t,o,i=0)=>{const n=Math.abs(i),r=Ze(t,o),a=Ye(r,n),s=(({start:e,end:t},o)=>{if(0===o)return[he(e.x,e.y),he(e.x,e.y),he(t.x,t.y),he(t.x,t.y)];const i=Math.atan2(t.y-e.y,t.x-e.x),n=Math.sin(i)*o,r=Math.cos(i)*o;return[he(n+e.x,-r+e.y),he(-n+e.x,r+e.y),he(-n+t.x,r+t.y),he(n+t.x,-r+t.y)]})(a,n);return e.filter((e=>{const t=gn($i(e),Ue);if(Ri(t)||Pi(t)){const e=t.points?[...t.points]:[vi(t),wi(t)];return!!Et(a,e)}return((e,t)=>!!e.find((e=>It(e,t)))||!!t.find((t=>It(t,e))))(s,((e,t=12)=>{if(Ti(e))return ft(e,e.rotation,st(e));if(Si(e)){const t=ei(e);return ft(t,e.rotation,st(t))}return Mi(e)?zt(he(e.x,e.y),e.rx,e.ry,e.rotation,e.flipX,e.flipY,t):[]})(t))}))};let ii,ri,ai,si,li,ci,di=!1,ui=!1,hi=!1;const pi=()=>{clearTimeout(ri),ri=void 0,o(142,hi=!1),mo()};let mi=null;const gi=e=>{const t=Lo(e.rotation)&&0!==e.rotation;if(Ti(e)){if(e.width<1&&e.height<1)return;const o=st(e),i=St(e);return(e.flipX||e.flipY)&&Ae(i,e.flipX,e.flipY,o.x,o.y),t?Le(i,e.rotation,o.x,o.y):i}if(Mi(e)){if(e.rx<1&&e.ry<1)return;const o=e,i=St(nt(e));return(e.flipX||e.flipY)&&Ae(i,e.flipX,e.flipY,o.x,o.y),t?Le(i,e.rotation,o.x,o.y):i}if(Ri(e))return[vi(e),wi(e)];if(Pi(e)){if(e.bitmap&&!e.pathClose){const t=it(e.points);return t.x-=.5*e.strokeWidth,t.y-=.5*e.strokeWidth,t.width+=e.strokeWidth,t.height+=e.strokeWidth,gi({...e,...t})}return[...e.points]}if(Si(e)){if(e.width<5&&e.height<5)return;const o=ei(e);o.width=Math.max(10,o.width);const i=st(o),n=St(o);return(e.flipX||e.flipY)&&Ae(n,e.flipX,e.flipY,i.x,i.y),t?Le(n,e.rotation,i.x,i.y):n}return[]},fi=e=>{const t=gi(e);let o,i;return e.flipY?(o=Ie([t[0],t[1]]),i=ye(he(t[1].x-t[2].x,t[1].y-t[2].y))):(o=Ie([t[2],t[3]]),i=ye(he(t[2].x-t[1].x,t[2].y-t[1].y))),Ce(i,20/Ne),{origin:o,dir:i}},yi=e=>t=>t.id===e,bi=e=>{const t=yi(e);return e=>e.filter((e=>t=>!e(t))(t))},xi=e=>{const t=yi(e),o=bi(e);return()=>Me.update((e=>e.some(t)?o(e):e))},Ii=e=>{const t=bi(e);return(...e)=>{Me.update((o=>[...t(o),...e.filter(Boolean)]))}},Li=xi("markup-hover"),Di=Ii("markup-hover");let Oi;const Bi="markup-manipulator-segment-"+Te,Ki=(e,t)=>{const o=e[t],i=t-1<0?e[e.length-1]:e[t-1],n=t+1<e.length?e[t+1]:e[0],r=Se(me(i),o);ye(r);const a=we(Ce(r,10),o),s=Se(me(n),o);return ye(s),[a,o,we(Ce(s,10),o)]},Ji=xi(Bi),Qi=Ii(Bi),en=()=>{o(143,Oi=void 0),Li()},tn=(e,t)=>{if(Xt<=0)return e;if(t)return mo(),e;const o=Vt(e),n=Jt(),{snapTranslation:r,snapLines:a}=vo(bo(o),n,Xt,Kt,i);return po(a),wo(e,r),e},on=dc(0);ar(e,on,(e=>o(181,ge=e)));const nn="markup-grid-line-"+Te,rn=xi(nn),an=Ii(nn),ln="markup-snap-line",cn=xi(ln),dn=Ii(ln);let un;const hn=e=>{o(8,un.innerHTML=(e=>((e,t=qy)=>(t.forEach((({tag:t,placeholderOpen:o,placeholderClose:i})=>{e=e.replace(o,`<${t}>`).replace(i,`</${t}>`)})),e))(e=(e=((e,t=qy)=>(t.forEach((({tag:t,tagOpen:o,tagClose:i})=>{e=e.replace(o,`___${t}O___`).replace(i,`___${t}C___`)})),e))(e)).replace(/ {2,}/g," ").replace(/\u00a0/g,"&nbsp;").split("\n").join("<br>")))(e),un)},mn=()=>{const e=(e=>{const t=void 0===e.value?e.innerHTML:e.value,o="text"===r.format?Uy(t).split(/<br>|<br\/>/g).join("\n").replace(/&nbsp;/g,String.fromCharCode(160)).replace(/&amp;/g,"&"):t;return ki(r)&&!1!==r.disableNewline?(e=>{const t=e.split(/[\n\r]/g);return t.length>1?t.map((e=>e.trim())).filter((e=>e.length)).join(" "):t[0]})(o):o})(un),t=Ui(r,e),o=!0===t?e:t;let i=z.x,n=z.y;if(!r.height){const e=ft({...O},r.rotation),t=ni(o,c),a=ft({x:i,y:n,...t},r.rotation),[s,,l]=e,[d,,u]=a;let h=s,p=d;r.flipX&&(h=l,p=u);const m=Se(me(h),p);i+=m.x,n+=m.y}Do(r,{x:T(L.x)?Ho(i,Ue.width):i,y:T(L.y)?Ho(n,Ue.height):n,text:o})},$n=()=>{s&&Eo(),un&&un.confirm&&un.confirm(),mn(),Ko(r),pt(r)},fn=()=>{s?Io():(Do(r,{text:L.text,x:L.x,y:L.y}),Ko(r))},xn=(e,t,{flipX:o,flipY:i,rotation:n},r="top left")=>{let a,s;const[l,c,d,u]=ft(e,n),[h,p,m,g]=ft(t,n);return"top center"===r?(a=Ie(i?[u,d]:[l,c]),s=Ie(i?[g,m]:[h,p])):"top right"===r&&!o||"top left"===r&&o?(a=i?d:c,s=i?m:p):(a=i?u:l,s=i?g:h),Se(me(a),s)},vn=(e,t,o)=>he(T(e.x)?Ho(t.x+o.x,Ue.width):t.x+o.x,T(e.y)?Ho(t.y+o.y,Ue.height):t.y+o.y),wn={},Sn=()=>Mo(r,r.selectedPoint),kn=()=>qo(r),Cn=()=>{const e=Ge(ni(r.text,c),(e=>Math.ceil(e))),t=Fo(r,"height"),o=!t&&Fo(r,"width"),i=r.id;let n=wn[i];n||(wn[i]={},n=wn[i]);const a=e=>{const{width:t,...o}=c,i=ni(r.text,o),n=xn(at(c.x,c.y,e.width,e.height),at(c.x,c.y,i.width,i.height),c,"top "+r.textAlign),a=!1!==c.disableNewline;zo(r,["width","height",a&&"textAlign"]),Do(r,{...vn(r,c,n)})},s=t=>{const o=Ve(n.width||c.width||e.width,e.height),i=n.textAlign||"left",a=xn(at(c.x,c.y,t.width,t.height),at(c.x,c.y,o.width,o.height),c,"top "+i);zo(r,["height"]),Do(r,{...vn(r,c,a),width:T(r.width)?Ho(o.width,Ue.width):o.width,textAlign:i})},l=t=>{const o=Ve(n.width||e.width,n.height||e.height),i=n.textAlign||"left",a=xn(at(c.x,c.y,t.width,t.height),at(c.x,c.y,o.width,o.height),c,"top "+i);Do(r,{...vn(r,c,a),width:T(r.width)?Ho(o.width,Ue.width):o.width,height:T(r.width)?Ho(o.height,Ue.height):o.height,textAlign:i})};if(t){n.textAlign=r.textAlign,n.width=c.width,n.height=c.height;const e=Ve(c.width,c.height);Gi(r,"auto-height")?s(e):Gi(r,"auto-width")&&a(e)}else if(o){n.textAlign=r.textAlign,n.width=c.width;const t=Ve(c.width,e.height);Gi(r,"auto-width")?a(t):Gi(r,"fixed-size")&&l(t)}else{n.textAlign=r.textAlign;const t=Ve(Math.ceil(e.width),Math.ceil(e.height));Gi(r,"fixed-size")?l(t):Gi(r,"auto-height")&&s(t)}},Tn=e=>{e.stopPropagation();const t=r.flipX||!1;Oo(r,"flipX",!t),pt(r)},Mn=e=>{e.stopPropagation();const t=r.flipY||!1;Oo(r,"flipY",!t),pt(r)},Rn=e=>{Oo(r,"opacity",e)},Pn=e=>{Rn(e),pt(r)},En=e=>{e.stopPropagation(),e.target.blur(),No()},In=e=>{e.stopPropagation(),ae.findIndex((e=>e===r))!==ae.length-1&&(ze.set(ae.filter((e=>e!==r)).concat([r])),pt(r))},An=e=>{e.stopPropagation(),Ln()},Ln=()=>{const e=$i(r);e.id=I();const t=he(50,-50);if(Fo(e,"points")){const o=yn(e,["points"],Ue);o.points.forEach((e=>{e.x+=t.x,e.y+=t.y})),bn(e,o,Ue)}else if(Ri(e)){const o=yn(e,["x1","y1","x2","y2"],Ue);o.x1+=t.x,o.y1+=t.y,o.x2+=t.x,o.y2+=t.y,bn(e,o,Ue)}else{const t=yn(e,["x","y"],Ue);t.x+=50,t.y-=50,bn(e,t,Ue)}ze.set([...ae,e]),ht(e),Xo(e)},zn=dc(0,{stiffness:.2,damping:.7});let Fn;ar(e,zn,(e=>o(18,se=e)));const Dn=(e,t)=>{const{disableTextLayout:o=[]}=t;return"height"in t?o.includes("auto-height")?e.shapeIconButtonTextLayoutAutoWidth:e.shapeIconButtonTextLayoutAutoHeight:"width"in t?o.includes("auto-width")?e.shapeIconButtonTextLayoutFixedSize:e.shapeIconButtonTextLayoutAutoWidth:o.includes("fixed-size")?e.shapeIconButtonTextLayoutAutoHeight:e.shapeIconButtonTextLayoutFixedSize},On=(e,t)=>{const{disableTextLayout:o=[]}=t;return"height"in t?o.includes("auto-height")?e.shapeTitleButtonTextLayoutAutoWidth:e.shapeTitleButtonTextLayoutAutoHeight:"width"in t?o.includes("auto-width")?e.shapeTitleButtonTextLayoutFixedSize:e.shapeTitleButtonTextLayoutAutoWidth:o.includes("fixed-size")?e.shapeTitleButtonTextLayoutAutoHeight:e.shapeTitleButtonTextLayoutFixedSize};let Vn,Bn=!1,Wn=ue();const _n=e=>{bt(e),o(143,Oi=e)};let Nn;return Jr((()=>{cn(),rn(),Ji(),Li()})),e.$$set=e=>{"uid"in e&&o(58,Te=e.uid),"ui"in e&&o(59,Me=e.ui),"disabled"in e&&o(0,Ee=e.disabled),"shapes"in e&&ke(o(1,ze=e.shapes)),"selection"in e&&o(60,Fe=e.selection),"offset"in e&&o(2,Oe=e.offset),"contextRotation"in e&&o(61,Be=e.contextRotation),"contextFlipX"in e&&o(62,We=e.contextFlipX),"contextFlipY"in e&&o(63,_e=e.contextFlipY),"contextZoom"in e&&o(64,Ne=e.contextZoom),"active"in e&&o(65,He=e.active),"opacity"in e&&o(66,je=e.opacity),"parentRect"in e&&o(67,Ue=e.parentRect),"rootRect"in e&&o(3,Xe=e.rootRect),"utilRect"in e&&o(68,qe=e.utilRect),"hoverColor"in e&&o(69,Ke=e.hoverColor),"caretColor"in e&&o(70,Je=e.caretColor),"gridColor"in e&&o(71,Qe=e.gridColor),"snapColor"in e&&o(72,et=e.snapColor),"textInputMode"in e&&o(4,tt=e.textInputMode),"oninteractionstart"in e&&o(73,rt=e.oninteractionstart),"oninteractionupdate"in e&&o(74,lt=e.oninteractionupdate),"oninteractionrelease"in e&&o(75,ct=e.oninteractionrelease),"oninteractionend"in e&&o(76,dt=e.oninteractionend),"oninteractioncancel"in e&&o(77,ut=e.oninteractioncancel),"onaddshape"in e&&o(78,ht=e.onaddshape),"onupdateshape"in e&&o(79,pt=e.onupdateshape),"onselectshape"in e&&o(80,mt=e.onselectshape),"onblurshape"in e&&o(81,gt=e.onblurshape),"onremoveshape"in e&&o(82,$t=e.onremoveshape),"ontapshape"in e&&o(83,yt=e.ontapshape),"onhovershape"in e&&o(84,bt=e.onhovershape),"onhovercanvas"in e&&o(85,xt=e.onhovercanvas),"ontapcanvas"in e&&o(86,kt=e.ontapcanvas),"onleavecanvas"in e&&o(87,Ct=e.onleavecanvas),"beforeSelectShape"in e&&o(88,Tt=e.beforeSelectShape),"beforeDeselectShape"in e&&o(89,Mt=e.beforeDeselectShape),"beforeRemoveShape"in e&&o(90,Rt=e.beforeRemoveShape),"beforeUpdateShape"in e&&o(91,Pt=e.beforeUpdateShape),"willRenderShapeControls"in e&&o(92,At=e.willRenderShapeControls),"willRenderShapeTextControls"in e&&o(93,Lt=e.willRenderShapeTextControls),"willStartInteraction"in e&&o(94,Wt=e.willStartInteraction),"mapEditorPointToImagePoint"in e&&o(95,Vt=e.mapEditorPointToImagePoint),"mapImagePointToEditorPoint"in e&&o(96,_t=e.mapImagePointToEditorPoint),"eraseRadius"in e&&o(97,Nt=e.eraseRadius),"selectRadius"in e&&o(98,Ht=e.selectRadius),"enableButtonFlipVertical"in e&&o(99,jt=e.enableButtonFlipVertical),"enableTapToAddText"in e&&o(100,Ut=e.enableTapToAddText),"enableTextStyleControls"in e&&o(5,Gt=e.enableTextStyleControls),"locale"in e&&o(6,Zt=e.locale),"snapThreshold"in e&&o(101,Xt=e.snapThreshold),"snapPointer"in e&&o(102,Yt=e.snapPointer),"enableSnapToContext"in e&&o(103,qt=e.enableSnapToContext),"gridSize"in e&&o(104,Kt=e.gridSize)},e.$$.update=()=>{var t,n;32&e.$$.dirty[2]|2048&e.$$.dirty[3]&&o(169,i=Kt>0?{x:0,y:0,...Ue}:void 0),1&e.$$.dirty[0]|8388608&e.$$.dirty[5]&&o(147,r=!Ee&&ae&&(Ro()||Wo())),8388608&e.$$.dirty[4]&&o(176,a=!!r),8388608&e.$$.dirty[4]&&o(163,s=r&&zi(r)),8388608&e.$$.dirty[4]|256&e.$$.dirty[5]&&o(10,l=r&&!s?r.id:void 0),8&e.$$.dirty[0]|32&e.$$.dirty[2]|8388608&e.$$.dirty[4]&&o(13,c=Xe&&r&&gn($i(r),Ue)),8388608&e.$$.dirty[4]|256&e.$$.dirty[5]&&o(145,d=!(!r||!s)),8192&e.$$.dirty[0]|16&e.$$.dirty[2]|8388608&e.$$.dirty[4]&&o(175,u=r&&je&&gi(c)||[]),8388608&e.$$.dirty[4]&&o(177,h=r&&Yi(t=r)&&qi(t)&&!0!==t.disableResize&&(Fi(t)||Ci(t)||Mi(t)||Ri(t)||Pi(t)&&Fo(t,"pathClose"))&&!Ei(r)),8388608&e.$$.dirty[4]&&o(14,p=r&&(e=>Yi(e)&&!0!==e.disableRotate&&(Fi(e)||Fo(e,"text")||Mi(e)))(r)&&!Ei(r)),8388608&e.$$.dirty[4]|4194304&e.$$.dirty[5]&&o(17,m=h&&Fo(r,"text")&&!r.height?[[1,2],[3,0]]:(!r||!Ri(r)&&!Pi(r))&&h),131072&e.$$.dirty[0]|8388608&e.$$.dirty[4]|4194304&e.$$.dirty[5]&&o(29,g=!!r&&!Array.isArray(m)&&h),8388608&e.$$.dirty[4]|1048576&e.$$.dirty[5]&&o(15,$=r&&u.length>1),8&e.$$.dirty[3]|1048576&e.$$.dirty[5]&&o(173,f=u.map(_t)),4&e.$$.dirty[0]|262144&e.$$.dirty[5]&&o(12,y=f.map((e=>he(e.x-Oe.x,e.y-Oe.y)))),8388608&e.$$.dirty[4]&&o(16,b=r&&r.points&&Lo(r.selectedPoint)?r.selectedPoint:-1),65536&e.$$.dirty[0]&&o(155,x=b>=0),69632&e.$$.dirty[0]|1&e.$$.dirty[5]&&o(160,v=x?y[b]:void 0),8388608&e.$$.dirty[4]|2097152&e.$$.dirty[5]&&o(28,w=a&&(Ci(r)?!Fo(r,"disableNewline")||!r.disableNewline:!1===r.disableNewline)),8&e.$$.dirty[3]|524288&e.$$.dirty[4]&&(Oi&&_t&&!Ai(Oi)&&Ni(Oi)?(e=>{const t=gi(gn($i(e),Ue));if(!t)return;const o=t.map(_t),i=!!e.pathClose||!(!e.bitmap&&(Pi(e)||Ri(e))),n="hook"===e.selectionStyle,r=n?o.map(((e,t,o)=>({id:"markup-hover",points:Ki(o,t),strokeColor:[0,0,0,.1],strokeWidth:2}))):[{id:"markup-hover",points:o.map((e=>he(e.x+1,e.y+1))),strokeColor:[0,0,0,.1],strokeWidth:2,pathClose:i}],a=n?o.map(((e,t,o)=>({id:"markup-hover",points:Ki(o,t),strokeColor:Ke,strokeWidth:2}))):[{id:"markup-hover",points:o,strokeColor:Ke,strokeWidth:2,pathClose:i}];Di(...r,...a)})(Oi):Li()),61440&e.$$.dirty[0]|16&e.$$.dirty[2]&&o(174,S=$&&p&&je&&y&&(e=>{const t=fi(e),o=_t({x:t.origin.x+t.dir.x,y:t.origin.y+t.dir.y});return{origin:_t(t.origin),position:o}})(c)),4&e.$$.dirty[0]|524288&e.$$.dirty[5]&&o(27,k=S&&he(S.position.x-Oe.x,S.position.y-Oe.y)),33554432&e.$$.dirty[5]&&o(168,P=!!(pe||[]).find((e=>[91,93,17].includes(e)))),512&e.$$.dirty[3]|8192&e.$$.dirty[5]&&o(170,C=!(P||!Yt)),16&e.$$.dirty[2]|9437184&e.$$.dirty[4]|295168&e.$$.dirty[5]&&r&&f&&je>0&&(r===Oi&&en(),((e,t,o)=>{if(!Ni(t))return;const i=Pi(t),n=i&&Fo(t,"pathClose"),r=n&&(e=>e.strokeWidth&&((e,t)=>{const o=e.strokeColor;return!!o&&(3===o.length||o[3]>0)})(e))(t),a=zi(t),s=Ei(t),l="hook"===t.selectionStyle,c=!0!==t.disableShowPoints,{selectionOpacity:d=1}=t;if(a&&i&&!n)return;const h=[],p=[...f],m=p[p.length-1],g=p[0],$=(s?.05:.1)*e*d,y=$>0,b=(s?.5:1)*e*d,x=b>0,v=[0,0,0],w=[1,1,1],k=s?1:1.5;pe.includes(16)&&m&&o&&co(m,o);const C=(p.length&&n&&a&&o?Re(g,o):1/0)<=256,T=(p.length&&n&&a&&o?Re(m,o):1/0)<=256;!C&&o&&p.push(o);const M=p.length>1,R=!!t.pathClose||!(!t.bitmap&&(Pi(t)||Ri(t)))||p.length>2&&C;M&&y&&(l?h.push(...p.map(((e,t,o)=>({id:Bi,points:Ki(o,t),strokeColor:v,opacity:$})))):h.push({id:Bi,points:p.map((e=>he(e.x+1,e.y+1))),pathClose:R,strokeColor:v,strokeWidth:2,opacity:$})),n&&y&&c&&h.push(...p.map((e=>({id:Bi,...e,rx:2*k,ry:2*k,backgroundColor:v,opacity:$})))),S&&y&&h.push({id:Bi,points:[he(S.origin.x+1,S.origin.y+1),he(S.position.x+1,S.position.y+1)],strokeColor:v,strokeWidth:2,opacity:$}),M&&x&&(l?h.push(...p.map(((e,t,o)=>({id:Bi,points:Ki(o,t),strokeColor:w,strokeWidth:k,opacity:b})))):h.push({id:Bi,points:p,pathClose:R,strokeColor:w,strokeWidth:k,backgroundColor:a&&n&&t.backgroundColor&&t.backgroundColor[3]>0?t.backgroundColor:[0,0,0,0],opacity:b})),n&&c&&h.push(...p.map((e=>({id:Bi,...e,rx:3*k,ry:3*k,backgroundColor:[.5,.5,.5],strokeWidth:k,strokeColor:w})))),n&&a&&c&&f.length>=3&&h.push({...g,id:Bi,rx:k*(C?5:4),ry:k*(C?5:4),backgroundColor:C?Ke:[.5,.5,.5],strokeWidth:k,strokeColor:w}),n&&a&&r&&c&&!C&&u.length>=2&&h.push({...m,id:Bi,rx:k*(T?5:4),ry:k*(T?5:4),backgroundColor:T?Ke:[.5,.5,.5],strokeWidth:k,strokeColor:w}),S&&x&&!l&&h.push({id:Bi,points:[{x:S.origin.x,y:S.origin.y},{x:S.position.x,y:S.position.y}],strokeColor:w,strokeWidth:k,opacity:b}),Qi(...h)})(je,r,s&&Pi(r)?tn({...Vn},!C):void 0)),8388608&e.$$.dirty[4]&&(r||(en(),Ji())),524288&e.$$.dirty[4]&&o(171,M=!!Oi),131072&e.$$.dirty[4]&&o(172,R=!!si),1048576&e.$$.dirty[4]|229376&e.$$.dirty[5]&&(!Vn||R||M||tn({...Vn},!C)),512&e.$$.dirty[2]|2056&e.$$.dirty[3]|67125248&e.$$.dirty[5]&&Kt>0&&i&&_t&&((e,t,o,i)=>{const n=_t({x:0,y:0}),r=_t({x:e,y:e}),a=_t({x:t.width,y:t.height}),s=r.x-n.x;if(on.set(s>6?1:0),i<=0)return rn();const l=yo(s,n.x,a.x).map((e=>({id:nn,opacity:i,points:[{x:e,y:n.y},{x:e,y:a.y}],strokeWidth:1,strokeColor:o}))),c=yo(s,n.y,a.y).map((e=>({id:nn,opacity:i,points:[{x:n.x,y:e},{x:a.x,y:e}],strokeWidth:1,strokeColor:o})));an(...c,...l)})(Kt,i,Qe,ge),1024&e.$$.dirty[2]|8&e.$$.dirty[3]|98304&e.$$.dirty[4]|8192&e.$$.dirty[5]&&_t&&(P?cn():((e,t,o)=>{if(null===e&&null===t)return cn();let i,n;null!==e&&(i={id:ln,strokeColor:o,strokeWidth:1.5,points:[_t({x:e,y:0}),_t({x:e,y:Ue.height})]}),null!==t&&(n={id:ln,strokeColor:o,strokeWidth:1.5,points:[_t({x:0,y:t}),_t({x:Ue.width,y:t})]}),dn(i,n)})(go,$o,et)),8&e.$$.dirty[2]&&(e=>{if(!e)return Bo({_prerender:!1});const t=ae.find((e=>e.isEditing));t&&Do(t,{_prerender:"inline"===tt})})(He),33554432&e.$$.dirty[5]&&pe&&pe.length&&(()=>{const[e]=pe;8!==e&&46!==e||Vo()&&(r.isEditing||(Pi(r)&&Lo(r.selectedPoint)?setTimeout((()=>Mo(r,r.selectedPoint)),0):setTimeout((()=>No()),0)))})(),272&e.$$.dirty[0]&&un&&"inline"===tt&&un.focus(),8388608&e.$$.dirty[4]&&o(167,E=r&&Si(r)),8388608&e.$$.dirty[4]|4096&e.$$.dirty[5]&&o(11,A=E&&!1!==Ui(r)&&Ei(r)),2048&e.$$.dirty[0]&&o(162,L=A?{...r}:void 0),32&e.$$.dirty[2]|128&e.$$.dirty[5]&&o(164,z=L&&gn({...L},Ue)),512&e.$$.dirty[5]&&o(166,D=z&&ni(z.text,z)),2560&e.$$.dirty[5]&&(O=z&&at(z.x,z.y,D.width,D.height)),2048&e.$$.dirty[0]|8388608&e.$$.dirty[4]&&o(24,B=A?r.text:""),2056&e.$$.dirty[0]|32&e.$$.dirty[2]|8388608&e.$$.dirty[4]&&o(165,W=Xe&&r&&A&&gn({...$i(r),width:Lo(r.width)?Math.floor(r.width):void 0,height:Lo(r.height)?Math.floor(r.height):void 0},Ue)),2064&e.$$.dirty[0]|1024&e.$$.dirty[5]&&o(26,V=A&&((e,t)=>{const{textAlign:o="left",fontFamily:i="sans-serif",fontWeight:n="normal",fontStyle:r="normal",letterSpacing:a="normal",textShadowX:s=0,textShadowY:l=0,textShadowBlur:c=0,textShadowColor:d,textOutlineWidth:u=0,textOutlineColor:h}=e,p="!important",m=`caret-color:${N};text-align:${o}${p};font-family:${i}${p};font-weight:${n}${p};font-style:${r}${p};letter-spacing:${Lo(a)?a+"px":"normal"}${p}`;if("modal"===t)return m;const g=u?`;-webkit-text-stroke:${2*u}px ${jo(h)} ${p}`:"",$=c||s||l?`;text-shadow:${s}px ${l}px ${c}px ${jo(d)} ${p}`:"";let f=e.fontSize,y=1,b="";f>1e3&&F()&&(y=f/1e3,b=`transform-origin:0 0;transform:scale(${y})`,f=1e3);let x=e.lineHeight/y;const v=jo(e.color),w=.5*Math.max(0,f-x);return`--font-scalar:${y};--bottom-inset:${w}px;padding:${w}px 0 0${p};color:${v}${p};font-size:${f}px${p};line-height:${x}px${p};${m};${b}${g}${$}`})(W,tt)),2052&e.$$.dirty[0]|1073741824&e.$$.dirty[1]|4&e.$$.dirty[2]|1024&e.$$.dirty[5]&&o(25,_=A&&((e,t,o,i)=>{let n,a;e.width&&e.height?(n=st(e),a=De(e)):(a=ni(r.text,c),a.width=c.width||a.width,n=he(e.x+.5*a.width,e.y+.5*a.height));const s=Math.max(0,e.fontSize-e.lineHeight)+e.lineHeight,l=_t(n);let d=l.x-t.x-.5*a.width,u=l.y-t.y-.5*a.height,h=e.flipX,p=e.flipY,m=e.rotation;We&&_e?(h=!h,p=!p):We?(h=!h,m=-m):_e&&(p=!p,m=-m),m+=i;const g=o*(h?-1:1),$=o*(p?-1:1);return`--line-height:${s}px;width:${a.width}px;height:${a.height}px;transform:translate(${d}px,${u}px) rotate(${m}rad) scale(${g}, ${$})`})(W,Oe,Ne,Be)),256&e.$$.dirty[2]&&(N=Je?jo(Je):"auto"),2320&e.$$.dirty[0]&&A&&un&&"inline"===tt&&hn(B),144703488&e.$$.dirty[4]&&o(151,H=r&&!d?r:H),134217728&e.$$.dirty[4]&&o(153,j=H&&ji(H)),134217728&e.$$.dirty[4]&&o(148,U=H&&Gi(H)),134217728&e.$$.dirty[4]&&o(150,G=H&&(e=>!0!==e.disableDuplicate&&qi(e))(H)),134217728&e.$$.dirty[4]&&o(149,X=H&&Hi(H)),134217728&e.$$.dirty[4]&&o(152,Y=H&&(e=>!0!==e.disableReorder)(H)),134217728&e.$$.dirty[4]&&o(146,q=H&&!1!==Ui(H)),134217728&e.$$.dirty[4]&&o(154,K=H&&Fo(H,"backgroundImage")&&_i(H,"opacity")),8388608&e.$$.dirty[4]&&o(157,J=r&&"html"===r.format),10485760&e.$$.dirty[4]|4&e.$$.dirty[5]&&o(161,Q=r&&(!d||J)),262144&e.$$.dirty[4]|16777280&e.$$.dirty[5]&&zn.set(Q&&!hi?1:0,{hard:!1===ce}),4096&e.$$.dirty[0]|80&e.$$.dirty[5]&&o(159,ee=Q&&y.length?(n=it(y),ve(he(n.x+.5*n.width,n.y),tu)):ee),512&e.$$.dirty[0]|64&e.$$.dirty[2]|48&e.$$.dirty[5]&&o(158,te=(v||ee)&&Fn&&qe&&((e,t,o,i)=>{const n=e.x,r=e.y,a=n+e.width;let s=Math.max(t.x-.5*o.width,n),l=Math.max(t.y-o.height-16,r);return s+o.width>a&&(s=a-o.width),he(s,l)})(qe,v||ee,Fn)),262144&e.$$.dirty[0]|8&e.$$.dirty[5]&&o(23,oe=te&&`transform: translate(${te.x}px, ${te.y}px);opacity:${se}`),2048&e.$$.dirty[0]&&o(156,ie=A?"text":"shape"),1088&e.$$.dirty[0]|1073741824&e.$$.dirty[2]|65&e.$$.dirty[3]|2143289344&e.$$.dirty[4]|8388615&e.$$.dirty[5]&&o(22,ne="text"===ie&&Lt&&J?Yp((()=>Lt([["div","text-styles",{class:"PinturaShapeControlsGroup"},[...[["bold",{label:"B",style:"font-weight:900;",title:"Bold",shortcut:["CMD","B"]}],["italic",{label:"I",style:"font-family:Times New Roman;font-style:italic;",title:"Italic",shortcut:["CMD","I"]}],["underline",{label:"U",style:"text-decoration:underline;",title:"Underline",shortcut:["CMD","U"]}],["strikeThrough",{label:"S",style:"text-decoration:line-through;",title:"Strikethrough",shortcut:["CMD","S"]}]].map((([e,t])=>["Button","style-"+e,{onclick:()=>document.execCommand(e),...t,style:"font-size:1.25em;text-underline-offset:1px;text-decoration-thickness:1.5px;font-weight:400;"+t.style}]))]],["div","text-reset",{class:"PinturaShapeControlsGroup"},[["Button","style-reset",{onclick:()=>document.execCommand("removeFormat"),style:"font-weight:400;",label:'<span style="font-size:1.25em;font-style:italic;font-family:Times New Roman;text-decoration:underline;">T</span><span style="position:relative;top:.175rem;">&times;</span>',title:"Remove styles"}]]]],l))):"shape"===ie&&At&&l?Yp((()=>At(x?[["div","epsilon",{class:"PinturaShapeControlsGroup"},[["Button","remove-point",{onclick:Sn,label:Zt.shapeTitleButtonRemove,icon:Zt.shapeIconButtonRemove,shortcut:["Backspace"],hideLabel:!0}]]]]:[K&&["div","alpha",{class:"PinturaShapeControlsGroup"},[["ToggleSlider","adjust-opacity",{onrelease:Pn,onchange:Rn,step:.01,value:Fo(r,"opacity")?r.opacity:1,label:(e,t,o)=>Math.round(e/o*100)+"%",min:0,max:1,direction:"x"}]]],["div","beta",{class:"PinturaShapeControlsGroup"},[j&&["Button","flip-horizontal",{onclick:Tn,label:Zt.shapeTitleButtonFlipHorizontal,icon:Zt.shapeIconButtonFlipHorizontal,hideLabel:!0}],j&&jt&&["Button","flip-vertical",{onclick:Mn,label:Zt.shapeTitleButtonFlipVertical,icon:Zt.shapeIconButtonFlipVertical,hideLabel:!0}],Y&&["Button","to-front",{onclick:In,label:Zt.shapeTitleButtonMoveToFront,icon:Zt.shapeIconButtonMoveToFront,hideLabel:!0,disabled:ae[ae.length-1]===H}],G&&["Button","duplicate",{onclick:An,label:Zt.shapeTitleButtonDuplicate,icon:Zt.shapeIconButtonDuplicate,shortcut:["CMD","D"],hideLabel:!0}],X&&["Button","remove",{onclick:En,label:Zt.shapeTitleButtonRemove,icon:Zt.shapeIconButtonRemove,shortcut:["Backspace"],hideLabel:!0}]].filter(Boolean)],q&&U&&["div","gamma",{class:"PinturaShapeControlsGroup"},[["Button","text-layout",{onclick:Cn,label:wu(On,Zt,r),icon:wu(Dn,Zt,r),hideLabel:!0}]]],q&&["div","delta",{class:"PinturaShapeControlsGroup"},[["Button","edit-text",{label:Zt.shapeLabelInputText,onclick:kn}]]]].filter(Boolean),l))):[]),64&e.$$.dirty[0]|8388608&e.$$.dirty[5]&&o(21,re=ae.filter(Ni).filter((e=>e.id)).filter((e=>!zi(e))).map((e=>({id:e.id,color:Si(e)?e.color:Ri(e)?e.strokeColor:e.backgroundColor,name:e.name||Zt["shapeLabelTool"+Ja(sn(e))]}))))},[Ee,ze,Oe,Xe,tt,Gt,Zt,Xo,un,Fn,l,A,y,c,p,$,b,m,se,Bn,Nn,re,ne,oe,B,_,V,k,w,g,eo,uo,e=>{const{origin:t}=e.detail;o(141,si=void 0),li=void 0,ci=void 0,di=!1,ai=void 0,ui=!1,mo(),clearTimeout(ri),ri=setTimeout((()=>o(142,hi=!0)),250);const i=Ro();if(!i||Pi(i)&&Fo(i,"pathClose")||Eo(),ii=Vt(me(t)),i&&Pi(i)&&Fo(i,"pathClose"))return rt(e);const n=ti(ae,ii,Ht,(e=>Ni(e))),a=n.length&&n.shift();if(r&&Ei(r)&&($n(),Ut&&(ui=!0)),!a&&r&&Ei(r)&&Yo(r),Wt(t)){if(a&&Ai(a))return di=!0,o(141,si=a),li=$i(si),void(ci=gn($i(si),Ue));ai=a||void 0,!rt(e)&&a&&(Xo(a),o(141,si=a),li=$i(si),ci=gn($i(si),Ue))}},e=>{pi(),ut(e)},e=>{const{translation:t,ctrlKey:o,metaKey:n,shiftKey:r,position:a}=e.detail;if(si){if(!qi(si))return;if(Ei(si))return;if(r){let e=Math.abs(t.x),o=Math.abs(t.y);"x"===mi&&(o-=64),"y"===mi&&(e-=64),e>o?(t.y=0,mi="x"):o>e&&(t.x=0,mi="y")}else mi=null;return So(si,ci,t,{...Qt(o||n?0:Xt,Kt,i,si)})}lt(e)},e=>{if(pi(),si){if(Ei(si)&&fn(),e.detail.isTap&&Pi(si)&&Xi(si)){const{position:t}=e.detail,o=Vt(me(t));return void((e,t)=>{const o=e.points,i=[];for(let e=0;e<o.length-1;e++)i.push([o[e],o[e+1]]);i.push([o[o.length-1],o[0]]);const n=i.findIndex((([e,o])=>Ft(t,6,e,o)));let r;const a=[];for(let e=0;e<i.length;e++)a.push(i[e][0]),e===n&&(r=e+1,a.push(t));Do(e,{points:a,selectedPoint:r})})(si,o)}e.detail.isTap&&di&&Si(si)&&!1!==Ui(si)&&qo(si)}else ct(e)},e=>{const t=ai&&e.detail.isTap;if(e.detail.isTap&&setTimeout((()=>{kt({target:si||ai,position:ii},0)})),si)return yt(si),i=si,n=li,JSON.stringify(i)!==JSON.stringify(n)&&pt(si),void o(141,si=void 0);var i,n;const r=Zo(),a=!r||Mt(r,ai||void 0);a&&Go({storePrevious:!1}),dt(e),a&&t&&Xo(ai)},on,e=>{o(142,hi=!0),o(141,si=r),ci=c},e=>{if(!si)return void o(142,hi=!1);const{translation:t,indexes:r,shiftKey:a,ctrlKey:s,metaKey:l,isNudge:c}=e.detail;((e,t,o,i,r)=>{const{shiftKey:a,snapThreshold:s=0,gridSize:l=0,gridRect:c,snapTargets:d=[]}=r||{},u=s?(e,t,o)=>{const{snapTranslation:i,snapLines:n}=vo(bo(e),d,s,l,c);wo(t,i),po(n);const r=fo(o(),t);e.x=r.x,e.y=r.y}:n;if(Ri(e)||Pi(e)&&Fo(e,"pathClose")){const[n]=o,r=a?co:(e,t)=>t;let s,l,c;if(Ri(e))0===n?(s=()=>vi(t),l=e=>r(wi(t),e),c=(e,t)=>{e.x1=t.x,e.y1=t.y}):1===n&&(s=()=>wi(t),l=e=>r(vi(t),e),c=(e,t)=>{e.x2=t.x,e.y2=t.y});else{const e=t.points;s=()=>({...e[n]}),l=t=>{const o=e[Fy(n-1,e)],i=e[Fy(n+1,e)];r(o,t),r(i,t)},c=(e,t)=>e.points=e.points.map(((e,o)=>n===o?t:e))}const d=fo(s(),i);u(d,i,s),l(d),c(e,d)}else if(Fi(e)||Mi(e)||Ci(e)){let n,a,s=!1;if(Mi(e))n=nt(t);else if(Fi(e))n=ot(t);else{s=!0,n=ot(t);const e=ni(t.text,t);n.height=e.height}e.aspectRatio?a=e.aspectRatio:r.shiftKey&&!s&&(a=n.width/n.height);const l=ot(n),c=st(l),d=e.rotation,h=St(l),p=ft(l,d);if(1===o.length){let t=o[0];e.flipX&&(t=ko[t]),e.flipY&&(t=Co[t]);const[n,r,s,l]=h,m=_t(p[t]),g=we({...m},i),$=Vt(g);u($,i,(()=>Vt(m)));const f=he($.x-p[t].x,$.y-p[t].y),y=$e(me(f),-d),b=he(h[t].x+y.x,h[t].y+y.y);let x;0===t&&(x=s),1===t&&(x=l),2===t&&(x=n),3===t&&(x=r);const v=it([x,b]);if(a){const{width:e,height:t}=vt(v,a),[o,i,n,r]=wt(v);v.width=e,v.height=t,b.y<x.y&&(v.y=n-t),b.x<x.x&&(v.x=i-e)}const w=ft(v,d,c),S=Ie(w),k=$e(w[0],-d,S),C=$e(w[2],-d,S),T=it([k,C]);lo(e,Mi(e)?de(T):T,Ue)}else{o=o.map((t=>(e.flipX&&(t=ko[t]),e.flipY&&(t=Co[t]),t)));const[t,n]=o.map((e=>p[e])),r={x:t.x+.5*(n.x-t.x),y:t.y+.5*(n.y-t.y)},[l,m]=o.map((e=>h[e])),[g,$]=o.map((e=>{const t=e+2;return t<4?h[t]:h[t-4]})),f={x:g.x+.5*($.x-g.x),y:g.y+.5*($.y-g.y)},y=_t(r),b=we({...y},i),x=Vt(b);u(x,i,(()=>Vt(y)));const v=he(x.x-r.x,x.y-r.y),w=$e(me(v),-d),S=Se(me(l),m),k=ve(S,(e=>1-Math.abs(Math.sign(e)))),C=he(w.x*k.x,w.y*k.y);we(l,C),we(m,C);const T=it(h);if(a){let e=T.width,t=T.height;0===k.y?t=e/a:e=t*a,T.width=e,T.height=t,0===k.y?T.y=f.y-.5*t:T.x=f.x-.5*e}const M=ft(T,d,c),R=Ie(M),P=$e(M[0],-d,R),E=$e(M[2],-d,R),I=it([P,E]);let A;Mi(e)?A=de(I):Fi(e)?A=I:s&&(A={x:I.x,y:I.y,width:I.width}),lo(e,A,Ue)}}Ao()})(si,ci,r,t,{shiftKey:!c&&a,...Qt(s||l?0:Xt,Kt,i,si)}),Zi(si)&&Re(t)>16&&Do(si,{selectedPoint:void 0})},e=>{if(!si)return void o(142,hi=!1);Xo(si);const{isTap:t,translation:i,indexes:n}=e.detail;t&&(Zi(si)&&Do(si,{selectedPoint:si.selectedPoint===n[0]?void 0:n[0]}),yt(si)),o(141,si=void 0),o(142,hi=!1),pt(r)},e=>{To=fi(c).origin,o(142,hi=!0),o(141,si=r),ci=c},e=>{if(!si)return void o(142,hi=!1);const{translation:t,shiftKey:i}=e.detail;((e,t,o,i)=>{const n=ei(gn($i(e),Ue)),r=st(n),a=fo(To,o);let s=be(a,r)+Math.PI/2;if(i.shiftKey){const e=Math.PI/16;s=e*Math.round(s/e)-Be%e}lo(e,{rotation:s},Ue),Ao()})(si,0,t,{shiftKey:i})},()=>{si?(Xo(si),o(141,si=void 0),o(142,hi=!1),pt(r)):o(142,hi=!1)},e=>{const{key:t}=e,o=/escape/i.test(t);if(Vo())return o?(e.preventDefault(),e.stopPropagation(),Yo(r)):void(G&&"d"===t&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),e.stopPropagation(),Ln()))},e=>{const t=Ui(r,e);return!0===t?e:t},mn,e=>{const{target:t,key:o}=e,i=t.value||t.innerText,n=t.selectionStart||0,a=t.selectionEnd||i.length,s=i.substring(0,n)+o+i.substring(a);if(Ui(r,s)!==s)return e.preventDefault()},e=>ki(r)&&/enter/i.test(e.code)&&!1!==r.disableNewline?e.preventDefault():/arrow/i.test(e.code)?e.stopPropagation():/escape/i.test(e.key)?fn():void 0,e=>{const{key:t,ctrlKey:o,altKey:i}=e;if(/enter/i.test(t)&&(o||i))return $n()},$n,fn,zn,e=>{const t=Wo();t&&(Ei(t)||qi(t)&&(o(141,si=t),ci=gn($i(si),Ue),So(si,ci,e.detail)))},e=>{o(19,Bn=!0)},({relatedTarget:e})=>{e&&e.classList.contains("shape-selector__button")||o(19,Bn=!1)},e=>{if("touch"===e.pointerType||"PinturaShapeEditor"!==e.target.className)return void Ct();(hi||ri)&&_n(void 0);const t=Hy(e,Xe);o(144,Vn=me(t));const i=ve(Vt(t),(e=>Math.round(e)));if(xe(i,Wn))return;if(Wn=me(i),xt(hi,t,i),hi||ri)return;if(d)return;const[n]=ti(ae,i,0,Ni);n&&zi(n)||_n(n)},e=>{"touch"!==e.pointerType&&Ct()},Te,Me,Fe,Be,We,_e,Ne,He,je,Ue,qe,Ke,Je,Qe,et,rt,lt,ct,dt,ut,ht,pt,mt,gt,$t,yt,bt,xt,kt,Ct,Tt,Mt,Rt,Pt,At,Lt,Wt,Vt,_t,Nt,Ht,jt,Ut,Xt,Yt,qt,Kt,to,oo,io,no,ro,ao,so,(e,t={})=>{let o,n,r,a=Mi(e),s=Si(e),l="relative"===t.position;const c=Jt(),d=e=>{if(!Xt)return e;const t=Vt(e),{snapTranslation:o,snapLines:n}=vo(bo(t),c,Xt,Kt,i);return wo(e,o),po(n),e},u=!!Zo(),h=t.isSelection?Fe:ze,p="step"===t.inputMode;if(Pi(e)){if(p){let t=!1;const i=(e,o)=>{const i=oo(h),n=e&&he(Jy(e.x,Ue.width),Jy(e.y,Ue.height)),r=n&&_t(n);pe.includes(16)&&r&&co(r,o);const a=Vt(o),s=i.points.length?i.points[0]:a,c=he(Jy(s.x,Ue.width),Jy(s.y,Ue.height)),d=_t(c),u=Re(d,o);if(!t&&1===i.points.length&&u<36)return no(h);if(i.points.length>2&&u<=256){i.pathClose=!0,Ni(i)&&Xo(i);const e=ro(h);return void ht(e)}const p=i.strokeWidth&&i.strokeColor&&(void 0===i.strokeColor[3]||i.strokeColor[3]>0),m=Re(r,o);if(p&&i.points.length>1&&m<256){i.pathClose=!1,i.backgroundColor=[0,0,0,0],Ni(i)&&Xo(i);const e=ro(h);ht(e)}else if(!(i.points.length>0&&m<100))return l?Qy(a,Ue):a};return{start:e=>{const a=oo(h),{origin:s}=e.detail;if(n=4,o=d(me(s)),r=me(o),a){const e=a.points[a.points.length-1],t=i(e,o);return t&&(a.points=[...a.points,t]),void ao({points:a.points},h)}t=!0},update:e=>{if(!t)return;const n=oo(h);if(!n)return;const r=n.points[0],a=i(r,he(o.x+e.detail.translation.x,o.y+e.detail.translation.y));a&&(n.points[1]=a,ao({points:n.points},h))},release:e=>e.detail.preventInertia(),end:i=>{if(!t)return;const n=Vt(o),r=l?Qy(n,Ue):n,{isTap:a}=i.detail;if(a&&ti(ae,n,0,Ni).length)return no(h);io({...e,points:[r]},h)}}}return{start:t=>{const{origin:i}=t.detail;n=4,o=me(i),r=me(o);const a=Vt(o),s=l?Qy(a,Ue):a;io({...e,points:[s]},h)},update:e=>{const t=oo(h),{translation:i}=e.detail,a=he(o.x+i.x,o.y+i.y),s=Pe(r,a);if(le(s,5)<=n)return;const c=be(a,r),d=n-s;r.x+=d*Math.cos(c),r.y+=d*Math.sin(c);const u=Vt(r),p=l?Qy(u,Ue):u;ao({points:t.points.concat(p)},h)},release:e=>e.detail.preventInertia(),cancel:()=>{no(h)},end:e=>{const t=oo(h);if(e.detail.isTap){let e=!1;if(t.bitmap?(ai&&(e=!0),u&&(e=!0)):e=!0,e)return no(h)}const o=ro(h);ht(o)}}}return a||s||Ti(e)?{start:t=>{const{origin:i}=t.detail;o=d(me(i));const n=Vt(o),r=l?Qy(n,Ue):n,s=-1*ho(Be,We,_e),c={...e,rotation:s,...r};c.flipX=We,c.flipY=_e,delete c.position,c.opacity=0,(a?["rx","ry"]:["width","height"]).forEach((e=>{c[e]=l?"0%":0})),io(c,h)},update:e=>{const t=oo(h);t.opacity=1;let{aspectRatio:i}=t,{translation:n,shiftKey:r,ctrlKey:s}=e.detail;!i&&r&&(i=1);const l=d(he(o.x+n.x,o.y+n.y)),c=Vt(o),u=Vt(l);if(i){const e=it([c,u]),t=vt(e,i),o=u.x<c.x?-1:1,n=u.y<c.y?-1:1;u.x=c.x+t.width*o,u.y=c.y+t.height*n}const p={x:c.x+.5*(u.x-c.x),y:c.y+.5*(u.y-c.y)},m=ho(Be,We,_e);$e(c,m,p),$e(u,m,p);const g=Math.min(c.x,u.x),$=Math.min(c.y,u.y);let f=Math.max(c.x,u.x)-g,y=Math.max(c.y,u.y)-$,b={};a?(s?(b.x=c.x,b.y=c.y):(b.x=g+.5*f,b.y=$+.5*y),b.rx=.5*f,b.ry=.5*y):(s?(b.x=c.x-.5*f,b.y=c.y-.5*y):(b.x=g,b.y=$),b.width=f,b.height=y),ao(b,h,((e,t)=>lo(e,t,Ue)))},release:e=>{e.detail.preventInertia()},cancel:e=>{no(h)},end:e=>{const t=oo(h);if(e.detail.isTap){if(Si(t)&&Ut&&ui)return no(h);if(!Si(t)||!Ut||ai)return no(h);delete t.width,delete t.height,!1!==t.disableNewline&&delete t.textAlign;const e=gn({...t},Ue),i=ni(t.text,e),n=Vt({x:o.x,y:o.y-.5*i.height}),r=Vt({x:o.x+i.width,y:o.y+.5*i.height}),a={x:n.x+.5*(r.x-n.x),y:n.y+.5*(r.y-n.y)},s=ho(Be,We,_e);$e(n,s,a),$e(r,s,a);let l=Math.min(n.x,r.x),c=Math.min(n.y,r.y);l<0&&(l=0),c<0&&(c=0),l+i.width>Ue.width&&(l=Ue.width-i.width),c+i.height>Ue.height&&(c=Ue.height-i.height),t.x=T(t.x)?Ho(l,Ue.width):l,t.y=T(t.y)?Ho(c,Ue.height):c}if(t.opacity=1,Si(t))ht(t);else{const e=ro(h);ht(e)}Ni(t)&&Xo(t),Si(t)&&qo(t)}}:Ri(e)?{start:t=>{const{origin:i}=t.detail,n=Vt(d(i)),r=ve(n,tu);o=me(i),io({...e,x1:l?Ho(r.x,Ue.width):r.x,y1:l?Ho(r.y,Ue.height):r.y,x2:l?Ho(r.x,Ue.width):r.x,y2:l?Ho(r.y,Ue.height):r.y,opacity:0},h)},update:e=>{const{translation:t}=e.detail,i=d(we(me(o),t));if(pe.includes(16)){const e=Pe(o,i),t=be(o,i),n=Math.PI/4,r=n*Math.round(t/n);i.x=o.x+e*Math.cos(r),i.y=o.y+e*Math.sin(r)}const n=Vt(i);ao({x2:l?Ho(n.x,Ue.width):n.x,y2:l?Ho(n.y,Ue.height):n.y,opacity:1},h)},release:e=>e.detail.preventInertia(),cancel:e=>{no(h)},end:e=>{const t=oo(h);if(e.detail.isTap)return no(h);t.opacity=1;const o=ro(h);ht(o),Ni(t)&&Xo(o)}}:void 0},()=>{let e,t;const o=Nt*Nt,i=(e,t,i=!1)=>{const n=Re(e,t);if(!i&&n<2)return!1;const r=ae.filter((e=>!e.disableErase));let a;return a=n<o?ti(ae,Vt(t),Nt):oi(r,Vt(e),Vt(t),Nt),Jo(a).forEach($t),!0};return{start:o=>{e=he(Math.round(o.detail.origin.x),Math.round(o.detail.origin.y)),i(e,e,!0),t=e},update:o=>{const{translation:n}=o.detail,r=he(Math.round(e.x+n.x),Math.round(e.y+n.y));i(t,r)&&(t=me(r))},release:e=>e.detail.preventInertia(),end:()=>{}}},Ro,Po,e=>{if(!Ro())return Wi(e),so(e)},Eo,Io,(e={})=>({id:I(),...e}),Ao,zo,Do,Oo,(e,t,o=!0)=>{ae.forEach((o=>Oo(o,e,t,!1))),o&&Ao()},Bo,Wo,Vo,_o,No,Go,Yo,qo,Ko,Jo,Qo,ei,ti,oi,go,$o,si,hi,Oi,Vn,d,q,r,U,X,G,H,Y,j,K,x,ie,J,te,ee,v,Q,L,s,z,W,D,E,P,i,C,M,R,f,S,u,a,h,ae,ce,pe,ge,function(t){oa.call(this,e,t)},e=>Xo(ze[e]),function(e){na[e?"unshift":"push"]((()=>{un=e,o(8,un)}))},function(){B=this.value,o(24,B),o(11,A),o(147,r),o(167,E),o(0,Ee),o(178,ae)},function(e){na[e?"unshift":"push"]((()=>{un=e,o(8,un)}))},()=>{Nn&&Nn.focus()},e=>o(9,Fn=e.detail),function(e){na[e?"unshift":"push"]((()=>{Nn=e,o(20,Nn)}))},e=>Hy(e,Xe)]}class ub extends Ba{constructor(e){super(),Oa(this,e,db,lb,ir,{uid:58,ui:59,disabled:0,shapes:1,selection:60,offset:2,contextRotation:61,contextFlipX:62,contextFlipY:63,contextZoom:64,active:65,opacity:66,parentRect:67,rootRect:3,utilRect:68,hoverColor:69,caretColor:70,gridColor:71,snapColor:72,textInputMode:4,oninteractionstart:73,oninteractionupdate:74,oninteractionrelease:75,oninteractionend:76,oninteractioncancel:77,onaddshape:78,onupdateshape:79,onselectshape:80,onblurshape:81,onremoveshape:82,ontapshape:83,onhovershape:84,onhovercanvas:85,ontapcanvas:86,onleavecanvas:87,beforeSelectShape:88,beforeDeselectShape:89,beforeRemoveShape:90,beforeUpdateShape:91,willRenderShapeControls:92,willRenderShapeTextControls:93,willStartInteraction:94,mapEditorPointToImagePoint:95,mapImagePointToEditorPoint:96,eraseRadius:97,selectRadius:98,enableButtonFlipVertical:99,enableTapToAddText:100,enableTextStyleControls:5,locale:6,snapThreshold:101,snapPointer:102,enableSnapToContext:103,gridSize:104,syncShapeCollection:105,getShapeDraft:106,addShapeDraft:107,discardShapeDraft:108,confirmShapeDraft:109,updateShapeDraft:110,addShape:111,createShape:112,eraseShape:113,getMarkupItemDraft:114,getMarkupItemDraftIndex:115,addMarkupItemDraft:116,confirmMarkupItemDraft:117,discardMarkupItemDraft:118,createMarkupItem:119,syncShapes:120,removeMarkupShapeProps:121,updateMarkupShape:122,updateMarkupShapeProperty:123,updateMarkupItemsShapeProperty:124,updateMarkupShapeItems:125,getActiveMarkupItem:126,hasActiveMarkupItem:127,removeShape:128,removeActiveMarkupItem:129,blurShapes:130,selectShape:7,deselectMarkupItem:131,editMarkupItem:132,finishEditMarkupItem:133,removeMarkupItems:134,getTextShapeRect:135,getMarkupShapeRect:136,getShapesNearPosition:137,getShapesBetweenPoints:138},null,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1])}get syncShapeCollection(){return this.$$.ctx[105]}get getShapeDraft(){return this.$$.ctx[106]}get addShapeDraft(){return this.$$.ctx[107]}get discardShapeDraft(){return this.$$.ctx[108]}get confirmShapeDraft(){return this.$$.ctx[109]}get updateShapeDraft(){return this.$$.ctx[110]}get addShape(){return this.$$.ctx[111]}get createShape(){return this.$$.ctx[112]}get eraseShape(){return this.$$.ctx[113]}get getMarkupItemDraft(){return this.$$.ctx[114]}get getMarkupItemDraftIndex(){return this.$$.ctx[115]}get addMarkupItemDraft(){return this.$$.ctx[116]}get confirmMarkupItemDraft(){return this.$$.ctx[117]}get discardMarkupItemDraft(){return this.$$.ctx[118]}get createMarkupItem(){return this.$$.ctx[119]}get syncShapes(){return this.$$.ctx[120]}get removeMarkupShapeProps(){return this.$$.ctx[121]}get updateMarkupShape(){return this.$$.ctx[122]}get updateMarkupShapeProperty(){return this.$$.ctx[123]}get updateMarkupItemsShapeProperty(){return this.$$.ctx[124]}get updateMarkupShapeItems(){return this.$$.ctx[125]}get getActiveMarkupItem(){return this.$$.ctx[126]}get hasActiveMarkupItem(){return this.$$.ctx[127]}get removeShape(){return this.$$.ctx[128]}get removeActiveMarkupItem(){return this.$$.ctx[129]}get blurShapes(){return this.$$.ctx[130]}get selectShape(){return this.$$.ctx[7]}get deselectMarkupItem(){return this.$$.ctx[131]}get editMarkupItem(){return this.$$.ctx[132]}get finishEditMarkupItem(){return this.$$.ctx[133]}get removeMarkupItems(){return this.$$.ctx[134]}get getTextShapeRect(){return this.$$.ctx[135]}get getMarkupShapeRect(){return this.$$.ctx[136]}get getShapesNearPosition(){return this.$$.ctx[137]}get getShapesBetweenPoints(){return this.$$.ctx[138]}}function hb(e){let t,o,i;return o=new Cp({props:{items:e[2]}}),{c(){t=Mr("ul"),za(o.$$.fragment),Fr(t,"class","PinturaShapeStyleList")},m(e,n){Cr(e,t,n),Fa(o,t,null),i=!0},p(e,t){const i={};4&t&&(i.items=e[2]),o.$set(i)},i(e){i||(Sa(o.$$.fragment,e),i=!0)},o(e){ka(o.$$.fragment,e),i=!1},d(e){e&&Tr(t),Da(o)}}}function pb(e){let t,o;return t=new Id({props:{class:"PinturaShapeStyles",elasticity:e[0],$$slots:{default:[mb]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};1&o&&(i.elasticity=e[0]),131076&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function mb(e){let t,o,i;return o=new Cp({props:{items:e[2]}}),{c(){t=Mr("ul"),za(o.$$.fragment),Fr(t,"class","PinturaShapeStyleList")},m(e,n){Cr(e,t,n),Fa(o,t,null),i=!0},p(e,t){const i={};4&t&&(i.items=e[2]),o.$set(i)},i(e){i||(Sa(o.$$.fragment,e),i=!0)},o(e){ka(o.$$.fragment,e),i=!1},d(e){e&&Tr(t),Da(o)}}}function gb(e){let t,o,i,n;const r=[pb,hb],a=[];function s(e,t){return e[1]?0:1}return o=s(e),i=a[o]=r[o](e),{c(){t=Mr("div"),i.c(),Fr(t,"style",e[3])},m(e,i){Cr(e,t,i),a[o].m(t,null),n=!0},p(e,[l]){let c=o;o=s(e),o===c?a[o].p(e,l):(va(),ka(a[c],1,1,(()=>{a[c]=null})),wa(),i=a[o],i?i.p(e,l):(i=a[o]=r[o](e),i.c()),Sa(i,1),i.m(t,null)),(!n||8&l)&&Fr(t,"style",e[3])},i(e){n||(Sa(i),n=!0)},o(e){ka(i),n=!1},d(e){e&&Tr(t),a[o].d()}}}function $b(e,t,o){let i,n,r,a,s,l,{isActive:c=!1}=t,{controls:d=[]}=t,{locale:u}=t,{scrollElasticity:h}=t,{scrollEnable:p=!0}=t,{hideTitles:m=!1}=t,{willRenderControls:g=Z}=t;const $=ta("redrawTrigger");ar(e,$,(e=>o(14,a=e)));const f=ta("env");ar(e,f,(e=>o(13,r=e)));const y=ta("isAnimated");ar(e,y,(e=>o(16,l=e)));const b=dc(0,{stiffness:.25,damping:.9});return ar(e,b,(e=>o(15,s=e))),e.$$set=e=>{"isActive"in e&&o(8,c=e.isActive),"controls"in e&&o(9,d=e.controls),"locale"in e&&o(10,u=e.locale),"scrollElasticity"in e&&o(0,h=e.scrollElasticity),"scrollEnable"in e&&o(1,p=e.scrollEnable),"hideTitles"in e&&o(11,m=e.hideTitles),"willRenderControls"in e&&o(12,g=e.willRenderControls)},e.$$.update=()=>{65792&e.$$.dirty&&b.set(c?1:0,{hard:!1===l}),33024&e.$$.dirty&&o(3,i=`opacity:${s};${c?"":"pointer-events:none;"}${s<=0?"visibility:hidden":""}`),32256&e.$$.dirty&&o(2,n=a&&g(d.map((e=>["ShapeStyle",e.id,{title:e.componentProps.title,locale:u,hideTitle:m,items:[[e.component,e.id,e.componentProps]]}])),r,(()=>$.set({}))))},[h,p,n,i,$,f,y,b,c,d,u,m,g,r,a,s,l]}class fb extends Ba{constructor(e){super(),Oa(this,e,$b,gb,ir,{isActive:8,controls:9,locale:10,scrollElasticity:0,scrollEnable:1,hideTitles:11,willRenderControls:12})}}function yb(e,t,o){const i=e.slice();return i[15]=t[o].key,i[6]=t[o].controls,i[16]=t[o].isActive,i}function bb(e,t){let o,i,n;return i=new fb({props:{isActive:t[16],controls:t[6],locale:t[1],scrollElasticity:t[2],scrollEnable:t[3],hideTitles:t[4],willRenderControls:t[5]}}),{key:e,first:null,c(){o=Ir(),za(i.$$.fragment),this.first=o},m(e,t){Cr(e,o,t),Fa(i,e,t),n=!0},p(e,o){t=e;const n={};128&o&&(n.isActive=t[16]),128&o&&(n.controls=t[6]),2&o&&(n.locale=t[1]),4&o&&(n.scrollElasticity=t[2]),8&o&&(n.scrollEnable=t[3]),16&o&&(n.hideTitles=t[4]),32&o&&(n.willRenderControls=t[5]),i.$set(n)},i(e){n||(Sa(i.$$.fragment,e),n=!0)},o(e){ka(i.$$.fragment,e),n=!1},d(e){e&&Tr(o),Da(i,e)}}}function xb(e){let t,o,i,n=[],r=new Map,a=e[7];const s=e=>e[15];for(let t=0;t<a.length;t+=1){let o=yb(e,a,t),i=s(o);r.set(i,n[t]=bb(i,o))}return{c(){t=Mr("div");for(let e=0;e<n.length;e+=1)n[e].c();Fr(t,"class",o=Oc(["PinturaShapeStyleEditor",!e[3]&&"PinturaShapeStyleEditorOverflow",e[0]]))},m(e,o){Cr(e,t,o);for(let e=0;e<n.length;e+=1)n[e].m(t,null);i=!0},p(e,[l]){190&l&&(a=e[7],va(),n=Ea(n,l,s,1,e,a,r,t,Pa,bb,null,yb),wa()),(!i||9&l&&o!==(o=Oc(["PinturaShapeStyleEditor",!e[3]&&"PinturaShapeStyleEditorOverflow",e[0]])))&&Fr(t,"class",o)},i(e){if(!i){for(let e=0;e<a.length;e+=1)Sa(n[e]);i=!0}},o(e){for(let e=0;e<n.length;e+=1)ka(n[e]);i=!1},d(e){e&&Tr(t);for(let e=0;e<n.length;e+=1)n[e].d()}}}function vb(e,t,o){let i,n,r,{class:a}=t,{controls:s={}}=t,{shape:l}=t,{onchange:c}=t,{locale:d}=t,{scrollElasticity:u}=t,{scrollEnable:h=!0}=t,{hideTitles:p=!1}=t,{willRenderControls:m}=t;const g=[];return e.$$set=e=>{"class"in e&&o(0,a=e.class),"controls"in e&&o(6,s=e.controls),"shape"in e&&o(8,l=e.shape),"onchange"in e&&o(9,c=e.onchange),"locale"in e&&o(1,d=e.locale),"scrollElasticity"in e&&o(2,u=e.scrollElasticity),"scrollEnable"in e&&o(3,h=e.scrollEnable),"hideTitles"in e&&o(4,p=e.hideTitles),"willRenderControls"in e&&o(5,m=e.willRenderControls)},e.$$.update=()=>{64&e.$$.dirty&&o(11,i=Object.keys(s).filter((e=>s[e]))),2304&e.$$.dirty&&o(10,n=l&&Object.keys(l).length&&i&&_i(l)?(e=>i.filter((t=>t.split("_").every((t=>Fo(e,t)&&_i(e,t))))).map((t=>{const o=(e.settings&&e.settings[t]||{}).control||t,i=t.split("_"),n=i.length>1?i.map((t=>e[t])):e[t];if(M(s[o])){const{title:i,component:r}=s[o](n,(e=>{c({[t]:e})}),{selectedShapeId:e.id});return{id:o,component:Cp,componentProps:{title:i,items:r}}}let[r,a]=s[o];if(T(r)&&s[r]){const e={...a};[r,a]=s[r],a={...a,...e}}const l=M(a.options)?a.options(e):a.options;return"RadioGroup"===r&&(a.selectedIndex=-1),{id:o,component:r,componentProps:{...a,options:l,locale:d,value:n,optionLabelClass:"PinturaButtonLabel",onchange:o=>{const n=S(o)&&!Do(o)?o.value:o;a.onchange&&a.onchange(n,e);const r=i.length>1?i.reduce(((e,t,o)=>({...e,[t]:Array.isArray(n)?n[o]:n})),{}):{[t]:n};c(r)}}}})).filter(Boolean))(l):[]),1280&e.$$.dirty&&o(7,r=((e,t)=>{let o=g.find((t=>t.key===e));return o||(o={key:e,controls:t},g.push(o)),g.forEach((e=>e.isActive=!1)),o.controls=t,o.isActive=!0,g})(l&&Object.keys(l).length?Object.keys(l).join("_"):"none",n||[]))},[a,d,u,h,p,m,s,r,l,c,n,i]}class wb extends Ba{constructor(e){super(),Oa(this,e,vb,xb,ir,{class:0,controls:6,shape:8,onchange:9,locale:1,scrollElasticity:2,scrollEnable:3,hideTitles:4,willRenderControls:5})}}var Sb=e=>/<svg /.test(e);function kb(e){let t,o;return t=new Cp({props:{items:e[10]}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};1024&o&&(i.items=e[10]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Cb(e){let t,o,i,n;const r=[Mb,Tb],a=[];function s(e,t){return e[8]?0:1}return t=s(e),o=a[t]=r[t](e),{c(){o.c(),i=Ir()},m(e,o){a[t].m(e,o),Cr(e,i,o),n=!0},p(e,n){let l=t;t=s(e),t===l?a[t].p(e,n):(va(),ka(a[l],1,1,(()=>{a[l]=null})),wa(),o=a[t],o?o.p(e,n):(o=a[t]=r[t](e),o.c()),Sa(o,1),o.m(i.parentNode,i))},i(e){n||(Sa(o),n=!0)},o(e){ka(o),n=!1},d(e){a[t].d(e),e&&Tr(i)}}}function Tb(e){let t,o,i,n,r=e[10]&&Rb(e);return i=new Id({props:{scrollAutoCancel:e[9],elasticity:e[0],$$slots:{default:[Pb]},$$scope:{ctx:e}}}),{c(){t=Mr("div"),r&&r.c(),o=Er(),za(i.$$.fragment),Fr(t,"class","PinturaShapePresetsFlat")},m(e,a){Cr(e,t,a),r&&r.m(t,null),wr(t,o),Fa(i,t,null),n=!0},p(e,n){e[10]?r?(r.p(e,n),1024&n&&Sa(r,1)):(r=Rb(e),r.c(),Sa(r,1),r.m(t,o)):r&&(va(),ka(r,1,1,(()=>{r=null})),wa());const a={};512&n&&(a.scrollAutoCancel=e[9]),1&n&&(a.elasticity=e[0]),536871070&n&&(a.$$scope={dirty:n,ctx:e}),i.$set(a)},i(e){n||(Sa(r),Sa(i.$$.fragment,e),n=!0)},o(e){ka(r),ka(i.$$.fragment,e),n=!1},d(e){e&&Tr(t),r&&r.d(),Da(i)}}}function Mb(e){let t,o,i,n,r;o=new Id({props:{elasticity:e[0],class:"PinturaShapePresetsGroups",$$slots:{default:[Fb]},$$scope:{ctx:e}}});const a=[{class:"PinturaControlPanels"},{panelClass:"PinturaControlPanel"},{panels:e[11]},e[12]];let s={$$slots:{default:[Ob,({panel:e,panelIsActive:t})=>({26:e,27:t}),({panel:e,panelIsActive:t})=>(e?67108864:0)|(t?134217728:0)]},$$scope:{ctx:e}};for(let e=0;e<a.length;e+=1)s=Jn(s,a[e]);return n=new id({props:s}),{c(){t=Mr("div"),za(o.$$.fragment),i=Er(),za(n.$$.fragment),Fr(t,"class","PinturaShapePresetsGrouped")},m(e,a){Cr(e,t,a),Fa(o,t,null),wr(t,i),Fa(n,t,null),r=!0},p(e,t){const i={};1&t&&(i.elasticity=e[0]),536876128&t&&(i.$$scope={dirty:t,ctx:e}),o.$set(i);const r=6144&t?Ia(a,[a[0],a[1],2048&t&&{panels:e[11]},4096&t&&Aa(e[12])]):{};738206239&t&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i(e){r||(Sa(o.$$.fragment,e),Sa(n.$$.fragment,e),r=!0)},o(e){ka(o.$$.fragment,e),ka(n.$$.fragment,e),r=!1},d(e){e&&Tr(t),Da(o),Da(n)}}}function Rb(e){let t,o;return t=new Cp({props:{items:e[10]}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};1024&o&&(i.items=e[10]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Pb(e){let t,o;return t=new Jd({props:{items:e[7],onclickitem:e[1],ongrabitem:e[2],ondragitem:e[3],ondropitem:e[4]}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};128&o&&(i.items=e[7]),2&o&&(i.onclickitem=e[1]),4&o&&(i.ongrabitem=e[2]),8&o&&(i.ondragitem=e[3]),16&o&&(i.ondropitem=e[4]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Eb(e){let t,o;return t=new Cp({props:{items:e[10]}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};1024&o&&(i.items=e[10]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Ib(e){let t,o;return t=new ud({props:{$$slots:{default:[Ab]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};805306368&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Ab(e){let t,o=e[28].icon+"";return{c(){t=Rr("g")},m(e,i){Cr(e,t,i),t.innerHTML=o},p(e,i){268435456&i&&o!==(o=e[28].icon+"")&&(t.innerHTML=o)},d(e){e&&Tr(t)}}}function Lb(e){let t,o,i=e[28].label+"";return{c(){t=Mr("span"),o=Pr(i)},m(e,i){Cr(e,t,i),wr(t,o)},p(e,t){268435456&t&&i!==(i=e[28].label+"")&&Br(o,i)},d(e){e&&Tr(t)}}}function zb(e){let t,o,i,n=e[28].icon&&Ib(e),r=!e[28].hideLabel&&Lb(e);return{c(){n&&n.c(),t=Er(),r&&r.c(),o=Ir()},m(e,a){n&&n.m(e,a),Cr(e,t,a),r&&r.m(e,a),Cr(e,o,a),i=!0},p(e,i){e[28].icon?n?(n.p(e,i),268435456&i&&Sa(n,1)):(n=Ib(e),n.c(),Sa(n,1),n.m(t.parentNode,t)):n&&(va(),ka(n,1,1,(()=>{n=null})),wa()),e[28].hideLabel?r&&(r.d(1),r=null):r?r.p(e,i):(r=Lb(e),r.c(),r.m(o.parentNode,o))},i(e){i||(Sa(n),i=!0)},o(e){ka(n),i=!1},d(e){n&&n.d(e),e&&Tr(t),r&&r.d(e),e&&Tr(o)}}}function Fb(e){let t,o,i,n=e[10]&&Eb(e);const r=[{class:"PinturaControlList"},{tabs:e[5]},e[12],{layout:"compact"}];let a={$$slots:{default:[zb,({tab:e})=>({28:e}),({tab:e})=>e?268435456:0]},$$scope:{ctx:e}};for(let e=0;e<r.length;e+=1)a=Jn(a,r[e]);return o=new Uc({props:a}),o.$on("select",e[18]),{c(){n&&n.c(),t=Er(),za(o.$$.fragment)},m(e,r){n&&n.m(e,r),Cr(e,t,r),Fa(o,e,r),i=!0},p(e,i){e[10]?n?(n.p(e,i),1024&i&&Sa(n,1)):(n=Eb(e),n.c(),Sa(n,1),n.m(t.parentNode,t)):n&&(va(),ka(n,1,1,(()=>{n=null})),wa());const a=4128&i?Ia(r,[r[0],32&i&&{tabs:e[5]},4096&i&&Aa(e[12]),r[3]]):{};805306368&i&&(a.$$scope={dirty:i,ctx:e}),o.$set(a)},i(e){i||(Sa(n),Sa(o.$$.fragment,e),i=!0)},o(e){ka(n),ka(o.$$.fragment,e),i=!1},d(e){n&&n.d(e),e&&Tr(t),Da(o,e)}}}function Db(e){let t,o;return t=new Jd({props:{items:e[13][e[26]].items,disabled:e[13][e[26]].disabled,onclickitem:e[1],ongrabitem:e[2],ondragitem:e[3],ondropitem:e[4]}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};67117056&o&&(i.items=e[13][e[26]].items),67117056&o&&(i.disabled=e[13][e[26]].disabled),2&o&&(i.onclickitem=e[1]),4&o&&(i.ongrabitem=e[2]),8&o&&(i.ondragitem=e[3]),16&o&&(i.ondropitem=e[4]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Ob(e){let t,o;return t=new Id({props:{scroll:e[27]?{scrollOffset:0,animate:!1}:void 0,scrollAutoCancel:e[9],elasticity:e[0],$$slots:{default:[Db]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};134217728&o&&(i.scroll=e[27]?{scrollOffset:0,animate:!1}:void 0),512&o&&(i.scrollAutoCancel=e[9]),1&o&&(i.elasticity=e[0]),603987998&o&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Bb(e){let t,o,i,n;const r=[Cb,kb],a=[];function s(e,t){return e[9]?0:e[10]?1:-1}return~(o=s(e))&&(i=a[o]=r[o](e)),{c(){t=Mr("div"),i&&i.c(),Fr(t,"class","PinturaShapePresetsPalette")},m(e,i){Cr(e,t,i),~o&&a[o].m(t,null),n=!0},p(e,[n]){let l=o;o=s(e),o===l?~o&&a[o].p(e,n):(i&&(va(),ka(a[l],1,1,(()=>{a[l]=null})),wa()),~o?(i=a[o],i?i.p(e,n):(i=a[o]=r[o](e),i.c()),Sa(i,1),i.m(t,null)):i=null)},i(e){n||(Sa(i),n=!0)},o(e){ka(i),n=!1},d(e){e&&Tr(t),~o&&a[o].d()}}}function Wb(e,t,o){let i,r,a,s,l,c,d,u,h,{locale:p}=t,{presets:m}=t,{scrollElasticity:g}=t,{enableSelectImage:$=!0}=t,{willRenderPresetToolbar:f=Z}=t,{onaddpreset:y=n}=t,{ongrabpreset:b}=t,{ondragpreset:x}=t,{ondroppreset:v}=t;const w="presets-"+I(),S=(e,t="")=>Sb(e)?e:zo(e)?_o(e,t):`<img src="${e}" alt="${t}"/>`,k=e=>N(Ht(e)),C=["src","alt","thumb","shape","id","mount","disabled"],M=e=>e.map((e=>(e=>Do(e)&&T(e[0])&&Do(e[1]))(e)?{...e[2],id:`${w}-${e[0].toLowerCase()}`,label:e[0],items:M(e[1])}:(e=>{let t,o,i,n,r,a,s,l=e;return T(e)?zo(e)?(t=e,r=e,n=S(t,r)):(t=e,r=k(t),n=S(t,r)):(t=e.src,r=e.alt||(T(t)?k(t):T(e.thumb)?k(e.thumb):void 0),n=S(e.thumb||t,r),o=e.shape,a=e.mount,s=e.disabled,i=Object.keys(e).reduce(((t,o)=>(C.includes(o)||(t[o]=e[o]),t)),{})),{id:l,src:t,thumb:n,shape:o,shapeProps:i,alt:r,title:r,mount:a,disabled:s}})(e)));return e.$$set=e=>{"locale"in e&&o(14,p=e.locale),"presets"in e&&o(15,m=e.presets),"scrollElasticity"in e&&o(0,g=e.scrollElasticity),"enableSelectImage"in e&&o(16,$=e.enableSelectImage),"willRenderPresetToolbar"in e&&o(17,f=e.willRenderPresetToolbar),"onaddpreset"in e&&o(1,y=e.onaddpreset),"ongrabpreset"in e&&o(2,b=e.ongrabpreset),"ondragpreset"in e&&o(3,x=e.ondragpreset),"ondroppreset"in e&&o(4,v=e.ondroppreset)},e.$$.update=()=>{32768&e.$$.dirty&&o(7,i=M(m)),128&e.$$.dirty&&o(9,r=i.length),640&e.$$.dirty&&o(8,a=r&&i.some((e=>!!e.items))),384&e.$$.dirty&&o(5,s=a&&i),384&e.$$.dirty&&o(13,l=a&&i.reduce(((e,t)=>(e[t.id]=t,e)),{})),96&e.$$.dirty&&o(6,c=c||s&&(s.find((e=>!e.disabled))||{}).id),64&e.$$.dirty&&o(12,d={name:w,selected:c}),32&e.$$.dirty&&o(11,u=s&&s.map((e=>e.id))),212994&e.$$.dirty&&o(10,h=p&&f([$&&["Button","browse",{label:p.shapeLabelButtonSelectSticker,icon:p.shapeIconButtonSelectSticker,onclick:()=>{Xp().then((e=>{e&&y(e)}))}}]]))},[g,y,b,x,v,s,c,i,a,r,h,u,d,l,p,m,$,f,({detail:e})=>o(6,c=e)]}class Vb extends Ba{constructor(e){super(),Oa(this,e,Wb,Bb,ir,{locale:14,presets:15,scrollElasticity:0,enableSelectImage:16,willRenderPresetToolbar:17,onaddpreset:1,ongrabpreset:2,ondragpreset:3,ondroppreset:4})}}function _b(e){let t,o,i,n;return t=new Cp({props:{items:e[29]}}),i=new wb({props:{locale:e[4],shape:e[48]||e[49],onchange:e[85],controls:e[9],scrollEnable:!1,hideTitles:!0,willRenderControls:e[160]}}),{c(){za(t.$$.fragment),o=Er(),za(i.$$.fragment)},m(e,r){Fa(t,e,r),Cr(e,o,r),Fa(i,e,r),n=!0},p(e,o){const n={};536870912&o[0]&&(n.items=e[29]),t.$set(n);const r={};16&o[0]&&(r.locale=e[4]),393216&o[1]&&(r.shape=e[48]||e[49]),512&o[0]&&(r.controls=e[9]),i.$set(r)},i(e){n||(Sa(t.$$.fragment,e),Sa(i.$$.fragment,e),n=!0)},o(e){ka(t.$$.fragment,e),ka(i.$$.fragment,e),n=!1},d(e){Da(t,e),e&&Tr(o),Da(i,e)}}}function Nb(e){let t,o,i;return o=new df({props:{$$slots:{default:[_b]},$$scope:{ctx:e}}}),{c(){t=Mr("div"),za(o.$$.fragment),Fr(t,"slot","header")},m(e,n){Cr(e,t,n),Fa(o,t,null),i=!0},p(e,t){const i={};536871440&t[0]|393216&t[1]|524288&t[6]&&(i.$$scope={dirty:t,ctx:e}),o.$set(i)},i(e){i||(Sa(o.$$.fragment,e),i=!0)},o(e){ka(o.$$.fragment,e),i=!1},d(e){e&&Tr(t),Da(o)}}}function Hb(e){let t,o;const i=[{locale:e[4]},{ui:e[69]},{shapes:e[5]},{selection:e[58]},{uid:e[19]},{parentRect:e[36]},{rootRect:e[55]},{utilRect:e[38]},{offset:e[50]},{disabled:e[37]},{contextRotation:e[22]},{contextFlipX:e[23]},{contextFlipY:e[24]},{contextZoom:e[35]?e[35].scale:void 0},{active:e[34]},{opacity:e[56]},{hoverColor:e[57]},{caretColor:e[57]},{snapColor:e[57]},{gridColor:[1,1,1,.125]},{eraseRadius:e[46]},{selectRadius:e[6]},{enableButtonFlipVertical:e[10]},{mapEditorPointToImagePoint:e[20]},{mapImagePointToEditorPoint:e[21]},{enableTapToAddText:e[13]},{textInputMode:e[8]},{snapThreshold:e[15]},{snapPointer:!e[47]},{enableSnapToContext:e[16]},{gridSize:e[14]},{willStartInteraction:e[95]},{oninteractionstart:e[79]},{oninteractionupdate:e[80]},{oninteractionrelease:e[81]},{oninteractionend:e[83]},{oninteractioncancel:e[82]},{onleavecanvas:e[87]},{onhovercanvas:e[86]},{onhovershape:e[89]},{ontapcanvas:e[88]},{onaddshape:e[152]},{onselectshape:e[153]},{onblurshape:e[154]},{ontapshape:e[155]},{onupdateshape:e[156]},{onremoveshape:e[157]},e[41]];let n={};for(let e=0;e<i.length;e+=1)n=Jn(n,i[e]);return t=new ub({props:n}),e[158](t),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const n=1106896240&o[0]|252282104&o[1]|255721600&o[2]|12&o[3]?Ia(i,[16&o[0]&&{locale:e[4]},128&o[2]&&{ui:e[69]},32&o[0]&&{shapes:e[5]},134217728&o[1]&&{selection:e[58]},524288&o[0]&&{uid:e[19]},32&o[1]&&{parentRect:e[36]},16777216&o[1]&&{rootRect:e[55]},128&o[1]&&{utilRect:e[38]},524288&o[1]&&{offset:e[50]},64&o[1]&&{disabled:e[37]},4194304&o[0]&&{contextRotation:e[22]},8388608&o[0]&&{contextFlipX:e[23]},16777216&o[0]&&{contextFlipY:e[24]},16&o[1]&&{contextZoom:e[35]?e[35].scale:void 0},8&o[1]&&{active:e[34]},33554432&o[1]&&{opacity:e[56]},67108864&o[1]&&{hoverColor:e[57]},67108864&o[1]&&{caretColor:e[57]},67108864&o[1]&&{snapColor:e[57]},i[19],32768&o[1]&&{eraseRadius:e[46]},64&o[0]&&{selectRadius:e[6]},1024&o[0]&&{enableButtonFlipVertical:e[10]},1048576&o[0]&&{mapEditorPointToImagePoint:e[20]},2097152&o[0]&&{mapImagePointToEditorPoint:e[21]},8192&o[0]&&{enableTapToAddText:e[13]},256&o[0]&&{textInputMode:e[8]},32768&o[0]&&{snapThreshold:e[15]},65536&o[1]&&{snapPointer:!e[47]},65536&o[0]&&{enableSnapToContext:e[16]},16384&o[0]&&{gridSize:e[14]},4&o[3]&&{willStartInteraction:e[95]},131072&o[2]&&{oninteractionstart:e[79]},262144&o[2]&&{oninteractionupdate:e[80]},524288&o[2]&&{oninteractionrelease:e[81]},2097152&o[2]&&{oninteractionend:e[83]},1048576&o[2]&&{oninteractioncancel:e[82]},33554432&o[2]&&{onleavecanvas:e[87]},16777216&o[2]&&{onhovercanvas:e[86]},134217728&o[2]&&{onhovershape:e[89]},67108864&o[2]&&{ontapcanvas:e[88]},1073741824&o[0]|8&o[3]&&{onaddshape:e[152]},1073741824&o[0]&&{onselectshape:e[153]},1073741824&o[0]&&{onblurshape:e[154]},1073741824&o[0]&&{ontapshape:e[155]},1073741824&o[0]|8&o[3]&&{onupdateshape:e[156]},1073741824&o[0]|8&o[3]&&{onremoveshape:e[157]},1024&o[1]&&Aa(e[41])]):{};t.$set(n)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(o){e[158](null),Da(t,o)}}}function jb(e){let t,o,i,r,a,s=e[51]&&Hb(e);return{c(){t=Mr("div"),s&&s.c(),Fr(t,"slot","main"),Fr(t,"style",o="cursor:"+e[45])},m(o,l){Cr(o,t,l),s&&s.m(t,null),e[159](t),i=!0,r||(a=[Ar(t,"keydown",e[84]),gr(Pc.call(null,t)),Ar(t,"dropfiles",(function(){or(e[12]?e[94]:n)&&(e[12]?e[94]:n).apply(this,arguments)})),gr(Tc.call(null,t)),Ar(t,"measure",e[148])],r=!0)},p(n,r){(e=n)[51]?s?(s.p(e,r),1048576&r[1]&&Sa(s,1)):(s=Hb(e),s.c(),Sa(s,1),s.m(t,null)):s&&(va(),ka(s,1,1,(()=>{s=null})),wa()),(!i||16384&r[1]&&o!==(o="cursor:"+e[45]))&&Fr(t,"style",o)},i(e){i||(Sa(s),i=!0)},o(e){ka(s),i=!1},d(o){o&&Tr(t),s&&s.d(),e[159](null),r=!1,tr(a)}}}function Ub(e){let t,o;return t=new Vb({props:{locale:e[4],presets:e[18],enableSelectImage:e[11],willRenderPresetToolbar:e[42],onaddpreset:e[93],ongrabpreset:e[90],ondragpreset:e[91],ondroppreset:e[92],scrollElasticity:e[43]}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.locale=e[4]),262144&o[0]&&(i.presets=e[18]),2048&o[0]&&(i.enableSelectImage=e[11]),2048&o[1]&&(i.willRenderPresetToolbar=e[42]),4096&o[1]&&(i.scrollElasticity=e[43]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Gb(e){let t,o,i,n="stack"===e[7]&&Zb(e),r=(e[53]&&e[33]||"row"===e[7])&&qb(e);return{c(){n&&n.c(),t=Er(),r&&r.c(),o=Ir()},m(e,a){n&&n.m(e,a),Cr(e,t,a),r&&r.m(e,a),Cr(e,o,a),i=!0},p(e,i){"stack"===e[7]?n?(n.p(e,i),128&i[0]&&Sa(n,1)):(n=Zb(e),n.c(),Sa(n,1),n.m(t.parentNode,t)):n&&(va(),ka(n,1,1,(()=>{n=null})),wa()),e[53]&&e[33]||"row"===e[7]?r?(r.p(e,i),128&i[0]|4194308&i[1]&&Sa(r,1)):(r=qb(e),r.c(),Sa(r,1),r.m(o.parentNode,o)):r&&(va(),ka(r,1,1,(()=>{r=null})),wa())},i(e){i||(Sa(n),Sa(r),i=!0)},o(e){ka(n),ka(r),i=!1},d(e){n&&n.d(e),e&&Tr(t),r&&r.d(e),e&&Tr(o)}}}function Zb(e){let t,o,i,n;const r=[Yb,Xb],a=[];function s(e,t){return e[44]?0:1}return o=s(e),i=a[o]=r[o](e),{c(){t=Mr("div"),i.c(),Fr(t,"class","PinturaControlPanels")},m(e,i){Cr(e,t,i),a[o].m(t,null),n=!0},p(e,n){let l=o;o=s(e),o===l?a[o].p(e,n):(va(),ka(a[l],1,1,(()=>{a[l]=null})),wa(),i=a[o],i?i.p(e,n):(i=a[o]=r[o](e),i.c()),Sa(i,1),i.m(t,null))},i(e){n||(Sa(i),n=!0)},o(e){ka(i),n=!1},d(e){e&&Tr(t),a[o].d()}}}function Xb(e){let t,o,i;return o=new wb({props:{locale:e[4],shape:e[48]||e[49],onchange:e[85],controls:e[9],scrollElasticity:e[43],willRenderControls:e[17]}}),{c(){t=Mr("div"),za(o.$$.fragment),Fr(t,"class","PinturaControlPanel")},m(e,n){Cr(e,t,n),Fa(o,t,null),i=!0},p(e,t){const i={};16&t[0]&&(i.locale=e[4]),393216&t[1]&&(i.shape=e[48]||e[49]),512&t[0]&&(i.controls=e[9]),4096&t[1]&&(i.scrollElasticity=e[43]),131072&t[0]&&(i.willRenderControls=e[17]),o.$set(i)},i(e){i||(Sa(o.$$.fragment,e),i=!0)},o(e){ka(o.$$.fragment,e),i=!1},d(e){e&&Tr(t),Da(o)}}}function Yb(e){let t,o,i;return o=new Vb({props:{locale:e[4],presets:e[18],enableSelectImage:e[11],willRenderPresetToolbar:e[42],onaddpreset:e[93],ongrabpreset:e[90],ondragpreset:e[91],ondroppreset:e[92],scrollElasticity:e[43]}}),{c(){t=Mr("div"),za(o.$$.fragment),Fr(t,"class","PinturaControlPanel")},m(e,n){Cr(e,t,n),Fa(o,t,null),i=!0},p(e,t){const i={};16&t[0]&&(i.locale=e[4]),262144&t[0]&&(i.presets=e[18]),2048&t[0]&&(i.enableSelectImage=e[11]),2048&t[1]&&(i.willRenderPresetToolbar=e[42]),4096&t[1]&&(i.scrollElasticity=e[43]),o.$set(i)},i(e){i||(Sa(o.$$.fragment,e),i=!0)},o(e){ka(o.$$.fragment,e),i=!1},d(e){e&&Tr(t),Da(o)}}}function qb(e){let t,o;return t=new Id({props:{class:"PinturaControlListScroller",elasticity:e[43],$$slots:{default:[ix]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};4096&o[1]&&(i.elasticity=e[43]),131729&o[0]|393221&o[1]|524288&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Kb(e){let t,o;return t=new qu({props:{locale:e[4],class:"PinturaControlList",optionClass:"PinturaControlListOption",layout:"row",options:e[31],selectedIndex:e[31].findIndex(e[149]),onchange:e[78],$$slots:{option:[tx,({option:e})=>({204:e}),({option:e})=>[0,0,0,0,0,0,e?262144:0]]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.locale=e[4]),1&o[1]&&(i.options=e[31]),1&o[0]|1&o[1]&&(i.selectedIndex=e[31].findIndex(e[149])),16&o[0]|786432&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Jb(e){let t,o;return t=new ud({props:{$$slots:{default:[Qb]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};16&o[0]|786432&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function Qb(e){let t,o=(M(e[204].icon)?e[204].icon(e[4]):e[204].icon)+"";return{c(){t=Rr("g")},m(e,i){Cr(e,t,i),t.innerHTML=o},p(e,i){16&i[0]|262144&i[6]&&o!==(o=(M(e[204].icon)?e[204].icon(e[4]):e[204].icon)+"")&&(t.innerHTML=o)},d(e){e&&Tr(t)}}}function ex(e){let t,o,i=(M(e[204].label)?e[204].label(e[4]):e[204].label)+"";return{c(){t=Mr("span"),o=Pr(i)},m(e,i){Cr(e,t,i),wr(t,o)},p(e,t){16&t[0]|262144&t[6]&&i!==(i=(M(e[204].label)?e[204].label(e[4]):e[204].label)+"")&&Br(o,i)},d(e){e&&Tr(t)}}}function tx(e){let t,o,i,n=e[204].icon&&Jb(e),r=!e[204].hideLabel&&ex(e);return{c(){t=Mr("div"),n&&n.c(),o=Er(),r&&r.c(),Fr(t,"slot","option")},m(e,a){Cr(e,t,a),n&&n.m(t,null),wr(t,o),r&&r.m(t,null),i=!0},p(e,i){e[204].icon?n?(n.p(e,i),262144&i[6]&&Sa(n,1)):(n=Jb(e),n.c(),Sa(n,1),n.m(t,o)):n&&(va(),ka(n,1,1,(()=>{n=null})),wa()),e[204].hideLabel?r&&(r.d(1),r=null):r?r.p(e,i):(r=ex(e),r.c(),r.m(t,null))},i(e){i||(Sa(n),i=!0)},o(e){ka(n),i=!1},d(e){e&&Tr(t),n&&n.d(),r&&r.d()}}}function ox(e){let t,o;return t=new wb({props:{locale:e[4],shape:e[48]||e[49],onchange:e[85],controls:e[9],scrollEnable:!1,hideTitles:!0,willRenderControls:e[150]}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.locale=e[4]),393216&o[1]&&(i.shape=e[48]||e[49]),512&o[0]&&(i.controls=e[9]),131072&o[0]&&(i.willRenderControls=e[150]),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function ix(e){let t,o,i,n=e[33]&&Kb(e),r="row"===e[7]&&ox(e);return{c(){n&&n.c(),t=Er(),r&&r.c(),o=Ir()},m(e,a){n&&n.m(e,a),Cr(e,t,a),r&&r.m(e,a),Cr(e,o,a),i=!0},p(e,i){e[33]?n?(n.p(e,i),4&i[1]&&Sa(n,1)):(n=Kb(e),n.c(),Sa(n,1),n.m(t.parentNode,t)):n&&(va(),ka(n,1,1,(()=>{n=null})),wa()),"row"===e[7]?r?(r.p(e,i),128&i[0]&&Sa(r,1)):(r=ox(e),r.c(),Sa(r,1),r.m(o.parentNode,o)):r&&(va(),ka(r,1,1,(()=>{r=null})),wa())},i(e){i||(Sa(n),Sa(r),i=!0)},o(e){ka(n),ka(r),i=!1},d(e){n&&n.d(e),e&&Tr(t),r&&r.d(e),e&&Tr(o)}}}function nx(e){let t,o;return t=new Id({props:{class:"PinturaControlListScroller",elasticity:e[43],$$slots:{default:[lx]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};4096&o[1]&&(i.elasticity=e[43]),67108880&o[0]|8388608&o[1]|524288&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function rx(e){let t,o;return t=new ud({props:{$$slots:{default:[ax]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};16&o[0]|786432&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function ax(e){let t,o=(M(e[204].icon)?e[204].icon(e[4]):e[204].icon)+"";return{c(){t=Rr("g")},m(e,i){Cr(e,t,i),t.innerHTML=o},p(e,i){16&i[0]|262144&i[6]&&o!==(o=(M(e[204].icon)?e[204].icon(e[4]):e[204].icon)+"")&&(t.innerHTML=o)},d(e){e&&Tr(t)}}}function sx(e){let t,o,i,n,r,a=(M(e[204].label)?e[204].label(e[4]):e[204].label)+"",s=e[204].icon&&rx(e);return{c(){t=Mr("div"),s&&s.c(),o=Er(),i=Mr("span"),n=Pr(a),Fr(t,"slot","option")},m(e,a){Cr(e,t,a),s&&s.m(t,null),wr(t,o),wr(t,i),wr(i,n),r=!0},p(e,i){e[204].icon?s?(s.p(e,i),262144&i[6]&&Sa(s,1)):(s=rx(e),s.c(),Sa(s,1),s.m(t,o)):s&&(va(),ka(s,1,1,(()=>{s=null})),wa()),(!r||16&i[0]|262144&i[6])&&a!==(a=(M(e[204].label)?e[204].label(e[4]):e[204].label)+"")&&Br(n,a)},i(e){r||(Sa(s),r=!0)},o(e){ka(s),r=!1},d(e){e&&Tr(t),s&&s.d()}}}function lx(e){let t,o;return t=new qu({props:{locale:e[4],class:"PinturaControlList",optionClass:"PinturaControlListOption",layout:"row",options:e[54],selectedIndex:e[54].findIndex(e[151]),onchange:e[77],$$slots:{option:[sx,({option:e})=>({204:e}),({option:e})=>[0,0,0,0,0,0,e?262144:0]]},$$scope:{ctx:e}}}),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};16&o[0]&&(i.locale=e[4]),8388608&o[1]&&(i.options=e[54]),67108864&o[0]|8388608&o[1]&&(i.selectedIndex=e[54].findIndex(e[151])),16&o[0]|786432&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function cx(e){let t,o,i,n,r;const a=[Gb,Ub],s=[];function l(e,t){return e[52]?0:e[44]?1:-1}~(o=l(e))&&(i=s[o]=a[o](e));let c=e[32]&&nx(e);return{c(){t=Mr("div"),i&&i.c(),n=Er(),c&&c.c(),Fr(t,"slot","footer"),Fr(t,"style",e[39])},m(e,i){Cr(e,t,i),~o&&s[o].m(t,null),wr(t,n),c&&c.m(t,null),r=!0},p(e,d){let u=o;o=l(e),o===u?~o&&s[o].p(e,d):(i&&(va(),ka(s[u],1,1,(()=>{s[u]=null})),wa()),~o?(i=s[o],i?i.p(e,d):(i=s[o]=a[o](e),i.c()),Sa(i,1),i.m(t,n)):i=null),e[32]?c?(c.p(e,d),2&d[1]&&Sa(c,1)):(c=nx(e),c.c(),Sa(c,1),c.m(t,null)):c&&(va(),ka(c,1,1,(()=>{c=null})),wa()),(!r||256&d[1])&&Fr(t,"style",e[39])},i(e){r||(Sa(i),Sa(c),r=!0)},o(e){ka(i),ka(c),r=!1},d(e){e&&Tr(t),~o&&s[o].d(),c&&c.d()}}}function dx(e){let t,o;return t=new kf({props:{hasHeader:e[40],$$slots:{footer:[cx],main:[jb],header:[Nb]},$$scope:{ctx:e}}}),t.$on("measure",e[161]),{c(){za(t.$$.fragment)},m(e,i){Fa(t,e,i),o=!0},p(e,o){const i={};512&o[1]&&(i.hasHeader=e[40]),2113929201&o[0]|134217215&o[1]|524288&o[6]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){o||(Sa(t.$$.fragment,e),o=!0)},o(e){ka(t.$$.fragment,e),o=!1},d(e){Da(t,e)}}}function ux(e,t,o){let i,n,r,a,s,l,c,d,u,h,p,m,g,$,f,y,b,x,v,w,S,k,C,M,R,P,E,I,A,L,z,F,D,O,B,W,V,_,N,H,j,U,G,X,Y,q,K,J,Q,ee,te,oe,ie,ne,re,ae,se,le,ce,de,ue,pe,me,ge,$e,fe=qn,ye=()=>(fe(),fe=nr(Me,(e=>o(34,U=e))),Me),be=qn,xe=()=>(be(),be=nr(ze,(e=>o(141,q=e))),ze),ve=qn,we=()=>(ve(),ve=nr(pt,(e=>o(36,ie=e))),pt),Se=qn,ke=()=>(Se(),Se=nr(Ee,(e=>o(147,ue=e))),Ee),Ce=qn,Te=()=>(Ce(),Ce=nr(Re,(e=>o(56,ge=e))),Re);e.$$.on_destroy.push((()=>fe())),e.$$.on_destroy.push((()=>be())),e.$$.on_destroy.push((()=>ve())),e.$$.on_destroy.push((()=>Se())),e.$$.on_destroy.push((()=>Ce()));let{isActive:Me}=t;ye();let{isActiveFraction:Re}=t;Te();let{isVisible:Ee}=t;ke();let{stores:Ae}=t,{locale:Le={}}=t,{shapes:ze}=t;xe();let{toolbar:Fe=[]}=t,{toolShapes:De={}}=t,{toolActive:Oe}=t,{toolSelectRadius:Be}=t,{toolRetainStyles:We=!1}=t,{toolbarLayout:Ve="stack"}=t,{textInputMode:_e}=t,{shapeControls:Ne={}}=t,{enableButtonFlipVertical:He=!1}=t,{enablePresetSelectImage:je=!0}=t,{enablePresetDropImage:Ue=!0}=t,{enableSelectToolToAddShape:Ge=!1}=t,{enableAutoSelectMoveTool:Ze=["line","arrow","path","rectangle","ellipse","text"]}=t,{enableTapToAddText:Xe=!1}=t,{enableMoveTool:Ye=!1}=t,{enableViewTool:qe=!1}=t,{enableToolShareStyles:Ke=!0}=t,{gridSize:Je=0}=t,{snapThreshold:Qe=0}=t,{enableSnapToContext:et=!0}=t,{willRenderHeaderTools:tt=Z}=t,{willRenderPresetToolbar:ot}=t,{willRenderShapeStyleControls:it}=t,{willStartInteraction:nt}=t,{shapePresets:rt=[]}=t,{utilKey:at}=t,{mapScreenPointToImagePoint:lt}=t,{mapImagePointToScreenPoint:ct}=t,{imageRotation:dt=0}=t,{imageFlipX:ut=!1}=t,{imageFlipY:ht=!1}=t,{parentRect:pt}=t;we();let{hooks:mt={}}=t;const gt=ta("selection");ar(e,gt,(e=>o(146,le=e)));const $t=ta("isAnimated");ar(e,$t,(e=>o(138,G=e)));const ft=ta("elasticityMultiplier");ar(e,ft,(e=>o(142,K=e)));const yt=ta("ui");ar(e,yt,(e=>o(171,ce=e)));const xt=ta("keysPressed");let vt;ar(e,xt,(e=>o(145,se=e)));const{env:wt,history:St,rootRect:kt,rootColorSecondary:Ct,enablePanInput:Tt,enablePanInputStatus:Mt,enableZoomInput:Rt,stageRect:Pt,utilRectPadded:Et,scrollElasticity:It,imageOverlayMarkup:At,imagePreviewModifiers:Lt,imageCropRect:zt,shapePreprocessor:Ft,stageScalar:Dt,imageSelectionRect:Ot,imageTransformsInterpolated:Bt,imageSelectionPan:Wt,imageSize:Vt,allowPan:_t,allowZoom:Nt,allowZoomControls:Ht,allowPlayPause:jt}=Ae;ar(e,wt,(e=>o(139,X=e))),ar(e,kt,(e=>o(55,me=e))),ar(e,Ct,(e=>o(57,$e=e))),ar(e,Mt,(e=>o(37,re=e))),ar(e,Pt,(e=>o(143,J=e))),ar(e,Et,(e=>o(38,de=e))),ar(e,Lt,(e=>o(172,pe=e))),ar(e,zt,(e=>o(170,ne=e))),ar(e,Dt,(e=>o(168,te=e))),ar(e,Ot,(e=>o(169,oe=e))),ar(e,Bt,(e=>o(35,Q=e))),ar(e,Wt,(e=>o(167,ee=e))),ar(e,Vt,(e=>o(144,ae=e)));let Ut=0,Gt={};const Xt=e=>lt(Hy(e,me));let Yt,Kt,Jt,qt={};const Qt=e=>{if(!Pi(e)||!Fo(e,"pathClose"))return;const t=[...e.strokeColor];t[3]=1,Yt.updateMarkupShape(e,{pathClose:!1,strokeColor:t},!1),Yt.removeMarkupShapeProps(e,["backgroundColor"],!1),Yt.confirmMarkupItemDraft(),Yt.selectShape(e),O("addshape",e),St.write()};let eo;const to=(e,t)=>Lo(e)?e:e.endsWith("%")?parseFloat(e)/100*t.width:void 0;let oo,io,no;const ro=(e,t,o)=>{let i=!1;t||(i=!0,t=D?lt(st(J)):st(ne)),t.x-=ie.x||0,t.y-=ie.y||0,(ut||ht)&&(e.flipX=ut,e.flipY=ht);const n=Yt.getShapesNearPosition(q,t);if(i&&n.length){const e=.1*Math.min(ne.width,ne.height);t.x+=Math.round(-e+Math.random()*e*2),t.y+=Math.round(-e+Math.random()*e*2)}if(0!==dt&&(e.rotation=ut&&ht?-dt:ut||ht?dt:-dt),Fo(e,"width")&&Fo(e,"height")){const{width:o,height:i}=yn(e,["width","height"],ie);bn(e,{x:t.x-.5*o,y:t.y-.5*i},ie)}else if(Mi(e))bn(e,{x:t.x,y:t.y},ie);else if(Ri(e)){const{x1:i,y1:n,x2:r,y2:a}=yn(e,["x1","y1","x2","y2"],ie),s=Pe(he(i,n),he(r,a)),l=T(o)?ln(o,ie.width):s;bn(e,{x1:t.x-l,y1:t.y+l,x2:t.x+l,y2:t.y-l},ie)}else if(Pi(e)){const{points:o}=yn(e,["points"],ie),i=Ie(o);bn(e,{points:o.map((e=>({x:e.x+t.x-i.x,y:e.y+t.y-i.y})))},ie)}return e},ao=(e,t)=>{const o=ro(xi(e,ne),t);return e.shape&&(Fo(e.shape,"x")&&(o.x=e.shape.x),Fo(e.shape,"y")&&(o.y=e.shape.y)),so(o)},so=e=>{const{beforeAddShape:t=(()=>!0)}=mt;if(t(e))return Yt.addShape(e),Yt.selectShape(e),O("addshape",e),St.write(),e};let lo=!1;const co=()=>{St.write()};let uo;const ho=ta("redrawTrigger");ar(e,ho,(e=>o(140,Y=e)));const po=[],mo=dc(G?20:0);return ar(e,mo,(e=>o(137,j=e))),e.$$set=e=>{"isActive"in e&&ye(o(1,Me=e.isActive)),"isActiveFraction"in e&&Te(o(2,Re=e.isActiveFraction)),"isVisible"in e&&ke(o(3,Ee=e.isVisible)),"stores"in e&&o(100,Ae=e.stores),"locale"in e&&o(4,Le=e.locale),"shapes"in e&&xe(o(5,ze=e.shapes)),"toolbar"in e&&o(101,Fe=e.toolbar),"toolShapes"in e&&o(102,De=e.toolShapes),"toolActive"in e&&o(0,Oe=e.toolActive),"toolSelectRadius"in e&&o(6,Be=e.toolSelectRadius),"toolRetainStyles"in e&&o(103,We=e.toolRetainStyles),"toolbarLayout"in e&&o(7,Ve=e.toolbarLayout),"textInputMode"in e&&o(8,_e=e.textInputMode),"shapeControls"in e&&o(9,Ne=e.shapeControls),"enableButtonFlipVertical"in e&&o(10,He=e.enableButtonFlipVertical),"enablePresetSelectImage"in e&&o(11,je=e.enablePresetSelectImage),"enablePresetDropImage"in e&&o(12,Ue=e.enablePresetDropImage),"enableSelectToolToAddShape"in e&&o(104,Ge=e.enableSelectToolToAddShape),"enableAutoSelectMoveTool"in e&&o(105,Ze=e.enableAutoSelectMoveTool),"enableTapToAddText"in e&&o(13,Xe=e.enableTapToAddText),"enableMoveTool"in e&&o(106,Ye=e.enableMoveTool),"enableViewTool"in e&&o(107,qe=e.enableViewTool),"enableToolShareStyles"in e&&o(108,Ke=e.enableToolShareStyles),"gridSize"in e&&o(14,Je=e.gridSize),"snapThreshold"in e&&o(15,Qe=e.snapThreshold),"enableSnapToContext"in e&&o(16,et=e.enableSnapToContext),"willRenderHeaderTools"in e&&o(109,tt=e.willRenderHeaderTools),"willRenderPresetToolbar"in e&&o(110,ot=e.willRenderPresetToolbar),"willRenderShapeStyleControls"in e&&o(17,it=e.willRenderShapeStyleControls),"willStartInteraction"in e&&o(111,nt=e.willStartInteraction),"shapePresets"in e&&o(18,rt=e.shapePresets),"utilKey"in e&&o(19,at=e.utilKey),"mapScreenPointToImagePoint"in e&&o(20,lt=e.mapScreenPointToImagePoint),"mapImagePointToScreenPoint"in e&&o(21,ct=e.mapImagePointToScreenPoint),"imageRotation"in e&&o(22,dt=e.imageRotation),"imageFlipX"in e&&o(23,ut=e.imageFlipX),"imageFlipY"in e&&o(24,ht=e.imageFlipY),"parentRect"in e&&we(o(25,pt=e.parentRect)),"hooks"in e&&o(112,mt=e.hooks)},e.$$.update=()=>{var t,ee,te,oe;if(2097152&e.$$.dirty[4]&&o(122,i=se.includes(18)),1049088&e.$$.dirty[3]&&(vt&&De===vt||o(113,vt=De)),8&e.$$.dirty[1]&&_t.set(U),8&e.$$.dirty[1]&&Nt.set(U),8&e.$$.dirty[1]&&Ht.set(U),256&e.$$.dirty[3]&&o(32,n=Array.isArray(Fe)&&Fe.length>1&&Array.isArray(Fe[0][1])),2&e.$$.dirty[1]|256&e.$$.dirty[3]&&o(54,r=n?Fe.map(((e,t)=>[t,e[0]])):[]),67108864&e.$$.dirty[0]|2&e.$$.dirty[1]|256&e.$$.dirty[3]&&o(136,a=n?Fe[Ut][1]:Fe),262144&e.$$.dirty[0]|155648&e.$$.dirty[3]|4096&e.$$.dirty[4]&&o(31,s=((e,{willRenderPresetToolbar:t,shapePresets:o,enableViewTool:i,enableMoveTool:r})=>{let a=0!==o.length||t?e:e.filter((e=>"preset"!==e[0]));return n&&(a=[["move",e=>e.shapeLabelToolMove,{icon:e=>e.shapeIconToolMove}],["view",e=>e.shapeLabelToolView,{icon:e=>e.shapeIconToolView}],...a]),a=r?a:a.filter((e=>"move"!==e[0])),i?a:a.filter((e=>"view"!==e[0]))})(a,{willRenderPresetToolbar:ot,shapePresets:rt,enableMoveTool:Ye,enableViewTool:qe})),1&e.$$.dirty[1]&&o(134,d=!!s.length),1&e.$$.dirty[0]|1&e.$$.dirty[1]|1024&e.$$.dirty[4]&&d&&void 0===Oe&&o(0,Oe=s[0][0]),67108865&e.$$.dirty[0]|2&e.$$.dirty[1]|2097152&e.$$.dirty[3]|4096&e.$$.dirty[4]&&n&&o(114,Gt={...Gt,[Ut]:a.map((([e])=>e)).includes(Oe)?Oe:Gt[Ut]||a[0][0]}),512&e.$$.dirty[0]&&o(133,l=!!Object.keys(Ne).length),1&e.$$.dirty[1]&&o(33,c=s.length>1),6&e.$$.dirty[1]&&o(53,u=c||n),1&e.$$.dirty[0]&&o(135,h=void 0!==Oe),3584&e.$$.dirty[4]&&o(52,p=(!h||d)&&l),268435456&e.$$.dirty[0]&&o(30,O=uo&&(t=uo,(e,o)=>{t.dispatchEvent(Dp(e,o))})),1073741825&e.$$.dirty[0]|8&e.$$.dirty[1]&&U&&O&&O("selectcontrol",Oe),8&e.$$.dirty[1]&&(U?mr(Lt,pe[at]={maskMarkupOpacity:.85},pe):delete pe[at]),1&e.$$.dirty[0]|1048576&e.$$.dirty[3]&&o(132,m=Oe&&vt[Oe]?vt[Oe][1]:void 0),256&e.$$.dirty[4]&&o(123,g=m&&m.isSelection?"selection":"shapes"),1610612736&e.$$.dirty[3]&&(e=>{if(!Yt)return;const t=Yt.getShapeDraft(gt);t&&(e&&(Kt=t.drawMode),Yt.updateShapeDraft({drawMode:e?"subtract":Kt},gt))})("selection"===g&&i),134217729&e.$$.dirty[0]&&Oe&&Yt){const e=Yt.getMarkupItemDraft();e&&Qt(e)}if(1&e.$$.dirty[0]&&Oe&&Yt&&"move"!==Oe&&Yt.blurShapes(),8&e.$$.dirty[1]|8388608&e.$$.dirty[4]&&o(51,$=ue&&U),128&e.$$.dirty[1]|524288&e.$$.dirty[4]&&o(50,f=de&&he(J.x-de.x,J.y-de.y)),512&e.$$.dirty[0]&&o(131,y=Object.keys(Ne)),8&e.$$.dirty[1]|131072&e.$$.dirty[4]&&o(119,b=U&&q.filter(Ai)[0]),8&e.$$.dirty[1]|131072&e.$$.dirty[4]&&o(128,x=U&&q.find((e=>Li(e)))),8&e.$$.dirty[1]|131072&e.$$.dirty[4]&&o(49,v=U&&q.find((e=>zi(e)))),1&e.$$.dirty[0]|8&e.$$.dirty[1]|1048576&e.$$.dirty[3]&&o(125,w=U&&vt[Oe]?an($i({...vt[Oe][0],...ce[at]?ce[at][Oe]:{}})):{}),1048576&e.$$.dirty[3]&&vt&&o(115,qt={}),1&e.$$.dirty[0]|4227072&e.$$.dirty[3]|130&e.$$.dirty[4]&&o(124,S=w&&Object.keys(w).reduce(((e,t)=>{const o="disableStyle"===t,i="settings"===t,n=!!y.find((e=>e.split("_").includes(t)));if(!o&&!i&&!n)return e;if(void 0===w[t])return e;if(!0===w.disableStyle)return e;if(w.disableStyle&&w.disableStyle.includes(t))return e;if("strokeWidth"===t&&Object.keys(qt).includes("strokeWidth")&&void 0===qt[t]&&Fo(w,"points"))return e[t]=w[t],e;const{share:r=!0}=w.settings&&w.settings[t]||{},a=Ke&&r?qt:qt[Oe]||{};return e[t]=Fo(a,t)?a[t]:w[t],e}),{})),524289&e.$$.dirty[0]|1024&e.$$.dirty[3]|1&e.$$.dirty[4]&&(We?((e,t,o)=>{const i=ce[e],n=i?i[t]:{};yt.set({...ce,[e]:{...i,[t]:{...n,...o}}})})(at,Oe,S):(ee=at,yt.set({[ee]:{}}))),8&e.$$.dirty[1]|67108864&e.$$.dirty[3]|4194305&e.$$.dirty[4]&&o(48,k=le&&U?b||S:void 0),1&e.$$.dirty[0]|2&e.$$.dirty[4]&&o(47,C=Fo(w,"eraseRadius")||Fo(w,"points")&&!Fo(w,"pathClose")||"move"===Oe||"view"===Oe),32&e.$$.dirty[1]|2&e.$$.dirty[4]&&o(46,M=w&&void 0!==w.eraseRadius?to(w.eraseRadius,ie):void 0),8&e.$$.dirty[1]|2097152&e.$$.dirty[4]&&o(129,R=U&&se.includes(32)),1&e.$$.dirty[0]|8&e.$$.dirty[1]&&o(130,P=U&&"view"===Oe),96&e.$$.dirty[4]&&o(127,E=P||R),24&e.$$.dirty[4]&&o(126,I=!!E&&(!!x||nu(document.activeElement))),8&e.$$.dirty[1]|12&e.$$.dirty[4]&&Tt.set(!U||E&&!I),8&e.$$.dirty[1]|4&e.$$.dirty[4]&&Rt.set(!U||!I),32&e.$$.dirty[1]|3&e.$$.dirty[4]&&o(120,A=w.cursorStyle?(({cursorStyle:e,cursorSize:t},o,i)=>{let n;const r=o[t];if(void 0===r?n=to(t,i):Lo(r)?n=r:T(r)&&(n=hn(t,o[t],i),"strokeWidth"===t&&(n*=.5)),!(n<=0||void 0===n))return{size:n,style:e}})(w,{...w,...S},ie):void 0),33554432&e.$$.dirty[3]|1048576&e.$$.dirty[4]&&o(121,L=no&&(oe=ae,(te=no).x>=0&&te.y>=0&&te.x<=oe.width&&te.y<=oe.height)),524288&e.$$.dirty[0]|80&e.$$.dirty[1]|2038431744&e.$$.dirty[3])if(L&&!oo&&A&&!re){const e=A.size*Q.scale,t={id:"cursor-"+at,x:io.x,y:io.y,strokeWidth:.5,strokeColor:[0,0,0]};"ellipse"===A.style&&(t.rx=e,t.ry=e);const o={strokeWidth:2.5,strokeColor:[1,1,1],opacity:.75},n=[{...t,...o},t];if("selection"===g&&i){const t=e,i=io.x+t,r=io.y+t+4,a={id:"cursor-"+at,strokeWidth:.75,strokeColor:[0,0,0],points:[{x:i,y:r},{x:i+4,y:r}]};n.push({...a,...o,strokeWidth:2,points:[{x:i-.5,y:r},{x:i+4.5,y:r}]},a)}(e=>{At.update((t=>[...t.filter((e=>e.id!=="cursor-"+at)),...e]))})(n)}else At.update((e=>e.filter((e=>e.id!=="cursor-"+at))));1&e.$$.dirty[0]|64&e.$$.dirty[1]|478150656&e.$$.dirty[3]&&o(45,z=L?((e,t,o,i,n,r)=>{if(i)return"grab";if(e&&!t)return"none";if(!t)return"move"===r?"default":"crosshair";let a=t||o;return Ai(a)?Li(a)?"modal"===_e?"default":"text":qi(a)?"move":"default":"default"})(A,oo,b,re,0,Oe):"default"),264193&e.$$.dirty[0]|131072&e.$$.dirty[3]&&o(44,F="preset"===Oe&&(rt.length>0||je||ot)),32&e.$$.dirty[1]&&(D=!Fo(ie,"x")&&!Fo(ie,"y")),262144&e.$$.dirty[4]&&o(43,B=K*It),131072&e.$$.dirty[3]|98304&e.$$.dirty[4]&&o(42,W=Y&&ot?e=>Yp((()=>ot(e,ao,{...X},(()=>ho.set({}))))):Z),524288&e.$$.dirty[3]&&o(41,V=Object.keys(mt).reduce(((e,t)=>("beforeAddShape"===t||void 0===mt[t]||(e[t]=mt[t]),e)),{})),8&e.$$.dirty[1]&&(e=>{q&&ze.update((t=>t.map((t=>(t._prerender=!!e&&Li(t),t)))))})(U),65536&e.$$.dirty[3]|98304&e.$$.dirty[4]&&o(29,_=Y&&tt([],X,(()=>ho.set({})))),536871424&e.$$.dirty[0]&&o(40,N=!!_.length||!!Object.keys(Ne).some((e=>po.includes(e)))),8&e.$$.dirty[1]|16384&e.$$.dirty[4]&&G&&mo.set(U?0:20),8192&e.$$.dirty[4]&&o(39,H=j?`transform: translateY(${j}px)`:void 0)},jt.set(!1),[Oe,Me,Re,Ee,Le,ze,Be,Ve,_e,Ne,He,je,Ue,Xe,Je,Qe,et,it,rt,at,lt,ct,dt,ut,ht,pt,Ut,Yt,uo,_,O,s,n,c,U,Q,ie,re,de,H,N,V,W,B,F,z,M,C,k,v,f,$,p,u,r,me,ge,$e,gt,$t,ft,yt,xt,wt,kt,Ct,Mt,Pt,Et,At,Lt,zt,Dt,Ot,Bt,Wt,Vt,({index:e},t)=>{o(26,Ut=e),o(0,Oe=Gt[e])},({value:e},t)=>{o(0,Oe=e),(Ge||/enter/i.test(t.key))&&(e=>{const[t,o]=vt[e];let i,n,r="relative"===o.position;const a=r?"0%":0,s=r?"0%":0;Ti(t)||Si(t)?(n=r?"20%":.2*ie.width,i=$i(t),i.x=a,i.y=s,bn(i,{width:n,height:n},ie)):Mi(t)?(n=r?"10%":.1*ie.width,i=$i(t),i.x=a,i.y=s,bn(i,{rx:n,ry:n},ie)):Ri(t)&&(n=r?"10%":.1*ie.width,i=$i(t),i.x1=a,i.y1=s,i.x2=a,i.y2=s),i&&Promise.resolve().then((()=>{so(ro(i,void 0,n))}))})(e)},e=>{if("eraser"===Oe)Jt=Yt.eraseShape();else if(Oe&&vt[Oe]){const[e,t={}]=vt[Oe],{drawMode:o}=k;"selection"===g&&"new"===o&&gt.set([]);let n={};"selection"===g&&(O("selectiondown",[...le]),i&&(Kt=e.drawMode,n.drawMode="subtract")),Jt=Yt.createShape({...e,...S,...n},t)}else Jt=void 0;return!!Jt&&(Jt.start(e),!0)},e=>!!Jt&&(Jt.update(e),!0),e=>!!Jt&&(Jt.release(e),!0),e=>!!Jt&&(Jt.cancel(e),Jt=void 0,!0),e=>{if(!Jt)return!1;if(Jt.end(e),Jt=void 0,"selection"===g){if(e.detail.isTap){const[e]=vt[Oe];e.bitmap||gt.set([])}O("selectionup",[...le])}const t=Yt.getMarkupItemDraft(),i=Ye&&(!0===Ze||Array.isArray(Ze)&&Ze.includes(Oe));return t&&!t.isEditing||!i||o(0,Oe="move"),!0},e=>{const{key:t}=e,o=Yt.getMarkupItemDraft();/escape/i.test(t)&&o&&(e.preventDefault(),e.stopPropagation(),Yt.discardMarkupItemDraft(),Jt=void 0),/enter/i.test(t)&&o&&(e.preventDefault(),e.stopPropagation(),Qt(o),Jt=void 0)},function(e){Object.keys(e).forEach((t=>{const{retain:i=!0,share:n=!0}=w.settings&&w.settings[t]||{};i&&(Ke&&n?o(115,qt[t]=e[t],qt):(qt[Oe]||o(115,qt[Oe]={},qt),o(115,qt[Oe][t]=e[t],qt)))})),O("selectstyle",e),b&&(Yt.updateMarkupShape(b,e),clearTimeout(eo),eo=setTimeout((()=>{co()}),200))},(e,t,i)=>{o(117,io=t),o(118,no=i)},()=>{o(118,no=void 0),o(117,io=void 0)},e=>{O("markuptap",e)},e=>o(116,oo=e),()=>{lo=!1},(e,t)=>{if(lo)return;const{beforeAddShape:o=(()=>!0)}=mt,i=Xt(t),n=Yt.getMarkupItemDraft(),r=bt(ne,{x:i.x+(ie.x||0),y:i.y+(ie.y||0)});if(n&&!r&&Yt.discardMarkupItemDraft(),r){if(!n){const n=xi(e,ne),r=ro(n,i);return o(r)?(Wi(r),void Yt.addShape(r)):(lo=!0,void t.preventDefault())}Ti(n)&&(i.x-=.5*n.width,i.y-=.5*n.height),e.shape&&(Fo(e.shape,"x")&&(i.x=e.shape.x),Fo(e.shape,"y")&&(i.y=e.shape.y)),Yt.updateMarkupShape(n,i)}},(e,t)=>{if(lo)return;const o=Xt(t);if(!bt(ne,{x:o.x+(ie.x||0),y:o.y+(ie.y||0)}))return void Yt.discardMarkupItemDraft();const i=Yt.confirmMarkupItemDraft();Yt.selectShape(i),O("addshape",i),St.write()},e=>ao(e),e=>{return t=e.detail.resources,o=Xt(e.detail.event),t.forEach((e=>ao(e,o)));var t,o},e=>{if(!nt)return!0;const t=rectClone(oe);return rectScale(t,1/te),rectTranslate(t,ee),rectScale(t,Q.scale),nt(e,{...t,x:t.x+J.x,y:t.y+J.y})},co,ho,po,mo,Ae,Fe,De,We,Ge,Ze,Ye,qe,Ke,tt,ot,nt,mt,vt,Gt,qt,oo,io,no,b,A,L,i,g,S,w,I,E,x,R,P,y,m,l,d,h,a,j,G,X,Y,q,K,J,ae,se,le,ue,function(t){oa.call(this,e,t)},e=>e[0]===Oe,(e,t,o)=>{const i=e.filter((([,e])=>!po.includes(e)));return it?it(i,t,o):i},e=>e[0]===Ut,e=>{Promise.resolve().then((()=>{O("addshape",e),co()}))},e=>{O("selectshape",e)},e=>{Promise.resolve().then((()=>{O("blurshape",e)}))},e=>{O("tapshape",e)},e=>{O("updateshape",e),co()},e=>{O("removeshape",e),co()},function(e){na[e?"unshift":"push"]((()=>{Yt=e,o(27,Yt)}))},function(e){na[e?"unshift":"push"]((()=>{uo=e,o(28,uo)}))},e=>e.filter((([,e])=>po.includes(e))),function(t){oa.call(this,e,t)}]}class hx extends Ba{constructor(e){super(),Oa(this,e,ux,dx,ir,{isActive:1,isActiveFraction:2,isVisible:3,stores:100,locale:4,shapes:5,toolbar:101,toolShapes:102,toolActive:0,toolSelectRadius:6,toolRetainStyles:103,toolbarLayout:7,textInputMode:8,shapeControls:9,enableButtonFlipVertical:10,enablePresetSelectImage:11,enablePresetDropImage:12,enableSelectToolToAddShape:104,enableAutoSelectMoveTool:105,enableTapToAddText:13,enableMoveTool:106,enableViewTool:107,enableToolShareStyles:108,gridSize:14,snapThreshold:15,enableSnapToContext:16,willRenderHeaderTools:109,willRenderPresetToolbar:110,willRenderShapeStyleControls:17,willStartInteraction:111,shapePresets:18,utilKey:19,mapScreenPointToImagePoint:20,mapImagePointToScreenPoint:21,imageRotation:22,imageFlipX:23,imageFlipY:24,parentRect:25,hooks:112},null,[-1,-1,-1,-1,-1,-1,-1])}get isActive(){return this.$$.ctx[1]}set isActive(e){this.$$set({isActive:e}),$a()}get isActiveFraction(){return this.$$.ctx[2]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),$a()}get isVisible(){return this.$$.ctx[3]}set isVisible(e){this.$$set({isVisible:e}),$a()}get stores(){return this.$$.ctx[100]}set stores(e){this.$$set({stores:e}),$a()}get locale(){return this.$$.ctx[4]}set locale(e){this.$$set({locale:e}),$a()}get shapes(){return this.$$.ctx[5]}set shapes(e){this.$$set({shapes:e}),$a()}get toolbar(){return this.$$.ctx[101]}set toolbar(e){this.$$set({toolbar:e}),$a()}get toolShapes(){return this.$$.ctx[102]}set toolShapes(e){this.$$set({toolShapes:e}),$a()}get toolActive(){return this.$$.ctx[0]}set toolActive(e){this.$$set({toolActive:e}),$a()}get toolSelectRadius(){return this.$$.ctx[6]}set toolSelectRadius(e){this.$$set({toolSelectRadius:e}),$a()}get toolRetainStyles(){return this.$$.ctx[103]}set toolRetainStyles(e){this.$$set({toolRetainStyles:e}),$a()}get toolbarLayout(){return this.$$.ctx[7]}set toolbarLayout(e){this.$$set({toolbarLayout:e}),$a()}get textInputMode(){return this.$$.ctx[8]}set textInputMode(e){this.$$set({textInputMode:e}),$a()}get shapeControls(){return this.$$.ctx[9]}set shapeControls(e){this.$$set({shapeControls:e}),$a()}get enableButtonFlipVertical(){return this.$$.ctx[10]}set enableButtonFlipVertical(e){this.$$set({enableButtonFlipVertical:e}),$a()}get enablePresetSelectImage(){return this.$$.ctx[11]}set enablePresetSelectImage(e){this.$$set({enablePresetSelectImage:e}),$a()}get enablePresetDropImage(){return this.$$.ctx[12]}set enablePresetDropImage(e){this.$$set({enablePresetDropImage:e}),$a()}get enableSelectToolToAddShape(){return this.$$.ctx[104]}set enableSelectToolToAddShape(e){this.$$set({enableSelectToolToAddShape:e}),$a()}get enableAutoSelectMoveTool(){return this.$$.ctx[105]}set enableAutoSelectMoveTool(e){this.$$set({enableAutoSelectMoveTool:e}),$a()}get enableTapToAddText(){return this.$$.ctx[13]}set enableTapToAddText(e){this.$$set({enableTapToAddText:e}),$a()}get enableMoveTool(){return this.$$.ctx[106]}set enableMoveTool(e){this.$$set({enableMoveTool:e}),$a()}get enableViewTool(){return this.$$.ctx[107]}set enableViewTool(e){this.$$set({enableViewTool:e}),$a()}get enableToolShareStyles(){return this.$$.ctx[108]}set enableToolShareStyles(e){this.$$set({enableToolShareStyles:e}),$a()}get gridSize(){return this.$$.ctx[14]}set gridSize(e){this.$$set({gridSize:e}),$a()}get snapThreshold(){return this.$$.ctx[15]}set snapThreshold(e){this.$$set({snapThreshold:e}),$a()}get enableSnapToContext(){return this.$$.ctx[16]}set enableSnapToContext(e){this.$$set({enableSnapToContext:e}),$a()}get willRenderHeaderTools(){return this.$$.ctx[109]}set willRenderHeaderTools(e){this.$$set({willRenderHeaderTools:e}),$a()}get willRenderPresetToolbar(){return this.$$.ctx[110]}set willRenderPresetToolbar(e){this.$$set({willRenderPresetToolbar:e}),$a()}get willRenderShapeStyleControls(){return this.$$.ctx[17]}set willRenderShapeStyleControls(e){this.$$set({willRenderShapeStyleControls:e}),$a()}get willStartInteraction(){return this.$$.ctx[111]}set willStartInteraction(e){this.$$set({willStartInteraction:e}),$a()}get shapePresets(){return this.$$.ctx[18]}set shapePresets(e){this.$$set({shapePresets:e}),$a()}get utilKey(){return this.$$.ctx[19]}set utilKey(e){this.$$set({utilKey:e}),$a()}get mapScreenPointToImagePoint(){return this.$$.ctx[20]}set mapScreenPointToImagePoint(e){this.$$set({mapScreenPointToImagePoint:e}),$a()}get mapImagePointToScreenPoint(){return this.$$.ctx[21]}set mapImagePointToScreenPoint(e){this.$$set({mapImagePointToScreenPoint:e}),$a()}get imageRotation(){return this.$$.ctx[22]}set imageRotation(e){this.$$set({imageRotation:e}),$a()}get imageFlipX(){return this.$$.ctx[23]}set imageFlipX(e){this.$$set({imageFlipX:e}),$a()}get imageFlipY(){return this.$$.ctx[24]}set imageFlipY(e){this.$$set({imageFlipY:e}),$a()}get parentRect(){return this.$$.ctx[25]}set parentRect(e){this.$$set({parentRect:e}),$a()}get hooks(){return this.$$.ctx[112]}set hooks(e){this.$$set({hooks:e}),$a()}}var px=(e,t,o,i,n,r,a,s,l)=>{const c=me(e),d=.5*o.width,u=.5*o.height,h=.5*t.width,p=.5*t.height,m=n.x+i.x,g=n.y+i.y;s&&(c.x=o.width-c.x),l&&(c.y=o.height-c.y);const $=Math.cos(r),f=Math.sin(r);c.x-=d,c.y-=u;const y=c.x*$-c.y*f,b=c.x*f+c.y*$;c.x=d+y,c.y=u+b,c.x*=a,c.y*=a,c.x+=h,c.y+=p,c.x+=m,c.y+=g,c.x-=d*a,c.y-=u*a;const x=(n.x-m)*a,v=(n.y-g)*a,w=x*$-v*f,S=x*f+v*$;return c.x+=w,c.y+=S,c},mx=(e,t,o,i,n,r,a,s,l)=>{const c=me(e),d=He(o),u=He(t),h=he(n.x+i.x,n.y+i.y),p=Math.cos(r),m=Math.sin(r);c.x-=u.x,c.y-=u.y;const g=(n.x-h.x)*a,$=(n.y-h.y)*a,f=g*p-$*m,y=g*m+$*p;c.x-=f,c.y-=y,c.x-=h.x,c.y-=h.y,c.x/=a,c.y/=a;const b=c.x*p+c.y*m,x=c.x*m-c.y*p;return c.x=b,c.y=-x,c.x+=d.x,c.y+=d.y,s&&(c.x=o.width-c.x),l&&(c.y=o.height-c.y),c},gx=e=>"boolean"==typeof e;function $x(e){let t,o,i;function n(t){e[59](t)}let r={utilKey:e[1],stores:e[5],locale:e[6],isActive:e[2],isActiveFraction:e[3],isVisible:e[4],mapScreenPointToImagePoint:e[45],mapImagePointToScreenPoint:e[44],imageRotation:e[46],imageFlipX:e[43],imageFlipY:e[42],shapes:e[48],toolbar:e[21]||e[7],toolShapes:e[22]||e[8],toolRetainStyles:e[9],enableSelectToolToAddShape:e[31],enableTapToAddText:e[32],enableViewTool:e[30],enableMoveTool:e[34],enableAutoSelectMoveTool:e[33],snapThreshold:e[16],gridSize:Lo(e[18])?e[18]:e[15],enableSnapToContext:gx(e[19])?e[19]:e[17],enableToolShareStyles:e[13],shapeControls:e[23]||e[10],shapePresets:e[27],enableButtonFlipVertical:e[24],parentRect:e[49],enablePresetDropImage:e[26],enablePresetSelectImage:e[25],toolSelectRadius:e[11],textInputMode:e[12],willStartInteraction:e[14],willRenderPresetToolbar:e[28]||e[20],willRenderShapeStyleControls:e[29],hooks:{willRenderShapeControls:e[35],willRenderShapeTextControls:e[36],beforeAddShape:e[37],beforeRemoveShape:e[38],beforeDeselectShape:e[39],beforeSelectShape:e[40],beforeUpdateShape:e[41]}};return void 0!==e[0]&&(r.toolActive=e[0]),t=new hx({props:r}),na.push((()=>La(t,"toolActive",n))),t.$on("measure",e[60]),{c(){za(t.$$.fragment)},m(e,o){Fa(t,e,o),i=!0},p(e,i){const n={};32&i[0]&&(n.stores=e[5]),64&i[0]&&(n.locale=e[6]),4&i[0]&&(n.isActive=e[2]),8&i[0]&&(n.isActiveFraction=e[3]),16&i[0]&&(n.isVisible=e[4]),16384&i[1]&&(n.mapScreenPointToImagePoint=e[45]),8192&i[1]&&(n.mapImagePointToScreenPoint=e[44]),32768&i[1]&&(n.imageRotation=e[46]),4096&i[1]&&(n.imageFlipX=e[43]),2048&i[1]&&(n.imageFlipY=e[42]),2097280&i[0]&&(n.toolbar=e[21]||e[7]),4194560&i[0]&&(n.toolShapes=e[22]||e[8]),512&i[0]&&(n.toolRetainStyles=e[9]),1&i[1]&&(n.enableSelectToolToAddShape=e[31]),2&i[1]&&(n.enableTapToAddText=e[32]),1073741824&i[0]&&(n.enableViewTool=e[30]),8&i[1]&&(n.enableMoveTool=e[34]),4&i[1]&&(n.enableAutoSelectMoveTool=e[33]),65536&i[0]&&(n.snapThreshold=e[16]),294912&i[0]&&(n.gridSize=Lo(e[18])?e[18]:e[15]),655360&i[0]&&(n.enableSnapToContext=gx(e[19])?e[19]:e[17]),8192&i[0]&&(n.enableToolShareStyles=e[13]),8389632&i[0]&&(n.shapeControls=e[23]||e[10]),134217728&i[0]&&(n.shapePresets=e[27]),16777216&i[0]&&(n.enableButtonFlipVertical=e[24]),67108864&i[0]&&(n.enablePresetDropImage=e[26]),33554432&i[0]&&(n.enablePresetSelectImage=e[25]),2048&i[0]&&(n.toolSelectRadius=e[11]),4096&i[0]&&(n.textInputMode=e[12]),16384&i[0]&&(n.willStartInteraction=e[14]),269484032&i[0]&&(n.willRenderPresetToolbar=e[28]||e[20]),536870912&i[0]&&(n.willRenderShapeStyleControls=e[29]),2032&i[1]&&(n.hooks={willRenderShapeControls:e[35],willRenderShapeTextControls:e[36],beforeAddShape:e[37],beforeRemoveShape:e[38],beforeDeselectShape:e[39],beforeSelectShape:e[40],beforeUpdateShape:e[41]}),!o&&1&i[0]&&(o=!0,n.toolActive=e[0],ha((()=>o=!1))),t.$set(n)},i(e){i||(Sa(t.$$.fragment,e),i=!0)},o(e){ka(t.$$.fragment,e),i=!1},d(e){Da(t,e)}}}function fx(e,t,o){let i,n,r,a,s,l,c,d,u,{isActive:h}=t,{isActiveFraction:p}=t,{isVisible:m}=t,{stores:g}=t,{locale:$={}}=t,{markupEditorToolbar:f}=t,{markupEditorToolStyles:y}=t,{markupEditorToolRetainStyles:b}=t,{markupEditorShapeStyleControls:x}=t,{markupEditorToolSelectRadius:v}=t,{markupEditorTextInputMode:w}=t,{markupEditorToolShareStyles:S}=t,{markupEditorWillStartInteraction:k}=t,{markupEditorGridSize:C=0}=t,{markupEditorSnapThreshold:T=0}=t,{markupEditorSnapToContext:M=!1}=t,{annotateGridSize:R}=t,{annotateSnapToContext:P}=t,{willRenderShapePresetToolbar:E}=t,{annotateTools:I}=t,{annotateToolShapes:A}=t,{annotateShapeControls:L}=t,{annotateActiveTool:z}=t,{annotateEnableButtonFlipVertical:F=!1}=t,{annotateEnableSelectImagePreset:D=!1}=t,{annotateEnableDropImagePreset:O=!0}=t,{annotatePresets:B=[]}=t,{annotateWillRenderShapePresetToolbar:W}=t,{annotateWillRenderShapeStyleControls:V}=t,{enableViewTool:_}=t,{enableSelectToolToAddShape:N}=t,{enableTapToAddText:H}=t,{enableAutoSelectMoveTool:j}=t,{enableMoveTool:U}=t,{willRenderShapeControls:G}=t,{willRenderShapeTextControls:Z}=t,{beforeAddShape:X}=t,{beforeRemoveShape:Y}=t,{beforeDeselectShape:q}=t,{beforeSelectShape:K}=t,{beforeUpdateShape:J}=t;const{rootRect:Q,imageAnnotation:ee,imageSize:te,imageRotation:oe,imageFlipX:ie,imageFlipY:ne,imageTransforms:re,imageTransformsInterpolated:ae}=g;return ar(e,Q,(e=>o(58,d=e))),ar(e,te,(e=>o(57,c=e))),ar(e,oe,(e=>o(46,u=e))),ar(e,ie,(e=>o(43,a=e))),ar(e,ne,(e=>o(42,r=e))),ar(e,re,(e=>o(56,l=e))),ar(e,ae,(e=>o(55,s=e))),e.$$set=e=>{"isActive"in e&&o(2,h=e.isActive),"isActiveFraction"in e&&o(3,p=e.isActiveFraction),"isVisible"in e&&o(4,m=e.isVisible),"stores"in e&&o(5,g=e.stores),"locale"in e&&o(6,$=e.locale),"markupEditorToolbar"in e&&o(7,f=e.markupEditorToolbar),"markupEditorToolStyles"in e&&o(8,y=e.markupEditorToolStyles),"markupEditorToolRetainStyles"in e&&o(9,b=e.markupEditorToolRetainStyles),"markupEditorShapeStyleControls"in e&&o(10,x=e.markupEditorShapeStyleControls),"markupEditorToolSelectRadius"in e&&o(11,v=e.markupEditorToolSelectRadius),"markupEditorTextInputMode"in e&&o(12,w=e.markupEditorTextInputMode),"markupEditorToolShareStyles"in e&&o(13,S=e.markupEditorToolShareStyles),"markupEditorWillStartInteraction"in e&&o(14,k=e.markupEditorWillStartInteraction),"markupEditorGridSize"in e&&o(15,C=e.markupEditorGridSize),"markupEditorSnapThreshold"in e&&o(16,T=e.markupEditorSnapThreshold),"markupEditorSnapToContext"in e&&o(17,M=e.markupEditorSnapToContext),"annotateGridSize"in e&&o(18,R=e.annotateGridSize),"annotateSnapToContext"in e&&o(19,P=e.annotateSnapToContext),"willRenderShapePresetToolbar"in e&&o(20,E=e.willRenderShapePresetToolbar),"annotateTools"in e&&o(21,I=e.annotateTools),"annotateToolShapes"in e&&o(22,A=e.annotateToolShapes),"annotateShapeControls"in e&&o(23,L=e.annotateShapeControls),"annotateActiveTool"in e&&o(0,z=e.annotateActiveTool),"annotateEnableButtonFlipVertical"in e&&o(24,F=e.annotateEnableButtonFlipVertical),"annotateEnableSelectImagePreset"in e&&o(25,D=e.annotateEnableSelectImagePreset),"annotateEnableDropImagePreset"in e&&o(26,O=e.annotateEnableDropImagePreset),"annotatePresets"in e&&o(27,B=e.annotatePresets),"annotateWillRenderShapePresetToolbar"in e&&o(28,W=e.annotateWillRenderShapePresetToolbar),"annotateWillRenderShapeStyleControls"in e&&o(29,V=e.annotateWillRenderShapeStyleControls),"enableViewTool"in e&&o(30,_=e.enableViewTool),"enableSelectToolToAddShape"in e&&o(31,N=e.enableSelectToolToAddShape),"enableTapToAddText"in e&&o(32,H=e.enableTapToAddText),"enableAutoSelectMoveTool"in e&&o(33,j=e.enableAutoSelectMoveTool),"enableMoveTool"in e&&o(34,U=e.enableMoveTool),"willRenderShapeControls"in e&&o(35,G=e.willRenderShapeControls),"willRenderShapeTextControls"in e&&o(36,Z=e.willRenderShapeTextControls),"beforeAddShape"in e&&o(37,X=e.beforeAddShape),"beforeRemoveShape"in e&&o(38,Y=e.beforeRemoveShape),"beforeDeselectShape"in e&&o(39,q=e.beforeDeselectShape),"beforeSelectShape"in e&&o(40,K=e.beforeSelectShape),"beforeUpdateShape"in e&&o(41,J=e.beforeUpdateShape)},e.$$.update=()=>{251664384&e.$$.dirty[1]&&o(45,i=e=>mx(e,d,c,s.origin,s.translation,l.rotation.z,s.scale,a,r)),251664384&e.$$.dirty[1]&&o(44,n=e=>px(e,d,c,s.origin,s.translation,l.rotation.z,s.scale,a,r))},[z,"annotate",h,p,m,g,$,f,y,b,x,v,w,S,k,C,T,M,R,P,E,I,A,L,F,D,O,B,W,V,_,N,H,j,U,G,Z,X,Y,q,K,J,r,a,n,i,u,Q,ee,te,oe,ie,ne,re,ae,s,l,c,d,function(e){z=e,o(0,z)},function(t){oa.call(this,e,t)}]}var yx={util:["annotate",class extends Ba{constructor(e){super(),Oa(this,e,fx,$x,ir,{name:1,isActive:2,isActiveFraction:3,isVisible:4,stores:5,locale:6,markupEditorToolbar:7,markupEditorToolStyles:8,markupEditorToolRetainStyles:9,markupEditorShapeStyleControls:10,markupEditorToolSelectRadius:11,markupEditorTextInputMode:12,markupEditorToolShareStyles:13,markupEditorWillStartInteraction:14,markupEditorGridSize:15,markupEditorSnapThreshold:16,markupEditorSnapToContext:17,annotateGridSize:18,annotateSnapToContext:19,willRenderShapePresetToolbar:20,annotateTools:21,annotateToolShapes:22,annotateShapeControls:23,annotateActiveTool:0,annotateEnableButtonFlipVertical:24,annotateEnableSelectImagePreset:25,annotateEnableDropImagePreset:26,annotatePresets:27,annotateWillRenderShapePresetToolbar:28,annotateWillRenderShapeStyleControls:29,enableViewTool:30,enableSelectToolToAddShape:31,enableTapToAddText:32,enableAutoSelectMoveTool:33,enableMoveTool:34,willRenderShapeControls:35,willRenderShapeTextControls:36,beforeAddShape:37,beforeRemoveShape:38,beforeDeselectShape:39,beforeSelectShape:40,beforeUpdateShape:41},null,[-1,-1])}get name(){return this.$$.ctx[1]}get isActive(){return this.$$.ctx[2]}set isActive(e){this.$$set({isActive:e}),$a()}get isActiveFraction(){return this.$$.ctx[3]}set isActiveFraction(e){this.$$set({isActiveFraction:e}),$a()}get isVisible(){return this.$$.ctx[4]}set isVisible(e){this.$$set({isVisible:e}),$a()}get stores(){return this.$$.ctx[5]}set stores(e){this.$$set({stores:e}),$a()}get locale(){return this.$$.ctx[6]}set locale(e){this.$$set({locale:e}),$a()}get markupEditorToolbar(){return this.$$.ctx[7]}set markupEditorToolbar(e){this.$$set({markupEditorToolbar:e}),$a()}get markupEditorToolStyles(){return this.$$.ctx[8]}set markupEditorToolStyles(e){this.$$set({markupEditorToolStyles:e}),$a()}get markupEditorToolRetainStyles(){return this.$$.ctx[9]}set markupEditorToolRetainStyles(e){this.$$set({markupEditorToolRetainStyles:e}),$a()}get markupEditorShapeStyleControls(){return this.$$.ctx[10]}set markupEditorShapeStyleControls(e){this.$$set({markupEditorShapeStyleControls:e}),$a()}get markupEditorToolSelectRadius(){return this.$$.ctx[11]}set markupEditorToolSelectRadius(e){this.$$set({markupEditorToolSelectRadius:e}),$a()}get markupEditorTextInputMode(){return this.$$.ctx[12]}set markupEditorTextInputMode(e){this.$$set({markupEditorTextInputMode:e}),$a()}get markupEditorToolShareStyles(){return this.$$.ctx[13]}set markupEditorToolShareStyles(e){this.$$set({markupEditorToolShareStyles:e}),$a()}get markupEditorWillStartInteraction(){return this.$$.ctx[14]}set markupEditorWillStartInteraction(e){this.$$set({markupEditorWillStartInteraction:e}),$a()}get markupEditorGridSize(){return this.$$.ctx[15]}set markupEditorGridSize(e){this.$$set({markupEditorGridSize:e}),$a()}get markupEditorSnapThreshold(){return this.$$.ctx[16]}set markupEditorSnapThreshold(e){this.$$set({markupEditorSnapThreshold:e}),$a()}get markupEditorSnapToContext(){return this.$$.ctx[17]}set markupEditorSnapToContext(e){this.$$set({markupEditorSnapToContext:e}),$a()}get annotateGridSize(){return this.$$.ctx[18]}set annotateGridSize(e){this.$$set({annotateGridSize:e}),$a()}get annotateSnapToContext(){return this.$$.ctx[19]}set annotateSnapToContext(e){this.$$set({annotateSnapToContext:e}),$a()}get willRenderShapePresetToolbar(){return this.$$.ctx[20]}set willRenderShapePresetToolbar(e){this.$$set({willRenderShapePresetToolbar:e}),$a()}get annotateTools(){return this.$$.ctx[21]}set annotateTools(e){this.$$set({annotateTools:e}),$a()}get annotateToolShapes(){return this.$$.ctx[22]}set annotateToolShapes(e){this.$$set({annotateToolShapes:e}),$a()}get annotateShapeControls(){return this.$$.ctx[23]}set annotateShapeControls(e){this.$$set({annotateShapeControls:e}),$a()}get annotateActiveTool(){return this.$$.ctx[0]}set annotateActiveTool(e){this.$$set({annotateActiveTool:e}),$a()}get annotateEnableButtonFlipVertical(){return this.$$.ctx[24]}set annotateEnableButtonFlipVertical(e){this.$$set({annotateEnableButtonFlipVertical:e}),$a()}get annotateEnableSelectImagePreset(){return this.$$.ctx[25]}set annotateEnableSelectImagePreset(e){this.$$set({annotateEnableSelectImagePreset:e}),$a()}get annotateEnableDropImagePreset(){return this.$$.ctx[26]}set annotateEnableDropImagePreset(e){this.$$set({annotateEnableDropImagePreset:e}),$a()}get annotatePresets(){return this.$$.ctx[27]}set annotatePresets(e){this.$$set({annotatePresets:e}),$a()}get annotateWillRenderShapePresetToolbar(){return this.$$.ctx[28]}set annotateWillRenderShapePresetToolbar(e){this.$$set({annotateWillRenderShapePresetToolbar:e}),$a()}get annotateWillRenderShapeStyleControls(){return this.$$.ctx[29]}set annotateWillRenderShapeStyleControls(e){this.$$set({annotateWillRenderShapeStyleControls:e}),$a()}get enableViewTool(){return this.$$.ctx[30]}set enableViewTool(e){this.$$set({enableViewTool:e}),$a()}get enableSelectToolToAddShape(){return this.$$.ctx[31]}set enableSelectToolToAddShape(e){this.$$set({enableSelectToolToAddShape:e}),$a()}get enableTapToAddText(){return this.$$.ctx[32]}set enableTapToAddText(e){this.$$set({enableTapToAddText:e}),$a()}get enableAutoSelectMoveTool(){return this.$$.ctx[33]}set enableAutoSelectMoveTool(e){this.$$set({enableAutoSelectMoveTool:e}),$a()}get enableMoveTool(){return this.$$.ctx[34]}set enableMoveTool(e){this.$$set({enableMoveTool:e}),$a()}get willRenderShapeControls(){return this.$$.ctx[35]}set willRenderShapeControls(e){this.$$set({willRenderShapeControls:e}),$a()}get willRenderShapeTextControls(){return this.$$.ctx[36]}set willRenderShapeTextControls(e){this.$$set({willRenderShapeTextControls:e}),$a()}get beforeAddShape(){return this.$$.ctx[37]}set beforeAddShape(e){this.$$set({beforeAddShape:e}),$a()}get beforeRemoveShape(){return this.$$.ctx[38]}set beforeRemoveShape(e){this.$$set({beforeRemoveShape:e}),$a()}get beforeDeselectShape(){return this.$$.ctx[39]}set beforeDeselectShape(e){this.$$set({beforeDeselectShape:e}),$a()}get beforeSelectShape(){return this.$$.ctx[40]}set beforeSelectShape(e){this.$$set({beforeSelectShape:e}),$a()}get beforeUpdateShape(){return this.$$.ctx[41]}set beforeUpdateShape(e){this.$$set({beforeUpdateShape:e}),$a()}}]};const ov='<g fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor" stroke-width=".125em"><path d="M18 6L6 18M6 6l12 12"></path></path></g>',iv='<path fill="none" d="M9 15 L12 9 L15 15 M10 13.5 h3" stroke="currentColor" stroke-width=".125em"/>';var nv={labelReset:"Reset",labelDefault:"Default",labelAuto:"Auto",labelNone:"None",labelEdit:"Edit",labelClose:"Close",labelSupportError:e=>e.join(", ")+" not supported on this browser",labelColor:"Color",labelWidth:"Width",labelSize:"Size",labelOffset:"Offset",labelAmount:"Amount",labelInset:"Inset",labelRadius:"Radius",labelColorPalette:"Color palette",labelSizeExtraSmall:"Extra small",labelSizeSmall:"Small",labelSizeMediumSmall:"Medium small",labelSizeMedium:"Medium",labelSizeMediumLarge:"Medium large",labelSizeLarge:"Large",labelSizeExtraLarge:"Extra large",labelButtonCancel:"Cancel",labelButtonUndo:"Undo",labelButtonRedo:"Redo",labelButtonRevert:"Revert",labelButtonExport:"Done",labelZoomIn:"Zoom in",labelZoomOut:"Zoom out",labelZoomFit:"Fit to view",labelZoomActual:"Actual size",iconZoomIn:'<path stroke="currentColor" stroke-width=".125em" d="M8 12 h8 M12 8 v8" />',iconZoomOut:'<path stroke="currentColor" stroke-width=".125em" d="M9 12 h6" />',iconSupportError:'<g fill="none" stroke="currentColor" stroke-width="2"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><g><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></g>',iconButtonClose:ov,iconButtonRevert:'<g fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor" stroke-width=".125em"><path d="M7.388 18.538a8 8 0 10-2.992-9.03"/><path fill="currentColor" d="M2.794 11.696L2.37 6.714l5.088 3.18z"/><path d="M12 8v4M12 12l4 2"/></g>',iconButtonUndo:'<g fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor" stroke-width=".125em"><path d="M10 8h4c2.485 0 5 2 5 5s-2.515 5-5 5h-4"/><path fill="currentColor" d="M5 8l4-3v6z"/></g>',iconButtonRedo:'<g fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor" stroke-width=".125em"><path d="M14 8h-4c-2.485 0-5 2-5 5s2.515 5 5 5h4"/><path fill="currentColor" d="M19 8l-4-3v6z"/></g>',iconButtonExport:'<polyline points="20 6 9 17 4 12" fill="none" stroke="currentColor" stroke-width=".125em"></polyline>',statusLabelButtonClose:"Close",statusIconButtonClose:ov,statusLabelLoadImage:e=>e&&e.task?e.error?"IMAGE_TOO_SMALL"===e.error.code?"Minimum image size is {minWidth} &times; {minHeight}":"Error loading image":"blob-to-bitmap"===e.task?"Preparing image&hellip;":"Loading image&hellip;":"Waiting for image",statusLabelProcessImage:e=>{if(e&&e.task)return"store"===e.task?e.error?"Error uploading image":"Uploading image&hellip;":e.error?"Error processing image":"Processing image&hellip;"}};const rv={shapeLabelButtonSelectSticker:"Select image",shapeIconButtonSelectSticker:'<g fill="none" stroke="currentColor" stroke-width="0.0625em"><path d="M8 21 L15 11 L19 15"/><path d="M15 2 v5 h5"/><path d="M8 2 h8 l4 4 v12 q0 4 -4 4 h-8 q-4 0 -4 -4 v-12 q0 -4 4 -4z"/></g><circle fill="currentColor" cx="10" cy="8" r="1.5"/>',shapeIconButtonFlipHorizontal:'<g stroke="currentColor" stroke-width=".125em"><path fill="none" d="M6 6.5h5v11H6z"/><path fill="currentColor" d="M15 6.5h3v11h-3z"/><path d="M11 4v16" fill="currentColor"/></g>',shapeIconButtonFlipVertical:'<g stroke="currentColor" stroke-width=".125em"><rect x="7" y="8" width="11" height="5" fill="none"/><rect x="7" y="17" width="11" height="2" fill="currentColor"/><line x1="5" y1="13" x2="20" y2="13"/></g>',shapeIconButtonRemove:'<g fill="none" fill-rule="evenodd"><path stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M7.5 7h9z"/><path d="M7.916 9h8.168a1 1 0 01.99 1.14l-.972 6.862a2 2 0 01-1.473 1.653c-.877.23-1.753.345-2.629.345-.876 0-1.752-.115-2.628-.345a2 2 0 01-1.473-1.653l-.973-6.862A1 1 0 017.916 9z" fill="currentColor"/><rect fill="currentColor" x="10" y="5" width="4" height="3" rx="1"/></g>',shapeIconButtonDuplicate:'<g fill="none" fill-rule="evenodd"><path d="M15 13.994V16a2 2 0 01-2 2H8a2 2 0 01-2-2v-5a2 2 0 012-2h2.142" stroke="currentColor" stroke-width=".125em"/><path d="M15 9V8a1 1 0 00-2 0v1h-1a1 1 0 000 2h1v1a1 1 0 002 0v-1h1a1 1 0 000-2h-1zm-4-4h6a2 2 0 012 2v6a2 2 0 01-2 2h-6a2 2 0 01-2-2V7a2 2 0 012-2z" fill="currentColor"/></g>',shapeIconButtonMoveToFront:'<g fill="none" fill-rule="evenodd"><rect fill="currentColor" x="11" y="13" width="8" height="2" rx="1"/><rect fill="currentColor" x="9" y="17" width="10" height="2" rx="1"/><path d="M11.364 8H10a5 5 0 000 10M12 6.5L14.5 8 12 9.5z" stroke="currentColor" stroke-width=".125em" stroke-linecap="round"/></g>',shapeIconButtonTextLayoutAutoWidth:""+iv,shapeIconButtonTextLayoutAutoHeight:'<g fill="currentColor"><circle cx="4" cy="12" r="1.5"/><circle cx="20" cy="12" r="1.5"/></g>'+iv,shapeIconButtonTextLayoutFixedSize:'<g fill="currentColor"><circle cx="5" cy="6" r="1.5"/><circle cx="19" cy="6" r="1.5"/><circle cx="19" cy="19" r="1.5"/><circle cx="5" cy="19" r="1.5"/></g>'+iv,shapeTitleButtonTextLayoutAutoWidth:"Auto width",shapeTitleButtonTextLayoutAutoHeight:"Auto height",shapeTitleButtonTextLayoutFixedSize:"Fixed size",shapeTitleButtonFlipHorizontal:"Flip Horizontal",shapeTitleButtonFlipVertical:"Flip Vertical",shapeTitleButtonRemove:"Remove",shapeTitleButtonDuplicate:"Duplicate",shapeTitleButtonMoveToFront:"Move to front",shapeLabelInputText:"Edit text",shapeIconInputCancel:'<g fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor" stroke-width=".125em"><path d="M18 6L6 18M6 6l12 12"/></g>',shapeIconInputConfirm:'<g fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor" stroke-width=".125em"><polyline points="20 6 9 17 4 12"/></g>',shapeLabelInputCancel:"Cancel",shapeLabelInputConfirm:"Confirm",shapeLabelStrokeNone:"No outline",shapeLabelFontStyleNormal:"Normal",shapeLabelFontStyleBold:"Bold",shapeLabelFontStyleItalic:"Italic",shapeLabelFontStyleItalicBold:"Bold Italic",shapeTitleBackgroundColor:"Fill color",shapeTitleCornerRadius:"Corner radius",shapeTitleFontFamily:"Font",shapeTitleFontSize:"Font size",shapeTitleFontStyle:"Font style",shapeTitleLineHeight:"Line height",shapeTitleLineStart:"Start",shapeTitleLineEnd:"End",shapeTitleStrokeWidth:"Line width",shapeTitleStrokeColor:"Line color",shapeTitleLineDecorationBar:"Bar",shapeTitleLineDecorationCircle:"Circle",shapeTitleLineDecorationSquare:"Square",shapeTitleLineDecorationArrow:"Arrow",shapeTitleLineDecorationCircleSolid:"Circle solid",shapeTitleLineDecorationSquareSolid:"Square solid",shapeTitleLineDecorationArrowSolid:"Arrow solid",shapeIconLineDecorationBar:'<g stroke="currentColor" stroke-linecap="round" stroke-width=".125em"><path d="M5,12 H16"/><path d="M16,8 V16"/></g>',shapeIconLineDecorationCircle:'<g stroke="currentColor" stroke-linecap="round"><path stroke-width=".125em" d="M5,12 H12"/><circle fill="none" stroke-width=".125em" cx="16" cy="12" r="4"/></g>',shapeIconLineDecorationSquare:'<g stroke="currentColor" stroke-linecap="round"><path stroke-width=".125em" d="M5,12 H12"/><rect fill="none" stroke-width=".125em" x="12" y="8" width="8" height="8"/></g>',shapeIconLineDecorationArrow:'<g stroke="currentColor" stroke-linecap="round" stroke-width=".125em"><path d="M5,12 H16 M13,7 l6,5 l-6,5" fill="none"/></g>',shapeIconLineDecorationCircleSolid:'<g stroke="currentColor" stroke-linecap="round"><path stroke-width=".125em" d="M5,12 H12"/><circle fill="currentColor" cx="16" cy="12" r="4"/></g>',shapeIconLineDecorationSquareSolid:'<g stroke="currentColor" stroke-linecap="round"><path stroke-width=".125em" d="M5,12 H12"/><rect fill="currentColor" x="12" y="8" width="8" height="8"/></g>',shapeIconLineDecorationArrowSolid:'<g stroke="currentColor" stroke-linecap="round" stroke-width=".125em"><path d="M5,12 H16"/><path d="M13,7 l6,5 l-6,5z" fill="currentColor"/></g>',shapeTitleColorTransparent:"Transparent",shapeTitleColorWhite:"White",shapeTitleColorSilver:"Silver",shapeTitleColorGray:"Gray",shapeTitleColorBlack:"Black",shapeTitleColorNavy:"Navy",shapeTitleColorBlue:"Blue",shapeTitleColorAqua:"Aqua",shapeTitleColorTeal:"Teal",shapeTitleColorOlive:"Olive",shapeTitleColorGreen:"Green",shapeTitleColorYellow:"Yellow",shapeTitleColorOrange:"Orange",shapeTitleColorRed:"Red",shapeTitleColorMaroon:"Maroon",shapeTitleColorFuchsia:"Fuchsia",shapeTitleColorPurple:"Purple",shapeTitleTextOutline:"Text outline",shapeTitleTextOutlineWidth:"Width",shapeTitleTextShadow:"Text shadow",shapeTitleTextShadowBlur:"Blur",shapeTitleTextColor:"Font color",shapeTitleTextAlign:"Text align",shapeTitleTextAlignLeft:"Left align text",shapeTitleTextAlignCenter:"Center align text",shapeTitleTextAlignRight:"Right align text",shapeIconTextAlignLeft:'<g stroke-width=".125em" stroke="currentColor"><line x1="5" y1="8" x2="15" y2="8"/><line x1="5" y1="12" x2="19" y2="12"/><line x1="5" y1="16" x2="14" y2="16"/></g>',shapeIconTextAlignCenter:'<g stroke-width=".125em" stroke="currentColor"><line x1="7" y1="8" x2="17" y2="8"/><line x1="5" y1="12" x2="19" y2="12"/><line x1="8" y1="16" x2="16" y2="16"/></g>',shapeIconTextAlignRight:'<g stroke-width=".125em" stroke="currentColor"><line x1="9" y1="8" x2="19" y2="8"/><line x1="5" y1="12" x2="19" y2="12"/><line x1="11" y1="16" x2="19" y2="16"/></g>',shapeLabelToolMove:"Move",shapeLabelToolView:"View",shapeLabelToolSharpie:"Sharpie",shapeLabelToolEraser:"Eraser",shapeLabelToolPath:"Path",shapeLabelToolRectangle:"Rectangle",shapeLabelToolEllipse:"Ellipse",shapeLabelToolArrow:"Arrow",shapeLabelToolLine:"Line",shapeLabelToolText:"Text",shapeLabelToolPreset:"Stickers",shapeIconToolView:'<g stroke-width=".125em" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M10.98 9.703V2.567c0-1.19 1.19-1.785 1.784-1.785.595 0 1.784.595 1.784 1.785v3.568"/><path d="M14.548 9.703V4.35c0-1.19 1.19-1.784 1.784-1.784.595 0 1.784.594 1.784 1.784v2.973"/><path d="M18.116 10.244V7.271c0-1.19 1.19-1.784 1.784-1.784.595 0 1.785.595 1.785 1.784 0 1.19 0 8.92-1.19 12.488-1.19 3.569-10.704 4.758-13.678 0-2.973-4.757-2.973-4.757-4.163-6.541-1.189-1.784-1.153-2.974-.594-3.568.558-.595 1.784-1.19 2.973.594 1.277 1.916 2.07 2.907 2.379 2.974V5.487c0-1.19 1.19-1.784 1.784-1.784.595 0 1.784.595 1.784 1.784V8.46"/></g>',shapeIconToolMove:'<g stroke-width=".125em" stroke="currentColor" fill="none"><path d="M6 2 L6 19 L18 13 Z M13 18 L16 24" stroke="currentColor" stroke-width=".125em" fill="none" fill-rule="evenodd" stroke-linejoin="round"/></g>',shapeIconToolSharpie:'<g stroke-width=".125em" stroke="currentColor" fill="none"><path d="M2.025 5c5.616-2.732 8.833-3.857 9.65-3.374C12.903 2.351.518 12.666 2.026 14 3.534 15.334 16.536.566 17.73 2.566 18.924 4.566 3.98 17.187 4.831 18c.851.813 9.848-6 11.643-6 1.087 0-2.53 5.11-2.92 7-.086.41 3.323-1.498 4.773-1 .494.17.64 2.317 1.319 3 .439.443 1.332.776 2.679 1" stroke="currentColor" stroke-width=".125em" fill="none" fill-rule="evenodd" stroke-linejoin="round"/></g>',shapeIconToolEraser:'<g stroke-width=".125em" stroke="currentColor" stroke-linecap="round" fill="none"><g transform="translate(3, 15) rotate(-45)"><rect x="0" y="0" width="18" height="10" rx="3"/></g><line x1="11" y1="21" x2="18" y2="21"/><line x1="20" y1="21" x2="22" y2="21"/></g>',shapeIconToolPath:'<g stroke-width=".125em" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" fill="none"><circle cx="21" cy="3" r="2"/><circle cx="9" cy="9" r="2"/><circle cx="3" cy="21" r="2"/><path d="M19 4 11 8 M8 11 4 19"/></g>',shapeIconToolRectangle:'<g stroke-width=".125em" stroke="currentColor" fill="none"><rect x="1" y="1" width="22" height="22" rx="4"/></g>',shapeIconToolEllipse:'<g stroke-width=".125em" stroke="currentColor" fill="none"><circle cx="12" cy="12" r="11"/></g>',shapeIconToolArrow:'<g stroke-width=".125em" stroke="currentColor" fill="none"><line x1="20" y1="3" x2="6" y2="21"/><path d="m10 6 L21.5 1 L20 13.5" fill="currentColor" stroke="none"/></g>',shapeIconToolLine:'<g stroke-width=".125em" stroke="currentColor" fill="none"><line x1="20" y1="3" x2="6" y2="21"/></g>',shapeIconToolText:'<g stroke="none" fill="currentColor" transform="translate(6,0)"><path d="M8.14 20.085c.459 0 .901-.034 1.329-.102a8.597 8.597 0 001.015-.21v1.984c-.281.135-.695.247-1.242.336a9.328 9.328 0 01-1.477.133c-3.312 0-4.968-1.745-4.968-5.235V6.804H.344v-1.25l2.453-1.078L3.89.819h1.5v3.97h4.97v2.015H5.39v10.078c0 1.031.245 1.823.735 2.375s1.161.828 2.015.828z"/>',shapeIconToolPreset:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor" stroke-width=".125em"><path d="M12 22c2.773 0 1.189-5.177 3-7 1.796-1.808 7-.25 7-3 0-5.523-4.477-10-10-10S2 6.477 2 12s4.477 10 10 10z"></path><path d="M20 17c-3 3-5 5-8 5"></path></g>',shapeTitleSelectionMode:"Selection mode",shapeTitleBrushSize:"Brush size",shapeLabelSelectionModeNew:"New",shapeLabelSelectionModeAdd:"Add",shapeLabelSelectionModeSubtract:"Remove",shapeLabelToolSelectionBrush:"Brush",shapeLabelToolSelectionLassoo:"Lassoo",shapeLabelToolSelectionRectangle:"Rectangle marquee",shapeLabelToolSelectionEllipse:"Ellipse marquee",shapeIconSelectionModeNew:'<g fill="none" fill-rule="evenodd" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><path d="M6.5 17H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v1.5"/><rect width="12" height="12" x="9" y="9" fill="currentColor" fill-opacity=".25" rx="2"/></g>',shapeIconSelectionModeAdd:'<g fill="none" fill-rule="evenodd" stroke="currentColor"><path fill="currentColor" fill-opacity=".25" stroke-linecap="round" stroke-linejoin="round" d="M15 3a2 2 0 0 1 2 2v4h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-8a2 2 0 0 1-2-2v-2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h10Z"/><path d="M13 15h4M15 13v4"/></g>',shapeIconSelectionModeSubtract:'<g fill="none" fill-rule="evenodd" stroke="currentColor"><path fill="currentColor" fill-opacity=".25" stroke-linecap="round" stroke-linejoin="round" d="M15 3a2 2 0 0 1 2 2v4h-6a2 2 0 0 0-1.995 1.85L9 11v6H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h10Z"/><rect width="12" height="12" x="9" y="9" stroke-linecap="round" stroke-linejoin="round" rx="2"/><path d="M13 15h4"/></g>',shapeIconToolSelectionBrush:'<g stroke-width=".125em" stroke="currentColor" fill="none"><path d="M2.025 5c5.616-2.732 8.833-3.857 9.65-3.374C12.903 2.351.518 12.666 2.026 14 3.534 15.334 16.536.566 17.73 2.566 18.924 4.566 3.98 17.187 4.831 18c.851.813 9.848-6 11.643-6 1.087 0-2.53 5.11-2.92 7-.086.41 3.323-1.498 4.773-1 .494.17.64 2.317 1.319 3 .439.443 1.332.776 2.679 1" stroke="currentColor" fill-rule="evenodd" stroke-linejoin="round"/></g>',shapeIconToolSelectionLassoo:'<g fill="none" fill-rule="evenodd" stroke-width=".125em" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.428 17.702a18.46 18.46 0 0 0 4.085-1.595c5.851-3.112 9.019-8.599 7.074-12.256-1.945-3.657-8.265-4.1-14.116-.988C2.619 5.974-.55 11.46 1.396 15.118c.63 1.186 1.72 2.033 3.105 2.532"/><ellipse cx="8" cy="18.5" rx="3.5" ry="2.833" transform="rotate(-15 8 18.5)"/><path stroke-linecap="round" d="M5 18c3.347 1.048 5.514 1.881 6.5 2.5.859.54 1.517.994 1.5 2.364"/></g>',shapeIconToolSelectionRectangle:'<g stroke-width=".125em" stroke="currentColor"><path d="M9 1 h6 m4 0 h4v4 m0 4 v6 m0 4 v4h-4 m-4 0 h-6 m-4 0 h-4v-4 m0 -4 v-6 m0 -4 v-4h4" fill="none" /></g>',shapeIconToolSelectionEllipse:'<path stroke-width=".125em" stroke="currentColor" d="M1.21 9.853a11.054 11.054 0 0 0 0 4.294m1.643 3.965a11.054 11.054 0 0 0 3.035 3.035m3.965 1.644a11.054 11.054 0 0 0 4.294 0m3.965-1.644a11.054 11.054 0 0 0 3.035-3.035m1.644-3.965a11.054 11.054 0 0 0 0-4.294m-1.644-3.965a11.054 11.054 0 0 0-3.035-3.035m-3.965-1.644a11.054 11.054 0 0 0-4.294 0M5.888 2.853a11.054 11.054 0 0 0-3.035 3.035"/>'};var uv=(e,t)=>{const o=Object.getOwnPropertyDescriptors(e);Object.keys(o).forEach((i=>{o[i].get?Object.defineProperty(t,i,{get:()=>e[i],set:t=>e[i]=t}):t[i]=e[i]}))},hv=e=>{const t={},{sub:o,pub:i}=Yo();c()&&null!==document.doctype||console.warn("Browser is in quirks mode, add <!DOCTYPE html> to page to fix render issues");const r=Cs();uv(r,t);const a=((e,t)=>{const o={},i=new Im({target:e,props:{stores:t,pluginComponents:Array.from(Bm)}});let n=!1;const r=()=>{n||(c()&&window.removeEventListener("pagehide",r),i&&(n=!0,i.$destroy()))};Fm||(Fm=new Set(nd(Im).filter((e=>!Lm.includes(e))))),Fm.forEach((e=>{Object.defineProperty(o,e,{get:()=>i[e],set:zm.includes(e)?t=>{i[e]={...i[e],...t}}:t=>i[e]=t})})),Object.defineProperty(o,"previewImageData",{get:()=>i.imagePreviewCurrent}),Dm.forEach((e=>{const t=Om[e],n=t[0];Object.defineProperty(o,e,{get:()=>i.pluginInterface[n][e],set:o=>{const n=t.reduce(((t,n)=>(t[n]={...i.pluginOptions[n],[e]:o},t)),{});i.pluginOptions={...i.pluginOptions,...n}}})})),Object.defineProperty(o,"element",{get:()=>i.root,set:()=>{}});const a=i.history;return Qa(o,{on:(e,t)=>{if(n)return()=>{};if(/undo|redo|revert|writehistory/.test(e))return a.on(e,t);const o=[i.sub(e,t),i.$on(e,(e=>t(e instanceof CustomEvent&&!e.detail?void 0:e)))].filter(Boolean);return()=>o.forEach((e=>e()))},updateImagePreview:e=>{i.imagePreviewSrc=e},close:()=>!n&&i.pub("close"),destroy:r}),Object.defineProperty(o,"history",{get:()=>({undo:()=>a.undo(),redo:()=>a.redo(),revert:()=>a.revert(),get:()=>a.get(),getCollapsed:()=>a.get().splice(0,a.index+1),set:e=>a.set(e),write:e=>a.write(e),get length(){return a.length()},get index(){return a.index},set index(e){a.index=e}})}),c()&&window.addEventListener("pagehide",r),o})(e,r.stores);uv(a,t);const s=["loadImage","processImage","abortProcessImage","abortLoadImage"].map((e=>a.on(e,(t=>{const o=r[e](t&&t.detail);o instanceof Promise&&o.catch(n)})))),l=(e,t)=>{const i=o(e,t),n=r.on(e,t),s=a.on(e,t);return()=>{i(),n(),s()}};t.handleEvent=n;const d=Vm.map((e=>l(e,(o=>t.handleEvent(e,o)))));return Qa(t,{on:l,updateImage:e=>new Promise(((o,i)=>{const n=t.history.get(),a=t.history.index,s=t.imageState;r.loadImage(e).then((e=>{t.history.set(n),t.history.index=a,t.imageState=s,o(e)})).catch(i)})),close:()=>{i("close")},destroy:()=>{[...s,...d].forEach((e=>e())),a.destroy(),r.destroy(),i("destroy")}}),setTimeout((()=>i("init",t)),0),t};c()&&HTMLElement;const{document:fv,window:yv}=Ma;function bv(e){let t,o,i,n;return ua(e[27]),{c(){t=Er(),o=Mr("div"),Fr(o,"class",e[4]),Fr(o,"style",e[5])},m(r,a){Cr(r,t,a),Cr(r,o,a),e[28](o),i||(n=[Ar(yv,"keydown",e[10]),Ar(yv,"orientationchange",e[11]),Ar(yv,"resize",e[27]),Ar(fv.body,"focusin",(function(){or(!e[1]&&e[7])&&(!e[1]&&e[7]).apply(this,arguments)})),Ar(fv.body,"focusout",(function(){or(e[2]&&e[8])&&(e[2]&&e[8]).apply(this,arguments)})),Ar(o,"wheel",e[9],{passive:!1})],i=!0)},p(t,i){e=t,16&i[0]&&Fr(o,"class",e[4]),32&i[0]&&Fr(o,"style",e[5])},i:qn,o:qn,d(r){r&&Tr(t),r&&Tr(o),e[28](null),i=!1,tr(n)}}}function xv(e,t,o){let i,n,r,a,s,l,d,u;const h=Qr();let{root:m}=t,{preventZoomViewport:g=!0}=t,{preventScrollBodyIfNeeded:$=!0}=t,{preventFooterOverlapIfNeeded:f=!0}=t,{class:y}=t,b=!0,x=!1,v=!1,w=c()&&document.documentElement,S=c()&&document.body,k=c()&&document.head;const C=dc(0,{precision:.001,damping:.5});ar(e,C,(e=>o(26,u=e)));const T=C.subscribe((e=>{v&&e>=1?(o(19,v=!1),o(1,b=!1),h("show")):x&&e<=0&&(o(18,x=!1),o(1,b=!0),h("hide"))}));let R,P,E,M=!1;const I=()=>document.querySelector("meta[name=viewport]"),A=()=>Array.from(document.querySelectorAll("meta[name=theme-color]"));let L;let F,D,B,O=0;const W=()=>{D||(D=p("div",{style:"position:fixed;height:100vh;top:0"}),S.append(D))};let V;qr((()=>{f&&fo()&&W()})),Kr((()=>{D&&(o(21,B=D.offsetHeight),D.remove(),D=void 0)}));const _=()=>w.style.setProperty("--pintura-document-height",window.innerHeight+"px");return Jr((()=>{w.classList.remove("PinturaModalBodyLock"),T()})),e.$$set=e=>{"root"in e&&o(0,m=e.root),"preventZoomViewport"in e&&o(12,g=e.preventZoomViewport),"preventScrollBodyIfNeeded"in e&&o(13,$=e.preventScrollBodyIfNeeded),"preventFooterOverlapIfNeeded"in e&&o(14,f=e.preventFooterOverlapIfNeeded),"class"in e&&o(15,y=e.class)},e.$$.update=()=>{67895298&e.$$.dirty[0]&&o(25,i=v||x?u:b?0:1),4096&e.$$.dirty[0]&&(n="width=device-width,height=device-height,initial-scale=1"+(g?",maximum-scale=1,user-scalable=0":"")),786434&e.$$.dirty[0]&&o(22,r=!v&&!b&&!x),12&e.$$.dirty[0]&&(M||o(20,F=O)),2097160&e.$$.dirty[0]&&o(24,a=Lo(B)?"--viewport-pad-footer:"+(B>O?0:1):""),51380224&e.$$.dirty[0]&&o(5,s=`opacity:${i};height:${F}px;--editor-modal:1;${a}`),32768&e.$$.dirty[0]&&o(4,l=Oc(["pintura-editor","PinturaModal",y])),8192&e.$$.dirty[0]&&o(23,d=$&&fo()&&/15_/.test(navigator.userAgent)),12582912&e.$$.dirty[0]&&d&&(e=>{e?(V=window.scrollY,w.classList.add("PinturaDocumentLock"),_(),window.addEventListener("resize",_)):(window.removeEventListener("resize",_),w.classList.remove("PinturaDocumentLock"),Lo(V)&&window.scrollTo(0,V),V=void 0)})(r)},[m,b,M,O,l,s,C,e=>{nu(e.target)&&(o(2,M=!0),L=O)},e=>{if(nu(e.target))if(clearTimeout(void 0),L===O)o(2,M=!1);else{const e=O;((e,t)=>{const o=()=>{e()?t():requestAnimationFrame(o)};requestAnimationFrame(o)})((()=>O!==e),(()=>o(2,M=!1)))}},e=>{e.target&&/PinturaStage/.test(e.target.className)&&e.preventDefault()},e=>{const{key:t}=e;if(!/escape/i.test(t))return;const o=e.target;if(o&&/input|textarea/i.test(o.nodeName))return;const i=document.querySelectorAll(".PinturaModal");i[i.length-1]===m&&h("close")},W,g,$,f,y,()=>{if(v||!b)return;o(19,v=!0);const e=I()||p("meta",{name:"viewport"});R=!R&&e.getAttribute("content"),e.setAttribute("content",n+(/cover/.test(R)?",viewport-fit=cover":"")),e.parentNode||k.append(e);const t=getComputedStyle(m).getPropertyValue("--color-background"),i=A();if(i.length)P=i.map((e=>e.getAttribute("content")));else{const e=p("meta",{name:"theme-color"});k.append(e),i.push(e)}i.forEach((e=>e.setAttribute("content",`rgb(${t})`))),clearTimeout(E),E=setTimeout((()=>C.set(1)),250)},()=>{if(x||b)return;clearTimeout(E),o(18,x=!0);const e=I();R?e.setAttribute("content",R):e.remove();const t=A();P?t.forEach(((e,t)=>{e.setAttribute("content",P[t])})):t.forEach((e=>e.remove())),C.set(0)},x,v,F,B,r,d,a,i,u,function(){o(3,O=yv.innerHeight)},function(e){na[e?"unshift":"push"]((()=>{m=e,o(0,m)}))}]}class vv extends Ba{constructor(e){super(),Oa(this,e,xv,bv,ir,{root:0,preventZoomViewport:12,preventScrollBodyIfNeeded:13,preventFooterOverlapIfNeeded:14,class:15,show:16,hide:17},null,[-1,-1])}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),$a()}get preventZoomViewport(){return this.$$.ctx[12]}set preventZoomViewport(e){this.$$set({preventZoomViewport:e}),$a()}get preventScrollBodyIfNeeded(){return this.$$.ctx[13]}set preventScrollBodyIfNeeded(e){this.$$set({preventScrollBodyIfNeeded:e}),$a()}get preventFooterOverlapIfNeeded(){return this.$$.ctx[14]}set preventFooterOverlapIfNeeded(e){this.$$set({preventFooterOverlapIfNeeded:e}),$a()}get class(){return this.$$.ctx[15]}set class(e){this.$$set({class:e}),$a()}get show(){return this.$$.ctx[16]}get hide(){return this.$$.ctx[17]}}const wv=(e,t,o,i)=>{const n=he(t.x-e.x,t.y-e.y),r=ye(n),a=5*o;let s;s=i?.5*a:Math.ceil(.5*(a-1));const l=Ce(me(r),s);return{anchor:me(e),offset:l,normal:r,solid:i,size:a,sizeHalf:s}},Sv=(e,t,o)=>{const{strokeWidth:i,strokeColor:n,strokeJoin:r,strokeCap:a,...s}=e,{anchor:l,offset:c,normal:d,solid:u,size:h,sizeHalf:p}=t,m=l.x,g=l.y,$=Ce(me(d),h),f=he(m+$.x,g+$.y);if(Ce($,.55),u){we(o,c);const e=Ce(me(d),.5*p);return[{...s,points:[he(m-e.x,g-e.y),he(f.x-$.y,f.y+$.x),he(f.x+$.y,f.y-$.x)],pathClose:!0,backgroundColor:n}]}{const e=Ce((e=>{const t=e.x;return e.x=-e.y,e.y=t,e})(me(d)),.5),t=he(m-e.x,g-e.y),o=he(m+e.x,g+e.y);return[{...s,points:[he(f.x+$.y,f.y-$.x),t,he(m,g),o,he(f.x-$.y,f.y+$.x)],pathClose:!1,strokeWidth:i,strokeColor:n,strokeJoin:r,strokeCap:a}]}},kv=(e,t,o)=>{const{strokeWidth:i,strokeColor:n,...r}=e,{anchor:a,solid:s,offset:l,normal:c,sizeHalf:d}=t;return we(o,l),s&&we(o,ge(me(c))),[{...r,x:a.x,y:a.y,rx:d,ry:d,backgroundColor:s?n:void 0,strokeWidth:s?void 0:i,strokeColor:s?void 0:n}]},Cv=(e,t)=>{const{strokeWidth:o,strokeColor:i,strokeJoin:n,strokeCap:r,...a}=e,{anchor:s,offset:l}=t;return[{...a,points:[he(s.x-l.y,s.y+l.x),he(s.x+l.y,s.y-l.x)],strokeWidth:o,strokeColor:i,strokeJoin:n,strokeCap:r}]},Tv=(e,t,o)=>{const{strokeWidth:i,strokeColor:n,...r}=e,{anchor:a,solid:s,offset:l,normal:c,sizeHalf:d}=t;return we(o,l),[{...r,x:a.x-d,y:a.y-d,width:2*d,height:2*d,rotation:(u=c,Math.atan2(u.y,u.x)),backgroundColor:s?n:void 0,strokeWidth:s?void 0:i,strokeColor:s?void 0:n}];var u},Mv=(e={})=>t=>{if(!t.lineStart&&!t.lineEnd)return;const o=[],{x1:i,y1:n,x2:r,y2:a,lineStart:s,lineEnd:l,strokeWidth:c,strokeColor:d,strokeJoin:u,strokeCap:h,_isFormatted:p,_prerender:m,_scale:g,_translate:$,isSelected:f,isEditing:y,disableErase:b,id:x,...v}=t,w=he(i,n),S=he(r,a),k=[w,S];if(s){const[t,i]=s.split("-"),n=e[t];if(n){const e=wv(w,S,c,!!i);o.push(...n({...v,strokeColor:d,strokeWidth:c,strokeJoin:u,strokeCap:h},e,w))}}if(l){const[t,i]=l.split("-"),n=e[t];if(n){const e=wv(S,w,c,!!i);o.push(...n({...v,strokeColor:d,strokeWidth:c,strokeJoin:u,strokeCap:h},e,S))}}return[{...v,points:k,strokeWidth:c,strokeColor:d,strokeJoin:u,strokeCap:h},...o]},Pv=(e,t)=>{const o=parseFloat(e)*t;return T(e)?o+"%":o},Ev=(e,t)=>T(e)?ln(e,t):e,Iv=e=>[{...e,frameStyle:"line",frameInset:0,frameOffset:0,frameSize:e.frameSize?Pv(e.frameSize,2):"2.5%",frameRadius:e.frameRound?Pv(e.frameSize,2):0}],Av=({width:e,height:t,frameImage:o,frameSize:i="15%",frameOutset:n=0,frameSlices:r={x1:.15,y1:.15,x2:.85,y2:.85}},{isPreview:a})=>{if(!o)return[];const s=Math.sqrt(e*t),l=Ev(i,s),c=a?l:Math.round(l),d=c,u=Ev(n,s),h=2*u,{x1:p,x2:m,y1:g,y2:$}=r,f={x0:0,y0:0,x1:c,y1:d,x2:e-c,y2:t-d,x3:e,y3:t,cw:c,ch:d,ew:e-c-c,eh:t-d-d},y=a?1:0,b=2*y,x=u>0,v={expandsCanvas:x,width:f.cw,height:f.ch,backgroundImage:o};return[{expandsCanvas:x,x:f.x1-y-u,y:f.y0-u,width:f.ew+b+h,height:f.ch,backgroundCorners:[{x:p,y:0},{x:m,y:0},{x:m,y:g},{x:p,y:g}],backgroundImage:o},{expandsCanvas:x,x:f.x1-y-u,y:f.y2+u,width:f.ew+b+h,height:f.ch,backgroundCorners:[{x:p,y:$},{x:m,y:$},{x:m,y:1},{x:p,y:1}],backgroundImage:o},{expandsCanvas:x,x:f.x0-u,y:f.y1-y-u,width:f.cw,height:f.eh+b+h,backgroundCorners:[{x:0,y:g},{x:p,y:g},{x:p,y:$},{x:0,y:$}],backgroundImage:o},{expandsCanvas:x,x:f.x2+u,y:f.y1-y-u,width:f.cw,height:f.eh+b+h,backgroundCorners:[{x:m,y:g},{x:1,y:g},{x:1,y:$},{x:m,y:$}],backgroundImage:o},{...v,x:f.x0-u,y:f.y0-u,backgroundCorners:[{x:0,y:0},{x:p,y:0},{x:p,y:g},{x:0,y:g}]},{...v,x:f.x2+u,y:f.y0-u,backgroundCorners:[{x:m,y:0},{x:1,y:0},{x:1,y:g},{x:m,y:g}]},{...v,x:f.x2+u,y:f.y2+u,backgroundCorners:[{x:m,y:$},{x:1,y:$},{x:1,y:1},{x:m,y:1}]},{...v,x:f.x0-u,y:f.y2+u,backgroundCorners:[{x:0,y:$},{x:p,y:$},{x:p,y:1},{x:0,y:1}]}]},Lv=({x:e,y:t,width:o,height:i,frameInset:n="3.5%",frameSize:r=".25%",frameColor:a=[1,1,1],frameOffset:s="5%",frameAmount:l=1,frameRadius:c=0,expandsCanvas:d=!1},{isPreview:u})=>{const h=Math.sqrt(o*i);let p=Ev(r,h);const m=Ev(n,h),g=Ev(s,h);let $=0;u||(p=Math.max(1,Math.round(p)),$=p%2==0?0:.5);const f=Ev(Pv(c,l),h);return new Array(l).fill(void 0).map(((n,r)=>{const s=g*r;let l=e+m+s,c=t+m+s,h=e+o-m-s,y=t+i-m-s;return u||(l=Math.round(l),c=Math.round(c),h=Math.round(h),y=Math.round(y)),{x:l+$,y:c+$,width:h-l,height:y-c,cornerRadius:f>0?f-s:0,strokeWidth:p,strokeColor:a,expandsCanvas:d}}))},zv=({x:e,y:t,width:o,height:i,frameSize:n=".25%",frameOffset:r=0,frameInset:a="2.5%",frameColor:s=[1,1,1]},{isPreview:l})=>{const c=Math.sqrt(o*i);let d=Ev(n,c),u=Ev(a,c),h=Ev(r,c),p=0;l||(d=Math.max(1,Math.round(d)),u=Math.round(u),h=Math.round(h),p=d%2==0?0:.5);const m=h-u,g=e+u+p,$=t+u+p,f=e+o-u-p,y=t+i-u-p;return[{points:[he(g+m,$),he(f-m,$)]},{points:[he(f,$+m),he(f,y-m)]},{points:[he(f-m,y),he(g+m,y)]},{points:[he(g,y-m),he(g,$+m)]}].map((e=>(e.strokeWidth=d,e.strokeColor=s,e)))},Fv=({x:e,y:t,width:o,height:i,frameSize:n=".25%",frameInset:r="2.5%",frameLength:a="2.5%",frameColor:s=[1,1,1]},{isPreview:l})=>{const c=Math.sqrt(o*i);let d=Ev(n,c),u=Ev(r,c),h=Ev(a,c),p=0;l||(d=Math.max(1,Math.round(d)),u=Math.round(u),h=Math.round(h),p=d%2==0?0:.5);const m=e+u+p,g=t+u+p,$=e+o-u-p,f=t+i-u-p;return[{points:[he(m,g+h),he(m,g),he(m+h,g)]},{points:[he($-h,g),he($,g),he($,g+h)]},{points:[he($,f-h),he($,f),he($-h,f)]},{points:[he(m+h,f),he(m,f),he(m,f-h)]}].map((e=>(e.strokeWidth=d,e.strokeColor=s,e)))},Dv=({x:e,y:t,width:o,height:i,frameColor:n=[1,1,1]},{isPreview:r})=>{const a=Math.sqrt(o*i),s=.1*a;let l=.2*a,c=0;const d=.5*s;return r?c=1:l=Math.ceil(l),n.length=3,[{id:"border",x:e-d+c,y:t-d+c,width:o+s-2*c,height:i+l-2*c,frameStyle:"line",frameInset:0,frameOffset:0,frameSize:s,frameColor:n,expandsCanvas:!0},{id:"chin",x:e-d,y:i-c,width:o+s,height:l,backgroundColor:n,expandsCanvas:!0}].filter(Boolean)},Ov=(e={})=>(t,o)=>{if(!Fo(t,"frameStyle"))return;const i=t.frameStyle,n=e[i];if(!n)return;const{frameStyle:r,...a}=t;return n(a,o)},Wv=e=>{const t=(o,i={isPreview:!0})=>{const n=e.map((e=>{const n=e(o,i);if(n)return n.map((e=>t(e,i)))})).filter(Boolean).flat();return n.length?n.flat().map(((e,t)=>(e.id=o.id+"_"+t,e))):o};return t};"undefined"!=typeof window&&(e=>{if(!e)return;const[t,o,i,n]=[[108,111,99,97,116,105,111,110],[82,101,103,69,120,112],[116,101,115,116],[112,113,105,110,97,92,46,110,108]].map((e=>e.map((e=>String.fromCharCode(e))).join("")));e._qnr6q7e=new e[o](n)[i](e[t])})(window);const Vv=hl,_v=ml,Hv=()=>({read:s,apply:w}),Jv={markupEditorToolbar:d$(),markupEditorToolStyles:l$(),markupEditorShapeStyleControls:sf()},Qv=Wm,ew=by,tw=Ty,ow=zy,iw=yx,uw=zg,hw=fg,mw=nv,gw=rv,$w={cropLabel:"Crop",cropIcon:'<g stroke-width=".125em" stroke="currentColor" fill="none"><path d="M23 17H9a2 2 0 0 1-2-2v-5m0-3V1 M1 7h14a2 2 0 0 1 2 2v7m0 4v3"/></g>',cropIconButtonRecenter:'<path stroke="currentColor" fill="none" stroke-width="2" stroke-linejoin="bevel" d="M1.5 7.5v-6h6M1.5 16.5v6h6M22.5 16.5v6h-6M22.5 7.5v-6h-6"/><circle cx="12" cy="12" r="3.5" fill="currentColor" stroke="none"/>',cropIconButtonRotateLeft:'<g stroke="none" fill="currentColor"><path fill="none" d="M-1-1h582v402H-1z"/><rect x="3" rx="1" height="12" width="12" y="9"/><path d="M15 5h-1a5 5 0 015 5 1 1 0 002 0 7 7 0 00-7-7h-1.374l.747-.747A1 1 0 0011.958.84L9.603 3.194a1 1 0 000 1.415l2.355 2.355a1 1 0 001.415-1.414l-.55-.55H15z"/></g>',cropIconButtonRotateRight:'<g stroke="none" fill="currentColor"><path fill="none" d="M-1-1h582v402H-1z"/><path d="M11.177 5H10a5 5 0 00-5 5 1 1 0 01-2 0 7 7 0 017-7h1.374l-.747-.747A1 1 0 0112.042.84l2.355 2.355a1 1 0 010 1.415l-2.355 2.354a1 1 0 01-1.415-1.414l.55-.55z"/><rect rx="1" height="12" width="12" y="9" x="9"/></g>',cropIconButtonFlipVertical:'<g stroke="none" fill="currentColor"><path d="M19.993 12.143H7a1 1 0 0 1-1-1V5.994a1 1 0 0 1 1.368-.93l12.993 5.15a1 1 0 0 1-.368 1.93z"/><path d="M19.993 14a1 1 0 0 1 .368 1.93L7.368 21.078A1 1 0 0 1 6 20.148V15a1 1 0 0 1 1-1h12.993z" opacity=".6"/></g>',cropIconButtonFlipHorizontal:'<g stroke="none" fill="currentColor"><path d="M11.93 7.007V20a1 1 0 0 1-1 1H5.78a1 1 0 0 1-.93-1.368l5.15-12.993a1 1 0 0 1 1.929.368z"/><path d="M14 7.007V20a1 1 0 0 0 1 1h5.149a1 1 0 0 0 .93-1.368l-5.15-12.993A1 1 0 0 0 14 7.007z" opacity=".6"/></g>',cropIconSelectPreset:(e,t)=>{const[o,i,n]=t?[t<1?1:.3,1===t?.85:.5,t>1?1:.3]:[.2,.3,.4];return`<g fill="currentColor">\n <rect opacity="${o}" x="2" y="4" width="10" height="18" rx="1"/>\n <rect opacity="${i}" x="4" y="8" width="14" height="14" rx="1"/>\n <rect opacity="${n}" x="6" y="12" width="17" height="10" rx="1"/>\n </g>`},cropIconCropBoundary:(e,t)=>{const[o,i,n,r]=t?[.3,1,0,0]:[0,0,.3,1];return`<g fill="currentColor">\n <rect opacity="${o}" x="2" y="3" width="20" height="20" rx="1"/>\n <rect opacity="${i}" x="7" y="8" width="10" height="10" rx="1"/>\n <rect opacity="${n}" x="4" y="8" width="14" height="14" rx="1"/>\n <rect opacity="${r}" x="12" y="4" width="10" height="10" rx="1"/>\n </g>`},cropLabelButtonRecenter:"Recenter",cropLabelButtonRotateLeft:"Rotate left",cropLabelButtonRotateRight:"Rotate right",cropLabelButtonFlipHorizontal:"Flip horizontal",cropLabelButtonFlipVertical:"Flip vertical",cropLabelSelectPreset:"Crop shape",cropLabelCropBoundary:"Crop boundary",cropLabelCropBoundaryEdge:"Edge of image",cropLabelCropBoundaryNone:"None",cropLabelTabRotation:"Rotation",cropLabelTabZoom:"Scale"},yw={filterLabel:"Filter",filterIcon:'<g stroke-width=".125em" stroke="currentColor" fill="none"><path d="M18.347 9.907a6.5 6.5 0 1 0-1.872 3.306M3.26 11.574a6.5 6.5 0 1 0 2.815-1.417 M10.15 17.897A6.503 6.503 0 0 0 16.5 23a6.5 6.5 0 1 0-6.183-8.51"/></g>',filterLabelChrome:"Chrome",filterLabelFade:"Fade",filterLabelCold:"Cold",filterLabelWarm:"Warm",filterLabelPastel:"Pastel",filterLabelMonoDefault:"Mono",filterLabelMonoNoir:"Noir",filterLabelMonoWash:"Wash",filterLabelMonoStark:"Stark",filterLabelSepiaDefault:"Sepia",filterLabelSepiaBlues:"Blues",filterLabelSepiaRust:"Rust",filterLabelSepiaColor:"Color"},bw={finetuneLabel:"Finetune",finetuneIcon:'<g stroke-width=".125em" stroke="currentColor" fill="none"><path d="M4 1v5.5m0 3.503V23M12 1v10.5m0 3.5v8M20 1v15.5m0 3.5v3M2 7h4M10 12h4M18 17h4"/></g>',finetuneLabelBrightness:"Brightness",finetuneLabelContrast:"Contrast",finetuneLabelSaturation:"Saturation",finetuneLabelExposure:"Exposure",finetuneLabelTemperature:"Temperature",finetuneLabelGamma:"Gamma",finetuneLabelClarity:"Clarity",finetuneLabelVignette:"Vignette"},ww={annotateLabel:"Annotate",annotateIcon:'<g stroke-width=".125em" stroke="currentColor" fill="none"><path d="M17.086 2.914a2.828 2.828 0 1 1 4 4l-14.5 14.5-5.5 1.5 1.5-5.5 14.5-14.5z"/></g>'},Pw=(e={},t)=>{const{sub:o,pub:i}=Yo(),r={},a=((e={},t)=>new vv({target:t||document.body,props:{class:e.class,preventZoomViewport:e.preventZoomViewport,preventScrollBodyIfNeeded:e.preventScrollBodyIfNeeded,preventFooterOverlapIfNeeded:e.preventFooterOverlapIfNeeded}}))(e,t),s=()=>{a.hide&&a.hide()},l=()=>{a.show&&a.show()},c=hv(a.root);uv(c,r),r.handleEvent=n,c.handleEvent=(e,t)=>{if("init"===e)return r.handleEvent(e,r);r.handleEvent(e,t)},c.on("close",(async()=>{const{willClose:t}=e;if(!t)return s();await t()&&s()}));const d=(e,t)=>/show|hide/.test(e)?o(e,t):c.on(e,t),u=["show","hide"].map((e=>d(e,(t=>r.handleEvent(e,t))))),h=()=>{u.forEach((e=>e())),s(),a.$destroy(),c.destroy()};return Qa(r,{on:d,destroy:h,hide:s,show:l}),Object.defineProperty(r,"modal",{get:()=>a.root,set:()=>{}}),a.$on("close",c.close),a.$on("show",(()=>i("show"))),a.$on("hide",(()=>{i("hide"),!1!==e.enableAutoDestroy&&h()})),!1!==e.enableAutoHide&&c.on("process",s),c.on("loadstart",l),!1!==e.enableButtonClose&&(e.enableButtonClose=!0),delete e.class,Object.assign(r,e),r},Lw=(e=[])=>Wv([Ov({solid:Iv,hook:Fv,line:Lv,edge:zv,polaroid:Dv,nine:Av}),Mv({arrow:Sv,circle:kv,square:Tv,bar:Cv}),...e])},"./node_modules/@radix-ui/react-checkbox/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{C1:()=>$e698a72e93240346$export$adb584737d712b70,bL:()=>$e698a72e93240346$export$be92b6f5f03c0fe9});var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@radix-ui/react-compose-refs/dist/index.mjs"),_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@radix-ui/react-context/dist/index.mjs"),_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@radix-ui/primitive/dist/index.mjs"),_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"),_radix_ui_react_use_previous__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/@radix-ui/react-use-previous/dist/index.mjs"),_radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/@radix-ui/react-use-size/dist/index.mjs"),_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@radix-ui/react-presence/dist/index.mjs"),_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@radix-ui/react-primitive/dist/index.mjs");const[$e698a72e93240346$var$createCheckboxContext,$e698a72e93240346$export$b566c4ff5488ea01]=(0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_1__.A)("Checkbox"),[$e698a72e93240346$var$CheckboxProvider,$e698a72e93240346$var$useCheckboxContext]=$e698a72e93240346$var$createCheckboxContext("Checkbox"),$e698a72e93240346$export$48513f6b9f8ce62d=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,forwardedRef)=>{const{__scopeCheckbox,name,checked:checkedProp,defaultChecked,required,disabled,value="on",onCheckedChange,...checkboxProps}=props,[button,setButton]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),composedRefs=(0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.s)(forwardedRef,(node=>setButton(node))),hasConsumerStoppedPropagationRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(!1),isFormControl=!button||Boolean(button.closest("form")),[checked=!1,setChecked]=(0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_3__.i)({prop:checkedProp,defaultProp:defaultChecked,onChange:onCheckedChange}),initialCheckedStateRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(checked);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{const form=null==button?void 0:button.form;if(form){const reset=()=>setChecked(initialCheckedStateRef.current);return form.addEventListener("reset",reset),()=>form.removeEventListener("reset",reset)}}),[button,setChecked]),(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)($e698a72e93240346$var$CheckboxProvider,{scope:__scopeCheckbox,state:checked,disabled},(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.sG.button,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__.A)({type:"button",role:"checkbox","aria-checked":$e698a72e93240346$var$isIndeterminate(checked)?"mixed":checked,"aria-required":required,"data-state":$e698a72e93240346$var$getState(checked),"data-disabled":disabled?"":void 0,disabled,value},checkboxProps,{ref:composedRefs,onKeyDown:(0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_6__.m)(props.onKeyDown,(event=>{"Enter"===event.key&&event.preventDefault()})),onClick:(0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_6__.m)(props.onClick,(event=>{setChecked((prevChecked=>!!$e698a72e93240346$var$isIndeterminate(prevChecked)||!prevChecked)),isFormControl&&(hasConsumerStoppedPropagationRef.current=event.isPropagationStopped(),hasConsumerStoppedPropagationRef.current||event.stopPropagation())}))})),isFormControl&&(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)($e698a72e93240346$var$BubbleInput,{control:button,bubbles:!hasConsumerStoppedPropagationRef.current,name,value,checked,required,disabled,style:{transform:"translateX(-100%)"}}))})),$e698a72e93240346$export$59aad738f51d1c05=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,forwardedRef)=>{const{__scopeCheckbox,forceMount,...indicatorProps}=props,context=$e698a72e93240346$var$useCheckboxContext("CheckboxIndicator",__scopeCheckbox);return(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_7__.C,{present:forceMount||$e698a72e93240346$var$isIndeterminate(context.state)||!0===context.state},(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.sG.span,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__.A)({"data-state":$e698a72e93240346$var$getState(context.state),"data-disabled":context.disabled?"":void 0},indicatorProps,{ref:forwardedRef,style:{pointerEvents:"none",...props.style}})))})),$e698a72e93240346$var$BubbleInput=props=>{const{control,checked,bubbles=!0,...inputProps}=props,ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),prevChecked=(0,_radix_ui_react_use_previous__WEBPACK_IMPORTED_MODULE_8__.Z)(checked),controlSize=(0,_radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_9__.X)(control);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{const input=ref.current,inputProto=window.HTMLInputElement.prototype,setChecked=Object.getOwnPropertyDescriptor(inputProto,"checked").set;if(prevChecked!==checked&&setChecked){const event=new Event("click",{bubbles});input.indeterminate=$e698a72e93240346$var$isIndeterminate(checked),setChecked.call(input,!$e698a72e93240346$var$isIndeterminate(checked)&&checked),input.dispatchEvent(event)}}),[prevChecked,checked,bubbles]),(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input",(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__.A)({type:"checkbox","aria-hidden":!0,defaultChecked:!$e698a72e93240346$var$isIndeterminate(checked)&&checked},inputProps,{tabIndex:-1,ref,style:{...props.style,...controlSize,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function $e698a72e93240346$var$isIndeterminate(checked){return"indeterminate"===checked}function $e698a72e93240346$var$getState(checked){return $e698a72e93240346$var$isIndeterminate(checked)?"indeterminate":checked?"checked":"unchecked"}const $e698a72e93240346$export$be92b6f5f03c0fe9=$e698a72e93240346$export$48513f6b9f8ce62d,$e698a72e93240346$export$adb584737d712b70=$e698a72e93240346$export$59aad738f51d1c05},"./node_modules/@radix-ui/react-slider/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{CC:()=>$faa2e61a3361514f$export$13921ac0cc260818,Q6:()=>$faa2e61a3361514f$export$9a58ef0d7ad3278c,bL:()=>$faa2e61a3361514f$export$be92b6f5f03c0fe9,zi:()=>$faa2e61a3361514f$export$6521433ed15a34db});var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_radix_ui_number__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@radix-ui/number/dist/index.mjs"),_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@radix-ui/primitive/dist/index.mjs"),_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@radix-ui/react-compose-refs/dist/index.mjs"),_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@radix-ui/react-context/dist/index.mjs"),_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"),_radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/@radix-ui/react-direction/dist/index.mjs"),_radix_ui_react_use_previous__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/@radix-ui/react-use-previous/dist/index.mjs"),_radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/@radix-ui/react-use-size/dist/index.mjs"),_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/@radix-ui/react-primitive/dist/index.mjs"),_radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@radix-ui/react-collection/dist/index.mjs");const $faa2e61a3361514f$var$PAGE_KEYS=["PageUp","PageDown"],$faa2e61a3361514f$var$ARROW_KEYS=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],$faa2e61a3361514f$var$BACK_KEYS={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},[$faa2e61a3361514f$var$Collection,$faa2e61a3361514f$var$useCollection,$faa2e61a3361514f$var$createCollectionScope]=(0,_radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_1__.N)("Slider"),[$faa2e61a3361514f$var$createSliderContext,$faa2e61a3361514f$export$ef72632d7b901f97]=(0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__.A)("Slider",[$faa2e61a3361514f$var$createCollectionScope]),[$faa2e61a3361514f$var$SliderProvider,$faa2e61a3361514f$var$useSliderContext]=$faa2e61a3361514f$var$createSliderContext("Slider"),$faa2e61a3361514f$export$472062a354075cee=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,forwardedRef)=>{const{name,min=0,max=100,step=1,orientation="horizontal",disabled=!1,minStepsBetweenThumbs=0,defaultValue=[min],value:value1,onValueChange=()=>{},onValueCommit=()=>{},inverted=!1,...sliderProps}=props,[slider,setSlider]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),composedRefs=(0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.s)(forwardedRef,(node=>setSlider(node))),thumbRefs=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(new Set),valueIndexToChangeRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0),isHorizontal="horizontal"===orientation,isFormControl=!slider||Boolean(slider.closest("form")),SliderOrientation=isHorizontal?$faa2e61a3361514f$var$SliderHorizontal:$faa2e61a3361514f$var$SliderVertical,[values=[],setValues]=(0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__.i)({prop:value1,defaultProp:defaultValue,onChange:value=>{var _thumbs$valueIndexToC;null===(_thumbs$valueIndexToC=[...thumbRefs.current][valueIndexToChangeRef.current])||void 0===_thumbs$valueIndexToC||_thumbs$valueIndexToC.focus(),onValueChange(value)}}),valuesBeforeSlideStartRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(values);function updateValues(value,atIndex,{commit}={commit:!1}){const decimalCount=function $faa2e61a3361514f$var$getDecimalCount(value){return(String(value).split(".")[1]||"").length}(step),snapToStep=function $faa2e61a3361514f$var$roundValue(value,decimalCount){const rounder=Math.pow(10,decimalCount);return Math.round(value*rounder)/rounder}(Math.round((value-min)/step)*step+min,decimalCount),nextValue=(0,_radix_ui_number__WEBPACK_IMPORTED_MODULE_5__.q)(snapToStep,[min,max]);setValues(((prevValues=[])=>{const nextValues=function $faa2e61a3361514f$var$getNextSortedValues(prevValues=[],nextValue,atIndex){const nextValues=[...prevValues];return nextValues[atIndex]=nextValue,nextValues.sort(((a,b)=>a-b))}(prevValues,nextValue,atIndex);if(function $faa2e61a3361514f$var$hasMinStepsBetweenValues(values,minStepsBetweenValues){if(minStepsBetweenValues>0){const stepsBetweenValues=function $faa2e61a3361514f$var$getStepsBetweenValues(values){return values.slice(0,-1).map(((value,index)=>values[index+1]-value))}(values);return Math.min(...stepsBetweenValues)>=minStepsBetweenValues}return!0}(nextValues,minStepsBetweenThumbs*step)){valueIndexToChangeRef.current=nextValues.indexOf(nextValue);const hasChanged=String(nextValues)!==String(prevValues);return hasChanged&&commit&&onValueCommit(nextValues),hasChanged?nextValues:prevValues}return prevValues}))}return(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)($faa2e61a3361514f$var$SliderProvider,{scope:props.__scopeSlider,disabled,min,max,valueIndexToChangeRef,thumbs:thumbRefs.current,values,orientation},(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)($faa2e61a3361514f$var$Collection.Provider,{scope:props.__scopeSlider},(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)($faa2e61a3361514f$var$Collection.Slot,{scope:props.__scopeSlider},(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(SliderOrientation,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__.A)({"aria-disabled":disabled,"data-disabled":disabled?"":void 0},sliderProps,{ref:composedRefs,onPointerDown:(0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.m)(sliderProps.onPointerDown,(()=>{disabled||(valuesBeforeSlideStartRef.current=values)})),min,max,inverted,onSlideStart:disabled?void 0:function handleSlideStart(value){const closestIndex=function $faa2e61a3361514f$var$getClosestValueIndex(values,nextValue){if(1===values.length)return 0;const distances=values.map((value=>Math.abs(value-nextValue))),closestDistance=Math.min(...distances);return distances.indexOf(closestDistance)}(values,value);updateValues(value,closestIndex)},onSlideMove:disabled?void 0:function handleSlideMove(value){updateValues(value,valueIndexToChangeRef.current)},onSlideEnd:disabled?void 0:function handleSlideEnd(){const prevValue=valuesBeforeSlideStartRef.current[valueIndexToChangeRef.current];values[valueIndexToChangeRef.current]!==prevValue&&onValueCommit(values)},onHomeKeyDown:()=>!disabled&&updateValues(min,0,{commit:!0}),onEndKeyDown:()=>!disabled&&updateValues(max,values.length-1,{commit:!0}),onStepKeyDown:({event,direction:stepDirection})=>{if(!disabled){const multiplier=$faa2e61a3361514f$var$PAGE_KEYS.includes(event.key)||event.shiftKey&&$faa2e61a3361514f$var$ARROW_KEYS.includes(event.key)?10:1,atIndex=valueIndexToChangeRef.current;updateValues(values[atIndex]+step*multiplier*stepDirection,atIndex,{commit:!0})}}})))),isFormControl&&values.map(((value,index)=>(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)($faa2e61a3361514f$var$BubbleInput,{key:index,name:name?name+(values.length>1?"[]":""):void 0,value}))))})),[$faa2e61a3361514f$var$SliderOrientationProvider,$faa2e61a3361514f$var$useSliderOrientationContext]=$faa2e61a3361514f$var$createSliderContext("Slider",{startEdge:"left",endEdge:"right",size:"width",direction:1}),$faa2e61a3361514f$var$SliderHorizontal=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,forwardedRef)=>{const{min,max,dir,inverted,onSlideStart,onSlideMove,onSlideEnd,onStepKeyDown,...sliderProps}=props,[slider,setSlider]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),composedRefs=(0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.s)(forwardedRef,(node=>setSlider(node))),rectRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(),direction=(0,_radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_8__.jH)(dir),isDirectionLTR="ltr"===direction,isSlidingFromLeft=isDirectionLTR&&!inverted||!isDirectionLTR&&inverted;function getValueFromPointer(pointerPosition){const rect=rectRef.current||slider.getBoundingClientRect(),value=$faa2e61a3361514f$var$linearScale([0,rect.width],isSlidingFromLeft?[min,max]:[max,min]);return rectRef.current=rect,value(pointerPosition-rect.left)}return(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)($faa2e61a3361514f$var$SliderOrientationProvider,{scope:props.__scopeSlider,startEdge:isSlidingFromLeft?"left":"right",endEdge:isSlidingFromLeft?"right":"left",direction:isSlidingFromLeft?1:-1,size:"width"},(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)($faa2e61a3361514f$var$SliderImpl,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__.A)({dir:direction,"data-orientation":"horizontal"},sliderProps,{ref:composedRefs,style:{...sliderProps.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:event=>{const value=getValueFromPointer(event.clientX);null==onSlideStart||onSlideStart(value)},onSlideMove:event=>{const value=getValueFromPointer(event.clientX);null==onSlideMove||onSlideMove(value)},onSlideEnd:()=>{rectRef.current=void 0,null==onSlideEnd||onSlideEnd()},onStepKeyDown:event=>{const isBackKey=$faa2e61a3361514f$var$BACK_KEYS[isSlidingFromLeft?"from-left":"from-right"].includes(event.key);null==onStepKeyDown||onStepKeyDown({event,direction:isBackKey?-1:1})}})))})),$faa2e61a3361514f$var$SliderVertical=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,forwardedRef)=>{const{min,max,inverted,onSlideStart,onSlideMove,onSlideEnd,onStepKeyDown,...sliderProps}=props,sliderRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),ref=(0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.s)(forwardedRef,sliderRef),rectRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(),isSlidingFromBottom=!inverted;function getValueFromPointer(pointerPosition){const rect=rectRef.current||sliderRef.current.getBoundingClientRect(),value=$faa2e61a3361514f$var$linearScale([0,rect.height],isSlidingFromBottom?[max,min]:[min,max]);return rectRef.current=rect,value(pointerPosition-rect.top)}return(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)($faa2e61a3361514f$var$SliderOrientationProvider,{scope:props.__scopeSlider,startEdge:isSlidingFromBottom?"bottom":"top",endEdge:isSlidingFromBottom?"top":"bottom",size:"height",direction:isSlidingFromBottom?1:-1},(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)($faa2e61a3361514f$var$SliderImpl,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__.A)({"data-orientation":"vertical"},sliderProps,{ref,style:{...sliderProps.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:event=>{const value=getValueFromPointer(event.clientY);null==onSlideStart||onSlideStart(value)},onSlideMove:event=>{const value=getValueFromPointer(event.clientY);null==onSlideMove||onSlideMove(value)},onSlideEnd:()=>{rectRef.current=void 0,null==onSlideEnd||onSlideEnd()},onStepKeyDown:event=>{const isBackKey=$faa2e61a3361514f$var$BACK_KEYS[isSlidingFromBottom?"from-bottom":"from-top"].includes(event.key);null==onStepKeyDown||onStepKeyDown({event,direction:isBackKey?-1:1})}})))})),$faa2e61a3361514f$var$SliderImpl=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,forwardedRef)=>{const{__scopeSlider,onSlideStart,onSlideMove,onSlideEnd,onHomeKeyDown,onEndKeyDown,onStepKeyDown,...sliderProps}=props,context=$faa2e61a3361514f$var$useSliderContext("Slider",__scopeSlider);return(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__.sG.span,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__.A)({},sliderProps,{ref:forwardedRef,onKeyDown:(0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.m)(props.onKeyDown,(event=>{"Home"===event.key?(onHomeKeyDown(event),event.preventDefault()):"End"===event.key?(onEndKeyDown(event),event.preventDefault()):$faa2e61a3361514f$var$PAGE_KEYS.concat($faa2e61a3361514f$var$ARROW_KEYS).includes(event.key)&&(onStepKeyDown(event),event.preventDefault())})),onPointerDown:(0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.m)(props.onPointerDown,(event=>{const target=event.target;target.setPointerCapture(event.pointerId),event.preventDefault(),context.thumbs.has(target)?target.focus():onSlideStart(event)})),onPointerMove:(0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.m)(props.onPointerMove,(event=>{event.target.hasPointerCapture(event.pointerId)&&onSlideMove(event)})),onPointerUp:(0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.m)(props.onPointerUp,(event=>{const target=event.target;target.hasPointerCapture(event.pointerId)&&(target.releasePointerCapture(event.pointerId),onSlideEnd(event))}))}))})),$faa2e61a3361514f$export$105594979f116971=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,forwardedRef)=>{const{__scopeSlider,...trackProps}=props,context=$faa2e61a3361514f$var$useSliderContext("SliderTrack",__scopeSlider);return(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__.sG.span,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__.A)({"data-disabled":context.disabled?"":void 0,"data-orientation":context.orientation},trackProps,{ref:forwardedRef}))})),$faa2e61a3361514f$export$a5cf38a7a000fe77=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,forwardedRef)=>{const{__scopeSlider,...rangeProps}=props,context=$faa2e61a3361514f$var$useSliderContext("SliderRange",__scopeSlider),orientation=$faa2e61a3361514f$var$useSliderOrientationContext("SliderRange",__scopeSlider),ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),composedRefs=(0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.s)(forwardedRef,ref),valuesCount=context.values.length,percentages=context.values.map((value=>$faa2e61a3361514f$var$convertValueToPercentage(value,context.min,context.max))),offsetStart=valuesCount>1?Math.min(...percentages):0,offsetEnd=100-Math.max(...percentages);return(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__.sG.span,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__.A)({"data-orientation":context.orientation,"data-disabled":context.disabled?"":void 0},rangeProps,{ref:composedRefs,style:{...props.style,[orientation.startEdge]:offsetStart+"%",[orientation.endEdge]:offsetEnd+"%"}}))})),$faa2e61a3361514f$export$2c1b491743890dec=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,forwardedRef)=>{const getItems=$faa2e61a3361514f$var$useCollection(props.__scopeSlider),[thumb,setThumb]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),composedRefs=(0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.s)(forwardedRef,(node=>setThumb(node))),index=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)((()=>thumb?getItems().findIndex((item=>item.ref.current===thumb)):-1),[getItems,thumb]);return(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)($faa2e61a3361514f$var$SliderThumbImpl,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__.A)({},props,{ref:composedRefs,index}))})),$faa2e61a3361514f$var$SliderThumbImpl=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,forwardedRef)=>{const{__scopeSlider,index,...thumbProps}=props,context=$faa2e61a3361514f$var$useSliderContext("SliderThumb",__scopeSlider),orientation=$faa2e61a3361514f$var$useSliderOrientationContext("SliderThumb",__scopeSlider),[thumb,setThumb]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),composedRefs=(0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.s)(forwardedRef,(node=>setThumb(node))),size=(0,_radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_10__.X)(thumb),value=context.values[index],percent=void 0===value?0:$faa2e61a3361514f$var$convertValueToPercentage(value,context.min,context.max),label=function $faa2e61a3361514f$var$getLabel(index,totalValues){return totalValues>2?`Value ${index+1} of ${totalValues}`:2===totalValues?["Minimum","Maximum"][index]:void 0}(index,context.values.length),orientationSize=null==size?void 0:size[orientation.size],thumbInBoundsOffset=orientationSize?function $faa2e61a3361514f$var$getThumbInBoundsOffset(width,left,direction){const halfWidth=width/2,offset=$faa2e61a3361514f$var$linearScale([0,50],[0,halfWidth]);return(halfWidth-offset(left)*direction)*direction}(orientationSize,percent,orientation.direction):0;return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{if(thumb)return context.thumbs.add(thumb),()=>{context.thumbs.delete(thumb)}}),[thumb,context.thumbs]),(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[orientation.startEdge]:`calc(${percent}% + ${thumbInBoundsOffset}px)`}},(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)($faa2e61a3361514f$var$Collection.ItemSlot,{scope:props.__scopeSlider},(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__.sG.span,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__.A)({role:"slider","aria-label":props["aria-label"]||label,"aria-valuemin":context.min,"aria-valuenow":value,"aria-valuemax":context.max,"aria-orientation":context.orientation,"data-orientation":context.orientation,"data-disabled":context.disabled?"":void 0,tabIndex:context.disabled?void 0:0},thumbProps,{ref:composedRefs,style:void 0===value?{display:"none"}:props.style,onFocus:(0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.m)(props.onFocus,(()=>{context.valueIndexToChangeRef.current=index}))}))))})),$faa2e61a3361514f$var$BubbleInput=props=>{const{value,...inputProps}=props,ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),prevValue=(0,_radix_ui_react_use_previous__WEBPACK_IMPORTED_MODULE_11__.Z)(value);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{const input=ref.current,inputProto=window.HTMLInputElement.prototype,setValue=Object.getOwnPropertyDescriptor(inputProto,"value").set;if(prevValue!==value&&setValue){const event=new Event("input",{bubbles:!0});setValue.call(input,value),input.dispatchEvent(event)}}),[prevValue,value]),(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input",(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__.A)({style:{display:"none"}},inputProps,{ref,defaultValue:value}))};function $faa2e61a3361514f$var$convertValueToPercentage(value,min,max){const percentage=100/(max-min)*(value-min);return(0,_radix_ui_number__WEBPACK_IMPORTED_MODULE_5__.q)(percentage,[0,100])}function $faa2e61a3361514f$var$linearScale(input,output){return value=>{if(input[0]===input[1]||output[0]===output[1])return output[0];const ratio=(output[1]-output[0])/(input[1]-input[0]);return output[0]+ratio*(value-input[0])}}const $faa2e61a3361514f$export$be92b6f5f03c0fe9=$faa2e61a3361514f$export$472062a354075cee,$faa2e61a3361514f$export$13921ac0cc260818=$faa2e61a3361514f$export$105594979f116971,$faa2e61a3361514f$export$9a58ef0d7ad3278c=$faa2e61a3361514f$export$a5cf38a7a000fe77,$faa2e61a3361514f$export$6521433ed15a34db=$faa2e61a3361514f$export$2c1b491743890dec},"./node_modules/filepond-plugin-file-poster/dist/filepond-plugin-file-poster.js":function(module){module.exports=function(){"use strict";var IMAGE_SCALE_SPRING_PROPS={type:"spring",stiffness:.5,damping:.45,mass:10},createPosterView=function createPosterView(_){return _.utils.createView({name:"file-poster",tag:"div",ignoreRect:!0,create:function create(_ref){var root=_ref.root;root.ref.image=document.createElement("img"),root.element.appendChild(root.ref.image)},write:_.utils.createRoute({DID_FILE_POSTER_LOAD:function DID_FILE_POSTER_LOAD(_ref2){var root=_ref2.root,props=_ref2.props,id=props.id,item=root.query("GET_ITEM",{id:props.id});if(item){var poster=item.getMetadata("poster");root.ref.image.src=poster,root.dispatch("DID_FILE_POSTER_DRAW",{id})}}}),mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:IMAGE_SCALE_SPRING_PROPS,scaleY:IMAGE_SCALE_SPRING_PROPS,opacity:{type:"tween",duration:750}}}})},applyTemplate=function applyTemplate(source,target){target.width=source.width,target.height=source.height,target.getContext("2d").drawImage(source,0,0)},createPosterOverlayView=function createPosterOverlayView(fpAPI){return fpAPI.utils.createView({name:"file-poster-overlay",tag:"canvas",ignoreRect:!0,create:function create(_ref){var root=_ref.root,props=_ref.props;applyTemplate(props.template,root.element)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}})},getImageSize=function getImageSize(url,cb){var image=new Image;image.onload=function(){var width=image.naturalWidth,height=image.naturalHeight;image=null,cb(width,height)},image.src=url},easeInOutSine=function easeInOutSine(t){return-.5*(Math.cos(Math.PI*t)-1)},addGradientSteps=function addGradientSteps(gradient,color){for(var alpha=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,easeFn=arguments.length>3&&void 0!==arguments[3]?arguments[3]:easeInOutSine,steps=arguments.length>4&&void 0!==arguments[4]?arguments[4]:10,offset=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,range=1-offset,rgb=color.join(","),i=0;i<=steps;i++){var p=i/steps,stop=offset+range*p;gradient.addColorStop(stop,"rgba(".concat(rgb,", ").concat(easeFn(p)*alpha,")"))}},MAX_WIDTH=10,MAX_HEIGHT=10,calculateAverageColor=function calculateAverageColor(image){var scalar=Math.min(MAX_WIDTH/image.width,MAX_HEIGHT/image.height),canvas=document.createElement("canvas"),ctx=canvas.getContext("2d"),width=canvas.width=Math.ceil(image.width*scalar),height=canvas.height=Math.ceil(image.height*scalar);ctx.drawImage(image,0,0,width,height);var data=null;try{data=ctx.getImageData(0,0,width,height).data}catch(e){return null}for(var l=data.length,r=0,g=0,b=0,i=0;i<l;i+=4)r+=data[i]*data[i],g+=data[i+1]*data[i+1],b+=data[i+2]*data[i+2];return{r:r=averageColor(r,l),g:g=averageColor(g,l),b:b=averageColor(b,l)}},averageColor=function averageColor(c,l){return Math.floor(Math.sqrt(c/(l/4)))},drawTemplate=function drawTemplate(canvas,width,height,color,alphaTarget){canvas.width=width,canvas.height=height;var ctx=canvas.getContext("2d"),horizontalCenter=.5*width,grad=ctx.createRadialGradient(horizontalCenter,height+110,height-100,horizontalCenter,height+110,height+100);addGradientSteps(grad,color,alphaTarget,void 0,8,.4),ctx.save(),ctx.translate(.5*-width,0),ctx.scale(2,1),ctx.fillStyle=grad,ctx.fillRect(0,0,width,height),ctx.restore()},hasNavigator="undefined"!=typeof navigator,width=500,height=200,overlayTemplateShadow=hasNavigator&&document.createElement("canvas"),overlayTemplateError=hasNavigator&&document.createElement("canvas"),overlayTemplateSuccess=hasNavigator&&document.createElement("canvas"),itemShadowColor=[40,40,40],itemErrorColor=[196,78,71],itemSuccessColor=[54,151,99];hasNavigator&&(drawTemplate(overlayTemplateShadow,width,height,itemShadowColor,.85),drawTemplate(overlayTemplateError,width,height,itemErrorColor,1),drawTemplate(overlayTemplateSuccess,width,height,itemSuccessColor,1));var loadImage=function loadImage(url,crossOriginValue){return new Promise((function(resolve,reject){var img=new Image;"string"==typeof crossOrigin&&(img.crossOrigin=crossOriginValue),img.onload=function(){resolve(img)},img.onerror=function(e){reject(e)},img.src=url}))},createPosterWrapperView=function createPosterWrapperView(_){var overlay=createPosterOverlayView(_),didCreatePreviewContainer=function didCreatePreviewContainer(_ref){var root=_ref.root,id=_ref.props.id,item=root.query("GET_ITEM",id);if(item){var fileURL=item.getMetadata("poster"),previewImageLoaded=function previewImageLoaded(data){var averageColor=root.query("GET_FILE_POSTER_CALCULATE_AVERAGE_IMAGE_COLOR")?calculateAverageColor(data):null;item.setMetadata("color",averageColor,!0),root.dispatch("DID_FILE_POSTER_LOAD",{id,data})};getImageSize(fileURL,(function(width,height){root.dispatch("DID_FILE_POSTER_CALCULATE_SIZE",{id,width,height}),loadImage(fileURL,root.query("GET_FILE_POSTER_CROSS_ORIGIN_ATTRIBUTE_VALUE")).then(previewImageLoaded)}))}},didLoadPreview=function didLoadPreview(_ref2){_ref2.root.ref.overlayShadow.opacity=1},didDrawPreview=function didDrawPreview(_ref3){var image=_ref3.root.ref.image;image.scaleX=1,image.scaleY=1,image.opacity=1},restoreOverlay=function restoreOverlay(_ref4){var root=_ref4.root;root.ref.overlayShadow.opacity=1,root.ref.overlayError.opacity=0,root.ref.overlaySuccess.opacity=0},didThrowError=function didThrowError(_ref5){var root=_ref5.root;root.ref.overlayShadow.opacity=.25,root.ref.overlayError.opacity=1},didCompleteProcessing=function didCompleteProcessing(_ref6){var root=_ref6.root;root.ref.overlayShadow.opacity=.25,root.ref.overlaySuccess.opacity=1},create=function create(_ref7){var root=_ref7.root,props=_ref7.props,itemShadowColorProp=root.query("GET_FILE_POSTER_ITEM_OVERLAY_SHADOW_COLOR"),itemErrorColorProp=root.query("GET_FILE_POSTER_ITEM_OVERLAY_ERROR_COLOR"),itemSuccessColorProp=root.query("GET_FILE_POSTER_ITEM_OVERLAY_SUCCESS_COLOR");itemShadowColorProp&&itemShadowColorProp!==itemShadowColor&&drawTemplate(overlayTemplateShadow,width,height,itemShadowColor=itemShadowColorProp,.85),itemErrorColorProp&&itemErrorColorProp!==itemErrorColor&&drawTemplate(overlayTemplateError,width,height,itemErrorColor=itemErrorColorProp,1),itemSuccessColorProp&&itemSuccessColorProp!==itemSuccessColor&&drawTemplate(overlayTemplateSuccess,width,height,itemSuccessColor=itemSuccessColorProp,1);var image=createPosterView(_);root.ref.image=root.appendChildView(root.createChildView(image,{id:props.id,scaleX:1.25,scaleY:1.25,opacity:0})),root.ref.overlayShadow=root.appendChildView(root.createChildView(overlay,{template:overlayTemplateShadow,opacity:0})),root.ref.overlaySuccess=root.appendChildView(root.createChildView(overlay,{template:overlayTemplateSuccess,opacity:0})),root.ref.overlayError=root.appendChildView(root.createChildView(overlay,{template:overlayTemplateError,opacity:0}))};return _.utils.createView({name:"file-poster-wrapper",create,write:_.utils.createRoute({DID_FILE_POSTER_LOAD:didLoadPreview,DID_FILE_POSTER_DRAW:didDrawPreview,DID_FILE_POSTER_CONTAINER_CREATE:didCreatePreviewContainer,DID_THROW_ITEM_LOAD_ERROR:didThrowError,DID_THROW_ITEM_PROCESSING_ERROR:didThrowError,DID_THROW_ITEM_INVALID:didThrowError,DID_COMPLETE_ITEM_PROCESSING:didCompleteProcessing,DID_START_ITEM_PROCESSING:restoreOverlay,DID_REVERT_ITEM_PROCESSING:restoreOverlay})})},plugin=function plugin(fpAPI){var addFilter=fpAPI.addFilter,utils=fpAPI.utils,Type=utils.Type,createRoute=utils.createRoute,filePosterView=createPosterWrapperView(fpAPI);return addFilter("CREATE_VIEW",(function(viewAPI){var is=viewAPI.is,view=viewAPI.view,query=viewAPI.query;if(is("file")&&query("GET_ALLOW_FILE_POSTER")){var didLoadItem=function didLoadItem(_ref){var root=_ref.root,props=_ref.props;updateItemPoster(root,props)},didUpdateItemMetadata=function didUpdateItemMetadata(_ref2){var root=_ref2.root,props=_ref2.props,action=_ref2.action;/poster/.test(action.change.key)&&updateItemPoster(root,props)},updateItemPoster=function updateItemPoster(root,props){var id=props.id,item=query("GET_ITEM",id);item&&item.getMetadata("poster")&&!item.archived&&root.ref.previousPoster!==item.getMetadata("poster")&&(root.ref.previousPoster=item.getMetadata("poster"),query("GET_FILE_POSTER_FILTER_ITEM")(item)&&(root.ref.filePoster&&view.removeChildView(root.ref.filePoster),root.ref.filePoster=view.appendChildView(view.createChildView(filePosterView,{id})),root.dispatch("DID_FILE_POSTER_CONTAINER_CREATE",{id})))},didCalculatePreviewSize=function didCalculatePreviewSize(_ref3){var root=_ref3.root,action=_ref3.action;root.ref.filePoster&&(root.ref.imageWidth=action.width,root.ref.imageHeight=action.height,root.ref.shouldUpdatePanelHeight=!0,root.dispatch("KICK"))},getPosterHeight=function getPosterHeight(_ref4){var root=_ref4.root,fixedPosterHeight=root.query("GET_FILE_POSTER_HEIGHT");if(fixedPosterHeight)return fixedPosterHeight;var minPosterHeight=root.query("GET_FILE_POSTER_MIN_HEIGHT"),maxPosterHeight=root.query("GET_FILE_POSTER_MAX_HEIGHT");if(minPosterHeight&&root.ref.imageHeight<minPosterHeight)return minPosterHeight;var height=root.rect.element.width*(root.ref.imageHeight/root.ref.imageWidth);return minPosterHeight&&height<minPosterHeight?minPosterHeight:maxPosterHeight&&height>maxPosterHeight?maxPosterHeight:height};view.registerWriter(createRoute({DID_LOAD_ITEM:didLoadItem,DID_FILE_POSTER_CALCULATE_SIZE:didCalculatePreviewSize,DID_UPDATE_ITEM_METADATA:didUpdateItemMetadata},(function(_ref5){var root=_ref5.root,props=_ref5.props;root.ref.filePoster&&(root.rect.element.hidden||root.ref.shouldUpdatePanelHeight&&(root.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:props.id,height:getPosterHeight({root})}),root.ref.shouldUpdatePanelHeight=!1))})))}})),{options:{allowFilePoster:[!0,Type.BOOLEAN],filePosterHeight:[null,Type.INT],filePosterMinHeight:[null,Type.INT],filePosterMaxHeight:[null,Type.INT],filePosterFilterItem:[function(){return!0},Type.FUNCTION],filePosterCalculateAverageImageColor:[!1,Type.BOOLEAN],filePosterCrossOriginAttributeValue:["Anonymous",Type.STRING],filePosterItemOverlayShadowColor:[null,Type.ARRAY],filePosterItemOverlayErrorColor:[null,Type.ARRAY],filePosterItemOverlaySuccessColor:[null,Type.ARRAY]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:plugin})),plugin}()},"./node_modules/filepond-plugin-file-validate-size/dist/filepond-plugin-file-validate-size.js":function(module){module.exports=function(){"use strict";var plugin=function plugin(_ref){var addFilter=_ref.addFilter,utils=_ref.utils,Type=utils.Type,replaceInString=utils.replaceInString,toNaturalFileSize=utils.toNaturalFileSize;return addFilter("ALLOW_HOPPER_ITEM",(function(file,_ref2){var query=_ref2.query;if(!query("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;var sizeMax=query("GET_MAX_FILE_SIZE");if(null!==sizeMax&&file.size>sizeMax)return!1;var sizeMin=query("GET_MIN_FILE_SIZE");return!(null!==sizeMin&&file.size<sizeMin)})),addFilter("LOAD_FILE",(function(file,_ref3){var query=_ref3.query;return new Promise((function(resolve,reject){if(!query("GET_ALLOW_FILE_SIZE_VALIDATION"))return resolve(file);var fileFilter=query("GET_FILE_VALIDATE_SIZE_FILTER");if(fileFilter&&!fileFilter(file))return resolve(file);var sizeMax=query("GET_MAX_FILE_SIZE");if(null!==sizeMax&&file.size>sizeMax)reject({status:{main:query("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:replaceInString(query("GET_LABEL_MAX_FILE_SIZE"),{filesize:toNaturalFileSize(sizeMax,".",query("GET_FILE_SIZE_BASE"),query("GET_FILE_SIZE_LABELS",query))})}});else{var sizeMin=query("GET_MIN_FILE_SIZE");if(null!==sizeMin&&file.size<sizeMin)reject({status:{main:query("GET_LABEL_MIN_FILE_SIZE_EXCEEDED"),sub:replaceInString(query("GET_LABEL_MIN_FILE_SIZE"),{filesize:toNaturalFileSize(sizeMin,".",query("GET_FILE_SIZE_BASE"),query("GET_FILE_SIZE_LABELS",query))})}});else{var totalSizeMax=query("GET_MAX_TOTAL_FILE_SIZE");if(null!==totalSizeMax&&query("GET_ACTIVE_ITEMS").reduce((function(total,item){return total+item.fileSize}),0)>totalSizeMax)return void reject({status:{main:query("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:replaceInString(query("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:toNaturalFileSize(totalSizeMax,".",query("GET_FILE_SIZE_BASE"),query("GET_FILE_SIZE_LABELS",query))})}});resolve(file)}}}))})),{options:{allowFileSizeValidation:[!0,Type.BOOLEAN],maxFileSize:[null,Type.INT],minFileSize:[null,Type.INT],maxTotalFileSize:[null,Type.INT],fileValidateSizeFilter:[null,Type.FUNCTION],labelMinFileSizeExceeded:["File is too small",Type.STRING],labelMinFileSize:["Minimum file size is {filesize}",Type.STRING],labelMaxFileSizeExceeded:["File is too large",Type.STRING],labelMaxFileSize:["Maximum file size is {filesize}",Type.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",Type.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",Type.STRING]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:plugin})),plugin}()},"./node_modules/filepond-plugin-file-validate-type/dist/filepond-plugin-file-validate-type.js":function(module){module.exports=function(){"use strict";var plugin=function plugin(_ref){var addFilter=_ref.addFilter,utils=_ref.utils,Type=utils.Type,isString=utils.isString,replaceInString=utils.replaceInString,guesstimateMimeType=utils.guesstimateMimeType,getExtensionFromFilename=utils.getExtensionFromFilename,getFilenameFromURL=utils.getFilenameFromURL,mimeTypeMatchesWildCard=function mimeTypeMatchesWildCard(mimeType,wildcard){return(/^[^/]+/.exec(mimeType)||[]).pop()===wildcard.slice(0,-2)},isValidMimeType=function isValidMimeType(acceptedTypes,userInputType){return acceptedTypes.some((function(acceptedType){return/\*$/.test(acceptedType)?mimeTypeMatchesWildCard(userInputType,acceptedType):acceptedType===userInputType}))},getItemType=function getItemType(item){var type="";if(isString(item)){var filename=getFilenameFromURL(item),extension=getExtensionFromFilename(filename);extension&&(type=guesstimateMimeType(extension))}else type=item.type;return type},validateFile=function validateFile(item,acceptedFileTypes,typeDetector){if(0===acceptedFileTypes.length)return!0;var type=getItemType(item);return typeDetector?new Promise((function(resolve,reject){typeDetector(item,type).then((function(detectedType){isValidMimeType(acceptedFileTypes,detectedType)?resolve():reject()})).catch(reject)})):isValidMimeType(acceptedFileTypes,type)},applyMimeTypeMap=function applyMimeTypeMap(map){return function(acceptedFileType){return null!==map[acceptedFileType]&&(map[acceptedFileType]||acceptedFileType)}};return addFilter("SET_ATTRIBUTE_TO_OPTION_MAP",(function(map){return Object.assign(map,{accept:"acceptedFileTypes"})})),addFilter("ALLOW_HOPPER_ITEM",(function(file,_ref2){var query=_ref2.query;return!query("GET_ALLOW_FILE_TYPE_VALIDATION")||validateFile(file,query("GET_ACCEPTED_FILE_TYPES"))})),addFilter("LOAD_FILE",(function(file,_ref3){var query=_ref3.query;return new Promise((function(resolve,reject){if(query("GET_ALLOW_FILE_TYPE_VALIDATION")){var acceptedFileTypes=query("GET_ACCEPTED_FILE_TYPES"),typeDetector=query("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),validationResult=validateFile(file,acceptedFileTypes,typeDetector),handleRejection=function handleRejection(){var acceptedFileTypesMapped=acceptedFileTypes.map(applyMimeTypeMap(query("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"))).filter((function(label){return!1!==label})),acceptedFileTypesMappedUnique=acceptedFileTypesMapped.filter((function(item,index){return acceptedFileTypesMapped.indexOf(item)===index}));reject({status:{main:query("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:replaceInString(query("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:acceptedFileTypesMappedUnique.join(", "),allButLastType:acceptedFileTypesMappedUnique.slice(0,-1).join(", "),lastType:acceptedFileTypesMappedUnique[acceptedFileTypesMappedUnique.length-1]})}})};if("boolean"==typeof validationResult)return validationResult?resolve(file):handleRejection();validationResult.then((function(){resolve(file)})).catch(handleRejection)}else resolve(file)}))})),{options:{allowFileTypeValidation:[!0,Type.BOOLEAN],acceptedFileTypes:[[],Type.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",Type.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",Type.STRING],fileValidateTypeLabelExpectedTypesMap:[{},Type.OBJECT],fileValidateTypeDetectType:[null,Type.FUNCTION]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:plugin})),plugin}()},"./node_modules/filepond/dist/filepond.js":function(__unused_webpack_module,exports){!function(exports){"use strict";var isNode=function isNode(value){return value instanceof HTMLElement},createStore=function createStore(initialState){var queries=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],actions=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],state=Object.assign({},initialState),actionQueue=[],dispatchQueue=[],processDispatchQueue=function processDispatchQueue(){var queue=[].concat(dispatchQueue);dispatchQueue.length=0,queue.forEach((function(_ref){var type=_ref.type,data=_ref.data;dispatch(type,data)}))},dispatch=function dispatch(type,data,isBlocking){!isBlocking||document.hidden?(actionHandlers[type]&&actionHandlers[type](data),actionQueue.push({type,data})):dispatchQueue.push({type,data})},query=function query(str){for(var _queryHandles,_len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];return queryHandles[str]?(_queryHandles=queryHandles)[str].apply(_queryHandles,args):null},api={getState:function getState(){return Object.assign({},state)},processActionQueue:function processActionQueue(){var queue=[].concat(actionQueue);return actionQueue.length=0,queue},processDispatchQueue,dispatch,query},queryHandles={};queries.forEach((function(query){queryHandles=Object.assign({},query(state),{},queryHandles)}));var actionHandlers={};return actions.forEach((function(action){actionHandlers=Object.assign({},action(dispatch,query,state),{},actionHandlers)})),api},defineProperty=function defineProperty(obj,property,definition){"function"!=typeof definition?Object.defineProperty(obj,property,Object.assign({},definition)):obj[property]=definition},forin=function forin(obj,cb){for(var key in obj)obj.hasOwnProperty(key)&&cb(key,obj[key])},createObject=function createObject(definition){var obj={};return forin(definition,(function(property){defineProperty(obj,property,definition[property])})),obj},attr=function attr(node,name){var value=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(null===value)return node.getAttribute(name)||node.hasAttribute(name);node.setAttribute(name,value)},ns="http://www.w3.org/2000/svg",svgElements=["svg","path"],isSVGElement=function isSVGElement(tag){return svgElements.includes(tag)},createElement=function createElement(tag,className){var attributes=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"==typeof className&&(attributes=className,className=null);var element=isSVGElement(tag)?document.createElementNS(ns,tag):document.createElement(tag);return className&&(isSVGElement(tag)?attr(element,"class",className):element.className=className),forin(attributes,(function(name,value){attr(element,name,value)})),element},appendChild=function appendChild(parent){return function(child,index){void 0!==index&&parent.children[index]?parent.insertBefore(child,parent.children[index]):parent.appendChild(child)}},appendChildView=function appendChildView(parent,childViews){return function(view,index){return void 0!==index?childViews.splice(index,0,view):childViews.push(view),view}},removeChildView=function removeChildView(parent,childViews){return function(view){return childViews.splice(childViews.indexOf(view),1),view.element.parentNode&&parent.removeChild(view.element),view}},IS_BROWSER="undefined"!=typeof window&&void 0!==window.document,isBrowser=function isBrowser(){return IS_BROWSER},getChildCount="children"in(isBrowser()?createElement("svg"):{})?function(el){return el.children.length}:function(el){return el.childNodes.length},getViewRect=function getViewRect(elementRect,childViews,offset,scale){var left=offset[0]||elementRect.left,top=offset[1]||elementRect.top,right=left+elementRect.width,bottom=top+elementRect.height*(scale[1]||1),rect={element:Object.assign({},elementRect),inner:{left:elementRect.left,top:elementRect.top,right:elementRect.right,bottom:elementRect.bottom},outer:{left,top,right,bottom}};return childViews.filter((function(childView){return!childView.isRectIgnored()})).map((function(childView){return childView.rect})).forEach((function(childViewRect){expandRect(rect.inner,Object.assign({},childViewRect.inner)),expandRect(rect.outer,Object.assign({},childViewRect.outer))})),calculateRectSize(rect.inner),rect.outer.bottom+=rect.element.marginBottom,rect.outer.right+=rect.element.marginRight,calculateRectSize(rect.outer),rect},expandRect=function expandRect(parent,child){child.top+=parent.top,child.right+=parent.left,child.bottom+=parent.top,child.left+=parent.left,child.bottom>parent.bottom&&(parent.bottom=child.bottom),child.right>parent.right&&(parent.right=child.right)},calculateRectSize=function calculateRectSize(rect){rect.width=rect.right-rect.left,rect.height=rect.bottom-rect.top},isNumber=function isNumber(value){return"number"==typeof value},thereYet=function thereYet(position,destination,velocity){var errorMargin=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.001;return Math.abs(position-destination)<errorMargin&&Math.abs(velocity)<errorMargin},spring=function spring(){var _ref=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref$stiffness=_ref.stiffness,stiffness=void 0===_ref$stiffness?.5:_ref$stiffness,_ref$damping=_ref.damping,damping=void 0===_ref$damping?.75:_ref$damping,_ref$mass=_ref.mass,mass=void 0===_ref$mass?10:_ref$mass,target=null,position=null,velocity=0,resting=!1,api=createObject({interpolate:function interpolate(ts,skipToEndState){if(!resting){if(!isNumber(target)||!isNumber(position))return resting=!0,void(velocity=0);thereYet(position+=velocity+=-(position-target)*stiffness/mass,target,velocity*=damping)||skipToEndState?(position=target,velocity=0,resting=!0,api.onupdate(position),api.oncomplete(position)):api.onupdate(position)}},target:{set:function setTarget(value){if(isNumber(value)&&!isNumber(position)&&(position=value),null===target&&(target=value,position=value),position===(target=value)||void 0===target)return resting=!0,velocity=0,api.onupdate(position),void api.oncomplete(position);resting=!1},get:function get(){return target}},resting:{get:function get(){return resting}},onupdate:function onupdate(value){},oncomplete:function oncomplete(value){}});return api},easeInOutQuad=function easeInOutQuad(t){return t<.5?2*t*t:(4-2*t)*t-1},tween=function tween(){var t,p,_ref=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref$duration=_ref.duration,duration=void 0===_ref$duration?500:_ref$duration,_ref$easing=_ref.easing,easing=void 0===_ref$easing?easeInOutQuad:_ref$easing,_ref$delay=_ref.delay,delay=void 0===_ref$delay?0:_ref$delay,start=null,resting=!0,reverse=!1,target=null,api=createObject({interpolate:function interpolate(ts,skipToEndState){resting||null===target||(null===start&&(start=ts),ts-start<delay||((t=ts-start-delay)>=duration||skipToEndState?(t=1,p=reverse?0:1,api.onupdate(p*target),api.oncomplete(p*target),resting=!0):(p=t/duration,api.onupdate((t>=0?easing(reverse?1-p:p):0)*target))))},target:{get:function get(){return reverse?0:target},set:function set(value){if(null===target)return target=value,api.onupdate(value),void api.oncomplete(value);value<target?(target=1,reverse=!0):(reverse=!1,target=value),resting=!1,start=null}},resting:{get:function get(){return resting}},onupdate:function onupdate(value){},oncomplete:function oncomplete(value){}});return api},animator={spring,tween},createAnimator=function createAnimator(definition,category,property){var def=definition[category]&&"object"==typeof definition[category][property]?definition[category][property]:definition[category]||definition,type="string"==typeof def?def:def.type,props="object"==typeof def?Object.assign({},def):{};return animator[type]?animator[type](props):null},addGetSet=function addGetSet(keys,obj,props){var overwrite=arguments.length>3&&void 0!==arguments[3]&&arguments[3];(obj=Array.isArray(obj)?obj:[obj]).forEach((function(o){keys.forEach((function(key){var name=key,getter=function getter(){return props[key]},setter=function setter(value){return props[key]=value};"object"==typeof key&&(name=key.key,getter=key.getter||getter,setter=key.setter||setter),o[name]&&!overwrite||(o[name]={get:getter,set:setter})}))}))},addEvent=function addEvent(element){return function(type,fn){element.addEventListener(type,fn)}},removeEvent=function removeEvent(element){return function(type,fn){element.removeEventListener(type,fn)}},isDefined=function isDefined(value){return null!=value},defaults={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},styles=function styles(_ref){var mixinConfig=_ref.mixinConfig,viewProps=_ref.viewProps,viewInternalAPI=_ref.viewInternalAPI,viewExternalAPI=_ref.viewExternalAPI,view=_ref.view,initialProps=Object.assign({},viewProps),currentProps={};addGetSet(mixinConfig,[viewInternalAPI,viewExternalAPI],viewProps);var getOffset=function getOffset(){return[viewProps.translateX||0,viewProps.translateY||0]},getScale=function getScale(){return[viewProps.scaleX||0,viewProps.scaleY||0]},getRect=function getRect(){return view.rect?getViewRect(view.rect,view.childViews,getOffset(),getScale()):null};return viewInternalAPI.rect={get:getRect},viewExternalAPI.rect={get:getRect},mixinConfig.forEach((function(key){viewProps[key]=void 0===initialProps[key]?defaults[key]:initialProps[key]})),{write:function write(){if(propsHaveChanged(currentProps,viewProps))return applyStyles(view.element,viewProps),Object.assign(currentProps,Object.assign({},viewProps)),!0},destroy:function destroy(){}}},propsHaveChanged=function propsHaveChanged(currentProps,newProps){if(Object.keys(currentProps).length!==Object.keys(newProps).length)return!0;for(var prop in newProps)if(newProps[prop]!==currentProps[prop])return!0;return!1},applyStyles=function applyStyles(element,_ref2){var opacity=_ref2.opacity,perspective=_ref2.perspective,translateX=_ref2.translateX,translateY=_ref2.translateY,scaleX=_ref2.scaleX,scaleY=_ref2.scaleY,rotateX=_ref2.rotateX,rotateY=_ref2.rotateY,rotateZ=_ref2.rotateZ,originX=_ref2.originX,originY=_ref2.originY,width=_ref2.width,height=_ref2.height,transforms="",styles="";(isDefined(originX)||isDefined(originY))&&(styles+="transform-origin: "+(originX||0)+"px "+(originY||0)+"px;"),isDefined(perspective)&&(transforms+="perspective("+perspective+"px) "),(isDefined(translateX)||isDefined(translateY))&&(transforms+="translate3d("+(translateX||0)+"px, "+(translateY||0)+"px, 0) "),(isDefined(scaleX)||isDefined(scaleY))&&(transforms+="scale3d("+(isDefined(scaleX)?scaleX:1)+", "+(isDefined(scaleY)?scaleY:1)+", 1) "),isDefined(rotateZ)&&(transforms+="rotateZ("+rotateZ+"rad) "),isDefined(rotateX)&&(transforms+="rotateX("+rotateX+"rad) "),isDefined(rotateY)&&(transforms+="rotateY("+rotateY+"rad) "),transforms.length&&(styles+="transform:"+transforms+";"),isDefined(opacity)&&(styles+="opacity:"+opacity+";",0===opacity&&(styles+="visibility:hidden;"),opacity<1&&(styles+="pointer-events:none;")),isDefined(height)&&(styles+="height:"+height+"px;"),isDefined(width)&&(styles+="width:"+width+"px;");var elementCurrentStyle=element.elementCurrentStyle||"";styles.length===elementCurrentStyle.length&&styles===elementCurrentStyle||(element.style.cssText=styles,element.elementCurrentStyle=styles)},Mixins={styles,listeners:function listeners(_ref){_ref.mixinConfig,_ref.viewProps,_ref.viewInternalAPI;var viewExternalAPI=_ref.viewExternalAPI,view=(_ref.viewState,_ref.view),events=[],add=addEvent(view.element),remove=removeEvent(view.element);return viewExternalAPI.on=function(type,fn){events.push({type,fn}),add(type,fn)},viewExternalAPI.off=function(type,fn){events.splice(events.findIndex((function(event){return event.type===type&&event.fn===fn})),1),remove(type,fn)},{write:function write(){return!0},destroy:function destroy(){events.forEach((function(event){remove(event.type,event.fn)}))}}},animations:function animations(_ref){var mixinConfig=_ref.mixinConfig,viewProps=_ref.viewProps,viewInternalAPI=_ref.viewInternalAPI,viewExternalAPI=_ref.viewExternalAPI,initialProps=Object.assign({},viewProps),animations=[];return forin(mixinConfig,(function(property,animation){var animator=createAnimator(animation);animator&&(animator.onupdate=function(value){viewProps[property]=value},animator.target=initialProps[property],addGetSet([{key:property,setter:function setter(value){animator.target!==value&&(animator.target=value)},getter:function getter(){return viewProps[property]}}],[viewInternalAPI,viewExternalAPI],viewProps,!0),animations.push(animator))})),{write:function write(ts){var skipToEndState=document.hidden,resting=!0;return animations.forEach((function(animation){animation.resting||(resting=!1),animation.interpolate(ts,skipToEndState)})),resting},destroy:function destroy(){}}},apis:function apis(_ref){var mixinConfig=_ref.mixinConfig,viewProps=_ref.viewProps,viewExternalAPI=_ref.viewExternalAPI;addGetSet(mixinConfig,viewExternalAPI,viewProps)}},updateRect=function updateRect(){var rect=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},element=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},style=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return element.layoutCalculated||(rect.paddingTop=parseInt(style.paddingTop,10)||0,rect.marginTop=parseInt(style.marginTop,10)||0,rect.marginRight=parseInt(style.marginRight,10)||0,rect.marginBottom=parseInt(style.marginBottom,10)||0,rect.marginLeft=parseInt(style.marginLeft,10)||0,element.layoutCalculated=!0),rect.left=element.offsetLeft||0,rect.top=element.offsetTop||0,rect.width=element.offsetWidth||0,rect.height=element.offsetHeight||0,rect.right=rect.left+rect.width,rect.bottom=rect.top+rect.height,rect.scrollTop=element.scrollTop,rect.hidden=null===element.offsetParent,rect},createView=function createView(){var _ref=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref$tag=_ref.tag,tag=void 0===_ref$tag?"div":_ref$tag,_ref$name=_ref.name,name=void 0===_ref$name?null:_ref$name,_ref$attributes=_ref.attributes,attributes=void 0===_ref$attributes?{}:_ref$attributes,_ref$read=_ref.read,read=void 0===_ref$read?function(){}:_ref$read,_ref$write=_ref.write,write=void 0===_ref$write?function(){}:_ref$write,_ref$create=_ref.create,create=void 0===_ref$create?function(){}:_ref$create,_ref$destroy=_ref.destroy,destroy=void 0===_ref$destroy?function(){}:_ref$destroy,_ref$filterFrameActio=_ref.filterFrameActionsForChild,filterFrameActionsForChild=void 0===_ref$filterFrameActio?function(child,actions){return actions}:_ref$filterFrameActio,_ref$didCreateView=_ref.didCreateView,didCreateView=void 0===_ref$didCreateView?function(){}:_ref$didCreateView,_ref$didWriteView=_ref.didWriteView,didWriteView=void 0===_ref$didWriteView?function(){}:_ref$didWriteView,_ref$ignoreRect=_ref.ignoreRect,ignoreRect=void 0!==_ref$ignoreRect&&_ref$ignoreRect,_ref$ignoreRectUpdate=_ref.ignoreRectUpdate,ignoreRectUpdate=void 0!==_ref$ignoreRectUpdate&&_ref$ignoreRectUpdate,_ref$mixins=_ref.mixins,mixins=void 0===_ref$mixins?[]:_ref$mixins;return function(store){var props=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},element=createElement(tag,"filepond--"+name,attributes),style=window.getComputedStyle(element,null),rect=updateRect(),frameRect=null,isResting=!1,childViews=[],activeMixins=[],ref={},state={},writers=[write],readers=[read],destroyers=[destroy],getElement=function getElement(){return element},getChildViews=function getChildViews(){return childViews.concat()},getReference=function getReference(){return ref},createChildView=function createChildView(store){return function(view,props){return view(store,props)}},getRect=function getRect(){return frameRect||(frameRect=getViewRect(rect,childViews,[0,0],[1,1]))},_read=function _read(){frameRect=null,childViews.forEach((function(child){return child._read()})),!(ignoreRectUpdate&&rect.width&&rect.height)&&updateRect(rect,element,style);var api={root:internalAPI,props,rect};readers.forEach((function(reader){return reader(api)}))},_write=function _write(ts,frameActions,shouldOptimize){var resting=0===frameActions.length;return writers.forEach((function(writer){!1===writer({props,root:internalAPI,actions:frameActions,timestamp:ts,shouldOptimize})&&(resting=!1)})),activeMixins.forEach((function(mixin){!1===mixin.write(ts)&&(resting=!1)})),childViews.filter((function(child){return!!child.element.parentNode})).forEach((function(child){child._write(ts,filterFrameActionsForChild(child,frameActions),shouldOptimize)||(resting=!1)})),childViews.forEach((function(child,index){child.element.parentNode||(internalAPI.appendChild(child.element,index),child._read(),child._write(ts,filterFrameActionsForChild(child,frameActions),shouldOptimize),resting=!1)})),isResting=resting,didWriteView({props,root:internalAPI,actions:frameActions,timestamp:ts}),resting},_destroy=function _destroy(){activeMixins.forEach((function(mixin){return mixin.destroy()})),destroyers.forEach((function(destroyer){destroyer({root:internalAPI,props})})),childViews.forEach((function(child){return child._destroy()}))},sharedAPIDefinition={element:{get:getElement},style:{get:function getStyle(){return style}},childViews:{get:getChildViews}},internalAPIDefinition=Object.assign({},sharedAPIDefinition,{rect:{get:getRect},ref:{get:getReference},is:function is(needle){return name===needle},appendChild:appendChild(element),createChildView:createChildView(store),linkView:function linkView(view){return childViews.push(view),view},unlinkView:function unlinkView(view){childViews.splice(childViews.indexOf(view),1)},appendChildView:appendChildView(element,childViews),removeChildView:removeChildView(element,childViews),registerWriter:function registerWriter(writer){return writers.push(writer)},registerReader:function registerReader(reader){return readers.push(reader)},registerDestroyer:function registerDestroyer(destroyer){return destroyers.push(destroyer)},invalidateLayout:function invalidateLayout(){return element.layoutCalculated=!1},dispatch:store.dispatch,query:store.query}),externalAPIDefinition={element:{get:getElement},childViews:{get:getChildViews},rect:{get:getRect},resting:{get:function get(){return isResting}},isRectIgnored:function isRectIgnored(){return ignoreRect},_read,_write,_destroy},mixinAPIDefinition=Object.assign({},sharedAPIDefinition,{rect:{get:function get(){return rect}}});Object.keys(mixins).sort((function(a,b){return"styles"===a?1:"styles"===b?-1:0})).forEach((function(key){var mixinAPI=Mixins[key]({mixinConfig:mixins[key],viewProps:props,viewState:state,viewInternalAPI:internalAPIDefinition,viewExternalAPI:externalAPIDefinition,view:createObject(mixinAPIDefinition)});mixinAPI&&activeMixins.push(mixinAPI)}));var internalAPI=createObject(internalAPIDefinition);create({root:internalAPI,props});var childCount=getChildCount(element);return childViews.forEach((function(child,index){internalAPI.appendChild(child.element,childCount+index)})),didCreateView(internalAPI),createObject(externalAPIDefinition)}},createPainter=function createPainter(read,write){var fps=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,name="__framePainter";if(window[name])return window[name].readers.push(read),void window[name].writers.push(write);window[name]={readers:[read],writers:[write]};var painter=window[name],interval=1e3/fps,last=null,id=null,requestTick=null,cancelTick=null,setTimerType=function setTimerType(){document.hidden?(requestTick=function requestTick(){return window.setTimeout((function(){return tick(performance.now())}),interval)},cancelTick=function cancelTick(){return window.clearTimeout(id)}):(requestTick=function requestTick(){return window.requestAnimationFrame(tick)},cancelTick=function cancelTick(){return window.cancelAnimationFrame(id)})};document.addEventListener("visibilitychange",(function(){cancelTick&&cancelTick(),setTimerType(),tick(performance.now())}));var tick=function tick(ts){id=requestTick(tick),last||(last=ts);var delta=ts-last;delta<=interval||(last=ts-delta%interval,painter.readers.forEach((function(read){return read()})),painter.writers.forEach((function(write){return write(ts)})))};return setTimerType(),tick(performance.now()),{pause:function pause(){cancelTick(id)}}},createRoute=function createRoute(routes,fn){return function(_ref){var root=_ref.root,props=_ref.props,_ref$actions=_ref.actions,actions=void 0===_ref$actions?[]:_ref$actions,timestamp=_ref.timestamp,shouldOptimize=_ref.shouldOptimize;actions.filter((function(action){return routes[action.type]})).forEach((function(action){return routes[action.type]({root,props,action:action.data,timestamp,shouldOptimize})})),fn&&fn({root,props,actions,timestamp,shouldOptimize})}},insertBefore=function insertBefore(newNode,referenceNode){return referenceNode.parentNode.insertBefore(newNode,referenceNode)},insertAfter=function insertAfter(newNode,referenceNode){return referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)},isArray=function isArray(value){return Array.isArray(value)},isEmpty=function isEmpty(value){return null==value},trim=function trim(str){return str.trim()},toString=function toString(value){return""+value},toArray=function toArray(value){var splitter=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return isEmpty(value)?[]:isArray(value)?value:toString(value).split(splitter).map(trim).filter((function(str){return str.length}))},isBoolean=function isBoolean(value){return"boolean"==typeof value},toBoolean=function toBoolean(value){return isBoolean(value)?value:"true"===value},isString=function isString(value){return"string"==typeof value},toNumber=function toNumber(value){return isNumber(value)?value:isString(value)?toString(value).replace(/[a-z]+/gi,""):0},toInt=function toInt(value){return parseInt(toNumber(value),10)},toFloat=function toFloat(value){return parseFloat(toNumber(value))},isInt=function isInt(value){return isNumber(value)&&isFinite(value)&&Math.floor(value)===value},toBytes=function toBytes(value){var base=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(isInt(value))return value;var naturalFileSize=toString(value).trim();return/MB$/i.test(naturalFileSize)?(naturalFileSize=naturalFileSize.replace(/MB$i/,"").trim(),toInt(naturalFileSize)*base*base):/KB/i.test(naturalFileSize)?(naturalFileSize=naturalFileSize.replace(/KB$i/,"").trim(),toInt(naturalFileSize)*base):toInt(naturalFileSize)},isFunction=function isFunction(value){return"function"==typeof value},toFunctionReference=function toFunctionReference(string){for(var ref=self,levels=string.split("."),level=null;level=levels.shift();)if(!(ref=ref[level]))return null;return ref},methods={process:"POST",patch:"PATCH",revert:"DELETE",fetch:"GET",restore:"GET",load:"GET"},createServerAPI=function createServerAPI(outline){var api={};return api.url=isString(outline)?outline:outline.url||"",api.timeout=outline.timeout?parseInt(outline.timeout,10):0,api.headers=outline.headers?outline.headers:{},forin(methods,(function(key){api[key]=createAction(key,outline[key],methods[key],api.timeout,api.headers)})),api.process=outline.process||isString(outline)||outline.url?api.process:null,api.remove=outline.remove||null,delete api.headers,api},createAction=function createAction(name,outline,method,timeout,headers){if(null===outline)return null;if("function"==typeof outline)return outline;var action={url:"GET"===method||"PATCH"===method?"?"+name+"=":"",method,headers,withCredentials:!1,timeout,onload:null,ondata:null,onerror:null};if(isString(outline))return action.url=outline,action;if(Object.assign(action,outline),isString(action.headers)){var parts=action.headers.split(/:(.+)/);action.headers={header:parts[0],value:parts[1]}}return action.withCredentials=toBoolean(action.withCredentials),action},isNull=function isNull(value){return null===value},isObject=function isObject(value){return"object"==typeof value&&null!==value},isAPI=function isAPI(value){return isObject(value)&&isString(value.url)&&isObject(value.process)&&isObject(value.revert)&&isObject(value.restore)&&isObject(value.fetch)},getType=function getType(value){return isArray(value)?"array":isNull(value)?"null":isInt(value)?"int":/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(value)?"bytes":isAPI(value)?"api":typeof value},replaceSingleQuotes=function replaceSingleQuotes(str){return str.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",')},conversionTable={array:toArray,boolean:toBoolean,int:function int(value){return"bytes"===getType(value)?toBytes(value):toInt(value)},number:toFloat,float:toFloat,bytes:toBytes,string:function string(value){return isFunction(value)?value:toString(value)},function:function _function(value){return toFunctionReference(value)},serverapi:function toServerAPI(value){return createServerAPI(value)},object:function object(value){try{return JSON.parse(replaceSingleQuotes(value))}catch(e){return null}}},convertTo=function convertTo(value,type){return conversionTable[type](value)},getValueByType=function getValueByType(newValue,defaultValue,valueType){if(newValue===defaultValue)return newValue;var newValueType=getType(newValue);if(newValueType!==valueType){var convertedValue=convertTo(newValue,valueType);if(newValueType=getType(convertedValue),null===convertedValue)throw'Trying to assign value with incorrect type to "'+option+'", allowed type: "'+valueType+'"';newValue=convertedValue}return newValue},createOption=function createOption(defaultValue,valueType){var currentValue=defaultValue;return{enumerable:!0,get:function get(){return currentValue},set:function set(newValue){currentValue=getValueByType(newValue,defaultValue,valueType)}}},createOptions=function createOptions(options){var obj={};return forin(options,(function(prop){var optionDefinition=options[prop];obj[prop]=createOption(optionDefinition[0],optionDefinition[1])})),createObject(obj)},createInitialState=function createInitialState(options){return{items:[],listUpdateTimeout:null,itemUpdateTimeout:null,processingQueue:[],options:createOptions(options)}},fromCamels=function fromCamels(string){var separator=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return string.split(/(?=[A-Z])/).map((function(part){return part.toLowerCase()})).join(separator)},createOptionAPI=function createOptionAPI(store,options){var obj={};return forin(options,(function(key){obj[key]={get:function get(){return store.getState().options[key]},set:function set(value){store.dispatch("SET_"+fromCamels(key,"_").toUpperCase(),{value})}}})),obj},createOptionActions=function createOptionActions(options){return function(dispatch,query,state){var obj={};return forin(options,(function(key){var name=fromCamels(key,"_").toUpperCase();obj["SET_"+name]=function(action){try{state.options[key]=action.value}catch(e){}dispatch("DID_SET_"+name,{value:state.options[key]})}})),obj}},createOptionQueries=function createOptionQueries(options){return function(state){var obj={};return forin(options,(function(key){obj["GET_"+fromCamels(key,"_").toUpperCase()]=function(action){return state.options[key]}})),obj}},InteractionMethod={API:1,DROP:2,BROWSE:3,PASTE:4,NONE:5},getUniqueId=function getUniqueId(){return Math.random().toString(36).substring(2,11)};function _AwaitValue(value){this.wrapped=value}function _AsyncGenerator(gen){var front,back;function send(key,arg){return new Promise((function(resolve,reject){var request={key,arg,resolve,reject,next:null};back?back=back.next=request:(front=back=request,resume(key,arg))}))}function resume(key,arg){try{var result=gen[key](arg),value=result.value,wrappedAwait=value instanceof _AwaitValue;Promise.resolve(wrappedAwait?value.wrapped:value).then((function(arg){wrappedAwait?resume("next",arg):settle(result.done?"return":"normal",arg)}),(function(err){resume("throw",err)}))}catch(err){settle("throw",err)}}function settle(type,value){switch(type){case"return":front.resolve({value,done:!0});break;case"throw":front.reject(value);break;default:front.resolve({value,done:!1})}(front=front.next)?resume(front.key,front.arg):back=null}this._invoke=send,"function"!=typeof gen.return&&(this.return=void 0)}function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=_objectWithoutPropertiesLoose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],excluded.indexOf(key)>=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_nonIterableSpread()}function _arrayWithoutHoles(arr){if(Array.isArray(arr)){for(var i=0,arr2=new Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}}function _iterableToArray(iter){if(Symbol.iterator in Object(iter)||"[object Arguments]"===Object.prototype.toString.call(iter))return Array.from(iter)}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}"function"==typeof Symbol&&Symbol.asyncIterator&&(_AsyncGenerator.prototype[Symbol.asyncIterator]=function(){return this}),_AsyncGenerator.prototype.next=function(arg){return this._invoke("next",arg)},_AsyncGenerator.prototype.throw=function(arg){return this._invoke("throw",arg)},_AsyncGenerator.prototype.return=function(arg){return this._invoke("return",arg)};var arrayRemove=function arrayRemove(arr,index){return arr.splice(index,1)},run=function run(cb,sync){sync?cb():document.hidden?Promise.resolve(1).then(cb):setTimeout(cb,0)},on=function on(){var listeners=[],off=function off(event,cb){arrayRemove(listeners,listeners.findIndex((function(listener){return listener.event===event&&(listener.cb===cb||!cb)})))},_fire=function fire(event,args,sync){listeners.filter((function(listener){return listener.event===event})).map((function(listener){return listener.cb})).forEach((function(cb){return run((function(){return cb.apply(void 0,_toConsumableArray(args))}),sync)}))};return{fireSync:function fireSync(event){for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];_fire(event,args,!0)},fire:function fire(event){for(var _len2=arguments.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++)args[_key2-1]=arguments[_key2];_fire(event,args,!1)},on:function on(event,cb){listeners.push({event,cb})},onOnce:function onOnce(event,_cb){listeners.push({event,cb:function cb(){off(event,_cb),_cb.apply(void 0,arguments)}})},off}},copyObjectPropertiesToObject=function copyObjectPropertiesToObject(src,target,excluded){Object.getOwnPropertyNames(src).filter((function(property){return!excluded.includes(property)})).forEach((function(key){return Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(src,key))}))},PRIVATE=["fire","process","revert","load","on","off","onOnce","retryLoad","extend","archive","archived","release","released","requestProcessing","freeze"],createItemAPI=function createItemAPI(item){var api={};return copyObjectPropertiesToObject(item,api,PRIVATE),api},removeReleasedItems=function removeReleasedItems(items){items.forEach((function(item,index){item.released&&arrayRemove(items,index)}))},ItemStatus={INIT:1,IDLE:2,PROCESSING_QUEUED:9,PROCESSING:3,PROCESSING_COMPLETE:5,PROCESSING_ERROR:6,PROCESSING_REVERT_ERROR:10,LOADING:7,LOAD_ERROR:8},FileOrigin={INPUT:1,LIMBO:2,LOCAL:3},getNonNumeric=function getNonNumeric(str){return/[^0-9]+/.exec(str)},getDecimalSeparator=function getDecimalSeparator(){return getNonNumeric(1.1.toLocaleString())[0]},getThousandsSeparator=function getThousandsSeparator(){var decimalSeparator=getDecimalSeparator(),thousandsStringWithSeparator=1e3.toLocaleString();return thousandsStringWithSeparator!==1e3.toString()?getNonNumeric(thousandsStringWithSeparator)[0]:"."===decimalSeparator?",":"."},Type={BOOLEAN:"boolean",INT:"int",NUMBER:"number",STRING:"string",ARRAY:"array",OBJECT:"object",FUNCTION:"function",ACTION:"action",SERVER_API:"serverapi",REGEX:"regex"},filters=[],applyFilterChain=function applyFilterChain(key,value,utils){return new Promise((function(resolve,reject){var matchingFilters=filters.filter((function(f){return f.key===key})).map((function(f){return f.cb}));if(0!==matchingFilters.length){var initialFilter=matchingFilters.shift();matchingFilters.reduce((function(current,next){return current.then((function(value){return next(value,utils)}))}),initialFilter(value,utils)).then((function(value){return resolve(value)})).catch((function(error){return reject(error)}))}else resolve(value)}))},applyFilters=function applyFilters(key,value,utils){return filters.filter((function(f){return f.key===key})).map((function(f){return f.cb(value,utils)}))},addFilter=function addFilter(key,cb){return filters.push({key,cb})},extendDefaultOptions=function extendDefaultOptions(additionalOptions){return Object.assign(defaultOptions,additionalOptions)},getOptions=function getOptions(){return Object.assign({},defaultOptions)},setOptions=function setOptions(opts){forin(opts,(function(key,value){defaultOptions[key]&&(defaultOptions[key][0]=getValueByType(value,defaultOptions[key][0],defaultOptions[key][1]))}))},defaultOptions={id:[null,Type.STRING],name:["filepond",Type.STRING],disabled:[!1,Type.BOOLEAN],className:[null,Type.STRING],required:[!1,Type.BOOLEAN],captureMethod:[null,Type.STRING],allowSyncAcceptAttribute:[!0,Type.BOOLEAN],allowDrop:[!0,Type.BOOLEAN],allowBrowse:[!0,Type.BOOLEAN],allowPaste:[!0,Type.BOOLEAN],allowMultiple:[!1,Type.BOOLEAN],allowReplace:[!0,Type.BOOLEAN],allowRevert:[!0,Type.BOOLEAN],allowRemove:[!0,Type.BOOLEAN],allowProcess:[!0,Type.BOOLEAN],allowReorder:[!1,Type.BOOLEAN],allowDirectoriesOnly:[!1,Type.BOOLEAN],storeAsFile:[!1,Type.BOOLEAN],forceRevert:[!1,Type.BOOLEAN],maxFiles:[null,Type.INT],checkValidity:[!1,Type.BOOLEAN],itemInsertLocationFreedom:[!0,Type.BOOLEAN],itemInsertLocation:["before",Type.STRING],itemInsertInterval:[75,Type.INT],dropOnPage:[!1,Type.BOOLEAN],dropOnElement:[!0,Type.BOOLEAN],dropValidation:[!1,Type.BOOLEAN],ignoredFiles:[[".ds_store","thumbs.db","desktop.ini"],Type.ARRAY],instantUpload:[!0,Type.BOOLEAN],maxParallelUploads:[2,Type.INT],allowMinimumUploadDuration:[!0,Type.BOOLEAN],chunkUploads:[!1,Type.BOOLEAN],chunkForce:[!1,Type.BOOLEAN],chunkSize:[5e6,Type.INT],chunkRetryDelays:[[500,1e3,3e3],Type.ARRAY],server:[null,Type.SERVER_API],fileSizeBase:[1e3,Type.INT],labelFileSizeBytes:["bytes",Type.STRING],labelFileSizeKilobytes:["KB",Type.STRING],labelFileSizeMegabytes:["MB",Type.STRING],labelFileSizeGigabytes:["GB",Type.STRING],labelDecimalSeparator:[getDecimalSeparator(),Type.STRING],labelThousandsSeparator:[getThousandsSeparator(),Type.STRING],labelIdle:['Drag & Drop your files or <span class="filepond--label-action">Browse</span>',Type.STRING],labelInvalidField:["Field contains invalid files",Type.STRING],labelFileWaitingForSize:["Waiting for size",Type.STRING],labelFileSizeNotAvailable:["Size not available",Type.STRING],labelFileCountSingular:["file in list",Type.STRING],labelFileCountPlural:["files in list",Type.STRING],labelFileLoading:["Loading",Type.STRING],labelFileAdded:["Added",Type.STRING],labelFileLoadError:["Error during load",Type.STRING],labelFileRemoved:["Removed",Type.STRING],labelFileRemoveError:["Error during remove",Type.STRING],labelFileProcessing:["Uploading",Type.STRING],labelFileProcessingComplete:["Upload complete",Type.STRING],labelFileProcessingAborted:["Upload cancelled",Type.STRING],labelFileProcessingError:["Error during upload",Type.STRING],labelFileProcessingRevertError:["Error during revert",Type.STRING],labelTapToCancel:["tap to cancel",Type.STRING],labelTapToRetry:["tap to retry",Type.STRING],labelTapToUndo:["tap to undo",Type.STRING],labelButtonRemoveItem:["Remove",Type.STRING],labelButtonAbortItemLoad:["Abort",Type.STRING],labelButtonRetryItemLoad:["Retry",Type.STRING],labelButtonAbortItemProcessing:["Cancel",Type.STRING],labelButtonUndoItemProcessing:["Undo",Type.STRING],labelButtonRetryItemProcessing:["Retry",Type.STRING],labelButtonProcessItem:["Upload",Type.STRING],iconRemove:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M11.586 13l-2.293 2.293a1 1 0 0 0 1.414 1.414L13 14.414l2.293 2.293a1 1 0 0 0 1.414-1.414L14.414 13l2.293-2.293a1 1 0 0 0-1.414-1.414L13 11.586l-2.293-2.293a1 1 0 0 0-1.414 1.414L11.586 13z" fill="currentColor" fill-rule="nonzero"/></svg>',Type.STRING],iconProcess:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M14 10.414v3.585a1 1 0 0 1-2 0v-3.585l-1.293 1.293a1 1 0 0 1-1.414-1.415l3-3a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1-1.414 1.415L14 10.414zM9 18a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2H9z" fill="currentColor" fill-rule="evenodd"/></svg>',Type.STRING],iconRetry:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M10.81 9.185l-.038.02A4.997 4.997 0 0 0 8 13.683a5 5 0 0 0 5 5 5 5 0 0 0 5-5 1 1 0 0 1 2 0A7 7 0 1 1 9.722 7.496l-.842-.21a.999.999 0 1 1 .484-1.94l3.23.806c.535.133.86.675.73 1.21l-.804 3.233a.997.997 0 0 1-1.21.73.997.997 0 0 1-.73-1.21l.23-.928v-.002z" fill="currentColor" fill-rule="nonzero"/></svg>',Type.STRING],iconUndo:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M9.185 10.81l.02-.038A4.997 4.997 0 0 1 13.683 8a5 5 0 0 1 5 5 5 5 0 0 1-5 5 1 1 0 0 0 0 2A7 7 0 1 0 7.496 9.722l-.21-.842a.999.999 0 1 0-1.94.484l.806 3.23c.133.535.675.86 1.21.73l3.233-.803a.997.997 0 0 0 .73-1.21.997.997 0 0 0-1.21-.73l-.928.23-.002-.001z" fill="currentColor" fill-rule="nonzero"/></svg>',Type.STRING],iconDone:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M18.293 9.293a1 1 0 0 1 1.414 1.414l-7.002 7a1 1 0 0 1-1.414 0l-3.998-4a1 1 0 1 1 1.414-1.414L12 15.586l6.294-6.293z" fill="currentColor" fill-rule="nonzero"/></svg>',Type.STRING],oninit:[null,Type.FUNCTION],onwarning:[null,Type.FUNCTION],onerror:[null,Type.FUNCTION],onactivatefile:[null,Type.FUNCTION],oninitfile:[null,Type.FUNCTION],onaddfilestart:[null,Type.FUNCTION],onaddfileprogress:[null,Type.FUNCTION],onaddfile:[null,Type.FUNCTION],onprocessfilestart:[null,Type.FUNCTION],onprocessfileprogress:[null,Type.FUNCTION],onprocessfileabort:[null,Type.FUNCTION],onprocessfilerevert:[null,Type.FUNCTION],onprocessfile:[null,Type.FUNCTION],onprocessfiles:[null,Type.FUNCTION],onremovefile:[null,Type.FUNCTION],onpreparefile:[null,Type.FUNCTION],onupdatefiles:[null,Type.FUNCTION],onreorderfiles:[null,Type.FUNCTION],beforeDropFile:[null,Type.FUNCTION],beforeAddFile:[null,Type.FUNCTION],beforeRemoveFile:[null,Type.FUNCTION],beforePrepareFile:[null,Type.FUNCTION],stylePanelLayout:[null,Type.STRING],stylePanelAspectRatio:[null,Type.STRING],styleItemPanelAspectRatio:[null,Type.STRING],styleButtonRemoveItemPosition:["left",Type.STRING],styleButtonProcessItemPosition:["right",Type.STRING],styleLoadIndicatorPosition:["right",Type.STRING],styleProgressIndicatorPosition:["right",Type.STRING],styleButtonRemoveItemAlign:[!1,Type.BOOLEAN],files:[[],Type.ARRAY],credits:[["https://pqina.nl/","Powered by PQINA"],Type.ARRAY]},getItemByQuery=function getItemByQuery(items,query){return isEmpty(query)?items[0]||null:isInt(query)?items[query]||null:("object"==typeof query&&(query=query.id),items.find((function(item){return item.id===query}))||null)},getNumericAspectRatioFromString=function getNumericAspectRatioFromString(aspectRatio){if(isEmpty(aspectRatio))return aspectRatio;if(/:/.test(aspectRatio)){var parts=aspectRatio.split(":");return parts[1]/parts[0]}return parseFloat(aspectRatio)},getActiveItems=function getActiveItems(items){return items.filter((function(item){return!item.archived}))},Status={EMPTY:0,IDLE:1,ERROR:2,BUSY:3,READY:4},res=null,canUpdateFileInput=function canUpdateFileInput(){if(null===res)try{var dataTransfer=new DataTransfer;dataTransfer.items.add(new File(["hello world"],"This_Works.txt"));var el=document.createElement("input");el.setAttribute("type","file"),el.files=dataTransfer.files,res=1===el.files.length}catch(err){res=!1}return res},ITEM_ERROR=[ItemStatus.LOAD_ERROR,ItemStatus.PROCESSING_ERROR,ItemStatus.PROCESSING_REVERT_ERROR],ITEM_BUSY=[ItemStatus.LOADING,ItemStatus.PROCESSING,ItemStatus.PROCESSING_QUEUED,ItemStatus.INIT],ITEM_READY=[ItemStatus.PROCESSING_COMPLETE],isItemInErrorState=function isItemInErrorState(item){return ITEM_ERROR.includes(item.status)},isItemInBusyState=function isItemInBusyState(item){return ITEM_BUSY.includes(item.status)},isItemInReadyState=function isItemInReadyState(item){return ITEM_READY.includes(item.status)},isAsync=function isAsync(state){return isObject(state.options.server)&&(isObject(state.options.server.process)||isFunction(state.options.server.process))},queries=function queries(state){return{GET_STATUS:function GET_STATUS(){var items=getActiveItems(state.items),EMPTY=Status.EMPTY,ERROR=Status.ERROR,BUSY=Status.BUSY,IDLE=Status.IDLE,READY=Status.READY;return 0===items.length?EMPTY:items.some(isItemInErrorState)?ERROR:items.some(isItemInBusyState)?BUSY:items.some(isItemInReadyState)?READY:IDLE},GET_ITEM:function GET_ITEM(query){return getItemByQuery(state.items,query)},GET_ACTIVE_ITEM:function GET_ACTIVE_ITEM(query){return getItemByQuery(getActiveItems(state.items),query)},GET_ACTIVE_ITEMS:function GET_ACTIVE_ITEMS(){return getActiveItems(state.items)},GET_ITEMS:function GET_ITEMS(){return state.items},GET_ITEM_NAME:function GET_ITEM_NAME(query){var item=getItemByQuery(state.items,query);return item?item.filename:null},GET_ITEM_SIZE:function GET_ITEM_SIZE(query){var item=getItemByQuery(state.items,query);return item?item.fileSize:null},GET_STYLES:function GET_STYLES(){return Object.keys(state.options).filter((function(key){return/^style/.test(key)})).map((function(option){return{name:option,value:state.options[option]}}))},GET_PANEL_ASPECT_RATIO:function GET_PANEL_ASPECT_RATIO(){return/circle/.test(state.options.stylePanelLayout)?1:getNumericAspectRatioFromString(state.options.stylePanelAspectRatio)},GET_ITEM_PANEL_ASPECT_RATIO:function GET_ITEM_PANEL_ASPECT_RATIO(){return state.options.styleItemPanelAspectRatio},GET_ITEMS_BY_STATUS:function GET_ITEMS_BY_STATUS(status){return getActiveItems(state.items).filter((function(item){return item.status===status}))},GET_TOTAL_ITEMS:function GET_TOTAL_ITEMS(){return getActiveItems(state.items).length},SHOULD_UPDATE_FILE_INPUT:function SHOULD_UPDATE_FILE_INPUT(){return state.options.storeAsFile&&canUpdateFileInput()&&!isAsync(state)},IS_ASYNC:function IS_ASYNC(){return isAsync(state)},GET_FILE_SIZE_LABELS:function GET_FILE_SIZE_LABELS(query){return{labelBytes:query("GET_LABEL_FILE_SIZE_BYTES")||void 0,labelKilobytes:query("GET_LABEL_FILE_SIZE_KILOBYTES")||void 0,labelMegabytes:query("GET_LABEL_FILE_SIZE_MEGABYTES")||void 0,labelGigabytes:query("GET_LABEL_FILE_SIZE_GIGABYTES")||void 0}}}},hasRoomForItem=function hasRoomForItem(state){var count=getActiveItems(state.items).length;if(!state.options.allowMultiple)return 0===count;var maxFileCount=state.options.maxFiles;return null===maxFileCount||count<maxFileCount},limit=function limit(value,min,max){return Math.max(Math.min(max,value),min)},arrayInsert=function arrayInsert(arr,index,item){return arr.splice(index,0,item)},insertItem=function insertItem(items,item,index){return isEmpty(item)?null:void 0===index?(items.push(item),item):(index=limit(index,0,items.length),arrayInsert(items,index,item),item)},isBase64DataURI=function isBase64DataURI(str){return/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(str)},getFilenameFromURL=function getFilenameFromURL(url){return(""+url).split("/").pop().split("?").shift()},getExtensionFromFilename=function getExtensionFromFilename(name){return name.split(".").pop()},guesstimateExtension=function guesstimateExtension(type){if("string"!=typeof type)return"";var subtype=type.split("/").pop();return/svg/.test(subtype)?"svg":/zip|compressed/.test(subtype)?"zip":/plain/.test(subtype)?"txt":/msword/.test(subtype)?"doc":/[a-z]+/.test(subtype)?"jpeg"===subtype?"jpg":subtype:""},leftPad=function leftPad(value){var padding=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(padding+value).slice(-padding.length)},getDateString=function getDateString(){var date=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return date.getFullYear()+"-"+leftPad(date.getMonth()+1,"00")+"-"+leftPad(date.getDate(),"00")+"_"+leftPad(date.getHours(),"00")+"-"+leftPad(date.getMinutes(),"00")+"-"+leftPad(date.getSeconds(),"00")},getFileFromBlob=function getFileFromBlob(blob,filename){var type=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,extension=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,file="string"==typeof type?blob.slice(0,blob.size,type):blob.slice(0,blob.size,blob.type);return file.lastModifiedDate=new Date,blob._relativePath&&(file._relativePath=blob._relativePath),isString(filename)||(filename=getDateString()),filename&&null===extension&&getExtensionFromFilename(filename)?file.name=filename:(extension=extension||guesstimateExtension(file.type),file.name=filename+(extension?"."+extension:"")),file},getBlobBuilder=function getBlobBuilder(){return window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder},createBlob=function createBlob(arrayBuffer,mimeType){var BB=getBlobBuilder();if(BB){var bb=new BB;return bb.append(arrayBuffer),bb.getBlob(mimeType)}return new Blob([arrayBuffer],{type:mimeType})},getBlobFromByteStringWithMimeType=function getBlobFromByteStringWithMimeType(byteString,mimeType){for(var ab=new ArrayBuffer(byteString.length),ia=new Uint8Array(ab),i=0;i<byteString.length;i++)ia[i]=byteString.charCodeAt(i);return createBlob(ab,mimeType)},getMimeTypeFromBase64DataURI=function getMimeTypeFromBase64DataURI(dataURI){return(/^data:(.+);/.exec(dataURI)||[])[1]||null},getBase64DataFromBase64DataURI=function getBase64DataFromBase64DataURI(dataURI){return dataURI.split(",")[1].replace(/\s/g,"")},getByteStringFromBase64DataURI=function getByteStringFromBase64DataURI(dataURI){return atob(getBase64DataFromBase64DataURI(dataURI))},getBlobFromBase64DataURI=function getBlobFromBase64DataURI(dataURI){var mimeType=getMimeTypeFromBase64DataURI(dataURI),byteString=getByteStringFromBase64DataURI(dataURI);return getBlobFromByteStringWithMimeType(byteString,mimeType)},getFileFromBase64DataURI=function getFileFromBase64DataURI(dataURI,filename,extension){return getFileFromBlob(getBlobFromBase64DataURI(dataURI),filename,null,extension)},getFileNameFromHeader=function getFileNameFromHeader(header){if(!/^content-disposition:/i.test(header))return null;var matches=header.split(/filename=|filename\*=.+''/).splice(1).map((function(name){return name.trim().replace(/^["']|[;"']{0,2}$/g,"")})).filter((function(name){return name.length}));return matches.length?decodeURI(matches[matches.length-1]):null},getFileSizeFromHeader=function getFileSizeFromHeader(header){if(/content-length:/i.test(header)){var size=header.match(/[0-9]+/)[0];return size?parseInt(size,10):null}return null},getTranfserIdFromHeader=function getTranfserIdFromHeader(header){return/x-content-transfer-id:/i.test(header)&&(header.split(":")[1]||"").trim()||null},getFileInfoFromHeaders=function getFileInfoFromHeaders(headers){var info={source:null,name:null,size:null},rows=headers.split("\n"),_iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=rows[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var header=_step.value,name=getFileNameFromHeader(header);if(name)info.name=name;else{var size=getFileSizeFromHeader(header);if(size)info.size=size;else{var source=getTranfserIdFromHeader(header);source&&(info.source=source)}}}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{_iteratorNormalCompletion||null==_iterator.return||_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}return info},createFileLoader=function createFileLoader(fetchFn){var state={source:null,complete:!1,progress:0,size:null,timestamp:null,duration:0,request:null},getProgress=function getProgress(){return state.progress},abort=function abort(){state.request&&state.request.abort&&state.request.abort()},load=function load(){var source=state.source;api.fire("init",source),source instanceof File?api.fire("load",source):source instanceof Blob?api.fire("load",getFileFromBlob(source,source.name)):isBase64DataURI(source)?api.fire("load",getFileFromBase64DataURI(source)):loadURL(source)},loadURL=function loadURL(url){fetchFn?(state.timestamp=Date.now(),state.request=fetchFn(url,(function(response){state.duration=Date.now()-state.timestamp,state.complete=!0,response instanceof Blob&&(response=getFileFromBlob(response,response.name||getFilenameFromURL(url))),api.fire("load",response instanceof Blob?response:response?response.body:null)}),(function(error){api.fire("error","string"==typeof error?{type:"error",code:0,body:error}:error)}),(function(computable,current,total){total&&(state.size=total),state.duration=Date.now()-state.timestamp,computable?(state.progress=current/total,api.fire("progress",state.progress)):state.progress=null}),(function(){api.fire("abort")}),(function(response){var fileinfo=getFileInfoFromHeaders("string"==typeof response?response:response.headers);api.fire("meta",{size:state.size||fileinfo.size,filename:fileinfo.name,source:fileinfo.source})}))):api.fire("error",{type:"error",body:"Can't load URL",code:400})},api=Object.assign({},on(),{setSource:function setSource(source){return state.source=source},getProgress,abort,load});return api},isGet=function isGet(method){return/GET|HEAD/.test(method)},sendRequest=function sendRequest(data,url,options){var api={onheaders:function onheaders(){},onprogress:function onprogress(){},onload:function onload(){},ontimeout:function ontimeout(){},onerror:function onerror(){},onabort:function onabort(){},abort:function abort(){aborted=!0,xhr.abort()}},aborted=!1,headersReceived=!1;options=Object.assign({method:"POST",headers:{},withCredentials:!1},options),url=encodeURI(url),isGet(options.method)&&data&&(url=""+url+encodeURIComponent("string"==typeof data?data:JSON.stringify(data)));var xhr=new XMLHttpRequest;return(isGet(options.method)?xhr:xhr.upload).onprogress=function(e){aborted||api.onprogress(e.lengthComputable,e.loaded,e.total)},xhr.onreadystatechange=function(){xhr.readyState<2||4===xhr.readyState&&0===xhr.status||headersReceived||(headersReceived=!0,api.onheaders(xhr))},xhr.onload=function(){xhr.status>=200&&xhr.status<300?api.onload(xhr):api.onerror(xhr)},xhr.onerror=function(){return api.onerror(xhr)},xhr.onabort=function(){aborted=!0,api.onabort()},xhr.ontimeout=function(){return api.ontimeout(xhr)},xhr.open(options.method,url,!0),isInt(options.timeout)&&(xhr.timeout=options.timeout),Object.keys(options.headers).forEach((function(key){var value=unescape(encodeURIComponent(options.headers[key]));xhr.setRequestHeader(key,value)})),options.responseType&&(xhr.responseType=options.responseType),options.withCredentials&&(xhr.withCredentials=!0),xhr.send(data),api},createResponse=function createResponse(type,code,body,headers){return{type,code,body,headers}},createTimeoutResponse=function createTimeoutResponse(cb){return function(xhr){cb(createResponse("error",0,"Timeout",xhr.getAllResponseHeaders()))}},hasQS=function hasQS(str){return/\?/.test(str)},buildURL=function buildURL(){for(var url="",_len=arguments.length,parts=new Array(_len),_key=0;_key<_len;_key++)parts[_key]=arguments[_key];return parts.forEach((function(part){url+=hasQS(url)&&hasQS(part)?part.replace(/\?/,"&"):part})),url},createFetchFunction=function createFetchFunction(){var apiUrl=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",action=arguments.length>1?arguments[1]:void 0;if("function"==typeof action)return action;if(!action||!isString(action.url))return null;var onload=action.onload||function(res){return res},onerror=action.onerror||function(res){return null};return function(url,load,error,progress,abort,headers){var request=sendRequest(url,buildURL(apiUrl,action.url),Object.assign({},action,{responseType:"blob"}));return request.onload=function(xhr){var headers=xhr.getAllResponseHeaders(),filename=getFileInfoFromHeaders(headers).name||getFilenameFromURL(url);load(createResponse("load",xhr.status,"HEAD"===action.method?null:getFileFromBlob(onload(xhr.response),filename),headers))},request.onerror=function(xhr){error(createResponse("error",xhr.status,onerror(xhr.response)||xhr.statusText,xhr.getAllResponseHeaders()))},request.onheaders=function(xhr){headers(createResponse("headers",xhr.status,null,xhr.getAllResponseHeaders()))},request.ontimeout=createTimeoutResponse(error),request.onprogress=progress,request.onabort=abort,request}},ChunkStatus={QUEUED:0,COMPLETE:1,PROCESSING:2,ERROR:3,WAITING:4},processFileChunked=function processFileChunked(apiUrl,action,name,file,metadata,load,error,progress,abort,transfer,options){for(var chunks=[],chunkTransferId=options.chunkTransferId,chunkServer=options.chunkServer,chunkSize=options.chunkSize,chunkRetryDelays=options.chunkRetryDelays,state={serverId:chunkTransferId,aborted:!1},ondata=action.ondata||function(fd){return fd},onload=action.onload||function(xhr,method){return"HEAD"===method?xhr.getResponseHeader("Upload-Offset"):xhr.response},onerror=action.onerror||function(res){return null},requestTransferId=function requestTransferId(cb){var formData=new FormData;isObject(metadata)&&formData.append(name,JSON.stringify(metadata));var headers="function"==typeof action.headers?action.headers(file,metadata):Object.assign({},action.headers,{"Upload-Length":file.size}),requestParams=Object.assign({},action,{headers}),request=sendRequest(ondata(formData),buildURL(apiUrl,action.url),requestParams);request.onload=function(xhr){return cb(onload(xhr,requestParams.method))},request.onerror=function(xhr){return error(createResponse("error",xhr.status,onerror(xhr.response)||xhr.statusText,xhr.getAllResponseHeaders()))},request.ontimeout=createTimeoutResponse(error)},requestTransferOffset=function requestTransferOffset(cb){var requestUrl=buildURL(apiUrl,chunkServer.url,state.serverId),requestParams={headers:"function"==typeof action.headers?action.headers(state.serverId):Object.assign({},action.headers),method:"HEAD"},request=sendRequest(null,requestUrl,requestParams);request.onload=function(xhr){return cb(onload(xhr,requestParams.method))},request.onerror=function(xhr){return error(createResponse("error",xhr.status,onerror(xhr.response)||xhr.statusText,xhr.getAllResponseHeaders()))},request.ontimeout=createTimeoutResponse(error)},lastChunkIndex=Math.floor(file.size/chunkSize),i=0;i<=lastChunkIndex;i++){var offset=i*chunkSize,data=file.slice(offset,offset+chunkSize,"application/offset+octet-stream");chunks[i]={index:i,size:data.size,offset,data,file,progress:0,retries:_toConsumableArray(chunkRetryDelays),status:ChunkStatus.QUEUED,error:null,request:null,timeout:null}}var completeProcessingChunks=function completeProcessingChunks(){return load(state.serverId)},canProcessChunk=function canProcessChunk(chunk){return chunk.status===ChunkStatus.QUEUED||chunk.status===ChunkStatus.ERROR},processChunk=function processChunk(chunk){if(!state.aborted)if(chunk=chunk||chunks.find(canProcessChunk)){chunk.status=ChunkStatus.PROCESSING,chunk.progress=null;var ondata=chunkServer.ondata||function(fd){return fd},onerror=chunkServer.onerror||function(res){return null},requestUrl=buildURL(apiUrl,chunkServer.url,state.serverId),headers="function"==typeof chunkServer.headers?chunkServer.headers(chunk):Object.assign({},chunkServer.headers,{"Content-Type":"application/offset+octet-stream","Upload-Offset":chunk.offset,"Upload-Length":file.size,"Upload-Name":file.name}),request=chunk.request=sendRequest(ondata(chunk.data),requestUrl,Object.assign({},chunkServer,{headers}));request.onload=function(){chunk.status=ChunkStatus.COMPLETE,chunk.request=null,processChunks()},request.onprogress=function(lengthComputable,loaded,total){chunk.progress=lengthComputable?loaded:null,updateTotalProgress()},request.onerror=function(xhr){chunk.status=ChunkStatus.ERROR,chunk.request=null,chunk.error=onerror(xhr.response)||xhr.statusText,retryProcessChunk(chunk)||error(createResponse("error",xhr.status,onerror(xhr.response)||xhr.statusText,xhr.getAllResponseHeaders()))},request.ontimeout=function(xhr){chunk.status=ChunkStatus.ERROR,chunk.request=null,retryProcessChunk(chunk)||createTimeoutResponse(error)(xhr)},request.onabort=function(){chunk.status=ChunkStatus.QUEUED,chunk.request=null,abort()}}else chunks.every((function(chunk){return chunk.status===ChunkStatus.COMPLETE}))&&completeProcessingChunks()},retryProcessChunk=function retryProcessChunk(chunk){return 0!==chunk.retries.length&&(chunk.status=ChunkStatus.WAITING,clearTimeout(chunk.timeout),chunk.timeout=setTimeout((function(){processChunk(chunk)}),chunk.retries.shift()),!0)},updateTotalProgress=function updateTotalProgress(){var totalBytesTransfered=chunks.reduce((function(p,chunk){return null===p||null===chunk.progress?null:p+chunk.progress}),0);if(null===totalBytesTransfered)return progress(!1,0,0);var totalSize=chunks.reduce((function(total,chunk){return total+chunk.size}),0);progress(!0,totalBytesTransfered,totalSize)},processChunks=function processChunks(){chunks.filter((function(chunk){return chunk.status===ChunkStatus.PROCESSING})).length>=1||processChunk()},abortChunks=function abortChunks(){chunks.forEach((function(chunk){clearTimeout(chunk.timeout),chunk.request&&chunk.request.abort()}))};return state.serverId?requestTransferOffset((function(offset){state.aborted||(chunks.filter((function(chunk){return chunk.offset<offset})).forEach((function(chunk){chunk.status=ChunkStatus.COMPLETE,chunk.progress=chunk.size})),processChunks())})):requestTransferId((function(serverId){state.aborted||(transfer(serverId),state.serverId=serverId,processChunks())})),{abort:function abort(){state.aborted=!0,abortChunks()}}},createFileProcessorFunction=function createFileProcessorFunction(apiUrl,action,name,options){return function(file,metadata,load,error,progress,abort,transfer){if(file){var canChunkUpload=options.chunkUploads,shouldChunkUpload=canChunkUpload&&file.size>options.chunkSize,willChunkUpload=canChunkUpload&&(shouldChunkUpload||options.chunkForce);if(file instanceof Blob&&willChunkUpload)return processFileChunked(apiUrl,action,name,file,metadata,load,error,progress,abort,transfer,options);var ondata=action.ondata||function(fd){return fd},onload=action.onload||function(res){return res},onerror=action.onerror||function(res){return null},headers="function"==typeof action.headers?action.headers(file,metadata)||{}:Object.assign({},action.headers),requestParams=Object.assign({},action,{headers}),formData=new FormData;isObject(metadata)&&formData.append(name,JSON.stringify(metadata)),(file instanceof Blob?[{name:null,file}]:file).forEach((function(item){formData.append(name,item.file,null===item.name?item.file.name:""+item.name+item.file.name)}));var request=sendRequest(ondata(formData),buildURL(apiUrl,action.url),requestParams);return request.onload=function(xhr){load(createResponse("load",xhr.status,onload(xhr.response),xhr.getAllResponseHeaders()))},request.onerror=function(xhr){error(createResponse("error",xhr.status,onerror(xhr.response)||xhr.statusText,xhr.getAllResponseHeaders()))},request.ontimeout=createTimeoutResponse(error),request.onprogress=progress,request.onabort=abort,request}}},createProcessorFunction=function createProcessorFunction(){var apiUrl=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",action=arguments.length>1?arguments[1]:void 0,name=arguments.length>2?arguments[2]:void 0,options=arguments.length>3?arguments[3]:void 0;return"function"==typeof action?function(){for(var _len=arguments.length,params=new Array(_len),_key=0;_key<_len;_key++)params[_key]=arguments[_key];return action.apply(void 0,[name].concat(params,[options]))}:action&&isString(action.url)?createFileProcessorFunction(apiUrl,action,name,options):null},createRevertFunction=function createRevertFunction(){var apiUrl=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",action=arguments.length>1?arguments[1]:void 0;if("function"==typeof action)return action;if(!action||!isString(action.url))return function(uniqueFileId,load){return load()};var onload=action.onload||function(res){return res},onerror=action.onerror||function(res){return null};return function(uniqueFileId,load,error){var request=sendRequest(uniqueFileId,apiUrl+action.url,action);return request.onload=function(xhr){load(createResponse("load",xhr.status,onload(xhr.response),xhr.getAllResponseHeaders()))},request.onerror=function(xhr){error(createResponse("error",xhr.status,onerror(xhr.response)||xhr.statusText,xhr.getAllResponseHeaders()))},request.ontimeout=createTimeoutResponse(error),request}},getRandomNumber=function getRandomNumber(){var min=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,max=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return min+Math.random()*(max-min)},createPerceivedPerformanceUpdater=function createPerceivedPerformanceUpdater(cb){var duration=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,tickMin=arguments.length>3&&void 0!==arguments[3]?arguments[3]:25,tickMax=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,timeout=null,start=Date.now();return duration>0&&function tick(){var runtime=Date.now()-start,delay=getRandomNumber(tickMin,tickMax);runtime+delay>duration&&(delay=runtime+delay-duration);var progress=runtime/duration;progress>=1||document.hidden?cb(1):(cb(progress),timeout=setTimeout(tick,delay))}(),{clear:function clear(){clearTimeout(timeout)}}},createFileProcessor=function createFileProcessor(processFn,options){var state={complete:!1,perceivedProgress:0,perceivedPerformanceUpdater:null,progress:null,timestamp:null,perceivedDuration:0,duration:0,request:null,response:null},allowMinimumUploadDuration=options.allowMinimumUploadDuration,process=function process(file,metadata){var progressFn=function progressFn(){0!==state.duration&&null!==state.progress&&api.fire("progress",api.getProgress())},completeFn=function completeFn(){state.complete=!0,api.fire("load-perceived",state.response.body)};api.fire("start"),state.timestamp=Date.now(),state.perceivedPerformanceUpdater=createPerceivedPerformanceUpdater((function(progress){state.perceivedProgress=progress,state.perceivedDuration=Date.now()-state.timestamp,progressFn(),state.response&&1===state.perceivedProgress&&!state.complete&&completeFn()}),allowMinimumUploadDuration?getRandomNumber(750,1500):0),state.request=processFn(file,metadata,(function(response){state.response=isObject(response)?response:{type:"load",code:200,body:""+response,headers:{}},state.duration=Date.now()-state.timestamp,state.progress=1,api.fire("load",state.response.body),(!allowMinimumUploadDuration||allowMinimumUploadDuration&&1===state.perceivedProgress)&&completeFn()}),(function(error){state.perceivedPerformanceUpdater.clear(),api.fire("error",isObject(error)?error:{type:"error",code:0,body:""+error})}),(function(computable,current,total){state.duration=Date.now()-state.timestamp,state.progress=computable?current/total:null,progressFn()}),(function(){state.perceivedPerformanceUpdater.clear(),api.fire("abort",state.response?state.response.body:null)}),(function(transferId){api.fire("transfer",transferId)}))},abort=function abort(){state.request&&(state.perceivedPerformanceUpdater.clear(),state.request.abort&&state.request.abort(),state.complete=!0)},reset=function reset(){abort(),state.complete=!1,state.perceivedProgress=0,state.progress=0,state.timestamp=null,state.perceivedDuration=0,state.duration=0,state.request=null,state.response=null},getProgress=allowMinimumUploadDuration?function(){return state.progress?Math.min(state.progress,state.perceivedProgress):null}:function(){return state.progress||null},getDuration=allowMinimumUploadDuration?function(){return Math.min(state.duration,state.perceivedDuration)}:function(){return state.duration},api=Object.assign({},on(),{process,abort,getProgress,getDuration,reset});return api},getFilenameWithoutExtension=function getFilenameWithoutExtension(name){return name.substring(0,name.lastIndexOf("."))||name},createFileStub=function createFileStub(source){var data=[source.name,source.size,source.type];return source instanceof Blob||isBase64DataURI(source)?data[0]=source.name||getDateString():isBase64DataURI(source)?(data[1]=source.length,data[2]=getMimeTypeFromBase64DataURI(source)):isString(source)&&(data[0]=getFilenameFromURL(source),data[1]=0,data[2]="application/octet-stream"),{name:data[0],size:data[1],type:data[2]}},isFile=function isFile(value){return!!(value instanceof File||value instanceof Blob&&value.name)},deepCloneObject=function deepCloneObject(src){if(!isObject(src))return src;var target=isArray(src)?[]:{};for(var key in src)if(src.hasOwnProperty(key)){var v=src[key];target[key]=v&&isObject(v)?deepCloneObject(v):v}return target},createItem=function createItem(){var origin=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,serverFileReference=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,file=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,id=getUniqueId(),state={archived:!1,frozen:!1,released:!1,source:null,file,serverFileReference,transferId:null,processingAborted:!1,status:serverFileReference?ItemStatus.PROCESSING_COMPLETE:ItemStatus.INIT,activeLoader:null,activeProcessor:null},abortProcessingRequestComplete=null,metadata={},setStatus=function setStatus(status){return state.status=status},fire=function fire(event){if(!state.released&&!state.frozen){for(var _len=arguments.length,params=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)params[_key-1]=arguments[_key];api.fire.apply(api,[event].concat(params))}},getFileExtension=function getFileExtension(){return getExtensionFromFilename(state.file.name)},getFileType=function getFileType(){return state.file.type},getFileSize=function getFileSize(){return state.file.size},getFile=function getFile(){return state.file},load=function load(source,loader,onload){state.source=source,api.fireSync("init"),state.file?api.fireSync("load-skip"):(state.file=createFileStub(source),loader.on("init",(function(){fire("load-init")})),loader.on("meta",(function(meta){state.file.size=meta.size,state.file.filename=meta.filename,meta.source&&(origin=FileOrigin.LIMBO,state.serverFileReference=meta.source,state.status=ItemStatus.PROCESSING_COMPLETE),fire("load-meta")})),loader.on("progress",(function(progress){setStatus(ItemStatus.LOADING),fire("load-progress",progress)})),loader.on("error",(function(error){setStatus(ItemStatus.LOAD_ERROR),fire("load-request-error",error)})),loader.on("abort",(function(){setStatus(ItemStatus.INIT),fire("load-abort")})),loader.on("load",(function(file){state.activeLoader=null;var success=function success(result){state.file=isFile(result)?result:state.file,origin===FileOrigin.LIMBO&&state.serverFileReference?setStatus(ItemStatus.PROCESSING_COMPLETE):setStatus(ItemStatus.IDLE),fire("load")},error=function error(result){state.file=file,fire("load-meta"),setStatus(ItemStatus.LOAD_ERROR),fire("load-file-error",result)};state.serverFileReference?success(file):onload(file,success,error)})),loader.setSource(source),state.activeLoader=loader,loader.load())},retryLoad=function retryLoad(){state.activeLoader&&state.activeLoader.load()},abortLoad=function abortLoad(){state.activeLoader?state.activeLoader.abort():(setStatus(ItemStatus.INIT),fire("load-abort"))},process=function process(processor,onprocess){if(state.processingAborted)state.processingAborted=!1;else if(setStatus(ItemStatus.PROCESSING),abortProcessingRequestComplete=null,state.file instanceof Blob){processor.on("load",(function(serverFileReference){state.transferId=null,state.serverFileReference=serverFileReference})),processor.on("transfer",(function(transferId){state.transferId=transferId})),processor.on("load-perceived",(function(serverFileReference){state.activeProcessor=null,state.transferId=null,state.serverFileReference=serverFileReference,setStatus(ItemStatus.PROCESSING_COMPLETE),fire("process-complete",serverFileReference)})),processor.on("start",(function(){fire("process-start")})),processor.on("error",(function(error){state.activeProcessor=null,setStatus(ItemStatus.PROCESSING_ERROR),fire("process-error",error)})),processor.on("abort",(function(serverFileReference){state.activeProcessor=null,state.serverFileReference=serverFileReference,setStatus(ItemStatus.IDLE),fire("process-abort"),abortProcessingRequestComplete&&abortProcessingRequestComplete()})),processor.on("progress",(function(progress){fire("process-progress",progress)}));var success=function success(file){state.archived||processor.process(file,Object.assign({},metadata))},error=console.error;onprocess(state.file,success,error),state.activeProcessor=processor}else api.on("load",(function(){process(processor,onprocess)}))},requestProcessing=function requestProcessing(){state.processingAborted=!1,setStatus(ItemStatus.PROCESSING_QUEUED)},abortProcessing=function abortProcessing(){return new Promise((function(resolve){if(!state.activeProcessor)return state.processingAborted=!0,setStatus(ItemStatus.IDLE),fire("process-abort"),void resolve();abortProcessingRequestComplete=function abortProcessingRequestComplete(){resolve()},state.activeProcessor.abort()}))},revert=function revert(revertFileUpload,forceRevert){return new Promise((function(resolve,reject){var serverTransferId=null!==state.serverFileReference?state.serverFileReference:state.transferId;null!==serverTransferId?(revertFileUpload(serverTransferId,(function(){state.serverFileReference=null,state.transferId=null,resolve()}),(function(error){forceRevert?(setStatus(ItemStatus.PROCESSING_REVERT_ERROR),fire("process-revert-error"),reject(error)):resolve()})),setStatus(ItemStatus.IDLE),fire("process-revert")):resolve()}))},_setMetadata=function setMetadata(key,value,silent){var keys=key.split("."),root=keys[0],last=keys.pop(),data=metadata;keys.forEach((function(key){return data=data[key]})),JSON.stringify(data[last])!==JSON.stringify(value)&&(data[last]=value,fire("metadata-update",{key:root,value:metadata[root],silent}))},getMetadata=function getMetadata(key){return deepCloneObject(key?metadata[key]:metadata)},api=Object.assign({id:{get:function get(){return id}},origin:{get:function get(){return origin},set:function set(value){return origin=value}},serverId:{get:function get(){return state.serverFileReference}},transferId:{get:function get(){return state.transferId}},status:{get:function get(){return state.status}},filename:{get:function get(){return state.file.name}},filenameWithoutExtension:{get:function get(){return getFilenameWithoutExtension(state.file.name)}},fileExtension:{get:getFileExtension},fileType:{get:getFileType},fileSize:{get:getFileSize},file:{get:getFile},relativePath:{get:function get(){return state.file._relativePath}},source:{get:function get(){return state.source}},getMetadata,setMetadata:function setMetadata(key,value,silent){if(isObject(key)){var data=key;return Object.keys(data).forEach((function(key){_setMetadata(key,data[key],value)})),key}return _setMetadata(key,value,silent),value},extend:function extend(name,handler){return itemAPI[name]=handler},abortLoad,retryLoad,requestProcessing,abortProcessing,load,process,revert},on(),{freeze:function freeze(){return state.frozen=!0},release:function release(){return state.released=!0},released:{get:function get(){return state.released}},archive:function archive(){return state.archived=!0},archived:{get:function get(){return state.archived}}}),itemAPI=createObject(api);return itemAPI},getItemIndexByQuery=function getItemIndexByQuery(items,query){return isEmpty(query)?0:isString(query)?items.findIndex((function(item){return item.id===query})):-1},getItemById=function getItemById(items,itemId){var index=getItemIndexByQuery(items,itemId);if(!(index<0))return items[index]||null},fetchBlob=function fetchBlob(url,load,error,progress,abort,headers){var request=sendRequest(null,url,{method:"GET",responseType:"blob"});return request.onload=function(xhr){var headers=xhr.getAllResponseHeaders(),filename=getFileInfoFromHeaders(headers).name||getFilenameFromURL(url);load(createResponse("load",xhr.status,getFileFromBlob(xhr.response,filename),headers))},request.onerror=function(xhr){error(createResponse("error",xhr.status,xhr.statusText,xhr.getAllResponseHeaders()))},request.onheaders=function(xhr){headers(createResponse("headers",xhr.status,null,xhr.getAllResponseHeaders()))},request.ontimeout=createTimeoutResponse(error),request.onprogress=progress,request.onabort=abort,request},getDomainFromURL=function getDomainFromURL(url){return 0===url.indexOf("//")&&(url=location.protocol+url),url.toLowerCase().replace("blob:","").replace(/([a-z])?:\/\//,"$1").split("/")[0]},isExternalURL=function isExternalURL(url){return(url.indexOf(":")>-1||url.indexOf("//")>-1)&&getDomainFromURL(location.href)!==getDomainFromURL(url)},dynamicLabel=function dynamicLabel(label){return function(){return isFunction(label)?label.apply(void 0,arguments):label}},isMockItem=function isMockItem(item){return!isFile(item.file)},listUpdated=function listUpdated(dispatch,state){clearTimeout(state.listUpdateTimeout),state.listUpdateTimeout=setTimeout((function(){dispatch("DID_UPDATE_ITEMS",{items:getActiveItems(state.items)})}),0)},optionalPromise=function optionalPromise(fn){for(var _len=arguments.length,params=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)params[_key-1]=arguments[_key];return new Promise((function(resolve){if(!fn)return resolve(!0);var result=fn.apply(void 0,params);return null==result?resolve(!0):"boolean"==typeof result?resolve(result):void("function"==typeof result.then&&result.then(resolve))}))},sortItems=function sortItems(state,compare){state.items.sort((function(a,b){return compare(createItemAPI(a),createItemAPI(b))}))},getItemByQueryFromState=function getItemByQueryFromState(state,itemHandler){return function(){var _ref=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},query=_ref.query,_ref$success=_ref.success,success=void 0===_ref$success?function(){}:_ref$success,_ref$failure=_ref.failure,failure=void 0===_ref$failure?function(){}:_ref$failure,options=_objectWithoutProperties(_ref,["query","success","failure"]),item=getItemByQuery(state.items,query);item?itemHandler(item,success,failure,options||{}):failure({error:createResponse("error",0,"Item not found"),file:null})}},actions=function actions(dispatch,query,state){return{ABORT_ALL:function ABORT_ALL(){getActiveItems(state.items).forEach((function(item){item.freeze(),item.abortLoad(),item.abortProcessing()}))},DID_SET_FILES:function DID_SET_FILES(_ref2){var _ref2$value=_ref2.value,files=(void 0===_ref2$value?[]:_ref2$value).map((function(file){return{source:file.source?file.source:file,options:file.options}})),activeItems=getActiveItems(state.items);activeItems.forEach((function(item){files.find((function(file){return file.source===item.source||file.source===item.file}))||dispatch("REMOVE_ITEM",{query:item,remove:!1})})),activeItems=getActiveItems(state.items),files.forEach((function(file,index){activeItems.find((function(item){return item.source===file.source||item.file===file.source}))||dispatch("ADD_ITEM",Object.assign({},file,{interactionMethod:InteractionMethod.NONE,index}))}))},DID_UPDATE_ITEM_METADATA:function DID_UPDATE_ITEM_METADATA(_ref3){var id=_ref3.id,action=_ref3.action,change=_ref3.change;change.silent||(clearTimeout(state.itemUpdateTimeout),state.itemUpdateTimeout=setTimeout((function(){var item=getItemById(state.items,id);if(query("IS_ASYNC")){item.origin===FileOrigin.LOCAL&&dispatch("DID_LOAD_ITEM",{id:item.id,error:null,serverFileReference:item.source});var upload=function upload(){setTimeout((function(){dispatch("REQUEST_ITEM_PROCESSING",{query:id})}),32)},revert=function revert(doUpload){item.revert(createRevertFunction(state.options.server.url,state.options.server.revert),query("GET_FORCE_REVERT")).then(doUpload?upload:function(){}).catch((function(){}))},abort=function abort(doUpload){item.abortProcessing().then(doUpload?upload:function(){})};return item.status===ItemStatus.PROCESSING_COMPLETE?revert(state.options.instantUpload):item.status===ItemStatus.PROCESSING?abort(state.options.instantUpload):void(state.options.instantUpload&&upload())}applyFilterChain("SHOULD_PREPARE_OUTPUT",!1,{item,query,action,change}).then((function(shouldPrepareOutput){var beforePrepareFile=query("GET_BEFORE_PREPARE_FILE");beforePrepareFile&&(shouldPrepareOutput=beforePrepareFile(item,shouldPrepareOutput)),shouldPrepareOutput&&dispatch("REQUEST_PREPARE_OUTPUT",{query:id,item,success:function success(file){dispatch("DID_PREPARE_OUTPUT",{id,file})}},!0)}))}),0))},MOVE_ITEM:function MOVE_ITEM(_ref4){var query=_ref4.query,index=_ref4.index,item=getItemByQuery(state.items,query);if(item){var currentIndex=state.items.indexOf(item);currentIndex!==(index=limit(index,0,state.items.length-1))&&state.items.splice(index,0,state.items.splice(currentIndex,1)[0])}},SORT:function SORT(_ref5){var compare=_ref5.compare;sortItems(state,compare),dispatch("DID_SORT_ITEMS",{items:query("GET_ACTIVE_ITEMS")})},ADD_ITEMS:function ADD_ITEMS(_ref6){var items=_ref6.items,index=_ref6.index,interactionMethod=_ref6.interactionMethod,_ref6$success=_ref6.success,success=void 0===_ref6$success?function(){}:_ref6$success,_ref6$failure=_ref6.failure,failure=void 0===_ref6$failure?function(){}:_ref6$failure,currentIndex=index;if(-1===index||void 0===index){var insertLocation=query("GET_ITEM_INSERT_LOCATION"),totalItems=query("GET_TOTAL_ITEMS");currentIndex="before"===insertLocation?0:totalItems}var ignoredFiles=query("GET_IGNORED_FILES"),isValidFile=function isValidFile(source){return isFile(source)?!ignoredFiles.includes(source.name.toLowerCase()):!isEmpty(source)},promises=items.filter(isValidFile).map((function(source){return new Promise((function(resolve,reject){dispatch("ADD_ITEM",{interactionMethod,source:source.source||source,success:resolve,failure:reject,index:currentIndex++,options:source.options||{}})}))}));Promise.all(promises).then(success).catch(failure)},ADD_ITEM:function ADD_ITEM(_ref7){var source=_ref7.source,_ref7$index=_ref7.index,index=void 0===_ref7$index?-1:_ref7$index,interactionMethod=_ref7.interactionMethod,_ref7$success=_ref7.success,success=void 0===_ref7$success?function(){}:_ref7$success,_ref7$failure=_ref7.failure,failure=void 0===_ref7$failure?function(){}:_ref7$failure,_ref7$options=_ref7.options,options=void 0===_ref7$options?{}:_ref7$options;if(isEmpty(source))failure({error:createResponse("error",0,"No source"),file:null});else if(!isFile(source)||!state.options.ignoredFiles.includes(source.name.toLowerCase())){if(!hasRoomForItem(state)){if(state.options.allowMultiple||!state.options.allowMultiple&&!state.options.allowReplace){var error=createResponse("warning",0,"Max files");return dispatch("DID_THROW_MAX_FILES",{source,error}),void failure({error,file:null})}var _item=getActiveItems(state.items)[0];if(_item.status===ItemStatus.PROCESSING_COMPLETE||_item.status===ItemStatus.PROCESSING_REVERT_ERROR){var forceRevert=query("GET_FORCE_REVERT");if(_item.revert(createRevertFunction(state.options.server.url,state.options.server.revert),forceRevert).then((function(){forceRevert&&dispatch("ADD_ITEM",{source,index,interactionMethod,success,failure,options})})).catch((function(){})),forceRevert)return}dispatch("REMOVE_ITEM",{query:_item.id})}var origin="local"===options.type?FileOrigin.LOCAL:"limbo"===options.type?FileOrigin.LIMBO:FileOrigin.INPUT,item=createItem(origin,origin===FileOrigin.INPUT?null:source,options.file);Object.keys(options.metadata||{}).forEach((function(key){item.setMetadata(key,options.metadata[key])})),applyFilters("DID_CREATE_ITEM",item,{query,dispatch});var itemInsertLocation=query("GET_ITEM_INSERT_LOCATION");state.options.itemInsertLocationFreedom||(index="before"===itemInsertLocation?-1:state.items.length),insertItem(state.items,item,index),isFunction(itemInsertLocation)&&source&&sortItems(state,itemInsertLocation);var id=item.id;item.on("init",(function(){dispatch("DID_INIT_ITEM",{id})})),item.on("load-init",(function(){dispatch("DID_START_ITEM_LOAD",{id})})),item.on("load-meta",(function(){dispatch("DID_UPDATE_ITEM_META",{id})})),item.on("load-progress",(function(progress){dispatch("DID_UPDATE_ITEM_LOAD_PROGRESS",{id,progress})})),item.on("load-request-error",(function(error){var mainStatus=dynamicLabel(state.options.labelFileLoadError)(error);if(error.code>=400&&error.code<500)return dispatch("DID_THROW_ITEM_INVALID",{id,error,status:{main:mainStatus,sub:error.code+" ("+error.body+")"}}),void failure({error,file:createItemAPI(item)});dispatch("DID_THROW_ITEM_LOAD_ERROR",{id,error,status:{main:mainStatus,sub:state.options.labelTapToRetry}})})),item.on("load-file-error",(function(error){dispatch("DID_THROW_ITEM_INVALID",{id,error:error.status,status:error.status}),failure({error:error.status,file:createItemAPI(item)})})),item.on("load-abort",(function(){dispatch("REMOVE_ITEM",{query:id})})),item.on("load-skip",(function(){dispatch("COMPLETE_LOAD_ITEM",{query:id,item,data:{source,success}})})),item.on("load",(function(){var handleAdd=function handleAdd(shouldAdd){shouldAdd?(item.on("metadata-update",(function(change){dispatch("DID_UPDATE_ITEM_METADATA",{id,change})})),applyFilterChain("SHOULD_PREPARE_OUTPUT",!1,{item,query}).then((function(shouldPrepareOutput){var beforePrepareFile=query("GET_BEFORE_PREPARE_FILE");beforePrepareFile&&(shouldPrepareOutput=beforePrepareFile(item,shouldPrepareOutput));var loadComplete=function loadComplete(){dispatch("COMPLETE_LOAD_ITEM",{query:id,item,data:{source,success}}),listUpdated(dispatch,state)};shouldPrepareOutput?dispatch("REQUEST_PREPARE_OUTPUT",{query:id,item,success:function success(file){dispatch("DID_PREPARE_OUTPUT",{id,file}),loadComplete()}},!0):loadComplete()}))):dispatch("REMOVE_ITEM",{query:id})};applyFilterChain("DID_LOAD_ITEM",item,{query,dispatch}).then((function(){optionalPromise(query("GET_BEFORE_ADD_FILE"),createItemAPI(item)).then(handleAdd)})).catch((function(e){if(!e||!e.error||!e.status)return handleAdd(!1);dispatch("DID_THROW_ITEM_INVALID",{id,error:e.error,status:e.status})}))})),item.on("process-start",(function(){dispatch("DID_START_ITEM_PROCESSING",{id})})),item.on("process-progress",(function(progress){dispatch("DID_UPDATE_ITEM_PROCESS_PROGRESS",{id,progress})})),item.on("process-error",(function(error){dispatch("DID_THROW_ITEM_PROCESSING_ERROR",{id,error,status:{main:dynamicLabel(state.options.labelFileProcessingError)(error),sub:state.options.labelTapToRetry}})})),item.on("process-revert-error",(function(error){dispatch("DID_THROW_ITEM_PROCESSING_REVERT_ERROR",{id,error,status:{main:dynamicLabel(state.options.labelFileProcessingRevertError)(error),sub:state.options.labelTapToRetry}})})),item.on("process-complete",(function(serverFileReference){dispatch("DID_COMPLETE_ITEM_PROCESSING",{id,error:null,serverFileReference}),dispatch("DID_DEFINE_VALUE",{id,value:serverFileReference})})),item.on("process-abort",(function(){dispatch("DID_ABORT_ITEM_PROCESSING",{id})})),item.on("process-revert",(function(){dispatch("DID_REVERT_ITEM_PROCESSING",{id}),dispatch("DID_DEFINE_VALUE",{id,value:null})})),dispatch("DID_ADD_ITEM",{id,index,interactionMethod}),listUpdated(dispatch,state);var _ref8=state.options.server||{},url=_ref8.url,load=_ref8.load,restore=_ref8.restore,fetch=_ref8.fetch;item.load(source,createFileLoader(origin===FileOrigin.INPUT?isString(source)&&isExternalURL(source)&&fetch?createFetchFunction(url,fetch):fetchBlob:origin===FileOrigin.LIMBO?createFetchFunction(url,restore):createFetchFunction(url,load)),(function(file,success,error){applyFilterChain("LOAD_FILE",file,{query}).then(success).catch(error)}))}},REQUEST_PREPARE_OUTPUT:function REQUEST_PREPARE_OUTPUT(_ref9){var item=_ref9.item,success=_ref9.success,_ref9$failure=_ref9.failure,failure=void 0===_ref9$failure?function(){}:_ref9$failure,err={error:createResponse("error",0,"Item not found"),file:null};if(item.archived)return failure(err);applyFilterChain("PREPARE_OUTPUT",item.file,{query,item}).then((function(result){applyFilterChain("COMPLETE_PREPARE_OUTPUT",result,{query,item}).then((function(result){if(item.archived)return failure(err);success(result)}))}))},COMPLETE_LOAD_ITEM:function COMPLETE_LOAD_ITEM(_ref10){var item=_ref10.item,data=_ref10.data,success=data.success,source=data.source,itemInsertLocation=query("GET_ITEM_INSERT_LOCATION");if(isFunction(itemInsertLocation)&&source&&sortItems(state,itemInsertLocation),dispatch("DID_LOAD_ITEM",{id:item.id,error:null,serverFileReference:item.origin===FileOrigin.INPUT?null:source}),success(createItemAPI(item)),item.origin!==FileOrigin.LOCAL)return item.origin===FileOrigin.LIMBO?(dispatch("DID_COMPLETE_ITEM_PROCESSING",{id:item.id,error:null,serverFileReference:source}),void dispatch("DID_DEFINE_VALUE",{id:item.id,value:item.serverId||source})):void(query("IS_ASYNC")&&state.options.instantUpload&&dispatch("REQUEST_ITEM_PROCESSING",{query:item.id}));dispatch("DID_LOAD_LOCAL_ITEM",{id:item.id})},RETRY_ITEM_LOAD:getItemByQueryFromState(state,(function(item){item.retryLoad()})),REQUEST_ITEM_PREPARE:getItemByQueryFromState(state,(function(item,_success,failure){dispatch("REQUEST_PREPARE_OUTPUT",{query:item.id,item,success:function success(file){dispatch("DID_PREPARE_OUTPUT",{id:item.id,file}),_success({file:item,output:file})},failure},!0)})),REQUEST_ITEM_PROCESSING:getItemByQueryFromState(state,(function(item,success,failure){if(item.status===ItemStatus.IDLE||item.status===ItemStatus.PROCESSING_ERROR)item.status!==ItemStatus.PROCESSING_QUEUED&&(item.requestProcessing(),dispatch("DID_REQUEST_ITEM_PROCESSING",{id:item.id}),dispatch("PROCESS_ITEM",{query:item,success,failure},!0));else{var processNow=function processNow(){return dispatch("REQUEST_ITEM_PROCESSING",{query:item,success,failure})},process=function process(){return document.hidden?processNow():setTimeout(processNow,32)};item.status===ItemStatus.PROCESSING_COMPLETE||item.status===ItemStatus.PROCESSING_REVERT_ERROR?item.revert(createRevertFunction(state.options.server.url,state.options.server.revert),query("GET_FORCE_REVERT")).then(process).catch((function(){})):item.status===ItemStatus.PROCESSING&&item.abortProcessing().then(process)}})),PROCESS_ITEM:getItemByQueryFromState(state,(function(item,success,failure){var maxParallelUploads=query("GET_MAX_PARALLEL_UPLOADS");if(query("GET_ITEMS_BY_STATUS",ItemStatus.PROCESSING).length!==maxParallelUploads){if(item.status!==ItemStatus.PROCESSING){var processNext=function processNext(){var queueEntry=state.processingQueue.shift();if(queueEntry){var id=queueEntry.id,success=queueEntry.success,failure=queueEntry.failure,itemReference=getItemByQuery(state.items,id);itemReference&&!itemReference.archived?dispatch("PROCESS_ITEM",{query:id,success,failure},!0):processNext()}};item.onOnce("process-complete",(function(){success(createItemAPI(item)),processNext();var server=state.options.server;if(state.options.instantUpload&&item.origin===FileOrigin.LOCAL&&isFunction(server.remove)){var noop=function noop(){};item.origin=FileOrigin.LIMBO,state.options.server.remove(item.source,noop,noop)}query("GET_ITEMS_BY_STATUS",ItemStatus.PROCESSING_COMPLETE).length===state.items.length&&dispatch("DID_COMPLETE_ITEM_PROCESSING_ALL")})),item.onOnce("process-error",(function(error){failure({error,file:createItemAPI(item)}),processNext()}));var options=state.options;item.process(createFileProcessor(createProcessorFunction(options.server.url,options.server.process,options.name,{chunkTransferId:item.transferId,chunkServer:options.server.patch,chunkUploads:options.chunkUploads,chunkForce:options.chunkForce,chunkSize:options.chunkSize,chunkRetryDelays:options.chunkRetryDelays}),{allowMinimumUploadDuration:query("GET_ALLOW_MINIMUM_UPLOAD_DURATION")}),(function(file,success,error){applyFilterChain("PREPARE_OUTPUT",file,{query,item}).then((function(file){dispatch("DID_PREPARE_OUTPUT",{id:item.id,file}),success(file)})).catch(error)}))}}else state.processingQueue.push({id:item.id,success,failure})})),RETRY_ITEM_PROCESSING:getItemByQueryFromState(state,(function(item){dispatch("REQUEST_ITEM_PROCESSING",{query:item})})),REQUEST_REMOVE_ITEM:getItemByQueryFromState(state,(function(item){optionalPromise(query("GET_BEFORE_REMOVE_FILE"),createItemAPI(item)).then((function(shouldRemove){shouldRemove&&dispatch("REMOVE_ITEM",{query:item})}))})),RELEASE_ITEM:getItemByQueryFromState(state,(function(item){item.release()})),REMOVE_ITEM:getItemByQueryFromState(state,(function(item,success,failure,options){var removeFromView=function removeFromView(){var id=item.id;getItemById(state.items,id).archive(),dispatch("DID_REMOVE_ITEM",{error:null,id,item}),listUpdated(dispatch,state),success(createItemAPI(item))},server=state.options.server;item.origin===FileOrigin.LOCAL&&server&&isFunction(server.remove)&&!1!==options.remove?(dispatch("DID_START_ITEM_REMOVE",{id:item.id}),server.remove(item.source,(function(){return removeFromView()}),(function(status){dispatch("DID_THROW_ITEM_REMOVE_ERROR",{id:item.id,error:createResponse("error",0,status,null),status:{main:dynamicLabel(state.options.labelFileRemoveError)(status),sub:state.options.labelTapToRetry}})}))):((options.revert&&item.origin!==FileOrigin.LOCAL&&null!==item.serverId||state.options.chunkUploads&&item.file.size>state.options.chunkSize||state.options.chunkUploads&&state.options.chunkForce)&&item.revert(createRevertFunction(state.options.server.url,state.options.server.revert),query("GET_FORCE_REVERT")),removeFromView())})),ABORT_ITEM_LOAD:getItemByQueryFromState(state,(function(item){item.abortLoad()})),ABORT_ITEM_PROCESSING:getItemByQueryFromState(state,(function(item){item.serverId?dispatch("REVERT_ITEM_PROCESSING",{id:item.id}):item.abortProcessing().then((function(){state.options.instantUpload&&dispatch("REMOVE_ITEM",{query:item.id})}))})),REQUEST_REVERT_ITEM_PROCESSING:getItemByQueryFromState(state,(function(item){if(state.options.instantUpload){var handleRevert=function handleRevert(shouldRevert){shouldRevert&&dispatch("REVERT_ITEM_PROCESSING",{query:item})},fn=query("GET_BEFORE_REMOVE_FILE");if(!fn)return handleRevert(!0);var requestRemoveResult=fn(createItemAPI(item));return null==requestRemoveResult?handleRevert(!0):"boolean"==typeof requestRemoveResult?handleRevert(requestRemoveResult):void("function"==typeof requestRemoveResult.then&&requestRemoveResult.then(handleRevert))}dispatch("REVERT_ITEM_PROCESSING",{query:item})})),REVERT_ITEM_PROCESSING:getItemByQueryFromState(state,(function(item){item.revert(createRevertFunction(state.options.server.url,state.options.server.revert),query("GET_FORCE_REVERT")).then((function(){(state.options.instantUpload||isMockItem(item))&&dispatch("REMOVE_ITEM",{query:item.id})})).catch((function(){}))})),SET_OPTIONS:function SET_OPTIONS(_ref11){var options=_ref11.options,optionKeys=Object.keys(options),prioritizedOptionKeys=PrioritizedOptions.filter((function(key){return optionKeys.includes(key)}));[].concat(_toConsumableArray(prioritizedOptionKeys),_toConsumableArray(Object.keys(options).filter((function(key){return!prioritizedOptionKeys.includes(key)})))).forEach((function(key){dispatch("SET_"+fromCamels(key,"_").toUpperCase(),{value:options[key]})}))}}},PrioritizedOptions=["server"],formatFilename=function formatFilename(name){return name},createElement$1=function createElement(tagName){return document.createElement(tagName)},text=function text(node,value){var textNode=node.childNodes[0];textNode?value!==textNode.nodeValue&&(textNode.nodeValue=value):(textNode=document.createTextNode(value),node.appendChild(textNode))},polarToCartesian=function polarToCartesian(centerX,centerY,radius,angleInDegrees){var angleInRadians=(angleInDegrees%360-90)*Math.PI/180;return{x:centerX+radius*Math.cos(angleInRadians),y:centerY+radius*Math.sin(angleInRadians)}},describeArc=function describeArc(x,y,radius,startAngle,endAngle,arcSweep){var start=polarToCartesian(x,y,radius,endAngle),end=polarToCartesian(x,y,radius,startAngle);return["M",start.x,start.y,"A",radius,radius,0,arcSweep,0,end.x,end.y].join(" ")},percentageArc=function percentageArc(x,y,radius,from,to){var arcSweep=1;return to>from&&to-from<=.5&&(arcSweep=0),from>to&&from-to>=.5&&(arcSweep=0),describeArc(x,y,radius,360*Math.min(.9999,from),360*Math.min(.9999,to),arcSweep)},progressIndicator=createView({tag:"div",name:"progress-indicator",ignoreRectUpdate:!0,ignoreRect:!0,create:function create(_ref){var root=_ref.root,props=_ref.props;props.spin=!1,props.progress=0,props.opacity=0;var svg=createElement("svg");root.ref.path=createElement("path",{"stroke-width":2,"stroke-linecap":"round"}),svg.appendChild(root.ref.path),root.ref.svg=svg,root.appendChild(svg)},write:function write(_ref2){var root=_ref2.root,props=_ref2.props;if(0!==props.opacity){props.align&&(root.element.dataset.align=props.align);var ringStrokeWidth=parseInt(attr(root.ref.path,"stroke-width"),10),size=.5*root.rect.element.width,ringFrom=0,ringTo=0;props.spin?(ringFrom=0,ringTo=.5):(ringFrom=0,ringTo=props.progress);var coordinates=percentageArc(size,size,size-ringStrokeWidth,ringFrom,ringTo);attr(root.ref.path,"d",coordinates),attr(root.ref.path,"stroke-opacity",props.spin||props.progress>0?1:0)}},mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),fileActionButton=createView({tag:"button",attributes:{type:"button"},ignoreRect:!0,ignoreRectUpdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:function create(_ref){var root=_ref.root,props=_ref.props;root.element.innerHTML=(props.icon||"")+"<span>"+props.label+"</span>",props.isDisabled=!1},write:function write(_ref2){var root=_ref2.root,props=_ref2.props,isDisabled=props.isDisabled,shouldDisable=root.query("GET_DISABLED")||0===props.opacity;shouldDisable&&!isDisabled?(props.isDisabled=!0,attr(root.element,"disabled","disabled")):!shouldDisable&&isDisabled&&(props.isDisabled=!1,root.element.removeAttribute("disabled"))}}),toNaturalFileSize=function toNaturalFileSize(bytes){var decimalSeparator=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",base=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,options=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},_options$labelBytes=options.labelBytes,labelBytes=void 0===_options$labelBytes?"bytes":_options$labelBytes,_options$labelKilobyt=options.labelKilobytes,labelKilobytes=void 0===_options$labelKilobyt?"KB":_options$labelKilobyt,_options$labelMegabyt=options.labelMegabytes,labelMegabytes=void 0===_options$labelMegabyt?"MB":_options$labelMegabyt,_options$labelGigabyt=options.labelGigabytes,labelGigabytes=void 0===_options$labelGigabyt?"GB":_options$labelGigabyt,KB=base,MB=base*base,GB=base*base*base;return(bytes=Math.round(Math.abs(bytes)))<KB?bytes+" "+labelBytes:bytes<MB?Math.floor(bytes/KB)+" "+labelKilobytes:bytes<GB?removeDecimalsWhenZero(bytes/MB,1,decimalSeparator)+" "+labelMegabytes:removeDecimalsWhenZero(bytes/GB,2,decimalSeparator)+" "+labelGigabytes},removeDecimalsWhenZero=function removeDecimalsWhenZero(value,decimalCount,separator){return value.toFixed(decimalCount).split(".").filter((function(part){return"0"!==part})).join(separator)},create$2=function create(_ref){var root=_ref.root,props=_ref.props,fileName=createElement$1("span");fileName.className="filepond--file-info-main",attr(fileName,"aria-hidden","true"),root.appendChild(fileName),root.ref.fileName=fileName;var fileSize=createElement$1("span");fileSize.className="filepond--file-info-sub",root.appendChild(fileSize),root.ref.fileSize=fileSize,text(fileSize,root.query("GET_LABEL_FILE_WAITING_FOR_SIZE")),text(fileName,formatFilename(root.query("GET_ITEM_NAME",props.id)))},updateFile=function updateFile(_ref2){var root=_ref2.root,props=_ref2.props;text(root.ref.fileSize,toNaturalFileSize(root.query("GET_ITEM_SIZE",props.id),".",root.query("GET_FILE_SIZE_BASE"),root.query("GET_FILE_SIZE_LABELS",root.query))),text(root.ref.fileName,formatFilename(root.query("GET_ITEM_NAME",props.id)))},updateFileSizeOnError=function updateFileSizeOnError(_ref3){var root=_ref3.root,props=_ref3.props;isInt(root.query("GET_ITEM_SIZE",props.id))?updateFile({root,props}):text(root.ref.fileSize,root.query("GET_LABEL_FILE_SIZE_NOT_AVAILABLE"))},fileInfo=createView({name:"file-info",ignoreRect:!0,ignoreRectUpdate:!0,write:createRoute({DID_LOAD_ITEM:updateFile,DID_UPDATE_ITEM_META:updateFile,DID_THROW_ITEM_LOAD_ERROR:updateFileSizeOnError,DID_THROW_ITEM_INVALID:updateFileSizeOnError}),didCreateView:function didCreateView(root){applyFilters("CREATE_VIEW",Object.assign({},root,{view:root}))},create:create$2,mixins:{styles:["translateX","translateY"],animations:{translateX:"spring",translateY:"spring"}}}),toPercentage=function toPercentage(value){return Math.round(100*value)},create$3=function create(_ref){var root=_ref.root,main=createElement$1("span");main.className="filepond--file-status-main",root.appendChild(main),root.ref.main=main;var sub=createElement$1("span");sub.className="filepond--file-status-sub",root.appendChild(sub),root.ref.sub=sub,didSetItemLoadProgress({root,action:{progress:null}})},didSetItemLoadProgress=function didSetItemLoadProgress(_ref2){var root=_ref2.root,action=_ref2.action,title=null===action.progress?root.query("GET_LABEL_FILE_LOADING"):root.query("GET_LABEL_FILE_LOADING")+" "+toPercentage(action.progress)+"%";text(root.ref.main,title),text(root.ref.sub,root.query("GET_LABEL_TAP_TO_CANCEL"))},clear=function clear(_ref7){var root=_ref7.root;text(root.ref.main,""),text(root.ref.sub,"")},error=function error(_ref8){var root=_ref8.root,action=_ref8.action;text(root.ref.main,action.status.main),text(root.ref.sub,action.status.sub)},fileStatus=createView({name:"file-status",ignoreRect:!0,ignoreRectUpdate:!0,write:createRoute({DID_LOAD_ITEM:clear,DID_REVERT_ITEM_PROCESSING:clear,DID_REQUEST_ITEM_PROCESSING:function didRequestItemProcessing(_ref4){var root=_ref4.root;text(root.ref.main,root.query("GET_LABEL_FILE_PROCESSING")),text(root.ref.sub,root.query("GET_LABEL_TAP_TO_CANCEL"))},DID_ABORT_ITEM_PROCESSING:function didAbortItemProcessing(_ref5){var root=_ref5.root;text(root.ref.main,root.query("GET_LABEL_FILE_PROCESSING_ABORTED")),text(root.ref.sub,root.query("GET_LABEL_TAP_TO_RETRY"))},DID_COMPLETE_ITEM_PROCESSING:function didCompleteItemProcessing(_ref6){var root=_ref6.root;text(root.ref.main,root.query("GET_LABEL_FILE_PROCESSING_COMPLETE")),text(root.ref.sub,root.query("GET_LABEL_TAP_TO_UNDO"))},DID_UPDATE_ITEM_PROCESS_PROGRESS:function didSetItemProcessProgress(_ref3){var root=_ref3.root,action=_ref3.action,title=null===action.progress?root.query("GET_LABEL_FILE_PROCESSING"):root.query("GET_LABEL_FILE_PROCESSING")+" "+toPercentage(action.progress)+"%";text(root.ref.main,title),text(root.ref.sub,root.query("GET_LABEL_TAP_TO_CANCEL"))},DID_UPDATE_ITEM_LOAD_PROGRESS:didSetItemLoadProgress,DID_THROW_ITEM_LOAD_ERROR:error,DID_THROW_ITEM_INVALID:error,DID_THROW_ITEM_PROCESSING_ERROR:error,DID_THROW_ITEM_PROCESSING_REVERT_ERROR:error,DID_THROW_ITEM_REMOVE_ERROR:error}),didCreateView:function didCreateView(root){applyFilters("CREATE_VIEW",Object.assign({},root,{view:root}))},create:create$3,mixins:{styles:["translateX","translateY","opacity"],animations:{opacity:{type:"tween",duration:250},translateX:"spring",translateY:"spring"}}}),Buttons={AbortItemLoad:{label:"GET_LABEL_BUTTON_ABORT_ITEM_LOAD",action:"ABORT_ITEM_LOAD",className:"filepond--action-abort-item-load",align:"LOAD_INDICATOR_POSITION"},RetryItemLoad:{label:"GET_LABEL_BUTTON_RETRY_ITEM_LOAD",action:"RETRY_ITEM_LOAD",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-load",align:"BUTTON_PROCESS_ITEM_POSITION"},RemoveItem:{label:"GET_LABEL_BUTTON_REMOVE_ITEM",action:"REQUEST_REMOVE_ITEM",icon:"GET_ICON_REMOVE",className:"filepond--action-remove-item",align:"BUTTON_REMOVE_ITEM_POSITION"},ProcessItem:{label:"GET_LABEL_BUTTON_PROCESS_ITEM",action:"REQUEST_ITEM_PROCESSING",icon:"GET_ICON_PROCESS",className:"filepond--action-process-item",align:"BUTTON_PROCESS_ITEM_POSITION"},AbortItemProcessing:{label:"GET_LABEL_BUTTON_ABORT_ITEM_PROCESSING",action:"ABORT_ITEM_PROCESSING",className:"filepond--action-abort-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RetryItemProcessing:{label:"GET_LABEL_BUTTON_RETRY_ITEM_PROCESSING",action:"RETRY_ITEM_PROCESSING",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RevertItemProcessing:{label:"GET_LABEL_BUTTON_UNDO_ITEM_PROCESSING",action:"REQUEST_REVERT_ITEM_PROCESSING",icon:"GET_ICON_UNDO",className:"filepond--action-revert-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"}},ButtonKeys=[];forin(Buttons,(function(key){ButtonKeys.push(key)}));var isSupported,calculateFileInfoOffset=function calculateFileInfoOffset(root){if("right"===getRemoveIndicatorAligment(root))return 0;var buttonRect=root.ref.buttonRemoveItem.rect.element;return buttonRect.hidden?null:buttonRect.width+buttonRect.left},calculateButtonWidth=function calculateButtonWidth(root){return root.ref.buttonAbortItemLoad.rect.element.width},calculateFileVerticalCenterOffset=function calculateFileVerticalCenterOffset(root){return Math.floor(root.ref.buttonRemoveItem.rect.element.height/4)},calculateFileHorizontalCenterOffset=function calculateFileHorizontalCenterOffset(root){return Math.floor(root.ref.buttonRemoveItem.rect.element.left/2)},getRemoveIndicatorAligment=function getRemoveIndicatorAligment(root){return root.query("GET_STYLE_BUTTON_REMOVE_ITEM_POSITION")},DefaultStyle={buttonAbortItemLoad:{opacity:0},buttonRetryItemLoad:{opacity:0},buttonRemoveItem:{opacity:0},buttonProcessItem:{opacity:0},buttonAbortItemProcessing:{opacity:0},buttonRetryItemProcessing:{opacity:0},buttonRevertItemProcessing:{opacity:0},loadProgressIndicator:{opacity:0,align:function getLoadIndicatorAlignment(root){return root.query("GET_STYLE_LOAD_INDICATOR_POSITION")}},processProgressIndicator:{opacity:0,align:function getProcessIndicatorAlignment(root){return root.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}},processingCompleteIndicator:{opacity:0,scaleX:.75,scaleY:.75},info:{translateX:0,translateY:0,opacity:0},status:{translateX:0,translateY:0,opacity:0}},IdleStyle={buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:calculateFileInfoOffset},status:{translateX:calculateFileInfoOffset}},ProcessingStyle={buttonAbortItemProcessing:{opacity:1},processProgressIndicator:{opacity:1},status:{opacity:1}},StyleMap={DID_THROW_ITEM_INVALID:{buttonRemoveItem:{opacity:1},info:{translateX:calculateFileInfoOffset},status:{translateX:calculateFileInfoOffset,opacity:1}},DID_START_ITEM_LOAD:{buttonAbortItemLoad:{opacity:1},loadProgressIndicator:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_LOAD_ERROR:{buttonRetryItemLoad:{opacity:1},buttonRemoveItem:{opacity:1},info:{translateX:calculateFileInfoOffset},status:{opacity:1}},DID_START_ITEM_REMOVE:{processProgressIndicator:{opacity:1,align:getRemoveIndicatorAligment},info:{translateX:calculateFileInfoOffset},status:{opacity:0}},DID_THROW_ITEM_REMOVE_ERROR:{processProgressIndicator:{opacity:0,align:getRemoveIndicatorAligment},buttonRemoveItem:{opacity:1},info:{translateX:calculateFileInfoOffset},status:{opacity:1,translateX:calculateFileInfoOffset}},DID_LOAD_ITEM:IdleStyle,DID_LOAD_LOCAL_ITEM:{buttonRemoveItem:{opacity:1},info:{translateX:calculateFileInfoOffset},status:{translateX:calculateFileInfoOffset}},DID_START_ITEM_PROCESSING:ProcessingStyle,DID_REQUEST_ITEM_PROCESSING:ProcessingStyle,DID_UPDATE_ITEM_PROCESS_PROGRESS:ProcessingStyle,DID_COMPLETE_ITEM_PROCESSING:{buttonRevertItemProcessing:{opacity:1},info:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_PROCESSING_ERROR:{buttonRemoveItem:{opacity:1},buttonRetryItemProcessing:{opacity:1},status:{opacity:1},info:{translateX:calculateFileInfoOffset}},DID_THROW_ITEM_PROCESSING_REVERT_ERROR:{buttonRevertItemProcessing:{opacity:1},status:{opacity:1},info:{opacity:1}},DID_ABORT_ITEM_PROCESSING:{buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:calculateFileInfoOffset},status:{opacity:1}},DID_REVERT_ITEM_PROCESSING:IdleStyle},processingCompleteIndicatorView=createView({create:function create(_ref){var root=_ref.root;root.element.innerHTML=root.query("GET_ICON_DONE")},name:"processing-complete-indicator",ignoreRect:!0,mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",opacity:{type:"tween",duration:250}}}}),create$4=function create(_ref2){var buttonFilter,root=_ref2.root,props=_ref2.props,LocalButtons=Object.keys(Buttons).reduce((function(prev,curr){return prev[curr]=Object.assign({},Buttons[curr]),prev}),{}),id=props.id,allowRevert=root.query("GET_ALLOW_REVERT"),allowRemove=root.query("GET_ALLOW_REMOVE"),allowProcess=root.query("GET_ALLOW_PROCESS"),instantUpload=root.query("GET_INSTANT_UPLOAD"),isAsync=root.query("IS_ASYNC"),alignRemoveItemButton=root.query("GET_STYLE_BUTTON_REMOVE_ITEM_ALIGN");isAsync?allowProcess&&!allowRevert?buttonFilter=function buttonFilter(key){return!/RevertItemProcessing/.test(key)}:!allowProcess&&allowRevert?buttonFilter=function buttonFilter(key){return!/ProcessItem|RetryItemProcessing|AbortItemProcessing/.test(key)}:allowProcess||allowRevert||(buttonFilter=function buttonFilter(key){return!/Process/.test(key)}):buttonFilter=function buttonFilter(key){return!/Process/.test(key)};var enabledButtons=buttonFilter?ButtonKeys.filter(buttonFilter):ButtonKeys.concat();if(instantUpload&&allowRevert&&(LocalButtons.RevertItemProcessing.label="GET_LABEL_BUTTON_REMOVE_ITEM",LocalButtons.RevertItemProcessing.icon="GET_ICON_REMOVE"),isAsync&&!allowRevert){var map=StyleMap.DID_COMPLETE_ITEM_PROCESSING;map.info.translateX=calculateFileHorizontalCenterOffset,map.info.translateY=calculateFileVerticalCenterOffset,map.status.translateY=calculateFileVerticalCenterOffset,map.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}if(isAsync&&!allowProcess&&(["DID_START_ITEM_PROCESSING","DID_REQUEST_ITEM_PROCESSING","DID_UPDATE_ITEM_PROCESS_PROGRESS","DID_THROW_ITEM_PROCESSING_ERROR"].forEach((function(key){StyleMap[key].status.translateY=calculateFileVerticalCenterOffset})),StyleMap.DID_THROW_ITEM_PROCESSING_ERROR.status.translateX=calculateButtonWidth),alignRemoveItemButton&&allowRevert){LocalButtons.RevertItemProcessing.align="BUTTON_REMOVE_ITEM_POSITION";var _map=StyleMap.DID_COMPLETE_ITEM_PROCESSING;_map.info.translateX=calculateFileInfoOffset,_map.status.translateY=calculateFileVerticalCenterOffset,_map.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}allowRemove||(LocalButtons.RemoveItem.disabled=!0),forin(LocalButtons,(function(key,definition){var buttonView=root.createChildView(fileActionButton,{label:root.query(definition.label),icon:root.query(definition.icon),opacity:0});enabledButtons.includes(key)&&root.appendChildView(buttonView),definition.disabled&&(buttonView.element.setAttribute("disabled","disabled"),buttonView.element.setAttribute("hidden","hidden")),buttonView.element.dataset.align=root.query("GET_STYLE_"+definition.align),buttonView.element.classList.add(definition.className),buttonView.on("click",(function(e){e.stopPropagation(),definition.disabled||root.dispatch(definition.action,{query:id})})),root.ref["button"+key]=buttonView})),root.ref.processingCompleteIndicator=root.appendChildView(root.createChildView(processingCompleteIndicatorView)),root.ref.processingCompleteIndicator.element.dataset.align=root.query("GET_STYLE_BUTTON_PROCESS_ITEM_POSITION"),root.ref.info=root.appendChildView(root.createChildView(fileInfo,{id})),root.ref.status=root.appendChildView(root.createChildView(fileStatus,{id}));var loadIndicatorView=root.appendChildView(root.createChildView(progressIndicator,{opacity:0,align:root.query("GET_STYLE_LOAD_INDICATOR_POSITION")}));loadIndicatorView.element.classList.add("filepond--load-indicator"),root.ref.loadProgressIndicator=loadIndicatorView;var progressIndicatorView=root.appendChildView(root.createChildView(progressIndicator,{opacity:0,align:root.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}));progressIndicatorView.element.classList.add("filepond--process-indicator"),root.ref.processProgressIndicator=progressIndicatorView,root.ref.activeStyles=[]},write$2=function write(_ref3){var root=_ref3.root,actions=_ref3.actions,props=_ref3.props;route({root,actions,props});var action=actions.concat().filter((function(action){return/^DID_/.test(action.type)})).reverse().find((function(action){return StyleMap[action.type]}));if(action){root.ref.activeStyles=[];var stylesToApply=StyleMap[action.type];forin(DefaultStyle,(function(name,defaultStyles){var control=root.ref[name];forin(defaultStyles,(function(key,defaultValue){var value=stylesToApply[name]&&void 0!==stylesToApply[name][key]?stylesToApply[name][key]:defaultValue;root.ref.activeStyles.push({control,key,value})}))}))}root.ref.activeStyles.forEach((function(_ref4){var control=_ref4.control,key=_ref4.key,value=_ref4.value;control[key]="function"==typeof value?value(root):value}))},route=createRoute({DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING:function DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING(_ref5){var root=_ref5.root,action=_ref5.action;root.ref.buttonAbortItemProcessing.label=action.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD:function DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD(_ref6){var root=_ref6.root,action=_ref6.action;root.ref.buttonAbortItemLoad.label=action.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL:function DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL(_ref7){var root=_ref7.root,action=_ref7.action;root.ref.buttonAbortItemRemoval.label=action.value},DID_REQUEST_ITEM_PROCESSING:function DID_REQUEST_ITEM_PROCESSING(_ref8){var root=_ref8.root;root.ref.processProgressIndicator.spin=!0,root.ref.processProgressIndicator.progress=0},DID_START_ITEM_LOAD:function DID_START_ITEM_LOAD(_ref9){var root=_ref9.root;root.ref.loadProgressIndicator.spin=!0,root.ref.loadProgressIndicator.progress=0},DID_START_ITEM_REMOVE:function DID_START_ITEM_REMOVE(_ref10){var root=_ref10.root;root.ref.processProgressIndicator.spin=!0,root.ref.processProgressIndicator.progress=0},DID_UPDATE_ITEM_LOAD_PROGRESS:function DID_UPDATE_ITEM_LOAD_PROGRESS(_ref11){var root=_ref11.root,action=_ref11.action;root.ref.loadProgressIndicator.spin=!1,root.ref.loadProgressIndicator.progress=action.progress},DID_UPDATE_ITEM_PROCESS_PROGRESS:function DID_UPDATE_ITEM_PROCESS_PROGRESS(_ref12){var root=_ref12.root,action=_ref12.action;root.ref.processProgressIndicator.spin=!1,root.ref.processProgressIndicator.progress=action.progress}}),file=createView({create:create$4,write:write$2,didCreateView:function didCreateView(root){applyFilters("CREATE_VIEW",Object.assign({},root,{view:root}))},name:"file"}),fileWrapper=createView({create:function create(_ref){var root=_ref.root,props=_ref.props;root.ref.fileName=createElement$1("legend"),root.appendChild(root.ref.fileName),root.ref.file=root.appendChildView(root.createChildView(file,{id:props.id})),root.ref.data=!1},ignoreRect:!0,write:createRoute({DID_LOAD_ITEM:function didLoadItem(_ref2){var root=_ref2.root,props=_ref2.props;text(root.ref.fileName,formatFilename(root.query("GET_ITEM_NAME",props.id)))}}),didCreateView:function didCreateView(root){applyFilters("CREATE_VIEW",Object.assign({},root,{view:root}))},tag:"fieldset",name:"file-wrapper"}),PANEL_SPRING_PROPS={type:"spring",damping:.6,mass:7},create$6=function create(_ref){var root=_ref.root,props=_ref.props;[{name:"top"},{name:"center",props:{translateY:null,scaleY:null},mixins:{animations:{scaleY:PANEL_SPRING_PROPS},styles:["translateY","scaleY"]}},{name:"bottom",props:{translateY:null},mixins:{animations:{translateY:PANEL_SPRING_PROPS},styles:["translateY"]}}].forEach((function(section){createSection(root,section,props.name)})),root.element.classList.add("filepond--"+props.name),root.ref.scalable=null},createSection=function createSection(root,section,className){var viewConstructor=createView({name:"panel-"+section.name+" filepond--"+className,mixins:section.mixins,ignoreRectUpdate:!0}),view=root.createChildView(viewConstructor,section.props);root.ref[section.name]=root.appendChildView(view)},panel=createView({name:"panel",read:function read(_ref3){var root=_ref3.root;return _ref3.props.heightCurrent=root.ref.bottom.translateY},write:function write(_ref2){var root=_ref2.root,props=_ref2.props;if(null!==root.ref.scalable&&props.scalable===root.ref.scalable||(root.ref.scalable=!isBoolean(props.scalable)||props.scalable,root.element.dataset.scalable=root.ref.scalable),props.height){var topRect=root.ref.top.rect.element,bottomRect=root.ref.bottom.rect.element,height=Math.max(topRect.height+bottomRect.height,props.height);root.ref.center.translateY=topRect.height,root.ref.center.scaleY=(height-topRect.height-bottomRect.height)/100,root.ref.bottom.translateY=height-bottomRect.height}},create:create$6,ignoreRect:!0,mixins:{apis:["height","heightCurrent","scalable"]}}),createDragHelper=function createDragHelper(items){var itemIds=items.map((function(item){return item.id})),prevIndex=void 0;return{setIndex:function setIndex(index){prevIndex=index},getIndex:function getIndex(){return prevIndex},getItemIndex:function getItemIndex(item){return itemIds.indexOf(item.id)}}},ITEM_TRANSLATE_SPRING={type:"spring",stiffness:.75,damping:.45,mass:10},ITEM_SCALE_SPRING="spring",StateMap={DID_START_ITEM_LOAD:"busy",DID_UPDATE_ITEM_LOAD_PROGRESS:"loading",DID_THROW_ITEM_INVALID:"load-invalid",DID_THROW_ITEM_LOAD_ERROR:"load-error",DID_LOAD_ITEM:"idle",DID_THROW_ITEM_REMOVE_ERROR:"remove-error",DID_START_ITEM_REMOVE:"busy",DID_START_ITEM_PROCESSING:"busy processing",DID_REQUEST_ITEM_PROCESSING:"busy processing",DID_UPDATE_ITEM_PROCESS_PROGRESS:"processing",DID_COMPLETE_ITEM_PROCESSING:"processing-complete",DID_THROW_ITEM_PROCESSING_ERROR:"processing-error",DID_THROW_ITEM_PROCESSING_REVERT_ERROR:"processing-revert-error",DID_ABORT_ITEM_PROCESSING:"cancelled",DID_REVERT_ITEM_PROCESSING:"idle"},create$7=function create(_ref){var root=_ref.root,props=_ref.props;if(root.ref.handleClick=function(e){return root.dispatch("DID_ACTIVATE_ITEM",{id:props.id})},root.element.id="filepond--item-"+props.id,root.element.addEventListener("click",root.ref.handleClick),root.ref.container=root.appendChildView(root.createChildView(fileWrapper,{id:props.id})),root.ref.panel=root.appendChildView(root.createChildView(panel,{name:"item-panel"})),root.ref.panel.height=null,props.markedForRemoval=!1,root.query("GET_ALLOW_REORDER")){root.element.dataset.dragState="idle";var grab=function grab(e){if(e.isPrimary){var removedActivateListener=!1,origin={x:e.pageX,y:e.pageY};props.dragOrigin={x:root.translateX,y:root.translateY},props.dragCenter={x:e.offsetX,y:e.offsetY};var dragState=createDragHelper(root.query("GET_ACTIVE_ITEMS"));root.dispatch("DID_GRAB_ITEM",{id:props.id,dragState});var drag=function drag(e){e.isPrimary&&(e.stopPropagation(),e.preventDefault(),props.dragOffset={x:e.pageX-origin.x,y:e.pageY-origin.y},props.dragOffset.x*props.dragOffset.x+props.dragOffset.y*props.dragOffset.y>16&&!removedActivateListener&&(removedActivateListener=!0,root.element.removeEventListener("click",root.ref.handleClick)),root.dispatch("DID_DRAG_ITEM",{id:props.id,dragState}))},drop=function drop(e){e.isPrimary&&(document.removeEventListener("pointermove",drag),document.removeEventListener("pointerup",drop),props.dragOffset={x:e.pageX-origin.x,y:e.pageY-origin.y},root.dispatch("DID_DROP_ITEM",{id:props.id,dragState}),removedActivateListener&&setTimeout((function(){return root.element.addEventListener("click",root.ref.handleClick)}),0))};document.addEventListener("pointermove",drag),document.addEventListener("pointerup",drop)}};root.element.addEventListener("pointerdown",grab)}},route$1=createRoute({DID_UPDATE_PANEL_HEIGHT:function DID_UPDATE_PANEL_HEIGHT(_ref2){var root=_ref2.root,action=_ref2.action;root.height=action.height}}),write$4=createRoute({DID_GRAB_ITEM:function DID_GRAB_ITEM(_ref3){var root=_ref3.root;_ref3.props.dragOrigin={x:root.translateX,y:root.translateY}},DID_DRAG_ITEM:function DID_DRAG_ITEM(_ref4){_ref4.root.element.dataset.dragState="drag"},DID_DROP_ITEM:function DID_DROP_ITEM(_ref5){var root=_ref5.root,props=_ref5.props;props.dragOffset=null,props.dragOrigin=null,root.element.dataset.dragState="drop"}},(function(_ref6){var root=_ref6.root,actions=_ref6.actions,props=_ref6.props,shouldOptimize=_ref6.shouldOptimize;"drop"===root.element.dataset.dragState&&root.scaleX<=1&&(root.element.dataset.dragState="idle");var action=actions.concat().filter((function(action){return/^DID_/.test(action.type)})).reverse().find((function(action){return StateMap[action.type]}));action&&action.type!==props.currentState&&(props.currentState=action.type,root.element.dataset.filepondItemState=StateMap[props.currentState]||"");var aspectRatio=root.query("GET_ITEM_PANEL_ASPECT_RATIO")||root.query("GET_PANEL_ASPECT_RATIO");aspectRatio?shouldOptimize||(root.height=root.rect.element.width*aspectRatio):(route$1({root,actions,props}),!root.height&&root.ref.container.rect.element.height>0&&(root.height=root.ref.container.rect.element.height)),shouldOptimize&&(root.ref.panel.height=null),root.ref.panel.height=root.height})),item=createView({create:create$7,write:write$4,destroy:function destroy(_ref7){var root=_ref7.root,props=_ref7.props;root.element.removeEventListener("click",root.ref.handleClick),root.dispatch("RELEASE_ITEM",{query:props.id})},tag:"li",name:"item",mixins:{apis:["id","interactionMethod","markedForRemoval","spawnDate","dragCenter","dragOrigin","dragOffset"],styles:["translateX","translateY","scaleX","scaleY","opacity","height"],animations:{scaleX:ITEM_SCALE_SPRING,scaleY:ITEM_SCALE_SPRING,translateX:ITEM_TRANSLATE_SPRING,translateY:ITEM_TRANSLATE_SPRING,opacity:{type:"tween",duration:150}}}}),getItemsPerRow=function(horizontalSpace,itemWidth){return Math.max(1,Math.floor((horizontalSpace+1)/itemWidth))},getItemIndexByPosition=function getItemIndexByPosition(view,children,positionInView){if(positionInView){var horizontalSpace=view.rect.element.width,l=children.length,last=null;if(0===l||positionInView.top<children[0].rect.element.top)return-1;var itemRect=children[0].rect.element,itemHorizontalMargin=itemRect.marginLeft+itemRect.marginRight,itemWidth=itemRect.width+itemHorizontalMargin,itemsPerRow=getItemsPerRow(horizontalSpace,itemWidth);if(1===itemsPerRow){for(var index=0;index<l;index++){var child=children[index],childMid=child.rect.outer.top+.5*child.rect.element.height;if(positionInView.top<childMid)return index}return l}for(var itemVerticalMargin=itemRect.marginTop+itemRect.marginBottom,itemHeight=itemRect.height+itemVerticalMargin,_index=0;_index<l;_index++){var offsetX=_index%itemsPerRow*itemWidth,offsetY=Math.floor(_index/itemsPerRow)*itemHeight,itemTop=offsetY-itemRect.marginTop,itemRight=offsetX+itemWidth,itemBottom=offsetY+itemHeight+itemRect.marginBottom;if(positionInView.top<itemBottom&&positionInView.top>itemTop){if(positionInView.left<itemRight)return _index;last=_index!==l-1?_index:null}}return null!==last?last:l}},dropAreaDimensions={height:0,width:0,get getHeight(){return this.height},set setHeight(val){0!==this.height&&0!==val||(this.height=val)},get getWidth(){return this.width},set setWidth(val){0!==this.width&&0!==val||(this.width=val)},setDimensions:function setDimensions(height,width){0!==this.height&&0!==height||(this.height=height),0!==this.width&&0!==width||(this.width=width)}},create$8=function create(_ref){var root=_ref.root;attr(root.element,"role","list"),root.ref.lastItemSpanwDate=Date.now()},moveItem=function moveItem(item,x,y){var vx=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,vy=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;item.dragOffset?(item.translateX=null,item.translateY=null,item.translateX=item.dragOrigin.x+item.dragOffset.x,item.translateY=item.dragOrigin.y+item.dragOffset.y,item.scaleX=1.025,item.scaleY=1.025):(item.translateX=x,item.translateY=y,Date.now()>item.spawnDate&&(0===item.opacity&&introItemView(item,x,y,vx,vy),item.scaleX=1,item.scaleY=1,item.opacity=1))},introItemView=function introItemView(item,x,y,vx,vy){item.interactionMethod===InteractionMethod.NONE?(item.translateX=null,item.translateX=x,item.translateY=null,item.translateY=y):item.interactionMethod===InteractionMethod.DROP?(item.translateX=null,item.translateX=x-20*vx,item.translateY=null,item.translateY=y-10*vy,item.scaleX=.8,item.scaleY=.8):item.interactionMethod===InteractionMethod.BROWSE?(item.translateY=null,item.translateY=y-30):item.interactionMethod===InteractionMethod.API&&(item.translateX=null,item.translateX=x-30,item.translateY=null)},getItemHeight=function getItemHeight(child){return child.rect.element.height+.5*child.rect.element.marginBottom+.5*child.rect.element.marginTop},getItemWidth=function getItemWidth(child){return child.rect.element.width+.5*child.rect.element.marginLeft+.5*child.rect.element.marginRight},route$2=createRoute({DID_ADD_ITEM:function addItemView(_ref2){var root=_ref2.root,action=_ref2.action,id=action.id,index=action.index,interactionMethod=action.interactionMethod;root.ref.addIndex=index;var now=Date.now(),spawnDate=now,opacity=1;if(interactionMethod!==InteractionMethod.NONE){opacity=0;var cooldown=root.query("GET_ITEM_INSERT_INTERVAL"),dist=now-root.ref.lastItemSpanwDate;spawnDate=dist<cooldown?now+(cooldown-dist):now}root.ref.lastItemSpanwDate=spawnDate,root.appendChildView(root.createChildView(item,{spawnDate,id,opacity,interactionMethod}),index)},DID_REMOVE_ITEM:function removeItemView(_ref3){var root=_ref3.root,id=_ref3.action.id,view=root.childViews.find((function(child){return child.id===id}));view&&(view.scaleX=.9,view.scaleY=.9,view.opacity=0,view.markedForRemoval=!0)},DID_DRAG_ITEM:function dragItem(_ref4){var root=_ref4.root,action=_ref4.action,id=action.id,dragState=action.dragState,item=root.query("GET_ITEM",{id}),view=root.childViews.find((function(child){return child.id===id})),numItems=root.childViews.length,oldIndex=dragState.getItemIndex(item);if(view){var dragPosition={x:view.dragOrigin.x+view.dragOffset.x+view.dragCenter.x,y:view.dragOrigin.y+view.dragOffset.y+view.dragCenter.y},dragHeight=getItemHeight(view),dragWidth=getItemWidth(view),cols=Math.floor(root.rect.outer.width/dragWidth);cols>numItems&&(cols=numItems);var rows=Math.floor(numItems/cols+1);dropAreaDimensions.setHeight=dragHeight*rows,dropAreaDimensions.setWidth=dragWidth*cols;var location={y:Math.floor(dragPosition.y/dragHeight),x:Math.floor(dragPosition.x/dragWidth),getGridIndex:function getGridIndex(){return dragPosition.y>dropAreaDimensions.getHeight||dragPosition.y<0||dragPosition.x>dropAreaDimensions.getWidth||dragPosition.x<0?oldIndex:this.y*cols+this.x},getColIndex:function getColIndex(){for(var items=root.query("GET_ACTIVE_ITEMS"),visibleChildren=root.childViews.filter((function(child){return child.rect.element.height})),children=items.map((function(item){return visibleChildren.find((function(childView){return childView.id===item.id}))})),currentIndex=children.findIndex((function(child){return child===view})),dragHeight=getItemHeight(view),l=children.length,idx=l,childBottom=0,childTop=0,i=0;i<l;i++)if(childBottom=(childTop=childBottom)+getItemHeight(children[i]),dragPosition.y<childBottom){if(currentIndex>i){if(dragPosition.y<childTop+dragHeight){idx=i;break}continue}idx=i;break}return idx}},index=cols>1?location.getGridIndex():location.getColIndex();root.dispatch("MOVE_ITEM",{query:view,index});var currentIndex=dragState.getIndex();if(void 0===currentIndex||currentIndex!==index){if(dragState.setIndex(index),void 0===currentIndex)return;root.dispatch("DID_REORDER_ITEMS",{items:root.query("GET_ACTIVE_ITEMS"),origin:oldIndex,target:index})}}}}),list=createView({create:create$8,write:function write(_ref5){var root=_ref5.root,props=_ref5.props,actions=_ref5.actions,shouldOptimize=_ref5.shouldOptimize;route$2({root,props,actions});var dragCoordinates=props.dragCoordinates,horizontalSpace=root.rect.element.width,visibleChildren=root.childViews.filter((function(child){return child.rect.element.height})),children=root.query("GET_ACTIVE_ITEMS").map((function(item){return visibleChildren.find((function(child){return child.id===item.id}))})).filter((function(item){return item})),dragIndex=dragCoordinates?getItemIndexByPosition(root,children,dragCoordinates):null,addIndex=root.ref.addIndex||null;root.ref.addIndex=null;var dragIndexOffset=0,removeIndexOffset=0,addIndexOffset=0;if(0!==children.length){var childRect=children[0].rect.element,itemVerticalMargin=childRect.marginTop+childRect.marginBottom,itemHorizontalMargin=childRect.marginLeft+childRect.marginRight,itemWidth=childRect.width+itemHorizontalMargin,itemHeight=childRect.height+itemVerticalMargin,itemsPerRow=getItemsPerRow(horizontalSpace,itemWidth);if(1===itemsPerRow){var offsetY=0,dragOffset=0;children.forEach((function(child,index){if(dragIndex){var dist=index-dragIndex;dragOffset=-2===dist?.25*-itemVerticalMargin:-1===dist?.75*-itemVerticalMargin:0===dist?.75*itemVerticalMargin:1===dist?.25*itemVerticalMargin:0}shouldOptimize&&(child.translateX=null,child.translateY=null),child.markedForRemoval||moveItem(child,0,offsetY+dragOffset);var visualHeight=(child.rect.element.height+itemVerticalMargin)*(child.markedForRemoval?child.opacity:1);offsetY+=visualHeight}))}else{var prevX=0,prevY=0;children.forEach((function(child,index){index===dragIndex&&(dragIndexOffset=1),index===addIndex&&(addIndexOffset+=1),child.markedForRemoval&&child.opacity<.5&&(removeIndexOffset-=1);var visualIndex=index+addIndexOffset+dragIndexOffset+removeIndexOffset,indexX=visualIndex%itemsPerRow,indexY=Math.floor(visualIndex/itemsPerRow),offsetX=indexX*itemWidth,offsetY=indexY*itemHeight,vectorX=Math.sign(offsetX-prevX),vectorY=Math.sign(offsetY-prevY);prevX=offsetX,prevY=offsetY,child.markedForRemoval||(shouldOptimize&&(child.translateX=null,child.translateY=null),moveItem(child,offsetX,offsetY,vectorX,vectorY))}))}}},tag:"ul",name:"list",didWriteView:function didWriteView(_ref6){var root=_ref6.root;root.childViews.filter((function(view){return view.markedForRemoval&&0===view.opacity&&view.resting})).forEach((function(view){view._destroy(),root.removeChildView(view)}))},filterFrameActionsForChild:function filterSetItemActions(child,actions){return actions.filter((function(action){return!action.data||!action.data.id||child.id===action.data.id}))},mixins:{apis:["dragCoordinates"]}}),create$9=function create(_ref){var root=_ref.root,props=_ref.props;root.ref.list=root.appendChildView(root.createChildView(list)),props.dragCoordinates=null,props.overflowing=!1},route$3=createRoute({DID_DRAG:function storeDragCoordinates(_ref2){var root=_ref2.root,props=_ref2.props,action=_ref2.action;root.query("GET_ITEM_INSERT_LOCATION_FREEDOM")&&(props.dragCoordinates={left:action.position.scopeLeft-root.ref.list.rect.element.left,top:action.position.scopeTop-(root.rect.outer.top+root.rect.element.marginTop+root.rect.element.scrollTop)})},DID_END_DRAG:function clearDragCoordinates(_ref3){_ref3.props.dragCoordinates=null}}),listScroller=createView({create:create$9,write:function write(_ref4){var root=_ref4.root,props=_ref4.props,actions=_ref4.actions;if(route$3({root,props,actions}),root.ref.list.dragCoordinates=props.dragCoordinates,props.overflowing&&!props.overflow&&(props.overflowing=!1,root.element.dataset.state="",root.height=null),props.overflow){var newHeight=Math.round(props.overflow);newHeight!==root.height&&(props.overflowing=!0,root.element.dataset.state="overflow",root.height=newHeight)}},name:"list-scroller",mixins:{apis:["overflow","dragCoordinates"],styles:["height","translateY"],animations:{translateY:"spring"}}}),attrToggle=function attrToggle(element,name,state){state?attr(element,name,arguments.length>3&&void 0!==arguments[3]?arguments[3]:""):element.removeAttribute(name)},resetFileInput=function resetFileInput(input){if(input&&""!==input.value){try{input.value=""}catch(err){}if(input.value){var form=createElement$1("form"),parentNode=input.parentNode,ref=input.nextSibling;form.appendChild(input),form.reset(),ref?parentNode.insertBefore(input,ref):parentNode.appendChild(input)}}},create$a=function create(_ref){var root=_ref.root,props=_ref.props;root.element.id="filepond--browser-"+props.id,attr(root.element,"name",root.query("GET_NAME")),attr(root.element,"aria-controls","filepond--assistant-"+props.id),attr(root.element,"aria-labelledby","filepond--drop-label-"+props.id),setAcceptedFileTypes({root,action:{value:root.query("GET_ACCEPTED_FILE_TYPES")}}),toggleAllowMultiple({root,action:{value:root.query("GET_ALLOW_MULTIPLE")}}),toggleDirectoryFilter({root,action:{value:root.query("GET_ALLOW_DIRECTORIES_ONLY")}}),toggleDisabled({root}),toggleRequired({root,action:{value:root.query("GET_REQUIRED")}}),setCaptureMethod({root,action:{value:root.query("GET_CAPTURE_METHOD")}}),root.ref.handleChange=function(e){if(root.element.value){var files=Array.from(root.element.files).map((function(file){return file._relativePath=file.webkitRelativePath,file}));setTimeout((function(){props.onload(files),resetFileInput(root.element)}),250)}},root.element.addEventListener("change",root.ref.handleChange)},setAcceptedFileTypes=function setAcceptedFileTypes(_ref2){var root=_ref2.root,action=_ref2.action;root.query("GET_ALLOW_SYNC_ACCEPT_ATTRIBUTE")&&attrToggle(root.element,"accept",!!action.value,action.value?action.value.join(","):"")},toggleAllowMultiple=function toggleAllowMultiple(_ref3){var root=_ref3.root,action=_ref3.action;attrToggle(root.element,"multiple",action.value)},toggleDirectoryFilter=function toggleDirectoryFilter(_ref4){var root=_ref4.root,action=_ref4.action;attrToggle(root.element,"webkitdirectory",action.value)},toggleDisabled=function toggleDisabled(_ref5){var root=_ref5.root,isDisabled=root.query("GET_DISABLED"),doesAllowBrowse=root.query("GET_ALLOW_BROWSE"),disableField=isDisabled||!doesAllowBrowse;attrToggle(root.element,"disabled",disableField)},toggleRequired=function toggleRequired(_ref6){var root=_ref6.root;_ref6.action.value?0===root.query("GET_TOTAL_ITEMS")&&attrToggle(root.element,"required",!0):attrToggle(root.element,"required",!1)},setCaptureMethod=function setCaptureMethod(_ref7){var root=_ref7.root,action=_ref7.action;attrToggle(root.element,"capture",!!action.value,!0===action.value?"":action.value)},updateRequiredStatus=function updateRequiredStatus(_ref8){var root=_ref8.root,element=root.element;root.query("GET_TOTAL_ITEMS")>0?(attrToggle(element,"required",!1),attrToggle(element,"name",!1)):(attrToggle(element,"name",!0,root.query("GET_NAME")),root.query("GET_CHECK_VALIDITY")&&element.setCustomValidity(""),root.query("GET_REQUIRED")&&attrToggle(element,"required",!0))},browser=createView({tag:"input",name:"browser",ignoreRect:!0,ignoreRectUpdate:!0,attributes:{type:"file"},create:create$a,destroy:function destroy(_ref10){var root=_ref10.root;root.element.removeEventListener("change",root.ref.handleChange)},write:createRoute({DID_LOAD_ITEM:updateRequiredStatus,DID_REMOVE_ITEM:updateRequiredStatus,DID_THROW_ITEM_INVALID:function updateFieldValidityStatus(_ref9){var root=_ref9.root;root.query("GET_CHECK_VALIDITY")&&root.element.setCustomValidity(root.query("GET_LABEL_INVALID_FIELD"))},DID_SET_DISABLED:toggleDisabled,DID_SET_ALLOW_BROWSE:toggleDisabled,DID_SET_ALLOW_DIRECTORIES_ONLY:toggleDirectoryFilter,DID_SET_ALLOW_MULTIPLE:toggleAllowMultiple,DID_SET_ACCEPTED_FILE_TYPES:setAcceptedFileTypes,DID_SET_CAPTURE_METHOD:setCaptureMethod,DID_SET_REQUIRED:toggleRequired})}),Key={ENTER:13,SPACE:32},create$b=function create(_ref){var root=_ref.root,props=_ref.props,label=createElement$1("label");attr(label,"for","filepond--browser-"+props.id),attr(label,"id","filepond--drop-label-"+props.id),attr(label,"aria-hidden","true"),root.ref.handleKeyDown=function(e){(e.keyCode===Key.ENTER||e.keyCode===Key.SPACE)&&(e.preventDefault(),root.ref.label.click())},root.ref.handleClick=function(e){e.target===label||label.contains(e.target)||root.ref.label.click()},label.addEventListener("keydown",root.ref.handleKeyDown),root.element.addEventListener("click",root.ref.handleClick),updateLabelValue(label,props.caption),root.appendChild(label),root.ref.label=label},updateLabelValue=function updateLabelValue(label,value){label.innerHTML=value;var clickable=label.querySelector(".filepond--label-action");return clickable&&attr(clickable,"tabindex","0"),value},dropLabel=createView({name:"drop-label",ignoreRect:!0,create:create$b,destroy:function destroy(_ref2){var root=_ref2.root;root.ref.label.addEventListener("keydown",root.ref.handleKeyDown),root.element.removeEventListener("click",root.ref.handleClick)},write:createRoute({DID_SET_LABEL_IDLE:function DID_SET_LABEL_IDLE(_ref3){var root=_ref3.root,action=_ref3.action;updateLabelValue(root.ref.label,action.value)}}),mixins:{styles:["opacity","translateX","translateY"],animations:{opacity:{type:"tween",duration:150},translateX:"spring",translateY:"spring"}}}),blob=createView({name:"drip-blob",ignoreRect:!0,mixins:{styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}}}}),addBlob=function addBlob(_ref){var root=_ref.root,centerX=.5*root.rect.element.width,centerY=.5*root.rect.element.height;root.ref.blob=root.appendChildView(root.createChildView(blob,{opacity:0,scaleX:2.5,scaleY:2.5,translateX:centerX,translateY:centerY}))},write$7=function write(_ref5){var root=_ref5.root,props=_ref5.props,actions=_ref5.actions;route$4({root,props,actions});var blob=root.ref.blob;0===actions.length&&blob&&0===blob.opacity&&(root.removeChildView(blob),root.ref.blob=null)},route$4=createRoute({DID_DRAG:function moveBlob(_ref2){var root=_ref2.root,action=_ref2.action;root.ref.blob?(root.ref.blob.translateX=action.position.scopeLeft,root.ref.blob.translateY=action.position.scopeTop,root.ref.blob.scaleX=1,root.ref.blob.scaleY=1,root.ref.blob.opacity=1):addBlob({root})},DID_DROP:function explodeBlob(_ref4){var root=_ref4.root;root.ref.blob&&(root.ref.blob.scaleX=2.5,root.ref.blob.scaleY=2.5,root.ref.blob.opacity=0)},DID_END_DRAG:function hideBlob(_ref3){var root=_ref3.root;root.ref.blob&&(root.ref.blob.opacity=0)}}),drip=createView({ignoreRect:!0,ignoreRectUpdate:!0,name:"drip",write:write$7}),setInputFiles=function setInputFiles(element,files){try{var dataTransfer=new DataTransfer;files.forEach((function(file){file instanceof File?dataTransfer.items.add(file):dataTransfer.items.add(new File([file],file.name,{type:file.type}))})),element.files=dataTransfer.files}catch(err){return!1}return!0},create$c=function create(_ref){return _ref.root.ref.fields={}},getField=function getField(root,id){return root.ref.fields[id]},syncFieldPositionsWithItems=function syncFieldPositionsWithItems(root){root.query("GET_ACTIVE_ITEMS").forEach((function(item){root.ref.fields[item.id]&&root.element.appendChild(root.ref.fields[item.id])}))},didReorderItems=function didReorderItems(_ref2){var root=_ref2.root;return syncFieldPositionsWithItems(root)},write$8=createRoute({DID_SET_DISABLED:function didSetDisabled(_ref6){var root=_ref6.root;root.element.disabled=root.query("GET_DISABLED")},DID_ADD_ITEM:function didAddItem(_ref3){var root=_ref3.root,action=_ref3.action,shouldUseFileInput=!(root.query("GET_ITEM",action.id).origin===FileOrigin.LOCAL)&&root.query("SHOULD_UPDATE_FILE_INPUT"),dataContainer=createElement$1("input");dataContainer.type=shouldUseFileInput?"file":"hidden",dataContainer.name=root.query("GET_NAME"),dataContainer.disabled=root.query("GET_DISABLED"),root.ref.fields[action.id]=dataContainer,syncFieldPositionsWithItems(root)},DID_LOAD_ITEM:function didLoadItem(_ref4){var root=_ref4.root,action=_ref4.action,field=getField(root,action.id);if(field&&(null!==action.serverFileReference&&(field.value=action.serverFileReference),root.query("SHOULD_UPDATE_FILE_INPUT"))){var fileItem=root.query("GET_ITEM",action.id);setInputFiles(field,[fileItem.file])}},DID_REMOVE_ITEM:function didRemoveItem(_ref7){var root=_ref7.root,action=_ref7.action,field=getField(root,action.id);field&&(field.parentNode&&field.parentNode.removeChild(field),delete root.ref.fields[action.id])},DID_DEFINE_VALUE:function didDefineValue(_ref8){var root=_ref8.root,action=_ref8.action,field=getField(root,action.id);field&&(null===action.value?field.removeAttribute("value"):"file"!=field.type&&(field.value=action.value),syncFieldPositionsWithItems(root))},DID_PREPARE_OUTPUT:function didPrepareOutput(_ref5){var root=_ref5.root,action=_ref5.action;root.query("SHOULD_UPDATE_FILE_INPUT")&&setTimeout((function(){var field=getField(root,action.id);field&&setInputFiles(field,[action.file])}),0)},DID_REORDER_ITEMS:didReorderItems,DID_SORT_ITEMS:didReorderItems}),data=createView({tag:"fieldset",name:"data",create:create$c,write:write$8,ignoreRect:!0}),getRootNode=function getRootNode(element){return"getRootNode"in element?element.getRootNode():document},images=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],text$1=["css","csv","html","txt"],map={zip:"zip|compressed",epub:"application/epub+zip"},guesstimateMimeType=function guesstimateMimeType(){var extension=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return extension=extension.toLowerCase(),images.includes(extension)?"image/"+("jpg"===extension?"jpeg":"svg"===extension?"svg+xml":extension):text$1.includes(extension)?"text/"+extension:map[extension]||""},requestDataTransferItems=function requestDataTransferItems(dataTransfer){return new Promise((function(resolve,reject){var links=getLinks(dataTransfer);if(links.length&&!hasFiles(dataTransfer))return resolve(links);getFiles(dataTransfer).then(resolve)}))},hasFiles=function hasFiles(dataTransfer){return!!dataTransfer.files&&dataTransfer.files.length>0},getFiles=function getFiles(dataTransfer){return new Promise((function(resolve,reject){var promisedFiles=(dataTransfer.items?Array.from(dataTransfer.items):[]).filter((function(item){return isFileSystemItem(item)})).map((function(item){return getFilesFromItem(item)}));promisedFiles.length?Promise.all(promisedFiles).then((function(returnedFileGroups){var files=[];returnedFileGroups.forEach((function(group){files.push.apply(files,group)})),resolve(files.filter((function(file){return file})).map((function(file){return file._relativePath||(file._relativePath=file.webkitRelativePath),file})))})).catch(console.error):resolve(dataTransfer.files?Array.from(dataTransfer.files):[])}))},isFileSystemItem=function isFileSystemItem(item){if(isEntry(item)){var entry=getAsEntry(item);if(entry)return entry.isFile||entry.isDirectory}return"file"===item.kind},getFilesFromItem=function getFilesFromItem(item){return new Promise((function(resolve,reject){isDirectoryEntry(item)?getFilesInDirectory(getAsEntry(item)).then(resolve).catch(reject):resolve([item.getAsFile()])}))},getFilesInDirectory=function getFilesInDirectory(entry){return new Promise((function(resolve,reject){var files=[],dirCounter=0,fileCounter=0,resolveIfDone=function resolveIfDone(){0===fileCounter&&0===dirCounter&&resolve(files)},readEntries=function readEntries(dirEntry){dirCounter++;var directoryReader=dirEntry.createReader(),readBatch=function readBatch(){directoryReader.readEntries((function(entries){if(0===entries.length)return dirCounter--,void resolveIfDone();entries.forEach((function(entry){entry.isDirectory?readEntries(entry):(fileCounter++,entry.file((function(file){var correctedFile=correctMissingFileType(file);entry.fullPath&&(correctedFile._relativePath=entry.fullPath),files.push(correctedFile),fileCounter--,resolveIfDone()})))})),readBatch()}),reject)};readBatch()};readEntries(entry)}))},correctMissingFileType=function correctMissingFileType(file){if(file.type.length)return file;var date=file.lastModifiedDate,name=file.name,type=guesstimateMimeType(getExtensionFromFilename(file.name));return type.length?((file=file.slice(0,file.size,type)).name=name,file.lastModifiedDate=date,file):file},isDirectoryEntry=function isDirectoryEntry(item){return isEntry(item)&&(getAsEntry(item)||{}).isDirectory},isEntry=function isEntry(item){return"webkitGetAsEntry"in item},getAsEntry=function getAsEntry(item){return item.webkitGetAsEntry()},getLinks=function getLinks(dataTransfer){var links=[];try{if((links=getLinksFromTransferMetaData(dataTransfer)).length)return links;links=getLinksFromTransferURLData(dataTransfer)}catch(e){}return links},getLinksFromTransferURLData=function getLinksFromTransferURLData(dataTransfer){var data=dataTransfer.getData("url");return"string"==typeof data&&data.length?[data]:[]},getLinksFromTransferMetaData=function getLinksFromTransferMetaData(dataTransfer){var data=dataTransfer.getData("text/html");if("string"==typeof data&&data.length){var matches=data.match(/src\s*=\s*"(.+?)"/);if(matches)return[matches[1]]}return[]},dragNDropObservers=[],eventPosition=function eventPosition(e){return{pageLeft:e.pageX,pageTop:e.pageY,scopeLeft:e.offsetX||e.layerX,scopeTop:e.offsetY||e.layerY}},createDragNDropClient=function createDragNDropClient(element,scopeToObserve,filterElement){var observer=getDragNDropObserver(scopeToObserve),client={element,filterElement,state:null,ondrop:function ondrop(){},onenter:function onenter(){},ondrag:function ondrag(){},onexit:function onexit(){},onload:function onload(){},allowdrop:function allowdrop(){}};return client.destroy=observer.addListener(client),client},getDragNDropObserver=function getDragNDropObserver(element){var observer=dragNDropObservers.find((function(item){return item.element===element}));if(observer)return observer;var newObserver=createDragNDropObserver(element);return dragNDropObservers.push(newObserver),newObserver},createDragNDropObserver=function createDragNDropObserver(element){var clients=[],routes={dragenter,dragover,dragleave,drop},handlers={};forin(routes,(function(event,createHandler){handlers[event]=createHandler(element,clients),element.addEventListener(event,handlers[event],!1)}));var observer={element,addListener:function addListener(client){return clients.push(client),function(){clients.splice(clients.indexOf(client),1),0===clients.length&&(dragNDropObservers.splice(dragNDropObservers.indexOf(observer),1),forin(routes,(function(event){element.removeEventListener(event,handlers[event],!1)})))}}};return observer},elementFromPoint=function elementFromPoint(root,point){return"elementFromPoint"in root||(root=document),root.elementFromPoint(point.x,point.y)},isEventTarget=function isEventTarget(e,target){var root=getRootNode(target),elementAtPosition=elementFromPoint(root,{x:e.pageX-window.pageXOffset,y:e.pageY-window.pageYOffset});return elementAtPosition===target||target.contains(elementAtPosition)},initialTarget=null,setDropEffect=function setDropEffect(dataTransfer,effect){try{dataTransfer.dropEffect=effect}catch(e){}},dragenter=function dragenter(root,clients){return function(e){e.preventDefault(),initialTarget=e.target,clients.forEach((function(client){var element=client.element,onenter=client.onenter;isEventTarget(e,element)&&(client.state="enter",onenter(eventPosition(e)))}))}},dragover=function dragover(root,clients){return function(e){e.preventDefault();var dataTransfer=e.dataTransfer;requestDataTransferItems(dataTransfer).then((function(items){var overDropTarget=!1;clients.some((function(client){var filterElement=client.filterElement,element=client.element,onenter=client.onenter,onexit=client.onexit,ondrag=client.ondrag,allowdrop=client.allowdrop;setDropEffect(dataTransfer,"copy");var allowsTransfer=allowdrop(items);if(allowsTransfer)if(isEventTarget(e,element)){if(overDropTarget=!0,null===client.state)return client.state="enter",void onenter(eventPosition(e));if(client.state="over",filterElement&&!allowsTransfer)return void setDropEffect(dataTransfer,"none");ondrag(eventPosition(e))}else filterElement&&!overDropTarget&&setDropEffect(dataTransfer,"none"),client.state&&(client.state=null,onexit(eventPosition(e)));else setDropEffect(dataTransfer,"none")}))}))}},drop=function drop(root,clients){return function(e){e.preventDefault();var dataTransfer=e.dataTransfer;requestDataTransferItems(dataTransfer).then((function(items){clients.forEach((function(client){var filterElement=client.filterElement,element=client.element,ondrop=client.ondrop,onexit=client.onexit,allowdrop=client.allowdrop;if(client.state=null,!filterElement||isEventTarget(e,element))return allowdrop(items)?void ondrop(eventPosition(e),items):onexit(eventPosition(e))}))}))}},dragleave=function dragleave(root,clients){return function(e){initialTarget===e.target&&clients.forEach((function(client){var onexit=client.onexit;client.state=null,onexit(eventPosition(e))}))}},createHopper=function createHopper(scope,validateItems,options){scope.classList.add("filepond--hopper");var catchesDropsOnPage=options.catchesDropsOnPage,requiresDropOnElement=options.requiresDropOnElement,_options$filterItems=options.filterItems,filterItems=void 0===_options$filterItems?function(items){return items}:_options$filterItems,client=createDragNDropClient(scope,catchesDropsOnPage?document.documentElement:scope,requiresDropOnElement),lastState="",currentState="";client.allowdrop=function(items){return validateItems(filterItems(items))},client.ondrop=function(position,items){var filteredItems=filterItems(items);validateItems(filteredItems)?(currentState="drag-drop",api.onload(filteredItems,position)):api.ondragend(position)},client.ondrag=function(position){api.ondrag(position)},client.onenter=function(position){currentState="drag-over",api.ondragstart(position)},client.onexit=function(position){currentState="drag-exit",api.ondragend(position)};var api={updateHopperState:function updateHopperState(){lastState!==currentState&&(scope.dataset.hopperState=currentState,lastState=currentState)},onload:function onload(){},ondragstart:function ondragstart(){},ondrag:function ondrag(){},ondragend:function ondragend(){},destroy:function destroy(){client.destroy()}};return api},listening=!1,listeners$1=[],handlePaste=function handlePaste(e){var activeEl=document.activeElement;if(activeEl&&/textarea|input/i.test(activeEl.nodeName)){for(var inScope=!1,element=activeEl;element!==document.body;){if(element.classList.contains("filepond--root")){inScope=!0;break}element=element.parentNode}if(!inScope)return}requestDataTransferItems(e.clipboardData).then((function(files){files.length&&listeners$1.forEach((function(listener){return listener(files)}))}))},listen=function listen(cb){listeners$1.includes(cb)||(listeners$1.push(cb),listening||(listening=!0,document.addEventListener("paste",handlePaste)))},unlisten=function unlisten(listener){arrayRemove(listeners$1,listeners$1.indexOf(listener)),0===listeners$1.length&&(document.removeEventListener("paste",handlePaste),listening=!1)},createPaster=function createPaster(){var cb=function cb(files){api.onload(files)},api={destroy:function destroy(){unlisten(cb)},onload:function onload(){}};return listen(cb),api},addFilesNotificationTimeout=null,notificationClearTimeout=null,filenames=[],assist=function assist(root,message){root.element.textContent=message},clear$1=function clear(root){root.element.textContent=""},listModified=function listModified(root,filename,label){var total=root.query("GET_TOTAL_ITEMS");assist(root,label+" "+filename+", "+total+" "+(1===total?root.query("GET_LABEL_FILE_COUNT_SINGULAR"):root.query("GET_LABEL_FILE_COUNT_PLURAL"))),clearTimeout(notificationClearTimeout),notificationClearTimeout=setTimeout((function(){clear$1(root)}),1500)},isUsingFilePond=function isUsingFilePond(root){return root.element.parentNode.contains(document.activeElement)},itemProcessedUndo=function itemProcessedUndo(_ref5){var root=_ref5.root,action=_ref5.action,filename=root.query("GET_ITEM",action.id).filename,label=root.query("GET_LABEL_FILE_PROCESSING_ABORTED");assist(root,filename+" "+label)},itemError=function itemError(_ref6){var root=_ref6.root,action=_ref6.action,filename=root.query("GET_ITEM",action.id).filename;assist(root,action.status.main+" "+filename+" "+action.status.sub)},assistant=createView({create:function create(_ref){var root=_ref.root,props=_ref.props;root.element.id="filepond--assistant-"+props.id,attr(root.element,"role","status"),attr(root.element,"aria-live","polite"),attr(root.element,"aria-relevant","additions")},ignoreRect:!0,ignoreRectUpdate:!0,write:createRoute({DID_LOAD_ITEM:function itemAdded(_ref2){var root=_ref2.root,action=_ref2.action;if(isUsingFilePond(root)){root.element.textContent="";var item=root.query("GET_ITEM",action.id);filenames.push(item.filename),clearTimeout(addFilesNotificationTimeout),addFilesNotificationTimeout=setTimeout((function(){listModified(root,filenames.join(", "),root.query("GET_LABEL_FILE_ADDED")),filenames.length=0}),750)}},DID_REMOVE_ITEM:function itemRemoved(_ref3){var root=_ref3.root,action=_ref3.action;if(isUsingFilePond(root)){var item=action.item;listModified(root,item.filename,root.query("GET_LABEL_FILE_REMOVED"))}},DID_COMPLETE_ITEM_PROCESSING:function itemProcessed(_ref4){var root=_ref4.root,action=_ref4.action,filename=root.query("GET_ITEM",action.id).filename,label=root.query("GET_LABEL_FILE_PROCESSING_COMPLETE");assist(root,filename+" "+label)},DID_ABORT_ITEM_PROCESSING:itemProcessedUndo,DID_REVERT_ITEM_PROCESSING:itemProcessedUndo,DID_THROW_ITEM_REMOVE_ERROR:itemError,DID_THROW_ITEM_LOAD_ERROR:itemError,DID_THROW_ITEM_INVALID:itemError,DID_THROW_ITEM_PROCESSING_ERROR:itemError}),tag:"span",name:"assistant"}),toCamels=function toCamels(string){var separator=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return string.replace(new RegExp(separator+".","g"),(function(sub){return sub.charAt(1).toUpperCase()}))},debounce=function debounce(func){var interval=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,immidiateOnly=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],last=Date.now(),timeout=null;return function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];clearTimeout(timeout);var dist=Date.now()-last,fn=function fn(){last=Date.now(),func.apply(void 0,args)};dist<interval?immidiateOnly||(timeout=setTimeout(fn,interval-dist)):fn()}},MAX_FILES_LIMIT=1e6,prevent=function prevent(e){return e.preventDefault()},create$e=function create(_ref){var root=_ref.root,props=_ref.props,id=root.query("GET_ID");id&&(root.element.id=id);var className=root.query("GET_CLASS_NAME");className&&className.split(" ").filter((function(name){return name.length})).forEach((function(name){root.element.classList.add(name)})),root.ref.label=root.appendChildView(root.createChildView(dropLabel,Object.assign({},props,{translateY:null,caption:root.query("GET_LABEL_IDLE")}))),root.ref.list=root.appendChildView(root.createChildView(listScroller,{translateY:null})),root.ref.panel=root.appendChildView(root.createChildView(panel,{name:"panel-root"})),root.ref.assistant=root.appendChildView(root.createChildView(assistant,Object.assign({},props))),root.ref.data=root.appendChildView(root.createChildView(data,Object.assign({},props))),root.ref.measure=createElement$1("div"),root.ref.measure.style.height="100%",root.element.appendChild(root.ref.measure),root.ref.bounds=null,root.query("GET_STYLES").filter((function(style){return!isEmpty(style.value)})).map((function(_ref2){var name=_ref2.name,value=_ref2.value;root.element.dataset[name]=value})),root.ref.widthPrevious=null,root.ref.widthUpdated=debounce((function(){root.ref.updateHistory=[],root.dispatch("DID_RESIZE_ROOT")}),250),root.ref.previousAspectRatio=null,root.ref.updateHistory=[];var canHover=window.matchMedia("(pointer: fine) and (hover: hover)").matches,hasPointerEvents="PointerEvent"in window;root.query("GET_ALLOW_REORDER")&&hasPointerEvents&&!canHover&&(root.element.addEventListener("touchmove",prevent,{passive:!1}),root.element.addEventListener("gesturestart",prevent));var credits=root.query("GET_CREDITS");if(2===credits.length){var frag=document.createElement("a");frag.className="filepond--credits",frag.setAttribute("aria-hidden","true"),frag.href=credits[0],frag.tabindex=-1,frag.target="_blank",frag.rel="noopener noreferrer",frag.textContent=credits[1],root.element.appendChild(frag),root.ref.credits=frag}},write$9=function write(_ref3){var root=_ref3.root,props=_ref3.props,actions=_ref3.actions;if(route$5({root,props,actions}),actions.filter((function(action){return/^DID_SET_STYLE_/.test(action.type)})).filter((function(action){return!isEmpty(action.data.value)})).map((function(_ref4){var type=_ref4.type,data=_ref4.data,name=toCamels(type.substring(8).toLowerCase(),"_");root.element.dataset[name]=data.value,root.invalidateLayout()})),!root.rect.element.hidden){root.rect.element.width!==root.ref.widthPrevious&&(root.ref.widthPrevious=root.rect.element.width,root.ref.widthUpdated());var bounds=root.ref.bounds;bounds||(bounds=root.ref.bounds=calculateRootBoundingBoxHeight(root),root.element.removeChild(root.ref.measure),root.ref.measure=null);var _root$ref=root.ref,hopper=_root$ref.hopper,label=_root$ref.label,list=_root$ref.list,panel=_root$ref.panel;hopper&&hopper.updateHopperState();var aspectRatio=root.query("GET_PANEL_ASPECT_RATIO"),isMultiItem=root.query("GET_ALLOW_MULTIPLE"),totalItems=root.query("GET_TOTAL_ITEMS"),atMaxCapacity=totalItems===(isMultiItem?root.query("GET_MAX_FILES")||MAX_FILES_LIMIT:1),addAction=actions.find((function(action){return"DID_ADD_ITEM"===action.type}));if(atMaxCapacity&&addAction){var interactionMethod=addAction.data.interactionMethod;label.opacity=0,isMultiItem?label.translateY=-40:interactionMethod===InteractionMethod.API?label.translateX=40:interactionMethod===InteractionMethod.BROWSE?label.translateY=40:label.translateY=30}else atMaxCapacity||(label.opacity=1,label.translateX=0,label.translateY=0);var listItemMargin=calculateListItemMargin(root),listHeight=calculateListHeight(root),labelHeight=label.rect.element.height,currentLabelHeight=!isMultiItem||atMaxCapacity?0:labelHeight,listMarginTop=atMaxCapacity?list.rect.element.marginTop:0,listMarginBottom=0===totalItems?0:list.rect.element.marginBottom,visualHeight=currentLabelHeight+listMarginTop+listHeight.visual+listMarginBottom,boundsHeight=currentLabelHeight+listMarginTop+listHeight.bounds+listMarginBottom;if(list.translateY=Math.max(0,currentLabelHeight-list.rect.element.marginTop)-listItemMargin.top,aspectRatio){var width=root.rect.element.width,height=width*aspectRatio;aspectRatio!==root.ref.previousAspectRatio&&(root.ref.previousAspectRatio=aspectRatio,root.ref.updateHistory=[]);var history=root.ref.updateHistory;history.push(width);var MAX_BOUNCES=2;if(history.length>2*MAX_BOUNCES)for(var l=history.length,bottom=l-10,bounces=0,i=l;i>=bottom;i--)if(history[i]===history[i-2]&&bounces++,bounces>=MAX_BOUNCES)return;panel.scalable=!1,panel.height=height;var listAvailableHeight=height-currentLabelHeight-(listMarginBottom-listItemMargin.bottom)-(atMaxCapacity?listMarginTop:0);listHeight.visual>listAvailableHeight?list.overflow=listAvailableHeight:list.overflow=null,root.height=height}else if(bounds.fixedHeight){panel.scalable=!1;var _listAvailableHeight=bounds.fixedHeight-currentLabelHeight-(listMarginBottom-listItemMargin.bottom)-(atMaxCapacity?listMarginTop:0);listHeight.visual>_listAvailableHeight?list.overflow=_listAvailableHeight:list.overflow=null}else if(bounds.cappedHeight){var isCappedHeight=visualHeight>=bounds.cappedHeight,panelHeight=Math.min(bounds.cappedHeight,visualHeight);panel.scalable=!0,panel.height=isCappedHeight?panelHeight:panelHeight-listItemMargin.top-listItemMargin.bottom;var _listAvailableHeight2=panelHeight-currentLabelHeight-(listMarginBottom-listItemMargin.bottom)-(atMaxCapacity?listMarginTop:0);visualHeight>bounds.cappedHeight&&listHeight.visual>_listAvailableHeight2?list.overflow=_listAvailableHeight2:list.overflow=null,root.height=Math.min(bounds.cappedHeight,boundsHeight-listItemMargin.top-listItemMargin.bottom)}else{var itemMargin=totalItems>0?listItemMargin.top+listItemMargin.bottom:0;panel.scalable=!0,panel.height=Math.max(labelHeight,visualHeight-itemMargin),root.height=Math.max(labelHeight,boundsHeight-itemMargin)}root.ref.credits&&panel.heightCurrent&&(root.ref.credits.style.transform="translateY("+panel.heightCurrent+"px)")}},calculateListItemMargin=function calculateListItemMargin(root){var item=root.ref.list.childViews[0].childViews[0];return item?{top:item.rect.element.marginTop,bottom:item.rect.element.marginBottom}:{top:0,bottom:0}},calculateListHeight=function calculateListHeight(root){var visual=0,bounds=0,scrollList=root.ref.list,itemList=scrollList.childViews[0],visibleChildren=itemList.childViews.filter((function(child){return child.rect.element.height})),children=root.query("GET_ACTIVE_ITEMS").map((function(item){return visibleChildren.find((function(child){return child.id===item.id}))})).filter((function(item){return item}));if(0===children.length)return{visual,bounds};var horizontalSpace=itemList.rect.element.width,dragIndex=getItemIndexByPosition(itemList,children,scrollList.dragCoordinates),childRect=children[0].rect.element,itemVerticalMargin=childRect.marginTop+childRect.marginBottom,itemHorizontalMargin=childRect.marginLeft+childRect.marginRight,itemWidth=childRect.width+itemHorizontalMargin,itemHeight=childRect.height+itemVerticalMargin,newItem=void 0!==dragIndex&&dragIndex>=0?1:0,removedItem=children.find((function(child){return child.markedForRemoval&&child.opacity<.45}))?-1:0,verticalItemCount=children.length+newItem+removedItem,itemsPerRow=getItemsPerRow(horizontalSpace,itemWidth);return 1===itemsPerRow?children.forEach((function(item){var height=item.rect.element.height+itemVerticalMargin;bounds+=height,visual+=height*item.opacity})):(bounds=Math.ceil(verticalItemCount/itemsPerRow)*itemHeight,visual=bounds),{visual,bounds}},calculateRootBoundingBoxHeight=function calculateRootBoundingBoxHeight(root){var height=root.ref.measureHeight||null;return{cappedHeight:parseInt(root.style.maxHeight,10)||null,fixedHeight:0===height?null:height}},exceedsMaxFiles=function exceedsMaxFiles(root,items){var allowReplace=root.query("GET_ALLOW_REPLACE"),allowMultiple=root.query("GET_ALLOW_MULTIPLE"),totalItems=root.query("GET_TOTAL_ITEMS"),maxItems=root.query("GET_MAX_FILES"),totalBrowseItems=items.length;return!allowMultiple&&totalBrowseItems>1?(root.dispatch("DID_THROW_MAX_FILES",{source:items,error:createResponse("warning",0,"Max files")}),!0):!(!allowMultiple&&allowReplace||!(isInt(maxItems=allowMultiple?maxItems:1)&&totalItems+totalBrowseItems>maxItems)||(root.dispatch("DID_THROW_MAX_FILES",{source:items,error:createResponse("warning",0,"Max files")}),0))},getDragIndex=function getDragIndex(list,children,position){var itemList=list.childViews[0];return getItemIndexByPosition(itemList,children,{left:position.scopeLeft-itemList.rect.element.left,top:position.scopeTop-(list.rect.outer.top+list.rect.element.marginTop+list.rect.element.scrollTop)})},toggleDrop=function toggleDrop(root){var isAllowed=root.query("GET_ALLOW_DROP"),isDisabled=root.query("GET_DISABLED"),enabled=isAllowed&&!isDisabled;if(enabled&&!root.ref.hopper){var hopper=createHopper(root.element,(function(items){var beforeDropFile=root.query("GET_BEFORE_DROP_FILE")||function(){return!0};return!root.query("GET_DROP_VALIDATION")||items.every((function(item){return applyFilters("ALLOW_HOPPER_ITEM",item,{query:root.query}).every((function(result){return!0===result}))&&beforeDropFile(item)}))}),{filterItems:function filterItems(items){var ignoredFiles=root.query("GET_IGNORED_FILES");return items.filter((function(item){return!isFile(item)||!ignoredFiles.includes(item.name.toLowerCase())}))},catchesDropsOnPage:root.query("GET_DROP_ON_PAGE"),requiresDropOnElement:root.query("GET_DROP_ON_ELEMENT")});hopper.onload=function(items,position){var visibleChildren=root.ref.list.childViews[0].childViews.filter((function(child){return child.rect.element.height})),children=root.query("GET_ACTIVE_ITEMS").map((function(item){return visibleChildren.find((function(child){return child.id===item.id}))})).filter((function(item){return item}));applyFilterChain("ADD_ITEMS",items,{dispatch:root.dispatch}).then((function(queue){if(exceedsMaxFiles(root,queue))return!1;root.dispatch("ADD_ITEMS",{items:queue,index:getDragIndex(root.ref.list,children,position),interactionMethod:InteractionMethod.DROP})})),root.dispatch("DID_DROP",{position}),root.dispatch("DID_END_DRAG",{position})},hopper.ondragstart=function(position){root.dispatch("DID_START_DRAG",{position})},hopper.ondrag=debounce((function(position){root.dispatch("DID_DRAG",{position})})),hopper.ondragend=function(position){root.dispatch("DID_END_DRAG",{position})},root.ref.hopper=hopper,root.ref.drip=root.appendChildView(root.createChildView(drip))}else!enabled&&root.ref.hopper&&(root.ref.hopper.destroy(),root.ref.hopper=null,root.removeChildView(root.ref.drip))},toggleBrowse=function toggleBrowse(root,props){var isAllowed=root.query("GET_ALLOW_BROWSE"),isDisabled=root.query("GET_DISABLED"),enabled=isAllowed&&!isDisabled;enabled&&!root.ref.browser?root.ref.browser=root.appendChildView(root.createChildView(browser,Object.assign({},props,{onload:function onload(items){applyFilterChain("ADD_ITEMS",items,{dispatch:root.dispatch}).then((function(queue){if(exceedsMaxFiles(root,queue))return!1;root.dispatch("ADD_ITEMS",{items:queue,index:-1,interactionMethod:InteractionMethod.BROWSE})}))}})),0):!enabled&&root.ref.browser&&(root.removeChildView(root.ref.browser),root.ref.browser=null)},togglePaste=function togglePaste(root){var isAllowed=root.query("GET_ALLOW_PASTE"),isDisabled=root.query("GET_DISABLED"),enabled=isAllowed&&!isDisabled;enabled&&!root.ref.paster?(root.ref.paster=createPaster(),root.ref.paster.onload=function(items){applyFilterChain("ADD_ITEMS",items,{dispatch:root.dispatch}).then((function(queue){if(exceedsMaxFiles(root,queue))return!1;root.dispatch("ADD_ITEMS",{items:queue,index:-1,interactionMethod:InteractionMethod.PASTE})}))}):!enabled&&root.ref.paster&&(root.ref.paster.destroy(),root.ref.paster=null)},route$5=createRoute({DID_SET_ALLOW_BROWSE:function DID_SET_ALLOW_BROWSE(_ref5){var root=_ref5.root,props=_ref5.props;toggleBrowse(root,props)},DID_SET_ALLOW_DROP:function DID_SET_ALLOW_DROP(_ref6){var root=_ref6.root;toggleDrop(root)},DID_SET_ALLOW_PASTE:function DID_SET_ALLOW_PASTE(_ref7){var root=_ref7.root;togglePaste(root)},DID_SET_DISABLED:function DID_SET_DISABLED(_ref8){var root=_ref8.root,props=_ref8.props;toggleDrop(root),togglePaste(root),toggleBrowse(root,props),root.query("GET_DISABLED")?root.element.dataset.disabled="disabled":root.element.removeAttribute("data-disabled")}}),root=createView({name:"root",read:function read(_ref9){var root=_ref9.root;root.ref.measure&&(root.ref.measureHeight=root.ref.measure.offsetHeight)},create:create$e,write:write$9,destroy:function destroy(_ref10){var root=_ref10.root;root.ref.paster&&root.ref.paster.destroy(),root.ref.hopper&&root.ref.hopper.destroy(),root.element.removeEventListener("touchmove",prevent),root.element.removeEventListener("gesturestart",prevent)},mixins:{styles:["height"]}}),createApp=function createApp(){var initialOptions=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},originalElement=null,defaultOptions=getOptions(),store=createStore(createInitialState(defaultOptions),[queries,createOptionQueries(defaultOptions)],[actions,createOptionActions(defaultOptions)]);store.dispatch("SET_OPTIONS",{options:initialOptions});var visibilityHandler=function visibilityHandler(){document.hidden||store.dispatch("KICK")};document.addEventListener("visibilitychange",visibilityHandler);var resizeDoneTimer=null,isResizing=!1,isResizingHorizontally=!1,initialWindowWidth=null,currentWindowWidth=null,resizeHandler=function resizeHandler(){isResizing||(isResizing=!0),clearTimeout(resizeDoneTimer),resizeDoneTimer=setTimeout((function(){isResizing=!1,initialWindowWidth=null,currentWindowWidth=null,isResizingHorizontally&&(isResizingHorizontally=!1,store.dispatch("DID_STOP_RESIZE"))}),500)};window.addEventListener("resize",resizeHandler);var view=root(store,{id:getUniqueId()}),isResting=!1,isHidden=!1,readWriteApi={_read:function _read(){isResizing&&(currentWindowWidth=window.innerWidth,initialWindowWidth||(initialWindowWidth=currentWindowWidth),isResizingHorizontally||currentWindowWidth===initialWindowWidth||(store.dispatch("DID_START_RESIZE"),isResizingHorizontally=!0)),isHidden&&isResting&&(isResting=null===view.element.offsetParent),isResting||(view._read(),isHidden=view.rect.element.hidden)},_write:function _write(ts){var actions=store.processActionQueue().filter((function(action){return!/^SET_/.test(action.type)}));isResting&&!actions.length||(routeActionsToEvents(actions),isResting=view._write(ts,actions,isResizingHorizontally),removeReleasedItems(store.query("GET_ITEMS")),isResting&&store.processDispatchQueue())}},createEvent=function createEvent(name){return function(data){var event={type:name};if(!data)return event;if(data.hasOwnProperty("error")&&(event.error=data.error?Object.assign({},data.error):null),data.status&&(event.status=Object.assign({},data.status)),data.file&&(event.output=data.file),data.source)event.file=data.source;else if(data.item||data.id){var item=data.item?data.item:store.query("GET_ITEM",data.id);event.file=item?createItemAPI(item):null}return data.items&&(event.items=data.items.map(createItemAPI)),/progress/.test(name)&&(event.progress=data.progress),data.hasOwnProperty("origin")&&data.hasOwnProperty("target")&&(event.origin=data.origin,event.target=data.target),event}},eventRoutes={DID_DESTROY:createEvent("destroy"),DID_INIT:createEvent("init"),DID_THROW_MAX_FILES:createEvent("warning"),DID_INIT_ITEM:createEvent("initfile"),DID_START_ITEM_LOAD:createEvent("addfilestart"),DID_UPDATE_ITEM_LOAD_PROGRESS:createEvent("addfileprogress"),DID_LOAD_ITEM:createEvent("addfile"),DID_THROW_ITEM_INVALID:[createEvent("error"),createEvent("addfile")],DID_THROW_ITEM_LOAD_ERROR:[createEvent("error"),createEvent("addfile")],DID_THROW_ITEM_REMOVE_ERROR:[createEvent("error"),createEvent("removefile")],DID_PREPARE_OUTPUT:createEvent("preparefile"),DID_START_ITEM_PROCESSING:createEvent("processfilestart"),DID_UPDATE_ITEM_PROCESS_PROGRESS:createEvent("processfileprogress"),DID_ABORT_ITEM_PROCESSING:createEvent("processfileabort"),DID_COMPLETE_ITEM_PROCESSING:createEvent("processfile"),DID_COMPLETE_ITEM_PROCESSING_ALL:createEvent("processfiles"),DID_REVERT_ITEM_PROCESSING:createEvent("processfilerevert"),DID_THROW_ITEM_PROCESSING_ERROR:[createEvent("error"),createEvent("processfile")],DID_REMOVE_ITEM:createEvent("removefile"),DID_UPDATE_ITEMS:createEvent("updatefiles"),DID_ACTIVATE_ITEM:createEvent("activatefile"),DID_REORDER_ITEMS:createEvent("reorderfiles")},exposeEvent=function exposeEvent(event){var detail=Object.assign({pond:exports},event);delete detail.type,view.element.dispatchEvent(new CustomEvent("FilePond:"+event.type,{detail,bubbles:!0,cancelable:!0,composed:!0}));var params=[];event.hasOwnProperty("error")&&params.push(event.error),event.hasOwnProperty("file")&&params.push(event.file);var filtered=["type","error","file"];Object.keys(event).filter((function(key){return!filtered.includes(key)})).forEach((function(key){return params.push(event[key])})),exports.fire.apply(exports,[event.type].concat(params));var handler=store.query("GET_ON"+event.type.toUpperCase());handler&&handler.apply(void 0,params)},routeActionsToEvents=function routeActionsToEvents(actions){actions.length&&actions.filter((function(action){return eventRoutes[action.type]})).forEach((function(action){var routes=eventRoutes[action.type];(Array.isArray(routes)?routes:[routes]).forEach((function(route){"DID_INIT_ITEM"===action.type?exposeEvent(route(action.data)):setTimeout((function(){exposeEvent(route(action.data))}),0)}))}))},setOptions=function setOptions(options){return store.dispatch("SET_OPTIONS",{options})},getFile=function getFile(query){return store.query("GET_ACTIVE_ITEM",query)},prepareFile=function prepareFile(query){return new Promise((function(resolve,reject){store.dispatch("REQUEST_ITEM_PREPARE",{query,success:function success(item){resolve(item)},failure:function failure(error){reject(error)}})}))},addFile=function addFile(source){var options=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(resolve,reject){addFiles([{source,options}],{index:options.index}).then((function(items){return resolve(items&&items[0])})).catch(reject)}))},isFilePondFile=function isFilePondFile(obj){return obj.file&&obj.id},removeFile=function removeFile(query,options){return"object"!=typeof query||isFilePondFile(query)||options||(options=query,query=void 0),store.dispatch("REMOVE_ITEM",Object.assign({},options,{query})),null===store.query("GET_ACTIVE_ITEM",query)},addFiles=function addFiles(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return new Promise((function(resolve,reject){var sources=[],options={};if(isArray(args[0]))sources.push.apply(sources,args[0]),Object.assign(options,args[1]||{});else{var lastArgument=args[args.length-1];"object"!=typeof lastArgument||lastArgument instanceof Blob||Object.assign(options,args.pop()),sources.push.apply(sources,args)}store.dispatch("ADD_ITEMS",{items:sources,index:options.index,interactionMethod:InteractionMethod.API,success:resolve,failure:reject})}))},getFiles=function getFiles(){return store.query("GET_ACTIVE_ITEMS")},processFile=function processFile(query){return new Promise((function(resolve,reject){store.dispatch("REQUEST_ITEM_PROCESSING",{query,success:function success(item){resolve(item)},failure:function failure(error){reject(error)}})}))},prepareFiles=function prepareFiles(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];var queries=Array.isArray(args[0])?args[0]:args,items=queries.length?queries:getFiles();return Promise.all(items.map(prepareFile))},processFiles=function processFiles(){for(var _len3=arguments.length,args=new Array(_len3),_key3=0;_key3<_len3;_key3++)args[_key3]=arguments[_key3];var queries=Array.isArray(args[0])?args[0]:args;if(!queries.length){var files=getFiles().filter((function(item){return!(item.status===ItemStatus.IDLE&&item.origin===FileOrigin.LOCAL)&&item.status!==ItemStatus.PROCESSING&&item.status!==ItemStatus.PROCESSING_COMPLETE&&item.status!==ItemStatus.PROCESSING_REVERT_ERROR}));return Promise.all(files.map(processFile))}return Promise.all(queries.map(processFile))},removeFiles=function removeFiles(){for(var _len4=arguments.length,args=new Array(_len4),_key4=0;_key4<_len4;_key4++)args[_key4]=arguments[_key4];var options,queries=Array.isArray(args[0])?args[0]:args;"object"==typeof queries[queries.length-1]?options=queries.pop():Array.isArray(args[0])&&(options=args[1]);var files=getFiles();return queries.length?queries.map((function(query){return isNumber(query)?files[query]?files[query].id:null:query})).filter((function(query){return query})).map((function(q){return removeFile(q,options)})):Promise.all(files.map((function(file){return removeFile(file,options)})))},exports=Object.assign({},on(),{},readWriteApi,{},createOptionAPI(store,defaultOptions),{setOptions,addFile,addFiles,getFile,processFile,prepareFile,removeFile,moveFile:function moveFile(query,index){return store.dispatch("MOVE_ITEM",{query,index})},getFiles,processFiles,removeFiles,prepareFiles,sort:function sort(compare){return store.dispatch("SORT",{compare})},browse:function browse(){var input=view.element.querySelector("input[type=file]");input&&input.click()},destroy:function destroy(){exports.fire("destroy",view.element),store.dispatch("ABORT_ALL"),view._destroy(),window.removeEventListener("resize",resizeHandler),document.removeEventListener("visibilitychange",visibilityHandler),store.dispatch("DID_DESTROY")},insertBefore:function insertBefore$1(element){return insertBefore(view.element,element)},insertAfter:function insertAfter$1(element){return insertAfter(view.element,element)},appendTo:function appendTo(element){return element.appendChild(view.element)},replaceElement:function replaceElement(element){insertBefore(view.element,element),element.parentNode.removeChild(element),originalElement=element},restoreElement:function restoreElement(){originalElement&&(insertAfter(originalElement,view.element),view.element.parentNode.removeChild(view.element),originalElement=null)},isAttachedTo:function isAttachedTo(element){return view.element===element||originalElement===element},element:{get:function get(){return view.element}},status:{get:function get(){return store.query("GET_STATUS")}}});return store.dispatch("DID_INIT"),createObject(exports)},createAppObject=function createAppObject(){var customOptions=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},defaultOptions={};return forin(getOptions(),(function(key,value){defaultOptions[key]=value[0]})),createApp(Object.assign({},defaultOptions,{},customOptions))},lowerCaseFirstLetter=function lowerCaseFirstLetter(string){return string.charAt(0).toLowerCase()+string.slice(1)},attributeNameToPropertyName=function attributeNameToPropertyName(attributeName){return toCamels(attributeName.replace(/^data-/,""))},mapObject=function mapObject(object,propertyMap){forin(propertyMap,(function(selector,mapping){forin(object,(function(property,value){var selectorRegExp=new RegExp(selector);if(selectorRegExp.test(property)&&(delete object[property],!1!==mapping))if(isString(mapping))object[mapping]=value;else{var group=mapping.group;isObject(mapping)&&!object[group]&&(object[group]={}),object[group][lowerCaseFirstLetter(property.replace(selectorRegExp,""))]=value}})),mapping.mapping&&mapObject(object[mapping.group],mapping.mapping)}))},getAttributesAsObject=function getAttributesAsObject(node){var attributeMapping=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},attributes=[];forin(node.attributes,(function(index){attributes.push(node.attributes[index])}));var output=attributes.filter((function(attribute){return attribute.name})).reduce((function(obj,attribute){var value=attr(node,attribute.name);return obj[attributeNameToPropertyName(attribute.name)]=value===attribute.name||value,obj}),{});return mapObject(output,attributeMapping),output},createAppAtElement=function createAppAtElement(element){var options=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},attributeMapping={"^class$":"className","^multiple$":"allowMultiple","^capture$":"captureMethod","^webkitdirectory$":"allowDirectoriesOnly","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};applyFilters("SET_ATTRIBUTE_TO_OPTION_MAP",attributeMapping);var mergedOptions=Object.assign({},options),attributeOptions=getAttributesAsObject("FIELDSET"===element.nodeName?element.querySelector("input[type=file]"):element,attributeMapping);Object.keys(attributeOptions).forEach((function(key){isObject(attributeOptions[key])?(isObject(mergedOptions[key])||(mergedOptions[key]={}),Object.assign(mergedOptions[key],attributeOptions[key])):mergedOptions[key]=attributeOptions[key]})),mergedOptions.files=(options.files||[]).concat(Array.from(element.querySelectorAll("input:not([type=file])")).map((function(input){return{source:input.value,options:{type:input.dataset.type}}})));var app=createAppObject(mergedOptions);return element.files&&Array.from(element.files).forEach((function(file){app.addFile(file)})),app.replaceElement(element),app},createApp$1=function createApp(){return isNode(arguments.length<=0?void 0:arguments[0])?createAppAtElement.apply(void 0,arguments):createAppObject.apply(void 0,arguments)},PRIVATE_METHODS=["fire","_read","_write"],createAppAPI=function createAppAPI(app){var api={};return copyObjectPropertiesToObject(app,api,PRIVATE_METHODS),api},replaceInString=function replaceInString(string,replacements){return string.replace(/(?:{([a-zA-Z]+)})/g,(function(match,group){return replacements[group]}))},createWorker=function createWorker(fn){var workerBlob=new Blob(["(",fn.toString(),")()"],{type:"application/javascript"}),workerURL=URL.createObjectURL(workerBlob),worker=new Worker(workerURL);return{transfer:function transfer(message,cb){},post:function post(message,cb,transferList){var id=getUniqueId();worker.onmessage=function(e){e.data.id===id&&cb(e.data.message)},worker.postMessage({id,message},transferList)},terminate:function terminate(){worker.terminate(),URL.revokeObjectURL(workerURL)}}},loadImage=function loadImage(url){return new Promise((function(resolve,reject){var img=new Image;img.onload=function(){resolve(img)},img.onerror=function(e){reject(e)},img.src=url}))},renameFile=function renameFile(file,name){var renamedFile=file.slice(0,file.size,file.type);return renamedFile.lastModifiedDate=file.lastModifiedDate,renamedFile.name=name,renamedFile},copyFile=function copyFile(file){return renameFile(file,file.name)},registeredPlugins=[],createAppPlugin=function createAppPlugin(plugin){if(!registeredPlugins.includes(plugin)){registeredPlugins.push(plugin);var pluginOutline=plugin({addFilter,utils:{Type,forin,isString,isFile,toNaturalFileSize,replaceInString,getExtensionFromFilename,getFilenameWithoutExtension,guesstimateMimeType,getFileFromBlob,getFilenameFromURL,createRoute,createWorker,createView,createItemAPI,loadImage,copyFile,renameFile,createBlob,applyFilterChain,text,getNumericAspectRatioFromString},views:{fileActionButton}});extendDefaultOptions(pluginOutline.options)}},isOperaMini=function isOperaMini(){return"[object OperaMini]"===Object.prototype.toString.call(window.operamini)},hasPromises=function hasPromises(){return"Promise"in window},hasBlobSlice=function hasBlobSlice(){return"slice"in Blob.prototype},hasCreateObjectURL=function hasCreateObjectURL(){return"URL"in window&&"createObjectURL"in window.URL},hasVisibility=function hasVisibility(){return"visibilityState"in document},hasTiming=function hasTiming(){return"performance"in window},hasCSSSupports=function hasCSSSupports(){return"supports"in(window.CSS||{})},isIE11=function isIE11(){return/MSIE|Trident/.test(window.navigator.userAgent)},supported=(isSupported=isBrowser()&&!isOperaMini()&&hasVisibility()&&hasPromises()&&hasBlobSlice()&&hasCreateObjectURL()&&hasTiming()&&(hasCSSSupports()||isIE11()),function(){return isSupported}),state={apps:[]},name="filepond",fn=function fn(){};if(exports.Status={},exports.FileStatus={},exports.FileOrigin={},exports.OptionTypes={},exports.create=fn,exports.destroy=fn,exports.parse=fn,exports.find=fn,exports.registerPlugin=fn,exports.getOptions=fn,exports.setOptions=fn,supported()){createPainter((function(){state.apps.forEach((function(app){return app._read()}))}),(function(ts){state.apps.forEach((function(app){return app._write(ts)}))}));var dispatch=function dispatch(){document.dispatchEvent(new CustomEvent("FilePond:loaded",{detail:{supported,create:exports.create,destroy:exports.destroy,parse:exports.parse,find:exports.find,registerPlugin:exports.registerPlugin,setOptions:exports.setOptions}})),document.removeEventListener("DOMContentLoaded",dispatch)};"loading"!==document.readyState?setTimeout((function(){return dispatch()}),0):document.addEventListener("DOMContentLoaded",dispatch);var updateOptionTypes=function updateOptionTypes(){return forin(getOptions(),(function(key,value){exports.OptionTypes[key]=value[1]}))};exports.Status=Object.assign({},Status),exports.FileOrigin=Object.assign({},FileOrigin),exports.FileStatus=Object.assign({},ItemStatus),exports.OptionTypes={},updateOptionTypes(),exports.create=function create(){var app=createApp$1.apply(void 0,arguments);return app.on("destroy",exports.destroy),state.apps.push(app),createAppAPI(app)},exports.destroy=function destroy(hook){var indexToRemove=state.apps.findIndex((function(app){return app.isAttachedTo(hook)}));return indexToRemove>=0&&(state.apps.splice(indexToRemove,1)[0].restoreElement(),!0)},exports.parse=function parse(context){return Array.from(context.querySelectorAll("."+name)).filter((function(newHook){return!state.apps.find((function(app){return app.isAttachedTo(newHook)}))})).map((function(hook){return exports.create(hook)}))},exports.find=function find(hook){var app=state.apps.find((function(app){return app.isAttachedTo(hook)}));return app?createAppAPI(app):null},exports.registerPlugin=function registerPlugin(){for(var _len=arguments.length,plugins=new Array(_len),_key=0;_key<_len;_key++)plugins[_key]=arguments[_key];plugins.forEach(createAppPlugin),updateOptionTypes()},exports.getOptions=function getOptions$1(){var opts={};return forin(getOptions(),(function(key,value){opts[key]=value[0]})),opts},exports.setOptions=function setOptions$1(opts){return isObject(opts)&&(state.apps.forEach((function(app){app.setOptions(opts)})),setOptions(opts)),exports.getOptions()}}exports.supported=supported,Object.defineProperty(exports,"__esModule",{value:!0})}(exports)},"./node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{N:()=>AnimatePresence});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),react=__webpack_require__("./node_modules/react/index.js"),process=__webpack_require__("./node_modules/framer-motion/dist/es/utils/process.mjs"),es=__webpack_require__("./node_modules/framesync/dist/es/index.mjs"),use_isomorphic_effect=__webpack_require__("./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs");function useIsMounted(){var isMounted=(0,react.useRef)(!1);return(0,use_isomorphic_effect.E)((function(){return isMounted.current=!0,function(){isMounted.current=!1}}),[]),isMounted}var PresenceContext=__webpack_require__("./node_modules/framer-motion/dist/es/context/PresenceContext.mjs"),use_constant=__webpack_require__("./node_modules/framer-motion/dist/es/utils/use-constant.mjs"),use_id=__webpack_require__("./node_modules/framer-motion/dist/es/utils/use-id.mjs"),PresenceChild=function(_a){var children=_a.children,initial=_a.initial,isPresent=_a.isPresent,onExitComplete=_a.onExitComplete,custom=_a.custom,presenceAffectsLayout=_a.presenceAffectsLayout,presenceChildren=(0,use_constant.M)(newChildrenMap),id=(0,use_id.B)(),context=(0,react.useMemo)((function(){return{id,initial,isPresent,custom,onExitComplete:function(childId){var e_1,_a;presenceChildren.set(childId,!0);try{for(var _b=(0,tslib_es6.Ju)(presenceChildren.values()),_c=_b.next();!_c.done;_c=_b.next()){if(!_c.value)return}}catch(e_1_1){e_1={error:e_1_1}}finally{try{_c&&!_c.done&&(_a=_b.return)&&_a.call(_b)}finally{if(e_1)throw e_1.error}}null==onExitComplete||onExitComplete()},register:function(childId){return presenceChildren.set(childId,!1),function(){return presenceChildren.delete(childId)}}}}),presenceAffectsLayout?void 0:[isPresent]);return(0,react.useMemo)((function(){presenceChildren.forEach((function(_,key){return presenceChildren.set(key,!1)}))}),[isPresent]),react.useEffect((function(){!isPresent&&!presenceChildren.size&&(null==onExitComplete||onExitComplete())}),[isPresent]),react.createElement(PresenceContext.t.Provider,{value:context},children)};function newChildrenMap(){return new Map}var LayoutGroupContext=__webpack_require__("./node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs"),use_unmount_effect=__webpack_require__("./node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs"),getChildKey=function(child){return child.key||""};var AnimatePresence=function(_a){var children=_a.children,custom=_a.custom,_b=_a.initial,initial=void 0===_b||_b,onExitComplete=_a.onExitComplete,exitBeforeEnter=_a.exitBeforeEnter,_c=_a.presenceAffectsLayout,presenceAffectsLayout=void 0===_c||_c,_d=(0,tslib_es6.zs)(function useForceUpdate(){var isMounted=useIsMounted(),_a=(0,tslib_es6.zs)((0,react.useState)(0),2),forcedRenderCount=_a[0],setForcedRenderCount=_a[1],forceRender=(0,react.useCallback)((function(){isMounted.current&&setForcedRenderCount(forcedRenderCount+1)}),[forcedRenderCount]);return[(0,react.useCallback)((function(){return es.Ay.postRender(forceRender)}),[forceRender]),forcedRenderCount]}(),1),forceRender=_d[0],forceRenderLayoutGroup=(0,react.useContext)(LayoutGroupContext.L).forceRender;forceRenderLayoutGroup&&(forceRender=forceRenderLayoutGroup);var isMounted=useIsMounted(),filteredChildren=function onlyElements(children){var filtered=[];return react.Children.forEach(children,(function(child){(0,react.isValidElement)(child)&&filtered.push(child)})),filtered}(children),childrenToRender=filteredChildren,exiting=new Set,presentChildren=(0,react.useRef)(childrenToRender),allChildren=(0,react.useRef)(new Map).current,isInitialRender=(0,react.useRef)(!0);if((0,use_isomorphic_effect.E)((function(){isInitialRender.current=!1,function updateChildLookup(children,allChildren){children.forEach((function(child){var key=getChildKey(child);allChildren.set(key,child)}))}(filteredChildren,allChildren),presentChildren.current=childrenToRender})),(0,use_unmount_effect.l)((function(){isInitialRender.current=!0,allChildren.clear(),exiting.clear()})),isInitialRender.current)return react.createElement(react.Fragment,null,childrenToRender.map((function(child){return react.createElement(PresenceChild,{key:getChildKey(child),isPresent:!0,initial:!!initial&&void 0,presenceAffectsLayout},child)})));childrenToRender=(0,tslib_es6.fX)([],(0,tslib_es6.zs)(childrenToRender),!1);for(var presentKeys=presentChildren.current.map(getChildKey),targetKeys=filteredChildren.map(getChildKey),numPresent=presentKeys.length,i=0;i<numPresent;i++){var key=presentKeys[i];-1===targetKeys.indexOf(key)&&exiting.add(key)}return exitBeforeEnter&&exiting.size&&(childrenToRender=[]),exiting.forEach((function(key){if(-1===targetKeys.indexOf(key)){var child=allChildren.get(key);if(child){var insertionIndex=presentKeys.indexOf(key);childrenToRender.splice(insertionIndex,0,react.createElement(PresenceChild,{key:getChildKey(child),isPresent:!1,onExitComplete:function(){allChildren.delete(key),exiting.delete(key);var removeIndex=presentChildren.current.findIndex((function(presentChild){return presentChild.key===key}));if(presentChildren.current.splice(removeIndex,1),!exiting.size){if(presentChildren.current=filteredChildren,!1===isMounted.current)return;forceRender(),onExitComplete&&onExitComplete()}},custom,presenceAffectsLayout},child))}}})),childrenToRender=childrenToRender.map((function(child){var key=child.key;return exiting.has(key)?child:react.createElement(PresenceChild,{key:getChildKey(child),isPresent:!0,presenceAffectsLayout},child)})),"production"!==process._&&exitBeforeEnter&&childrenToRender.length>1&&console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."),react.createElement(react.Fragment,null,exiting.size?childrenToRender:childrenToRender.map((function(child){return(0,react.cloneElement)(child)})))}},"./node_modules/lodash.clonedeep/index.js":(module,exports,__webpack_require__)=>{module=__webpack_require__.nmd(module);var MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",boolTag="[object Boolean]",dateTag="[object Date]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",reFlags=/\w*$/,reIsHostCtor=/^\[object .+?Constructor\]$/,reIsUint=/^(?:0|[1-9]\d*)$/,cloneableTags={};cloneableTags[argsTag]=cloneableTags["[object Array]"]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags["[object Error]"]=cloneableTags[funcTag]=cloneableTags["[object WeakMap]"]=!1;var freeGlobal="object"==typeof __webpack_require__.g&&__webpack_require__.g&&__webpack_require__.g.Object===Object&&__webpack_require__.g,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),freeExports=exports&&!exports.nodeType&&exports,freeModule=freeExports&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports;function addMapEntry(map,pair){return map.set(pair[0],pair[1]),map}function addSetEntry(set,value){return set.add(value),set}function arrayReduce(array,iteratee,accumulator,initAccum){var index=-1,length=array?array.length:0;for(initAccum&&length&&(accumulator=array[++index]);++index<length;)accumulator=iteratee(accumulator,array[index],index,array);return accumulator}function isHostObject(value){var result=!1;if(null!=value&&"function"!=typeof value.toString)try{result=!!(value+"")}catch(e){}return result}function mapToArray(map){var index=-1,result=Array(map.size);return map.forEach((function(value,key){result[++index]=[key,value]})),result}function overArg(func,transform){return function(arg){return func(transform(arg))}}function setToArray(set){var index=-1,result=Array(set.size);return set.forEach((function(value){result[++index]=value})),result}var uid,arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=root["__core-js_shared__"],maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""))?"Symbol(src)_1."+uid:"",funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Buffer=moduleExports?root.Buffer:void 0,Symbol=root.Symbol,Uint8Array=root.Uint8Array,getPrototype=overArg(Object.getPrototypeOf,Object),objectCreate=Object.create,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice,nativeGetSymbols=Object.getOwnPropertySymbols,nativeIsBuffer=Buffer?Buffer.isBuffer:void 0,nativeKeys=overArg(Object.keys,Object),DataView=getNative(root,"DataView"),Map=getNative(root,"Map"),Promise=getNative(root,"Promise"),Set=getNative(root,"Set"),WeakMap=getNative(root,"WeakMap"),nativeCreate=getNative(Object,"create"),dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap),symbolProto=Symbol?Symbol.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function Hash(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function ListCache(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function MapCache(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function Stack(entries){this.__data__=new ListCache(entries)}function arrayLikeKeys(value,inherited){var result=isArray(value)||function isArguments(value){return function isArrayLikeObject(value){return function isObjectLike(value){return!!value&&"object"==typeof value}(value)&&isArrayLike(value)}(value)&&hasOwnProperty.call(value,"callee")&&(!propertyIsEnumerable.call(value,"callee")||objectToString.call(value)==argsTag)}(value)?function baseTimes(n,iteratee){for(var index=-1,result=Array(n);++index<n;)result[index]=iteratee(index);return result}(value.length,String):[],length=result.length,skipIndexes=!!length;for(var key in value)!inherited&&!hasOwnProperty.call(value,key)||skipIndexes&&("length"==key||isIndex(key,length))||result.push(key);return result}function assignValue(object,key,value){var objValue=object[key];hasOwnProperty.call(object,key)&&eq(objValue,value)&&(void 0!==value||key in object)||(object[key]=value)}function assocIndexOf(array,key){for(var length=array.length;length--;)if(eq(array[length][0],key))return length;return-1}function baseClone(value,isDeep,isFull,customizer,key,object,stack){var result;if(customizer&&(result=object?customizer(value,key,object,stack):customizer(value)),void 0!==result)return result;if(!isObject(value))return value;var isArr=isArray(value);if(isArr){if(result=function initCloneArray(array){var length=array.length,result=array.constructor(length);length&&"string"==typeof array[0]&&hasOwnProperty.call(array,"index")&&(result.index=array.index,result.input=array.input);return result}(value),!isDeep)return function copyArray(source,array){var index=-1,length=source.length;array||(array=Array(length));for(;++index<length;)array[index]=source[index];return array}(value,result)}else{var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value))return function cloneBuffer(buffer,isDeep){if(isDeep)return buffer.slice();var result=new buffer.constructor(buffer.length);return buffer.copy(result),result}(value,isDeep);if(tag==objectTag||tag==argsTag||isFunc&&!object){if(isHostObject(value))return object?value:{};if(result=function initCloneObject(object){return"function"!=typeof object.constructor||isPrototype(object)?{}:function baseCreate(proto){return isObject(proto)?objectCreate(proto):{}}(getPrototype(object))}(isFunc?{}:value),!isDeep)return function copySymbols(source,object){return copyObject(source,getSymbols(source),object)}(value,function baseAssign(object,source){return object&&copyObject(source,keys(source),object)}(result,value))}else{if(!cloneableTags[tag])return object?value:{};result=function initCloneByTag(object,tag,cloneFunc,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return cloneArrayBuffer(object);case boolTag:case dateTag:return new Ctor(+object);case dataViewTag:return function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength)}(object,isDeep);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:return function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length)}(object,isDeep);case mapTag:return function cloneMap(map,isDeep,cloneFunc){var array=isDeep?cloneFunc(mapToArray(map),!0):mapToArray(map);return arrayReduce(array,addMapEntry,new map.constructor)}(object,isDeep,cloneFunc);case numberTag:case stringTag:return new Ctor(object);case regexpTag:return function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));return result.lastIndex=regexp.lastIndex,result}(object);case setTag:return function cloneSet(set,isDeep,cloneFunc){var array=isDeep?cloneFunc(setToArray(set),!0):setToArray(set);return arrayReduce(array,addSetEntry,new set.constructor)}(object,isDeep,cloneFunc);case symbolTag:return function cloneSymbol(symbol){return symbolValueOf?Object(symbolValueOf.call(symbol)):{}}(object)}}(value,tag,baseClone,isDeep)}}stack||(stack=new Stack);var stacked=stack.get(value);if(stacked)return stacked;if(stack.set(value,result),!isArr)var props=isFull?function getAllKeys(object){return function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return isArray(object)?result:function arrayPush(array,values){for(var index=-1,length=values.length,offset=array.length;++index<length;)array[offset+index]=values[index];return array}(result,symbolsFunc(object))}(object,keys,getSymbols)}(value):keys(value);return function arrayEach(array,iteratee){for(var index=-1,length=array?array.length:0;++index<length&&!1!==iteratee(array[index],index,array););return array}(props||value,(function(subValue,key){props&&(subValue=value[key=subValue]),assignValue(result,key,baseClone(subValue,isDeep,isFull,customizer,key,value,stack))})),result}function baseIsNative(value){return!(!isObject(value)||function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}(value))&&(isFunction(value)||isHostObject(value)?reIsNative:reIsHostCtor).test(toSource(value))}function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);return new Uint8Array(result).set(new Uint8Array(arrayBuffer)),result}function copyObject(source,props,object,customizer){object||(object={});for(var index=-1,length=props.length;++index<length;){var key=props[index],newValue=customizer?customizer(object[key],source[key],key,object,source):void 0;assignValue(object,key,void 0===newValue?source[key]:newValue)}return object}function getMapData(map,key){var data=map.__data__;return function isKeyable(value){var type=typeof value;return"string"==type||"number"==type||"symbol"==type||"boolean"==type?"__proto__"!==value:null===value}(key)?data["string"==typeof key?"string":"hash"]:data.map}function getNative(object,key){var value=function getValue(object,key){return null==object?void 0:object[key]}(object,key);return baseIsNative(value)?value:void 0}Hash.prototype.clear=function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{}},Hash.prototype.delete=function hashDelete(key){return this.has(key)&&delete this.__data__[key]},Hash.prototype.get=function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return"__lodash_hash_undefined__"===result?void 0:result}return hasOwnProperty.call(data,key)?data[key]:void 0},Hash.prototype.has=function hashHas(key){var data=this.__data__;return nativeCreate?void 0!==data[key]:hasOwnProperty.call(data,key)},Hash.prototype.set=function hashSet(key,value){return this.__data__[key]=nativeCreate&&void 0===value?"__lodash_hash_undefined__":value,this},ListCache.prototype.clear=function listCacheClear(){this.__data__=[]},ListCache.prototype.delete=function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);return!(index<0)&&(index==data.length-1?data.pop():splice.call(data,index,1),!0)},ListCache.prototype.get=function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?void 0:data[index][1]},ListCache.prototype.has=function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1},ListCache.prototype.set=function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);return index<0?data.push([key,value]):data[index][1]=value,this},MapCache.prototype.clear=function mapCacheClear(){this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}},MapCache.prototype.delete=function mapCacheDelete(key){return getMapData(this,key).delete(key)},MapCache.prototype.get=function mapCacheGet(key){return getMapData(this,key).get(key)},MapCache.prototype.has=function mapCacheHas(key){return getMapData(this,key).has(key)},MapCache.prototype.set=function mapCacheSet(key,value){return getMapData(this,key).set(key,value),this},Stack.prototype.clear=function stackClear(){this.__data__=new ListCache},Stack.prototype.delete=function stackDelete(key){return this.__data__.delete(key)},Stack.prototype.get=function stackGet(key){return this.__data__.get(key)},Stack.prototype.has=function stackHas(key){return this.__data__.has(key)},Stack.prototype.set=function stackSet(key,value){var cache=this.__data__;if(cache instanceof ListCache){var pairs=cache.__data__;if(!Map||pairs.length<199)return pairs.push([key,value]),this;cache=this.__data__=new MapCache(pairs)}return cache.set(key,value),this};var getSymbols=nativeGetSymbols?overArg(nativeGetSymbols,Object):function stubArray(){return[]},getTag=function baseGetTag(value){return objectToString.call(value)};function isIndex(value,length){return!!(length=null==length?MAX_SAFE_INTEGER:length)&&("number"==typeof value||reIsUint.test(value))&&value>-1&&value%1==0&&value<length}function isPrototype(value){var Ctor=value&&value.constructor;return value===("function"==typeof Ctor&&Ctor.prototype||objectProto)}function toSource(func){if(null!=func){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function eq(value,other){return value===other||value!=value&&other!=other}(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map)!=mapTag||Promise&&"[object Promise]"!=getTag(Promise.resolve())||Set&&getTag(new Set)!=setTag||WeakMap&&"[object WeakMap]"!=getTag(new WeakMap))&&(getTag=function(value){var result=objectToString.call(value),Ctor=result==objectTag?value.constructor:void 0,ctorString=Ctor?toSource(Ctor):void 0;if(ctorString)switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return"[object Promise]";case setCtorString:return setTag;case weakMapCtorString:return"[object WeakMap]"}return result});var isArray=Array.isArray;function isArrayLike(value){return null!=value&&function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}(value.length)&&!isFunction(value)}var isBuffer=nativeIsBuffer||function stubFalse(){return!1};function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function keys(object){return isArrayLike(object)?arrayLikeKeys(object):function baseKeys(object){if(!isPrototype(object))return nativeKeys(object);var result=[];for(var key in Object(object))hasOwnProperty.call(object,key)&&"constructor"!=key&&result.push(key);return result}(object)}module.exports=function cloneDeep(value){return baseClone(value,!0,!0)}},"./node_modules/lodash.debounce/index.js":(module,__unused_webpack_exports,__webpack_require__)=>{var NAN=NaN,symbolTag="[object Symbol]",reTrim=/^\s+|\s+$/g,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt,freeGlobal="object"==typeof __webpack_require__.g&&__webpack_require__.g&&__webpack_require__.g.Object===Object&&__webpack_require__.g,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),objectToString=Object.prototype.toString,nativeMax=Math.max,nativeMin=Math.min,now=function(){return root.Date.now()};function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function toNumber(value){if("number"==typeof value)return value;if(function isSymbol(value){return"symbol"==typeof value||function isObjectLike(value){return!!value&&"object"==typeof value}(value)&&objectToString.call(value)==symbolTag}(value))return NAN;if(isObject(value)){var other="function"==typeof value.valueOf?value.valueOf():value;value=isObject(other)?other+"":other}if("string"!=typeof value)return 0===value?value:+value;value=value.replace(reTrim,"");var isBinary=reIsBinary.test(value);return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NAN:+value}module.exports=function debounce(func,wait,options){var lastArgs,lastThis,maxWait,result,timerId,lastCallTime,lastInvokeTime=0,leading=!1,maxing=!1,trailing=!0;if("function"!=typeof func)throw new TypeError("Expected a function");function invokeFunc(time){var args=lastArgs,thisArg=lastThis;return lastArgs=lastThis=void 0,lastInvokeTime=time,result=func.apply(thisArg,args)}function shouldInvoke(time){var timeSinceLastCall=time-lastCallTime;return void 0===lastCallTime||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&time-lastInvokeTime>=maxWait}function timerExpired(){var time=now();if(shouldInvoke(time))return trailingEdge(time);timerId=setTimeout(timerExpired,function remainingWait(time){var result=wait-(time-lastCallTime);return maxing?nativeMin(result,maxWait-(time-lastInvokeTime)):result}(time))}function trailingEdge(time){return timerId=void 0,trailing&&lastArgs?invokeFunc(time):(lastArgs=lastThis=void 0,result)}function debounced(){var time=now(),isInvoking=shouldInvoke(time);if(lastArgs=arguments,lastThis=this,lastCallTime=time,isInvoking){if(void 0===timerId)return function leadingEdge(time){return lastInvokeTime=time,timerId=setTimeout(timerExpired,wait),leading?invokeFunc(time):result}(lastCallTime);if(maxing)return timerId=setTimeout(timerExpired,wait),invokeFunc(lastCallTime)}return void 0===timerId&&(timerId=setTimeout(timerExpired,wait)),result}return wait=toNumber(wait)||0,isObject(options)&&(leading=!!options.leading,maxWait=(maxing="maxWait"in options)?nativeMax(toNumber(options.maxWait)||0,wait):maxWait,trailing="trailing"in options?!!options.trailing:trailing),debounced.cancel=function cancel(){void 0!==timerId&&clearTimeout(timerId),lastInvokeTime=0,lastArgs=lastCallTime=lastThis=timerId=void 0},debounced.flush=function flush(){return void 0===timerId?result:trailingEdge(now())},debounced}},"./node_modules/lodash/lodash.js":function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_RESULT__;module=__webpack_require__.nmd(module),function(){var undefined,FUNC_ERROR_TEXT="Expected a function",PLACEHOLDER="__lodash_placeholder__",wrapFlags=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g,reEscapedHtml=/&(?:amp|lt|gt|quot|#39);/g,reUnescapedHtml=/[&<>"']/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source),reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source),reTrimStart=/^\s+/,reWhitespace=/\s/,reWrapComment=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,reWrapDetails=/\{\n\/\* \[wrapped with (.+)\] \*/,reSplitDetails=/,? & /,reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,reForbiddenIdentifierChars=/[()=,{}\[\]\/\s]/,reEscapeChar=/\\(\\)?/g,reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,reFlags=/\w*$/,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsHostCtor=/^\[object .+?Constructor\]$/,reIsOctal=/^0o[0-7]+$/i,reIsUint=/^(?:0|[1-9]\d*)$/,reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,reNoMatch=/($^)/,reUnescapedString=/['\n\r\u2028\u2029\\]/g,rsComboRange="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",rsBreakRange="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsAstral="[\\ud800-\\udfff]",rsBreak="["+rsBreakRange+"]",rsCombo="["+rsComboRange+"]",rsDigits="\\d+",rsDingbat="[\\u2700-\\u27bf]",rsLower="[a-z\\xdf-\\xf6\\xf8-\\xff]",rsMisc="[^\\ud800-\\udfff"+rsBreakRange+rsDigits+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsNonAstral="[^\\ud800-\\udfff]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="[A-Z\\xc0-\\xd6\\xd8-\\xde]",rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",reOptMod="(?:"+rsCombo+"|"+rsFitz+")"+"?",rsSeq="[\\ufe0e\\ufe0f]?"+reOptMod+("(?:\\u200d(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")[\\ufe0e\\ufe0f]?"+reOptMod+")*"),rsEmoji="(?:"+[rsDingbat,rsRegional,rsSurrPair].join("|")+")"+rsSeq,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reApos=RegExp("['’]","g"),reComboMark=RegExp(rsCombo,"g"),reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g"),reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+(?:['’](?:d|ll|m|re|s|t|ve))?",rsUpper+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsDigits,rsEmoji].join("|"),"g"),reHasUnicode=RegExp("[\\u200d\\ud800-\\udfff"+rsComboRange+"\\ufe0e\\ufe0f]"),reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,contextProps=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],templateCounter=-1,typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags["[object Uint8ClampedArray]"]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags["[object Uint8ClampedArray]"]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=!1;var stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},freeParseFloat=parseFloat,freeParseInt=parseInt,freeGlobal="object"==typeof __webpack_require__.g&&__webpack_require__.g&&__webpack_require__.g.Object===Object&&__webpack_require__.g,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),freeExports=exports&&!exports.nodeType&&exports,freeModule=freeExports&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,freeProcess=moduleExports&&freeGlobal.process,nodeUtil=function(){try{var types=freeModule&&freeModule.require&&freeModule.require("util").types;return types||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch(e){}}(),nodeIsArrayBuffer=nodeUtil&&nodeUtil.isArrayBuffer,nodeIsDate=nodeUtil&&nodeUtil.isDate,nodeIsMap=nodeUtil&&nodeUtil.isMap,nodeIsRegExp=nodeUtil&&nodeUtil.isRegExp,nodeIsSet=nodeUtil&&nodeUtil.isSet,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray;function apply(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2])}return func.apply(thisArg,args)}function arrayAggregator(array,setter,iteratee,accumulator){for(var index=-1,length=null==array?0:array.length;++index<length;){var value=array[index];setter(accumulator,value,iteratee(value),array)}return accumulator}function arrayEach(array,iteratee){for(var index=-1,length=null==array?0:array.length;++index<length&&!1!==iteratee(array[index],index,array););return array}function arrayEachRight(array,iteratee){for(var length=null==array?0:array.length;length--&&!1!==iteratee(array[length],length,array););return array}function arrayEvery(array,predicate){for(var index=-1,length=null==array?0:array.length;++index<length;)if(!predicate(array[index],index,array))return!1;return!0}function arrayFilter(array,predicate){for(var index=-1,length=null==array?0:array.length,resIndex=0,result=[];++index<length;){var value=array[index];predicate(value,index,array)&&(result[resIndex++]=value)}return result}function arrayIncludes(array,value){return!!(null==array?0:array.length)&&baseIndexOf(array,value,0)>-1}function arrayIncludesWith(array,value,comparator){for(var index=-1,length=null==array?0:array.length;++index<length;)if(comparator(value,array[index]))return!0;return!1}function arrayMap(array,iteratee){for(var index=-1,length=null==array?0:array.length,result=Array(length);++index<length;)result[index]=iteratee(array[index],index,array);return result}function arrayPush(array,values){for(var index=-1,length=values.length,offset=array.length;++index<length;)array[offset+index]=values[index];return array}function arrayReduce(array,iteratee,accumulator,initAccum){var index=-1,length=null==array?0:array.length;for(initAccum&&length&&(accumulator=array[++index]);++index<length;)accumulator=iteratee(accumulator,array[index],index,array);return accumulator}function arrayReduceRight(array,iteratee,accumulator,initAccum){var length=null==array?0:array.length;for(initAccum&&length&&(accumulator=array[--length]);length--;)accumulator=iteratee(accumulator,array[length],length,array);return accumulator}function arraySome(array,predicate){for(var index=-1,length=null==array?0:array.length;++index<length;)if(predicate(array[index],index,array))return!0;return!1}var asciiSize=baseProperty("length");function baseFindKey(collection,predicate,eachFunc){var result;return eachFunc(collection,(function(value,key,collection){if(predicate(value,key,collection))return result=key,!1})),result}function baseFindIndex(array,predicate,fromIndex,fromRight){for(var length=array.length,index=fromIndex+(fromRight?1:-1);fromRight?index--:++index<length;)if(predicate(array[index],index,array))return index;return-1}function baseIndexOf(array,value,fromIndex){return value==value?function strictIndexOf(array,value,fromIndex){var index=fromIndex-1,length=array.length;for(;++index<length;)if(array[index]===value)return index;return-1}(array,value,fromIndex):baseFindIndex(array,baseIsNaN,fromIndex)}function baseIndexOfWith(array,value,fromIndex,comparator){for(var index=fromIndex-1,length=array.length;++index<length;)if(comparator(array[index],value))return index;return-1}function baseIsNaN(value){return value!=value}function baseMean(array,iteratee){var length=null==array?0:array.length;return length?baseSum(array,iteratee)/length:NaN}function baseProperty(key){return function(object){return null==object?undefined:object[key]}}function basePropertyOf(object){return function(key){return null==object?undefined:object[key]}}function baseReduce(collection,iteratee,accumulator,initAccum,eachFunc){return eachFunc(collection,(function(value,index,collection){accumulator=initAccum?(initAccum=!1,value):iteratee(accumulator,value,index,collection)})),accumulator}function baseSum(array,iteratee){for(var result,index=-1,length=array.length;++index<length;){var current=iteratee(array[index]);current!==undefined&&(result=result===undefined?current:result+current)}return result}function baseTimes(n,iteratee){for(var index=-1,result=Array(n);++index<n;)result[index]=iteratee(index);return result}function baseTrim(string){return string?string.slice(0,trimmedEndIndex(string)+1).replace(reTrimStart,""):string}function baseUnary(func){return function(value){return func(value)}}function baseValues(object,props){return arrayMap(props,(function(key){return object[key]}))}function cacheHas(cache,key){return cache.has(key)}function charsStartIndex(strSymbols,chrSymbols){for(var index=-1,length=strSymbols.length;++index<length&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1;);return index}function charsEndIndex(strSymbols,chrSymbols){for(var index=strSymbols.length;index--&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1;);return index}var deburrLetter=basePropertyOf({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),escapeHtmlChar=basePropertyOf({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function escapeStringChar(chr){return"\\"+stringEscapes[chr]}function hasUnicode(string){return reHasUnicode.test(string)}function mapToArray(map){var index=-1,result=Array(map.size);return map.forEach((function(value,key){result[++index]=[key,value]})),result}function overArg(func,transform){return function(arg){return func(transform(arg))}}function replaceHolders(array,placeholder){for(var index=-1,length=array.length,resIndex=0,result=[];++index<length;){var value=array[index];value!==placeholder&&value!==PLACEHOLDER||(array[index]=PLACEHOLDER,result[resIndex++]=index)}return result}function setToArray(set){var index=-1,result=Array(set.size);return set.forEach((function(value){result[++index]=value})),result}function setToPairs(set){var index=-1,result=Array(set.size);return set.forEach((function(value){result[++index]=[value,value]})),result}function stringSize(string){return hasUnicode(string)?function unicodeSize(string){var result=reUnicode.lastIndex=0;for(;reUnicode.test(string);)++result;return result}(string):asciiSize(string)}function stringToArray(string){return hasUnicode(string)?function unicodeToArray(string){return string.match(reUnicode)||[]}(string):function asciiToArray(string){return string.split("")}(string)}function trimmedEndIndex(string){for(var index=string.length;index--&&reWhitespace.test(string.charAt(index)););return index}var unescapeHtmlChar=basePropertyOf({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var _=function runInContext(context){var uid,Array=(context=null==context?root:_.defaults(root.Object(),context,_.pick(root,contextProps))).Array,Date=context.Date,Error=context.Error,Function=context.Function,Math=context.Math,Object=context.Object,RegExp=context.RegExp,String=context.String,TypeError=context.TypeError,arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=context["__core-js_shared__"],funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,idCounter=0,maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""))?"Symbol(src)_1."+uid:"",nativeObjectToString=objectProto.toString,objectCtorString=funcToString.call(Object),oldDash=root._,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Buffer=moduleExports?context.Buffer:undefined,Symbol=context.Symbol,Uint8Array=context.Uint8Array,allocUnsafe=Buffer?Buffer.allocUnsafe:undefined,getPrototype=overArg(Object.getPrototypeOf,Object),objectCreate=Object.create,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice,spreadableSymbol=Symbol?Symbol.isConcatSpreadable:undefined,symIterator=Symbol?Symbol.iterator:undefined,symToStringTag=Symbol?Symbol.toStringTag:undefined,defineProperty=function(){try{var func=getNative(Object,"defineProperty");return func({},"",{}),func}catch(e){}}(),ctxClearTimeout=context.clearTimeout!==root.clearTimeout&&context.clearTimeout,ctxNow=Date&&Date.now!==root.Date.now&&Date.now,ctxSetTimeout=context.setTimeout!==root.setTimeout&&context.setTimeout,nativeCeil=Math.ceil,nativeFloor=Math.floor,nativeGetSymbols=Object.getOwnPropertySymbols,nativeIsBuffer=Buffer?Buffer.isBuffer:undefined,nativeIsFinite=context.isFinite,nativeJoin=arrayProto.join,nativeKeys=overArg(Object.keys,Object),nativeMax=Math.max,nativeMin=Math.min,nativeNow=Date.now,nativeParseInt=context.parseInt,nativeRandom=Math.random,nativeReverse=arrayProto.reverse,DataView=getNative(context,"DataView"),Map=getNative(context,"Map"),Promise=getNative(context,"Promise"),Set=getNative(context,"Set"),WeakMap=getNative(context,"WeakMap"),nativeCreate=getNative(Object,"create"),metaMap=WeakMap&&new WeakMap,realNames={},dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap),symbolProto=Symbol?Symbol.prototype:undefined,symbolValueOf=symbolProto?symbolProto.valueOf:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;function lodash(value){if(isObjectLike(value)&&!isArray(value)&&!(value instanceof LazyWrapper)){if(value instanceof LodashWrapper)return value;if(hasOwnProperty.call(value,"__wrapped__"))return wrapperClone(value)}return new LodashWrapper(value)}var baseCreate=function(){function object(){}return function(proto){if(!isObject(proto))return{};if(objectCreate)return objectCreate(proto);object.prototype=proto;var result=new object;return object.prototype=undefined,result}}();function baseLodash(){}function LodashWrapper(value,chainAll){this.__wrapped__=value,this.__actions__=[],this.__chain__=!!chainAll,this.__index__=0,this.__values__=undefined}function LazyWrapper(value){this.__wrapped__=value,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Hash(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function ListCache(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function MapCache(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function SetCache(values){var index=-1,length=null==values?0:values.length;for(this.__data__=new MapCache;++index<length;)this.add(values[index])}function Stack(entries){var data=this.__data__=new ListCache(entries);this.size=data.size}function arrayLikeKeys(value,inherited){var isArr=isArray(value),isArg=!isArr&&isArguments(value),isBuff=!isArr&&!isArg&&isBuffer(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes(value.length,String):[],length=result.length;for(var key in value)!inherited&&!hasOwnProperty.call(value,key)||skipIndexes&&("length"==key||isBuff&&("offset"==key||"parent"==key)||isType&&("buffer"==key||"byteLength"==key||"byteOffset"==key)||isIndex(key,length))||result.push(key);return result}function arraySample(array){var length=array.length;return length?array[baseRandom(0,length-1)]:undefined}function arraySampleSize(array,n){return shuffleSelf(copyArray(array),baseClamp(n,0,array.length))}function arrayShuffle(array){return shuffleSelf(copyArray(array))}function assignMergeValue(object,key,value){(value!==undefined&&!eq(object[key],value)||value===undefined&&!(key in object))&&baseAssignValue(object,key,value)}function assignValue(object,key,value){var objValue=object[key];hasOwnProperty.call(object,key)&&eq(objValue,value)&&(value!==undefined||key in object)||baseAssignValue(object,key,value)}function assocIndexOf(array,key){for(var length=array.length;length--;)if(eq(array[length][0],key))return length;return-1}function baseAggregator(collection,setter,iteratee,accumulator){return baseEach(collection,(function(value,key,collection){setter(accumulator,value,iteratee(value),collection)})),accumulator}function baseAssign(object,source){return object&&copyObject(source,keys(source),object)}function baseAssignValue(object,key,value){"__proto__"==key&&defineProperty?defineProperty(object,key,{configurable:!0,enumerable:!0,value,writable:!0}):object[key]=value}function baseAt(object,paths){for(var index=-1,length=paths.length,result=Array(length),skip=null==object;++index<length;)result[index]=skip?undefined:get(object,paths[index]);return result}function baseClamp(number,lower,upper){return number==number&&(upper!==undefined&&(number=number<=upper?number:upper),lower!==undefined&&(number=number>=lower?number:lower)),number}function baseClone(value,bitmask,customizer,key,object,stack){var result,isDeep=1&bitmask,isFlat=2&bitmask,isFull=4&bitmask;if(customizer&&(result=object?customizer(value,key,object,stack):customizer(value)),result!==undefined)return result;if(!isObject(value))return value;var isArr=isArray(value);if(isArr){if(result=function initCloneArray(array){var length=array.length,result=new array.constructor(length);length&&"string"==typeof array[0]&&hasOwnProperty.call(array,"index")&&(result.index=array.index,result.input=array.input);return result}(value),!isDeep)return copyArray(value,result)}else{var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value))return cloneBuffer(value,isDeep);if(tag==objectTag||tag==argsTag||isFunc&&!object){if(result=isFlat||isFunc?{}:initCloneObject(value),!isDeep)return isFlat?function copySymbolsIn(source,object){return copyObject(source,getSymbolsIn(source),object)}(value,function baseAssignIn(object,source){return object&&copyObject(source,keysIn(source),object)}(result,value)):function copySymbols(source,object){return copyObject(source,getSymbols(source),object)}(value,baseAssign(result,value))}else{if(!cloneableTags[tag])return object?value:{};result=function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return cloneArrayBuffer(object);case boolTag:case dateTag:return new Ctor(+object);case dataViewTag:return function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength)}(object,isDeep);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:return cloneTypedArray(object,isDeep);case mapTag:return new Ctor;case numberTag:case stringTag:return new Ctor(object);case regexpTag:return function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));return result.lastIndex=regexp.lastIndex,result}(object);case setTag:return new Ctor;case symbolTag:return function cloneSymbol(symbol){return symbolValueOf?Object(symbolValueOf.call(symbol)):{}}(object)}}(value,tag,isDeep)}}stack||(stack=new Stack);var stacked=stack.get(value);if(stacked)return stacked;stack.set(value,result),isSet(value)?value.forEach((function(subValue){result.add(baseClone(subValue,bitmask,customizer,subValue,value,stack))})):isMap(value)&&value.forEach((function(subValue,key){result.set(key,baseClone(subValue,bitmask,customizer,key,value,stack))}));var props=isArr?undefined:(isFull?isFlat?getAllKeysIn:getAllKeys:isFlat?keysIn:keys)(value);return arrayEach(props||value,(function(subValue,key){props&&(subValue=value[key=subValue]),assignValue(result,key,baseClone(subValue,bitmask,customizer,key,value,stack))})),result}function baseConformsTo(object,source,props){var length=props.length;if(null==object)return!length;for(object=Object(object);length--;){var key=props[length],predicate=source[key],value=object[key];if(value===undefined&&!(key in object)||!predicate(value))return!1}return!0}function baseDelay(func,wait,args){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return setTimeout((function(){func.apply(undefined,args)}),wait)}function baseDifference(array,values,iteratee,comparator){var index=-1,includes=arrayIncludes,isCommon=!0,length=array.length,result=[],valuesLength=values.length;if(!length)return result;iteratee&&(values=arrayMap(values,baseUnary(iteratee))),comparator?(includes=arrayIncludesWith,isCommon=!1):values.length>=200&&(includes=cacheHas,isCommon=!1,values=new SetCache(values));outer:for(;++index<length;){var value=array[index],computed=null==iteratee?value:iteratee(value);if(value=comparator||0!==value?value:0,isCommon&&computed==computed){for(var valuesIndex=valuesLength;valuesIndex--;)if(values[valuesIndex]===computed)continue outer;result.push(value)}else includes(values,computed,comparator)||result.push(value)}return result}lodash.templateSettings={escape:reEscape,evaluate:reEvaluate,interpolate:reInterpolate,variable:"",imports:{_:lodash}},lodash.prototype=baseLodash.prototype,lodash.prototype.constructor=lodash,LodashWrapper.prototype=baseCreate(baseLodash.prototype),LodashWrapper.prototype.constructor=LodashWrapper,LazyWrapper.prototype=baseCreate(baseLodash.prototype),LazyWrapper.prototype.constructor=LazyWrapper,Hash.prototype.clear=function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0},Hash.prototype.delete=function hashDelete(key){var result=this.has(key)&&delete this.__data__[key];return this.size-=result?1:0,result},Hash.prototype.get=function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return"__lodash_hash_undefined__"===result?undefined:result}return hasOwnProperty.call(data,key)?data[key]:undefined},Hash.prototype.has=function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined:hasOwnProperty.call(data,key)},Hash.prototype.set=function hashSet(key,value){var data=this.__data__;return this.size+=this.has(key)?0:1,data[key]=nativeCreate&&value===undefined?"__lodash_hash_undefined__":value,this},ListCache.prototype.clear=function listCacheClear(){this.__data__=[],this.size=0},ListCache.prototype.delete=function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);return!(index<0)&&(index==data.length-1?data.pop():splice.call(data,index,1),--this.size,!0)},ListCache.prototype.get=function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined:data[index][1]},ListCache.prototype.has=function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1},ListCache.prototype.set=function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);return index<0?(++this.size,data.push([key,value])):data[index][1]=value,this},MapCache.prototype.clear=function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}},MapCache.prototype.delete=function mapCacheDelete(key){var result=getMapData(this,key).delete(key);return this.size-=result?1:0,result},MapCache.prototype.get=function mapCacheGet(key){return getMapData(this,key).get(key)},MapCache.prototype.has=function mapCacheHas(key){return getMapData(this,key).has(key)},MapCache.prototype.set=function mapCacheSet(key,value){var data=getMapData(this,key),size=data.size;return data.set(key,value),this.size+=data.size==size?0:1,this},SetCache.prototype.add=SetCache.prototype.push=function setCacheAdd(value){return this.__data__.set(value,"__lodash_hash_undefined__"),this},SetCache.prototype.has=function setCacheHas(value){return this.__data__.has(value)},Stack.prototype.clear=function stackClear(){this.__data__=new ListCache,this.size=0},Stack.prototype.delete=function stackDelete(key){var data=this.__data__,result=data.delete(key);return this.size=data.size,result},Stack.prototype.get=function stackGet(key){return this.__data__.get(key)},Stack.prototype.has=function stackHas(key){return this.__data__.has(key)},Stack.prototype.set=function stackSet(key,value){var data=this.__data__;if(data instanceof ListCache){var pairs=data.__data__;if(!Map||pairs.length<199)return pairs.push([key,value]),this.size=++data.size,this;data=this.__data__=new MapCache(pairs)}return data.set(key,value),this.size=data.size,this};var baseEach=createBaseEach(baseForOwn),baseEachRight=createBaseEach(baseForOwnRight,!0);function baseEvery(collection,predicate){var result=!0;return baseEach(collection,(function(value,index,collection){return result=!!predicate(value,index,collection)})),result}function baseExtremum(array,iteratee,comparator){for(var index=-1,length=array.length;++index<length;){var value=array[index],current=iteratee(value);if(null!=current&&(computed===undefined?current==current&&!isSymbol(current):comparator(current,computed)))var computed=current,result=value}return result}function baseFilter(collection,predicate){var result=[];return baseEach(collection,(function(value,index,collection){predicate(value,index,collection)&&result.push(value)})),result}function baseFlatten(array,depth,predicate,isStrict,result){var index=-1,length=array.length;for(predicate||(predicate=isFlattenable),result||(result=[]);++index<length;){var value=array[index];depth>0&&predicate(value)?depth>1?baseFlatten(value,depth-1,predicate,isStrict,result):arrayPush(result,value):isStrict||(result[result.length]=value)}return result}var baseFor=createBaseFor(),baseForRight=createBaseFor(!0);function baseForOwn(object,iteratee){return object&&baseFor(object,iteratee,keys)}function baseForOwnRight(object,iteratee){return object&&baseForRight(object,iteratee,keys)}function baseFunctions(object,props){return arrayFilter(props,(function(key){return isFunction(object[key])}))}function baseGet(object,path){for(var index=0,length=(path=castPath(path,object)).length;null!=object&&index<length;)object=object[toKey(path[index++])];return index&&index==length?object:undefined}function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return isArray(object)?result:arrayPush(result,symbolsFunc(object))}function baseGetTag(value){return null==value?value===undefined?"[object Undefined]":"[object Null]":symToStringTag&&symToStringTag in Object(value)?function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=undefined;var unmasked=!0}catch(e){}var result=nativeObjectToString.call(value);unmasked&&(isOwn?value[symToStringTag]=tag:delete value[symToStringTag]);return result}(value):function objectToString(value){return nativeObjectToString.call(value)}(value)}function baseGt(value,other){return value>other}function baseHas(object,key){return null!=object&&hasOwnProperty.call(object,key)}function baseHasIn(object,key){return null!=object&&key in Object(object)}function baseIntersection(arrays,iteratee,comparator){for(var includes=comparator?arrayIncludesWith:arrayIncludes,length=arrays[0].length,othLength=arrays.length,othIndex=othLength,caches=Array(othLength),maxLength=1/0,result=[];othIndex--;){var array=arrays[othIndex];othIndex&&iteratee&&(array=arrayMap(array,baseUnary(iteratee))),maxLength=nativeMin(array.length,maxLength),caches[othIndex]=!comparator&&(iteratee||length>=120&&array.length>=120)?new SetCache(othIndex&&array):undefined}array=arrays[0];var index=-1,seen=caches[0];outer:for(;++index<length&&result.length<maxLength;){var value=array[index],computed=iteratee?iteratee(value):value;if(value=comparator||0!==value?value:0,!(seen?cacheHas(seen,computed):includes(result,computed,comparator))){for(othIndex=othLength;--othIndex;){var cache=caches[othIndex];if(!(cache?cacheHas(cache,computed):includes(arrays[othIndex],computed,comparator)))continue outer}seen&&seen.push(computed),result.push(value)}}return result}function baseInvoke(object,path,args){var func=null==(object=parent(object,path=castPath(path,object)))?object:object[toKey(last(path))];return null==func?undefined:apply(func,object,args)}function baseIsArguments(value){return isObjectLike(value)&&baseGetTag(value)==argsTag}function baseIsEqual(value,other,bitmask,customizer,stack){return value===other||(null==value||null==other||!isObjectLike(value)&&!isObjectLike(other)?value!=value&&other!=other:function baseIsEqualDeep(object,other,bitmask,customizer,equalFunc,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=objIsArr?arrayTag:getTag(object),othTag=othIsArr?arrayTag:getTag(other),objIsObj=(objTag=objTag==argsTag?objectTag:objTag)==objectTag,othIsObj=(othTag=othTag==argsTag?objectTag:othTag)==objectTag,isSameTag=objTag==othTag;if(isSameTag&&isBuffer(object)){if(!isBuffer(other))return!1;objIsArr=!0,objIsObj=!1}if(isSameTag&&!objIsObj)return stack||(stack=new Stack),objIsArr||isTypedArray(object)?equalArrays(object,other,bitmask,customizer,equalFunc,stack):function equalByTag(object,other,tag,bitmask,customizer,equalFunc,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset)return!1;object=object.buffer,other=other.buffer;case arrayBufferTag:return!(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other)));case boolTag:case dateTag:case numberTag:return eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag:return object==other+"";case mapTag:var convert=mapToArray;case setTag:var isPartial=1&bitmask;if(convert||(convert=setToArray),object.size!=other.size&&!isPartial)return!1;var stacked=stack.get(object);if(stacked)return stacked==other;bitmask|=2,stack.set(object,other);var result=equalArrays(convert(object),convert(other),bitmask,customizer,equalFunc,stack);return stack.delete(object),result;case symbolTag:if(symbolValueOf)return symbolValueOf.call(object)==symbolValueOf.call(other)}return!1}(object,other,objTag,bitmask,customizer,equalFunc,stack);if(!(1&bitmask)){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;return stack||(stack=new Stack),equalFunc(objUnwrapped,othUnwrapped,bitmask,customizer,stack)}}if(!isSameTag)return!1;return stack||(stack=new Stack),function equalObjects(object,other,bitmask,customizer,equalFunc,stack){var isPartial=1&bitmask,objProps=getAllKeys(object),objLength=objProps.length,othProps=getAllKeys(other),othLength=othProps.length;if(objLength!=othLength&&!isPartial)return!1;var index=objLength;for(;index--;){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty.call(other,key)))return!1}var objStacked=stack.get(object),othStacked=stack.get(other);if(objStacked&&othStacked)return objStacked==other&&othStacked==object;var result=!0;stack.set(object,other),stack.set(other,object);var skipCtor=isPartial;for(;++index<objLength;){var objValue=object[key=objProps[index]],othValue=other[key];if(customizer)var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack);if(!(compared===undefined?objValue===othValue||equalFunc(objValue,othValue,bitmask,customizer,stack):compared)){result=!1;break}skipCtor||(skipCtor="constructor"==key)}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;objCtor==othCtor||!("constructor"in object)||!("constructor"in other)||"function"==typeof objCtor&&objCtor instanceof objCtor&&"function"==typeof othCtor&&othCtor instanceof othCtor||(result=!1)}return stack.delete(object),stack.delete(other),result}(object,other,bitmask,customizer,equalFunc,stack)}(value,other,bitmask,customizer,baseIsEqual,stack))}function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(null==object)return!length;for(object=Object(object);index--;){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object))return!1}for(;++index<length;){var key=(data=matchData[index])[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(objValue===undefined&&!(key in object))return!1}else{var stack=new Stack;if(customizer)var result=customizer(objValue,srcValue,key,object,source,stack);if(!(result===undefined?baseIsEqual(srcValue,objValue,3,customizer,stack):result))return!1}}return!0}function baseIsNative(value){return!(!isObject(value)||function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}(value))&&(isFunction(value)?reIsNative:reIsHostCtor).test(toSource(value))}function baseIteratee(value){return"function"==typeof value?value:null==value?identity:"object"==typeof value?isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value):property(value)}function baseKeys(object){if(!isPrototype(object))return nativeKeys(object);var result=[];for(var key in Object(object))hasOwnProperty.call(object,key)&&"constructor"!=key&&result.push(key);return result}function baseKeysIn(object){if(!isObject(object))return function nativeKeysIn(object){var result=[];if(null!=object)for(var key in Object(object))result.push(key);return result}(object);var isProto=isPrototype(object),result=[];for(var key in object)("constructor"!=key||!isProto&&hasOwnProperty.call(object,key))&&result.push(key);return result}function baseLt(value,other){return value<other}function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,(function(value,key,collection){result[++index]=iteratee(value,key,collection)})),result}function baseMatches(source){var matchData=getMatchData(source);return 1==matchData.length&&matchData[0][2]?matchesStrictComparable(matchData[0][0],matchData[0][1]):function(object){return object===source||baseIsMatch(object,source,matchData)}}function baseMatchesProperty(path,srcValue){return isKey(path)&&isStrictComparable(srcValue)?matchesStrictComparable(toKey(path),srcValue):function(object){var objValue=get(object,path);return objValue===undefined&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,3)}}function baseMerge(object,source,srcIndex,customizer,stack){object!==source&&baseFor(source,(function(srcValue,key){if(stack||(stack=new Stack),isObject(srcValue))!function baseMergeDeep(object,source,key,srcIndex,mergeFunc,customizer,stack){var objValue=safeGet(object,key),srcValue=safeGet(source,key),stacked=stack.get(srcValue);if(stacked)return void assignMergeValue(object,key,stacked);var newValue=customizer?customizer(objValue,srcValue,key+"",object,source,stack):undefined,isCommon=newValue===undefined;if(isCommon){var isArr=isArray(srcValue),isBuff=!isArr&&isBuffer(srcValue),isTyped=!isArr&&!isBuff&&isTypedArray(srcValue);newValue=srcValue,isArr||isBuff||isTyped?isArray(objValue)?newValue=objValue:isArrayLikeObject(objValue)?newValue=copyArray(objValue):isBuff?(isCommon=!1,newValue=cloneBuffer(srcValue,!0)):isTyped?(isCommon=!1,newValue=cloneTypedArray(srcValue,!0)):newValue=[]:isPlainObject(srcValue)||isArguments(srcValue)?(newValue=objValue,isArguments(objValue)?newValue=toPlainObject(objValue):isObject(objValue)&&!isFunction(objValue)||(newValue=initCloneObject(srcValue))):isCommon=!1}isCommon&&(stack.set(srcValue,newValue),mergeFunc(newValue,srcValue,srcIndex,customizer,stack),stack.delete(srcValue));assignMergeValue(object,key,newValue)}(object,source,key,srcIndex,baseMerge,customizer,stack);else{var newValue=customizer?customizer(safeGet(object,key),srcValue,key+"",object,source,stack):undefined;newValue===undefined&&(newValue=srcValue),assignMergeValue(object,key,newValue)}}),keysIn)}function baseNth(array,n){var length=array.length;if(length)return isIndex(n+=n<0?length:0,length)?array[n]:undefined}function baseOrderBy(collection,iteratees,orders){iteratees=iteratees.length?arrayMap(iteratees,(function(iteratee){return isArray(iteratee)?function(value){return baseGet(value,1===iteratee.length?iteratee[0]:iteratee)}:iteratee})):[identity];var index=-1;iteratees=arrayMap(iteratees,baseUnary(getIteratee()));var result=baseMap(collection,(function(value,key,collection){var criteria=arrayMap(iteratees,(function(iteratee){return iteratee(value)}));return{criteria,index:++index,value}}));return function baseSortBy(array,comparer){var length=array.length;for(array.sort(comparer);length--;)array[length]=array[length].value;return array}(result,(function(object,other){return function compareMultiple(object,other,orders){var index=-1,objCriteria=object.criteria,othCriteria=other.criteria,length=objCriteria.length,ordersLength=orders.length;for(;++index<length;){var result=compareAscending(objCriteria[index],othCriteria[index]);if(result)return index>=ordersLength?result:result*("desc"==orders[index]?-1:1)}return object.index-other.index}(object,other,orders)}))}function basePickBy(object,paths,predicate){for(var index=-1,length=paths.length,result={};++index<length;){var path=paths[index],value=baseGet(object,path);predicate(value,path)&&baseSet(result,castPath(path,object),value)}return result}function basePullAll(array,values,iteratee,comparator){var indexOf=comparator?baseIndexOfWith:baseIndexOf,index=-1,length=values.length,seen=array;for(array===values&&(values=copyArray(values)),iteratee&&(seen=arrayMap(array,baseUnary(iteratee)));++index<length;)for(var fromIndex=0,value=values[index],computed=iteratee?iteratee(value):value;(fromIndex=indexOf(seen,computed,fromIndex,comparator))>-1;)seen!==array&&splice.call(seen,fromIndex,1),splice.call(array,fromIndex,1);return array}function basePullAt(array,indexes){for(var length=array?indexes.length:0,lastIndex=length-1;length--;){var index=indexes[length];if(length==lastIndex||index!==previous){var previous=index;isIndex(index)?splice.call(array,index,1):baseUnset(array,index)}}return array}function baseRandom(lower,upper){return lower+nativeFloor(nativeRandom()*(upper-lower+1))}function baseRepeat(string,n){var result="";if(!string||n<1||n>9007199254740991)return result;do{n%2&&(result+=string),(n=nativeFloor(n/2))&&(string+=string)}while(n);return result}function baseRest(func,start){return setToString(overRest(func,start,identity),func+"")}function baseSample(collection){return arraySample(values(collection))}function baseSampleSize(collection,n){var array=values(collection);return shuffleSelf(array,baseClamp(n,0,array.length))}function baseSet(object,path,value,customizer){if(!isObject(object))return object;for(var index=-1,length=(path=castPath(path,object)).length,lastIndex=length-1,nested=object;null!=nested&&++index<length;){var key=toKey(path[index]),newValue=value;if("__proto__"===key||"constructor"===key||"prototype"===key)return object;if(index!=lastIndex){var objValue=nested[key];(newValue=customizer?customizer(objValue,key,nested):undefined)===undefined&&(newValue=isObject(objValue)?objValue:isIndex(path[index+1])?[]:{})}assignValue(nested,key,newValue),nested=nested[key]}return object}var baseSetData=metaMap?function(func,data){return metaMap.set(func,data),func}:identity,baseSetToString=defineProperty?function(func,string){return defineProperty(func,"toString",{configurable:!0,enumerable:!1,value:constant(string),writable:!0})}:identity;function baseShuffle(collection){return shuffleSelf(values(collection))}function baseSlice(array,start,end){var index=-1,length=array.length;start<0&&(start=-start>length?0:length+start),(end=end>length?length:end)<0&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++index<length;)result[index]=array[index+start];return result}function baseSome(collection,predicate){var result;return baseEach(collection,(function(value,index,collection){return!(result=predicate(value,index,collection))})),!!result}function baseSortedIndex(array,value,retHighest){var low=0,high=null==array?low:array.length;if("number"==typeof value&&value==value&&high<=2147483647){for(;low<high;){var mid=low+high>>>1,computed=array[mid];null!==computed&&!isSymbol(computed)&&(retHighest?computed<=value:computed<value)?low=mid+1:high=mid}return high}return baseSortedIndexBy(array,value,identity,retHighest)}function baseSortedIndexBy(array,value,iteratee,retHighest){var low=0,high=null==array?0:array.length;if(0===high)return 0;for(var valIsNaN=(value=iteratee(value))!=value,valIsNull=null===value,valIsSymbol=isSymbol(value),valIsUndefined=value===undefined;low<high;){var mid=nativeFloor((low+high)/2),computed=iteratee(array[mid]),othIsDefined=computed!==undefined,othIsNull=null===computed,othIsReflexive=computed==computed,othIsSymbol=isSymbol(computed);if(valIsNaN)var setLow=retHighest||othIsReflexive;else setLow=valIsUndefined?othIsReflexive&&(retHighest||othIsDefined):valIsNull?othIsReflexive&&othIsDefined&&(retHighest||!othIsNull):valIsSymbol?othIsReflexive&&othIsDefined&&!othIsNull&&(retHighest||!othIsSymbol):!othIsNull&&!othIsSymbol&&(retHighest?computed<=value:computed<value);setLow?low=mid+1:high=mid}return nativeMin(high,4294967294)}function baseSortedUniq(array,iteratee){for(var index=-1,length=array.length,resIndex=0,result=[];++index<length;){var value=array[index],computed=iteratee?iteratee(value):value;if(!index||!eq(computed,seen)){var seen=computed;result[resIndex++]=0===value?0:value}}return result}function baseToNumber(value){return"number"==typeof value?value:isSymbol(value)?NaN:+value}function baseToString(value){if("string"==typeof value)return value;if(isArray(value))return arrayMap(value,baseToString)+"";if(isSymbol(value))return symbolToString?symbolToString.call(value):"";var result=value+"";return"0"==result&&1/value==-Infinity?"-0":result}function baseUniq(array,iteratee,comparator){var index=-1,includes=arrayIncludes,length=array.length,isCommon=!0,result=[],seen=result;if(comparator)isCommon=!1,includes=arrayIncludesWith;else if(length>=200){var set=iteratee?null:createSet(array);if(set)return setToArray(set);isCommon=!1,includes=cacheHas,seen=new SetCache}else seen=iteratee?[]:result;outer:for(;++index<length;){var value=array[index],computed=iteratee?iteratee(value):value;if(value=comparator||0!==value?value:0,isCommon&&computed==computed){for(var seenIndex=seen.length;seenIndex--;)if(seen[seenIndex]===computed)continue outer;iteratee&&seen.push(computed),result.push(value)}else includes(seen,computed,comparator)||(seen!==result&&seen.push(computed),result.push(value))}return result}function baseUnset(object,path){return null==(object=parent(object,path=castPath(path,object)))||delete object[toKey(last(path))]}function baseUpdate(object,path,updater,customizer){return baseSet(object,path,updater(baseGet(object,path)),customizer)}function baseWhile(array,predicate,isDrop,fromRight){for(var length=array.length,index=fromRight?length:-1;(fromRight?index--:++index<length)&&predicate(array[index],index,array););return isDrop?baseSlice(array,fromRight?0:index,fromRight?index+1:length):baseSlice(array,fromRight?index+1:0,fromRight?length:index)}function baseWrapperValue(value,actions){var result=value;return result instanceof LazyWrapper&&(result=result.value()),arrayReduce(actions,(function(result,action){return action.func.apply(action.thisArg,arrayPush([result],action.args))}),result)}function baseXor(arrays,iteratee,comparator){var length=arrays.length;if(length<2)return length?baseUniq(arrays[0]):[];for(var index=-1,result=Array(length);++index<length;)for(var array=arrays[index],othIndex=-1;++othIndex<length;)othIndex!=index&&(result[index]=baseDifference(result[index]||array,arrays[othIndex],iteratee,comparator));return baseUniq(baseFlatten(result,1),iteratee,comparator)}function baseZipObject(props,values,assignFunc){for(var index=-1,length=props.length,valsLength=values.length,result={};++index<length;){var value=index<valsLength?values[index]:undefined;assignFunc(result,props[index],value)}return result}function castArrayLikeObject(value){return isArrayLikeObject(value)?value:[]}function castFunction(value){return"function"==typeof value?value:identity}function castPath(value,object){return isArray(value)?value:isKey(value,object)?[value]:stringToPath(toString(value))}var castRest=baseRest;function castSlice(array,start,end){var length=array.length;return end=end===undefined?length:end,!start&&end>=length?array:baseSlice(array,start,end)}var clearTimeout=ctxClearTimeout||function(id){return root.clearTimeout(id)};function cloneBuffer(buffer,isDeep){if(isDeep)return buffer.slice();var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);return buffer.copy(result),result}function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);return new Uint8Array(result).set(new Uint8Array(arrayBuffer)),result}function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length)}function compareAscending(value,other){if(value!==other){var valIsDefined=value!==undefined,valIsNull=null===value,valIsReflexive=value==value,valIsSymbol=isSymbol(value),othIsDefined=other!==undefined,othIsNull=null===other,othIsReflexive=other==other,othIsSymbol=isSymbol(other);if(!othIsNull&&!othIsSymbol&&!valIsSymbol&&value>other||valIsSymbol&&othIsDefined&&othIsReflexive&&!othIsNull&&!othIsSymbol||valIsNull&&othIsDefined&&othIsReflexive||!valIsDefined&&othIsReflexive||!valIsReflexive)return 1;if(!valIsNull&&!valIsSymbol&&!othIsSymbol&&value<other||othIsSymbol&&valIsDefined&&valIsReflexive&&!valIsNull&&!valIsSymbol||othIsNull&&valIsDefined&&valIsReflexive||!othIsDefined&&valIsReflexive||!othIsReflexive)return-1}return 0}function composeArgs(args,partials,holders,isCurried){for(var argsIndex=-1,argsLength=args.length,holdersLength=holders.length,leftIndex=-1,leftLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(leftLength+rangeLength),isUncurried=!isCurried;++leftIndex<leftLength;)result[leftIndex]=partials[leftIndex];for(;++argsIndex<holdersLength;)(isUncurried||argsIndex<argsLength)&&(result[holders[argsIndex]]=args[argsIndex]);for(;rangeLength--;)result[leftIndex++]=args[argsIndex++];return result}function composeArgsRight(args,partials,holders,isCurried){for(var argsIndex=-1,argsLength=args.length,holdersIndex=-1,holdersLength=holders.length,rightIndex=-1,rightLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(rangeLength+rightLength),isUncurried=!isCurried;++argsIndex<rangeLength;)result[argsIndex]=args[argsIndex];for(var offset=argsIndex;++rightIndex<rightLength;)result[offset+rightIndex]=partials[rightIndex];for(;++holdersIndex<holdersLength;)(isUncurried||argsIndex<argsLength)&&(result[offset+holders[holdersIndex]]=args[argsIndex++]);return result}function copyArray(source,array){var index=-1,length=source.length;for(array||(array=Array(length));++index<length;)array[index]=source[index];return array}function copyObject(source,props,object,customizer){var isNew=!object;object||(object={});for(var index=-1,length=props.length;++index<length;){var key=props[index],newValue=customizer?customizer(object[key],source[key],key,object,source):undefined;newValue===undefined&&(newValue=source[key]),isNew?baseAssignValue(object,key,newValue):assignValue(object,key,newValue)}return object}function createAggregator(setter,initializer){return function(collection,iteratee){var func=isArray(collection)?arrayAggregator:baseAggregator,accumulator=initializer?initializer():{};return func(collection,setter,getIteratee(iteratee,2),accumulator)}}function createAssigner(assigner){return baseRest((function(object,sources){var index=-1,length=sources.length,customizer=length>1?sources[length-1]:undefined,guard=length>2?sources[2]:undefined;for(customizer=assigner.length>3&&"function"==typeof customizer?(length--,customizer):undefined,guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=length<3?undefined:customizer,length=1),object=Object(object);++index<length;){var source=sources[index];source&&assigner(object,source,index,customizer)}return object}))}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){if(null==collection)return collection;if(!isArrayLike(collection))return eachFunc(collection,iteratee);for(var length=collection.length,index=fromRight?length:-1,iterable=Object(collection);(fromRight?index--:++index<length)&&!1!==iteratee(iterable[index],index,iterable););return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){for(var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;length--;){var key=props[fromRight?length:++index];if(!1===iteratee(iterable[key],key,iterable))break}return object}}function createCaseFirst(methodName){return function(string){var strSymbols=hasUnicode(string=toString(string))?stringToArray(string):undefined,chr=strSymbols?strSymbols[0]:string.charAt(0),trailing=strSymbols?castSlice(strSymbols,1).join(""):string.slice(1);return chr[methodName]()+trailing}}function createCompounder(callback){return function(string){return arrayReduce(words(deburr(string).replace(reApos,"")),callback,"")}}function createCtor(Ctor){return function(){var args=arguments;switch(args.length){case 0:return new Ctor;case 1:return new Ctor(args[0]);case 2:return new Ctor(args[0],args[1]);case 3:return new Ctor(args[0],args[1],args[2]);case 4:return new Ctor(args[0],args[1],args[2],args[3]);case 5:return new Ctor(args[0],args[1],args[2],args[3],args[4]);case 6:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5]);case 7:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5],args[6])}var thisBinding=baseCreate(Ctor.prototype),result=Ctor.apply(thisBinding,args);return isObject(result)?result:thisBinding}}function createFind(findIndexFunc){return function(collection,predicate,fromIndex){var iterable=Object(collection);if(!isArrayLike(collection)){var iteratee=getIteratee(predicate,3);collection=keys(collection),predicate=function(key){return iteratee(iterable[key],key,iterable)}}var index=findIndexFunc(collection,predicate,fromIndex);return index>-1?iterable[iteratee?collection[index]:index]:undefined}}function createFlow(fromRight){return flatRest((function(funcs){var length=funcs.length,index=length,prereq=LodashWrapper.prototype.thru;for(fromRight&&funcs.reverse();index--;){var func=funcs[index];if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);if(prereq&&!wrapper&&"wrapper"==getFuncName(func))var wrapper=new LodashWrapper([],!0)}for(index=wrapper?index:length;++index<length;){var funcName=getFuncName(func=funcs[index]),data="wrapper"==funcName?getData(func):undefined;wrapper=data&&isLaziable(data[0])&&424==data[1]&&!data[4].length&&1==data[9]?wrapper[getFuncName(data[0])].apply(wrapper,data[3]):1==func.length&&isLaziable(func)?wrapper[funcName]():wrapper.thru(func)}return function(){var args=arguments,value=args[0];if(wrapper&&1==args.length&&isArray(value))return wrapper.plant(value).value();for(var index=0,result=length?funcs[index].apply(this,args):value;++index<length;)result=funcs[index].call(this,result);return result}}))}function createHybrid(func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity){var isAry=128&bitmask,isBind=1&bitmask,isBindKey=2&bitmask,isCurried=24&bitmask,isFlip=512&bitmask,Ctor=isBindKey?undefined:createCtor(func);return function wrapper(){for(var length=arguments.length,args=Array(length),index=length;index--;)args[index]=arguments[index];if(isCurried)var placeholder=getHolder(wrapper),holdersCount=function countHolders(array,placeholder){for(var length=array.length,result=0;length--;)array[length]===placeholder&&++result;return result}(args,placeholder);if(partials&&(args=composeArgs(args,partials,holders,isCurried)),partialsRight&&(args=composeArgsRight(args,partialsRight,holdersRight,isCurried)),length-=holdersCount,isCurried&&length<arity){var newHolders=replaceHolders(args,placeholder);return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,thisArg,args,newHolders,argPos,ary,arity-length)}var thisBinding=isBind?thisArg:this,fn=isBindKey?thisBinding[func]:func;return length=args.length,argPos?args=function reorder(array,indexes){var arrLength=array.length,length=nativeMin(indexes.length,arrLength),oldArray=copyArray(array);for(;length--;){var index=indexes[length];array[length]=isIndex(index,arrLength)?oldArray[index]:undefined}return array}(args,argPos):isFlip&&length>1&&args.reverse(),isAry&&ary<length&&(args.length=ary),this&&this!==root&&this instanceof wrapper&&(fn=Ctor||createCtor(fn)),fn.apply(thisBinding,args)}}function createInverter(setter,toIteratee){return function(object,iteratee){return function baseInverter(object,setter,iteratee,accumulator){return baseForOwn(object,(function(value,key,object){setter(accumulator,iteratee(value),key,object)})),accumulator}(object,setter,toIteratee(iteratee),{})}}function createMathOperation(operator,defaultValue){return function(value,other){var result;if(value===undefined&&other===undefined)return defaultValue;if(value!==undefined&&(result=value),other!==undefined){if(result===undefined)return other;"string"==typeof value||"string"==typeof other?(value=baseToString(value),other=baseToString(other)):(value=baseToNumber(value),other=baseToNumber(other)),result=operator(value,other)}return result}}function createOver(arrayFunc){return flatRest((function(iteratees){return iteratees=arrayMap(iteratees,baseUnary(getIteratee())),baseRest((function(args){var thisArg=this;return arrayFunc(iteratees,(function(iteratee){return apply(iteratee,thisArg,args)}))}))}))}function createPadding(length,chars){var charsLength=(chars=chars===undefined?" ":baseToString(chars)).length;if(charsLength<2)return charsLength?baseRepeat(chars,length):chars;var result=baseRepeat(chars,nativeCeil(length/stringSize(chars)));return hasUnicode(chars)?castSlice(stringToArray(result),0,length).join(""):result.slice(0,length)}function createRange(fromRight){return function(start,end,step){return step&&"number"!=typeof step&&isIterateeCall(start,end,step)&&(end=step=undefined),start=toFinite(start),end===undefined?(end=start,start=0):end=toFinite(end),function baseRange(start,end,step,fromRight){for(var index=-1,length=nativeMax(nativeCeil((end-start)/(step||1)),0),result=Array(length);length--;)result[fromRight?length:++index]=start,start+=step;return result}(start,end,step=step===undefined?start<end?1:-1:toFinite(step),fromRight)}}function createRelationalOperation(operator){return function(value,other){return"string"==typeof value&&"string"==typeof other||(value=toNumber(value),other=toNumber(other)),operator(value,other)}}function createRecurry(func,bitmask,wrapFunc,placeholder,thisArg,partials,holders,argPos,ary,arity){var isCurry=8&bitmask;bitmask|=isCurry?32:64,4&(bitmask&=~(isCurry?64:32))||(bitmask&=-4);var newData=[func,bitmask,thisArg,isCurry?partials:undefined,isCurry?holders:undefined,isCurry?undefined:partials,isCurry?undefined:holders,argPos,ary,arity],result=wrapFunc.apply(undefined,newData);return isLaziable(func)&&setData(result,newData),result.placeholder=placeholder,setWrapToString(result,func,bitmask)}function createRound(methodName){var func=Math[methodName];return function(number,precision){if(number=toNumber(number),(precision=null==precision?0:nativeMin(toInteger(precision),292))&&nativeIsFinite(number)){var pair=(toString(number)+"e").split("e");return+((pair=(toString(func(pair[0]+"e"+(+pair[1]+precision)))+"e").split("e"))[0]+"e"+(+pair[1]-precision))}return func(number)}}var createSet=Set&&1/setToArray(new Set([,-0]))[1]==Infinity?function(values){return new Set(values)}:noop;function createToPairs(keysFunc){return function(object){var tag=getTag(object);return tag==mapTag?mapToArray(object):tag==setTag?setToPairs(object):function baseToPairs(object,props){return arrayMap(props,(function(key){return[key,object[key]]}))}(object,keysFunc(object))}}function createWrap(func,bitmask,thisArg,partials,holders,argPos,ary,arity){var isBindKey=2&bitmask;if(!isBindKey&&"function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);var length=partials?partials.length:0;if(length||(bitmask&=-97,partials=holders=undefined),ary=ary===undefined?ary:nativeMax(toInteger(ary),0),arity=arity===undefined?arity:toInteger(arity),length-=holders?holders.length:0,64&bitmask){var partialsRight=partials,holdersRight=holders;partials=holders=undefined}var data=isBindKey?undefined:getData(func),newData=[func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity];if(data&&function mergeData(data,source){var bitmask=data[1],srcBitmask=source[1],newBitmask=bitmask|srcBitmask,isCommon=newBitmask<131,isCombo=128==srcBitmask&&8==bitmask||128==srcBitmask&&256==bitmask&&data[7].length<=source[8]||384==srcBitmask&&source[7].length<=source[8]&&8==bitmask;if(!isCommon&&!isCombo)return data;1&srcBitmask&&(data[2]=source[2],newBitmask|=1&bitmask?0:4);var value=source[3];if(value){var partials=data[3];data[3]=partials?composeArgs(partials,value,source[4]):value,data[4]=partials?replaceHolders(data[3],PLACEHOLDER):source[4]}(value=source[5])&&(partials=data[5],data[5]=partials?composeArgsRight(partials,value,source[6]):value,data[6]=partials?replaceHolders(data[5],PLACEHOLDER):source[6]);(value=source[7])&&(data[7]=value);128&srcBitmask&&(data[8]=null==data[8]?source[8]:nativeMin(data[8],source[8]));null==data[9]&&(data[9]=source[9]);return data[0]=source[0],data[1]=newBitmask,data}(newData,data),func=newData[0],bitmask=newData[1],thisArg=newData[2],partials=newData[3],holders=newData[4],!(arity=newData[9]=newData[9]===undefined?isBindKey?0:func.length:nativeMax(newData[9]-length,0))&&24&bitmask&&(bitmask&=-25),bitmask&&1!=bitmask)result=8==bitmask||16==bitmask?function createCurry(func,bitmask,arity){var Ctor=createCtor(func);return function wrapper(){for(var length=arguments.length,args=Array(length),index=length,placeholder=getHolder(wrapper);index--;)args[index]=arguments[index];var holders=length<3&&args[0]!==placeholder&&args[length-1]!==placeholder?[]:replaceHolders(args,placeholder);return(length-=holders.length)<arity?createRecurry(func,bitmask,createHybrid,wrapper.placeholder,undefined,args,holders,undefined,undefined,arity-length):apply(this&&this!==root&&this instanceof wrapper?Ctor:func,this,args)}}(func,bitmask,arity):32!=bitmask&&33!=bitmask||holders.length?createHybrid.apply(undefined,newData):function createPartial(func,bitmask,thisArg,partials){var isBind=1&bitmask,Ctor=createCtor(func);return function wrapper(){for(var argsIndex=-1,argsLength=arguments.length,leftIndex=-1,leftLength=partials.length,args=Array(leftLength+argsLength),fn=this&&this!==root&&this instanceof wrapper?Ctor:func;++leftIndex<leftLength;)args[leftIndex]=partials[leftIndex];for(;argsLength--;)args[leftIndex++]=arguments[++argsIndex];return apply(fn,isBind?thisArg:this,args)}}(func,bitmask,thisArg,partials);else var result=function createBind(func,bitmask,thisArg){var isBind=1&bitmask,Ctor=createCtor(func);return function wrapper(){return(this&&this!==root&&this instanceof wrapper?Ctor:func).apply(isBind?thisArg:this,arguments)}}(func,bitmask,thisArg);return setWrapToString((data?baseSetData:setData)(result,newData),func,bitmask)}function customDefaultsAssignIn(objValue,srcValue,key,object){return objValue===undefined||eq(objValue,objectProto[key])&&!hasOwnProperty.call(object,key)?srcValue:objValue}function customDefaultsMerge(objValue,srcValue,key,object,source,stack){return isObject(objValue)&&isObject(srcValue)&&(stack.set(srcValue,objValue),baseMerge(objValue,srcValue,undefined,customDefaultsMerge,stack),stack.delete(srcValue)),objValue}function customOmitClone(value){return isPlainObject(value)?undefined:value}function equalArrays(array,other,bitmask,customizer,equalFunc,stack){var isPartial=1&bitmask,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength))return!1;var arrStacked=stack.get(array),othStacked=stack.get(other);if(arrStacked&&othStacked)return arrStacked==other&&othStacked==array;var index=-1,result=!0,seen=2&bitmask?new SetCache:undefined;for(stack.set(array,other),stack.set(other,array);++index<arrLength;){var arrValue=array[index],othValue=other[index];if(customizer)var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack);if(compared!==undefined){if(compared)continue;result=!1;break}if(seen){if(!arraySome(other,(function(othValue,othIndex){if(!cacheHas(seen,othIndex)&&(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack)))return seen.push(othIndex)}))){result=!1;break}}else if(arrValue!==othValue&&!equalFunc(arrValue,othValue,bitmask,customizer,stack)){result=!1;break}}return stack.delete(array),stack.delete(other),result}function flatRest(func){return setToString(overRest(func,undefined,flatten),func+"")}function getAllKeys(object){return baseGetAllKeys(object,keys,getSymbols)}function getAllKeysIn(object){return baseGetAllKeys(object,keysIn,getSymbolsIn)}var getData=metaMap?function(func){return metaMap.get(func)}:noop;function getFuncName(func){for(var result=func.name+"",array=realNames[result],length=hasOwnProperty.call(realNames,result)?array.length:0;length--;){var data=array[length],otherFunc=data.func;if(null==otherFunc||otherFunc==func)return data.name}return result}function getHolder(func){return(hasOwnProperty.call(lodash,"placeholder")?lodash:func).placeholder}function getIteratee(){var result=lodash.iteratee||iteratee;return result=result===iteratee?baseIteratee:result,arguments.length?result(arguments[0],arguments[1]):result}function getMapData(map,key){var data=map.__data__;return function isKeyable(value){var type=typeof value;return"string"==type||"number"==type||"symbol"==type||"boolean"==type?"__proto__"!==value:null===value}(key)?data["string"==typeof key?"string":"hash"]:data.map}function getMatchData(object){for(var result=keys(object),length=result.length;length--;){var key=result[length],value=object[key];result[length]=[key,value,isStrictComparable(value)]}return result}function getNative(object,key){var value=function getValue(object,key){return null==object?undefined:object[key]}(object,key);return baseIsNative(value)?value:undefined}var getSymbols=nativeGetSymbols?function(object){return null==object?[]:(object=Object(object),arrayFilter(nativeGetSymbols(object),(function(symbol){return propertyIsEnumerable.call(object,symbol)})))}:stubArray,getSymbolsIn=nativeGetSymbols?function(object){for(var result=[];object;)arrayPush(result,getSymbols(object)),object=getPrototype(object);return result}:stubArray,getTag=baseGetTag;function hasPath(object,path,hasFunc){for(var index=-1,length=(path=castPath(path,object)).length,result=!1;++index<length;){var key=toKey(path[index]);if(!(result=null!=object&&hasFunc(object,key)))break;object=object[key]}return result||++index!=length?result:!!(length=null==object?0:object.length)&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object))}function initCloneObject(object){return"function"!=typeof object.constructor||isPrototype(object)?{}:baseCreate(getPrototype(object))}function isFlattenable(value){return isArray(value)||isArguments(value)||!!(spreadableSymbol&&value&&value[spreadableSymbol])}function isIndex(value,length){var type=typeof value;return!!(length=null==length?9007199254740991:length)&&("number"==type||"symbol"!=type&&reIsUint.test(value))&&value>-1&&value%1==0&&value<length}function isIterateeCall(value,index,object){if(!isObject(object))return!1;var type=typeof index;return!!("number"==type?isArrayLike(object)&&isIndex(index,object.length):"string"==type&&index in object)&&eq(object[index],value)}function isKey(value,object){if(isArray(value))return!1;var type=typeof value;return!("number"!=type&&"symbol"!=type&&"boolean"!=type&&null!=value&&!isSymbol(value))||(reIsPlainProp.test(value)||!reIsDeepProp.test(value)||null!=object&&value in Object(object))}function isLaziable(func){var funcName=getFuncName(func),other=lodash[funcName];if("function"!=typeof other||!(funcName in LazyWrapper.prototype))return!1;if(func===other)return!0;var data=getData(other);return!!data&&func===data[0]}(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map)!=mapTag||Promise&&"[object Promise]"!=getTag(Promise.resolve())||Set&&getTag(new Set)!=setTag||WeakMap&&getTag(new WeakMap)!=weakMapTag)&&(getTag=function(value){var result=baseGetTag(value),Ctor=result==objectTag?value.constructor:undefined,ctorString=Ctor?toSource(Ctor):"";if(ctorString)switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return"[object Promise]";case setCtorString:return setTag;case weakMapCtorString:return weakMapTag}return result});var isMaskable=coreJsData?isFunction:stubFalse;function isPrototype(value){var Ctor=value&&value.constructor;return value===("function"==typeof Ctor&&Ctor.prototype||objectProto)}function isStrictComparable(value){return value==value&&!isObject(value)}function matchesStrictComparable(key,srcValue){return function(object){return null!=object&&(object[key]===srcValue&&(srcValue!==undefined||key in Object(object)))}}function overRest(func,start,transform){return start=nativeMax(start===undefined?func.length-1:start,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),array=Array(length);++index<length;)array[index]=args[start+index];index=-1;for(var otherArgs=Array(start+1);++index<start;)otherArgs[index]=args[index];return otherArgs[start]=transform(array),apply(func,this,otherArgs)}}function parent(object,path){return path.length<2?object:baseGet(object,baseSlice(path,0,-1))}function safeGet(object,key){if(("constructor"!==key||"function"!=typeof object[key])&&"__proto__"!=key)return object[key]}var setData=shortOut(baseSetData),setTimeout=ctxSetTimeout||function(func,wait){return root.setTimeout(func,wait)},setToString=shortOut(baseSetToString);function setWrapToString(wrapper,reference,bitmask){var source=reference+"";return setToString(wrapper,function insertWrapDetails(source,details){var length=details.length;if(!length)return source;var lastIndex=length-1;return details[lastIndex]=(length>1?"& ":"")+details[lastIndex],details=details.join(length>2?", ":" "),source.replace(reWrapComment,"{\n/* [wrapped with "+details+"] */\n")}(source,function updateWrapDetails(details,bitmask){return arrayEach(wrapFlags,(function(pair){var value="_."+pair[0];bitmask&pair[1]&&!arrayIncludes(details,value)&&details.push(value)})),details.sort()}(function getWrapDetails(source){var match=source.match(reWrapDetails);return match?match[1].split(reSplitDetails):[]}(source),bitmask)))}function shortOut(func){var count=0,lastCalled=0;return function(){var stamp=nativeNow(),remaining=16-(stamp-lastCalled);if(lastCalled=stamp,remaining>0){if(++count>=800)return arguments[0]}else count=0;return func.apply(undefined,arguments)}}function shuffleSelf(array,size){var index=-1,length=array.length,lastIndex=length-1;for(size=size===undefined?length:size;++index<size;){var rand=baseRandom(index,lastIndex),value=array[rand];array[rand]=array[index],array[index]=value}return array.length=size,array}var stringToPath=function memoizeCapped(func){var result=memoize(func,(function(key){return 500===cache.size&&cache.clear(),key})),cache=result.cache;return result}((function(string){var result=[];return 46===string.charCodeAt(0)&&result.push(""),string.replace(rePropName,(function(match,number,quote,subString){result.push(quote?subString.replace(reEscapeChar,"$1"):number||match)})),result}));function toKey(value){if("string"==typeof value||isSymbol(value))return value;var result=value+"";return"0"==result&&1/value==-Infinity?"-0":result}function toSource(func){if(null!=func){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function wrapperClone(wrapper){if(wrapper instanceof LazyWrapper)return wrapper.clone();var result=new LodashWrapper(wrapper.__wrapped__,wrapper.__chain__);return result.__actions__=copyArray(wrapper.__actions__),result.__index__=wrapper.__index__,result.__values__=wrapper.__values__,result}var difference=baseRest((function(array,values){return isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,!0)):[]})),differenceBy=baseRest((function(array,values){var iteratee=last(values);return isArrayLikeObject(iteratee)&&(iteratee=undefined),isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,!0),getIteratee(iteratee,2)):[]})),differenceWith=baseRest((function(array,values){var comparator=last(values);return isArrayLikeObject(comparator)&&(comparator=undefined),isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,!0),undefined,comparator):[]}));function findIndex(array,predicate,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=null==fromIndex?0:toInteger(fromIndex);return index<0&&(index=nativeMax(length+index,0)),baseFindIndex(array,getIteratee(predicate,3),index)}function findLastIndex(array,predicate,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=length-1;return fromIndex!==undefined&&(index=toInteger(fromIndex),index=fromIndex<0?nativeMax(length+index,0):nativeMin(index,length-1)),baseFindIndex(array,getIteratee(predicate,3),index,!0)}function flatten(array){return(null==array?0:array.length)?baseFlatten(array,1):[]}function head(array){return array&&array.length?array[0]:undefined}var intersection=baseRest((function(arrays){var mapped=arrayMap(arrays,castArrayLikeObject);return mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped):[]})),intersectionBy=baseRest((function(arrays){var iteratee=last(arrays),mapped=arrayMap(arrays,castArrayLikeObject);return iteratee===last(mapped)?iteratee=undefined:mapped.pop(),mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped,getIteratee(iteratee,2)):[]})),intersectionWith=baseRest((function(arrays){var comparator=last(arrays),mapped=arrayMap(arrays,castArrayLikeObject);return(comparator="function"==typeof comparator?comparator:undefined)&&mapped.pop(),mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped,undefined,comparator):[]}));function last(array){var length=null==array?0:array.length;return length?array[length-1]:undefined}var pull=baseRest(pullAll);function pullAll(array,values){return array&&array.length&&values&&values.length?basePullAll(array,values):array}var pullAt=flatRest((function(array,indexes){var length=null==array?0:array.length,result=baseAt(array,indexes);return basePullAt(array,arrayMap(indexes,(function(index){return isIndex(index,length)?+index:index})).sort(compareAscending)),result}));function reverse(array){return null==array?array:nativeReverse.call(array)}var union=baseRest((function(arrays){return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,!0))})),unionBy=baseRest((function(arrays){var iteratee=last(arrays);return isArrayLikeObject(iteratee)&&(iteratee=undefined),baseUniq(baseFlatten(arrays,1,isArrayLikeObject,!0),getIteratee(iteratee,2))})),unionWith=baseRest((function(arrays){var comparator=last(arrays);return comparator="function"==typeof comparator?comparator:undefined,baseUniq(baseFlatten(arrays,1,isArrayLikeObject,!0),undefined,comparator)}));function unzip(array){if(!array||!array.length)return[];var length=0;return array=arrayFilter(array,(function(group){if(isArrayLikeObject(group))return length=nativeMax(group.length,length),!0})),baseTimes(length,(function(index){return arrayMap(array,baseProperty(index))}))}function unzipWith(array,iteratee){if(!array||!array.length)return[];var result=unzip(array);return null==iteratee?result:arrayMap(result,(function(group){return apply(iteratee,undefined,group)}))}var without=baseRest((function(array,values){return isArrayLikeObject(array)?baseDifference(array,values):[]})),xor=baseRest((function(arrays){return baseXor(arrayFilter(arrays,isArrayLikeObject))})),xorBy=baseRest((function(arrays){var iteratee=last(arrays);return isArrayLikeObject(iteratee)&&(iteratee=undefined),baseXor(arrayFilter(arrays,isArrayLikeObject),getIteratee(iteratee,2))})),xorWith=baseRest((function(arrays){var comparator=last(arrays);return comparator="function"==typeof comparator?comparator:undefined,baseXor(arrayFilter(arrays,isArrayLikeObject),undefined,comparator)})),zip=baseRest(unzip);var zipWith=baseRest((function(arrays){var length=arrays.length,iteratee=length>1?arrays[length-1]:undefined;return iteratee="function"==typeof iteratee?(arrays.pop(),iteratee):undefined,unzipWith(arrays,iteratee)}));function chain(value){var result=lodash(value);return result.__chain__=!0,result}function thru(value,interceptor){return interceptor(value)}var wrapperAt=flatRest((function(paths){var length=paths.length,start=length?paths[0]:0,value=this.__wrapped__,interceptor=function(object){return baseAt(object,paths)};return!(length>1||this.__actions__.length)&&value instanceof LazyWrapper&&isIndex(start)?((value=value.slice(start,+start+(length?1:0))).__actions__.push({func:thru,args:[interceptor],thisArg:undefined}),new LodashWrapper(value,this.__chain__).thru((function(array){return length&&!array.length&&array.push(undefined),array}))):this.thru(interceptor)}));var countBy=createAggregator((function(result,value,key){hasOwnProperty.call(result,key)?++result[key]:baseAssignValue(result,key,1)}));var find=createFind(findIndex),findLast=createFind(findLastIndex);function forEach(collection,iteratee){return(isArray(collection)?arrayEach:baseEach)(collection,getIteratee(iteratee,3))}function forEachRight(collection,iteratee){return(isArray(collection)?arrayEachRight:baseEachRight)(collection,getIteratee(iteratee,3))}var groupBy=createAggregator((function(result,value,key){hasOwnProperty.call(result,key)?result[key].push(value):baseAssignValue(result,key,[value])}));var invokeMap=baseRest((function(collection,path,args){var index=-1,isFunc="function"==typeof path,result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,(function(value){result[++index]=isFunc?apply(path,value,args):baseInvoke(value,path,args)})),result})),keyBy=createAggregator((function(result,value,key){baseAssignValue(result,key,value)}));function map(collection,iteratee){return(isArray(collection)?arrayMap:baseMap)(collection,getIteratee(iteratee,3))}var partition=createAggregator((function(result,value,key){result[key?0:1].push(value)}),(function(){return[[],[]]}));var sortBy=baseRest((function(collection,iteratees){if(null==collection)return[];var length=iteratees.length;return length>1&&isIterateeCall(collection,iteratees[0],iteratees[1])?iteratees=[]:length>2&&isIterateeCall(iteratees[0],iteratees[1],iteratees[2])&&(iteratees=[iteratees[0]]),baseOrderBy(collection,baseFlatten(iteratees,1),[])})),now=ctxNow||function(){return root.Date.now()};function ary(func,n,guard){return n=guard?undefined:n,n=func&&null==n?func.length:n,createWrap(func,128,undefined,undefined,undefined,undefined,n)}function before(n,func){var result;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return n=toInteger(n),function(){return--n>0&&(result=func.apply(this,arguments)),n<=1&&(func=undefined),result}}var bind=baseRest((function(func,thisArg,partials){var bitmask=1;if(partials.length){var holders=replaceHolders(partials,getHolder(bind));bitmask|=32}return createWrap(func,bitmask,thisArg,partials,holders)})),bindKey=baseRest((function(object,key,partials){var bitmask=3;if(partials.length){var holders=replaceHolders(partials,getHolder(bindKey));bitmask|=32}return createWrap(key,bitmask,object,partials,holders)}));function debounce(func,wait,options){var lastArgs,lastThis,maxWait,result,timerId,lastCallTime,lastInvokeTime=0,leading=!1,maxing=!1,trailing=!0;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);function invokeFunc(time){var args=lastArgs,thisArg=lastThis;return lastArgs=lastThis=undefined,lastInvokeTime=time,result=func.apply(thisArg,args)}function shouldInvoke(time){var timeSinceLastCall=time-lastCallTime;return lastCallTime===undefined||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&time-lastInvokeTime>=maxWait}function timerExpired(){var time=now();if(shouldInvoke(time))return trailingEdge(time);timerId=setTimeout(timerExpired,function remainingWait(time){var timeWaiting=wait-(time-lastCallTime);return maxing?nativeMin(timeWaiting,maxWait-(time-lastInvokeTime)):timeWaiting}(time))}function trailingEdge(time){return timerId=undefined,trailing&&lastArgs?invokeFunc(time):(lastArgs=lastThis=undefined,result)}function debounced(){var time=now(),isInvoking=shouldInvoke(time);if(lastArgs=arguments,lastThis=this,lastCallTime=time,isInvoking){if(timerId===undefined)return function leadingEdge(time){return lastInvokeTime=time,timerId=setTimeout(timerExpired,wait),leading?invokeFunc(time):result}(lastCallTime);if(maxing)return clearTimeout(timerId),timerId=setTimeout(timerExpired,wait),invokeFunc(lastCallTime)}return timerId===undefined&&(timerId=setTimeout(timerExpired,wait)),result}return wait=toNumber(wait)||0,isObject(options)&&(leading=!!options.leading,maxWait=(maxing="maxWait"in options)?nativeMax(toNumber(options.maxWait)||0,wait):maxWait,trailing="trailing"in options?!!options.trailing:trailing),debounced.cancel=function cancel(){timerId!==undefined&&clearTimeout(timerId),lastInvokeTime=0,lastArgs=lastCallTime=lastThis=timerId=undefined},debounced.flush=function flush(){return timerId===undefined?result:trailingEdge(now())},debounced}var defer=baseRest((function(func,args){return baseDelay(func,1,args)})),delay=baseRest((function(func,wait,args){return baseDelay(func,toNumber(wait)||0,args)}));function memoize(func,resolver){if("function"!=typeof func||null!=resolver&&"function"!=typeof resolver)throw new TypeError(FUNC_ERROR_TEXT);var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key))return cache.get(key);var result=func.apply(this,args);return memoized.cache=cache.set(key,result)||cache,result};return memoized.cache=new(memoize.Cache||MapCache),memoized}function negate(predicate){if("function"!=typeof predicate)throw new TypeError(FUNC_ERROR_TEXT);return function(){var args=arguments;switch(args.length){case 0:return!predicate.call(this);case 1:return!predicate.call(this,args[0]);case 2:return!predicate.call(this,args[0],args[1]);case 3:return!predicate.call(this,args[0],args[1],args[2])}return!predicate.apply(this,args)}}memoize.Cache=MapCache;var overArgs=castRest((function(func,transforms){var funcsLength=(transforms=1==transforms.length&&isArray(transforms[0])?arrayMap(transforms[0],baseUnary(getIteratee())):arrayMap(baseFlatten(transforms,1),baseUnary(getIteratee()))).length;return baseRest((function(args){for(var index=-1,length=nativeMin(args.length,funcsLength);++index<length;)args[index]=transforms[index].call(this,args[index]);return apply(func,this,args)}))})),partial=baseRest((function(func,partials){var holders=replaceHolders(partials,getHolder(partial));return createWrap(func,32,undefined,partials,holders)})),partialRight=baseRest((function(func,partials){var holders=replaceHolders(partials,getHolder(partialRight));return createWrap(func,64,undefined,partials,holders)})),rearg=flatRest((function(func,indexes){return createWrap(func,256,undefined,undefined,undefined,indexes)}));function eq(value,other){return value===other||value!=value&&other!=other}var gt=createRelationalOperation(baseGt),gte=createRelationalOperation((function(value,other){return value>=other})),isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(value){return isObjectLike(value)&&hasOwnProperty.call(value,"callee")&&!propertyIsEnumerable.call(value,"callee")},isArray=Array.isArray,isArrayBuffer=nodeIsArrayBuffer?baseUnary(nodeIsArrayBuffer):function baseIsArrayBuffer(value){return isObjectLike(value)&&baseGetTag(value)==arrayBufferTag};function isArrayLike(value){return null!=value&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}var isBuffer=nativeIsBuffer||stubFalse,isDate=nodeIsDate?baseUnary(nodeIsDate):function baseIsDate(value){return isObjectLike(value)&&baseGetTag(value)==dateTag};function isError(value){if(!isObjectLike(value))return!1;var tag=baseGetTag(value);return tag==errorTag||"[object DOMException]"==tag||"string"==typeof value.message&&"string"==typeof value.name&&!isPlainObject(value)}function isFunction(value){if(!isObject(value))return!1;var tag=baseGetTag(value);return tag==funcTag||tag==genTag||"[object AsyncFunction]"==tag||"[object Proxy]"==tag}function isInteger(value){return"number"==typeof value&&value==toInteger(value)}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=9007199254740991}function isObject(value){var type=typeof value;return null!=value&&("object"==type||"function"==type)}function isObjectLike(value){return null!=value&&"object"==typeof value}var isMap=nodeIsMap?baseUnary(nodeIsMap):function baseIsMap(value){return isObjectLike(value)&&getTag(value)==mapTag};function isNumber(value){return"number"==typeof value||isObjectLike(value)&&baseGetTag(value)==numberTag}function isPlainObject(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag)return!1;var proto=getPrototype(value);if(null===proto)return!0;var Ctor=hasOwnProperty.call(proto,"constructor")&&proto.constructor;return"function"==typeof Ctor&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString}var isRegExp=nodeIsRegExp?baseUnary(nodeIsRegExp):function baseIsRegExp(value){return isObjectLike(value)&&baseGetTag(value)==regexpTag};var isSet=nodeIsSet?baseUnary(nodeIsSet):function baseIsSet(value){return isObjectLike(value)&&getTag(value)==setTag};function isString(value){return"string"==typeof value||!isArray(value)&&isObjectLike(value)&&baseGetTag(value)==stringTag}function isSymbol(value){return"symbol"==typeof value||isObjectLike(value)&&baseGetTag(value)==symbolTag}var isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)]};var lt=createRelationalOperation(baseLt),lte=createRelationalOperation((function(value,other){return value<=other}));function toArray(value){if(!value)return[];if(isArrayLike(value))return isString(value)?stringToArray(value):copyArray(value);if(symIterator&&value[symIterator])return function iteratorToArray(iterator){for(var data,result=[];!(data=iterator.next()).done;)result.push(data.value);return result}(value[symIterator]());var tag=getTag(value);return(tag==mapTag?mapToArray:tag==setTag?setToArray:values)(value)}function toFinite(value){return value?Infinity===(value=toNumber(value))||-Infinity===value?17976931348623157e292*(value<0?-1:1):value==value?value:0:0===value?value:0}function toInteger(value){var result=toFinite(value),remainder=result%1;return result==result?remainder?result-remainder:result:0}function toLength(value){return value?baseClamp(toInteger(value),0,4294967295):0}function toNumber(value){if("number"==typeof value)return value;if(isSymbol(value))return NaN;if(isObject(value)){var other="function"==typeof value.valueOf?value.valueOf():value;value=isObject(other)?other+"":other}if("string"!=typeof value)return 0===value?value:+value;value=baseTrim(value);var isBinary=reIsBinary.test(value);return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NaN:+value}function toPlainObject(value){return copyObject(value,keysIn(value))}function toString(value){return null==value?"":baseToString(value)}var assign=createAssigner((function(object,source){if(isPrototype(source)||isArrayLike(source))copyObject(source,keys(source),object);else for(var key in source)hasOwnProperty.call(source,key)&&assignValue(object,key,source[key])})),assignIn=createAssigner((function(object,source){copyObject(source,keysIn(source),object)})),assignInWith=createAssigner((function(object,source,srcIndex,customizer){copyObject(source,keysIn(source),object,customizer)})),assignWith=createAssigner((function(object,source,srcIndex,customizer){copyObject(source,keys(source),object,customizer)})),at=flatRest(baseAt);var defaults=baseRest((function(object,sources){object=Object(object);var index=-1,length=sources.length,guard=length>2?sources[2]:undefined;for(guard&&isIterateeCall(sources[0],sources[1],guard)&&(length=1);++index<length;)for(var source=sources[index],props=keysIn(source),propsIndex=-1,propsLength=props.length;++propsIndex<propsLength;){var key=props[propsIndex],value=object[key];(value===undefined||eq(value,objectProto[key])&&!hasOwnProperty.call(object,key))&&(object[key]=source[key])}return object})),defaultsDeep=baseRest((function(args){return args.push(undefined,customDefaultsMerge),apply(mergeWith,undefined,args)}));function get(object,path,defaultValue){var result=null==object?undefined:baseGet(object,path);return result===undefined?defaultValue:result}function hasIn(object,path){return null!=object&&hasPath(object,path,baseHasIn)}var invert=createInverter((function(result,value,key){null!=value&&"function"!=typeof value.toString&&(value=nativeObjectToString.call(value)),result[value]=key}),constant(identity)),invertBy=createInverter((function(result,value,key){null!=value&&"function"!=typeof value.toString&&(value=nativeObjectToString.call(value)),hasOwnProperty.call(result,value)?result[value].push(key):result[value]=[key]}),getIteratee),invoke=baseRest(baseInvoke);function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function keysIn(object){return isArrayLike(object)?arrayLikeKeys(object,!0):baseKeysIn(object)}var merge=createAssigner((function(object,source,srcIndex){baseMerge(object,source,srcIndex)})),mergeWith=createAssigner((function(object,source,srcIndex,customizer){baseMerge(object,source,srcIndex,customizer)})),omit=flatRest((function(object,paths){var result={};if(null==object)return result;var isDeep=!1;paths=arrayMap(paths,(function(path){return path=castPath(path,object),isDeep||(isDeep=path.length>1),path})),copyObject(object,getAllKeysIn(object),result),isDeep&&(result=baseClone(result,7,customOmitClone));for(var length=paths.length;length--;)baseUnset(result,paths[length]);return result}));var pick=flatRest((function(object,paths){return null==object?{}:function basePick(object,paths){return basePickBy(object,paths,(function(value,path){return hasIn(object,path)}))}(object,paths)}));function pickBy(object,predicate){if(null==object)return{};var props=arrayMap(getAllKeysIn(object),(function(prop){return[prop]}));return predicate=getIteratee(predicate),basePickBy(object,props,(function(value,path){return predicate(value,path[0])}))}var toPairs=createToPairs(keys),toPairsIn=createToPairs(keysIn);function values(object){return null==object?[]:baseValues(object,keys(object))}var camelCase=createCompounder((function(result,word,index){return word=word.toLowerCase(),result+(index?capitalize(word):word)}));function capitalize(string){return upperFirst(toString(string).toLowerCase())}function deburr(string){return(string=toString(string))&&string.replace(reLatin,deburrLetter).replace(reComboMark,"")}var kebabCase=createCompounder((function(result,word,index){return result+(index?"-":"")+word.toLowerCase()})),lowerCase=createCompounder((function(result,word,index){return result+(index?" ":"")+word.toLowerCase()})),lowerFirst=createCaseFirst("toLowerCase");var snakeCase=createCompounder((function(result,word,index){return result+(index?"_":"")+word.toLowerCase()}));var startCase=createCompounder((function(result,word,index){return result+(index?" ":"")+upperFirst(word)}));var upperCase=createCompounder((function(result,word,index){return result+(index?" ":"")+word.toUpperCase()})),upperFirst=createCaseFirst("toUpperCase");function words(string,pattern,guard){return string=toString(string),(pattern=guard?undefined:pattern)===undefined?function hasUnicodeWord(string){return reHasUnicodeWord.test(string)}(string)?function unicodeWords(string){return string.match(reUnicodeWord)||[]}(string):function asciiWords(string){return string.match(reAsciiWord)||[]}(string):string.match(pattern)||[]}var attempt=baseRest((function(func,args){try{return apply(func,undefined,args)}catch(e){return isError(e)?e:new Error(e)}})),bindAll=flatRest((function(object,methodNames){return arrayEach(methodNames,(function(key){key=toKey(key),baseAssignValue(object,key,bind(object[key],object))})),object}));function constant(value){return function(){return value}}var flow=createFlow(),flowRight=createFlow(!0);function identity(value){return value}function iteratee(func){return baseIteratee("function"==typeof func?func:baseClone(func,1))}var method=baseRest((function(path,args){return function(object){return baseInvoke(object,path,args)}})),methodOf=baseRest((function(object,args){return function(path){return baseInvoke(object,path,args)}}));function mixin(object,source,options){var props=keys(source),methodNames=baseFunctions(source,props);null!=options||isObject(source)&&(methodNames.length||!props.length)||(options=source,source=object,object=this,methodNames=baseFunctions(source,keys(source)));var chain=!(isObject(options)&&"chain"in options&&!options.chain),isFunc=isFunction(object);return arrayEach(methodNames,(function(methodName){var func=source[methodName];object[methodName]=func,isFunc&&(object.prototype[methodName]=function(){var chainAll=this.__chain__;if(chain||chainAll){var result=object(this.__wrapped__);return(result.__actions__=copyArray(this.__actions__)).push({func,args:arguments,thisArg:object}),result.__chain__=chainAll,result}return func.apply(object,arrayPush([this.value()],arguments))})})),object}function noop(){}var over=createOver(arrayMap),overEvery=createOver(arrayEvery),overSome=createOver(arraySome);function property(path){return isKey(path)?baseProperty(toKey(path)):function basePropertyDeep(path){return function(object){return baseGet(object,path)}}(path)}var range=createRange(),rangeRight=createRange(!0);function stubArray(){return[]}function stubFalse(){return!1}var add=createMathOperation((function(augend,addend){return augend+addend}),0),ceil=createRound("ceil"),divide=createMathOperation((function(dividend,divisor){return dividend/divisor}),1),floor=createRound("floor");var source,multiply=createMathOperation((function(multiplier,multiplicand){return multiplier*multiplicand}),1),round=createRound("round"),subtract=createMathOperation((function(minuend,subtrahend){return minuend-subtrahend}),0);return lodash.after=function after(n,func){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return n=toInteger(n),function(){if(--n<1)return func.apply(this,arguments)}},lodash.ary=ary,lodash.assign=assign,lodash.assignIn=assignIn,lodash.assignInWith=assignInWith,lodash.assignWith=assignWith,lodash.at=at,lodash.before=before,lodash.bind=bind,lodash.bindAll=bindAll,lodash.bindKey=bindKey,lodash.castArray=function castArray(){if(!arguments.length)return[];var value=arguments[0];return isArray(value)?value:[value]},lodash.chain=chain,lodash.chunk=function chunk(array,size,guard){size=(guard?isIterateeCall(array,size,guard):size===undefined)?1:nativeMax(toInteger(size),0);var length=null==array?0:array.length;if(!length||size<1)return[];for(var index=0,resIndex=0,result=Array(nativeCeil(length/size));index<length;)result[resIndex++]=baseSlice(array,index,index+=size);return result},lodash.compact=function compact(array){for(var index=-1,length=null==array?0:array.length,resIndex=0,result=[];++index<length;){var value=array[index];value&&(result[resIndex++]=value)}return result},lodash.concat=function concat(){var length=arguments.length;if(!length)return[];for(var args=Array(length-1),array=arguments[0],index=length;index--;)args[index-1]=arguments[index];return arrayPush(isArray(array)?copyArray(array):[array],baseFlatten(args,1))},lodash.cond=function cond(pairs){var length=null==pairs?0:pairs.length,toIteratee=getIteratee();return pairs=length?arrayMap(pairs,(function(pair){if("function"!=typeof pair[1])throw new TypeError(FUNC_ERROR_TEXT);return[toIteratee(pair[0]),pair[1]]})):[],baseRest((function(args){for(var index=-1;++index<length;){var pair=pairs[index];if(apply(pair[0],this,args))return apply(pair[1],this,args)}}))},lodash.conforms=function conforms(source){return function baseConforms(source){var props=keys(source);return function(object){return baseConformsTo(object,source,props)}}(baseClone(source,1))},lodash.constant=constant,lodash.countBy=countBy,lodash.create=function create(prototype,properties){var result=baseCreate(prototype);return null==properties?result:baseAssign(result,properties)},lodash.curry=function curry(func,arity,guard){var result=createWrap(func,8,undefined,undefined,undefined,undefined,undefined,arity=guard?undefined:arity);return result.placeholder=curry.placeholder,result},lodash.curryRight=function curryRight(func,arity,guard){var result=createWrap(func,16,undefined,undefined,undefined,undefined,undefined,arity=guard?undefined:arity);return result.placeholder=curryRight.placeholder,result},lodash.debounce=debounce,lodash.defaults=defaults,lodash.defaultsDeep=defaultsDeep,lodash.defer=defer,lodash.delay=delay,lodash.difference=difference,lodash.differenceBy=differenceBy,lodash.differenceWith=differenceWith,lodash.drop=function drop(array,n,guard){var length=null==array?0:array.length;return length?baseSlice(array,(n=guard||n===undefined?1:toInteger(n))<0?0:n,length):[]},lodash.dropRight=function dropRight(array,n,guard){var length=null==array?0:array.length;return length?baseSlice(array,0,(n=length-(n=guard||n===undefined?1:toInteger(n)))<0?0:n):[]},lodash.dropRightWhile=function dropRightWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),!0,!0):[]},lodash.dropWhile=function dropWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),!0):[]},lodash.fill=function fill(array,value,start,end){var length=null==array?0:array.length;return length?(start&&"number"!=typeof start&&isIterateeCall(array,value,start)&&(start=0,end=length),function baseFill(array,value,start,end){var length=array.length;for((start=toInteger(start))<0&&(start=-start>length?0:length+start),(end=end===undefined||end>length?length:toInteger(end))<0&&(end+=length),end=start>end?0:toLength(end);start<end;)array[start++]=value;return array}(array,value,start,end)):[]},lodash.filter=function filter(collection,predicate){return(isArray(collection)?arrayFilter:baseFilter)(collection,getIteratee(predicate,3))},lodash.flatMap=function flatMap(collection,iteratee){return baseFlatten(map(collection,iteratee),1)},lodash.flatMapDeep=function flatMapDeep(collection,iteratee){return baseFlatten(map(collection,iteratee),Infinity)},lodash.flatMapDepth=function flatMapDepth(collection,iteratee,depth){return depth=depth===undefined?1:toInteger(depth),baseFlatten(map(collection,iteratee),depth)},lodash.flatten=flatten,lodash.flattenDeep=function flattenDeep(array){return(null==array?0:array.length)?baseFlatten(array,Infinity):[]},lodash.flattenDepth=function flattenDepth(array,depth){return(null==array?0:array.length)?baseFlatten(array,depth=depth===undefined?1:toInteger(depth)):[]},lodash.flip=function flip(func){return createWrap(func,512)},lodash.flow=flow,lodash.flowRight=flowRight,lodash.fromPairs=function fromPairs(pairs){for(var index=-1,length=null==pairs?0:pairs.length,result={};++index<length;){var pair=pairs[index];result[pair[0]]=pair[1]}return result},lodash.functions=function functions(object){return null==object?[]:baseFunctions(object,keys(object))},lodash.functionsIn=function functionsIn(object){return null==object?[]:baseFunctions(object,keysIn(object))},lodash.groupBy=groupBy,lodash.initial=function initial(array){return(null==array?0:array.length)?baseSlice(array,0,-1):[]},lodash.intersection=intersection,lodash.intersectionBy=intersectionBy,lodash.intersectionWith=intersectionWith,lodash.invert=invert,lodash.invertBy=invertBy,lodash.invokeMap=invokeMap,lodash.iteratee=iteratee,lodash.keyBy=keyBy,lodash.keys=keys,lodash.keysIn=keysIn,lodash.map=map,lodash.mapKeys=function mapKeys(object,iteratee){var result={};return iteratee=getIteratee(iteratee,3),baseForOwn(object,(function(value,key,object){baseAssignValue(result,iteratee(value,key,object),value)})),result},lodash.mapValues=function mapValues(object,iteratee){var result={};return iteratee=getIteratee(iteratee,3),baseForOwn(object,(function(value,key,object){baseAssignValue(result,key,iteratee(value,key,object))})),result},lodash.matches=function matches(source){return baseMatches(baseClone(source,1))},lodash.matchesProperty=function matchesProperty(path,srcValue){return baseMatchesProperty(path,baseClone(srcValue,1))},lodash.memoize=memoize,lodash.merge=merge,lodash.mergeWith=mergeWith,lodash.method=method,lodash.methodOf=methodOf,lodash.mixin=mixin,lodash.negate=negate,lodash.nthArg=function nthArg(n){return n=toInteger(n),baseRest((function(args){return baseNth(args,n)}))},lodash.omit=omit,lodash.omitBy=function omitBy(object,predicate){return pickBy(object,negate(getIteratee(predicate)))},lodash.once=function once(func){return before(2,func)},lodash.orderBy=function orderBy(collection,iteratees,orders,guard){return null==collection?[]:(isArray(iteratees)||(iteratees=null==iteratees?[]:[iteratees]),isArray(orders=guard?undefined:orders)||(orders=null==orders?[]:[orders]),baseOrderBy(collection,iteratees,orders))},lodash.over=over,lodash.overArgs=overArgs,lodash.overEvery=overEvery,lodash.overSome=overSome,lodash.partial=partial,lodash.partialRight=partialRight,lodash.partition=partition,lodash.pick=pick,lodash.pickBy=pickBy,lodash.property=property,lodash.propertyOf=function propertyOf(object){return function(path){return null==object?undefined:baseGet(object,path)}},lodash.pull=pull,lodash.pullAll=pullAll,lodash.pullAllBy=function pullAllBy(array,values,iteratee){return array&&array.length&&values&&values.length?basePullAll(array,values,getIteratee(iteratee,2)):array},lodash.pullAllWith=function pullAllWith(array,values,comparator){return array&&array.length&&values&&values.length?basePullAll(array,values,undefined,comparator):array},lodash.pullAt=pullAt,lodash.range=range,lodash.rangeRight=rangeRight,lodash.rearg=rearg,lodash.reject=function reject(collection,predicate){return(isArray(collection)?arrayFilter:baseFilter)(collection,negate(getIteratee(predicate,3)))},lodash.remove=function remove(array,predicate){var result=[];if(!array||!array.length)return result;var index=-1,indexes=[],length=array.length;for(predicate=getIteratee(predicate,3);++index<length;){var value=array[index];predicate(value,index,array)&&(result.push(value),indexes.push(index))}return basePullAt(array,indexes),result},lodash.rest=function rest(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return baseRest(func,start=start===undefined?start:toInteger(start))},lodash.reverse=reverse,lodash.sampleSize=function sampleSize(collection,n,guard){return n=(guard?isIterateeCall(collection,n,guard):n===undefined)?1:toInteger(n),(isArray(collection)?arraySampleSize:baseSampleSize)(collection,n)},lodash.set=function set(object,path,value){return null==object?object:baseSet(object,path,value)},lodash.setWith=function setWith(object,path,value,customizer){return customizer="function"==typeof customizer?customizer:undefined,null==object?object:baseSet(object,path,value,customizer)},lodash.shuffle=function shuffle(collection){return(isArray(collection)?arrayShuffle:baseShuffle)(collection)},lodash.slice=function slice(array,start,end){var length=null==array?0:array.length;return length?(end&&"number"!=typeof end&&isIterateeCall(array,start,end)?(start=0,end=length):(start=null==start?0:toInteger(start),end=end===undefined?length:toInteger(end)),baseSlice(array,start,end)):[]},lodash.sortBy=sortBy,lodash.sortedUniq=function sortedUniq(array){return array&&array.length?baseSortedUniq(array):[]},lodash.sortedUniqBy=function sortedUniqBy(array,iteratee){return array&&array.length?baseSortedUniq(array,getIteratee(iteratee,2)):[]},lodash.split=function split(string,separator,limit){return limit&&"number"!=typeof limit&&isIterateeCall(string,separator,limit)&&(separator=limit=undefined),(limit=limit===undefined?4294967295:limit>>>0)?(string=toString(string))&&("string"==typeof separator||null!=separator&&!isRegExp(separator))&&!(separator=baseToString(separator))&&hasUnicode(string)?castSlice(stringToArray(string),0,limit):string.split(separator,limit):[]},lodash.spread=function spread(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=null==start?0:nativeMax(toInteger(start),0),baseRest((function(args){var array=args[start],otherArgs=castSlice(args,0,start);return array&&arrayPush(otherArgs,array),apply(func,this,otherArgs)}))},lodash.tail=function tail(array){var length=null==array?0:array.length;return length?baseSlice(array,1,length):[]},lodash.take=function take(array,n,guard){return array&&array.length?baseSlice(array,0,(n=guard||n===undefined?1:toInteger(n))<0?0:n):[]},lodash.takeRight=function takeRight(array,n,guard){var length=null==array?0:array.length;return length?baseSlice(array,(n=length-(n=guard||n===undefined?1:toInteger(n)))<0?0:n,length):[]},lodash.takeRightWhile=function takeRightWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),!1,!0):[]},lodash.takeWhile=function takeWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3)):[]},lodash.tap=function tap(value,interceptor){return interceptor(value),value},lodash.throttle=function throttle(func,wait,options){var leading=!0,trailing=!0;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return isObject(options)&&(leading="leading"in options?!!options.leading:leading,trailing="trailing"in options?!!options.trailing:trailing),debounce(func,wait,{leading,maxWait:wait,trailing})},lodash.thru=thru,lodash.toArray=toArray,lodash.toPairs=toPairs,lodash.toPairsIn=toPairsIn,lodash.toPath=function toPath(value){return isArray(value)?arrayMap(value,toKey):isSymbol(value)?[value]:copyArray(stringToPath(toString(value)))},lodash.toPlainObject=toPlainObject,lodash.transform=function transform(object,iteratee,accumulator){var isArr=isArray(object),isArrLike=isArr||isBuffer(object)||isTypedArray(object);if(iteratee=getIteratee(iteratee,4),null==accumulator){var Ctor=object&&object.constructor;accumulator=isArrLike?isArr?new Ctor:[]:isObject(object)&&isFunction(Ctor)?baseCreate(getPrototype(object)):{}}return(isArrLike?arrayEach:baseForOwn)(object,(function(value,index,object){return iteratee(accumulator,value,index,object)})),accumulator},lodash.unary=function unary(func){return ary(func,1)},lodash.union=union,lodash.unionBy=unionBy,lodash.unionWith=unionWith,lodash.uniq=function uniq(array){return array&&array.length?baseUniq(array):[]},lodash.uniqBy=function uniqBy(array,iteratee){return array&&array.length?baseUniq(array,getIteratee(iteratee,2)):[]},lodash.uniqWith=function uniqWith(array,comparator){return comparator="function"==typeof comparator?comparator:undefined,array&&array.length?baseUniq(array,undefined,comparator):[]},lodash.unset=function unset(object,path){return null==object||baseUnset(object,path)},lodash.unzip=unzip,lodash.unzipWith=unzipWith,lodash.update=function update(object,path,updater){return null==object?object:baseUpdate(object,path,castFunction(updater))},lodash.updateWith=function updateWith(object,path,updater,customizer){return customizer="function"==typeof customizer?customizer:undefined,null==object?object:baseUpdate(object,path,castFunction(updater),customizer)},lodash.values=values,lodash.valuesIn=function valuesIn(object){return null==object?[]:baseValues(object,keysIn(object))},lodash.without=without,lodash.words=words,lodash.wrap=function wrap(value,wrapper){return partial(castFunction(wrapper),value)},lodash.xor=xor,lodash.xorBy=xorBy,lodash.xorWith=xorWith,lodash.zip=zip,lodash.zipObject=function zipObject(props,values){return baseZipObject(props||[],values||[],assignValue)},lodash.zipObjectDeep=function zipObjectDeep(props,values){return baseZipObject(props||[],values||[],baseSet)},lodash.zipWith=zipWith,lodash.entries=toPairs,lodash.entriesIn=toPairsIn,lodash.extend=assignIn,lodash.extendWith=assignInWith,mixin(lodash,lodash),lodash.add=add,lodash.attempt=attempt,lodash.camelCase=camelCase,lodash.capitalize=capitalize,lodash.ceil=ceil,lodash.clamp=function clamp(number,lower,upper){return upper===undefined&&(upper=lower,lower=undefined),upper!==undefined&&(upper=(upper=toNumber(upper))==upper?upper:0),lower!==undefined&&(lower=(lower=toNumber(lower))==lower?lower:0),baseClamp(toNumber(number),lower,upper)},lodash.clone=function clone(value){return baseClone(value,4)},lodash.cloneDeep=function cloneDeep(value){return baseClone(value,5)},lodash.cloneDeepWith=function cloneDeepWith(value,customizer){return baseClone(value,5,customizer="function"==typeof customizer?customizer:undefined)},lodash.cloneWith=function cloneWith(value,customizer){return baseClone(value,4,customizer="function"==typeof customizer?customizer:undefined)},lodash.conformsTo=function conformsTo(object,source){return null==source||baseConformsTo(object,source,keys(source))},lodash.deburr=deburr,lodash.defaultTo=function defaultTo(value,defaultValue){return null==value||value!=value?defaultValue:value},lodash.divide=divide,lodash.endsWith=function endsWith(string,target,position){string=toString(string),target=baseToString(target);var length=string.length,end=position=position===undefined?length:baseClamp(toInteger(position),0,length);return(position-=target.length)>=0&&string.slice(position,end)==target},lodash.eq=eq,lodash.escape=function escape(string){return(string=toString(string))&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar):string},lodash.escapeRegExp=function escapeRegExp(string){return(string=toString(string))&&reHasRegExpChar.test(string)?string.replace(reRegExpChar,"\\$&"):string},lodash.every=function every(collection,predicate,guard){var func=isArray(collection)?arrayEvery:baseEvery;return guard&&isIterateeCall(collection,predicate,guard)&&(predicate=undefined),func(collection,getIteratee(predicate,3))},lodash.find=find,lodash.findIndex=findIndex,lodash.findKey=function findKey(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwn)},lodash.findLast=findLast,lodash.findLastIndex=findLastIndex,lodash.findLastKey=function findLastKey(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwnRight)},lodash.floor=floor,lodash.forEach=forEach,lodash.forEachRight=forEachRight,lodash.forIn=function forIn(object,iteratee){return null==object?object:baseFor(object,getIteratee(iteratee,3),keysIn)},lodash.forInRight=function forInRight(object,iteratee){return null==object?object:baseForRight(object,getIteratee(iteratee,3),keysIn)},lodash.forOwn=function forOwn(object,iteratee){return object&&baseForOwn(object,getIteratee(iteratee,3))},lodash.forOwnRight=function forOwnRight(object,iteratee){return object&&baseForOwnRight(object,getIteratee(iteratee,3))},lodash.get=get,lodash.gt=gt,lodash.gte=gte,lodash.has=function has(object,path){return null!=object&&hasPath(object,path,baseHas)},lodash.hasIn=hasIn,lodash.head=head,lodash.identity=identity,lodash.includes=function includes(collection,value,fromIndex,guard){collection=isArrayLike(collection)?collection:values(collection),fromIndex=fromIndex&&!guard?toInteger(fromIndex):0;var length=collection.length;return fromIndex<0&&(fromIndex=nativeMax(length+fromIndex,0)),isString(collection)?fromIndex<=length&&collection.indexOf(value,fromIndex)>-1:!!length&&baseIndexOf(collection,value,fromIndex)>-1},lodash.indexOf=function indexOf(array,value,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=null==fromIndex?0:toInteger(fromIndex);return index<0&&(index=nativeMax(length+index,0)),baseIndexOf(array,value,index)},lodash.inRange=function inRange(number,start,end){return start=toFinite(start),end===undefined?(end=start,start=0):end=toFinite(end),function baseInRange(number,start,end){return number>=nativeMin(start,end)&&number<nativeMax(start,end)}(number=toNumber(number),start,end)},lodash.invoke=invoke,lodash.isArguments=isArguments,lodash.isArray=isArray,lodash.isArrayBuffer=isArrayBuffer,lodash.isArrayLike=isArrayLike,lodash.isArrayLikeObject=isArrayLikeObject,lodash.isBoolean=function isBoolean(value){return!0===value||!1===value||isObjectLike(value)&&baseGetTag(value)==boolTag},lodash.isBuffer=isBuffer,lodash.isDate=isDate,lodash.isElement=function isElement(value){return isObjectLike(value)&&1===value.nodeType&&!isPlainObject(value)},lodash.isEmpty=function isEmpty(value){if(null==value)return!0;if(isArrayLike(value)&&(isArray(value)||"string"==typeof value||"function"==typeof value.splice||isBuffer(value)||isTypedArray(value)||isArguments(value)))return!value.length;var tag=getTag(value);if(tag==mapTag||tag==setTag)return!value.size;if(isPrototype(value))return!baseKeys(value).length;for(var key in value)if(hasOwnProperty.call(value,key))return!1;return!0},lodash.isEqual=function isEqual(value,other){return baseIsEqual(value,other)},lodash.isEqualWith=function isEqualWith(value,other,customizer){var result=(customizer="function"==typeof customizer?customizer:undefined)?customizer(value,other):undefined;return result===undefined?baseIsEqual(value,other,undefined,customizer):!!result},lodash.isError=isError,lodash.isFinite=function isFinite(value){return"number"==typeof value&&nativeIsFinite(value)},lodash.isFunction=isFunction,lodash.isInteger=isInteger,lodash.isLength=isLength,lodash.isMap=isMap,lodash.isMatch=function isMatch(object,source){return object===source||baseIsMatch(object,source,getMatchData(source))},lodash.isMatchWith=function isMatchWith(object,source,customizer){return customizer="function"==typeof customizer?customizer:undefined,baseIsMatch(object,source,getMatchData(source),customizer)},lodash.isNaN=function isNaN(value){return isNumber(value)&&value!=+value},lodash.isNative=function isNative(value){if(isMaskable(value))throw new Error("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return baseIsNative(value)},lodash.isNil=function isNil(value){return null==value},lodash.isNull=function isNull(value){return null===value},lodash.isNumber=isNumber,lodash.isObject=isObject,lodash.isObjectLike=isObjectLike,lodash.isPlainObject=isPlainObject,lodash.isRegExp=isRegExp,lodash.isSafeInteger=function isSafeInteger(value){return isInteger(value)&&value>=-9007199254740991&&value<=9007199254740991},lodash.isSet=isSet,lodash.isString=isString,lodash.isSymbol=isSymbol,lodash.isTypedArray=isTypedArray,lodash.isUndefined=function isUndefined(value){return value===undefined},lodash.isWeakMap=function isWeakMap(value){return isObjectLike(value)&&getTag(value)==weakMapTag},lodash.isWeakSet=function isWeakSet(value){return isObjectLike(value)&&"[object WeakSet]"==baseGetTag(value)},lodash.join=function join(array,separator){return null==array?"":nativeJoin.call(array,separator)},lodash.kebabCase=kebabCase,lodash.last=last,lodash.lastIndexOf=function lastIndexOf(array,value,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=length;return fromIndex!==undefined&&(index=(index=toInteger(fromIndex))<0?nativeMax(length+index,0):nativeMin(index,length-1)),value==value?function strictLastIndexOf(array,value,fromIndex){for(var index=fromIndex+1;index--;)if(array[index]===value)return index;return index}(array,value,index):baseFindIndex(array,baseIsNaN,index,!0)},lodash.lowerCase=lowerCase,lodash.lowerFirst=lowerFirst,lodash.lt=lt,lodash.lte=lte,lodash.max=function max(array){return array&&array.length?baseExtremum(array,identity,baseGt):undefined},lodash.maxBy=function maxBy(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseGt):undefined},lodash.mean=function mean(array){return baseMean(array,identity)},lodash.meanBy=function meanBy(array,iteratee){return baseMean(array,getIteratee(iteratee,2))},lodash.min=function min(array){return array&&array.length?baseExtremum(array,identity,baseLt):undefined},lodash.minBy=function minBy(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseLt):undefined},lodash.stubArray=stubArray,lodash.stubFalse=stubFalse,lodash.stubObject=function stubObject(){return{}},lodash.stubString=function stubString(){return""},lodash.stubTrue=function stubTrue(){return!0},lodash.multiply=multiply,lodash.nth=function nth(array,n){return array&&array.length?baseNth(array,toInteger(n)):undefined},lodash.noConflict=function noConflict(){return root._===this&&(root._=oldDash),this},lodash.noop=noop,lodash.now=now,lodash.pad=function pad(string,length,chars){string=toString(string);var strLength=(length=toInteger(length))?stringSize(string):0;if(!length||strLength>=length)return string;var mid=(length-strLength)/2;return createPadding(nativeFloor(mid),chars)+string+createPadding(nativeCeil(mid),chars)},lodash.padEnd=function padEnd(string,length,chars){string=toString(string);var strLength=(length=toInteger(length))?stringSize(string):0;return length&&strLength<length?string+createPadding(length-strLength,chars):string},lodash.padStart=function padStart(string,length,chars){string=toString(string);var strLength=(length=toInteger(length))?stringSize(string):0;return length&&strLength<length?createPadding(length-strLength,chars)+string:string},lodash.parseInt=function parseInt(string,radix,guard){return guard||null==radix?radix=0:radix&&(radix=+radix),nativeParseInt(toString(string).replace(reTrimStart,""),radix||0)},lodash.random=function random(lower,upper,floating){if(floating&&"boolean"!=typeof floating&&isIterateeCall(lower,upper,floating)&&(upper=floating=undefined),floating===undefined&&("boolean"==typeof upper?(floating=upper,upper=undefined):"boolean"==typeof lower&&(floating=lower,lower=undefined)),lower===undefined&&upper===undefined?(lower=0,upper=1):(lower=toFinite(lower),upper===undefined?(upper=lower,lower=0):upper=toFinite(upper)),lower>upper){var temp=lower;lower=upper,upper=temp}if(floating||lower%1||upper%1){var rand=nativeRandom();return nativeMin(lower+rand*(upper-lower+freeParseFloat("1e-"+((rand+"").length-1))),upper)}return baseRandom(lower,upper)},lodash.reduce=function reduce(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduce:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEach)},lodash.reduceRight=function reduceRight(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduceRight:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEachRight)},lodash.repeat=function repeat(string,n,guard){return n=(guard?isIterateeCall(string,n,guard):n===undefined)?1:toInteger(n),baseRepeat(toString(string),n)},lodash.replace=function replace(){var args=arguments,string=toString(args[0]);return args.length<3?string:string.replace(args[1],args[2])},lodash.result=function result(object,path,defaultValue){var index=-1,length=(path=castPath(path,object)).length;for(length||(length=1,object=undefined);++index<length;){var value=null==object?undefined:object[toKey(path[index])];value===undefined&&(index=length,value=defaultValue),object=isFunction(value)?value.call(object):value}return object},lodash.round=round,lodash.runInContext=runInContext,lodash.sample=function sample(collection){return(isArray(collection)?arraySample:baseSample)(collection)},lodash.size=function size(collection){if(null==collection)return 0;if(isArrayLike(collection))return isString(collection)?stringSize(collection):collection.length;var tag=getTag(collection);return tag==mapTag||tag==setTag?collection.size:baseKeys(collection).length},lodash.snakeCase=snakeCase,lodash.some=function some(collection,predicate,guard){var func=isArray(collection)?arraySome:baseSome;return guard&&isIterateeCall(collection,predicate,guard)&&(predicate=undefined),func(collection,getIteratee(predicate,3))},lodash.sortedIndex=function sortedIndex(array,value){return baseSortedIndex(array,value)},lodash.sortedIndexBy=function sortedIndexBy(array,value,iteratee){return baseSortedIndexBy(array,value,getIteratee(iteratee,2))},lodash.sortedIndexOf=function sortedIndexOf(array,value){var length=null==array?0:array.length;if(length){var index=baseSortedIndex(array,value);if(index<length&&eq(array[index],value))return index}return-1},lodash.sortedLastIndex=function sortedLastIndex(array,value){return baseSortedIndex(array,value,!0)},lodash.sortedLastIndexBy=function sortedLastIndexBy(array,value,iteratee){return baseSortedIndexBy(array,value,getIteratee(iteratee,2),!0)},lodash.sortedLastIndexOf=function sortedLastIndexOf(array,value){if(null==array?0:array.length){var index=baseSortedIndex(array,value,!0)-1;if(eq(array[index],value))return index}return-1},lodash.startCase=startCase,lodash.startsWith=function startsWith(string,target,position){return string=toString(string),position=null==position?0:baseClamp(toInteger(position),0,string.length),target=baseToString(target),string.slice(position,position+target.length)==target},lodash.subtract=subtract,lodash.sum=function sum(array){return array&&array.length?baseSum(array,identity):0},lodash.sumBy=function sumBy(array,iteratee){return array&&array.length?baseSum(array,getIteratee(iteratee,2)):0},lodash.template=function template(string,options,guard){var settings=lodash.templateSettings;guard&&isIterateeCall(string,options,guard)&&(options=undefined),string=toString(string),options=assignInWith({},options,settings,customDefaultsAssignIn);var isEscaping,isEvaluating,imports=assignInWith({},options.imports,settings.imports,customDefaultsAssignIn),importsKeys=keys(imports),importsValues=baseValues(imports,importsKeys),index=0,interpolate=options.interpolate||reNoMatch,source="__p += '",reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g"),sourceURL="//# sourceURL="+(hasOwnProperty.call(options,"sourceURL")?(options.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++templateCounter+"]")+"\n";string.replace(reDelimiters,(function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){return interpolateValue||(interpolateValue=esTemplateValue),source+=string.slice(index,offset).replace(reUnescapedString,escapeStringChar),escapeValue&&(isEscaping=!0,source+="' +\n__e("+escapeValue+") +\n'"),evaluateValue&&(isEvaluating=!0,source+="';\n"+evaluateValue+";\n__p += '"),interpolateValue&&(source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"),index=offset+match.length,match})),source+="';\n";var variable=hasOwnProperty.call(options,"variable")&&options.variable;if(variable){if(reForbiddenIdentifierChars.test(variable))throw new Error("Invalid `variable` option passed into `_.template`")}else source="with (obj) {\n"+source+"\n}\n";source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;"),source="function("+(variable||"obj")+") {\n"+(variable?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(isEscaping?", __e = _.escape":"")+(isEvaluating?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var result=attempt((function(){return Function(importsKeys,sourceURL+"return "+source).apply(undefined,importsValues)}));if(result.source=source,isError(result))throw result;return result},lodash.times=function times(n,iteratee){if((n=toInteger(n))<1||n>9007199254740991)return[];var index=4294967295,length=nativeMin(n,4294967295);n-=4294967295;for(var result=baseTimes(length,iteratee=getIteratee(iteratee));++index<n;)iteratee(index);return result},lodash.toFinite=toFinite,lodash.toInteger=toInteger,lodash.toLength=toLength,lodash.toLower=function toLower(value){return toString(value).toLowerCase()},lodash.toNumber=toNumber,lodash.toSafeInteger=function toSafeInteger(value){return value?baseClamp(toInteger(value),-9007199254740991,9007199254740991):0===value?value:0},lodash.toString=toString,lodash.toUpper=function toUpper(value){return toString(value).toUpperCase()},lodash.trim=function trim(string,chars,guard){if((string=toString(string))&&(guard||chars===undefined))return baseTrim(string);if(!string||!(chars=baseToString(chars)))return string;var strSymbols=stringToArray(string),chrSymbols=stringToArray(chars);return castSlice(strSymbols,charsStartIndex(strSymbols,chrSymbols),charsEndIndex(strSymbols,chrSymbols)+1).join("")},lodash.trimEnd=function trimEnd(string,chars,guard){if((string=toString(string))&&(guard||chars===undefined))return string.slice(0,trimmedEndIndex(string)+1);if(!string||!(chars=baseToString(chars)))return string;var strSymbols=stringToArray(string);return castSlice(strSymbols,0,charsEndIndex(strSymbols,stringToArray(chars))+1).join("")},lodash.trimStart=function trimStart(string,chars,guard){if((string=toString(string))&&(guard||chars===undefined))return string.replace(reTrimStart,"");if(!string||!(chars=baseToString(chars)))return string;var strSymbols=stringToArray(string);return castSlice(strSymbols,charsStartIndex(strSymbols,stringToArray(chars))).join("")},lodash.truncate=function truncate(string,options){var length=30,omission="...";if(isObject(options)){var separator="separator"in options?options.separator:separator;length="length"in options?toInteger(options.length):length,omission="omission"in options?baseToString(options.omission):omission}var strLength=(string=toString(string)).length;if(hasUnicode(string)){var strSymbols=stringToArray(string);strLength=strSymbols.length}if(length>=strLength)return string;var end=length-stringSize(omission);if(end<1)return omission;var result=strSymbols?castSlice(strSymbols,0,end).join(""):string.slice(0,end);if(separator===undefined)return result+omission;if(strSymbols&&(end+=result.length-end),isRegExp(separator)){if(string.slice(end).search(separator)){var match,substring=result;for(separator.global||(separator=RegExp(separator.source,toString(reFlags.exec(separator))+"g")),separator.lastIndex=0;match=separator.exec(substring);)var newEnd=match.index;result=result.slice(0,newEnd===undefined?end:newEnd)}}else if(string.indexOf(baseToString(separator),end)!=end){var index=result.lastIndexOf(separator);index>-1&&(result=result.slice(0,index))}return result+omission},lodash.unescape=function unescape(string){return(string=toString(string))&&reHasEscapedHtml.test(string)?string.replace(reEscapedHtml,unescapeHtmlChar):string},lodash.uniqueId=function uniqueId(prefix){var id=++idCounter;return toString(prefix)+id},lodash.upperCase=upperCase,lodash.upperFirst=upperFirst,lodash.each=forEach,lodash.eachRight=forEachRight,lodash.first=head,mixin(lodash,(source={},baseForOwn(lodash,(function(func,methodName){hasOwnProperty.call(lodash.prototype,methodName)||(source[methodName]=func)})),source),{chain:!1}),lodash.VERSION="4.17.21",arrayEach(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(methodName){lodash[methodName].placeholder=lodash})),arrayEach(["drop","take"],(function(methodName,index){LazyWrapper.prototype[methodName]=function(n){n=n===undefined?1:nativeMax(toInteger(n),0);var result=this.__filtered__&&!index?new LazyWrapper(this):this.clone();return result.__filtered__?result.__takeCount__=nativeMin(n,result.__takeCount__):result.__views__.push({size:nativeMin(n,4294967295),type:methodName+(result.__dir__<0?"Right":"")}),result},LazyWrapper.prototype[methodName+"Right"]=function(n){return this.reverse()[methodName](n).reverse()}})),arrayEach(["filter","map","takeWhile"],(function(methodName,index){var type=index+1,isFilter=1==type||3==type;LazyWrapper.prototype[methodName]=function(iteratee){var result=this.clone();return result.__iteratees__.push({iteratee:getIteratee(iteratee,3),type}),result.__filtered__=result.__filtered__||isFilter,result}})),arrayEach(["head","last"],(function(methodName,index){var takeName="take"+(index?"Right":"");LazyWrapper.prototype[methodName]=function(){return this[takeName](1).value()[0]}})),arrayEach(["initial","tail"],(function(methodName,index){var dropName="drop"+(index?"":"Right");LazyWrapper.prototype[methodName]=function(){return this.__filtered__?new LazyWrapper(this):this[dropName](1)}})),LazyWrapper.prototype.compact=function(){return this.filter(identity)},LazyWrapper.prototype.find=function(predicate){return this.filter(predicate).head()},LazyWrapper.prototype.findLast=function(predicate){return this.reverse().find(predicate)},LazyWrapper.prototype.invokeMap=baseRest((function(path,args){return"function"==typeof path?new LazyWrapper(this):this.map((function(value){return baseInvoke(value,path,args)}))})),LazyWrapper.prototype.reject=function(predicate){return this.filter(negate(getIteratee(predicate)))},LazyWrapper.prototype.slice=function(start,end){start=toInteger(start);var result=this;return result.__filtered__&&(start>0||end<0)?new LazyWrapper(result):(start<0?result=result.takeRight(-start):start&&(result=result.drop(start)),end!==undefined&&(result=(end=toInteger(end))<0?result.dropRight(-end):result.take(end-start)),result)},LazyWrapper.prototype.takeRightWhile=function(predicate){return this.reverse().takeWhile(predicate).reverse()},LazyWrapper.prototype.toArray=function(){return this.take(4294967295)},baseForOwn(LazyWrapper.prototype,(function(func,methodName){var checkIteratee=/^(?:filter|find|map|reject)|While$/.test(methodName),isTaker=/^(?:head|last)$/.test(methodName),lodashFunc=lodash[isTaker?"take"+("last"==methodName?"Right":""):methodName],retUnwrapped=isTaker||/^find/.test(methodName);lodashFunc&&(lodash.prototype[methodName]=function(){var value=this.__wrapped__,args=isTaker?[1]:arguments,isLazy=value instanceof LazyWrapper,iteratee=args[0],useLazy=isLazy||isArray(value),interceptor=function(value){var result=lodashFunc.apply(lodash,arrayPush([value],args));return isTaker&&chainAll?result[0]:result};useLazy&&checkIteratee&&"function"==typeof iteratee&&1!=iteratee.length&&(isLazy=useLazy=!1);var chainAll=this.__chain__,isHybrid=!!this.__actions__.length,isUnwrapped=retUnwrapped&&!chainAll,onlyLazy=isLazy&&!isHybrid;if(!retUnwrapped&&useLazy){value=onlyLazy?value:new LazyWrapper(this);var result=func.apply(value,args);return result.__actions__.push({func:thru,args:[interceptor],thisArg:undefined}),new LodashWrapper(result,chainAll)}return isUnwrapped&&onlyLazy?func.apply(this,args):(result=this.thru(interceptor),isUnwrapped?isTaker?result.value()[0]:result.value():result)})})),arrayEach(["pop","push","shift","sort","splice","unshift"],(function(methodName){var func=arrayProto[methodName],chainName=/^(?:push|sort|unshift)$/.test(methodName)?"tap":"thru",retUnwrapped=/^(?:pop|shift)$/.test(methodName);lodash.prototype[methodName]=function(){var args=arguments;if(retUnwrapped&&!this.__chain__){var value=this.value();return func.apply(isArray(value)?value:[],args)}return this[chainName]((function(value){return func.apply(isArray(value)?value:[],args)}))}})),baseForOwn(LazyWrapper.prototype,(function(func,methodName){var lodashFunc=lodash[methodName];if(lodashFunc){var key=lodashFunc.name+"";hasOwnProperty.call(realNames,key)||(realNames[key]=[]),realNames[key].push({name:methodName,func:lodashFunc})}})),realNames[createHybrid(undefined,2).name]=[{name:"wrapper",func:undefined}],LazyWrapper.prototype.clone=function lazyClone(){var result=new LazyWrapper(this.__wrapped__);return result.__actions__=copyArray(this.__actions__),result.__dir__=this.__dir__,result.__filtered__=this.__filtered__,result.__iteratees__=copyArray(this.__iteratees__),result.__takeCount__=this.__takeCount__,result.__views__=copyArray(this.__views__),result},LazyWrapper.prototype.reverse=function lazyReverse(){if(this.__filtered__){var result=new LazyWrapper(this);result.__dir__=-1,result.__filtered__=!0}else(result=this.clone()).__dir__*=-1;return result},LazyWrapper.prototype.value=function lazyValue(){var array=this.__wrapped__.value(),dir=this.__dir__,isArr=isArray(array),isRight=dir<0,arrLength=isArr?array.length:0,view=function getView(start,end,transforms){var index=-1,length=transforms.length;for(;++index<length;){var data=transforms[index],size=data.size;switch(data.type){case"drop":start+=size;break;case"dropRight":end-=size;break;case"take":end=nativeMin(end,start+size);break;case"takeRight":start=nativeMax(start,end-size)}}return{start,end}}(0,arrLength,this.__views__),start=view.start,end=view.end,length=end-start,index=isRight?end:start-1,iteratees=this.__iteratees__,iterLength=iteratees.length,resIndex=0,takeCount=nativeMin(length,this.__takeCount__);if(!isArr||!isRight&&arrLength==length&&takeCount==length)return baseWrapperValue(array,this.__actions__);var result=[];outer:for(;length--&&resIndex<takeCount;){for(var iterIndex=-1,value=array[index+=dir];++iterIndex<iterLength;){var data=iteratees[iterIndex],iteratee=data.iteratee,type=data.type,computed=iteratee(value);if(2==type)value=computed;else if(!computed){if(1==type)continue outer;break outer}}result[resIndex++]=value}return result},lodash.prototype.at=wrapperAt,lodash.prototype.chain=function wrapperChain(){return chain(this)},lodash.prototype.commit=function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__)},lodash.prototype.next=function wrapperNext(){this.__values__===undefined&&(this.__values__=toArray(this.value()));var done=this.__index__>=this.__values__.length;return{done,value:done?undefined:this.__values__[this.__index__++]}},lodash.prototype.plant=function wrapperPlant(value){for(var result,parent=this;parent instanceof baseLodash;){var clone=wrapperClone(parent);clone.__index__=0,clone.__values__=undefined,result?previous.__wrapped__=clone:result=clone;var previous=clone;parent=parent.__wrapped__}return previous.__wrapped__=value,result},lodash.prototype.reverse=function wrapperReverse(){var value=this.__wrapped__;if(value instanceof LazyWrapper){var wrapped=value;return this.__actions__.length&&(wrapped=new LazyWrapper(this)),(wrapped=wrapped.reverse()).__actions__.push({func:thru,args:[reverse],thisArg:undefined}),new LodashWrapper(wrapped,this.__chain__)}return this.thru(reverse)},lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__)},lodash.prototype.first=lodash.prototype.head,symIterator&&(lodash.prototype[symIterator]=function wrapperToIterator(){return this}),lodash}();root._=_,(__WEBPACK_AMD_DEFINE_RESULT__=function(){return _}.call(exports,__webpack_require__,exports,module))===undefined||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)}.call(this)},"./node_modules/@pqina/pintura/pintura.css":()=>{},"./node_modules/filepond-plugin-file-poster/dist/filepond-plugin-file-poster.min.css":()=>{},"./node_modules/filepond/dist/filepond.min.css":()=>{},"./node_modules/react-filepond/dist/react-filepond.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";exports.a=exports.F3=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__("./node_modules/react/index.js"),_react2=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(_react),_filepond=__webpack_require__("./node_modules/filepond/dist/filepond.js");exports.F3=_filepond.registerPlugin,_filepond.FileStatus;var isSupported=(0,_filepond.supported)(),filteredMethods=["setOptions","on","off","onOnce","appendTo","insertAfter","insertBefore","isAttachedTo","replaceElement","restoreElement","destroy"];exports.a=function(_React$Component){function FilePond(props){!function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,FilePond);var _this=function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}(this,(FilePond.__proto__||Object.getPrototypeOf(FilePond)).call(this,props));return _this.allowFilesSync=!0,_this}return function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}(FilePond,_React$Component),_createClass(FilePond,[{key:"componentDidMount",value:function componentDidMount(){var _this2=this;if(this._input=this._element.querySelector('input[type="file"]'),this._inputClone=this._input.cloneNode(),isSupported){var options=Object.assign({},this.props);if(options.onupdatefiles){var cb=options.onupdatefiles;options.onupdatefiles=function(items){_this2.allowFilesSync=!1,cb(items)}}this._pond=(0,_filepond.create)(this._input,options),Object.keys(this._pond).filter((function(key){return!filteredMethods.includes(key)})).forEach((function(key){_this2[key]=_this2._pond[key]}))}}},{key:"componentWillUnmount",value:function componentWillUnmount(){if(this._pond){var bin=document.createElement("div");bin.append(this._pond.element),bin.id="foo",this._pond.destroy(),this._pond=void 0,this._element.append(this._inputClone)}}},{key:"shouldComponentUpdate",value:function shouldComponentUpdate(){return!!this.allowFilesSync||(this.allowFilesSync=!0,!1)}},{key:"componentDidUpdate",value:function componentDidUpdate(){if(this._pond){var options=Object.assign({},this.props);delete options.onupdatefiles,this._pond.setOptions(options)}}},{key:"render",value:function render(){var _this3=this,_props=this.props,id=_props.id,name=_props.name,className=_props.className,allowMultiple=_props.allowMultiple,required=_props.required,captureMethod=_props.captureMethod,acceptedFileTypes=_props.acceptedFileTypes;return(0,_react.createElement)("div",{className:"filepond--wrapper",ref:function ref(element){return _this3._element=element}},(0,_react.createElement)("input",{type:"file",name,id,accept:acceptedFileTypes,multiple:allowMultiple,required,className,capture:captureMethod}))}}]),FilePond}(_react2.default.Component)},"./node_modules/react-phone-number-input/min/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>min});var react=__webpack_require__("./node_modules/react/index.js");const en_json={ext:"ext.",country:"Phone number country",phone:"Phone",AB:"Abkhazia",AC:"Ascension Island",AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Congo, Democratic Republic of the",CF:"Central African Republic",CG:"Congo",CH:"Switzerland",CI:"Cote d'Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Federated States of Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HM:"Heard Island and McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin (French Part)",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",OS:"South Ossetia",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PS:"Palestine",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Reunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Swaziland",TA:"Tristan da Cunha",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"United States Minor Outlying Islands",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Holy See (Vatican City State)",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",XK:"Kosovo",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",ZZ:"International"};var prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),PropTypes_metadata=prop_types_default().shape({country_calling_codes:prop_types_default().object.isRequired,countries:prop_types_default().object.isRequired}),labels=prop_types_default().objectOf(prop_types_default().string),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames);function _createForOfIteratorHelperLoose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return(it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0;return function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function count_occurences(symbol,string){for(var _step,count=0,_iterator=_createForOfIteratorHelperLoose(string.split(""));!(_step=_iterator()).done;){_step.value===symbol&&count++}return count}function templateFormatter_createForOfIteratorHelperLoose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return(it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function templateFormatter_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return templateFormatter_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return templateFormatter_arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0;return function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function templateFormatter_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function templateFormatter(template){var placeholder=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",should_close_braces=arguments.length>2?arguments[2]:void 0;if(!template)return function(value){return{text:value}};var characters_in_template=count_occurences(placeholder,template);return function(value){if(!value)return{text:"",template};for(var _step,value_character_index=0,filled_in_template="",_iterator=templateFormatter_createForOfIteratorHelperLoose(template.split(""));!(_step=_iterator()).done;){var character=_step.value;if(character===placeholder){if(filled_in_template+=value[value_character_index],++value_character_index===value.length&&value.length<characters_in_template)break}else filled_in_template+=character}return should_close_braces&&(filled_in_template=function closeBraces(retained_template,template){for(var placeholder=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x",empty_placeholder=arguments.length>3&&void 0!==arguments[3]?arguments[3]:" ",cut_before=retained_template.length,dangling_braces=count_occurences("(",retained_template)-count_occurences(")",retained_template);dangling_braces>0&&cut_before<template.length;)retained_template+=template[cut_before].replace(placeholder,empty_placeholder),")"===template[cut_before]&&dangling_braces--,cut_before++;return retained_template}(filled_in_template,template)),{text:filled_in_template,template}}}var Keys={Backspace:8,Delete:46};function setCaretPosition(element,caret_position){void 0!==caret_position&&(!function isAndroid(){if("undefined"!=typeof navigator)return ANDROID_USER_AGENT_REG_EXP.test(navigator.userAgent)}()?element.setSelectionRange(caret_position,caret_position):setTimeout((function(){return element.setSelectionRange(caret_position,caret_position)}),0))}var ANDROID_USER_AGENT_REG_EXP=/Android/i;function inputControl_onKeyDown(event,input,_parse,_format,on_change){if(!function dom_isReadOnly(element){return element.hasAttribute("readonly")}(input)){var operation=function getOperation(event){switch(event.keyCode){case Keys.Backspace:return"Backspace";case Keys.Delete:return"Delete"}}(event);switch(operation){case"Delete":case"Backspace":event.preventDefault();var selection=function dom_getSelection(element){if(element.selectionStart!==element.selectionEnd)return{start:element.selectionStart,end:element.selectionEnd}}(input);return selection?(eraseSelection(input,selection),formatInputText(input,_parse,_format,void 0,on_change)):formatInputText(input,_parse,_format,operation,on_change)}}}function eraseSelection(input,selection){var text=input.value;text=text.slice(0,selection.start)+text.slice(selection.end),input.value=text,setCaretPosition(input,selection.start)}function formatInputText(input,_parse,_format,operation,on_change){var _parse2=function parse(text,caret_position,parse_character){for(var context={},value="",focused_input_character_index=0,index=0;index<text.length;){var character=parse_character(text[index],value,context);void 0!==character&&(value+=character,void 0!==caret_position&&(caret_position===index?focused_input_character_index=value.length-1:caret_position>index&&(focused_input_character_index=value.length))),index++}return void 0===caret_position&&(focused_input_character_index=value.length),{value,caret:focused_input_character_index}}(input.value,function getCaretPosition(element){return element.selectionStart}(input),_parse),value=_parse2.value,caret=_parse2.caret;if(operation){var newValueAndCaret=function edit(value,caret,operation){switch(operation){case"Backspace":caret>0&&(value=value.slice(0,caret-1)+value.slice(caret),caret--);break;case"Delete":value=value.slice(0,caret)+value.slice(caret+1)}return{value,caret}}(value,caret,operation);value=newValueAndCaret.value,caret=newValueAndCaret.caret}var formatted=function format(value,caret,formatter){"string"==typeof formatter&&(formatter=templateFormatter(formatter));var _ref=formatter(value)||{},text=_ref.text,template=_ref.template;if(void 0===text&&(text=value),template)if(void 0===caret)caret=text.length;else{for(var index=0,found=!1,possibly_last_input_character_index=-1;index<text.length&&index<template.length;){if(text[index]!==template[index]){if(0===caret){found=!0,caret=index;break}possibly_last_input_character_index=index,caret--}index++}found||(caret=possibly_last_input_character_index+1)}return{text,caret}}(value,caret,_format),text=formatted.text;caret=formatted.caret,input.value=text,setCaretPosition(input,caret),on_change(value)}var _excluded=["value","parse","format","inputComponent","onChange","onKeyDown"];function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],excluded.indexOf(key)>=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function Input(_ref,ref){var value=_ref.value,parse=_ref.parse,format=_ref.format,InputComponent=_ref.inputComponent,onChange=_ref.onChange,onKeyDown=_ref.onKeyDown,rest=_objectWithoutProperties(_ref,_excluded),internalRef=(0,react.useRef)(),setRef=(0,react.useCallback)((function(instance){internalRef.current=instance,ref&&("function"==typeof ref?ref(instance):ref.current=instance)}),[ref]),_onChange=(0,react.useCallback)((function(event){return function inputControl_onChange(event,input,_parse,_format,on_change){formatInputText(input,_parse,_format,void 0,on_change)}(0,internalRef.current,parse,format,onChange)}),[internalRef,parse,format,onChange]),_onKeyDown=(0,react.useCallback)((function(event){if(onKeyDown&&onKeyDown(event),!event.defaultPrevented)return inputControl_onKeyDown(event,internalRef.current,parse,format,onChange)}),[internalRef,parse,format,onChange,onKeyDown]);return react.createElement(InputComponent,_extends({},rest,{ref:setRef,value:format(isEmptyValue(value)?"":value).text,onKeyDown:_onKeyDown,onChange:_onChange}))}(Input=react.forwardRef(Input)).propTypes={parse:prop_types_default().func.isRequired,format:prop_types_default().func.isRequired,inputComponent:prop_types_default().elementType.isRequired,type:prop_types_default().string.isRequired,value:prop_types_default().string,onChange:prop_types_default().func.isRequired,onKeyDown:prop_types_default().func,onCut:prop_types_default().func,onPaste:prop_types_default().func},Input.defaultProps={inputComponent:"input",type:"text"};const react_Input=Input;function isEmptyValue(value){return null==value}function semver_compare(a,b){a=a.split("-"),b=b.split("-");for(var pa=a[0].split("."),pb=b[0].split("."),i=0;i<3;i++){var na=Number(pa[i]),nb=Number(pb[i]);if(na>nb)return 1;if(nb>na)return-1;if(!isNaN(na)&&isNaN(nb))return 1;if(isNaN(na)&&!isNaN(nb))return-1}return a[1]&&b[1]?a[1]>b[1]?1:a[1]<b[1]?-1:0:!a[1]&&b[1]?1:a[1]&&!b[1]?-1:0}var objectConstructor={}.constructor;function isObject(object){return null!=object&&object.constructor===objectConstructor}function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}var CALLING_CODE_REG_EXP=/^\d+$/,Metadata=function(){function Metadata(metadata){_classCallCheck(this,Metadata),function validateMetadata(metadata){if(!metadata)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!isObject(metadata)||!isObject(metadata.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(isObject(metadata)?"an object of shape: { "+Object.keys(metadata).join(", ")+" }":"a "+typeOf(metadata)+": "+metadata,"."))}(metadata),this.metadata=metadata,setVersion.call(this,metadata)}return _createClass(Metadata,[{key:"getCountries",value:function getCountries(){return Object.keys(this.metadata.countries).filter((function(_){return"001"!==_}))}},{key:"getCountryMetadata",value:function getCountryMetadata(countryCode){return this.metadata.countries[countryCode]}},{key:"nonGeographic",value:function nonGeographic(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function hasCountry(country){return void 0!==this.getCountryMetadata(country)}},{key:"hasCallingCode",value:function hasCallingCode(callingCode){if(this.getCountryCodesForCallingCode(callingCode))return!0;if(this.nonGeographic()){if(this.nonGeographic()[callingCode])return!0}else{var countryCodes=this.countryCallingCodes()[callingCode];if(countryCodes&&1===countryCodes.length&&"001"===countryCodes[0])return!0}}},{key:"isNonGeographicCallingCode",value:function isNonGeographicCallingCode(callingCode){return this.nonGeographic()?!!this.nonGeographic()[callingCode]:!this.getCountryCodesForCallingCode(callingCode)}},{key:"country",value:function country(countryCode){return this.selectNumberingPlan(countryCode)}},{key:"selectNumberingPlan",value:function selectNumberingPlan(countryCode,callingCode){if(countryCode&&CALLING_CODE_REG_EXP.test(countryCode)&&(callingCode=countryCode,countryCode=null),countryCode&&"001"!==countryCode){if(!this.hasCountry(countryCode))throw new Error("Unknown country: ".concat(countryCode));this.numberingPlan=new NumberingPlan(this.getCountryMetadata(countryCode),this)}else if(callingCode){if(!this.hasCallingCode(callingCode))throw new Error("Unknown calling code: ".concat(callingCode));this.numberingPlan=new NumberingPlan(this.getNumberingPlanMetadata(callingCode),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function getCountryCodesForCallingCode(callingCode){var countryCodes=this.countryCallingCodes()[callingCode];if(countryCodes){if(1===countryCodes.length&&3===countryCodes[0].length)return;return countryCodes}}},{key:"getCountryCodeForCallingCode",value:function getCountryCodeForCallingCode(callingCode){var countryCodes=this.getCountryCodesForCallingCode(callingCode);if(countryCodes)return countryCodes[0]}},{key:"getNumberingPlanMetadata",value:function getNumberingPlanMetadata(callingCode){var countryCode=this.getCountryCodeForCallingCode(callingCode);if(countryCode)return this.getCountryMetadata(countryCode);if(this.nonGeographic()){var metadata=this.nonGeographic()[callingCode];if(metadata)return metadata}else{var countryCodes=this.countryCallingCodes()[callingCode];if(countryCodes&&1===countryCodes.length&&"001"===countryCodes[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function countryCallingCode(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function IDDPrefix(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function defaultIDDPrefix(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function nationalNumberPattern(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function possibleLengths(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function formats(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function nationalPrefixForParsing(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function nationalPrefixTransformRule(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function leadingDigits(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function hasTypes(){return this.numberingPlan.hasTypes()}},{key:"type",value:function type(_type){return this.numberingPlan.type(_type)}},{key:"ext",value:function ext(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function countryCallingCodes(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function chooseCountryByCountryCallingCode(callingCode){return this.selectNumberingPlan(callingCode)}},{key:"hasSelectedNumberingPlan",value:function hasSelectedNumberingPlan(){return void 0!==this.numberingPlan}}]),Metadata}(),NumberingPlan=function(){function NumberingPlan(metadata,globalMetadataObject){_classCallCheck(this,NumberingPlan),this.globalMetadataObject=globalMetadataObject,this.metadata=metadata,setVersion.call(this,globalMetadataObject.metadata)}return _createClass(NumberingPlan,[{key:"callingCode",value:function callingCode(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function getDefaultCountryMetadataForRegion(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function IDDPrefix(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function defaultIDDPrefix(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function nationalNumberPattern(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function possibleLengths(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function _getFormats(metadata){return metadata[this.v1?2:this.v2?3:4]}},{key:"formats",value:function formats(){var _this=this,formats=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return formats.map((function(_){return new Format(_,_this)}))}},{key:"nationalPrefix",value:function nationalPrefix(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function _getNationalPrefixFormattingRule(metadata){return metadata[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function nationalPrefixFormattingRule(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function _nationalPrefixForParsing(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function nationalPrefixForParsing(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function nationalPrefixTransformRule(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function _getNationalPrefixIsOptionalWhenFormatting(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function nationalPrefixIsOptionalWhenFormattingInNationalFormat(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function leadingDigits(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function types(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function hasTypes(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function type(_type2){if(this.hasTypes()&&getType(this.types(),_type2))return new Type(getType(this.types(),_type2),this)}},{key:"ext",value:function ext(){return this.v1||this.v2?" ext. ":this.metadata[13]||" ext. "}}]),NumberingPlan}(),Format=function(){function Format(format,metadata){_classCallCheck(this,Format),this._format=format,this.metadata=metadata}return _createClass(Format,[{key:"pattern",value:function pattern(){return this._format[0]}},{key:"format",value:function format(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function leadingDigitsPatterns(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function nationalPrefixFormattingRule(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function nationalPrefixIsOptionalWhenFormattingInNationalFormat(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function nationalPrefixIsMandatoryWhenFormattingInNationalFormat(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function usesNationalPrefix(){return!(!this.nationalPrefixFormattingRule()||FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function internationalFormat(){return this._format[5]||this.format()}}]),Format}(),FIRST_GROUP_ONLY_PREFIX_PATTERN=/^\(?\$1\)?$/,Type=function(){function Type(type,metadata){_classCallCheck(this,Type),this.type=type,this.metadata=metadata}return _createClass(Type,[{key:"pattern",value:function pattern(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function possibleLengths(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),Type}();function getType(types,type){switch(type){case"FIXED_LINE":return types[0];case"MOBILE":return types[1];case"TOLL_FREE":return types[2];case"PREMIUM_RATE":return types[3];case"PERSONAL_NUMBER":return types[4];case"VOICEMAIL":return types[5];case"UAN":return types[6];case"PAGER":return types[7];case"VOIP":return types[8];case"SHARED_COST":return types[9]}}var typeOf=function typeOf(_){return _typeof(_)};function getCountryCallingCode(country,metadata){if((metadata=new Metadata(metadata)).hasCountry(country))return metadata.country(country).countryCallingCode();throw new Error("Unknown country: ".concat(country))}function isSupportedCountry(country,metadata){return metadata.countries.hasOwnProperty(country)}function setVersion(metadata){var version=metadata.version;"number"==typeof version?(this.v1=1===version,this.v2=2===version,this.v3=3===version,this.v4=4===version):version?-1===semver_compare(version,"1.2.0")?this.v2=!0:-1===semver_compare(version,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function mergeArrays_createForOfIteratorHelperLoose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return(it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function mergeArrays_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return mergeArrays_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mergeArrays_arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0;return function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mergeArrays_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function checkNumberLength(nationalNumber,metadata){return checkNumberLengthForType(nationalNumber,void 0,metadata)}function checkNumberLengthForType(nationalNumber,type,metadata){var type_info=metadata.type(type),possible_lengths=type_info&&type_info.possibleLengths()||metadata.possibleLengths();if(!possible_lengths)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===type){if(!metadata.type("FIXED_LINE"))return checkNumberLengthForType(nationalNumber,"MOBILE",metadata);var mobile_type=metadata.type("MOBILE");mobile_type&&(possible_lengths=function mergeArrays(a,b){for(var _step,merged=a.slice(),_iterator=mergeArrays_createForOfIteratorHelperLoose(b);!(_step=_iterator()).done;){var element=_step.value;a.indexOf(element)<0&&merged.push(element)}return merged.sort((function(a,b){return a-b}))}(possible_lengths,mobile_type.possibleLengths()))}else if(type&&!type_info)return"INVALID_LENGTH";var actual_length=nationalNumber.length,minimum_length=possible_lengths[0];return minimum_length===actual_length?"IS_POSSIBLE":minimum_length>actual_length?"TOO_SHORT":possible_lengths[possible_lengths.length-1]<actual_length?"TOO_LONG":possible_lengths.indexOf(actual_length,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function isPossibleNumber(nationalNumber,metadata){return"IS_POSSIBLE"===checkNumberLength(nationalNumber,metadata)}function matchesEntirely(text,regular_expression){return text=text||"",new RegExp("^(?:"+regular_expression+")$").test(text)}function getNumberType_createForOfIteratorHelperLoose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return(it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function getNumberType_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return getNumberType_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return getNumberType_arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0;return function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function getNumberType_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}var NON_FIXED_LINE_PHONE_TYPES=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function getNumberType(input,options,metadata){if(options=options||{},input.country||input.countryCallingCode){(metadata=new Metadata(metadata)).selectNumberingPlan(input.country,input.countryCallingCode);var nationalNumber=options.v2?input.nationalNumber:input.phone;if(matchesEntirely(nationalNumber,metadata.nationalNumberPattern())){if(isNumberTypeEqualTo(nationalNumber,"FIXED_LINE",metadata))return metadata.type("MOBILE")&&""===metadata.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":metadata.type("MOBILE")?isNumberTypeEqualTo(nationalNumber,"MOBILE",metadata)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var _step,_iterator=getNumberType_createForOfIteratorHelperLoose(NON_FIXED_LINE_PHONE_TYPES);!(_step=_iterator()).done;){var type=_step.value;if(isNumberTypeEqualTo(nationalNumber,type,metadata))return type}}}}function isNumberTypeEqualTo(nationalNumber,type,metadata){return!(!(type=metadata.type(type))||!type.pattern())&&(!(type.possibleLengths()&&type.possibleLengths().indexOf(nationalNumber.length)<0)&&matchesEntirely(nationalNumber,type.pattern()))}function getPossibleCountriesForNumber(callingCode,nationalNumber,metadata){var possibleCountries=new Metadata(metadata).getCountryCodesForCallingCode(callingCode);return possibleCountries?possibleCountries.filter((function(country){return function couldNationalNumberBelongToCountry(nationalNumber,country,metadata){var _metadata=new Metadata(metadata);if(_metadata.selectNumberingPlan(country),_metadata.numberingPlan.possibleLengths().indexOf(nationalNumber.length)>=0)return!0;return!1}(nationalNumber,country,metadata)})):[]}var MIN_LENGTH_FOR_NSN=2,MAX_LENGTH_FOR_NSN=17,MAX_LENGTH_COUNTRY_CODE=3,VALID_DIGITS="0-90-9٠-٩۰-۹",VALID_PUNCTUATION="".concat("-‐-―−ー-").concat("//").concat("..").concat("  ­​⁠ ").concat("()()[]\\[\\]").concat("~⁓∼~");function applyInternationalSeparatorStyle(formattedNumber){return formattedNumber.replace(new RegExp("[".concat(VALID_PUNCTUATION,"]+"),"g")," ").trim()}var FIRST_GROUP_PATTERN=/(\$\d)/;function formatNationalNumberUsingFormat(number,format,_ref){var useInternationalFormat=_ref.useInternationalFormat,withNationalPrefix=_ref.withNationalPrefix,formattedNumber=(_ref.carrierCode,_ref.metadata,number.replace(new RegExp(format.pattern()),useInternationalFormat?format.internationalFormat():withNationalPrefix&&format.nationalPrefixFormattingRule()?format.format().replace(FIRST_GROUP_PATTERN,format.nationalPrefixFormattingRule()):format.format()));return useInternationalFormat?applyInternationalSeparatorStyle(formattedNumber):formattedNumber}var SINGLE_IDD_PREFIX_REG_EXP=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function format_createForOfIteratorHelperLoose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return(it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function format_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return format_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return format_arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0;return function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function format_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach((function(key){_defineProperty(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var DEFAULT_OPTIONS={formatExtension:function formatExtension(formattedNumber,extension,metadata){return"".concat(formattedNumber).concat(metadata.ext()).concat(extension)}};function formatNumber(input,format,options,metadata){if(options=options?_objectSpread(_objectSpread({},DEFAULT_OPTIONS),options):DEFAULT_OPTIONS,metadata=new Metadata(metadata),input.country&&"001"!==input.country){if(!metadata.hasCountry(input.country))throw new Error("Unknown country: ".concat(input.country));metadata.country(input.country)}else{if(!input.countryCallingCode)return input.phone||"";metadata.selectNumberingPlan(input.countryCallingCode)}var number,countryCallingCode=metadata.countryCallingCode(),nationalNumber=options.v2?input.nationalNumber:input.phone;switch(format){case"NATIONAL":return nationalNumber?addExtension(number=formatNationalNumber(nationalNumber,input.carrierCode,"NATIONAL",metadata,options),input.ext,metadata,options.formatExtension):"";case"INTERNATIONAL":return nationalNumber?(number=formatNationalNumber(nationalNumber,null,"INTERNATIONAL",metadata,options),addExtension(number="+".concat(countryCallingCode," ").concat(number),input.ext,metadata,options.formatExtension)):"+".concat(countryCallingCode);case"E.164":return"+".concat(countryCallingCode).concat(nationalNumber);case"RFC3966":return function formatRFC3966(_ref){var number=_ref.number,ext=_ref.ext;if(!number)return"";if("+"!==number[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(number).concat(ext?";ext="+ext:"")}({number:"+".concat(countryCallingCode).concat(nationalNumber),ext:input.ext});case"IDD":if(!options.fromCountry)return;var formattedNumber=function formatIDD(nationalNumber,carrierCode,countryCallingCode,fromCountry,metadata){var fromCountryCallingCode=getCountryCallingCode(fromCountry,metadata.metadata);if(fromCountryCallingCode===countryCallingCode){var formattedNumber=formatNationalNumber(nationalNumber,carrierCode,"NATIONAL",metadata);return"1"===countryCallingCode?countryCallingCode+" "+formattedNumber:formattedNumber}var iddPrefix=function getIddPrefix(country,callingCode,metadata){var countryMetadata=new Metadata(metadata);return countryMetadata.selectNumberingPlan(country,callingCode),countryMetadata.defaultIDDPrefix()?countryMetadata.defaultIDDPrefix():SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())?countryMetadata.IDDPrefix():void 0}(fromCountry,void 0,metadata.metadata);if(iddPrefix)return"".concat(iddPrefix," ").concat(countryCallingCode," ").concat(formatNationalNumber(nationalNumber,null,"INTERNATIONAL",metadata))}(nationalNumber,input.carrierCode,countryCallingCode,options.fromCountry,metadata);return addExtension(formattedNumber,input.ext,metadata,options.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(format,'"'))}}function formatNationalNumber(number,carrierCode,formatAs,metadata,options){var format=function chooseFormatForNumber(availableFormats,nationalNnumber){for(var _step,_iterator=format_createForOfIteratorHelperLoose(availableFormats);!(_step=_iterator()).done;){var format=_step.value;if(format.leadingDigitsPatterns().length>0){var lastLeadingDigitsPattern=format.leadingDigitsPatterns()[format.leadingDigitsPatterns().length-1];if(0!==nationalNnumber.search(lastLeadingDigitsPattern))continue}if(matchesEntirely(nationalNnumber,format.pattern()))return format}}(metadata.formats(),number);return format?formatNationalNumberUsingFormat(number,format,{useInternationalFormat:"INTERNATIONAL"===formatAs,withNationalPrefix:!format.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!options||!1!==options.nationalPrefix,carrierCode,metadata}):number}function addExtension(formattedNumber,ext,metadata,formatExtension){return ext?formatExtension(formattedNumber,ext,metadata):formattedNumber}function PhoneNumber_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function PhoneNumber_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?PhoneNumber_ownKeys(Object(source),!0).forEach((function(key){PhoneNumber_defineProperty(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):PhoneNumber_ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}function PhoneNumber_defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function PhoneNumber_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var PhoneNumber=function(){function PhoneNumber(countryOrCountryCallingCode,nationalNumber,metadata){if(function PhoneNumber_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,PhoneNumber),!countryOrCountryCallingCode)throw new TypeError("`country` or `countryCallingCode` not passed");if(!nationalNumber)throw new TypeError("`nationalNumber` not passed");if(!metadata)throw new TypeError("`metadata` not passed");var _getCountryAndCountry=function getCountryAndCountryCallingCode(countryOrCountryCallingCode,metadataJson){var country,countryCallingCode,metadata=new Metadata(metadataJson);isCountryCode(countryOrCountryCallingCode)?(country=countryOrCountryCallingCode,metadata.selectNumberingPlan(country),countryCallingCode=metadata.countryCallingCode()):countryCallingCode=countryOrCountryCallingCode;return{country,countryCallingCode}}(countryOrCountryCallingCode,metadata),country=_getCountryAndCountry.country,countryCallingCode=_getCountryAndCountry.countryCallingCode;this.country=country,this.countryCallingCode=countryCallingCode,this.nationalNumber=nationalNumber,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return metadata}}return function PhoneNumber_createClass(Constructor,protoProps,staticProps){return protoProps&&PhoneNumber_defineProperties(Constructor.prototype,protoProps),staticProps&&PhoneNumber_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(PhoneNumber,[{key:"setExt",value:function setExt(ext){this.ext=ext}},{key:"getPossibleCountries",value:function getPossibleCountries(){return this.country?[this.country]:getPossibleCountriesForNumber(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function isPossible(){return function isPossiblePhoneNumber(input,options,metadata){if(void 0===options&&(options={}),metadata=new Metadata(metadata),options.v2){if(!input.countryCallingCode)throw new Error("Invalid phone number object passed");metadata.selectNumberingPlan(input.countryCallingCode)}else{if(!input.phone)return!1;if(input.country){if(!metadata.hasCountry(input.country))throw new Error("Unknown country: ".concat(input.country));metadata.country(input.country)}else{if(!input.countryCallingCode)throw new Error("Invalid phone number object passed");metadata.selectNumberingPlan(input.countryCallingCode)}}if(metadata.possibleLengths())return isPossibleNumber(input.phone||input.nationalNumber,metadata);if(input.countryCallingCode&&metadata.isNonGeographicCallingCode(input.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function isValid(){return function isValidNumber(input,options,metadata){return options=options||{},(metadata=new Metadata(metadata)).selectNumberingPlan(input.country,input.countryCallingCode),metadata.hasTypes()?void 0!==getNumberType(input,options,metadata.metadata):matchesEntirely(options.v2?input.nationalNumber:input.phone,metadata.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function isNonGeographic(){return new Metadata(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function isEqual(phoneNumber){return this.number===phoneNumber.number&&this.ext===phoneNumber.ext}},{key:"getType",value:function getType(){return getNumberType(this,{v2:!0},this.getMetadata())}},{key:"format",value:function format(_format,options){return formatNumber(this,_format,options?PhoneNumber_objectSpread(PhoneNumber_objectSpread({},options),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function formatNational(options){return this.format("NATIONAL",options)}},{key:"formatInternational",value:function formatInternational(options){return this.format("INTERNATIONAL",options)}},{key:"getURI",value:function getURI(options){return this.format("RFC3966",options)}}]),PhoneNumber}(),isCountryCode=function isCountryCode(value){return/^[A-Z]{2}$/.test(value)};function AsYouTypeState_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var AsYouTypeState=function(){function AsYouTypeState(_ref){var onCountryChange=_ref.onCountryChange,onCallingCodeChange=_ref.onCallingCodeChange;!function AsYouTypeState_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,AsYouTypeState),this.onCountryChange=onCountryChange,this.onCallingCodeChange=onCallingCodeChange}return function AsYouTypeState_createClass(Constructor,protoProps,staticProps){return protoProps&&AsYouTypeState_defineProperties(Constructor.prototype,protoProps),staticProps&&AsYouTypeState_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(AsYouTypeState,[{key:"reset",value:function reset(_ref2){var country=_ref2.country,callingCode=_ref2.callingCode;this.international=!1,this.missingPlus=!1,this.IDDPrefix=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(country,callingCode)}},{key:"resetNationalSignificantNumber",value:function resetNationalSignificantNumber(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberMatchesInput=!0,this.nationalPrefix=void 0,this.carrierCode=void 0,this.complexPrefixBeforeNationalSignificantNumber=void 0}},{key:"update",value:function update(properties){for(var _i=0,_Object$keys=Object.keys(properties);_i<_Object$keys.length;_i++){var key=_Object$keys[_i];this[key]=properties[key]}}},{key:"initCountryAndCallingCode",value:function initCountryAndCallingCode(country,callingCode){this.setCountry(country),this.setCallingCode(callingCode)}},{key:"setCountry",value:function setCountry(country){this.country=country,this.onCountryChange(country)}},{key:"setCallingCode",value:function setCallingCode(callingCode){this.callingCode=callingCode,this.onCallingCodeChange(callingCode,this.country)}},{key:"startInternationalNumber",value:function startInternationalNumber(country,callingCode){this.international=!0,this.initCountryAndCallingCode(country,callingCode)}},{key:"appendDigits",value:function appendDigits(nextDigits){this.digits+=nextDigits}},{key:"appendNationalSignificantNumberDigits",value:function appendNationalSignificantNumberDigits(nextDigits){this.nationalSignificantNumber+=nextDigits}},{key:"getNationalDigits",value:function getNationalDigits(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function getDigitsWithoutInternationalPrefix(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}]),AsYouTypeState}();function AsYouTypeFormatter_util_createForOfIteratorHelperLoose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return(it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function AsYouTypeFormatter_util_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return AsYouTypeFormatter_util_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AsYouTypeFormatter_util_arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0;return function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function AsYouTypeFormatter_util_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}var DIGIT_PLACEHOLDER_MATCHER=new RegExp("x");function repeat(string,times){if(times<1)return"";for(var result="";times>1;)1&times&&(result+=string),times>>=1,string+=string;return result+string}function cutAndStripNonPairedParens(string,cutBeforeIndex){return")"===string[cutBeforeIndex]&&cutBeforeIndex++,function stripNonPairedParens(string){var dangling_braces=[],i=0;for(;i<string.length;)"("===string[i]?dangling_braces.push(i):")"===string[i]&&dangling_braces.pop(),i++;var start=0,cleared_string="";dangling_braces.push(string.length);for(var _i=0,_dangling_braces=dangling_braces;_i<_dangling_braces.length;_i++){var index=_dangling_braces[_i];cleared_string+=string.slice(start,index),start=index+1}return cleared_string}(string.slice(0,cutBeforeIndex))}function parseDigits_createForOfIteratorHelperLoose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return(it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function parseDigits_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return parseDigits_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return parseDigits_arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0;return function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function parseDigits_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}var DIGITS={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function parseDigit(character){return DIGITS[character]}function parseDigits(string){for(var _step,result="",_iterator=parseDigits_createForOfIteratorHelperLoose(string.split(""));!(_step=_iterator()).done;){var digit=parseDigit(_step.value);digit&&(result+=digit)}return result}function formatCompleteNumber(state,format,_ref){var metadata=_ref.metadata,shouldTryNationalPrefixFormattingRule=_ref.shouldTryNationalPrefixFormattingRule,getSeparatorAfterNationalPrefix=_ref.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(format.pattern(),")$")).test(state.nationalSignificantNumber))return function formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state,format,_ref2){var metadata=_ref2.metadata,shouldTryNationalPrefixFormattingRule=_ref2.shouldTryNationalPrefixFormattingRule,getSeparatorAfterNationalPrefix=_ref2.getSeparatorAfterNationalPrefix;state.nationalSignificantNumber,state.international,state.nationalPrefix,state.carrierCode;if(shouldTryNationalPrefixFormattingRule(format)){var formattedNumber=AsYouTypeFormatter_complete_formatNationalNumber(state,format,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix,metadata});if(formattedNumber)return formattedNumber}return AsYouTypeFormatter_complete_formatNationalNumber(state,format,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix,metadata})}(state,format,{metadata,shouldTryNationalPrefixFormattingRule,getSeparatorAfterNationalPrefix})}function AsYouTypeFormatter_complete_formatNationalNumber(state,format,_ref3){var metadata=_ref3.metadata,useNationalPrefixFormattingRule=_ref3.useNationalPrefixFormattingRule,getSeparatorAfterNationalPrefix=_ref3.getSeparatorAfterNationalPrefix,formattedNationalNumber=formatNationalNumberUsingFormat(state.nationalSignificantNumber,format,{carrierCode:state.carrierCode,useInternationalFormat:state.international,withNationalPrefix:useNationalPrefixFormattingRule,metadata});if(useNationalPrefixFormattingRule||(state.nationalPrefix?formattedNationalNumber=state.nationalPrefix+getSeparatorAfterNationalPrefix(format)+formattedNationalNumber:state.complexPrefixBeforeNationalSignificantNumber&&(formattedNationalNumber=state.complexPrefixBeforeNationalSignificantNumber+" "+formattedNationalNumber)),function isValidFormattedNationalNumber(formattedNationalNumber,state){return parseDigits(formattedNationalNumber)===state.getNationalDigits()}(formattedNationalNumber,state))return formattedNationalNumber}function AsYouTypeFormatter_PatternParser_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var PatternParser=function(){function PatternParser(){!function AsYouTypeFormatter_PatternParser_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,PatternParser)}return function AsYouTypeFormatter_PatternParser_createClass(Constructor,protoProps,staticProps){return protoProps&&AsYouTypeFormatter_PatternParser_defineProperties(Constructor.prototype,protoProps),staticProps&&AsYouTypeFormatter_PatternParser_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(PatternParser,[{key:"parse",value:function parse(pattern){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(pattern),1!==this.context.length)throw new Error("Non-finalized contexts left when pattern parse ended");var _this$context$=this.context[0],branches=_this$context$.branches,instructions=_this$context$.instructions;if(branches)return{op:"|",args:branches.concat([expandSingleElementArray(instructions)])};if(0===instructions.length)throw new Error("Pattern is required");return 1===instructions.length?instructions[0]:instructions}},{key:"startContext",value:function startContext(context){this.context.push(context)}},{key:"endContext",value:function endContext(){this.context.pop()}},{key:"getContext",value:function getContext(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function parsePattern(pattern){if(!pattern)throw new Error("Pattern is required");var match=pattern.match(OPERATOR);if(match){var operator=match[1],before=pattern.slice(0,match.index),rightPart=pattern.slice(match.index+operator.length);switch(operator){case"(?:":before&&this.parsePattern(before),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(before&&this.parsePattern(before),0===this.getContext().instructions.length)throw new Error('No instructions found after "|" operator in an "or" group');var branches=this.getContext().branches;branches.push(expandSingleElementArray(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:branches});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(before&&this.parsePattern(before),!this.getContext().branches){if(1!==this.context.length)throw new Error('"branches" not found in an "or" group context');this.getContext().branches=[]}this.getContext().branches.push(expandSingleElementArray(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":before&&this.parsePattern(before),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:parseOneOfSet(before)});break;default:throw new Error("Unknown operator: ".concat(operator))}rightPart&&this.parsePattern(rightPart)}else{if(ILLEGAL_CHARACTER_REGEXP.test(pattern))throw new Error("Illegal characters found in a pattern: ".concat(pattern));this.getContext().instructions=this.getContext().instructions.concat(pattern.split(""))}}}]),PatternParser}();function parseOneOfSet(pattern){for(var values=[],i=0;i<pattern.length;){if("-"===pattern[i]){if(0===i||i===pattern.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(pattern));for(var prevValue=pattern[i-1].charCodeAt(0)+1,nextValue=pattern[i+1].charCodeAt(0)-1,value=prevValue;value<=nextValue;)values.push(String.fromCharCode(value)),value++}else values.push(pattern[i]);i++}return values}var ILLEGAL_CHARACTER_REGEXP=/[\(\)\[\]\?\:\|]/,OPERATOR=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function expandSingleElementArray(array){return 1===array.length?array[0]:array}function AsYouTypeFormatter_PatternMatcher_createForOfIteratorHelperLoose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return(it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function AsYouTypeFormatter_PatternMatcher_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return AsYouTypeFormatter_PatternMatcher_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AsYouTypeFormatter_PatternMatcher_arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0;return function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function AsYouTypeFormatter_PatternMatcher_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function AsYouTypeFormatter_PatternMatcher_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var PatternMatcher=function(){function PatternMatcher(pattern){!function AsYouTypeFormatter_PatternMatcher_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,PatternMatcher),this.matchTree=(new PatternParser).parse(pattern)}return function AsYouTypeFormatter_PatternMatcher_createClass(Constructor,protoProps,staticProps){return protoProps&&AsYouTypeFormatter_PatternMatcher_defineProperties(Constructor.prototype,protoProps),staticProps&&AsYouTypeFormatter_PatternMatcher_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(PatternMatcher,[{key:"match",value:function match(string){var allowOverflow=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).allowOverflow;if(!string)throw new Error("String is required");var result=_match(string.split(""),this.matchTree,!0);if(result&&result.match&&delete result.matchedChars,!result||!result.overflow||allowOverflow)return result}}]),PatternMatcher}();function _match(characters,tree,last){if("string"==typeof tree){var characterString=characters.join("");return 0===tree.indexOf(characterString)?characters.length===tree.length?{match:!0,matchedChars:characters}:{partialMatch:!0}:0===characterString.indexOf(tree)?last&&characters.length>tree.length?{overflow:!0}:{match:!0,matchedChars:characters.slice(0,tree.length)}:void 0}if(Array.isArray(tree)){for(var restCharacters=characters.slice(),i=0;i<tree.length;){var result=_match(restCharacters,tree[i],last&&i===tree.length-1);if(!result)return;if(result.overflow)return result;if(!result.match){if(result.partialMatch)return{partialMatch:!0};throw new Error("Unsupported match result:\n".concat(JSON.stringify(result,null,2)))}if(0===(restCharacters=restCharacters.slice(result.matchedChars.length)).length)return i===tree.length-1?{match:!0,matchedChars:characters}:{partialMatch:!0};i++}return last?{overflow:!0}:{match:!0,matchedChars:characters.slice(0,characters.length-restCharacters.length)}}switch(tree.op){case"|":for(var partialMatch,_step,_iterator=AsYouTypeFormatter_PatternMatcher_createForOfIteratorHelperLoose(tree.args);!(_step=_iterator()).done;){var _result=_match(characters,_step.value,last);if(_result){if(_result.overflow)return _result;if(_result.match)return{match:!0,matchedChars:_result.matchedChars};if(!_result.partialMatch)throw new Error("Unsupported match result:\n".concat(JSON.stringify(_result,null,2)));partialMatch=!0}}return partialMatch?{partialMatch:!0}:void 0;case"[]":for(var _step2,_iterator2=AsYouTypeFormatter_PatternMatcher_createForOfIteratorHelperLoose(tree.args);!(_step2=_iterator2()).done;){var _char=_step2.value;if(characters[0]===_char)return 1===characters.length?{match:!0,matchedChars:characters}:last?{overflow:!0}:{match:!0,matchedChars:[_char]}}return;default:throw new Error("Unsupported instruction tree: ".concat(tree))}}function AsYouTypeFormatter_createForOfIteratorHelperLoose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return(it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function AsYouTypeFormatter_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return AsYouTypeFormatter_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AsYouTypeFormatter_arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0;return function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function AsYouTypeFormatter_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function AsYouTypeFormatter_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var LONGEST_DUMMY_PHONE_NUMBER=repeat("9",15),NATIONAL_PREFIX_SEPARATORS_PATTERN=/[- ]/,CREATE_CHARACTER_CLASS_PATTERN=function(){return/\[([^\[\]])*\]/g},CREATE_STANDALONE_DIGIT_PATTERN=function(){return/\d(?=[^,}][^,}])/g},NON_ALTERING_FORMAT_REG_EXP=new RegExp("["+VALID_PUNCTUATION+"]*\\$1["+VALID_PUNCTUATION+"]*(\\$\\d["+VALID_PUNCTUATION+"]*)*$"),AsYouTypeFormatter=function(){function AsYouTypeFormatter(_ref){_ref.state;var metadata=_ref.metadata;!function AsYouTypeFormatter_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,AsYouTypeFormatter),this.metadata=metadata,this.resetFormat()}return function AsYouTypeFormatter_createClass(Constructor,protoProps,staticProps){return protoProps&&AsYouTypeFormatter_defineProperties(Constructor.prototype,protoProps),staticProps&&AsYouTypeFormatter_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(AsYouTypeFormatter,[{key:"resetFormat",value:function resetFormat(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function reset(numberingPlan,state){this.resetFormat(),numberingPlan?(this.isNANP="1"===numberingPlan.callingCode(),this.matchingFormats=numberingPlan.formats(),state.nationalSignificantNumber&&this.narrowDownMatchingFormats(state)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function format(nextDigits,state){var _this=this;if(function canFormatCompleteNumber(nationalSignificantNumber,metadata){return"IS_POSSIBLE"===checkNumberLength(nationalSignificantNumber,metadata)}(state.nationalSignificantNumber,this.metadata))for(var _step,_iterator=AsYouTypeFormatter_createForOfIteratorHelperLoose(this.matchingFormats);!(_step=_iterator()).done;){var format=_step.value,formattedCompleteNumber=formatCompleteNumber(state,format,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function shouldTryNationalPrefixFormattingRule(format){return _this.shouldTryNationalPrefixFormattingRule(format,{international:state.international,nationalPrefix:state.nationalPrefix})},getSeparatorAfterNationalPrefix:function getSeparatorAfterNationalPrefix(format){return _this.getSeparatorAfterNationalPrefix(format)}});if(formattedCompleteNumber)return this.resetFormat(),this.chosenFormat=format,this.setNationalNumberTemplate(formattedCompleteNumber.replace(/\d/g,"x"),state),this.populatedNationalNumberTemplate=formattedCompleteNumber,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf("x"),formattedCompleteNumber}return this.formatNationalNumberWithNextDigits(nextDigits,state)}},{key:"formatNationalNumberWithNextDigits",value:function formatNationalNumberWithNextDigits(nextDigits,state){var previouslyChosenFormat=this.chosenFormat,newlyChosenFormat=this.chooseFormat(state);if(newlyChosenFormat)return newlyChosenFormat===previouslyChosenFormat?this.formatNextNationalNumberDigits(nextDigits):this.formatNextNationalNumberDigits(state.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function narrowDownMatchingFormats(_ref2){var _this2=this,nationalSignificantNumber=_ref2.nationalSignificantNumber,nationalPrefix=_ref2.nationalPrefix,international=_ref2.international,leadingDigits=nationalSignificantNumber,leadingDigitsPatternIndex=leadingDigits.length-3;leadingDigitsPatternIndex<0&&(leadingDigitsPatternIndex=0),this.matchingFormats=this.matchingFormats.filter((function(format){return _this2.formatSuits(format,international,nationalPrefix)&&_this2.formatMatches(format,leadingDigits,leadingDigitsPatternIndex)})),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function formatSuits(format,international,nationalPrefix){return!(nationalPrefix&&!format.usesNationalPrefix()&&!format.nationalPrefixIsOptionalWhenFormattingInNationalFormat())&&!(!international&&!nationalPrefix&&format.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function formatMatches(format,leadingDigits,leadingDigitsPatternIndex){var leadingDigitsPatternsCount=format.leadingDigitsPatterns().length;if(0===leadingDigitsPatternsCount)return!0;leadingDigitsPatternIndex=Math.min(leadingDigitsPatternIndex,leadingDigitsPatternsCount-1);var leadingDigitsPattern=format.leadingDigitsPatterns()[leadingDigitsPatternIndex];if(leadingDigits.length<3)try{return void 0!==new PatternMatcher(leadingDigitsPattern).match(leadingDigits,{allowOverflow:!0})}catch(error){return console.error(error),!0}return new RegExp("^(".concat(leadingDigitsPattern,")")).test(leadingDigits)}},{key:"getFormatFormat",value:function getFormatFormat(format,international){return international?format.internationalFormat():format.format()}},{key:"chooseFormat",value:function chooseFormat(state){for(var _step2,_this3=this,_loop=function _loop(){var format=_step2.value;return _this3.chosenFormat===format?"break":NON_ALTERING_FORMAT_REG_EXP.test(_this3.getFormatFormat(format,state.international))?_this3.createTemplateForFormat(format,state)?(_this3.chosenFormat=format,"break"):(_this3.matchingFormats=_this3.matchingFormats.filter((function(_){return _!==format})),"continue"):"continue"},_iterator2=AsYouTypeFormatter_createForOfIteratorHelperLoose(this.matchingFormats.slice());!(_step2=_iterator2()).done;){var _ret=_loop();if("break"===_ret)break}return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function createTemplateForFormat(format,state){if(!(format.pattern().indexOf("|")>=0)){var template=this.getTemplateForFormat(format,state);return template?(this.setNationalNumberTemplate(template,state),!0):void 0}}},{key:"getSeparatorAfterNationalPrefix",value:function getSeparatorAfterNationalPrefix(format){return this.isNANP||format&&format.nationalPrefixFormattingRule()&&NATIONAL_PREFIX_SEPARATORS_PATTERN.test(format.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function getInternationalPrefixBeforeCountryCallingCode(_ref3,options){var IDDPrefix=_ref3.IDDPrefix,missingPlus=_ref3.missingPlus;return IDDPrefix?options&&!1===options.spacing?IDDPrefix:IDDPrefix+" ":missingPlus?"":"+"}},{key:"getTemplate",value:function getTemplate(state){if(this.template){for(var index=-1,i=0,internationalPrefix=state.international?this.getInternationalPrefixBeforeCountryCallingCode(state,{spacing:!1}):"";i<internationalPrefix.length+state.getDigitsWithoutInternationalPrefix().length;)index=this.template.indexOf("x",index+1),i++;return cutAndStripNonPairedParens(this.template,index+1)}}},{key:"setNationalNumberTemplate",value:function setNationalNumberTemplate(template,state){this.nationalNumberTemplate=template,this.populatedNationalNumberTemplate=template,this.populatedNationalNumberTemplatePosition=-1,state.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(state).replace(/[\d\+]/g,"x")+repeat("x",state.callingCode.length)+" "+template:this.template=template}},{key:"getTemplateForFormat",value:function getTemplateForFormat(format,_ref4){var nationalSignificantNumber=_ref4.nationalSignificantNumber,international=_ref4.international,nationalPrefix=_ref4.nationalPrefix,complexPrefixBeforeNationalSignificantNumber=_ref4.complexPrefixBeforeNationalSignificantNumber,pattern=format.pattern();pattern=pattern.replace(CREATE_CHARACTER_CLASS_PATTERN(),"\\d").replace(CREATE_STANDALONE_DIGIT_PATTERN(),"\\d");var digits=LONGEST_DUMMY_PHONE_NUMBER.match(pattern)[0];if(!(nationalSignificantNumber.length>digits.length)){var strictPattern=new RegExp("^"+pattern+"$"),nationalNumberDummyDigits=nationalSignificantNumber.replace(/\d/g,"9");strictPattern.test(nationalNumberDummyDigits)&&(digits=nationalNumberDummyDigits);var nationalPrefixIncludedInTemplate,numberFormat=this.getFormatFormat(format,international);if(this.shouldTryNationalPrefixFormattingRule(format,{international,nationalPrefix})){var numberFormatWithNationalPrefix=numberFormat.replace(FIRST_GROUP_PATTERN,format.nationalPrefixFormattingRule());if(parseDigits(format.nationalPrefixFormattingRule())===(nationalPrefix||"")+parseDigits("$1")&&(numberFormat=numberFormatWithNationalPrefix,nationalPrefixIncludedInTemplate=!0,nationalPrefix))for(var i=nationalPrefix.length;i>0;)numberFormat=numberFormat.replace(/\d/,"x"),i--}var template=digits.replace(new RegExp(pattern),numberFormat).replace(new RegExp("9","g"),"x");return nationalPrefixIncludedInTemplate||(complexPrefixBeforeNationalSignificantNumber?template=repeat("x",complexPrefixBeforeNationalSignificantNumber.length)+" "+template:nationalPrefix&&(template=repeat("x",nationalPrefix.length)+this.getSeparatorAfterNationalPrefix(format)+template)),international&&(template=applyInternationalSeparatorStyle(template)),template}}},{key:"formatNextNationalNumberDigits",value:function formatNextNationalNumberDigits(digits){var result=function populateTemplateWithDigits(template,position,digits){for(var _step2,_iterator2=AsYouTypeFormatter_util_createForOfIteratorHelperLoose(digits.split(""));!(_step2=_iterator2()).done;){var digit=_step2.value;if(template.slice(position+1).search(DIGIT_PLACEHOLDER_MATCHER)<0)return;position=template.search(DIGIT_PLACEHOLDER_MATCHER),template=template.replace(DIGIT_PLACEHOLDER_MATCHER,digit)}return[template,position]}(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,digits);if(result)return this.populatedNationalNumberTemplate=result[0],this.populatedNationalNumberTemplatePosition=result[1],cutAndStripNonPairedParens(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);this.resetFormat()}},{key:"shouldTryNationalPrefixFormattingRule",value:function shouldTryNationalPrefixFormattingRule(format,_ref5){var international=_ref5.international,nationalPrefix=_ref5.nationalPrefix;if(format.nationalPrefixFormattingRule()){var usesNationalPrefix=format.usesNationalPrefix();if(usesNationalPrefix&&nationalPrefix||!usesNationalPrefix&&!international)return!0}}}]),AsYouTypeFormatter}(),CAPTURING_DIGIT_PATTERN=new RegExp("([0-90-9٠-٩۰-۹])");function stripIddPrefix(number,country,callingCode,metadata){if(country){var countryMetadata=new Metadata(metadata);countryMetadata.selectNumberingPlan(country,callingCode);var IDDPrefixPattern=new RegExp(countryMetadata.IDDPrefix());if(0===number.search(IDDPrefixPattern)){var matchedGroups=(number=number.slice(number.match(IDDPrefixPattern)[0].length)).match(CAPTURING_DIGIT_PATTERN);if(!(matchedGroups&&null!=matchedGroups[1]&&matchedGroups[1].length>0&&"0"===matchedGroups[1]))return number}}}function extractNationalNumberFromPossiblyIncompleteNumber(number,metadata){if(number&&metadata.numberingPlan.nationalPrefixForParsing()){var prefixPattern=new RegExp("^(?:"+metadata.numberingPlan.nationalPrefixForParsing()+")"),prefixMatch=prefixPattern.exec(number);if(prefixMatch){var nationalNumber,carrierCode,nationalPrefix,capturedGroupsCount=prefixMatch.length-1,hasCapturedGroups=capturedGroupsCount>0&&prefixMatch[capturedGroupsCount];if(metadata.nationalPrefixTransformRule()&&hasCapturedGroups)nationalNumber=number.replace(prefixPattern,metadata.nationalPrefixTransformRule()),capturedGroupsCount>1&&(carrierCode=prefixMatch[1]);else{var prefixBeforeNationalNumber=prefixMatch[0];nationalNumber=number.slice(prefixBeforeNationalNumber.length),hasCapturedGroups&&(carrierCode=prefixMatch[1])}if(hasCapturedGroups){var possiblePositionOfTheFirstCapturedGroup=number.indexOf(prefixMatch[1]);number.slice(0,possiblePositionOfTheFirstCapturedGroup)===metadata.numberingPlan.nationalPrefix()&&(nationalPrefix=metadata.numberingPlan.nationalPrefix())}else nationalPrefix=prefixMatch[0];return{nationalNumber,nationalPrefix,carrierCode}}}return{nationalNumber:number}}function extractNationalNumber(number,metadata){var _extractNationalNumbe=extractNationalNumberFromPossiblyIncompleteNumber(number,metadata),carrierCode=_extractNationalNumbe.carrierCode,nationalNumber=_extractNationalNumbe.nationalNumber;if(nationalNumber!==number){if(!function shouldHaveExtractedNationalPrefix(nationalNumberBefore,nationalNumberAfter,metadata){if(matchesEntirely(nationalNumberBefore,metadata.nationalNumberPattern())&&!matchesEntirely(nationalNumberAfter,metadata.nationalNumberPattern()))return!1;return!0}(number,nationalNumber,metadata))return{nationalNumber:number};if(metadata.possibleLengths()&&!function isPossibleIncompleteNationalNumber(nationalNumber,metadata){switch(checkNumberLength(nationalNumber,metadata)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(nationalNumber,metadata))return{nationalNumber:number}}return{nationalNumber,carrierCode}}function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number,country,callingCode,metadata){var countryCallingCode=country?getCountryCallingCode(country,metadata):callingCode;if(0===number.indexOf(countryCallingCode)){(metadata=new Metadata(metadata)).selectNumberingPlan(country,callingCode);var possibleShorterNumber=number.slice(countryCallingCode.length),possibleShorterNationalNumber=extractNationalNumber(possibleShorterNumber,metadata).nationalNumber,nationalNumber=extractNationalNumber(number,metadata).nationalNumber;if(!matchesEntirely(nationalNumber,metadata.nationalNumberPattern())&&matchesEntirely(possibleShorterNationalNumber,metadata.nationalNumberPattern())||"TOO_LONG"===checkNumberLength(nationalNumber,metadata))return{countryCallingCode,number:possibleShorterNumber}}return{number}}function extractCountryCallingCode_extractCountryCallingCode(number,country,callingCode,metadata){if(!number)return{};var isNumberWithIddPrefix;if("+"!==number[0]){var numberWithoutIDD=stripIddPrefix(number,country,callingCode,metadata);if(!numberWithoutIDD||numberWithoutIDD===number){if(country||callingCode){var _extractCountryCallin=extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number,country,callingCode,metadata),countryCallingCode=_extractCountryCallin.countryCallingCode,shorterNumber=_extractCountryCallin.number;if(countryCallingCode)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode,number:shorterNumber}}return{number}}isNumberWithIddPrefix=!0,number="+"+numberWithoutIDD}if("0"===number[1])return{};metadata=new Metadata(metadata);for(var i=2;i-1<=MAX_LENGTH_COUNTRY_CODE&&i<=number.length;){var _countryCallingCode=number.slice(1,i);if(metadata.hasCallingCode(_countryCallingCode))return metadata.selectNumberingPlan(_countryCallingCode),{countryCallingCodeSource:isNumberWithIddPrefix?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:_countryCallingCode,number:number.slice(i)};i++}return{}}function AsYouTypeParser_slicedToArray(arr,i){return function AsYouTypeParser_arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function AsYouTypeParser_iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null==_i)return;var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function AsYouTypeParser_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return AsYouTypeParser_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AsYouTypeParser_arrayLikeToArray(o,minLen)}(arr,i)||function AsYouTypeParser_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function AsYouTypeParser_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function AsYouTypeParser_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN=new RegExp("^"+("["+VALID_PUNCTUATION+"0-90-9٠-٩۰-۹]+")+"$","i"),VALID_FORMATTED_PHONE_NUMBER_PART="(?:[++]["+VALID_PUNCTUATION+"0-90-9٠-٩۰-۹]*|["+VALID_PUNCTUATION+"0-90-9٠-٩۰-۹]+)",AFTER_PHONE_NUMBER_DIGITS_END_PATTERN=new RegExp("[^"+VALID_PUNCTUATION+"0-90-9٠-٩۰-۹]+.*$"),COMPLEX_NATIONAL_PREFIX=/[^\d\[\]]/,AsYouTypeParser=function(){function AsYouTypeParser(_ref){var defaultCountry=_ref.defaultCountry,defaultCallingCode=_ref.defaultCallingCode,metadata=_ref.metadata,onNationalSignificantNumberChange=_ref.onNationalSignificantNumberChange;!function AsYouTypeParser_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,AsYouTypeParser),this.defaultCountry=defaultCountry,this.defaultCallingCode=defaultCallingCode,this.metadata=metadata,this.onNationalSignificantNumberChange=onNationalSignificantNumberChange}return function AsYouTypeParser_createClass(Constructor,protoProps,staticProps){return protoProps&&AsYouTypeParser_defineProperties(Constructor.prototype,protoProps),staticProps&&AsYouTypeParser_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(AsYouTypeParser,[{key:"input",value:function input(text,state){var justLeadingPlus,_extractFormattedDigi=function extractFormattedDigitsAndPlus(text){var _extractFormattedDigi3=function _extractFormattedDigitsAndPlus(text){var extractedNumber=function extractFormattedPhoneNumber(text){var hasPlus,startsAt=text.search(VALID_FORMATTED_PHONE_NUMBER_PART);if(startsAt<0)return;text=text.slice(startsAt),"+"===text[0]&&(hasPlus=!0,text=text.slice(1));text=text.replace(AFTER_PHONE_NUMBER_DIGITS_END_PATTERN,""),hasPlus&&(text="+"+text);return text}(text)||"";if("+"===extractedNumber[0])return[extractedNumber.slice(1),!0];return[extractedNumber]}(text),_extractFormattedDigi4=AsYouTypeParser_slicedToArray(_extractFormattedDigi3,2),formattedDigits=_extractFormattedDigi4[0],hasPlus=_extractFormattedDigi4[1];VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN.test(formattedDigits)||(formattedDigits="");return[formattedDigits,hasPlus]}(text),_extractFormattedDigi2=AsYouTypeParser_slicedToArray(_extractFormattedDigi,2),formattedDigits=_extractFormattedDigi2[0],hasPlus=_extractFormattedDigi2[1],digits=parseDigits(formattedDigits);return hasPlus&&(state.digits||(state.startInternationalNumber(),digits||(justLeadingPlus=!0))),digits&&this.inputDigits(digits,state),{digits,justLeadingPlus}}},{key:"inputDigits",value:function inputDigits(nextDigits,state){var digits=state.digits,hasReceivedThreeLeadingDigits=digits.length<3&&digits.length+nextDigits.length>=3;if(state.appendDigits(nextDigits),hasReceivedThreeLeadingDigits&&this.extractIddPrefix(state),this.isWaitingForCountryCallingCode(state)){if(!this.extractCountryCallingCode(state))return}else state.appendNationalSignificantNumberDigits(nextDigits);state.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(state.getNationalDigits(),(function(stateUpdate){return state.update(stateUpdate)}))}},{key:"isWaitingForCountryCallingCode",value:function isWaitingForCountryCallingCode(_ref2){var international=_ref2.international,callingCode=_ref2.callingCode;return international&&!callingCode}},{key:"extractCountryCallingCode",value:function extractCountryCallingCode(state){var _extractCountryCallin=extractCountryCallingCode_extractCountryCallingCode("+"+state.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),countryCallingCode=_extractCountryCallin.countryCallingCode,number=_extractCountryCallin.number;if(countryCallingCode)return state.setCallingCode(countryCallingCode),state.update({nationalSignificantNumber:number}),!0}},{key:"reset",value:function reset(numberingPlan){if(numberingPlan){this.hasSelectedNumberingPlan=!0;var nationalPrefixForParsing=numberingPlan._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=nationalPrefixForParsing&&COMPLEX_NATIONAL_PREFIX.test(nationalPrefixForParsing)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function extractNationalSignificantNumber(nationalDigits,setState){if(this.hasSelectedNumberingPlan){var _extractNationalNumbe=extractNationalNumberFromPossiblyIncompleteNumber(nationalDigits,this.metadata),nationalPrefix=_extractNationalNumbe.nationalPrefix,nationalNumber=_extractNationalNumbe.nationalNumber,carrierCode=_extractNationalNumbe.carrierCode;if(nationalNumber!==nationalDigits)return this.onExtractedNationalNumber(nationalPrefix,carrierCode,nationalNumber,nationalDigits,setState),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function extractAnotherNationalSignificantNumber(nationalDigits,prevNationalSignificantNumber,setState){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(nationalDigits,setState);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var _extractNationalNumbe2=extractNationalNumberFromPossiblyIncompleteNumber(nationalDigits,this.metadata),nationalPrefix=_extractNationalNumbe2.nationalPrefix,nationalNumber=_extractNationalNumbe2.nationalNumber,carrierCode=_extractNationalNumbe2.carrierCode;if(nationalNumber!==prevNationalSignificantNumber)return this.onExtractedNationalNumber(nationalPrefix,carrierCode,nationalNumber,nationalDigits,setState),!0}}},{key:"onExtractedNationalNumber",value:function onExtractedNationalNumber(nationalPrefix,carrierCode,nationalSignificantNumber,nationalDigits,setState){var complexPrefixBeforeNationalSignificantNumber,nationalSignificantNumberMatchesInput,nationalSignificantNumberIndex=nationalDigits.lastIndexOf(nationalSignificantNumber);if(nationalSignificantNumberIndex>=0&&nationalSignificantNumberIndex===nationalDigits.length-nationalSignificantNumber.length){nationalSignificantNumberMatchesInput=!0;var prefixBeforeNationalNumber=nationalDigits.slice(0,nationalSignificantNumberIndex);prefixBeforeNationalNumber!==nationalPrefix&&(complexPrefixBeforeNationalSignificantNumber=prefixBeforeNationalNumber)}setState({nationalPrefix,carrierCode,nationalSignificantNumber,nationalSignificantNumberMatchesInput,complexPrefixBeforeNationalSignificantNumber}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function reExtractNationalSignificantNumber(state){return!!this.extractAnotherNationalSignificantNumber(state.getNationalDigits(),state.nationalSignificantNumber,(function(stateUpdate){return state.update(stateUpdate)}))||(this.extractIddPrefix(state)||this.fixMissingPlus(state)?(this.extractCallingCodeAndNationalSignificantNumber(state),!0):void 0)}},{key:"extractIddPrefix",value:function extractIddPrefix(state){var international=state.international,IDDPrefix=state.IDDPrefix,digits=state.digits;state.nationalSignificantNumber;if(!international&&!IDDPrefix){var numberWithoutIDD=stripIddPrefix(digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);return void 0!==numberWithoutIDD&&numberWithoutIDD!==digits?(state.update({IDDPrefix:digits.slice(0,digits.length-numberWithoutIDD.length)}),this.startInternationalNumber(state,{country:void 0,callingCode:void 0}),!0):void 0}}},{key:"fixMissingPlus",value:function fixMissingPlus(state){if(!state.international){var _extractCountryCallin2=extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(state.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),newCallingCode=_extractCountryCallin2.countryCallingCode;_extractCountryCallin2.number;if(newCallingCode)return state.update({missingPlus:!0}),this.startInternationalNumber(state,{country:state.country,callingCode:newCallingCode}),!0}}},{key:"startInternationalNumber",value:function startInternationalNumber(state,_ref3){var country=_ref3.country,callingCode=_ref3.callingCode;state.startInternationalNumber(country,callingCode),state.nationalSignificantNumber&&(state.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function extractCallingCodeAndNationalSignificantNumber(state){this.extractCountryCallingCode(state)&&this.extractNationalSignificantNumber(state.getNationalDigits(),(function(stateUpdate){return state.update(stateUpdate)}))}}]),AsYouTypeParser}();function getCountryByNationalNumber_createForOfIteratorHelperLoose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return(it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function getCountryByNationalNumber_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return getCountryByNationalNumber_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return getCountryByNationalNumber_arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0;return function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function getCountryByNationalNumber_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function getCountryByNationalNumber(nationalPhoneNumber,_ref){var countries=_ref.countries,defaultCountry=_ref.defaultCountry,metadata=_ref.metadata;metadata=new Metadata(metadata);for(var _step,matchingCountries=[],_iterator=getCountryByNationalNumber_createForOfIteratorHelperLoose(countries);!(_step=_iterator()).done;){var country=_step.value;if(metadata.country(country),metadata.leadingDigits()){if(nationalPhoneNumber&&0===nationalPhoneNumber.search(metadata.leadingDigits()))return country}else if(getNumberType({phone:nationalPhoneNumber,country},void 0,metadata.metadata)){if(!defaultCountry)return country;if(country===defaultCountry)return country;matchingCountries.push(country)}}if(matchingCountries.length>0)return matchingCountries[0]}var getCountryByCallingCode_USE_NON_GEOGRAPHIC_COUNTRY_CODE=!1;function getCountryByCallingCode(callingCode,_ref){var nationalPhoneNumber=_ref.nationalNumber,defaultCountry=_ref.defaultCountry,metadata=_ref.metadata;if(getCountryByCallingCode_USE_NON_GEOGRAPHIC_COUNTRY_CODE&&metadata.isNonGeographicCallingCode(callingCode))return"001";var possibleCountries=metadata.getCountryCodesForCallingCode(callingCode);return possibleCountries?1===possibleCountries.length?possibleCountries[0]:getCountryByNationalNumber(nationalPhoneNumber,{countries:possibleCountries,defaultCountry,metadata:metadata.metadata}):void 0}function AsYouType_slicedToArray(arr,i){return function AsYouType_arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function AsYouType_iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null==_i)return;var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function AsYouType_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return AsYouType_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AsYouType_arrayLikeToArray(o,minLen)}(arr,i)||function AsYouType_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function AsYouType_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function AsYouType_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var AsYouType=function(){function AsYouType(optionsOrDefaultCountry,metadata){!function AsYouType_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,AsYouType),this.metadata=new Metadata(metadata);var _this$getCountryAndCa2=AsYouType_slicedToArray(this.getCountryAndCallingCode(optionsOrDefaultCountry),2),defaultCountry=_this$getCountryAndCa2[0],defaultCallingCode=_this$getCountryAndCa2[1];this.defaultCountry=defaultCountry,this.defaultCallingCode=defaultCallingCode,this.reset()}return function AsYouType_createClass(Constructor,protoProps,staticProps){return protoProps&&AsYouType_defineProperties(Constructor.prototype,protoProps),staticProps&&AsYouType_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(AsYouType,[{key:"getCountryAndCallingCode",value:function getCountryAndCallingCode(optionsOrDefaultCountry){var defaultCountry,defaultCallingCode;return optionsOrDefaultCountry&&(isObject(optionsOrDefaultCountry)?(defaultCountry=optionsOrDefaultCountry.defaultCountry,defaultCallingCode=optionsOrDefaultCountry.defaultCallingCode):defaultCountry=optionsOrDefaultCountry),defaultCountry&&!this.metadata.hasCountry(defaultCountry)&&(defaultCountry=void 0),[defaultCountry,defaultCallingCode]}},{key:"input",value:function input(text){var _this$parser$input=this.parser.input(text,this.state),digits=_this$parser$input.digits;if(_this$parser$input.justLeadingPlus)this.formattedOutput="+";else if(digits){var formattedNationalNumber;if(this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state),this.metadata.hasSelectedNumberingPlan()&&(formattedNationalNumber=this.formatter.format(digits,this.state)),void 0===formattedNationalNumber&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var nationalDigits=this.state.getNationalDigits();nationalDigits&&(formattedNationalNumber=this.formatter.format(nationalDigits,this.state))}this.formattedOutput=formattedNationalNumber?this.getFullNumber(formattedNationalNumber):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function reset(){var _this=this;return this.state=new AsYouTypeState({onCountryChange:function onCountryChange(country){_this.country=country},onCallingCodeChange:function onCallingCodeChange(callingCode,country){_this.metadata.selectNumberingPlan(country,callingCode),_this.formatter.reset(_this.metadata.numberingPlan,_this.state),_this.parser.reset(_this.metadata.numberingPlan)}}),this.formatter=new AsYouTypeFormatter({state:this.state,metadata:this.metadata}),this.parser=new AsYouTypeParser({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function onNationalSignificantNumberChange(){_this.determineTheCountryIfNeeded(),_this.formatter.reset(_this.metadata.numberingPlan,_this.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function isInternational(){return this.state.international}},{key:"getCallingCode",value:function getCallingCode(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function getCountryCallingCode(){return this.getCallingCode()}},{key:"getCountry",value:function getCountry(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function _getCountry(){var country=this.state.country;return country}},{key:"determineTheCountryIfNeeded",value:function determineTheCountryIfNeeded(){this.state.country&&!this.isCountryCallingCodeAmbiguous()||this.determineTheCountry()}},{key:"getFullNumber",value:function getFullNumber(formattedNationalNumber){var _this2=this;if(this.isInternational()){var prefix=function prefix(text){return _this2.formatter.getInternationalPrefixBeforeCountryCallingCode(_this2.state,{spacing:!!text})+text},callingCode=this.state.callingCode;return prefix(callingCode?formattedNationalNumber?"".concat(callingCode," ").concat(formattedNationalNumber):callingCode:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return formattedNationalNumber}},{key:"getNonFormattedNationalNumberWithPrefix",value:function getNonFormattedNationalNumberWithPrefix(){var _this$state=this.state,nationalSignificantNumber=_this$state.nationalSignificantNumber,complexPrefixBeforeNationalSignificantNumber=_this$state.complexPrefixBeforeNationalSignificantNumber,nationalPrefix=_this$state.nationalPrefix,number=nationalSignificantNumber,prefix=complexPrefixBeforeNationalSignificantNumber||nationalPrefix;return prefix&&(number=prefix+number),number}},{key:"getNonFormattedNumber",value:function getNonFormattedNumber(){var nationalSignificantNumberMatchesInput=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(nationalSignificantNumberMatchesInput?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function getNonFormattedTemplate(){var number=this.getNonFormattedNumber();if(number)return number.replace(/[\+\d]/g,"x")}},{key:"isCountryCallingCodeAmbiguous",value:function isCountryCallingCodeAmbiguous(){var callingCode=this.state.callingCode,countryCodes=this.metadata.getCountryCodesForCallingCode(callingCode);return countryCodes&&countryCodes.length>1}},{key:"determineTheCountry",value:function determineTheCountry(){this.state.setCountry(getCountryByCallingCode(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,defaultCountry:this.defaultCountry,metadata:this.metadata}))}},{key:"getNumberValue",value:function getNumberValue(){var _this$state2=this.state,digits=_this$state2.digits,callingCode=_this$state2.callingCode,country=_this$state2.country,nationalSignificantNumber=_this$state2.nationalSignificantNumber;if(digits)return this.isInternational()?callingCode?"+"+callingCode+nationalSignificantNumber:"+"+digits:country||callingCode?"+"+(country?this.metadata.countryCallingCode():callingCode)+nationalSignificantNumber:void 0}},{key:"getNumber",value:function getNumber(){var _this$state3=this.state,nationalSignificantNumber=_this$state3.nationalSignificantNumber,carrierCode=_this$state3.carrierCode,callingCode=_this$state3.callingCode,country=this._getCountry();if(nationalSignificantNumber&&(country||callingCode)){if(country&&country===this.defaultCountry){var metadata=new Metadata(this.metadata.metadata);metadata.selectNumberingPlan(country);var _callingCode=metadata.numberingPlan.callingCode(),ambiguousCountries=this.metadata.getCountryCodesForCallingCode(_callingCode);if(ambiguousCountries.length>1){var exactCountry=getCountryByNationalNumber(nationalSignificantNumber,{countries:ambiguousCountries,defaultCountry:this.defaultCountry,metadata:this.metadata.metadata});exactCountry&&(country=exactCountry)}}var phoneNumber=new PhoneNumber(country||callingCode,nationalSignificantNumber,this.metadata.metadata);return carrierCode&&(phoneNumber.carrierCode=carrierCode),phoneNumber}}},{key:"isPossible",value:function isPossible(){var phoneNumber=this.getNumber();return!!phoneNumber&&phoneNumber.isPossible()}},{key:"isValid",value:function isValid(){var phoneNumber=this.getNumber();return!!phoneNumber&&phoneNumber.isValid()}},{key:"getNationalNumber",value:function getNationalNumber(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function getChars(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function getTemplate(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),AsYouType}();function getInputValuePrefix(_ref){var country=_ref.country,international=_ref.international,withCountryCallingCode=_ref.withCountryCallingCode,metadata=_ref.metadata;return country&&international&&!withCountryCallingCode?"+".concat(getCountryCallingCode(country,metadata)):""}function removeInputValuePrefix(value,prefix){return prefix&&" "===(value=value.slice(prefix.length))[0]&&(value=value.slice(1)),value}function parseIncompletePhoneNumber_createForOfIteratorHelperLoose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return(it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function parseIncompletePhoneNumber_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return parseIncompletePhoneNumber_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return parseIncompletePhoneNumber_arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0;return function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function parseIncompletePhoneNumber_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function parseIncompletePhoneNumber(string){for(var _step,result="",_iterator=parseIncompletePhoneNumber_createForOfIteratorHelperLoose(string.split(""));!(_step=_iterator()).done;){result+=parsePhoneNumberCharacter(_step.value,result)||""}return result}function parsePhoneNumberCharacter(character,prevParsedCharacters,emitEvent){return"+"===character?prevParsedCharacters?void("function"==typeof emitEvent&&emitEvent("end")):"+":parseDigit(character)}function parsePhoneNumberCharacter_(character,prevParsedCharacters,context){if(!context||!context.ignoreRest){return parsePhoneNumberCharacter(character,prevParsedCharacters,(function emitEvent(eventName){if(context&&"end"===eventName)context.ignoreRest=!0}))}}function useInputKeyDownHandler(_ref){var onKeyDown=_ref.onKeyDown,international=_ref.international;return(0,react.useCallback)((function(event){event.keyCode===BACKSPACE_KEY_CODE&&international&&event.target instanceof HTMLInputElement&&function useInputKeyDownHandler_getCaretPosition(element){return element.selectionStart}(event.target)===AFTER_LEADING_PLUS_CARET_POSITION?event.preventDefault():onKeyDown&&onKeyDown(event)}),[onKeyDown,international])}var BACKSPACE_KEY_CODE=8;var AFTER_LEADING_PLUS_CARET_POSITION=1,InputSmart_excluded=["onKeyDown","country","international","withCountryCallingCode","metadata"];function InputSmart_extends(){return InputSmart_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},InputSmart_extends.apply(this,arguments)}function InputSmart_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function InputSmart_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],excluded.indexOf(key)>=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}const InputSmart=function createInput(defaultMetadata){function InputSmart(_ref,ref){var onKeyDown=_ref.onKeyDown,country=_ref.country,international=_ref.international,withCountryCallingCode=_ref.withCountryCallingCode,_ref$metadata=_ref.metadata,metadata=void 0===_ref$metadata?defaultMetadata:_ref$metadata,rest=InputSmart_objectWithoutProperties(_ref,InputSmart_excluded),format=(0,react.useCallback)((function(value){var formatter=new AsYouType(country,metadata),prefix=getInputValuePrefix({country,international,withCountryCallingCode,metadata}),text=formatter.input(prefix+value),template=formatter.getTemplate();return prefix&&(text=removeInputValuePrefix(text,prefix),template&&(template=removeInputValuePrefix(template,prefix))),{text,template}}),[country,metadata]),_onKeyDown=useInputKeyDownHandler({onKeyDown,international});return react.createElement(react_Input,InputSmart_extends({},rest,{ref,parse:parsePhoneNumberCharacter_,format,onKeyDown:_onKeyDown}))}return(InputSmart=react.forwardRef(InputSmart)).propTypes={value:prop_types_default().string.isRequired,onChange:prop_types_default().func.isRequired,onKeyDown:prop_types_default().func,country:prop_types_default().string,international:prop_types_default().bool,withCountryCallingCode:prop_types_default().bool,metadata:prop_types_default().object},InputSmart}();var InputBasic_excluded=["value","onChange","onKeyDown","country","international","withCountryCallingCode","metadata","inputComponent"];function InputBasic_extends(){return InputBasic_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},InputBasic_extends.apply(this,arguments)}function InputBasic_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function InputBasic_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],excluded.indexOf(key)>=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}const InputBasic=function InputBasic_createInput(defaultMetadata){function InputBasic(_ref,ref){var value=_ref.value,onChange=_ref.onChange,onKeyDown=_ref.onKeyDown,country=_ref.country,international=_ref.international,withCountryCallingCode=_ref.withCountryCallingCode,_ref$metadata=_ref.metadata,metadata=void 0===_ref$metadata?defaultMetadata:_ref$metadata,_ref$inputComponent=_ref.inputComponent,Input=void 0===_ref$inputComponent?"input":_ref$inputComponent,rest=InputBasic_objectWithoutProperties(_ref,InputBasic_excluded),prefix=getInputValuePrefix({country,international,withCountryCallingCode,metadata}),_onChange=(0,react.useCallback)((function(event){var newValue=parseIncompletePhoneNumber(event.target.value);newValue===value&&(0===InputBasic_format(prefix,newValue,country,metadata).indexOf(event.target.value)&&(newValue=newValue.slice(0,-1)));onChange(newValue)}),[prefix,value,onChange,country,metadata]),_onKeyDown=useInputKeyDownHandler({onKeyDown,international});return react.createElement(Input,InputBasic_extends({},rest,{ref,value:InputBasic_format(prefix,value,country,metadata),onChange:_onChange,onKeyDown:_onKeyDown}))}return(InputBasic=react.forwardRef(InputBasic)).propTypes={value:prop_types_default().string.isRequired,onChange:prop_types_default().func.isRequired,onKeyDown:prop_types_default().func,country:prop_types_default().string,international:prop_types_default().bool,withCountryCallingCode:prop_types_default().bool,metadata:prop_types_default().object,inputComponent:prop_types_default().elementType},InputBasic}();function InputBasic_format(prefix,value,country,metadata){return removeInputValuePrefix(function formatIncompletePhoneNumber(value,optionsOrDefaultCountry,metadata){return metadata||(metadata=optionsOrDefaultCountry,optionsOrDefaultCountry=void 0),new AsYouType(optionsOrDefaultCountry,metadata).input(value)}(prefix+value,country,metadata),prefix)}function getRegionalIndicatorSymbol(letter){return String.fromCodePoint(127397+letter.toUpperCase().charCodeAt(0))}var CountrySelect_excluded=["value","onChange","options","disabled","readOnly"],_excluded2=["value","options","className","iconComponent","getIconAspectRatio","arrowComponent","unicodeFlags"];function CountrySelect_createForOfIteratorHelperLoose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return(it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function CountrySelect_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return CountrySelect_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CountrySelect_arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0;return function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function CountrySelect_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function CountrySelect_extends(){return CountrySelect_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},CountrySelect_extends.apply(this,arguments)}function CountrySelect_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function CountrySelect_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],excluded.indexOf(key)>=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function CountrySelect(_ref){var value=_ref.value,onChange=_ref.onChange,options=_ref.options,disabled=_ref.disabled,readOnly=_ref.readOnly,rest=CountrySelect_objectWithoutProperties(_ref,CountrySelect_excluded),onChange_=(0,react.useCallback)((function(event){var value=event.target.value;onChange("ZZ"===value?void 0:value)}),[onChange]);(0,react.useMemo)((function(){return getSelectedOption(options,value)}),[options,value]);return react.createElement("select",CountrySelect_extends({},rest,{disabled:disabled||readOnly,readOnly,value:value||"ZZ",onChange:onChange_}),options.map((function(_ref2){var value=_ref2.value,label=_ref2.label,divider=_ref2.divider;return react.createElement("option",{key:divider?"|":value||"ZZ",value:divider?"|":value||"ZZ",disabled:!!divider,style:divider?DIVIDER_STYLE:void 0},label)})))}CountrySelect.propTypes={value:prop_types_default().string,onChange:prop_types_default().func.isRequired,options:prop_types_default().arrayOf(prop_types_default().shape({value:prop_types_default().string,label:prop_types_default().string,divider:prop_types_default().bool})).isRequired,disabled:prop_types_default().bool,readOnly:prop_types_default().bool};var DIVIDER_STYLE={fontSize:"1px",backgroundColor:"currentColor",color:"inherit"};function CountrySelectWithIcon(_ref3){var value=_ref3.value,options=_ref3.options,className=_ref3.className,Icon=_ref3.iconComponent,_ref3$arrowComponent=(_ref3.getIconAspectRatio,_ref3.arrowComponent),Arrow=void 0===_ref3$arrowComponent?DefaultArrowComponent:_ref3$arrowComponent,unicodeFlags=_ref3.unicodeFlags,rest=CountrySelect_objectWithoutProperties(_ref3,_excluded2),selectedOption=(0,react.useMemo)((function(){return getSelectedOption(options,value)}),[options,value]);return react.createElement("div",{className:"PhoneInputCountry"},react.createElement(CountrySelect,CountrySelect_extends({},rest,{value,options,className:classnames_default()("PhoneInputCountrySelect",className)})),unicodeFlags&&value&&react.createElement("div",{className:"PhoneInputCountryIconUnicode"},function getCountryFlag(country){return getRegionalIndicatorSymbol(country[0])+getRegionalIndicatorSymbol(country[1])}(value)),!(unicodeFlags&&value)&&react.createElement(Icon,{"aria-hidden":!0,country:value,label:selectedOption&&selectedOption.label,aspectRatio:unicodeFlags?1:void 0}),react.createElement(Arrow,null))}function DefaultArrowComponent(){return react.createElement("div",{className:"PhoneInputCountrySelectArrow"})}function getSelectedOption(options,value){for(var _step,_iterator=CountrySelect_createForOfIteratorHelperLoose(options);!(_step=_iterator()).done;){var option=_step.value;if(!option.divider&&option.value===value)return option}}CountrySelectWithIcon.propTypes={iconComponent:prop_types_default().elementType,arrowComponent:prop_types_default().elementType,unicodeFlags:prop_types_default().bool};var Flag_excluded=["country","countryName","flags","flagUrl"];function Flag_extends(){return Flag_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},Flag_extends.apply(this,arguments)}function Flag_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function Flag_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],excluded.indexOf(key)>=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function FlagComponent(_ref){var country=_ref.country,countryName=_ref.countryName,flags=_ref.flags,flagUrl=_ref.flagUrl,rest=Flag_objectWithoutProperties(_ref,Flag_excluded);return flags&&flags[country]?flags[country]({title:countryName}):react.createElement("img",Flag_extends({},rest,{alt:countryName,role:countryName?void 0:"presentation",src:flagUrl.replace("{XX}",country).replace("{xx}",country.toLowerCase())}))}FlagComponent.propTypes={country:prop_types_default().string.isRequired,countryName:prop_types_default().string.isRequired,flags:prop_types_default().objectOf(prop_types_default().elementType),flagUrl:prop_types_default().string.isRequired};var InternationalIcon_excluded=["aspectRatio"],InternationalIcon_excluded2=["title"],_excluded3=["title"];function InternationalIcon_extends(){return InternationalIcon_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},InternationalIcon_extends.apply(this,arguments)}function InternationalIcon_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function InternationalIcon_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],excluded.indexOf(key)>=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function InternationalIcon_InternationalIcon(_ref){var aspectRatio=_ref.aspectRatio,rest=InternationalIcon_objectWithoutProperties(_ref,InternationalIcon_excluded);return 1===aspectRatio?react.createElement(InternationalIcon1x1,rest):react.createElement(InternationalIcon3x2,rest)}function InternationalIcon3x2(_ref2){var title=_ref2.title,rest=InternationalIcon_objectWithoutProperties(_ref2,InternationalIcon_excluded2);return react.createElement("svg",InternationalIcon_extends({},rest,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 50"}),react.createElement("title",null,title),react.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeMiterlimit:"10"},react.createElement("path",{strokeLinecap:"round",d:"M47.2,36.1C48.1,36,49,36,50,36c7.4,0,14,1.7,18.5,4.3"}),react.createElement("path",{d:"M68.6,9.6C64.2,12.3,57.5,14,50,14c-7.4,0-14-1.7-18.5-4.3"}),react.createElement("line",{x1:"26",y1:"25",x2:"74",y2:"25"}),react.createElement("line",{x1:"50",y1:"1",x2:"50",y2:"49"}),react.createElement("path",{strokeLinecap:"round",d:"M46.3,48.7c1.2,0.2,2.5,0.3,3.7,0.3c13.3,0,24-10.7,24-24S63.3,1,50,1S26,11.7,26,25c0,2,0.3,3.9,0.7,5.8"}),react.createElement("path",{strokeLinecap:"round",d:"M46.8,48.2c1,0.6,2.1,0.8,3.2,0.8c6.6,0,12-10.7,12-24S56.6,1,50,1S38,11.7,38,25c0,1.4,0.1,2.7,0.2,4c0,0.1,0,0.2,0,0.2"})),react.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"none",fill:"currentColor",d:"M12.4,17.9c2.9-2.9,5.4-4.8,0.3-11.2S4.1,5.2,1.3,8.1C-2,11.4,1.1,23.5,13.1,35.6s24.3,15.2,27.5,11.9c2.8-2.8,7.8-6.3,1.4-11.5s-8.3-2.6-11.2,0.3c-2,2-7.2-2.2-11.7-6.7S10.4,19.9,12.4,17.9z"}))}function InternationalIcon1x1(_ref3){var title=_ref3.title,rest=InternationalIcon_objectWithoutProperties(_ref3,_excluded3);return react.createElement("svg",InternationalIcon_extends({},rest,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"}),react.createElement("title",null,title),react.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeLinecap:"round"},react.createElement("path",{d:"M8.45,13A21.44,21.44,0,1,1,37.08,41.56"}),react.createElement("path",{d:"M19.36,35.47a36.9,36.9,0,0,1-2.28-13.24C17.08,10.39,21.88.85,27.8.85s10.72,9.54,10.72,21.38c0,6.48-1.44,12.28-3.71,16.21"}),react.createElement("path",{d:"M17.41,33.4A39,39,0,0,1,27.8,32.06c6.62,0,12.55,1.5,16.48,3.86"}),react.createElement("path",{d:"M44.29,8.53c-3.93,2.37-9.86,3.88-16.49,3.88S15.25,10.9,11.31,8.54"}),react.createElement("line",{x1:"27.8",y1:"0.85",x2:"27.8",y2:"34.61"}),react.createElement("line",{x1:"15.2",y1:"22.23",x2:"49.15",y2:"22.23"})),react.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"transparent",fill:"currentColor",d:"M9.42,26.64c2.22-2.22,4.15-3.59.22-8.49S3.08,17,.93,19.17c-2.49,2.48-.13,11.74,9,20.89s18.41,11.5,20.89,9c2.15-2.15,5.91-4.77,1-8.71s-6.27-2-8.49.22c-1.55,1.55-5.48-1.69-8.86-5.08S7.87,28.19,9.42,26.64Z"}))}function countries_createForOfIteratorHelperLoose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return(it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function countries_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return countries_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return countries_arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0;return function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function countries_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function isCountrySupportedWithError(country,metadata){return!!isSupportedCountry(country,metadata)||(console.error("Country not found: ".concat(country)),!1)}function getSupportedCountries(countries,metadata){return countries&&0===(countries=countries.filter((function(country){return isCountrySupportedWithError(country,metadata)}))).length&&(countries=void 0),countries}function getCountries(metadata){return new Metadata(metadata).getCountries()}InternationalIcon_InternationalIcon.propTypes={title:prop_types_default().string.isRequired,aspectRatio:prop_types_default().number},InternationalIcon3x2.propTypes={title:prop_types_default().string.isRequired},InternationalIcon1x1.propTypes={title:prop_types_default().string.isRequired};var CountryIcon_excluded=["country","label","aspectRatio"];function CountryIcon_extends(){return CountryIcon_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},CountryIcon_extends.apply(this,arguments)}function CountryIcon_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function CountryIcon_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],excluded.indexOf(key)>=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function createCountryIconComponent(_ref){var flags=_ref.flags,flagUrl=_ref.flagUrl,FlagComponent=_ref.flagComponent,InternationalIcon=_ref.internationalIcon;function CountryIcon(_ref2){var country=_ref2.country,label=_ref2.label,aspectRatio=_ref2.aspectRatio,rest=CountryIcon_objectWithoutProperties(_ref2,CountryIcon_excluded),_aspectRatio=InternationalIcon===InternationalIcon_InternationalIcon?aspectRatio:void 0;return react.createElement("div",CountryIcon_extends({},rest,{className:classnames_default()("PhoneInputCountryIcon",{"PhoneInputCountryIcon--square":1===_aspectRatio,"PhoneInputCountryIcon--border":country})}),country?react.createElement(FlagComponent,{country,countryName:label,flags,flagUrl,className:"PhoneInputCountryIconImg"}):react.createElement(InternationalIcon,{title:label,aspectRatio:_aspectRatio,className:"PhoneInputCountryIconImg"}))}return CountryIcon.propTypes={country:prop_types_default().string,label:prop_types_default().string.isRequired,aspectRatio:prop_types_default().number},CountryIcon}createCountryIconComponent({flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",flagComponent:FlagComponent,internationalIcon:InternationalIcon_InternationalIcon});function useExternalRef_createForOfIteratorHelperLoose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return(it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function useExternalRef_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return useExternalRef_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return useExternalRef_arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0;return function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function useExternalRef_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function setRefsValue(refs,value){for(var _step,_iterator=useExternalRef_createForOfIteratorHelperLoose(refs);!(_step=_iterator()).done;){var ref=_step.value;ref&&setRefValue(ref,value)}}function setRefValue(ref,value){"function"==typeof ref?ref(value):ref.current=value}function normalizeArguments_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function normalizeArguments_defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function normalizeArguments_slicedToArray(arr,i){return function normalizeArguments_arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function normalizeArguments_iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null==_i)return;var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function normalizeArguments_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return normalizeArguments_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return normalizeArguments_arrayLikeToArray(o,minLen)}(arr,i)||function normalizeArguments_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function normalizeArguments_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function normalizeArguments(args){var text,options,metadata,_Array$prototype$slic2=normalizeArguments_slicedToArray(Array.prototype.slice.call(args),4),arg_1=_Array$prototype$slic2[0],arg_2=_Array$prototype$slic2[1],arg_3=_Array$prototype$slic2[2],arg_4=_Array$prototype$slic2[3];if("string"!=typeof arg_1)throw new TypeError("A text for parsing must be a string.");if(text=arg_1,arg_2&&"string"!=typeof arg_2){if(!isObject(arg_2))throw new Error("Invalid second argument: ".concat(arg_2));arg_3?(options=arg_2,metadata=arg_3):metadata=arg_2}else arg_4?(options=arg_3,metadata=arg_4):(options=void 0,metadata=arg_3),arg_2&&(options=function normalizeArguments_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?normalizeArguments_ownKeys(Object(source),!0).forEach((function(key){normalizeArguments_defineProperty(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):normalizeArguments_ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}({defaultCountry:arg_2},options));return{text,options,metadata}}function ParseError_typeof(obj){return ParseError_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},ParseError_typeof(obj)}function ParseError_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function _possibleConstructorReturn(self,call){if(call&&("object"===ParseError_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}(this,result)}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _wrapNativeSuper(Class){var _cache="function"==typeof Map?new Map:void 0;return _wrapNativeSuper=function _wrapNativeSuper(Class){if(null===Class||!function _isNativeFunction(fn){return-1!==Function.toString.call(fn).indexOf("[native code]")}(Class))return Class;if("function"!=typeof Class)throw new TypeError("Super expression must either be null or a function");if(void 0!==_cache){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper)}function Wrapper(){return _construct(Class,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,Class)},_wrapNativeSuper(Class)}function _construct(Parent,args,Class){return _construct=_isNativeReflectConstruct()?Reflect.construct:function _construct(Parent,args,Class){var a=[null];a.push.apply(a,args);var instance=new(Function.bind.apply(Parent,a));return Class&&_setPrototypeOf(instance,Class.prototype),instance},_construct.apply(null,arguments)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}var ParseError=function(_Error){!function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(ParseError,_Error);var _super=_createSuper(ParseError);function ParseError(code){var _this;return function ParseError_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,ParseError),_this=_super.call(this,code),Object.setPrototypeOf(_assertThisInitialized(_this),ParseError.prototype),_this.name=_this.constructor.name,_this}return function ParseError_createClass(Constructor,protoProps,staticProps){return protoProps&&ParseError_defineProperties(Constructor.prototype,protoProps),staticProps&&ParseError_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(ParseError)}(_wrapNativeSuper(Error)),getExtensionDigitsPattern=function getExtensionDigitsPattern(maxLength){return"([".concat(VALID_DIGITS,"]{1,").concat(maxLength,"})")};function createExtensionPattern(purpose){return";ext="+getExtensionDigitsPattern("20")+"|"+("[  \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[  \\t,-]*"+getExtensionDigitsPattern("20")+"#?")+"|"+("[  \\t,]*(?:[xx##~~]|int|int)[:\\..]?[  \\t,-]*"+getExtensionDigitsPattern("9")+"#?")+"|"+("[- ]+"+getExtensionDigitsPattern("6")+"#")+"|"+("[  \\t]*(?:,{2}|;)[:\\..]?[  \\t,-]*"+getExtensionDigitsPattern("15")+"#?")+"|"+("[  \\t]*(?:,)+[:\\..]?[  \\t,-]*"+getExtensionDigitsPattern("9")+"#?")}var MIN_LENGTH_PHONE_NUMBER_PATTERN="[0-90-9٠-٩۰-۹]{"+MIN_LENGTH_FOR_NSN+"}",VALID_PHONE_NUMBER="[++]{0,1}(?:["+VALID_PUNCTUATION+"]*["+"0-90-9٠-٩۰-۹]){3,}["+VALID_PUNCTUATION+"0-90-9٠-٩۰-۹]*",VALID_PHONE_NUMBER_START_REG_EXP=new RegExp("^[++]{0,1}(?:["+VALID_PUNCTUATION+"]*["+"0-90-9٠-٩۰-۹]){1,2}$","i"),VALID_PHONE_NUMBER_WITH_EXTENSION=VALID_PHONE_NUMBER+"(?:"+createExtensionPattern()+")?",VALID_PHONE_NUMBER_PATTERN=new RegExp("^"+MIN_LENGTH_PHONE_NUMBER_PATTERN+"$|^"+VALID_PHONE_NUMBER_WITH_EXTENSION+"$","i");var EXTN_PATTERN=new RegExp("(?:"+createExtensionPattern()+")$","i");var PLUS_SIGN="+",RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_=new RegExp("^\\"+PLUS_SIGN+"([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*["+"0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$","g"),RFC3966_DOMAINNAME_PATTERN_=new RegExp("^([0-90-9٠-٩۰-۹]+((\\-)*[0-90-9٠-٩۰-۹])*\\.)*[a-zA-Z]+((\\-)*[0-90-9٠-٩۰-۹])*\\.?$","g"),RFC3966_PREFIX_="tel:",RFC3966_PHONE_CONTEXT_=";phone-context=",RFC3966_ISDN_SUBADDRESS_=";isub=";function extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(numberToParse,_ref){var phoneNumberString,extractFormattedPhoneNumber=_ref.extractFormattedPhoneNumber,phoneContext=function extractPhoneContext(numberToExtractFrom){var indexOfPhoneContext=numberToExtractFrom.indexOf(RFC3966_PHONE_CONTEXT_);if(indexOfPhoneContext<0)return null;var phoneContextStart=indexOfPhoneContext+RFC3966_PHONE_CONTEXT_.length;if(phoneContextStart>=numberToExtractFrom.length)return"";var phoneContextEnd=numberToExtractFrom.indexOf(";",phoneContextStart);return phoneContextEnd>=0?numberToExtractFrom.substring(phoneContextStart,phoneContextEnd):numberToExtractFrom.substring(phoneContextStart)}(numberToParse);if(!function isPhoneContextValid(phoneContext){return null===phoneContext||0!==phoneContext.length&&(RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.test(phoneContext)||RFC3966_DOMAINNAME_PATTERN_.test(phoneContext))}(phoneContext))throw new ParseError("NOT_A_NUMBER");if(null===phoneContext)phoneNumberString=extractFormattedPhoneNumber(numberToParse)||"";else{phoneNumberString="",phoneContext.charAt(0)===PLUS_SIGN&&(phoneNumberString+=phoneContext);var indexOfNationalNumber,indexOfRfc3966Prefix=numberToParse.indexOf(RFC3966_PREFIX_);indexOfNationalNumber=indexOfRfc3966Prefix>=0?indexOfRfc3966Prefix+RFC3966_PREFIX_.length:0;var indexOfPhoneContext=numberToParse.indexOf(RFC3966_PHONE_CONTEXT_);phoneNumberString+=numberToParse.substring(indexOfNationalNumber,indexOfPhoneContext)}var indexOfIsdn=phoneNumberString.indexOf(RFC3966_ISDN_SUBADDRESS_);if(indexOfIsdn>0&&(phoneNumberString=phoneNumberString.substring(0,indexOfIsdn)),""!==phoneNumberString)return phoneNumberString}var MAX_INPUT_STRING_LENGTH=250,PHONE_NUMBER_START_PATTERN=new RegExp("[++0-90-9٠-٩۰-۹]"),AFTER_PHONE_NUMBER_END_PATTERN=new RegExp("[^0-90-9٠-٩۰-۹#]+$"),parse_USE_NON_GEOGRAPHIC_COUNTRY_CODE=!1;function parse_parse(text,options,metadata){if(options=options||{},metadata=new Metadata(metadata),options.defaultCountry&&!metadata.hasCountry(options.defaultCountry)){if(options.v2)throw new ParseError("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(options.defaultCountry))}var _parseInput=function parseInput(text,v2,extract){var number=extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(text,{extractFormattedPhoneNumber:function extractFormattedPhoneNumber(text){return function _extractFormattedPhoneNumber(text,extract,throwOnError){if(!text)return;if(text.length>MAX_INPUT_STRING_LENGTH){if(throwOnError)throw new ParseError("TOO_LONG");return}if(!1===extract)return text;var startsAt=text.search(PHONE_NUMBER_START_PATTERN);if(startsAt<0)return;return text.slice(startsAt).replace(AFTER_PHONE_NUMBER_END_PATTERN,"")}(text,extract,v2)}});if(!number)return{};if(!function isViablePhoneNumber_isViablePhoneNumber(number){return number.length>=MIN_LENGTH_FOR_NSN&&VALID_PHONE_NUMBER_PATTERN.test(number)}(number))return function isViablePhoneNumberStart(number){return VALID_PHONE_NUMBER_START_REG_EXP.test(number)}(number)?{error:"TOO_SHORT"}:{};var withExtensionStripped=function extractExtension(number){var start=number.search(EXTN_PATTERN);if(start<0)return{};for(var numberWithoutExtension=number.slice(0,start),matches=number.match(EXTN_PATTERN),i=1;i<matches.length;){if(matches[i])return{number:numberWithoutExtension,ext:matches[i]};i++}}(number);if(withExtensionStripped.ext)return withExtensionStripped;return{number}}(text,options.v2,options.extract),formattedPhoneNumber=_parseInput.number,ext=_parseInput.ext,error=_parseInput.error;if(!formattedPhoneNumber){if(options.v2){if("TOO_SHORT"===error)throw new ParseError("TOO_SHORT");throw new ParseError("NOT_A_NUMBER")}return{}}var _parsePhoneNumber=function parsePhoneNumber(formattedPhoneNumber,defaultCountry,defaultCallingCode,metadata){var country,_extractCountryCallin=extractCountryCallingCode_extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber),defaultCountry,defaultCallingCode,metadata.metadata),countryCallingCodeSource=_extractCountryCallin.countryCallingCodeSource,countryCallingCode=_extractCountryCallin.countryCallingCode,number=_extractCountryCallin.number;if(countryCallingCode)metadata.selectNumberingPlan(countryCallingCode);else{if(!number||!defaultCountry&&!defaultCallingCode)return{};metadata.selectNumberingPlan(defaultCountry,defaultCallingCode),defaultCountry?country=defaultCountry:parse_USE_NON_GEOGRAPHIC_COUNTRY_CODE&&metadata.isNonGeographicCallingCode(defaultCallingCode)&&(country="001"),countryCallingCode=defaultCallingCode||getCountryCallingCode(defaultCountry,metadata.metadata)}if(!number)return{countryCallingCodeSource,countryCallingCode};var _extractNationalNumbe=extractNationalNumber(parseIncompletePhoneNumber(number),metadata),nationalNumber=_extractNationalNumbe.nationalNumber,carrierCode=_extractNationalNumbe.carrierCode,exactCountry=getCountryByCallingCode(countryCallingCode,{nationalNumber,defaultCountry,metadata});exactCountry&&(country=exactCountry,"001"===exactCountry||metadata.country(country));return{country,countryCallingCode,countryCallingCodeSource,nationalNumber,carrierCode}}(formattedPhoneNumber,options.defaultCountry,options.defaultCallingCode,metadata),country=_parsePhoneNumber.country,nationalNumber=_parsePhoneNumber.nationalNumber,countryCallingCode=_parsePhoneNumber.countryCallingCode,countryCallingCodeSource=_parsePhoneNumber.countryCallingCodeSource,carrierCode=_parsePhoneNumber.carrierCode;if(!metadata.hasSelectedNumberingPlan()){if(options.v2)throw new ParseError("INVALID_COUNTRY");return{}}if(!nationalNumber||nationalNumber.length<MIN_LENGTH_FOR_NSN){if(options.v2)throw new ParseError("TOO_SHORT");return{}}if(nationalNumber.length>MAX_LENGTH_FOR_NSN){if(options.v2)throw new ParseError("TOO_LONG");return{}}if(options.v2){var phoneNumber=new PhoneNumber(countryCallingCode,nationalNumber,metadata.metadata);return country&&(phoneNumber.country=country),carrierCode&&(phoneNumber.carrierCode=carrierCode),ext&&(phoneNumber.ext=ext),phoneNumber.__countryCallingCodeSource=countryCallingCodeSource,phoneNumber}var valid=!!(options.extended?metadata.hasSelectedNumberingPlan():country)&&matchesEntirely(nationalNumber,metadata.nationalNumberPattern());return options.extended?{country,countryCallingCode,carrierCode,valid,possible:!!valid||!(!0!==options.extended||!metadata.possibleLengths()||!isPossibleNumber(nationalNumber,metadata)),phone:nationalNumber,ext}:valid?function result(country,nationalNumber,ext){var result={country,phone:nationalNumber};ext&&(result.ext=ext);return result}(country,nationalNumber,ext):{}}function parsePhoneNumberWithError_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function parsePhoneNumberWithError_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?parsePhoneNumberWithError_ownKeys(Object(source),!0).forEach((function(key){parsePhoneNumberWithError_defineProperty(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):parsePhoneNumberWithError_ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}function parsePhoneNumberWithError_defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function parsePhoneNumber_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function parsePhoneNumber_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?parsePhoneNumber_ownKeys(Object(source),!0).forEach((function(key){parsePhoneNumber_defineProperty(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):parsePhoneNumber_ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}function parsePhoneNumber_defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function parsePhoneNumber_parsePhoneNumber(text,options,metadata){options&&options.defaultCountry&&!isSupportedCountry(options.defaultCountry,metadata)&&(options=parsePhoneNumber_objectSpread(parsePhoneNumber_objectSpread({},options),{},{defaultCountry:void 0}));try{return function parsePhoneNumberWithError(text,options,metadata){return parse_parse(text,parsePhoneNumberWithError_objectSpread(parsePhoneNumberWithError_objectSpread({},options),{},{v2:!0}),metadata)}(text,options,metadata)}catch(error){if(!(error instanceof ParseError))throw error}}function getInternationalPhoneNumberPrefix(country,metadata){return"+"+getCountryCallingCode(country,metadata)}function phoneInputHelpers_parsePhoneNumber(value,metadata){return function es6_parsePhoneNumber_parsePhoneNumber(){var _normalizeArguments=normalizeArguments(arguments);return parsePhoneNumber_parsePhoneNumber(_normalizeArguments.text,_normalizeArguments.options,_normalizeArguments.metadata)}(value||"",metadata)}function getPhoneDigitsForNewCountry(phoneDigits,_ref3){var prevCountry=_ref3.prevCountry,newCountry=_ref3.newCountry,metadata=_ref3.metadata,useNationalFormat=_ref3.useNationalFormat;if(prevCountry===newCountry)return phoneDigits;if(!phoneDigits)return useNationalFormat?"":newCountry?getInternationalPhoneNumberPrefix(newCountry,metadata):"";if(newCountry){if("+"===phoneDigits[0]){if(useNationalFormat)return 0===phoneDigits.indexOf("+"+getCountryCallingCode(newCountry,metadata))?function stripCountryCallingCode(number,country,metadata){if(country){var countryCallingCodePrefix="+"+getCountryCallingCode(country,metadata);if(number.length<countryCallingCodePrefix.length){if(0===countryCallingCodePrefix.indexOf(number))return""}else if(0===number.indexOf(countryCallingCodePrefix))return number.slice(countryCallingCodePrefix.length)}for(var _i=0,_Object$keys=Object.keys(metadata.country_calling_codes);_i<_Object$keys.length;_i++){var country_calling_code=_Object$keys[_i];if(1===number.indexOf(country_calling_code))return number.slice(1+country_calling_code.length)}return""}(phoneDigits,newCountry,metadata):"";if(prevCountry){var newCountryPrefix=getInternationalPhoneNumberPrefix(newCountry,metadata);return 0===phoneDigits.indexOf(newCountryPrefix)?phoneDigits:newCountryPrefix}var defaultValue=getInternationalPhoneNumberPrefix(newCountry,metadata);return 0===phoneDigits.indexOf(defaultValue)?phoneDigits:defaultValue}}else if("+"!==phoneDigits[0])return e164(phoneDigits,prevCountry,metadata)||"";return phoneDigits}function e164(number,country,metadata){if(number){if("+"===number[0]){if("+"===number)return;var asYouType=new AsYouType(country,metadata);return asYouType.input(number),asYouType.getNumberValue()}if(country){var partial_national_significant_number=getNationalSignificantNumberDigits(number,country,metadata);return"+".concat(getCountryCallingCode(country,metadata)).concat(partial_national_significant_number||"")}}}function trimNumber(number,country,metadata){var nationalSignificantNumberPart=getNationalSignificantNumberDigits(number,country,metadata);if(nationalSignificantNumberPart){var overflowDigitsCount=nationalSignificantNumberPart.length-function getMaxNumberLength(country,metadata){return metadata=new Metadata(metadata),metadata.selectNumberingPlan(country),metadata.numberingPlan.possibleLengths()[metadata.numberingPlan.possibleLengths().length-1]}(country,metadata);if(overflowDigitsCount>0)return number.slice(0,number.length-overflowDigitsCount)}return number}function getCountryForPartialE164Number(partialE164Number,_ref4){var country=_ref4.country,countries=_ref4.countries,required=_ref4.required,metadata=_ref4.metadata;if("+"===partialE164Number)return country;var derived_country=function getCountryFromPossiblyIncompleteInternationalPhoneNumber(number,metadata){var formatter=new AsYouType(null,metadata);return formatter.input(number),formatter.getCountry()}(partialE164Number,metadata);return derived_country&&(!countries||countries.indexOf(derived_country)>=0)?derived_country:!country||required||couldNumberBelongToCountry(partialE164Number,country,metadata)?country:void 0}function convertInternationalPhoneDigitsToNational(input,country,metadata){if(0===input.indexOf(getInternationalPhoneNumberPrefix(country,metadata))){var formatter=new AsYouType(country,metadata);formatter.input(input);var phoneNumber=formatter.getNumber();return phoneNumber?phoneNumber.formatNational().replace(/\D/g,""):""}return input.replace(/\D/g,"")}function compareStrings(a,b,locales){return String.prototype.localeCompare?a.localeCompare(b,locales):a<b?-1:a>b?1:0}function getNationalSignificantNumberDigits(number,country,metadata){var formatter=new AsYouType(country,metadata);formatter.input(number);var phoneNumber=formatter.getNumber();return phoneNumber&&phoneNumber.nationalNumber}function couldNumberBelongToCountry(number,country,metadata){for(var intlPhoneNumberPrefix=getInternationalPhoneNumberPrefix(country,metadata),i=0;i<number.length&&i<intlPhoneNumberPrefix.length;){if(number[i]!==intlPhoneNumberPrefix[i])return!1;i++}return!0}function getInitialPhoneDigits(_ref6){var value=_ref6.value,phoneNumber=_ref6.phoneNumber,defaultCountry=_ref6.defaultCountry,international=_ref6.international,useNationalFormat=_ref6.useNationalFormat,metadata=_ref6.metadata;return(!1===international||useNationalFormat)&&phoneNumber&&phoneNumber.country?function generateNationalNumberDigits(phoneNumber){return phoneNumber.formatNational().replace(/\D/g,"")}(phoneNumber):!value&&international&&defaultCountry?getInternationalPhoneNumberPrefix(defaultCountry,metadata):value}function getPhoneInputWithCountryStateUpdateFromNewProps_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function getPhoneInputWithCountryStateUpdateFromNewProps_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?getPhoneInputWithCountryStateUpdateFromNewProps_ownKeys(Object(source),!0).forEach((function(key){getPhoneInputWithCountryStateUpdateFromNewProps_defineProperty(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):getPhoneInputWithCountryStateUpdateFromNewProps_ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}function getPhoneInputWithCountryStateUpdateFromNewProps_defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function valuesAreEqual(value1,value2){return null===value1&&(value1=void 0),null===value2&&(value2=void 0),value1===value2}function PhoneInputWithCountry_typeof(obj){return PhoneInputWithCountry_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},PhoneInputWithCountry_typeof(obj)}var PhoneInputWithCountry_excluded=["name","disabled","readOnly","autoComplete","style","className","inputRef","inputComponent","numberInputProps","smartCaret","countrySelectComponent","countrySelectProps","containerComponent","containerComponentProps","defaultCountry","countries","countryOptionsOrder","labels","flags","flagComponent","flagUrl","addInternationalOption","internationalIcon","displayInitialValueAsLocalNumber","initialValueFormat","onCountryChange","limitMaxLength","countryCallingCodeEditable","focusInputOnCountrySelection","reset","metadata","international","locales"];function PhoneInputWithCountry_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function PhoneInputWithCountry_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?PhoneInputWithCountry_ownKeys(Object(source),!0).forEach((function(key){PhoneInputWithCountry_defineProperty(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):PhoneInputWithCountry_ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}function PhoneInputWithCountry_extends(){return PhoneInputWithCountry_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},PhoneInputWithCountry_extends.apply(this,arguments)}function PhoneInputWithCountry_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function PhoneInputWithCountry_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],excluded.indexOf(key)>=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function PhoneInputWithCountry_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function PhoneInputWithCountry_setPrototypeOf(o,p){return PhoneInputWithCountry_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},PhoneInputWithCountry_setPrototypeOf(o,p)}function PhoneInputWithCountry_createSuper(Derived){var hasNativeReflectConstruct=function PhoneInputWithCountry_isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var result,Super=PhoneInputWithCountry_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=PhoneInputWithCountry_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function PhoneInputWithCountry_possibleConstructorReturn(self,call){if(call&&("object"===PhoneInputWithCountry_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return PhoneInputWithCountry_assertThisInitialized(self)}(this,result)}}function PhoneInputWithCountry_assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function PhoneInputWithCountry_getPrototypeOf(o){return PhoneInputWithCountry_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)},PhoneInputWithCountry_getPrototypeOf(o)}function PhoneInputWithCountry_defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var PhoneNumberInput_=function(_React$PureComponent){!function PhoneInputWithCountry_inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&PhoneInputWithCountry_setPrototypeOf(subClass,superClass)}(PhoneNumberInput_,_React$PureComponent);var _super=PhoneInputWithCountry_createSuper(PhoneNumberInput_);function PhoneNumberInput_(props){var _this;!function PhoneInputWithCountry_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,PhoneNumberInput_),PhoneInputWithCountry_defineProperty(PhoneInputWithCountry_assertThisInitialized(_this=_super.call(this,props)),"setInputRef",(function(instance){setRefsValue([_this.props.inputRef,_this.inputRef],instance)})),PhoneInputWithCountry_defineProperty(PhoneInputWithCountry_assertThisInitialized(_this),"isCountrySupportedWithError",(function(country){return isCountrySupportedWithError(country,_this.props.metadata)})),PhoneInputWithCountry_defineProperty(PhoneInputWithCountry_assertThisInitialized(_this),"onCountryChange",(function(newCountry){var _this$props=_this.props,international=_this$props.international,metadata=_this$props.metadata,onChange=_this$props.onChange,focusInputOnCountrySelection=_this$props.focusInputOnCountrySelection,_this$state=_this.state,newPhoneDigits=getPhoneDigitsForNewCountry(_this$state.phoneDigits,{prevCountry:_this$state.country,newCountry,metadata,useNationalFormat:!international}),newValue=e164(newPhoneDigits,newCountry,metadata);focusInputOnCountrySelection&&_this.inputRef.current.focus(),_this.setState({country:newCountry,hasUserSelectedACountry:!0,phoneDigits:newPhoneDigits,value:newValue},(function(){onChange(newValue)}))})),PhoneInputWithCountry_defineProperty(PhoneInputWithCountry_assertThisInitialized(_this),"onChange",(function(_phoneDigits){var _this$props2=_this.props,defaultCountry=_this$props2.defaultCountry,onChange=_this$props2.onChange,addInternationalOption=_this$props2.addInternationalOption,international=_this$props2.international,limitMaxLength=_this$props2.limitMaxLength,countryCallingCodeEditable=_this$props2.countryCallingCodeEditable,metadata=_this$props2.metadata,_this$state2=_this.state,countries=_this$state2.countries,_onPhoneDigitsChange=function onPhoneDigitsChange(phoneDigits,_ref5){var value,prevPhoneDigits=_ref5.prevPhoneDigits,country=_ref5.country,defaultCountry=_ref5.defaultCountry,countryRequired=_ref5.countryRequired,getAnyCountry=_ref5.getAnyCountry,countries=_ref5.countries,international=_ref5.international,limitMaxLength=_ref5.limitMaxLength,countryCallingCodeEditable=_ref5.countryCallingCodeEditable,metadata=_ref5.metadata;if(international&&!1===countryCallingCodeEditable&&country){var _value,prefix=getInternationalPhoneNumberPrefix(country,metadata);if(0!==phoneDigits.indexOf(prefix))return phoneDigits&&"+"!==phoneDigits[0]?_value=e164(phoneDigits=prefix+phoneDigits,country,metadata):phoneDigits=prefix,{phoneDigits,value:_value,country}}return!1===international&&country&&phoneDigits&&"+"===phoneDigits[0]&&(phoneDigits=convertInternationalPhoneDigitsToNational(phoneDigits,country,metadata)),phoneDigits&&country&&limitMaxLength&&(phoneDigits=trimNumber(phoneDigits,country,metadata)),!phoneDigits||"+"===phoneDigits[0]||country&&!international||(phoneDigits="+"+phoneDigits),!phoneDigits&&prevPhoneDigits&&"+"===prevPhoneDigits[0]&&(country=international?void 0:defaultCountry),"+"===phoneDigits&&prevPhoneDigits&&"+"===prevPhoneDigits[0]&&prevPhoneDigits.length>1&&(country=void 0),phoneDigits&&(value="+"===phoneDigits[0]&&("+"===phoneDigits||country&&0===getInternationalPhoneNumberPrefix(country,metadata).indexOf(phoneDigits))?void 0:e164(phoneDigits,country,metadata)),value&&(country=getCountryForPartialE164Number(value,{country,countries,metadata}),!1===international&&country&&phoneDigits&&"+"===phoneDigits[0]&&(value=e164(phoneDigits=convertInternationalPhoneDigitsToNational(phoneDigits,country,metadata),country,metadata))),!country&&countryRequired&&(country=defaultCountry||getAnyCountry()),{phoneDigits,country,value}}(_phoneDigits,{prevPhoneDigits:_this$state2.phoneDigits,country:_this$state2.country,countryRequired:!addInternationalOption,defaultCountry,getAnyCountry:function getAnyCountry(){return _this.getFirstSupportedCountry({countries})},countries,international,limitMaxLength,countryCallingCodeEditable,metadata}),phoneDigits=_onPhoneDigitsChange.phoneDigits,country=_onPhoneDigitsChange.country,value=_onPhoneDigitsChange.value,stateUpdate={phoneDigits,value,country};!1===countryCallingCodeEditable&&(value||phoneDigits!==_this.state.phoneDigits||(stateUpdate.forceRerender={})),_this.setState(stateUpdate,(function(){return onChange(value)}))})),PhoneInputWithCountry_defineProperty(PhoneInputWithCountry_assertThisInitialized(_this),"_onFocus",(function(){return _this.setState({isFocused:!0})})),PhoneInputWithCountry_defineProperty(PhoneInputWithCountry_assertThisInitialized(_this),"_onBlur",(function(){return _this.setState({isFocused:!1})})),PhoneInputWithCountry_defineProperty(PhoneInputWithCountry_assertThisInitialized(_this),"onFocus",(function(event){_this._onFocus();var onFocus=_this.props.onFocus;onFocus&&onFocus(event)})),PhoneInputWithCountry_defineProperty(PhoneInputWithCountry_assertThisInitialized(_this),"onBlur",(function(event){var onBlur=_this.props.onBlur;_this._onBlur(),onBlur&&onBlur(event)})),PhoneInputWithCountry_defineProperty(PhoneInputWithCountry_assertThisInitialized(_this),"onCountryFocus",(function(event){_this._onFocus();var countrySelectProps=_this.props.countrySelectProps;if(countrySelectProps){var onFocus=countrySelectProps.onFocus;onFocus&&onFocus(event)}})),PhoneInputWithCountry_defineProperty(PhoneInputWithCountry_assertThisInitialized(_this),"onCountryBlur",(function(event){_this._onBlur();var countrySelectProps=_this.props.countrySelectProps;if(countrySelectProps){var onBlur=countrySelectProps.onBlur;onBlur&&onBlur(event)}})),_this.inputRef=react.createRef();var _this$props3=_this.props,_value=_this$props3.value,_international=(_this$props3.labels,_this$props3.international),_addInternationalOption=_this$props3.addInternationalOption,displayInitialValueAsLocalNumber=_this$props3.displayInitialValueAsLocalNumber,initialValueFormat=_this$props3.initialValueFormat,_metadata=_this$props3.metadata,_this$props4=_this.props,_defaultCountry=_this$props4.defaultCountry,_countries=_this$props4.countries;_defaultCountry&&(_this.isCountrySupportedWithError(_defaultCountry)||(_defaultCountry=void 0)),_countries=getSupportedCountries(_countries,_metadata);var phoneNumber=phoneInputHelpers_parsePhoneNumber(_value,_metadata);_this.CountryIcon=createCountryIconComponent(_this.props);var preSelectedCountry=function getPreSelectedCountry(_ref){var country,value=_ref.value,phoneNumber=_ref.phoneNumber,defaultCountry=_ref.defaultCountry,getAnyCountry=_ref.getAnyCountry,countries=_ref.countries,required=_ref.required,metadata=_ref.metadata;return phoneNumber&&phoneNumber.country?country=phoneNumber.country:defaultCountry&&(value&&!couldNumberBelongToCountry(value,defaultCountry,metadata)||(country=defaultCountry)),countries&&countries.indexOf(country)<0&&(country=void 0),!country&&required&&countries&&countries.length>0&&(country=getAnyCountry()),country}({value:_value,phoneNumber,defaultCountry:_defaultCountry,required:!_addInternationalOption,countries:_countries||getCountries(_metadata),getAnyCountry:function getAnyCountry(){return _this.getFirstSupportedCountry({countries:_countries})},metadata:_metadata});return _this.state={props:_this.props,country:preSelectedCountry,countries:_countries,phoneDigits:getInitialPhoneDigits({value:_value,phoneNumber,defaultCountry:_defaultCountry,international:_international,useNationalFormat:displayInitialValueAsLocalNumber||"national"===initialValueFormat,metadata:_metadata}),value:_value},_this}return function PhoneInputWithCountry_createClass(Constructor,protoProps,staticProps){return protoProps&&PhoneInputWithCountry_defineProperties(Constructor.prototype,protoProps),staticProps&&PhoneInputWithCountry_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(PhoneNumberInput_,[{key:"componentDidMount",value:function componentDidMount(){var onCountryChange=this.props.onCountryChange,defaultCountry=this.props.defaultCountry,selectedCountry=this.state.country;onCountryChange&&(defaultCountry&&(this.isCountrySupportedWithError(defaultCountry)||(defaultCountry=void 0)),selectedCountry!==defaultCountry&&onCountryChange(selectedCountry))}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps,prevState){var onCountryChange=this.props.onCountryChange,country=this.state.country;onCountryChange&&country!==prevState.country&&onCountryChange(country)}},{key:"getCountrySelectOptions",value:function getCountrySelectOptions(_ref){var countries=_ref.countries,_this$props5=this.props,international=_this$props5.international,countryCallingCodeEditable=_this$props5.countryCallingCodeEditable,countryOptionsOrder=_this$props5.countryOptionsOrder,addInternationalOption=_this$props5.addInternationalOption,labels=_this$props5.labels,locales=_this$props5.locales,metadata=_this$props5.metadata;return this.useMemoCountrySelectOptions((function(){return function sortCountryOptions(options,order){if(!order)return options;for(var _step,optionsOnTop=[],optionsOnBottom=[],appendTo=optionsOnTop,_iterator=countries_createForOfIteratorHelperLoose(order);!(_step=_iterator()).done;){var element=_step.value;"|"===element?appendTo.push({divider:!0}):"..."===element||"…"===element?appendTo=optionsOnBottom:function(){var countryCode=void 0;countryCode="🌐"===element?void 0:element;var index=options.indexOf(options.filter((function(option){return option.value===countryCode}))[0]),option=options[index];options.splice(index,1),appendTo.push(option)}()}return optionsOnTop.concat(options).concat(optionsOnBottom)}(function phoneInputHelpers_getCountrySelectOptions(_ref2){var countries=_ref2.countries,countryNames=_ref2.countryNames,addInternationalOption=_ref2.addInternationalOption,compareStringsLocales=_ref2.compareStringsLocales,_compareStrings=_ref2.compareStrings;_compareStrings||(_compareStrings=compareStrings);var countrySelectOptions=countries.map((function(country){return{value:country,label:countryNames[country]||country}}));return countrySelectOptions.sort((function(a,b){return _compareStrings(a.label,b.label,compareStringsLocales)})),addInternationalOption&&countrySelectOptions.unshift({label:countryNames.ZZ}),countrySelectOptions}({countries:countries||getCountries(metadata),countryNames:labels,addInternationalOption:(!international||!1!==countryCallingCodeEditable)&&addInternationalOption,compareStringsLocales:locales}),function getSupportedCountryOptions(countryOptions,metadata){if(countryOptions&&(countryOptions=countryOptions.filter((function(option){switch(option){case"🌐":case"|":case"...":case"…":return!0;default:return isCountrySupportedWithError(option,metadata)}}))).length>0)return countryOptions}(countryOptionsOrder,metadata))}),[countries,countryOptionsOrder,addInternationalOption,labels,metadata])}},{key:"useMemoCountrySelectOptions",value:function useMemoCountrySelectOptions(generator,dependencies){return this.countrySelectOptionsMemoDependencies&&function areEqualArrays(a,b){if(a.length!==b.length)return!1;var i=0;for(;i<a.length;){if(a[i]!==b[i])return!1;i++}return!0}(dependencies,this.countrySelectOptionsMemoDependencies)||(this.countrySelectOptionsMemo=generator(),this.countrySelectOptionsMemoDependencies=dependencies),this.countrySelectOptionsMemo}},{key:"getFirstSupportedCountry",value:function getFirstSupportedCountry(_ref2){var countries=_ref2.countries;return this.getCountrySelectOptions({countries})[0].value}},{key:"render",value:function render(){var _this$props6=this.props,name=_this$props6.name,disabled=_this$props6.disabled,readOnly=_this$props6.readOnly,autoComplete=_this$props6.autoComplete,style=_this$props6.style,className=_this$props6.className,inputComponent=(_this$props6.inputRef,_this$props6.inputComponent),numberInputProps=_this$props6.numberInputProps,smartCaret=_this$props6.smartCaret,CountrySelectComponent=_this$props6.countrySelectComponent,countrySelectProps=_this$props6.countrySelectProps,ContainerComponent=_this$props6.containerComponent,containerComponentProps=_this$props6.containerComponentProps,labels=(_this$props6.defaultCountry,_this$props6.countries,_this$props6.countryOptionsOrder,_this$props6.labels),metadata=(_this$props6.flags,_this$props6.flagComponent,_this$props6.flagUrl,_this$props6.addInternationalOption,_this$props6.internationalIcon,_this$props6.displayInitialValueAsLocalNumber,_this$props6.initialValueFormat,_this$props6.onCountryChange,_this$props6.limitMaxLength,_this$props6.countryCallingCodeEditable,_this$props6.focusInputOnCountrySelection,_this$props6.reset,_this$props6.metadata),international=_this$props6.international,rest=(_this$props6.locales,PhoneInputWithCountry_objectWithoutProperties(_this$props6,PhoneInputWithCountry_excluded)),_this$state3=this.state,country=_this$state3.country,countries=_this$state3.countries,phoneDigits=_this$state3.phoneDigits,isFocused=_this$state3.isFocused,InputComponent=smartCaret?InputSmart:InputBasic,countrySelectOptions=this.getCountrySelectOptions({countries});return react.createElement(ContainerComponent,PhoneInputWithCountry_extends({style,className:classnames_default()(className,"PhoneInput",{"PhoneInput--focus":isFocused,"PhoneInput--disabled":disabled,"PhoneInput--readOnly":readOnly})},containerComponentProps),react.createElement(CountrySelectComponent,PhoneInputWithCountry_extends({name:name?"".concat(name,"Country"):void 0,"aria-label":labels.country},countrySelectProps,{value:country,options:countrySelectOptions,onChange:this.onCountryChange,onFocus:this.onCountryFocus,onBlur:this.onCountryBlur,disabled:disabled||countrySelectProps&&countrySelectProps.disabled,readOnly:readOnly||countrySelectProps&&countrySelectProps.readOnly,iconComponent:this.CountryIcon})),react.createElement(InputComponent,PhoneInputWithCountry_extends({ref:this.setInputRef,type:"tel",autoComplete},numberInputProps,rest,{international:!!international||void 0,withCountryCallingCode:!!international||void 0,name,metadata,country,value:phoneDigits||"",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,disabled,readOnly,inputComponent,className:classnames_default()("PhoneInputInput",numberInputProps&&numberInputProps.className,rest.className)})))}}],[{key:"getDerivedStateFromProps",value:function getDerivedStateFromProps(props,state){return PhoneInputWithCountry_objectSpread({props},function getPhoneInputWithCountryStateUpdateFromNewProps(props,prevProps,state){var metadata=props.metadata,countries=props.countries,newDefaultCountry=props.defaultCountry,newValue=props.value,newReset=props.reset,international=props.international,displayInitialValueAsLocalNumber=props.displayInitialValueAsLocalNumber,initialValueFormat=props.initialValueFormat,prevDefaultCountry=prevProps.defaultCountry,prevValue=prevProps.value,prevReset=prevProps.reset,value=(state.country,state.value),hasUserSelectedACountry=state.hasUserSelectedACountry,_getInitialPhoneDigits=function _getInitialPhoneDigits(parameters){return getInitialPhoneDigits(getPhoneInputWithCountryStateUpdateFromNewProps_objectSpread(getPhoneInputWithCountryStateUpdateFromNewProps_objectSpread({},parameters),{},{international,useNationalFormat:displayInitialValueAsLocalNumber||"national"===initialValueFormat,metadata}))};if(newReset!==prevReset)return{phoneDigits:_getInitialPhoneDigits({value:void 0,defaultCountry:newDefaultCountry}),value:void 0,country:newDefaultCountry,hasUserSelectedACountry:void 0};if(newDefaultCountry!==prevDefaultCountry){var isNewDefaultCountrySupported=!newDefaultCountry||isCountrySupportedWithError(newDefaultCountry,metadata),noValueHasBeenEnteredByTheUser=!value||international&&value===_getInitialPhoneDigits({value:void 0,defaultCountry:prevDefaultCountry});if(!hasUserSelectedACountry&&isNewDefaultCountrySupported&&!newValue&&noValueHasBeenEnteredByTheUser)return{country:newDefaultCountry,phoneDigits:_getInitialPhoneDigits({value:void 0,defaultCountry:newDefaultCountry}),value:void 0}}if(!valuesAreEqual(newValue,prevValue)&&!valuesAreEqual(newValue,value)){var phoneNumber,parsedCountry,hasUserSelectedACountryUpdate;if(newValue){phoneNumber=phoneInputHelpers_parsePhoneNumber(newValue,metadata);var supportedCountries=getSupportedCountries(countries,metadata);phoneNumber&&phoneNumber.country?(!supportedCountries||supportedCountries.indexOf(phoneNumber.country)>=0)&&(parsedCountry=phoneNumber.country):(parsedCountry=getCountryForPartialE164Number(newValue,{country:void 0,countries:supportedCountries,metadata}))||newDefaultCountry&&0===newValue.indexOf(getInternationalPhoneNumberPrefix(newDefaultCountry,metadata))&&(parsedCountry=newDefaultCountry)}return newValue||(hasUserSelectedACountryUpdate={hasUserSelectedACountry:void 0}),getPhoneInputWithCountryStateUpdateFromNewProps_objectSpread(getPhoneInputWithCountryStateUpdateFromNewProps_objectSpread({},hasUserSelectedACountryUpdate),{},{phoneDigits:_getInitialPhoneDigits({phoneNumber,value:newValue,defaultCountry:newDefaultCountry}),value:newValue,country:newValue?parsedCountry:newDefaultCountry})}}(props,state.props,state))}}]),PhoneNumberInput_}(react.PureComponent),PhoneNumberInput=react.forwardRef((function(props,ref){return react.createElement(PhoneNumberInput_,PhoneInputWithCountry_extends({},function withDefaultProps(props){for(var key in props=PhoneInputWithCountry_objectSpread({},props),defaultProps)void 0===props[key]&&(props[key]=defaultProps[key]);return props}(props),{inputRef:ref}))}));PhoneNumberInput.propTypes={value:prop_types_default().string,onChange:prop_types_default().func.isRequired,onFocus:prop_types_default().func,onBlur:prop_types_default().func,disabled:prop_types_default().bool,readOnly:prop_types_default().bool,autoComplete:prop_types_default().string,initialValueFormat:prop_types_default().oneOf(["national"]),displayInitialValueAsLocalNumber:prop_types_default().bool,defaultCountry:prop_types_default().string,countries:prop_types_default().arrayOf(prop_types_default().string),labels,locales:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().arrayOf(prop_types_default().string)]),flagUrl:prop_types_default().string,flags:prop_types_default().objectOf(prop_types_default().elementType),flagComponent:prop_types_default().elementType,addInternationalOption:prop_types_default().bool,internationalIcon:prop_types_default().elementType,countryOptionsOrder:prop_types_default().arrayOf(prop_types_default().string),style:prop_types_default().object,className:prop_types_default().string,countrySelectComponent:prop_types_default().elementType,countrySelectProps:prop_types_default().object,inputComponent:prop_types_default().elementType,numberInputProps:prop_types_default().object,containerComponent:prop_types_default().elementType,containerComponentProps:prop_types_default().object,smartCaret:prop_types_default().bool,international:prop_types_default().bool,limitMaxLength:prop_types_default().bool,countryCallingCodeEditable:prop_types_default().bool,metadata:PropTypes_metadata,onCountryChange:prop_types_default().func,focusInputOnCountrySelection:prop_types_default().bool};var defaultProps={autoComplete:"tel",countrySelectComponent:CountrySelectWithIcon,flagComponent:FlagComponent,flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",internationalIcon:InternationalIcon_InternationalIcon,inputComponent:"input",containerComponent:"div",reset:prop_types_default().any,smartCaret:!0,addInternationalOption:!0,countryCallingCodeEditable:!0,focusInputOnCountrySelection:!0};const PhoneInputWithCountry=PhoneNumberInput;var PhoneInputWithCountryDefault_excluded=["metadata","labels"];function PhoneInputWithCountryDefault_extends(){return PhoneInputWithCountryDefault_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},PhoneInputWithCountryDefault_extends.apply(this,arguments)}function PhoneInputWithCountryDefault_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function PhoneInputWithCountryDefault_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],excluded.indexOf(key)>=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function createPhoneInput(defaultMetadata){var PhoneInputDefault=react.forwardRef((function(_ref,ref){var _ref$metadata=_ref.metadata,metadata=void 0===_ref$metadata?defaultMetadata:_ref$metadata,_ref$labels=_ref.labels,labels=void 0===_ref$labels?en_json:_ref$labels,rest=PhoneInputWithCountryDefault_objectWithoutProperties(_ref,PhoneInputWithCountryDefault_excluded);return react.createElement(PhoneInputWithCountry,PhoneInputWithCountryDefault_extends({},rest,{ref,metadata,labels}))}));return PhoneInputDefault.propTypes={metadata:PropTypes_metadata,labels},PhoneInputDefault}createPhoneInput();const min=createPhoneInput({version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|31)"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:1[3-79]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:22|44|7[27]|87|9[69])[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-689]|8[1-69]|9[1-578])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[047]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-6]|7(?:0[0-689]|[1-79])|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[27]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}})}}]);