nuxt-ignis 0.5.0-rc.1 → 0.5.0-rc.2

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 (161) hide show
  1. package/.data/content/contents.sqlite +0 -0
  2. package/.env +1 -1
  3. package/.nuxt/components.d.ts +218 -230
  4. package/.nuxt/content/components.ts +108 -107
  5. package/.nuxt/dev/index.mjs +148 -111
  6. package/.nuxt/dev/index.mjs.map +1 -1
  7. package/.nuxt/dist/server/client.manifest.json +2 -2
  8. package/.nuxt/dist/server/client.manifest.mjs +2 -2
  9. package/.nuxt/eslint-typegen.d.ts +60 -6
  10. package/.nuxt/eslint.config.d.mts +3 -3
  11. package/.nuxt/eslint.config.mjs +11 -11
  12. package/.nuxt/imports.d.ts +56 -56
  13. package/.nuxt/manifest/latest.json +1 -1
  14. package/.nuxt/manifest/meta/dev.json +1 -1
  15. package/.nuxt/mdc-image-component.mjs +1 -1
  16. package/.nuxt/module/nuxt-robots.d.ts +12 -12
  17. package/.nuxt/module/nuxt-seo-utils.d.ts +10 -10
  18. package/.nuxt/module/nuxt-site-config.d.ts +11 -8
  19. package/.nuxt/module/nuxt-sitemap.d.ts +17 -17
  20. package/.nuxt/nitro.json +5 -5
  21. package/.nuxt/nuxt.d.ts +11 -8
  22. package/.nuxt/nuxt.json +2 -2
  23. package/.nuxt/nuxt.node.d.ts +9 -7
  24. package/.nuxt/tsconfig.app.json +186 -162
  25. package/.nuxt/tsconfig.json +188 -161
  26. package/.nuxt/tsconfig.node.json +101 -84
  27. package/.nuxt/tsconfig.server.json +124 -120
  28. package/.nuxt/tsconfig.shared.json +60 -55
  29. package/.nuxt/types/build.d.ts +1 -1
  30. package/.nuxt/types/components.d.ts +288 -300
  31. package/.nuxt/types/i18n-plugin.d.ts +2 -2
  32. package/.nuxt/types/imports.d.ts +677 -673
  33. package/.nuxt/types/modules.d.ts +34 -14
  34. package/.nuxt/types/nitro-imports.d.ts +249 -249
  35. package/.nuxt/types/nitro-nuxt.d.ts +3 -1
  36. package/.nuxt/types/nitro-routes.d.ts +15 -15
  37. package/.nuxt/types/plugins.d.ts +36 -36
  38. package/.nuxt/ui-image-component.ts +1 -1
  39. package/.output/nitro.json +2 -2
  40. package/.output/public/_fonts/31PZhXd_YTCmsoiPQZc-xVtAWAkLogRFRj5mWplmKFE-6WsTw05QKugcwLySGc_b9CIheG8j8LRyo47qPL430Mk.woff2 +0 -0
  41. package/.output/public/_fonts/9FWLUGCSCYLRIRMtCzLrt4Go7DMFXOeN_pyCOJD_44Y-Yh2wNaqrq_e759vVlc3tX81lMwRu9ktkQJX_Svgs-VI.woff2 +0 -0
  42. package/.output/public/_fonts/BQnDL9FFy0Q_jvURlmv87luvmXLSMbSuXsfZv_R2Rkk-y5MVrLtP4J_1al8rz8R-MDaUOMAHckAWCwDrKhw25fY.woff2 +0 -0
  43. package/.output/public/_fonts/JSrPAbQHsQEdUrIE5Ts6fIQ2ymsa4i7HhiCpui6ulCc-_AoyGWssOn06OMh3ZY_GddBBPRny4Igxin4fT_1K6F4.woff2 +0 -0
  44. package/.output/public/_fonts/Jtqhy44WKYEjGWTSusP5YJfJv7Wf74QqgkBOI9u_77s-Rl_Bht5SvmaotE20bkavBEAJEEGEa0hcz3d_8yOeXmw.woff +0 -0
  45. package/.output/public/_fonts/M-60tFLmAJxdPjHsK-2ILWom5zPbu37lb3Qex2waL14-A9y4QcXALPi_RvQsmRsSFUxrT3_J213W4zPFIXetlbw.woff2 +0 -0
  46. package/.output/public/_fonts/T-ozk-QJ_Ck37B2RHPl2i-s_gAGGo7suFgagWoJ8bO4-maDXQ_nEXKAaLHm4Joud3DJR9EVzS7QXWMWK8YOTIcs.woff2 +0 -0
  47. package/.output/public/_fonts/TTYbISAfwy-y4uVGS9AH32sK7b2xJsoCESo64ryf8LU-y87nRMqBGo42rUOW9tWZa06o4oTa0USJrAMMoKDamgs.woff2 +0 -0
  48. package/.output/public/_fonts/Y_5DOsLit49q2i2tbcNxnyUen9__GPCX8mwAi03q1aA-pBCjVKDT5tBT3BJckh9uzNkfUWeUIBPz9Y8T55vcj8E.woff2 +0 -0
  49. package/.output/public/_fonts/ZHaz3DhCHNWhsElqYfuM71rfBBDgjuU2sd34vaYJwQg-71NZaZSGjxzAGjCMnCc2zS5rS_EGA0xHKPGCggWuXik.woff +0 -0
  50. package/.output/public/_fonts/h9PwCjip_BNPVO50hT4v29USWFv6H3ZlYx_IestfqgY-sYfLVuZXl9E1aYbn1S0pAr4zfdQ_WT7iBZhrgQY6N-4.woff2 +0 -0
  51. package/.output/public/_fonts/l00UCz_-QvI_NO8AGcu7ooAcrFDlxYUdxCSCh6gBwd4-vPjTZ3ztgw27A2TnHeCycxPvUtXWEVpG33_97ra6su8.woff2 +0 -0
  52. package/.output/public/_fonts/nuenOq7ZFSZ65QudJO7uQ0sOjDqow2WjfXrQh4S9gEc-uF81rxcswER5srfhzyLfPoGlKNAIt2C_BvkXFOc19rw.woff2 +0 -0
  53. package/.output/public/_fonts/pWMvGwciZ-EfQsfR2ueelhC7Jnt5K-8Px8PjPK0mDII-eT9iD0iZ9WWhTJs6V5GxXr0iaUwx_WxgGGriOiGb81o.woff2 +0 -0
  54. package/.output/public/_fonts/y3mP_zJcojQwJn30TpF_XxDzgeM6Nbk7MaRg1Ne0YcI-lFx13nqMCMgk_S70gRmwEHXlE5BLp1B4W82RpFihpMs.woff2 +0 -0
  55. package/.output/public/_fonts/zr3WxpLd5PmlBr7e4PWGkhZv6XTg70Pi4sCbC-CEV0Q-v2yL98XOiD3FkbiYlYYeAeTSVSkgAckeOp55Q5kHJmU.woff2 +0 -0
  56. package/.output/public/_ignis-config.json +1789 -1
  57. package/.output/public/_nuxt/Bhpb4lc3.js +1 -0
  58. package/.output/public/_nuxt/{DXbccJ2T.js → BqsN2CZp.js} +1 -1
  59. package/.output/public/_nuxt/C9ePPGPX.js +94 -0
  60. package/.output/public/_nuxt/CQozUI2A.js +1 -0
  61. package/.output/public/_nuxt/DBJqMhGy.js +35 -0
  62. package/.output/public/_nuxt/{BiUZ9mZX.js → DvwlldUy.js} +1 -1
  63. package/.output/public/_nuxt/RbPLLy5S.js +1 -0
  64. package/.output/public/_nuxt/{DXBpKbsa.js → aetvq4w9.js} +40 -32
  65. package/.output/public/_nuxt/builds/latest.json +1 -1
  66. package/.output/public/_nuxt/builds/meta/cbc9377a-971e-4db1-b4b1-01807b82ee58.json +1 -0
  67. package/.output/public/_nuxt/entry.whtwWr_z.css +1 -0
  68. package/.output/public/_nuxt/error-404.Cq535Uij.css +1 -0
  69. package/.output/public/_nuxt/error-500.BHm_N15n.css +1 -0
  70. package/.output/public/_nuxt/{dJ-vStNn.js → jpnxxCHq.js} +1 -1
  71. package/.output/public/nuxt-spec.png +0 -0
  72. package/.output/server/chunks/_/error-500.mjs.map +1 -1
  73. package/.output/server/chunks/_/nitro.mjs +273 -154
  74. package/.output/server/chunks/_/nitro.mjs.map +1 -1
  75. package/.output/server/chunks/build/client.manifest.mjs +64 -64
  76. package/.output/server/chunks/routes/renderer.mjs +3 -3
  77. package/.output/server/chunks/routes/renderer.mjs.map +1 -1
  78. package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +131 -96
  79. package/.output/server/node_modules/@vue/compiler-core/package.json +4 -4
  80. package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +4 -1
  81. package/.output/server/node_modules/@vue/compiler-dom/package.json +3 -3
  82. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +10 -1
  83. package/.output/server/node_modules/@vue/compiler-ssr/package.json +3 -3
  84. package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +4 -3
  85. package/.output/server/node_modules/@vue/reactivity/package.json +2 -2
  86. package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +25 -27
  87. package/.output/server/node_modules/@vue/runtime-core/package.json +3 -3
  88. package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +40 -14
  89. package/.output/server/node_modules/@vue/runtime-dom/package.json +4 -4
  90. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +1 -1
  91. package/.output/server/node_modules/@vue/server-renderer/package.json +4 -4
  92. package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +1 -1
  93. package/.output/server/node_modules/@vue/shared/package.json +1 -1
  94. package/.output/server/node_modules/debug/package.json +1 -1
  95. package/.output/server/node_modules/vue/dist/vue.cjs.js +1 -1
  96. package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +1 -1
  97. package/.output/server/node_modules/vue/package.json +6 -6
  98. package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +158 -53
  99. package/.output/server/node_modules/vue-bundle-renderer/package.json +16 -11
  100. package/.output/server/node_modules/vue-router/dist/devtools-BLCumUwL.mjs +1218 -0
  101. package/.output/server/node_modules/vue-router/dist/vue-router.mjs +1459 -3688
  102. package/.output/server/node_modules/vue-router/package.json +43 -38
  103. package/.output/server/node_modules/vue-router/vue-router.node.mjs +2 -0
  104. package/.output/server/package.json +13 -13
  105. package/README.md +4 -0
  106. package/app/app.vue +2 -2
  107. package/app/assets/css/ignis-open-props.css +4 -5
  108. package/app/components/CurrentTime.vue +8 -1
  109. package/app/components/ignis/{IgnisInfo.vue → IgnisContent.vue} +3 -3
  110. package/app/components/ignis/{IgnisConfig.vue → IgnisContentConfig.vue} +5 -1
  111. package/app/components/ignis/IgnisContentFeatures.vue +102 -0
  112. package/app/components/ignis/{IgnisWelcome.vue → IgnisContentWelcome.vue} +2 -2
  113. package/app/components/ignis/IgnisFooter.vue +11 -3
  114. package/app/pages/_ignis-config.vue +1 -1
  115. package/app/pages/_ignis-info.vue +1 -1
  116. package/app/pages/_ignis-welcome.vue +1 -1
  117. package/app/pages/index.vue +2 -2
  118. package/bin/cli.js +59 -0
  119. package/bin/set-app-vue.js +18 -0
  120. package/bin/set-css.js +3 -8
  121. package/bin/set-eslint.js +3 -8
  122. package/bin/setup.js +208 -45
  123. package/features.ts +17 -8
  124. package/nuxt.config.ts +9 -4
  125. package/package.json +15 -17
  126. package/public/_ignis-config.json +1789 -1
  127. package/test/config/css-multiple.txt +30 -24
  128. package/test/config/css-nuxt-ui.txt +34 -28
  129. package/test/config/css-open-props.txt +1812 -1805
  130. package/test/config/css-single.txt +28 -22
  131. package/test/config/css-tailwind.txt +55 -48
  132. package/test/config/custom-lang.txt +27 -21
  133. package/test/config/db-neon.txt +28 -22
  134. package/test/config/db-supabase.txt +31 -25
  135. package/test/config/default.txt +27 -21
  136. package/test/config/equipment-1-composable.txt +33 -27
  137. package/test/config/equipment-2-plugins.txt +34 -28
  138. package/test/config/equipment-all.txt +38 -32
  139. package/test/config/forms-formkit.txt +32 -26
  140. package/test/config/forms-vueform.txt +28 -22
  141. package/test/config/i18n.txt +36 -30
  142. package/test/config/no-default-css.txt +24 -18
  143. package/test/config/open-props.txt +1811 -1804
  144. package/test/config/seo-ssr-false.txt +35 -29
  145. package/test/config/ui-nuxt-ui.txt +33 -27
  146. package/test/config/ui-tailwind.txt +54 -47
  147. package/test/features.test.ts +33 -33
  148. package/.nuxt/i18n.options.mjs +0 -165
  149. package/.nuxt/nuxt-i18n-logger.mjs +0 -1
  150. package/.output/public/_nuxt/BA2WKEAc.js +0 -1
  151. package/.output/public/_nuxt/BE_a_Zhd.js +0 -1
  152. package/.output/public/_nuxt/Bnm5Nral.js +0 -1
  153. package/.output/public/_nuxt/BrY1radz.js +0 -35
  154. package/.output/public/_nuxt/CmzFGS1a.js +0 -90
  155. package/.output/public/_nuxt/builds/meta/9a624d26-216d-4e69-b3a7-54b68357876f.json +0 -1
  156. package/.output/public/_nuxt/entry.jMyW6Sg0.css +0 -1
  157. package/.output/public/_nuxt/error-404.BGUbR0Uk.css +0 -1
  158. package/.output/public/_nuxt/error-500.CQfkKpQ2.css +0 -1
  159. package/.output/server/node_modules/vue-router/dist/vue-router.node.mjs +0 -2
  160. package/app/components/ignis/IgnisFeatureList.vue +0 -111
  161. /package/app/components/ignis/{IgnisFeature.vue → IgnisContentFeaturesDetail.vue} +0 -0
@@ -1,5 +1,5 @@
1
- import{t as Ze,c as Le,r as rt,o as Vr,a as Xd,w as je,b as se,d as h,e as d,f as T,g as A,h as m,i as xe,j as F,k as N,l as he,n as p,F as X,m as ie,p as w,q as Se,s as q,u as ye,v as Fe,x as ze,y as yo,z as Gt,T as ko,A as Oe,B as _r,C as Zd,D as $n,E as mr,G as eu,H as rr,I as Co,J as Qr,K as Al,L as tu,M as nu,N as ru,O as iu,P as au}from"#entry";import{defineConfig as lu}from"./BrY1radz.js";const ou={vueform:{elements:{list:{add:"+ Add",remove:"&times;"},file:{defaultName:"File",dndTitle:"Upload file",dndDescription:"Drop file or click here to upload",removeConfirm:"By removing the file it will be permanently deleted. Are you sure to continue?",select:"Select file",upload:"Upload"},multifile:{uploadButton:"Upload files",dndTitle:"Upload files",dndDescription:"Drop files or click here to upload"},gallery:{uploadButton:"Upload images",dndTitle:"Upload images",dndDescription:"Drop images or click here to upload"},phone:{ariaLabel:"Select a country"},signature:{type:"Type",draw:"Draw",upload:"Upload",font:"Select typeface",fontPlaceholder:"Your Name",placeholder:"Sign here",unsupportedFormat:"Unsupported file format. Accepted extenions are: :extensions",maxSizeError:"Max file size is :max KBs",imgAlt:"Signature",imgTitle:"Signature",undo:"Undo",redo:"Redo",dnd:"Drop an image here or",uploadButton:"Select image",modeSelectorAriaLabel:"Select signature mode",fontSelectorAriaLabel:"Select typeface",wrapperAriaLabel:"Signature input",inputAriaLabel:"Type your signature here",padAriaLabel:"Draw your signature in the box. Seek assistance if you need to.",clearAriaLabel:"Clear signature",colorAriaLabel:"Select color: "}},steps:{finish:"Finish",next:"Next",previous:"Previous"},editor:{acceptedMimesError:"Accepted mimes are: :mimes",acceptedExtensionsError:"Accepted extenions are: :extensions"},datepicker:{weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute"},dateFormats:{datetimeSeconds24:"YYYY-MM-DD HH:mm:ss",datetimeSeconds12:"YYYY-MM-DD hh:mm:ss a",datetime24:"YYYY-MM-DD HH:mm",datetime12:"YYYY-MM-DD hh:mm a",timeSeconds24:"HH:mm:ss",timeSeconds12:"hh:mm:ss a",time24:"HH:mm",time12:"hh:mm a",date:"YYYY-MM-DD"},multiselect:{multipleLabelOne:"1 option selected",multipleLabelMore:":options options selected",noResults:"No options found",noOptions:"The list is empty"},defaultMessage:"Invalid field",a11y:{file:{description:"Press Backspace to remove"},list:{remove:"Remove item button"}},countries:{AF:"Afghanistan",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AG:"Antigua & Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AC:"Ascension Island",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BA:"Bosnia & Herzegovina",BW:"Botswana",BR:"Brazil",IO:"British Indian Ocean Territory",VG:"British Virgin Islands",BN:"Brunei",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",BQ:"Caribbean Netherlands",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CO:"Colombia",KM:"Comoros",CG:"Congo - Brazzaville",CD:"Congo - Kinshasa",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d’Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czechia",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",SZ:"Eswatini",ET:"Ethiopia",FK:"Falkland Islands (Islas Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran",IQ:"Iraq",IE:"Ireland",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",XK:"Kosovo",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Laos",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",MX:"Mexico",FM:"Micronesia",MD:"Moldova",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar (Burma)",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",KP:"North Korea",MK:"North Macedonia",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",WS:"Samoa",SM:"San Marino",ST:"São Tomé & Príncipe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",KR:"South Korea",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",BL:"St. Barthélemy",SH:"St. Helena",KN:"St. Kitts & Nevis",LC:"St. Lucia",MF:"St. Martin",PM:"St. Pierre & Miquelon",VC:"St. Vincent & Grenadines",SD:"Sudan",SR:"Suriname",SE:"Sweden",CH:"Switzerland",SY:"Syria",TW:"Taiwan",TJ:"Tajikistan",TZ:"Tanzania",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad & Tobago",TN:"Tunisia",TR:"Türkiye",TM:"Turkmenistan",TC:"Turks & Caicos Islands",TV:"Tuvalu",VI:"U.S. Virgin Islands",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VA:"Vatican City",VE:"Venezuela",VN:"Vietnam",WF:"Wallis & Futuna",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"}},validation:{accepted:"The :attribute must be accepted.",active_url:"The :attribute is not a valid URL.",after:"The :attribute must be a date after :date.",after_or_equal:"The :attribute must be a date after or equal to :date.",alpha:"The :attribute may only contain letters.",alpha_dash:"The :attribute may only contain letters, numbers, dashes and underscores.",alpha_num:"The :attribute may only contain letters and numbers.",array:"The :attribute must be an array.",before:"The :attribute must be a date before :date.",before_or_equal:"The :attribute must be a date before or equal to :date.",between:{numeric:"The :attribute must be between :min and :max.",file:"The :attribute must be between :min and :max kilobytes.",string:"The :attribute must be between :min and :max characters.",array:"The :attribute must have between :min and :max items."},boolean:"The :attribute field must be true or false.",captcha:"Please verify that you are not a robot.",completed:"Please fill in a valid phone number.",confirmed:"The :attribute confirmation does not match.",date:"The :attribute is not a valid date.",date_format:"The :attribute does not match the format :format.",date_equals:"The :attribute must be equal to :date.",different:"The :attribute and :other must be different.",digits:"The :attribute must be :digits digits.",digits_between:"The :attribute must be between :min and :max digits.",dimensions:"The :attribute has invalid image dimensions.",distinct:"The :attribute field has a duplicate value.",email:"The :attribute must be a valid email address.",exists:"The selected :attribute is invalid.",file:"The :attribute must be a file.",filled:"The :attribute field must have a value.",gt:{numeric:"The :attribute must be greater than :value.",file:"The :attribute must be greater than :value kilobytes.",string:"The :attribute must be greater than :value characters.",array:"The :attribute must have more than :value items."},gte:{numeric:"The :attribute must be greater than or equal :value.",file:"The :attribute must be greater than or equal :value kilobytes.",string:"The :attribute must be greater than or equal :value characters.",array:"The :attribute must have :value items or more."},image:"The :attribute must be an image.",in:"The selected :attribute is invalid.",in_array:"The :attribute field does not exist in :other.",integer:"The :attribute must be an integer.",ip:"The :attribute must be a valid IP address.",ipv4:"The :attribute must be a valid IPv4 address.",ipv6:"The :attribute must be a valid IPv6 address.",json:"The :attribute must be a valid JSON string.",lt:{numeric:"The :attribute must be less than :value.",file:"The :attribute must be less than :value kilobytes.",string:"The :attribute must be less than :value characters.",array:"The :attribute must have less than :value items."},lte:{numeric:"The :attribute must be less than or equal :value.",file:"The :attribute must be less than or equal :value kilobytes.",string:"The :attribute must be less than or equal :value characters.",array:"The :attribute must not have more than :value items."},max:{numeric:"The :attribute may not be greater than :max.",file:"The :attribute may not be greater than :max kilobytes.",string:"The :attribute may not be greater than :max characters.",array:"The :attribute may not have more than :max items."},mimes:"The :attribute must be a file of type: :values.",mimetypes:"The :attribute must be a file of type: :values.",min:{numeric:"The :attribute must be at least :min.",file:"The :attribute must be at least :min kilobytes.",string:"The :attribute must be at least :min characters.",array:"The :attribute must have at least :min items."},not_in:"The selected :attribute is invalid.",not_regex:"The :attribute format is invalid.",numeric:"The :attribute must be a number.",present:"The :attribute field must be present.",regex:"The :attribute format is invalid.",required:"The :attribute field is required.",required_if:"The :attribute field is required when :other is :value.",required_unless:"The :attribute field is required unless :other is in :values.",required_with:"The :attribute field is required when :values is present.",required_with_all:"The :attribute field is required when :values are present.",required_without:"The :attribute field is required when :values is not present.",required_without_all:"The :attribute field is required when none of :values are present.",same:"The :attribute and :other must match.",size:{numeric:"The :attribute must be :size.",file:"The :attribute must be :size kilobytes.",string:"The :attribute must be :size characters.",array:"The :attribute must contain :size items."},string:"The :attribute must be a string.",timezone:"The :attribute must be a valid zone.",unique:"The :attribute has already been taken.",uploaded:"The :attribute failed to upload.",url:"The :attribute format is invalid.",uuid:"The :attribute must be a valid UUID.",remote:"The :attribute field is invalid."}};/*!
2
- * Vueform v1.13.2 (https://github.com/vueform/vueform)
1
+ import{t as Ze,c as Le,r as rt,o as Vr,a as Xd,w as je,b as se,d as h,e as d,f as T,g as A,h as m,i as xe,j as F,k as N,l as he,n as p,F as X,m as ie,p as w,q as Se,s as q,u as ye,v as Fe,x as ze,y as yo,z as Gt,T as ko,A as Oe,B as _r,C as Zd,D as $n,E as mr,G as eu,H as rr,I as Co,J as Qr,K as Al,L as tu,M as nu,N as ru,O as iu,P as au}from"#entry";import{defineConfig as lu}from"./DBJqMhGy.js";const ou={vueform:{elements:{list:{add:"+ Add",remove:"&times;"},file:{defaultName:"File",dndTitle:"Upload file",dndDescription:"Drop file or click here to upload",removeConfirm:"By removing the file it will be permanently deleted. Are you sure to continue?",select:"Select file",upload:"Upload"},multifile:{uploadButton:"Upload files",dndTitle:"Upload files",dndDescription:"Drop files or click here to upload"},gallery:{uploadButton:"Upload images",dndTitle:"Upload images",dndDescription:"Drop images or click here to upload"},phone:{ariaLabel:"Select a country"},signature:{type:"Type",draw:"Draw",upload:"Upload",font:"Select typeface",fontPlaceholder:"Your Name",placeholder:"Sign here",unsupportedFormat:"Unsupported file format. Accepted extenions are: :extensions",maxSizeError:"Max file size is :max KBs",imgAlt:"Signature",imgTitle:"Signature",undo:"Undo",redo:"Redo",dnd:"Drop an image here or",uploadButton:"Select image",modeSelectorAriaLabel:"Select signature mode",fontSelectorAriaLabel:"Select typeface",wrapperAriaLabel:"Signature input",inputAriaLabel:"Type your signature here",padAriaLabel:"Draw your signature in the box. Seek assistance if you need to.",clearAriaLabel:"Clear signature",colorAriaLabel:"Select color: "}},steps:{finish:"Finish",next:"Next",previous:"Previous"},editor:{acceptedMimesError:"Accepted mimes are: :mimes",acceptedExtensionsError:"Accepted extenions are: :extensions"},datepicker:{weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute"},dateFormats:{datetimeSeconds24:"YYYY-MM-DD HH:mm:ss",datetimeSeconds12:"YYYY-MM-DD hh:mm:ss a",datetime24:"YYYY-MM-DD HH:mm",datetime12:"YYYY-MM-DD hh:mm a",timeSeconds24:"HH:mm:ss",timeSeconds12:"hh:mm:ss a",time24:"HH:mm",time12:"hh:mm a",date:"YYYY-MM-DD"},multiselect:{multipleLabelOne:"1 option selected",multipleLabelMore:":options options selected",noResults:"No options found",noOptions:"The list is empty"},defaultMessage:"Invalid field",a11y:{file:{description:"Press Backspace to remove"},list:{remove:"Remove item button"}},countries:{AF:"Afghanistan",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AG:"Antigua & Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AC:"Ascension Island",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BA:"Bosnia & Herzegovina",BW:"Botswana",BR:"Brazil",IO:"British Indian Ocean Territory",VG:"British Virgin Islands",BN:"Brunei",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",BQ:"Caribbean Netherlands",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CO:"Colombia",KM:"Comoros",CG:"Congo - Brazzaville",CD:"Congo - Kinshasa",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d’Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czechia",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",SZ:"Eswatini",ET:"Ethiopia",FK:"Falkland Islands (Islas Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran",IQ:"Iraq",IE:"Ireland",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",XK:"Kosovo",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Laos",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",MX:"Mexico",FM:"Micronesia",MD:"Moldova",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar (Burma)",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",KP:"North Korea",MK:"North Macedonia",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",WS:"Samoa",SM:"San Marino",ST:"São Tomé & Príncipe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",KR:"South Korea",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",BL:"St. Barthélemy",SH:"St. Helena",KN:"St. Kitts & Nevis",LC:"St. Lucia",MF:"St. Martin",PM:"St. Pierre & Miquelon",VC:"St. Vincent & Grenadines",SD:"Sudan",SR:"Suriname",SE:"Sweden",CH:"Switzerland",SY:"Syria",TW:"Taiwan",TJ:"Tajikistan",TZ:"Tanzania",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad & Tobago",TN:"Tunisia",TR:"Türkiye",TM:"Turkmenistan",TC:"Turks & Caicos Islands",TV:"Tuvalu",VI:"U.S. Virgin Islands",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VA:"Vatican City",VE:"Venezuela",VN:"Vietnam",WF:"Wallis & Futuna",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"}},validation:{accepted:"The :attribute must be accepted.",active_url:"The :attribute is not a valid URL.",after:"The :attribute must be a date after :date.",after_or_equal:"The :attribute must be a date after or equal to :date.",alpha:"The :attribute may only contain letters.",alpha_dash:"The :attribute may only contain letters, numbers, dashes and underscores.",alpha_num:"The :attribute may only contain letters and numbers.",array:"The :attribute must be an array.",before:"The :attribute must be a date before :date.",before_or_equal:"The :attribute must be a date before or equal to :date.",between:{numeric:"The :attribute must be between :min and :max.",file:"The :attribute must be between :min and :max kilobytes.",string:"The :attribute must be between :min and :max characters.",array:"The :attribute must have between :min and :max items."},boolean:"The :attribute field must be true or false.",captcha:"Please verify that you are not a robot.",completed:"Please fill in a valid phone number.",confirmed:"The :attribute confirmation does not match.",date:"The :attribute is not a valid date.",date_format:"The :attribute does not match the format :format.",date_equals:"The :attribute must be equal to :date.",different:"The :attribute and :other must be different.",digits:"The :attribute must be :digits digits.",digits_between:"The :attribute must be between :min and :max digits.",dimensions:"The :attribute has invalid image dimensions.",distinct:"The :attribute field has a duplicate value.",email:"The :attribute must be a valid email address.",exists:"The selected :attribute is invalid.",file:"The :attribute must be a file.",filled:"The :attribute field must have a value.",gt:{numeric:"The :attribute must be greater than :value.",file:"The :attribute must be greater than :value kilobytes.",string:"The :attribute must be greater than :value characters.",array:"The :attribute must have more than :value items."},gte:{numeric:"The :attribute must be greater than or equal :value.",file:"The :attribute must be greater than or equal :value kilobytes.",string:"The :attribute must be greater than or equal :value characters.",array:"The :attribute must have :value items or more."},image:"The :attribute must be an image.",in:"The selected :attribute is invalid.",in_array:"The :attribute field does not exist in :other.",integer:"The :attribute must be an integer.",ip:"The :attribute must be a valid IP address.",ipv4:"The :attribute must be a valid IPv4 address.",ipv6:"The :attribute must be a valid IPv6 address.",json:"The :attribute must be a valid JSON string.",lt:{numeric:"The :attribute must be less than :value.",file:"The :attribute must be less than :value kilobytes.",string:"The :attribute must be less than :value characters.",array:"The :attribute must have less than :value items."},lte:{numeric:"The :attribute must be less than or equal :value.",file:"The :attribute must be less than or equal :value kilobytes.",string:"The :attribute must be less than or equal :value characters.",array:"The :attribute must not have more than :value items."},max:{numeric:"The :attribute may not be greater than :max.",file:"The :attribute may not be greater than :max kilobytes.",string:"The :attribute may not be greater than :max characters.",array:"The :attribute may not have more than :max items."},mimes:"The :attribute must be a file of type: :values.",mimetypes:"The :attribute must be a file of type: :values.",min:{numeric:"The :attribute must be at least :min.",file:"The :attribute must be at least :min kilobytes.",string:"The :attribute must be at least :min characters.",array:"The :attribute must have at least :min items."},not_in:"The selected :attribute is invalid.",not_regex:"The :attribute format is invalid.",numeric:"The :attribute must be a number.",present:"The :attribute field must be present.",regex:"The :attribute format is invalid.",required:"The :attribute field is required.",required_if:"The :attribute field is required when :other is :value.",required_unless:"The :attribute field is required unless :other is in :values.",required_with:"The :attribute field is required when :values is present.",required_with_all:"The :attribute field is required when :values are present.",required_without:"The :attribute field is required when :values is not present.",required_without_all:"The :attribute field is required when none of :values are present.",same:"The :attribute and :other must match.",size:{numeric:"The :attribute must be :size.",file:"The :attribute must be :size kilobytes.",string:"The :attribute must be :size characters.",array:"The :attribute must contain :size items."},string:"The :attribute must be a string.",timezone:"The :attribute must be a valid zone.",unique:"The :attribute has already been taken.",uploaded:"The :attribute failed to upload.",url:"The :attribute format is invalid.",uuid:"The :attribute must be a valid UUID.",remote:"The :attribute field is invalid."}};/*!
2
+ * Vueform v1.13.3 (https://github.com/vueform/vueform)
3
3
  * Copyright (c) 2025 Adam Berecz <adam@vueform.com>
4
4
  * Licensed under the MIT License
5
5
  */var Yi={};function su(e,t,n,r,i,l){const a=se("FormElements");return d(),h("form",{class:p(e.classes.form),onSubmit:t[0]||(t[0]=he((...o)=>e.submit&&e.submit(...o),["prevent"]))},[T(e.$slots,"empty",{classes:e.classes},()=>[e.showMessages?(d(),A(F("FormMessages"),{key:0})):m("v-if",!0),e.showErrors?(d(),A(F("FormErrors"),{key:1})):m("v-if",!0),e.showLanguages?(d(),A(F("FormLanguages"),{key:2})):m("v-if",!0),e.showTabs?(d(),A(F("FormTabs"),{key:3})):m("v-if",!0),e.showSteps?(d(),A(F("FormSteps"),{key:4})):m("v-if",!0),xe(a,null,{default:N(()=>[T(e.$slots,"default")]),_:3}),e.showStepsControls?(d(),A(F("FormStepsControls"),{key:5})):m("v-if",!0)])],34)}Yi.render=su;Yi.__file="themes/blank/templates/Vueform.vue";var Ao={name:"Vueform",render:Yi.render,data(){return{merge:!0,defaultClasses:{form:""}}}};Ao.__file="themes/vueform/templates/Vueform.vue";var Xi={};const du=["innerHTML"];function uu(e,t,n,r,i,l){return d(),h("div",{class:p(e.classes.container)},[(d(!0),h(X,null,ie(e.errors,(a,o,s)=>(d(),h("div",{class:p(e.classes.error),innerHTML:a,key:s},null,10,du))),128))],2)}Xi.render=uu;Xi.__file="themes/blank/templates/FormErrors.vue";var Eo={name:"FormErrors",render:Xi.render,data(){return{merge:!0,defaultClasses:{container:"vf-errors",container_sm:"vf-errors-sm",container_md:"",container_lg:"vf-errors-lg",error:"",$container:(e,{Size:t})=>[e.container,e[`container_${t}`]]}}}};function Y(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var cu=`.vf-errors {
@@ -2940,7 +2940,7 @@ v .vf-multiselect-dropdown.vf-multiselect-dropdown-sm.vf-multiselect-dropdown-to
2940
2940
  [dir=rtl] .vf-signature-undos-wrapper {
2941
2941
  right: auto;
2942
2942
  left: 0.75rem;
2943
- }`;Y(sg);Ss.__file="themes/vueform/templates/elements/SignatureElement.vue";function Ir(e){return[null,void 0,!1].indexOf(e)!==-1}function dg(e,t,n){const{value:r,modelValue:i,min:l}=Ze(e);let a=i&&i.value!==void 0?i:r;const o=rt(a.value);if(Ir(a.value)&&(a=rt(l.value)),Array.isArray(a.value)&&a.value.length==0)throw new Error("Slider v-model must not be an empty array");return{value:a,initialValue:o}}function ug(e,t,n){const{classes:r,showTooltip:i,tooltipPosition:l,orientation:a}=Ze(e),o=Le(()=>({target:"slider-target",focused:"slider-focused",tooltipFocus:"slider-tooltip-focus",tooltipDrag:"slider-tooltip-drag",ltr:"slider-ltr",rtl:"slider-rtl",horizontal:"slider-horizontal",vertical:"slider-vertical",textDirectionRtl:"slider-txt-dir-rtl",textDirectionLtr:"slider-txt-dir-ltr",base:"slider-base",connects:"slider-connects",connect:"slider-connect",origin:"slider-origin",handle:"slider-handle",handleLower:"slider-handle-lower",handleUpper:"slider-handle-upper",touchArea:"slider-touch-area",tooltip:"slider-tooltip",tooltipTop:"slider-tooltip-top",tooltipBottom:"slider-tooltip-bottom",tooltipLeft:"slider-tooltip-left",tooltipRight:"slider-tooltip-right",tooltipHidden:"slider-tooltip-hidden",active:"slider-active",draggable:"slider-draggable",tap:"slider-state-tap",drag:"slider-state-drag",pips:"slider-pips",pipsHorizontal:"slider-pips-horizontal",pipsVertical:"slider-pips-vertical",marker:"slider-marker",markerHorizontal:"slider-marker-horizontal",markerVertical:"slider-marker-vertical",markerNormal:"slider-marker-normal",markerLarge:"slider-marker-large",markerSub:"slider-marker-sub",value:"slider-value",valueHorizontal:"slider-value-horizontal",valueVertical:"slider-value-vertical",valueNormal:"slider-value-normal",valueLarge:"slider-value-large",valueSub:"slider-value-sub",...r.value}));return{classList:Le(()=>{const u={...o.value};return Object.keys(u).forEach(f=>{u[f]=Array.isArray(u[f])?u[f].filter(S=>S!==null).join(" "):u[f]}),i.value!=="always"&&(u.target+=` ${i.value==="drag"?u.tooltipDrag:u.tooltipFocus}`),a.value==="horizontal"&&(u.tooltip+=l.value==="bottom"?` ${u.tooltipBottom}`:` ${u.tooltipTop}`),a.value==="vertical"&&(u.tooltip+=l.value==="right"?` ${u.tooltipRight}`:` ${u.tooltipLeft}`),u})}}var Ts={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){var n=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];function r(E){return E.split("").reverse().join("")}function i(E,k){return E.substring(0,k.length)===k}function l(E,k){return E.slice(-1*k.length)===k}function a(E,k,x){if((E[k]||E[x])&&E[k]===E[x])throw new Error(k)}function o(E){return typeof E=="number"&&isFinite(E)}function s(E,k){return E=E.toString().split("e"),E=Math.round(+(E[0]+"e"+(E[1]?+E[1]+k:k))),E=E.toString().split("e"),(+(E[0]+"e"+(E[1]?+E[1]-k:-k))).toFixed(k)}function u(E,k,x,O,D,L,P,H,I,te,G,z){var re=z,Z,_,ae,we="",de="";return L&&(z=L(z)),o(z)?(E!==!1&&parseFloat(z.toFixed(E))===0&&(z=0),z<0&&(Z=!0,z=Math.abs(z)),E!==!1&&(z=s(z,E)),z=z.toString(),z.indexOf(".")!==-1?(_=z.split("."),ae=_[0],x&&(we=x+_[1])):ae=z,k&&(ae=r(ae).match(/.{1,3}/g),ae=r(ae.join(r(k)))),Z&&H&&(de+=H),O&&(de+=O),Z&&I&&(de+=I),de+=ae,de+=we,D&&(de+=D),te&&(de=te(de,re)),de):!1}function f(E,k,x,O,D,L,P,H,I,te,G,z){var re,Z="";return G&&(z=G(z)),!z||typeof z!="string"||(H&&i(z,H)&&(z=z.replace(H,""),re=!0),O&&i(z,O)&&(z=z.replace(O,"")),I&&i(z,I)&&(z=z.replace(I,""),re=!0),D&&l(z,D)&&(z=z.slice(0,-1*D.length)),k&&(z=z.split(k).join("")),x&&(z=z.replace(x,".")),re&&(Z+="-"),Z+=z,Z=Z.replace(/[^0-9\.\-.]/g,""),Z==="")||(Z=Number(Z),P&&(Z=P(Z)),!o(Z))?!1:Z}function S(E){var k,x,O,D={};for(E.suffix===void 0&&(E.suffix=E.postfix),k=0;k<n.length;k+=1)if(x=n[k],O=E[x],O===void 0)x==="negative"&&!D.negativeBefore?D[x]="-":x==="mark"&&D.thousand!=="."?D[x]=".":D[x]=!1;else if(x==="decimals")if(O>=0&&O<8)D[x]=O;else throw new Error(x);else if(x==="encoder"||x==="decoder"||x==="edit"||x==="undo")if(typeof O=="function")D[x]=O;else throw new Error(x);else if(typeof O=="string")D[x]=O;else throw new Error(x);return a(D,"mark","thousand"),a(D,"prefix","negative"),a(D,"prefix","negativeBefore"),D}function M(E,k,x){var O,D=[];for(O=0;O<n.length;O+=1)D.push(E[n[O]]);return D.push(x),k.apply("",D)}function C(E){if(!(this instanceof C))return new C(E);typeof E=="object"&&(E=S(E),this.to=function(k){return M(E,u,k)},this.from=function(k){return M(E,f,k)})}return C})})(Ts);var Bl=Ts.exports;function cg(e,t,n){const{format:r,step:i}=Ze(e),l=n.value,a=n.classList,o=Le(()=>!r||!r.value?Bl({decimals:i.value>=0?0:2}):typeof r.value=="function"?{to:r.value}:Bl({...r.value})),s=Le(()=>Array.isArray(l.value)?l.value.map(f=>o.value):o.value);return{tooltipFormat:o,tooltipsFormat:s,tooltipsMerge:(f,S,M)=>{var C=getComputedStyle(f).direction==="rtl",E=f.noUiSlider.options.direction==="rtl",k=f.noUiSlider.options.orientation==="vertical",x=f.noUiSlider.getTooltips(),O=f.noUiSlider.getOrigins();x.forEach(function(D,L){D&&O[L].appendChild(D)}),f.noUiSlider.on("update",function(D,L,P,H,I){var te=[[]],G=[[]],z=[[]],re=0;x[0]&&(te[0][0]=0,G[0][0]=I[0],z[0][0]=o.value.to(parseFloat(D[0])));for(var Z=1;Z<D.length;Z++)(!x[Z]||D[Z]-D[Z-1]>S)&&(re++,te[re]=[],z[re]=[],G[re]=[]),x[Z]&&(te[re].push(Z),z[re].push(o.value.to(parseFloat(D[Z]))),G[re].push(I[Z]));te.forEach(function(_,ae){for(var we=_.length,de=0;de<we;de++){var be=_[de];if(de===we-1){var fe=0;G[ae].forEach(function(W){fe+=1e3-W});var Ke=k?"bottom":"right",pe=E?0:we-1,ve=1e3-G[ae][pe];fe=(C&&!k?100:0)+fe/we-ve,x[be].innerHTML=z[ae].join(M),x[be].style.display="block",x[be].style[Ke]=fe+"%",a.value.tooltipHidden.split(" ").forEach(W=>{x[be].classList.contains(W)&&x[be].classList.remove(W)})}else x[be].style.display="none",a.value.tooltipHidden.split(" ").forEach(W=>{x[be].classList.add(W)})}})})}}}var un;(function(e){e.Range="range",e.Steps="steps",e.Positions="positions",e.Count="count",e.Values="values"})(un||(un={}));var vt;(function(e){e[e.None=-1]="None",e[e.NoValue=0]="NoValue",e[e.LargeValue=1]="LargeValue",e[e.SmallValue=2]="SmallValue"})(vt||(vt={}));function pg(e){return Fr(e)&&typeof e.from=="function"}function Fr(e){return typeof e=="object"&&typeof e.to=="function"}function Ml(e){e.parentElement.removeChild(e)}function Fi(e){return e!=null}function Dl(e){e.preventDefault()}function fg(e){return e.filter(function(t){return this[t]?!1:this[t]=!0},{})}function vg(e,t){return Math.round(e/t)*t}function gg(e,t){var n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.documentElement,l=Rs(r);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(l.x=0),t?n.top+l.y-i.clientTop:n.left+l.x-i.clientLeft}function Wt(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}function Ol(e,t,n){n>0&&(dt(e,t),setTimeout(function(){Br(e,t)},n))}function $l(e){return Math.max(Math.min(e,100),0)}function Yr(e){return Array.isArray(e)?e:[e]}function mg(e){e=String(e);var t=e.split(".");return t.length>1?t[1].length:0}function dt(e,t){e.classList&&!/\s/.test(t)?e.classList.add(t):e.className+=" "+t}function Br(e,t){e.classList&&!/\s/.test(t)?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function hg(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function Rs(e){var t=window.pageXOffset!==void 0,n=(e.compatMode||"")==="CSS1Compat",r=t?window.pageXOffset:n?e.documentElement.scrollLeft:e.body.scrollLeft,i=t?window.pageYOffset:n?e.documentElement.scrollTop:e.body.scrollTop;return{x:r,y:i}}function bg(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function wg(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch{}return e}function yg(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function _a(e,t){return 100/(t-e)}function zi(e,t,n){return t*100/(e[n+1]-e[n])}function kg(e,t){return zi(e,e[0]<0?t+Math.abs(e[0]):t-e[0],0)}function Cg(e,t){return t*(e[1]-e[0])/100+e[0]}function fr(e,t){for(var n=1;e>=t[n];)n+=1;return n}function Ag(e,t,n){if(n>=e.slice(-1)[0])return 100;var r=fr(n,e),i=e[r-1],l=e[r],a=t[r-1],o=t[r];return a+kg([i,l],n)/_a(a,o)}function Eg(e,t,n){if(n>=100)return e.slice(-1)[0];var r=fr(n,t),i=e[r-1],l=e[r],a=t[r-1],o=t[r];return Cg([i,l],(n-a)*_a(a,o))}function Lg(e,t,n,r){if(r===100)return r;var i=fr(r,e),l=e[i-1],a=e[i];return n?r-l>(a-l)/2?a:l:t[i-1]?e[i-1]+vg(r-e[i-1],t[i-1]):r}var Is=function(){function e(t,n,r){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=n;var i,l=[];for(Object.keys(t).forEach(function(a){l.push([Yr(t[a]),a])}),l.sort(function(a,o){return a[0][0]-o[0][0]}),i=0;i<l.length;i++)this.handleEntryPoint(l[i][1],l[i][0]);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)this.handleStepPoint(i,this.xNumSteps[i])}return e.prototype.getDistance=function(t){for(var n=[],r=0;r<this.xNumSteps.length-1;r++)n[r]=zi(this.xVal,t,r);return n},e.prototype.getAbsoluteDistance=function(t,n,r){var i=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[i+1];)i++;else t===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);!r&&t===this.xPct[i+1]&&i++,n===null&&(n=[]);var l,a=1,o=n[i],s=0,u=0,f=0,S=0;for(r?l=(t-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):l=(this.xPct[i+1]-t)/(this.xPct[i+1]-this.xPct[i]);o>0;)s=this.xPct[i+1+S]-this.xPct[i+S],n[i+S]*a+100-l*100>100?(u=s*l,a=(o-100*l)/n[i+S],l=1):(u=n[i+S]*s/100*a,a=0),r?(f=f-u,this.xPct.length+S>=1&&S--):(f=f+u,this.xPct.length-S>=1&&S++),o=n[i+S]*a;return t+f},e.prototype.toStepping=function(t){return t=Ag(this.xVal,this.xPct,t),t},e.prototype.fromStepping=function(t){return Eg(this.xVal,this.xPct,t)},e.prototype.getStep=function(t){return t=Lg(this.xPct,this.xSteps,this.snap,t),t},e.prototype.getDefaultStep=function(t,n,r){var i=fr(t,this.xPct);return(t===100||n&&t===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/r},e.prototype.getNearbySteps=function(t){var n=fr(t,this.xPct);return{stepBefore:{startValue:this.xVal[n-2],step:this.xNumSteps[n-2],highestStep:this.xHighestCompleteStep[n-2]},thisStep:{startValue:this.xVal[n-1],step:this.xNumSteps[n-1],highestStep:this.xHighestCompleteStep[n-1]},stepAfter:{startValue:this.xVal[n],step:this.xNumSteps[n],highestStep:this.xHighestCompleteStep[n]}}},e.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(mg);return Math.max.apply(null,t)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(t){return this.getStep(this.toStepping(t))},e.prototype.handleEntryPoint=function(t,n){var r;if(t==="min"?r=0:t==="max"?r=100:r=parseFloat(t),!Wt(r)||!Wt(n[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(r),this.xVal.push(n[0]);var i=Number(n[1]);r?this.xSteps.push(isNaN(i)?!1:i):isNaN(i)||(this.xSteps[0]=i),this.xHighestCompleteStep.push(0)},e.prototype.handleStepPoint=function(t,n){if(n){if(this.xVal[t]===this.xVal[t+1]){this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t];return}this.xSteps[t]=zi([this.xVal[t],this.xVal[t+1]],n,0)/_a(this.xPct[t],this.xPct[t+1]);var r=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],i=Math.ceil(Number(r.toFixed(3))-1),l=this.xVal[t]+this.xNumSteps[t]*i;this.xHighestCompleteStep[t]=l}},e}(),Fl={to:function(e){return e===void 0?"":e.toFixed(2)},from:Number},Bs={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},on={tooltips:".__tooltips",aria:".__aria"};function xg(e,t){if(!Wt(t))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=t}function Sg(e,t){if(!Wt(t))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=t}function Tg(e,t){if(!Wt(t))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=t}function Rg(e,t){if(!Wt(t))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=t}function Ig(e,t){if(typeof t!="object"||Array.isArray(t))throw new Error("noUiSlider: 'range' is not an object.");if(t.min===void 0||t.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new Is(t,e.snap||!1,e.singleStep)}function Bg(e,t){if(t=Yr(t),!Array.isArray(t)||!t.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=t.length,e.start=t}function Mg(e,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=t}function Dg(e,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=t}function Og(e,t){if(typeof t!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=t}function Ms(e,t){var n=[!1],r;if(t==="lower"?t=[!0,!1]:t==="upper"&&(t=[!1,!0]),t===!0||t===!1){for(r=1;r<e.handles;r++)n.push(t);n.push(!1)}else{if(!Array.isArray(t)||!t.length||t.length!==e.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");n=t}e.connect=n}function $g(e,t){switch(t){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function Ds(e,t){if(!Wt(t))throw new Error("noUiSlider: 'margin' option must be numeric.");t!==0&&(e.margin=e.spectrum.getDistance(t))}function Fg(e,t){if(!Wt(t))throw new Error("noUiSlider: 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(t),!e.limit||e.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function zg(e,t){var n;if(!Wt(t)&&!Array.isArray(t))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(t)&&!(t.length===2||Wt(t[0])||Wt(t[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(t!==0){for(Array.isArray(t)||(t=[t,t]),e.padding=[e.spectrum.getDistance(t[0]),e.spectrum.getDistance(t[1])],n=0;n<e.spectrum.xNumSteps.length-1;n++)if(e.padding[0][n]<0||e.padding[1][n]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var r=t[0]+t[1],i=e.spectrum.xVal[0],l=e.spectrum.xVal[e.spectrum.xVal.length-1];if(r/(l-i)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function Pg(e,t){switch(t){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function Ng(e,t){if(typeof t!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var n=t.indexOf("tap")>=0,r=t.indexOf("drag")>=0,i=t.indexOf("fixed")>=0,l=t.indexOf("snap")>=0,a=t.indexOf("hover")>=0,o=t.indexOf("unconstrained")>=0,s=t.indexOf("invert-connects")>=0,u=t.indexOf("drag-all")>=0,f=t.indexOf("smooth-steps")>=0;if(i){if(e.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Ds(e,e.start[1]-e.start[0])}if(s&&e.handles!==2)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(o&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:n||l,drag:r,dragAll:u,smoothSteps:f,fixed:i,snap:l,hover:a,unconstrained:o,invertConnects:s}}function Hg(e,t){if(t!==!1)if(t===!0||Fr(t)){e.tooltips=[];for(var n=0;n<e.handles;n++)e.tooltips.push(t)}else{if(t=Yr(t),t.length!==e.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");t.forEach(function(r){if(typeof r!="boolean"&&!Fr(r))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),e.tooltips=t}}function Ug(e,t){if(t.length!==e.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");e.handleAttributes=t}function jg(e,t){if(!Fr(t))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");e.ariaFormat=t}function Wg(e,t){if(!pg(t))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");e.format=t}function Vg(e,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");e.keyboardSupport=t}function _g(e,t){e.documentElement=t}function Qg(e,t){if(typeof t!="string"&&t!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");e.cssPrefix=t}function qg(e,t){if(typeof t!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof e.cssPrefix=="string"?(e.cssClasses={},Object.keys(t).forEach(function(n){e.cssClasses[n]=e.cssPrefix+t[n]})):e.cssClasses=t}function Os(e){var t={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:Fl,format:Fl},n={step:{r:!1,t:xg},keyboardPageMultiplier:{r:!1,t:Sg},keyboardMultiplier:{r:!1,t:Tg},keyboardDefaultStep:{r:!1,t:Rg},start:{r:!0,t:Bg},connect:{r:!0,t:Ms},direction:{r:!0,t:Pg},snap:{r:!1,t:Mg},animate:{r:!1,t:Dg},animationDuration:{r:!1,t:Og},range:{r:!0,t:Ig},orientation:{r:!1,t:$g},margin:{r:!1,t:Ds},limit:{r:!1,t:Fg},padding:{r:!1,t:zg},behaviour:{r:!0,t:Ng},ariaFormat:{r:!1,t:jg},format:{r:!1,t:Wg},tooltips:{r:!1,t:Hg},keyboardSupport:{r:!0,t:Vg},documentElement:{r:!1,t:_g},cssPrefix:{r:!0,t:Qg},cssClasses:{r:!0,t:qg},handleAttributes:{r:!1,t:Ug}},r={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:Bs,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(n).forEach(function(s){if(!Fi(e[s])&&r[s]===void 0){if(n[s].r)throw new Error("noUiSlider: '"+s+"' is required.");return}n[s].t(t,Fi(e[s])?e[s]:r[s])}),t.pips=e.pips;var i=document.createElement("div"),l=i.style.msTransform!==void 0,a=i.style.transform!==void 0;t.transformRule=a?"transform":l?"msTransform":"webkitTransform";var o=[["left","top"],["right","bottom"]];return t.style=o[t.dir][t.ort],t}function Kg(e,t,n){var r=bg(),i=yg(),l=i&&wg(),a=e,o,s,u,f,S,M,C=t.spectrum,E=[],k=[],x=[],O=0,D={},L=!1,P=e.ownerDocument,H=t.documentElement||P.documentElement,I=P.body,te=P.dir==="rtl"||t.ort===1?0:100;function G(c,b){var y=P.createElement("div");return b&&dt(y,b),c.appendChild(y),y}function z(c,b){var y=G(c,t.cssClasses.origin),$=G(y,t.cssClasses.handle);if(G($,t.cssClasses.touchArea),$.setAttribute("data-handle",String(b)),t.keyboardSupport&&($.setAttribute("tabindex","0"),$.addEventListener("keydown",function(j){return Ge(j,b)})),t.handleAttributes!==void 0){var U=t.handleAttributes[b];Object.keys(U).forEach(function(j){$.setAttribute(j,U[j])})}return $.setAttribute("role","slider"),$.setAttribute("aria-orientation",t.ort?"vertical":"horizontal"),b===0?dt($,t.cssClasses.handleLower):b===t.handles-1&&dt($,t.cssClasses.handleUpper),y.handle=$,y}function re(c,b){return b?G(c,t.cssClasses.connect):!1}function Z(c,b){s=G(b,t.cssClasses.connects),u=[],f=[],f.push(re(s,c[0]));for(var y=0;y<t.handles;y++)u.push(z(b,y)),x[y]=y,f.push(re(s,c[y+1]))}function _(c){dt(c,t.cssClasses.target),t.dir===0?dt(c,t.cssClasses.ltr):dt(c,t.cssClasses.rtl),t.ort===0?dt(c,t.cssClasses.horizontal):dt(c,t.cssClasses.vertical);var b=getComputedStyle(c).direction;return b==="rtl"?dt(c,t.cssClasses.textDirectionRtl):dt(c,t.cssClasses.textDirectionLtr),G(c,t.cssClasses.base)}function ae(c,b){return!t.tooltips||!t.tooltips[b]?!1:G(c.firstChild,t.cssClasses.tooltip)}function we(){return a.hasAttribute("disabled")}function de(c){var b=u[c];return b.hasAttribute("disabled")}function be(c){c!=null?(u[c].setAttribute("disabled",""),u[c].handle.removeAttribute("tabindex")):(a.setAttribute("disabled",""),u.forEach(function(b){b.handle.removeAttribute("tabindex")}))}function fe(c){c!=null?(u[c].removeAttribute("disabled"),u[c].handle.setAttribute("tabindex","0")):(a.removeAttribute("disabled"),u.forEach(function(b){b.removeAttribute("disabled"),b.handle.setAttribute("tabindex","0")}))}function Ke(){M&&(xt("update"+on.tooltips),M.forEach(function(c){c&&Ml(c)}),M=null)}function pe(){Ke(),M=u.map(ae),nt("update"+on.tooltips,function(c,b,y){if(!(!M||!t.tooltips)&&M[b]!==!1){var $=c[b];t.tooltips[b]!==!0&&($=t.tooltips[b].to(y[b])),M[b].innerHTML=$}})}function ve(){xt("update"+on.aria),nt("update"+on.aria,function(c,b,y,$,U){x.forEach(function(j){var J=u[j],Q=ot(k,j,0,!0,!0,!0),Re=ot(k,j,100,!0,!0,!0),Ie=U[j],Ce=String(t.ariaFormat.to(y[j]));Q=C.fromStepping(Q).toFixed(1),Re=C.fromStepping(Re).toFixed(1),Ie=C.fromStepping(Ie).toFixed(1),J.children[0].setAttribute("aria-valuemin",Q),J.children[0].setAttribute("aria-valuemax",Re),J.children[0].setAttribute("aria-valuenow",Ie),J.children[0].setAttribute("aria-valuetext",Ce)})})}function W(c){if(c.mode===un.Range||c.mode===un.Steps)return C.xVal;if(c.mode===un.Count){if(c.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var b=c.values-1,y=100/b,$=[];b--;)$[b]=b*y;return $.push(100),ee($,c.stepped)}return c.mode===un.Positions?ee(c.values,c.stepped):c.mode===un.Values?c.stepped?c.values.map(function(U){return C.fromStepping(C.getStep(C.toStepping(U)))}):c.values:[]}function ee(c,b){return c.map(function(y){return C.fromStepping(b?C.getStep(y):y)})}function at(c){function b(Ie,Ce){return Number((Ie+Ce).toFixed(7))}var y=W(c),$={},U=C.xVal[0],j=C.xVal[C.xVal.length-1],J=!1,Q=!1,Re=0;return y=fg(y.slice().sort(function(Ie,Ce){return Ie-Ce})),y[0]!==U&&(y.unshift(U),J=!0),y[y.length-1]!==j&&(y.push(j),Q=!0),y.forEach(function(Ie,Ce){var $e,ge,He,Je=Ie,Ue=y[Ce+1],We,qt,g,K,V,ce,Ae,v=c.mode===un.Steps;for(v&&($e=C.xNumSteps[Ce]),$e||($e=Ue-Je),Ue===void 0&&(Ue=Je),$e=Math.max($e,1e-7),ge=Je;ge<=Ue;ge=b(ge,$e)){for(We=C.toStepping(ge),qt=We-Re,V=qt/(c.density||1),ce=Math.round(V),Ae=qt/ce,He=1;He<=ce;He+=1)g=Re+He*Ae,$[g.toFixed(5)]=[C.fromStepping(g),0];K=y.indexOf(ge)>-1?vt.LargeValue:v?vt.SmallValue:vt.NoValue,!Ce&&J&&ge!==Ue&&(K=0),ge===Ue&&Q||($[We.toFixed(5)]=[ge,K]),Re=We}}),$}function oe(c,b,y){var $,U,j=P.createElement("div"),J=($={},$[vt.None]="",$[vt.NoValue]=t.cssClasses.valueNormal,$[vt.LargeValue]=t.cssClasses.valueLarge,$[vt.SmallValue]=t.cssClasses.valueSub,$),Q=(U={},U[vt.None]="",U[vt.NoValue]=t.cssClasses.markerNormal,U[vt.LargeValue]=t.cssClasses.markerLarge,U[vt.SmallValue]=t.cssClasses.markerSub,U),Re=[t.cssClasses.valueHorizontal,t.cssClasses.valueVertical],Ie=[t.cssClasses.markerHorizontal,t.cssClasses.markerVertical];dt(j,t.cssClasses.pips),dt(j,t.ort===0?t.cssClasses.pipsHorizontal:t.cssClasses.pipsVertical);function Ce(ge,He){var Je=He===t.cssClasses.value,Ue=Je?Re:Ie,We=Je?J:Q;return He+" "+Ue[t.ort]+" "+We[ge]}function $e(ge,He,Je){if(Je=b?b(He,Je):Je,Je!==vt.None){var Ue=G(j,!1);Ue.className=Ce(Je,t.cssClasses.marker),Ue.style[t.style]=ge+"%",Je>vt.NoValue&&(Ue=G(j,!1),Ue.className=Ce(Je,t.cssClasses.value),Ue.setAttribute("data-value",String(He)),Ue.style[t.style]=ge+"%",Ue.innerHTML=String(y.to(He)))}}return Object.keys(c).forEach(function(ge){$e(ge,c[ge][0],c[ge][1])}),j}function le(){S&&(Ml(S),S=null)}function R(c){le();var b=at(c),y=c.filter,$=c.format||{to:function(U){return String(Math.round(U))}};return S=a.appendChild(oe(b,y,$)),S}function ne(){var c=o.getBoundingClientRect(),b="offset"+["Width","Height"][t.ort];return t.ort===0?c.width||o[b]:c.height||o[b]}function Te(c,b,y,$){var U=function(J){var Q=lt(J,$.pageOffset,$.target||b);if(!Q||we()&&!$.doNotReject||hg(a,t.cssClasses.tap)&&!$.doNotReject||c===r.start&&Q.buttons!==void 0&&Q.buttons>1||$.hover&&Q.buttons)return!1;l||Q.preventDefault(),Q.calcPoint=Q.points[t.ort],y(Q,$)},j=[];return c.split(" ").forEach(function(J){b.addEventListener(J,U,l?{passive:!0}:!1),j.push([J,U])}),j}function lt(c,b,y){var $=c.type.indexOf("touch")===0,U=c.type.indexOf("mouse")===0,j=c.type.indexOf("pointer")===0,J=0,Q=0;if(c.type.indexOf("MSPointer")===0&&(j=!0),c.type==="mousedown"&&!c.buttons&&!c.touches)return!1;if($){var Re=function($e){var ge=$e.target;return ge===y||y.contains(ge)||c.composed&&c.composedPath().shift()===y};if(c.type==="touchstart"){var Ie=Array.prototype.filter.call(c.touches,Re);if(Ie.length>1)return!1;J=Ie[0].pageX,Q=Ie[0].pageY}else{var Ce=Array.prototype.find.call(c.changedTouches,Re);if(!Ce)return!1;J=Ce.pageX,Q=Ce.pageY}}return b=b||Rs(P),(U||j)&&(J=c.clientX+b.x,Q=c.clientY+b.y),c.pageOffset=b,c.points=[J,Q],c.cursor=U||j,c}function Mt(c){var b=c-gg(o,t.ort),y=b*100/ne();return y=$l(y),t.dir?100-y:y}function Vt(c){var b=100,y=!1;return u.forEach(function($,U){if(!de(U)){var j=k[U],J=Math.abs(j-c),Q=J===100&&b===100,Re=J<b,Ie=J<=b&&c>j;(Re||Ie||Q)&&(y=U,b=J)}}),y}function Et(c,b){c.type==="mouseout"&&c.target.nodeName==="HTML"&&c.relatedTarget===null&&Pt(c,b)}function Lt(c,b){if(navigator.appVersion.indexOf("MSIE 9")===-1&&c.buttons===0&&b.buttonsProperty!==0)return Pt(c,b);var y=(t.dir?-1:1)*(c.calcPoint-b.startCalcPoint),$=y*100/b.baseSize;ut(y>0,$,b.locations,b.handleNumbers,b.connect)}function Pt(c,b){b.handle&&(Br(b.handle,t.cssClasses.active),O-=1),b.listeners.forEach(function(y){H.removeEventListener(y[0],y[1])}),O===0&&(Br(a,t.cssClasses.drag),ln(),c.cursor&&(I.style.cursor="",I.removeEventListener("selectstart",Dl))),t.events.smoothSteps&&(b.handleNumbers.forEach(function(y){ct(y,k[y],!0,!0,!1,!1)}),b.handleNumbers.forEach(function(y){Be("update",y)})),b.handleNumbers.forEach(function(y){Be("change",y),Be("set",y),Be("end",y)})}function et(c,b){if(!b.handleNumbers.some(de)){var y;if(b.handleNumbers.length===1){var $=u[b.handleNumbers[0]];y=$.children[0],O+=1,dt(y,t.cssClasses.active)}c.stopPropagation();var U=[],j=Te(r.move,H,Lt,{target:c.target,handle:y,connect:b.connect,listeners:U,startCalcPoint:c.calcPoint,baseSize:ne(),pageOffset:c.pageOffset,handleNumbers:b.handleNumbers,buttonsProperty:c.buttons,locations:k.slice()}),J=Te(r.end,H,Pt,{target:c.target,handle:y,listeners:U,doNotReject:!0,handleNumbers:b.handleNumbers}),Q=Te("mouseout",H,Et,{target:c.target,handle:y,listeners:U,doNotReject:!0,handleNumbers:b.handleNumbers});U.push.apply(U,j.concat(J,Q)),c.cursor&&(I.style.cursor=getComputedStyle(c.target).cursor,u.length>1&&dt(a,t.cssClasses.drag),I.addEventListener("selectstart",Dl,!1)),b.handleNumbers.forEach(function(Re){Be("start",Re)})}}function _t(c){c.stopPropagation();var b=Mt(c.calcPoint),y=Vt(b);y!==!1&&(t.events.snap||Ol(a,t.cssClasses.tap,t.animationDuration),ct(y,b,!0,!0),ln(),Be("slide",y,!0),Be("update",y,!0),t.events.snap?et(c,{handleNumbers:[y]}):(Be("change",y,!0),Be("set",y,!0)))}function yt(c){var b=Mt(c.calcPoint),y=C.getStep(b),$=C.fromStepping(y);Object.keys(D).forEach(function(U){U.split(".")[0]==="hover"&&D[U].forEach(function(j){j.call(Pe,$)})})}function Ge(c,b){if(we()||de(b))return!1;var y=["Left","Right"],$=["Down","Up"],U=["PageDown","PageUp"],j=["Home","End"];t.dir&&!t.ort?y.reverse():t.ort&&!t.dir&&($.reverse(),U.reverse());var J=c.key.replace("Arrow",""),Q=J===U[0],Re=J===U[1],Ie=J===$[0]||J===y[0]||Q,Ce=J===$[1]||J===y[1]||Re,$e=J===j[0],ge=J===j[1];if(!Ie&&!Ce&&!$e&&!ge)return!0;c.preventDefault();var He;if(Ce||Ie){var Je=Ie?0:1,Ue=On(b),We=Ue[Je];if(We===null)return!1;We===!1&&(We=C.getDefaultStep(k[b],Ie,t.keyboardDefaultStep)),Re||Q?We*=t.keyboardPageMultiplier:We*=t.keyboardMultiplier,We=Math.max(We,1e-7),We=(Ie?-1:1)*We,He=E[b]+We}else ge?He=t.spectrum.xVal[t.spectrum.xVal.length-1]:He=t.spectrum.xVal[0];return ct(b,C.toStepping(He),!0,!0),Be("slide",b),Be("update",b),Be("change",b),Be("set",b),!1}function tt(c){c.fixed||u.forEach(function(b,y){Te(r.start,b.children[0],et,{handleNumbers:[y]})}),c.tap&&Te(r.start,o,_t,{}),c.hover&&Te(r.move,o,yt,{hover:!0}),c.drag&&f.forEach(function(b,y){if(!(b===!1||y===0||y===f.length-1)){var $=u[y-1],U=u[y],j=[b],J=[$,U],Q=[y-1,y];dt(b,t.cssClasses.draggable),c.fixed&&(j.push($.children[0]),j.push(U.children[0])),c.dragAll&&(J=u,Q=x),j.forEach(function(Re){Te(r.start,Re,et,{handles:J,handleNumbers:Q,connect:b})})}})}function nt(c,b){D[c]=D[c]||[],D[c].push(b),c.split(".")[0]==="update"&&u.forEach(function(y,$){Be("update",$)})}function kt(c){return c===on.aria||c===on.tooltips}function xt(c){var b=c&&c.split(".")[0],y=b?c.substring(b.length):c;Object.keys(D).forEach(function($){var U=$.split(".")[0],j=$.substring(U.length);(!b||b===U)&&(!y||y===j)&&(!kt(j)||y===j)&&delete D[$]})}function Be(c,b,y){Object.keys(D).forEach(function($){var U=$.split(".")[0];c===U&&D[$].forEach(function(j){j.call(Pe,E.map(t.format.to),b,E.slice(),y||!1,k.slice(),Pe)})})}function ot(c,b,y,$,U,j,J){var Q;return u.length>1&&!t.events.unconstrained&&($&&b>0&&(Q=C.getAbsoluteDistance(c[b-1],t.margin,!1),y=Math.max(y,Q)),U&&b<u.length-1&&(Q=C.getAbsoluteDistance(c[b+1],t.margin,!0),y=Math.min(y,Q))),u.length>1&&t.limit&&($&&b>0&&(Q=C.getAbsoluteDistance(c[b-1],t.limit,!1),y=Math.min(y,Q)),U&&b<u.length-1&&(Q=C.getAbsoluteDistance(c[b+1],t.limit,!0),y=Math.max(y,Q))),t.padding&&(b===0&&(Q=C.getAbsoluteDistance(0,t.padding[0],!1),y=Math.max(y,Q)),b===u.length-1&&(Q=C.getAbsoluteDistance(100,t.padding[1],!0),y=Math.min(y,Q))),J||(y=C.getStep(y)),y=$l(y),y===c[b]&&!j?!1:y}function qe(c,b){var y=t.ort;return(y?b:c)+", "+(y?c:b)}function ut(c,b,y,$,U){var j=y.slice(),J=$[0],Q=t.events.smoothSteps,Re=[!c,c],Ie=[c,!c];$=$.slice(),c&&$.reverse(),$.length>1?$.forEach(function($e,ge){var He=ot(j,$e,j[$e]+b,Re[ge],Ie[ge],!1,Q);He===!1?b=0:(b=He-j[$e],j[$e]=He)}):Re=Ie=[!0];var Ce=!1;$.forEach(function($e,ge){Ce=ct($e,y[$e]+b,Re[ge],Ie[ge],!1,Q)||Ce}),Ce&&($.forEach(function($e){Be("update",$e),Be("slide",$e)}),U!=null&&Be("drag",J))}function Ct(c,b){return t.dir?100-c-b:c}function Dt(c,b){k[c]=b,E[c]=C.fromStepping(b);var y=Ct(b,0)-te,$="translate("+qe(y+"%","0")+")";if(u[c].style[t.transformRule]=$,t.events.invertConnects&&k.length>1){var U=k.every(function(j,J,Q){return J===0||j>=Q[J-1]});if(L!==!U){Qt();return}}Ot(c),Ot(c+1),L&&(Ot(c-1),Ot(c+2))}function ln(){x.forEach(function(c){var b=k[c]>50?-1:1,y=3+(u.length+b*c);u[c].style.zIndex=String(y)})}function ct(c,b,y,$,U,j){return U||(b=ot(k,c,b,y,$,!1,j)),b===!1?!1:(Dt(c,b),!0)}function Ot(c){if(f[c]){var b=k.slice();L&&b.sort(function(Q,Re){return Q-Re});var y=0,$=100;c!==0&&(y=b[c-1]),c!==f.length-1&&($=b[c]);var U=$-y,j="translate("+qe(Ct(y,U)+"%","0")+")",J="scale("+qe(U/100,"1")+")";f[c].style[t.transformRule]=j+" "+J}}function Zt(c,b){return c===null||c===!1||c===void 0||(typeof c=="number"&&(c=String(c)),c=t.format.from(c),c!==!1&&(c=C.toStepping(c)),c===!1||isNaN(c))?k[b]:c}function Nt(c,b,y){var $=Yr(c),U=k[0]===void 0;b=b===void 0?!0:b,t.animate&&!U&&Ol(a,t.cssClasses.tap,t.animationDuration),x.forEach(function(Q){ct(Q,Zt($[Q],Q),!0,!1,y)});var j=x.length===1?0:1;if(U&&C.hasNoSize()&&(y=!0,k[0]=0,x.length>1)){var J=100/(x.length-1);x.forEach(function(Q){k[Q]=Q*J})}for(;j<x.length;++j)x.forEach(function(Q){ct(Q,k[Q],!0,!0,y)});ln(),x.forEach(function(Q){Be("update",Q),$[Q]!==null&&b&&Be("set",Q)})}function St(c){Nt(t.start,c)}function pt(c,b,y,$){if(c=Number(c),!(c>=0&&c<x.length))throw new Error("noUiSlider: invalid handle number, got: "+c);ct(c,Zt(b,c),!0,!0,$),Be("update",c),y&&Be("set",c)}function At(c){if(c===void 0&&(c=!1),c)return E.length===1?E[0]:E.slice(0);var b=E.map(t.format.to);return b.length===1?b[0]:b}function bn(){for(xt(on.aria),xt(on.tooltips),Object.keys(t.cssClasses).forEach(function(c){Br(a,t.cssClasses[c])});a.firstChild;)a.removeChild(a.firstChild);delete a.noUiSlider}function On(c){var b=k[c],y=C.getNearbySteps(b),$=E[c],U=y.thisStep.step,j=null;if(t.snap)return[$-y.stepBefore.startValue||null,y.stepAfter.startValue-$||null];U!==!1&&$+U>y.stepAfter.startValue&&(U=y.stepAfter.startValue-$),$>y.thisStep.startValue?j=y.thisStep.step:y.stepBefore.step===!1?j=!1:j=$-y.stepBefore.highestStep,b===100?U=null:b===0&&(j=null);var J=C.countStepDecimals();return U!==null&&U!==!1&&(U=Number(U.toFixed(J))),j!==null&&j!==!1&&(j=Number(j.toFixed(J))),[j,U]}function Tt(){return x.map(On)}function Rt(c,b){var y=At(),$=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];$.forEach(function(j){c[j]!==void 0&&(n[j]=c[j])});var U=Os(n);$.forEach(function(j){c[j]!==void 0&&(t[j]=U[j])}),C=U.spectrum,t.margin=U.margin,t.limit=U.limit,t.padding=U.padding,t.pips?R(t.pips):le(),t.tooltips?pe():Ke(),k=[],Nt(Fi(c.start)?c.start:y,b),c.connect&&wn()}function wn(){for(;s.firstChild;)s.removeChild(s.firstChild);for(var c=0;c<=t.handles;c++)f[c]=re(s,t.connect[c]),Ot(c);tt({drag:t.events.drag,fixed:!0})}function Qt(){L=!L,Ms(t,t.connect.map(function(c){return!c})),wn()}function Qn(){o=_(a),Z(t.connect,o),tt(t.events),Nt(t.start),t.pips&&R(t.pips),t.tooltips&&pe(),ve()}Qn();var Pe={destroy:bn,steps:Tt,on:nt,off:xt,get:At,set:Nt,setHandle:pt,reset:St,disable:be,enable:fe,__moveHandles:function(c,b,y){ut(c,b,k,y)},options:n,updateOptions:Rt,target:a,removePips:le,removeTooltips:Ke,getPositions:function(){return k.slice()},getTooltips:function(){return M},getOrigins:function(){return u},pips:R};return Pe}function Gg(e,t){if(!e||!e.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var n=Os(t),r=Kg(e,n,t);return e.noUiSlider=r,r}var Jg={__spectrum:Is,cssClasses:Bs,create:Gg};function zl(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;const n=t.slice().sort();return e.length===t.length&&e.slice().sort().every(function(r,i){return r===n[i]})}function Yg(e,t,n){const{orientation:r,direction:i,tooltips:l,step:a,min:o,max:s,merge:u,id:f,disabled:S,options:M,classes:C,format:E,lazy:k,ariaLabelledby:x,aria:O}=Ze(e),D=n.value,L=n.initialValue,P=n.tooltipsFormat,H=n.tooltipsMerge,I=n.tooltipFormat,te=n.classList,G=rt(null),z=rt(null),re=rt(!1),Z=Le(()=>{let W={cssPrefix:"",cssClasses:te.value,orientation:r.value,direction:i.value,tooltips:l.value?P.value:!1,connect:"lower",start:Ir(D.value)?o.value:D.value,range:{min:o.value,max:s.value}};if(a.value>0&&(W.step=a.value),Array.isArray(D.value)&&(W.connect=!0),x&&x.value||O&&Object.keys(O.value).length){let ee=Array.isArray(D.value)?D.value:[D.value];W.handleAttributes=ee.map(at=>Object.assign({},O.value,x&&x.value?{"aria-labelledby":x.value}:{}))}return E.value&&(W.ariaFormat=I.value),W}),_=Le(()=>{let W={id:f&&f.value?f.value:void 0};return S.value&&(W.disabled=!0),W}),ae=Le(()=>Array.isArray(D.value)),we=()=>{fe(L.value)},de=()=>{let W=z.value.get();return Array.isArray(W)?W.map(ee=>parseFloat(ee)):parseFloat(W)},be=(W,ee=!0)=>{z.value.set(W,ee)},fe=W=>{t.emit("input",W),t.emit("update:modelValue",W),t.emit("update",W)},Ke=()=>{z.value=Jg.create(G.value,Object.assign({},Z.value,M.value)),l.value&&ae.value&&u.value>=0&&H(G.value,u.value," - "),z.value.on("set",()=>{const W=de();t.emit("change",W),t.emit("set",W),k.value&&fe(W)}),z.value.on("update",()=>{if(!re.value)return;const W=de();if(ae.value&&zl(D.value,W)||!ae.value&&D.value==W){t.emit("update",W);return}k.value||fe(W)}),z.value.on("start",()=>{t.emit("start",de())}),z.value.on("end",()=>{t.emit("end",de())}),z.value.on("slide",()=>{t.emit("slide",de())}),z.value.on("drag",()=>{t.emit("drag",de())}),G.value.querySelectorAll("[data-handle]").forEach(W=>{W.onblur=()=>{G.value&&te.value.focused.split(" ").forEach(ee=>{G.value.classList.remove(ee)})},W.onfocus=()=>{te.value.focused.split(" ").forEach(ee=>{G.value.classList.add(ee)})}}),re.value=!0},pe=()=>{z.value.off(),z.value.destroy(),z.value=null},ve=(W,ee)=>{re.value=!1,pe(),Ke()};return Vr(Ke),Xd(pe),je(ae,ve,{immediate:!1}),je(o,ve,{immediate:!1}),je(s,ve,{immediate:!1}),je(a,ve,{immediate:!1}),je(r,ve,{immediate:!1}),je(i,ve,{immediate:!1}),je(l,ve,{immediate:!1}),je(u,ve,{immediate:!1}),je(E,ve,{immediate:!1,deep:!0}),je(M,ve,{immediate:!1,deep:!0}),je(C,ve,{immediate:!1,deep:!0}),je(D,(W,ee)=>{ee&&(typeof ee=="object"&&typeof W=="object"&&W&&Object.keys(ee)>Object.keys(W)||typeof ee=="object"&&typeof W!="object"||Ir(W))&&ve()},{immediate:!1}),je(D,W=>{if(Ir(W)){be(o.value,!1);return}let ee=de();ae.value&&!Array.isArray(ee)&&(ee=[ee]),(ae.value&&!zl(W,ee)||!ae.value&&W!=ee)&&be(W,!1)},{deep:!0}),{slider:G,slider$:z,isRange:ae,sliderProps:_,init:Ke,destroy:pe,refresh:ve,update:be,reset:we}}const Xg={value:{validator:function(e){return t=>typeof t=="number"||t instanceof Array||t===null||t===void 0||t===!1},required:!1},modelValue:{validator:function(e){return t=>typeof t=="number"||t instanceof Array||t===null||t===void 0||t===!1},required:!1}};var Qa={name:"Slider",emits:["input","update:modelValue","start","slide","drag","update","change","set","end"],props:{...Xg,id:{type:[String,Number],required:!1},disabled:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},orientation:{type:String,required:!1,default:"horizontal"},direction:{type:String,required:!1,default:"ltr"},tooltips:{type:Boolean,required:!1,default:!0},options:{type:Object,required:!1,default:()=>({})},merge:{type:Number,required:!1,default:-1},format:{type:[Object,Function,Boolean],required:!1,default:null},classes:{type:Object,required:!1,default:()=>({})},showTooltip:{type:String,required:!1,default:"always"},tooltipPosition:{type:String,required:!1,default:null},lazy:{type:Boolean,required:!1,default:!0},ariaLabelledby:{type:String,required:!1,default:void 0},aria:{required:!1,type:Object,default:()=>({})}},setup(e,t){const n=dg(e),r=ug(e),i=cg(e,t,{value:n.value,classList:r.classList}),l=Yg(e,t,{value:n.value,initialValue:n.initialValue,tooltipFormat:i.tooltipFormat,tooltipsFormat:i.tooltipsFormat,tooltipsMerge:i.tooltipsMerge,classList:r.classList});return{...r,...i,...l}}};function Zg(e,t,n,r,i,l){return d(),h("div",q(e.sliderProps,{ref:"slider"}),null,16)}Qa.render=Zg;Qa.__file="node_modules/@vueform/slider/src/Slider.vue";var qa={};function em(e,t,n,r,i,l){const a=se("Slider");return d(),A(F(e.elementLayout),{ref:"container"},Oe({element:N(()=>[w("div",{class:p(e.classes.wrapper)},[m(" @vueform/slider component "),xe(a,q({value:e.value,modelValue:e.value},e.fieldOptions,{aria:e.aria,classes:e.classes.slider,id:e.fieldId,ref:"input",onUpdate:e.handleUpdate,onChange:e.handleChange}),null,16,["value","modelValue","aria","classes","id","onUpdate","onChange"])],2)]),_:2},[ie(e.elementSlots,(o,s)=>({name:s,fn:N(()=>[T(e.$slots,s,{el$:e.el$},()=>[(d(),A(F(o),{el$:e.el$},null,8,["el$"]))])])}))]),1536)}qa.render=em;qa.__file="themes/blank/templates/elements/SliderElement.vue";var $s={name:"SliderElement",render:qa.render,components:{Slider:Qa},data(){return{merge:!0,defaultClasses:{container:"",wrapper:"vf-slider-wrapper",wrapper_sm:"vf-slider-wrapper-sm",wrapper_md:"",wrapper_lg:"vf-slider-wrapper-lg",slider:{target:"vf-slider-target",target_sm:"vf-slider-target-sm",target_md:"vf-slider-target-md",target_lg:"vf-slider-target-lg",focused:"vf-slider-focused",tooltipFocus:"vf-slider-tooltip-focus",tooltipDrag:"vf-slider-tooltip-drag",ltr:"vf-slider-ltr",rtl:"vf-slider-rtl",horizontal:"vf-slider-horizontal",horizontal_sm:"vf-slider-horizontal-sm",horizontal_md:"vf-slider-horizontal-md",horizontal_lg:"vf-slider-horizontal-lg",vertical:"vf-slider-vertical",vertical_sm:"vf-slider-vertical-sm",vertical_md:"vf-slider-vertical-md",vertical_lg:"vf-slider-vertical-lg",textDirectionRtl:"vf-slider-txt-dir-rtl",textDirectionLtr:"vf-slider-txt-dir-ltr",base:"vf-slider-base",base_sm:"vf-slider-base-sm",base_md:"vf-slider-base-md",base_lg:"vf-slider-base-lg",connects:"vf-slider-connects",connects_sm:"vf-slider-connects-sm",connects_md:"vf-slider-connects-md",connects_lg:"vf-slider-connects-lg",connect:"vf-slider-connect",connect_sm:"vf-slider-connect-sm",connect_md:"vf-slider-connect-md",connect_lg:"vf-slider-connect-lg",origin:"vf-slider-origin",handle:"vf-slider-handle",handle_sm:"vf-slider-handle-sm",handle_md:"vf-slider-handle-md",handle_lg:"vf-slider-handle-lg",handleUpper:"vf-handle-upper",handleLower:"vf-handle-lower",touchArea:"vf-slider-touch-area",tooltip:"vf-slider-tooltip",tooltip_sm:"vf-slider-tooltip-sm",tooltip_md:"vf-slider-tooltip-md",tooltip_lg:"vf-slider-tooltip-lg",tooltipTop:"vf-slider-tooltip-top",tooltipTop_sm:"vf-slider-tooltip-top-sm",tooltipTop_md:"vf-slider-tooltip-top-md",tooltipTop_lg:"vf-slider-tooltip-top-lg",tooltipBottom:"vf-slider-tooltip-bottom",tooltipBottom_sm:"vf-slider-tooltip-bottom-sm",tooltipBottom_md:"vf-slider-tooltip-bottom-md",tooltipBottom_lg:"vf-slider-tooltip-bottom-lg",tooltipLeft:"vf-slider-tooltip-left",tooltipLeft_sm:"vf-slider-tooltip-left-sm",tooltipLeft_md:"vf-slider-tooltip-left-md",tooltipLeft_lg:"vf-slider-tooltip-left-lg",tooltipRight:"vf-slider-tooltip-right",tooltipRight_sm:"vf-slider-tooltip-right-sm",tooltipRight_md:"vf-slider-tooltip-right-md",tooltipRight_lg:"vf-slider-tooltip-right-lg",tooltipHidden:"vf-slider-tooltip-hidden",active:"vf-slider-active",draggable:"vf-slider-draggable",tap:"vf-slider-state-tap",drag:"vf-slider-state-drag",$slider:(e,{Size:t})=>[e.slider.slider,e.slider[`slider_${t}`]],$horizontal:(e,{Size:t})=>[e.slider.horizontal,e.slider[`horizontal_${t}`]],$vertical:(e,{Size:t})=>[e.slider.vertical,e.slider[`vertical_${t}`]],$base:(e,{Size:t})=>[e.slider.base,e.slider[`base_${t}`]],$connects:(e,{Size:t})=>[e.slider.connects,e.slider[`connects_${t}`]],$connect:(e,{Size:t})=>[e.slider.connect,e.slider[`connect_${t}`]],$handle:(e,{Size:t})=>[e.slider.handle,e.slider[`handle_${t}`]],$tooltip:(e,{Size:t})=>[e.slider.tooltip,e.slider[`tooltip_${t}`]],$tooltipTop:(e,{Size:t})=>[e.slider.tooltipTop,e.slider[`tooltipTop_${t}`]],$tooltipBottom:(e,{Size:t})=>[e.slider.tooltipBottom,e.slider[`tooltipBottom_${t}`]],$tooltipLeft:(e,{Size:t})=>[e.slider.tooltipLeft,e.slider[`tooltipLeft_${t}`]],$tooltipRight:(e,{Size:t})=>[e.slider.tooltipRight,e.slider[`tooltipRight_${t}`]]},$wrapper:(e,{Size:t})=>[e.wrapper,e[`wrapper_${t}`]]}}}},tm=`.vf-slider-wrapper {
2943
+ }`;Y(sg);Ss.__file="themes/vueform/templates/elements/SignatureElement.vue";function Ir(e){return[null,void 0,!1].indexOf(e)!==-1}function dg(e,t,n){const{value:r,modelValue:i,min:l}=Ze(e);let a=i&&i.value!==void 0?i:r;const o=rt(a.value);if(Ir(a.value)&&(a=rt(l.value)),Array.isArray(a.value)&&a.value.length==0)throw new Error("Slider v-model must not be an empty array");return{value:a,initialValue:o}}function ug(e,t,n){const{classes:r,showTooltip:i,tooltipPosition:l,orientation:a}=Ze(e),o=Le(()=>({target:"slider-target",focused:"slider-focused",tooltipFocus:"slider-tooltip-focus",tooltipDrag:"slider-tooltip-drag",ltr:"slider-ltr",rtl:"slider-rtl",horizontal:"slider-horizontal",vertical:"slider-vertical",textDirectionRtl:"slider-txt-dir-rtl",textDirectionLtr:"slider-txt-dir-ltr",base:"slider-base",connects:"slider-connects",connect:"slider-connect",origin:"slider-origin",handle:"slider-handle",handleLower:"slider-handle-lower",handleUpper:"slider-handle-upper",touchArea:"slider-touch-area",tooltip:"slider-tooltip",tooltipTop:"slider-tooltip-top",tooltipBottom:"slider-tooltip-bottom",tooltipLeft:"slider-tooltip-left",tooltipRight:"slider-tooltip-right",tooltipHidden:"slider-tooltip-hidden",active:"slider-active",draggable:"slider-draggable",tap:"slider-state-tap",drag:"slider-state-drag",pips:"slider-pips",pipsHorizontal:"slider-pips-horizontal",pipsVertical:"slider-pips-vertical",marker:"slider-marker",markerHorizontal:"slider-marker-horizontal",markerVertical:"slider-marker-vertical",markerNormal:"slider-marker-normal",markerLarge:"slider-marker-large",markerSub:"slider-marker-sub",value:"slider-value",valueHorizontal:"slider-value-horizontal",valueVertical:"slider-value-vertical",valueNormal:"slider-value-normal",valueLarge:"slider-value-large",valueSub:"slider-value-sub",...r.value}));return{classList:Le(()=>{const u={...o.value};return Object.keys(u).forEach(f=>{u[f]=Array.isArray(u[f])?u[f].filter(S=>S!==null).join(" "):u[f]}),i.value!=="always"&&(u.target+=` ${i.value==="drag"?u.tooltipDrag:u.tooltipFocus}`),a.value==="horizontal"&&(u.tooltip+=l.value==="bottom"?` ${u.tooltipBottom}`:` ${u.tooltipTop}`),a.value==="vertical"&&(u.tooltip+=l.value==="right"?` ${u.tooltipRight}`:` ${u.tooltipLeft}`),u})}}var Ts={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){var n=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];function r(E){return E.split("").reverse().join("")}function i(E,k){return E.substring(0,k.length)===k}function l(E,k){return E.slice(-1*k.length)===k}function a(E,k,x){if((E[k]||E[x])&&E[k]===E[x])throw new Error(k)}function o(E){return typeof E=="number"&&isFinite(E)}function s(E,k){return E=E.toString().split("e"),E=Math.round(+(E[0]+"e"+(E[1]?+E[1]+k:k))),E=E.toString().split("e"),(+(E[0]+"e"+(E[1]?+E[1]-k:-k))).toFixed(k)}function u(E,k,x,O,D,L,P,H,I,te,G,z){var re=z,Z,_,ae,we="",de="";return L&&(z=L(z)),o(z)?(E!==!1&&parseFloat(z.toFixed(E))===0&&(z=0),z<0&&(Z=!0,z=Math.abs(z)),E!==!1&&(z=s(z,E)),z=z.toString(),z.indexOf(".")!==-1?(_=z.split("."),ae=_[0],x&&(we=x+_[1])):ae=z,k&&(ae=r(ae).match(/.{1,3}/g),ae=r(ae.join(r(k)))),Z&&H&&(de+=H),O&&(de+=O),Z&&I&&(de+=I),de+=ae,de+=we,D&&(de+=D),te&&(de=te(de,re)),de):!1}function f(E,k,x,O,D,L,P,H,I,te,G,z){var re,Z="";return G&&(z=G(z)),!z||typeof z!="string"||(H&&i(z,H)&&(z=z.replace(H,""),re=!0),O&&i(z,O)&&(z=z.replace(O,"")),I&&i(z,I)&&(z=z.replace(I,""),re=!0),D&&l(z,D)&&(z=z.slice(0,-1*D.length)),k&&(z=z.split(k).join("")),x&&(z=z.replace(x,".")),re&&(Z+="-"),Z+=z,Z=Z.replace(/[^0-9\.\-.]/g,""),Z==="")||(Z=Number(Z),P&&(Z=P(Z)),!o(Z))?!1:Z}function S(E){var k,x,O,D={};for(E.suffix===void 0&&(E.suffix=E.postfix),k=0;k<n.length;k+=1)if(x=n[k],O=E[x],O===void 0)x==="negative"&&!D.negativeBefore?D[x]="-":x==="mark"&&D.thousand!=="."?D[x]=".":D[x]=!1;else if(x==="decimals")if(O>=0&&O<8)D[x]=O;else throw new Error(x);else if(x==="encoder"||x==="decoder"||x==="edit"||x==="undo")if(typeof O=="function")D[x]=O;else throw new Error(x);else if(typeof O=="string")D[x]=O;else throw new Error(x);return a(D,"mark","thousand"),a(D,"prefix","negative"),a(D,"prefix","negativeBefore"),D}function M(E,k,x){var O,D=[];for(O=0;O<n.length;O+=1)D.push(E[n[O]]);return D.push(x),k.apply("",D)}function C(E){if(!(this instanceof C))return new C(E);typeof E=="object"&&(E=S(E),this.to=function(k){return M(E,u,k)},this.from=function(k){return M(E,f,k)})}return C})})(Ts);var Bl=Ts.exports;function cg(e,t,n){const{format:r,step:i}=Ze(e),l=n.value,a=n.classList,o=Le(()=>!r||!r.value?Bl({decimals:i.value>=0?0:2}):typeof r.value=="function"?{to:r.value}:Bl({...r.value})),s=Le(()=>Array.isArray(l.value)?l.value.map(f=>o.value):o.value);return{tooltipFormat:o,tooltipsFormat:s,tooltipsMerge:(f,S,M)=>{var C=getComputedStyle(f).direction==="rtl",E=f.noUiSlider.options.direction==="rtl",k=f.noUiSlider.options.orientation==="vertical",x=f.noUiSlider.getTooltips(),O=f.noUiSlider.getOrigins();x.forEach(function(D,L){D&&O[L].appendChild(D)}),f.noUiSlider.on("update",function(D,L,P,H,I){var te=[[]],G=[[]],z=[[]],re=0;x[0]&&(te[0][0]=0,G[0][0]=I[0],z[0][0]=o.value.to(parseFloat(D[0])));for(var Z=1;Z<D.length;Z++)(!x[Z]||D[Z]-D[Z-1]>S)&&(re++,te[re]=[],z[re]=[],G[re]=[]),x[Z]&&(te[re].push(Z),z[re].push(o.value.to(parseFloat(D[Z]))),G[re].push(I[Z]));te.forEach(function(_,ae){for(var we=_.length,de=0;de<we;de++){var be=_[de];if(de===we-1){var fe=0;G[ae].forEach(function(W){fe+=1e3-W});var Ke=k?"bottom":"right",pe=E?0:we-1,ve=1e3-G[ae][pe];fe=(C&&!k?100:0)+fe/we-ve,x[be].innerHTML=z[ae].join(M),x[be].style.display="block",x[be].style[Ke]=fe+"%",a.value.tooltipHidden.split(" ").forEach(W=>{x[be].classList.contains(W)&&x[be].classList.remove(W)})}else x[be].style.display="none",a.value.tooltipHidden.split(" ").forEach(W=>{x[be].classList.add(W)})}})})}}}var un;(function(e){e.Range="range",e.Steps="steps",e.Positions="positions",e.Count="count",e.Values="values"})(un||(un={}));var vt;(function(e){e[e.None=-1]="None",e[e.NoValue=0]="NoValue",e[e.LargeValue=1]="LargeValue",e[e.SmallValue=2]="SmallValue"})(vt||(vt={}));function pg(e){return Fr(e)&&typeof e.from=="function"}function Fr(e){return typeof e=="object"&&typeof e.to=="function"}function Ml(e){e.parentElement.removeChild(e)}function Fi(e){return e!=null}function Dl(e){e.preventDefault()}function fg(e){return e.filter(function(t){return this[t]?!1:this[t]=!0},{})}function vg(e,t){return Math.round(e/t)*t}function gg(e,t){var n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.documentElement,l=Rs(r);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(l.x=0),t?n.top+l.y-i.clientTop:n.left+l.x-i.clientLeft}function Wt(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}function Ol(e,t,n){n>0&&(dt(e,t),setTimeout(function(){Br(e,t)},n))}function $l(e){return Math.max(Math.min(e,100),0)}function Yr(e){return Array.isArray(e)?e:[e]}function mg(e){e=String(e);var t=e.split(".");return t.length>1?t[1].length:0}function dt(e,t){e.classList&&!/\s/.test(t)?e.classList.add(t):e.className+=" "+t}function Br(e,t){e.classList&&!/\s/.test(t)?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function hg(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function Rs(e){var t=window.pageXOffset!==void 0,n=(e.compatMode||"")==="CSS1Compat",r=t?window.pageXOffset:n?e.documentElement.scrollLeft:e.body.scrollLeft,i=t?window.pageYOffset:n?e.documentElement.scrollTop:e.body.scrollTop;return{x:r,y:i}}function bg(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function wg(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch{}return e}function yg(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function _a(e,t){return 100/(t-e)}function zi(e,t,n){return t*100/(e[n+1]-e[n])}function kg(e,t){return zi(e,e[0]<0?t+Math.abs(e[0]):t-e[0],0)}function Cg(e,t){return t*(e[1]-e[0])/100+e[0]}function fr(e,t){for(var n=1;e>=t[n];)n+=1;return n}function Ag(e,t,n){if(n>=e.slice(-1)[0])return 100;var r=fr(n,e),i=e[r-1],l=e[r],a=t[r-1],o=t[r];return a+kg([i,l],n)/_a(a,o)}function Eg(e,t,n){if(n>=100)return e.slice(-1)[0];var r=fr(n,t),i=e[r-1],l=e[r],a=t[r-1],o=t[r];return Cg([i,l],(n-a)*_a(a,o))}function Lg(e,t,n,r){if(r===100)return r;var i=fr(r,e),l=e[i-1],a=e[i];return n?r-l>(a-l)/2?a:l:t[i-1]?e[i-1]+vg(r-e[i-1],t[i-1]):r}var Is=(function(){function e(t,n,r){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=n;var i,l=[];for(Object.keys(t).forEach(function(a){l.push([Yr(t[a]),a])}),l.sort(function(a,o){return a[0][0]-o[0][0]}),i=0;i<l.length;i++)this.handleEntryPoint(l[i][1],l[i][0]);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)this.handleStepPoint(i,this.xNumSteps[i])}return e.prototype.getDistance=function(t){for(var n=[],r=0;r<this.xNumSteps.length-1;r++)n[r]=zi(this.xVal,t,r);return n},e.prototype.getAbsoluteDistance=function(t,n,r){var i=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[i+1];)i++;else t===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);!r&&t===this.xPct[i+1]&&i++,n===null&&(n=[]);var l,a=1,o=n[i],s=0,u=0,f=0,S=0;for(r?l=(t-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):l=(this.xPct[i+1]-t)/(this.xPct[i+1]-this.xPct[i]);o>0;)s=this.xPct[i+1+S]-this.xPct[i+S],n[i+S]*a+100-l*100>100?(u=s*l,a=(o-100*l)/n[i+S],l=1):(u=n[i+S]*s/100*a,a=0),r?(f=f-u,this.xPct.length+S>=1&&S--):(f=f+u,this.xPct.length-S>=1&&S++),o=n[i+S]*a;return t+f},e.prototype.toStepping=function(t){return t=Ag(this.xVal,this.xPct,t),t},e.prototype.fromStepping=function(t){return Eg(this.xVal,this.xPct,t)},e.prototype.getStep=function(t){return t=Lg(this.xPct,this.xSteps,this.snap,t),t},e.prototype.getDefaultStep=function(t,n,r){var i=fr(t,this.xPct);return(t===100||n&&t===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/r},e.prototype.getNearbySteps=function(t){var n=fr(t,this.xPct);return{stepBefore:{startValue:this.xVal[n-2],step:this.xNumSteps[n-2],highestStep:this.xHighestCompleteStep[n-2]},thisStep:{startValue:this.xVal[n-1],step:this.xNumSteps[n-1],highestStep:this.xHighestCompleteStep[n-1]},stepAfter:{startValue:this.xVal[n],step:this.xNumSteps[n],highestStep:this.xHighestCompleteStep[n]}}},e.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(mg);return Math.max.apply(null,t)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(t){return this.getStep(this.toStepping(t))},e.prototype.handleEntryPoint=function(t,n){var r;if(t==="min"?r=0:t==="max"?r=100:r=parseFloat(t),!Wt(r)||!Wt(n[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(r),this.xVal.push(n[0]);var i=Number(n[1]);r?this.xSteps.push(isNaN(i)?!1:i):isNaN(i)||(this.xSteps[0]=i),this.xHighestCompleteStep.push(0)},e.prototype.handleStepPoint=function(t,n){if(n){if(this.xVal[t]===this.xVal[t+1]){this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t];return}this.xSteps[t]=zi([this.xVal[t],this.xVal[t+1]],n,0)/_a(this.xPct[t],this.xPct[t+1]);var r=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],i=Math.ceil(Number(r.toFixed(3))-1),l=this.xVal[t]+this.xNumSteps[t]*i;this.xHighestCompleteStep[t]=l}},e})(),Fl={to:function(e){return e===void 0?"":e.toFixed(2)},from:Number},Bs={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},on={tooltips:".__tooltips",aria:".__aria"};function xg(e,t){if(!Wt(t))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=t}function Sg(e,t){if(!Wt(t))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=t}function Tg(e,t){if(!Wt(t))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=t}function Rg(e,t){if(!Wt(t))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=t}function Ig(e,t){if(typeof t!="object"||Array.isArray(t))throw new Error("noUiSlider: 'range' is not an object.");if(t.min===void 0||t.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new Is(t,e.snap||!1,e.singleStep)}function Bg(e,t){if(t=Yr(t),!Array.isArray(t)||!t.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=t.length,e.start=t}function Mg(e,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=t}function Dg(e,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=t}function Og(e,t){if(typeof t!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=t}function Ms(e,t){var n=[!1],r;if(t==="lower"?t=[!0,!1]:t==="upper"&&(t=[!1,!0]),t===!0||t===!1){for(r=1;r<e.handles;r++)n.push(t);n.push(!1)}else{if(!Array.isArray(t)||!t.length||t.length!==e.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");n=t}e.connect=n}function $g(e,t){switch(t){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function Ds(e,t){if(!Wt(t))throw new Error("noUiSlider: 'margin' option must be numeric.");t!==0&&(e.margin=e.spectrum.getDistance(t))}function Fg(e,t){if(!Wt(t))throw new Error("noUiSlider: 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(t),!e.limit||e.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function zg(e,t){var n;if(!Wt(t)&&!Array.isArray(t))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(t)&&!(t.length===2||Wt(t[0])||Wt(t[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(t!==0){for(Array.isArray(t)||(t=[t,t]),e.padding=[e.spectrum.getDistance(t[0]),e.spectrum.getDistance(t[1])],n=0;n<e.spectrum.xNumSteps.length-1;n++)if(e.padding[0][n]<0||e.padding[1][n]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var r=t[0]+t[1],i=e.spectrum.xVal[0],l=e.spectrum.xVal[e.spectrum.xVal.length-1];if(r/(l-i)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function Pg(e,t){switch(t){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function Ng(e,t){if(typeof t!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var n=t.indexOf("tap")>=0,r=t.indexOf("drag")>=0,i=t.indexOf("fixed")>=0,l=t.indexOf("snap")>=0,a=t.indexOf("hover")>=0,o=t.indexOf("unconstrained")>=0,s=t.indexOf("invert-connects")>=0,u=t.indexOf("drag-all")>=0,f=t.indexOf("smooth-steps")>=0;if(i){if(e.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Ds(e,e.start[1]-e.start[0])}if(s&&e.handles!==2)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(o&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:n||l,drag:r,dragAll:u,smoothSteps:f,fixed:i,snap:l,hover:a,unconstrained:o,invertConnects:s}}function Hg(e,t){if(t!==!1)if(t===!0||Fr(t)){e.tooltips=[];for(var n=0;n<e.handles;n++)e.tooltips.push(t)}else{if(t=Yr(t),t.length!==e.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");t.forEach(function(r){if(typeof r!="boolean"&&!Fr(r))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),e.tooltips=t}}function Ug(e,t){if(t.length!==e.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");e.handleAttributes=t}function jg(e,t){if(!Fr(t))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");e.ariaFormat=t}function Wg(e,t){if(!pg(t))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");e.format=t}function Vg(e,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");e.keyboardSupport=t}function _g(e,t){e.documentElement=t}function Qg(e,t){if(typeof t!="string"&&t!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");e.cssPrefix=t}function qg(e,t){if(typeof t!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof e.cssPrefix=="string"?(e.cssClasses={},Object.keys(t).forEach(function(n){e.cssClasses[n]=e.cssPrefix+t[n]})):e.cssClasses=t}function Os(e){var t={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:Fl,format:Fl},n={step:{r:!1,t:xg},keyboardPageMultiplier:{r:!1,t:Sg},keyboardMultiplier:{r:!1,t:Tg},keyboardDefaultStep:{r:!1,t:Rg},start:{r:!0,t:Bg},connect:{r:!0,t:Ms},direction:{r:!0,t:Pg},snap:{r:!1,t:Mg},animate:{r:!1,t:Dg},animationDuration:{r:!1,t:Og},range:{r:!0,t:Ig},orientation:{r:!1,t:$g},margin:{r:!1,t:Ds},limit:{r:!1,t:Fg},padding:{r:!1,t:zg},behaviour:{r:!0,t:Ng},ariaFormat:{r:!1,t:jg},format:{r:!1,t:Wg},tooltips:{r:!1,t:Hg},keyboardSupport:{r:!0,t:Vg},documentElement:{r:!1,t:_g},cssPrefix:{r:!0,t:Qg},cssClasses:{r:!0,t:qg},handleAttributes:{r:!1,t:Ug}},r={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:Bs,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(n).forEach(function(s){if(!Fi(e[s])&&r[s]===void 0){if(n[s].r)throw new Error("noUiSlider: '"+s+"' is required.");return}n[s].t(t,Fi(e[s])?e[s]:r[s])}),t.pips=e.pips;var i=document.createElement("div"),l=i.style.msTransform!==void 0,a=i.style.transform!==void 0;t.transformRule=a?"transform":l?"msTransform":"webkitTransform";var o=[["left","top"],["right","bottom"]];return t.style=o[t.dir][t.ort],t}function Kg(e,t,n){var r=bg(),i=yg(),l=i&&wg(),a=e,o,s,u,f,S,M,C=t.spectrum,E=[],k=[],x=[],O=0,D={},L=!1,P=e.ownerDocument,H=t.documentElement||P.documentElement,I=P.body,te=P.dir==="rtl"||t.ort===1?0:100;function G(c,b){var y=P.createElement("div");return b&&dt(y,b),c.appendChild(y),y}function z(c,b){var y=G(c,t.cssClasses.origin),$=G(y,t.cssClasses.handle);if(G($,t.cssClasses.touchArea),$.setAttribute("data-handle",String(b)),t.keyboardSupport&&($.setAttribute("tabindex","0"),$.addEventListener("keydown",function(j){return Ge(j,b)})),t.handleAttributes!==void 0){var U=t.handleAttributes[b];Object.keys(U).forEach(function(j){$.setAttribute(j,U[j])})}return $.setAttribute("role","slider"),$.setAttribute("aria-orientation",t.ort?"vertical":"horizontal"),b===0?dt($,t.cssClasses.handleLower):b===t.handles-1&&dt($,t.cssClasses.handleUpper),y.handle=$,y}function re(c,b){return b?G(c,t.cssClasses.connect):!1}function Z(c,b){s=G(b,t.cssClasses.connects),u=[],f=[],f.push(re(s,c[0]));for(var y=0;y<t.handles;y++)u.push(z(b,y)),x[y]=y,f.push(re(s,c[y+1]))}function _(c){dt(c,t.cssClasses.target),t.dir===0?dt(c,t.cssClasses.ltr):dt(c,t.cssClasses.rtl),t.ort===0?dt(c,t.cssClasses.horizontal):dt(c,t.cssClasses.vertical);var b=getComputedStyle(c).direction;return b==="rtl"?dt(c,t.cssClasses.textDirectionRtl):dt(c,t.cssClasses.textDirectionLtr),G(c,t.cssClasses.base)}function ae(c,b){return!t.tooltips||!t.tooltips[b]?!1:G(c.firstChild,t.cssClasses.tooltip)}function we(){return a.hasAttribute("disabled")}function de(c){var b=u[c];return b.hasAttribute("disabled")}function be(c){c!=null?(u[c].setAttribute("disabled",""),u[c].handle.removeAttribute("tabindex")):(a.setAttribute("disabled",""),u.forEach(function(b){b.handle.removeAttribute("tabindex")}))}function fe(c){c!=null?(u[c].removeAttribute("disabled"),u[c].handle.setAttribute("tabindex","0")):(a.removeAttribute("disabled"),u.forEach(function(b){b.removeAttribute("disabled"),b.handle.setAttribute("tabindex","0")}))}function Ke(){M&&(xt("update"+on.tooltips),M.forEach(function(c){c&&Ml(c)}),M=null)}function pe(){Ke(),M=u.map(ae),nt("update"+on.tooltips,function(c,b,y){if(!(!M||!t.tooltips)&&M[b]!==!1){var $=c[b];t.tooltips[b]!==!0&&($=t.tooltips[b].to(y[b])),M[b].innerHTML=$}})}function ve(){xt("update"+on.aria),nt("update"+on.aria,function(c,b,y,$,U){x.forEach(function(j){var J=u[j],Q=ot(k,j,0,!0,!0,!0),Re=ot(k,j,100,!0,!0,!0),Ie=U[j],Ce=String(t.ariaFormat.to(y[j]));Q=C.fromStepping(Q).toFixed(1),Re=C.fromStepping(Re).toFixed(1),Ie=C.fromStepping(Ie).toFixed(1),J.children[0].setAttribute("aria-valuemin",Q),J.children[0].setAttribute("aria-valuemax",Re),J.children[0].setAttribute("aria-valuenow",Ie),J.children[0].setAttribute("aria-valuetext",Ce)})})}function W(c){if(c.mode===un.Range||c.mode===un.Steps)return C.xVal;if(c.mode===un.Count){if(c.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var b=c.values-1,y=100/b,$=[];b--;)$[b]=b*y;return $.push(100),ee($,c.stepped)}return c.mode===un.Positions?ee(c.values,c.stepped):c.mode===un.Values?c.stepped?c.values.map(function(U){return C.fromStepping(C.getStep(C.toStepping(U)))}):c.values:[]}function ee(c,b){return c.map(function(y){return C.fromStepping(b?C.getStep(y):y)})}function at(c){function b(Ie,Ce){return Number((Ie+Ce).toFixed(7))}var y=W(c),$={},U=C.xVal[0],j=C.xVal[C.xVal.length-1],J=!1,Q=!1,Re=0;return y=fg(y.slice().sort(function(Ie,Ce){return Ie-Ce})),y[0]!==U&&(y.unshift(U),J=!0),y[y.length-1]!==j&&(y.push(j),Q=!0),y.forEach(function(Ie,Ce){var $e,ge,He,Je=Ie,Ue=y[Ce+1],We,qt,g,K,V,ce,Ae,v=c.mode===un.Steps;for(v&&($e=C.xNumSteps[Ce]),$e||($e=Ue-Je),Ue===void 0&&(Ue=Je),$e=Math.max($e,1e-7),ge=Je;ge<=Ue;ge=b(ge,$e)){for(We=C.toStepping(ge),qt=We-Re,V=qt/(c.density||1),ce=Math.round(V),Ae=qt/ce,He=1;He<=ce;He+=1)g=Re+He*Ae,$[g.toFixed(5)]=[C.fromStepping(g),0];K=y.indexOf(ge)>-1?vt.LargeValue:v?vt.SmallValue:vt.NoValue,!Ce&&J&&ge!==Ue&&(K=0),ge===Ue&&Q||($[We.toFixed(5)]=[ge,K]),Re=We}}),$}function oe(c,b,y){var $,U,j=P.createElement("div"),J=($={},$[vt.None]="",$[vt.NoValue]=t.cssClasses.valueNormal,$[vt.LargeValue]=t.cssClasses.valueLarge,$[vt.SmallValue]=t.cssClasses.valueSub,$),Q=(U={},U[vt.None]="",U[vt.NoValue]=t.cssClasses.markerNormal,U[vt.LargeValue]=t.cssClasses.markerLarge,U[vt.SmallValue]=t.cssClasses.markerSub,U),Re=[t.cssClasses.valueHorizontal,t.cssClasses.valueVertical],Ie=[t.cssClasses.markerHorizontal,t.cssClasses.markerVertical];dt(j,t.cssClasses.pips),dt(j,t.ort===0?t.cssClasses.pipsHorizontal:t.cssClasses.pipsVertical);function Ce(ge,He){var Je=He===t.cssClasses.value,Ue=Je?Re:Ie,We=Je?J:Q;return He+" "+Ue[t.ort]+" "+We[ge]}function $e(ge,He,Je){if(Je=b?b(He,Je):Je,Je!==vt.None){var Ue=G(j,!1);Ue.className=Ce(Je,t.cssClasses.marker),Ue.style[t.style]=ge+"%",Je>vt.NoValue&&(Ue=G(j,!1),Ue.className=Ce(Je,t.cssClasses.value),Ue.setAttribute("data-value",String(He)),Ue.style[t.style]=ge+"%",Ue.innerHTML=String(y.to(He)))}}return Object.keys(c).forEach(function(ge){$e(ge,c[ge][0],c[ge][1])}),j}function le(){S&&(Ml(S),S=null)}function R(c){le();var b=at(c),y=c.filter,$=c.format||{to:function(U){return String(Math.round(U))}};return S=a.appendChild(oe(b,y,$)),S}function ne(){var c=o.getBoundingClientRect(),b="offset"+["Width","Height"][t.ort];return t.ort===0?c.width||o[b]:c.height||o[b]}function Te(c,b,y,$){var U=function(J){var Q=lt(J,$.pageOffset,$.target||b);if(!Q||we()&&!$.doNotReject||hg(a,t.cssClasses.tap)&&!$.doNotReject||c===r.start&&Q.buttons!==void 0&&Q.buttons>1||$.hover&&Q.buttons)return!1;l||Q.preventDefault(),Q.calcPoint=Q.points[t.ort],y(Q,$)},j=[];return c.split(" ").forEach(function(J){b.addEventListener(J,U,l?{passive:!0}:!1),j.push([J,U])}),j}function lt(c,b,y){var $=c.type.indexOf("touch")===0,U=c.type.indexOf("mouse")===0,j=c.type.indexOf("pointer")===0,J=0,Q=0;if(c.type.indexOf("MSPointer")===0&&(j=!0),c.type==="mousedown"&&!c.buttons&&!c.touches)return!1;if($){var Re=function($e){var ge=$e.target;return ge===y||y.contains(ge)||c.composed&&c.composedPath().shift()===y};if(c.type==="touchstart"){var Ie=Array.prototype.filter.call(c.touches,Re);if(Ie.length>1)return!1;J=Ie[0].pageX,Q=Ie[0].pageY}else{var Ce=Array.prototype.find.call(c.changedTouches,Re);if(!Ce)return!1;J=Ce.pageX,Q=Ce.pageY}}return b=b||Rs(P),(U||j)&&(J=c.clientX+b.x,Q=c.clientY+b.y),c.pageOffset=b,c.points=[J,Q],c.cursor=U||j,c}function Mt(c){var b=c-gg(o,t.ort),y=b*100/ne();return y=$l(y),t.dir?100-y:y}function Vt(c){var b=100,y=!1;return u.forEach(function($,U){if(!de(U)){var j=k[U],J=Math.abs(j-c),Q=J===100&&b===100,Re=J<b,Ie=J<=b&&c>j;(Re||Ie||Q)&&(y=U,b=J)}}),y}function Et(c,b){c.type==="mouseout"&&c.target.nodeName==="HTML"&&c.relatedTarget===null&&Pt(c,b)}function Lt(c,b){if(navigator.appVersion.indexOf("MSIE 9")===-1&&c.buttons===0&&b.buttonsProperty!==0)return Pt(c,b);var y=(t.dir?-1:1)*(c.calcPoint-b.startCalcPoint),$=y*100/b.baseSize;ut(y>0,$,b.locations,b.handleNumbers,b.connect)}function Pt(c,b){b.handle&&(Br(b.handle,t.cssClasses.active),O-=1),b.listeners.forEach(function(y){H.removeEventListener(y[0],y[1])}),O===0&&(Br(a,t.cssClasses.drag),ln(),c.cursor&&(I.style.cursor="",I.removeEventListener("selectstart",Dl))),t.events.smoothSteps&&(b.handleNumbers.forEach(function(y){ct(y,k[y],!0,!0,!1,!1)}),b.handleNumbers.forEach(function(y){Be("update",y)})),b.handleNumbers.forEach(function(y){Be("change",y),Be("set",y),Be("end",y)})}function et(c,b){if(!b.handleNumbers.some(de)){var y;if(b.handleNumbers.length===1){var $=u[b.handleNumbers[0]];y=$.children[0],O+=1,dt(y,t.cssClasses.active)}c.stopPropagation();var U=[],j=Te(r.move,H,Lt,{target:c.target,handle:y,connect:b.connect,listeners:U,startCalcPoint:c.calcPoint,baseSize:ne(),pageOffset:c.pageOffset,handleNumbers:b.handleNumbers,buttonsProperty:c.buttons,locations:k.slice()}),J=Te(r.end,H,Pt,{target:c.target,handle:y,listeners:U,doNotReject:!0,handleNumbers:b.handleNumbers}),Q=Te("mouseout",H,Et,{target:c.target,handle:y,listeners:U,doNotReject:!0,handleNumbers:b.handleNumbers});U.push.apply(U,j.concat(J,Q)),c.cursor&&(I.style.cursor=getComputedStyle(c.target).cursor,u.length>1&&dt(a,t.cssClasses.drag),I.addEventListener("selectstart",Dl,!1)),b.handleNumbers.forEach(function(Re){Be("start",Re)})}}function _t(c){c.stopPropagation();var b=Mt(c.calcPoint),y=Vt(b);y!==!1&&(t.events.snap||Ol(a,t.cssClasses.tap,t.animationDuration),ct(y,b,!0,!0),ln(),Be("slide",y,!0),Be("update",y,!0),t.events.snap?et(c,{handleNumbers:[y]}):(Be("change",y,!0),Be("set",y,!0)))}function yt(c){var b=Mt(c.calcPoint),y=C.getStep(b),$=C.fromStepping(y);Object.keys(D).forEach(function(U){U.split(".")[0]==="hover"&&D[U].forEach(function(j){j.call(Pe,$)})})}function Ge(c,b){if(we()||de(b))return!1;var y=["Left","Right"],$=["Down","Up"],U=["PageDown","PageUp"],j=["Home","End"];t.dir&&!t.ort?y.reverse():t.ort&&!t.dir&&($.reverse(),U.reverse());var J=c.key.replace("Arrow",""),Q=J===U[0],Re=J===U[1],Ie=J===$[0]||J===y[0]||Q,Ce=J===$[1]||J===y[1]||Re,$e=J===j[0],ge=J===j[1];if(!Ie&&!Ce&&!$e&&!ge)return!0;c.preventDefault();var He;if(Ce||Ie){var Je=Ie?0:1,Ue=On(b),We=Ue[Je];if(We===null)return!1;We===!1&&(We=C.getDefaultStep(k[b],Ie,t.keyboardDefaultStep)),Re||Q?We*=t.keyboardPageMultiplier:We*=t.keyboardMultiplier,We=Math.max(We,1e-7),We=(Ie?-1:1)*We,He=E[b]+We}else ge?He=t.spectrum.xVal[t.spectrum.xVal.length-1]:He=t.spectrum.xVal[0];return ct(b,C.toStepping(He),!0,!0),Be("slide",b),Be("update",b),Be("change",b),Be("set",b),!1}function tt(c){c.fixed||u.forEach(function(b,y){Te(r.start,b.children[0],et,{handleNumbers:[y]})}),c.tap&&Te(r.start,o,_t,{}),c.hover&&Te(r.move,o,yt,{hover:!0}),c.drag&&f.forEach(function(b,y){if(!(b===!1||y===0||y===f.length-1)){var $=u[y-1],U=u[y],j=[b],J=[$,U],Q=[y-1,y];dt(b,t.cssClasses.draggable),c.fixed&&(j.push($.children[0]),j.push(U.children[0])),c.dragAll&&(J=u,Q=x),j.forEach(function(Re){Te(r.start,Re,et,{handles:J,handleNumbers:Q,connect:b})})}})}function nt(c,b){D[c]=D[c]||[],D[c].push(b),c.split(".")[0]==="update"&&u.forEach(function(y,$){Be("update",$)})}function kt(c){return c===on.aria||c===on.tooltips}function xt(c){var b=c&&c.split(".")[0],y=b?c.substring(b.length):c;Object.keys(D).forEach(function($){var U=$.split(".")[0],j=$.substring(U.length);(!b||b===U)&&(!y||y===j)&&(!kt(j)||y===j)&&delete D[$]})}function Be(c,b,y){Object.keys(D).forEach(function($){var U=$.split(".")[0];c===U&&D[$].forEach(function(j){j.call(Pe,E.map(t.format.to),b,E.slice(),y||!1,k.slice(),Pe)})})}function ot(c,b,y,$,U,j,J){var Q;return u.length>1&&!t.events.unconstrained&&($&&b>0&&(Q=C.getAbsoluteDistance(c[b-1],t.margin,!1),y=Math.max(y,Q)),U&&b<u.length-1&&(Q=C.getAbsoluteDistance(c[b+1],t.margin,!0),y=Math.min(y,Q))),u.length>1&&t.limit&&($&&b>0&&(Q=C.getAbsoluteDistance(c[b-1],t.limit,!1),y=Math.min(y,Q)),U&&b<u.length-1&&(Q=C.getAbsoluteDistance(c[b+1],t.limit,!0),y=Math.max(y,Q))),t.padding&&(b===0&&(Q=C.getAbsoluteDistance(0,t.padding[0],!1),y=Math.max(y,Q)),b===u.length-1&&(Q=C.getAbsoluteDistance(100,t.padding[1],!0),y=Math.min(y,Q))),J||(y=C.getStep(y)),y=$l(y),y===c[b]&&!j?!1:y}function qe(c,b){var y=t.ort;return(y?b:c)+", "+(y?c:b)}function ut(c,b,y,$,U){var j=y.slice(),J=$[0],Q=t.events.smoothSteps,Re=[!c,c],Ie=[c,!c];$=$.slice(),c&&$.reverse(),$.length>1?$.forEach(function($e,ge){var He=ot(j,$e,j[$e]+b,Re[ge],Ie[ge],!1,Q);He===!1?b=0:(b=He-j[$e],j[$e]=He)}):Re=Ie=[!0];var Ce=!1;$.forEach(function($e,ge){Ce=ct($e,y[$e]+b,Re[ge],Ie[ge],!1,Q)||Ce}),Ce&&($.forEach(function($e){Be("update",$e),Be("slide",$e)}),U!=null&&Be("drag",J))}function Ct(c,b){return t.dir?100-c-b:c}function Dt(c,b){k[c]=b,E[c]=C.fromStepping(b);var y=Ct(b,0)-te,$="translate("+qe(y+"%","0")+")";if(u[c].style[t.transformRule]=$,t.events.invertConnects&&k.length>1){var U=k.every(function(j,J,Q){return J===0||j>=Q[J-1]});if(L!==!U){Qt();return}}Ot(c),Ot(c+1),L&&(Ot(c-1),Ot(c+2))}function ln(){x.forEach(function(c){var b=k[c]>50?-1:1,y=3+(u.length+b*c);u[c].style.zIndex=String(y)})}function ct(c,b,y,$,U,j){return U||(b=ot(k,c,b,y,$,!1,j)),b===!1?!1:(Dt(c,b),!0)}function Ot(c){if(f[c]){var b=k.slice();L&&b.sort(function(Q,Re){return Q-Re});var y=0,$=100;c!==0&&(y=b[c-1]),c!==f.length-1&&($=b[c]);var U=$-y,j="translate("+qe(Ct(y,U)+"%","0")+")",J="scale("+qe(U/100,"1")+")";f[c].style[t.transformRule]=j+" "+J}}function Zt(c,b){return c===null||c===!1||c===void 0||(typeof c=="number"&&(c=String(c)),c=t.format.from(c),c!==!1&&(c=C.toStepping(c)),c===!1||isNaN(c))?k[b]:c}function Nt(c,b,y){var $=Yr(c),U=k[0]===void 0;b=b===void 0?!0:b,t.animate&&!U&&Ol(a,t.cssClasses.tap,t.animationDuration),x.forEach(function(Q){ct(Q,Zt($[Q],Q),!0,!1,y)});var j=x.length===1?0:1;if(U&&C.hasNoSize()&&(y=!0,k[0]=0,x.length>1)){var J=100/(x.length-1);x.forEach(function(Q){k[Q]=Q*J})}for(;j<x.length;++j)x.forEach(function(Q){ct(Q,k[Q],!0,!0,y)});ln(),x.forEach(function(Q){Be("update",Q),$[Q]!==null&&b&&Be("set",Q)})}function St(c){Nt(t.start,c)}function pt(c,b,y,$){if(c=Number(c),!(c>=0&&c<x.length))throw new Error("noUiSlider: invalid handle number, got: "+c);ct(c,Zt(b,c),!0,!0,$),Be("update",c),y&&Be("set",c)}function At(c){if(c===void 0&&(c=!1),c)return E.length===1?E[0]:E.slice(0);var b=E.map(t.format.to);return b.length===1?b[0]:b}function bn(){for(xt(on.aria),xt(on.tooltips),Object.keys(t.cssClasses).forEach(function(c){Br(a,t.cssClasses[c])});a.firstChild;)a.removeChild(a.firstChild);delete a.noUiSlider}function On(c){var b=k[c],y=C.getNearbySteps(b),$=E[c],U=y.thisStep.step,j=null;if(t.snap)return[$-y.stepBefore.startValue||null,y.stepAfter.startValue-$||null];U!==!1&&$+U>y.stepAfter.startValue&&(U=y.stepAfter.startValue-$),$>y.thisStep.startValue?j=y.thisStep.step:y.stepBefore.step===!1?j=!1:j=$-y.stepBefore.highestStep,b===100?U=null:b===0&&(j=null);var J=C.countStepDecimals();return U!==null&&U!==!1&&(U=Number(U.toFixed(J))),j!==null&&j!==!1&&(j=Number(j.toFixed(J))),[j,U]}function Tt(){return x.map(On)}function Rt(c,b){var y=At(),$=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];$.forEach(function(j){c[j]!==void 0&&(n[j]=c[j])});var U=Os(n);$.forEach(function(j){c[j]!==void 0&&(t[j]=U[j])}),C=U.spectrum,t.margin=U.margin,t.limit=U.limit,t.padding=U.padding,t.pips?R(t.pips):le(),t.tooltips?pe():Ke(),k=[],Nt(Fi(c.start)?c.start:y,b),c.connect&&wn()}function wn(){for(;s.firstChild;)s.removeChild(s.firstChild);for(var c=0;c<=t.handles;c++)f[c]=re(s,t.connect[c]),Ot(c);tt({drag:t.events.drag,fixed:!0})}function Qt(){L=!L,Ms(t,t.connect.map(function(c){return!c})),wn()}function Qn(){o=_(a),Z(t.connect,o),tt(t.events),Nt(t.start),t.pips&&R(t.pips),t.tooltips&&pe(),ve()}Qn();var Pe={destroy:bn,steps:Tt,on:nt,off:xt,get:At,set:Nt,setHandle:pt,reset:St,disable:be,enable:fe,__moveHandles:function(c,b,y){ut(c,b,k,y)},options:n,updateOptions:Rt,target:a,removePips:le,removeTooltips:Ke,getPositions:function(){return k.slice()},getTooltips:function(){return M},getOrigins:function(){return u},pips:R};return Pe}function Gg(e,t){if(!e||!e.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var n=Os(t),r=Kg(e,n,t);return e.noUiSlider=r,r}var Jg={__spectrum:Is,cssClasses:Bs,create:Gg};function zl(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;const n=t.slice().sort();return e.length===t.length&&e.slice().sort().every(function(r,i){return r===n[i]})}function Yg(e,t,n){const{orientation:r,direction:i,tooltips:l,step:a,min:o,max:s,merge:u,id:f,disabled:S,options:M,classes:C,format:E,lazy:k,ariaLabelledby:x,aria:O}=Ze(e),D=n.value,L=n.initialValue,P=n.tooltipsFormat,H=n.tooltipsMerge,I=n.tooltipFormat,te=n.classList,G=rt(null),z=rt(null),re=rt(!1),Z=Le(()=>{let W={cssPrefix:"",cssClasses:te.value,orientation:r.value,direction:i.value,tooltips:l.value?P.value:!1,connect:"lower",start:Ir(D.value)?o.value:D.value,range:{min:o.value,max:s.value}};if(a.value>0&&(W.step=a.value),Array.isArray(D.value)&&(W.connect=!0),x&&x.value||O&&Object.keys(O.value).length){let ee=Array.isArray(D.value)?D.value:[D.value];W.handleAttributes=ee.map(at=>Object.assign({},O.value,x&&x.value?{"aria-labelledby":x.value}:{}))}return E.value&&(W.ariaFormat=I.value),W}),_=Le(()=>{let W={id:f&&f.value?f.value:void 0};return S.value&&(W.disabled=!0),W}),ae=Le(()=>Array.isArray(D.value)),we=()=>{fe(L.value)},de=()=>{let W=z.value.get();return Array.isArray(W)?W.map(ee=>parseFloat(ee)):parseFloat(W)},be=(W,ee=!0)=>{z.value.set(W,ee)},fe=W=>{t.emit("input",W),t.emit("update:modelValue",W),t.emit("update",W)},Ke=()=>{z.value=Jg.create(G.value,Object.assign({},Z.value,M.value)),l.value&&ae.value&&u.value>=0&&H(G.value,u.value," - "),z.value.on("set",()=>{const W=de();t.emit("change",W),t.emit("set",W),k.value&&fe(W)}),z.value.on("update",()=>{if(!re.value)return;const W=de();if(ae.value&&zl(D.value,W)||!ae.value&&D.value==W){t.emit("update",W);return}k.value||fe(W)}),z.value.on("start",()=>{t.emit("start",de())}),z.value.on("end",()=>{t.emit("end",de())}),z.value.on("slide",()=>{t.emit("slide",de())}),z.value.on("drag",()=>{t.emit("drag",de())}),G.value.querySelectorAll("[data-handle]").forEach(W=>{W.onblur=()=>{G.value&&te.value.focused.split(" ").forEach(ee=>{G.value.classList.remove(ee)})},W.onfocus=()=>{te.value.focused.split(" ").forEach(ee=>{G.value.classList.add(ee)})}}),re.value=!0},pe=()=>{z.value.off(),z.value.destroy(),z.value=null},ve=(W,ee)=>{re.value=!1,pe(),Ke()};return Vr(Ke),Xd(pe),je(ae,ve,{immediate:!1}),je(o,ve,{immediate:!1}),je(s,ve,{immediate:!1}),je(a,ve,{immediate:!1}),je(r,ve,{immediate:!1}),je(i,ve,{immediate:!1}),je(l,ve,{immediate:!1}),je(u,ve,{immediate:!1}),je(E,ve,{immediate:!1,deep:!0}),je(M,ve,{immediate:!1,deep:!0}),je(C,ve,{immediate:!1,deep:!0}),je(D,(W,ee)=>{ee&&(typeof ee=="object"&&typeof W=="object"&&W&&Object.keys(ee)>Object.keys(W)||typeof ee=="object"&&typeof W!="object"||Ir(W))&&ve()},{immediate:!1}),je(D,W=>{if(Ir(W)){be(o.value,!1);return}let ee=de();ae.value&&!Array.isArray(ee)&&(ee=[ee]),(ae.value&&!zl(W,ee)||!ae.value&&W!=ee)&&be(W,!1)},{deep:!0}),{slider:G,slider$:z,isRange:ae,sliderProps:_,init:Ke,destroy:pe,refresh:ve,update:be,reset:we}}const Xg={value:{validator:function(e){return t=>typeof t=="number"||t instanceof Array||t===null||t===void 0||t===!1},required:!1},modelValue:{validator:function(e){return t=>typeof t=="number"||t instanceof Array||t===null||t===void 0||t===!1},required:!1}};var Qa={name:"Slider",emits:["input","update:modelValue","start","slide","drag","update","change","set","end"],props:{...Xg,id:{type:[String,Number],required:!1},disabled:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},orientation:{type:String,required:!1,default:"horizontal"},direction:{type:String,required:!1,default:"ltr"},tooltips:{type:Boolean,required:!1,default:!0},options:{type:Object,required:!1,default:()=>({})},merge:{type:Number,required:!1,default:-1},format:{type:[Object,Function,Boolean],required:!1,default:null},classes:{type:Object,required:!1,default:()=>({})},showTooltip:{type:String,required:!1,default:"always"},tooltipPosition:{type:String,required:!1,default:null},lazy:{type:Boolean,required:!1,default:!0},ariaLabelledby:{type:String,required:!1,default:void 0},aria:{required:!1,type:Object,default:()=>({})}},setup(e,t){const n=dg(e),r=ug(e),i=cg(e,t,{value:n.value,classList:r.classList}),l=Yg(e,t,{value:n.value,initialValue:n.initialValue,tooltipFormat:i.tooltipFormat,tooltipsFormat:i.tooltipsFormat,tooltipsMerge:i.tooltipsMerge,classList:r.classList});return{...r,...i,...l}}};function Zg(e,t,n,r,i,l){return d(),h("div",q(e.sliderProps,{ref:"slider"}),null,16)}Qa.render=Zg;Qa.__file="node_modules/@vueform/slider/src/Slider.vue";var qa={};function em(e,t,n,r,i,l){const a=se("Slider");return d(),A(F(e.elementLayout),{ref:"container"},Oe({element:N(()=>[w("div",{class:p(e.classes.wrapper)},[m(" @vueform/slider component "),xe(a,q({value:e.value,modelValue:e.value},e.fieldOptions,{aria:e.aria,classes:e.classes.slider,id:e.fieldId,ref:"input",onUpdate:e.handleUpdate,onChange:e.handleChange}),null,16,["value","modelValue","aria","classes","id","onUpdate","onChange"])],2)]),_:2},[ie(e.elementSlots,(o,s)=>({name:s,fn:N(()=>[T(e.$slots,s,{el$:e.el$},()=>[(d(),A(F(o),{el$:e.el$},null,8,["el$"]))])])}))]),1536)}qa.render=em;qa.__file="themes/blank/templates/elements/SliderElement.vue";var $s={name:"SliderElement",render:qa.render,components:{Slider:Qa},data(){return{merge:!0,defaultClasses:{container:"",wrapper:"vf-slider-wrapper",wrapper_sm:"vf-slider-wrapper-sm",wrapper_md:"",wrapper_lg:"vf-slider-wrapper-lg",slider:{target:"vf-slider-target",target_sm:"vf-slider-target-sm",target_md:"vf-slider-target-md",target_lg:"vf-slider-target-lg",focused:"vf-slider-focused",tooltipFocus:"vf-slider-tooltip-focus",tooltipDrag:"vf-slider-tooltip-drag",ltr:"vf-slider-ltr",rtl:"vf-slider-rtl",horizontal:"vf-slider-horizontal",horizontal_sm:"vf-slider-horizontal-sm",horizontal_md:"vf-slider-horizontal-md",horizontal_lg:"vf-slider-horizontal-lg",vertical:"vf-slider-vertical",vertical_sm:"vf-slider-vertical-sm",vertical_md:"vf-slider-vertical-md",vertical_lg:"vf-slider-vertical-lg",textDirectionRtl:"vf-slider-txt-dir-rtl",textDirectionLtr:"vf-slider-txt-dir-ltr",base:"vf-slider-base",base_sm:"vf-slider-base-sm",base_md:"vf-slider-base-md",base_lg:"vf-slider-base-lg",connects:"vf-slider-connects",connects_sm:"vf-slider-connects-sm",connects_md:"vf-slider-connects-md",connects_lg:"vf-slider-connects-lg",connect:"vf-slider-connect",connect_sm:"vf-slider-connect-sm",connect_md:"vf-slider-connect-md",connect_lg:"vf-slider-connect-lg",origin:"vf-slider-origin",handle:"vf-slider-handle",handle_sm:"vf-slider-handle-sm",handle_md:"vf-slider-handle-md",handle_lg:"vf-slider-handle-lg",handleUpper:"vf-handle-upper",handleLower:"vf-handle-lower",touchArea:"vf-slider-touch-area",tooltip:"vf-slider-tooltip",tooltip_sm:"vf-slider-tooltip-sm",tooltip_md:"vf-slider-tooltip-md",tooltip_lg:"vf-slider-tooltip-lg",tooltipTop:"vf-slider-tooltip-top",tooltipTop_sm:"vf-slider-tooltip-top-sm",tooltipTop_md:"vf-slider-tooltip-top-md",tooltipTop_lg:"vf-slider-tooltip-top-lg",tooltipBottom:"vf-slider-tooltip-bottom",tooltipBottom_sm:"vf-slider-tooltip-bottom-sm",tooltipBottom_md:"vf-slider-tooltip-bottom-md",tooltipBottom_lg:"vf-slider-tooltip-bottom-lg",tooltipLeft:"vf-slider-tooltip-left",tooltipLeft_sm:"vf-slider-tooltip-left-sm",tooltipLeft_md:"vf-slider-tooltip-left-md",tooltipLeft_lg:"vf-slider-tooltip-left-lg",tooltipRight:"vf-slider-tooltip-right",tooltipRight_sm:"vf-slider-tooltip-right-sm",tooltipRight_md:"vf-slider-tooltip-right-md",tooltipRight_lg:"vf-slider-tooltip-right-lg",tooltipHidden:"vf-slider-tooltip-hidden",active:"vf-slider-active",draggable:"vf-slider-draggable",tap:"vf-slider-state-tap",drag:"vf-slider-state-drag",$slider:(e,{Size:t})=>[e.slider.slider,e.slider[`slider_${t}`]],$horizontal:(e,{Size:t})=>[e.slider.horizontal,e.slider[`horizontal_${t}`]],$vertical:(e,{Size:t})=>[e.slider.vertical,e.slider[`vertical_${t}`]],$base:(e,{Size:t})=>[e.slider.base,e.slider[`base_${t}`]],$connects:(e,{Size:t})=>[e.slider.connects,e.slider[`connects_${t}`]],$connect:(e,{Size:t})=>[e.slider.connect,e.slider[`connect_${t}`]],$handle:(e,{Size:t})=>[e.slider.handle,e.slider[`handle_${t}`]],$tooltip:(e,{Size:t})=>[e.slider.tooltip,e.slider[`tooltip_${t}`]],$tooltipTop:(e,{Size:t})=>[e.slider.tooltipTop,e.slider[`tooltipTop_${t}`]],$tooltipBottom:(e,{Size:t})=>[e.slider.tooltipBottom,e.slider[`tooltipBottom_${t}`]],$tooltipLeft:(e,{Size:t})=>[e.slider.tooltipLeft,e.slider[`tooltipLeft_${t}`]],$tooltipRight:(e,{Size:t})=>[e.slider.tooltipRight,e.slider[`tooltipRight_${t}`]]},$wrapper:(e,{Size:t})=>[e.wrapper,e[`wrapper_${t}`]]}}}},tm=`.vf-slider-wrapper {
2944
2944
  margin-top: calc((var(--vf-min-height-input) - var(--vf-slider-height)) / 2);
2945
2945
  }
2946
2946
 
@@ -4237,7 +4237,7 @@ body[dir=rtl] .vf-toggle-text.vf-toggle-text-left.vf-toggle-text-lg {
4237
4237
  .vf-dnd-title {
4238
4238
  font-weight: 600;
4239
4239
  margin-top: 0.75rem;
4240
- }`;Y(Zm);Ys.__file="themes/vueform/templates/elements/partials/DragAndDrop.vue";var nl={};const eh=["aria-labelledby","aria-placeholder","aria-describedby"],th=["id"],nh=["href"];function rh(e,t,n,r,i,l){return ye((d(),h("div",q({class:e.classes.container},e.attrs,{tabindex:"0",role:"button","aria-labelledby":e.ariaLabelledby,"aria-placeholder":e.ariaPlaceholder,"aria-describedby":`${e.el$.fieldId}-file-description`,onKeyup:t[3]||(t[3]=(...a)=>e.handleKeyup&&e.handleKeyup(...a))}),[w("span",{id:`${e.el$.fieldId}-file-description`,class:p(e.classes.assistiveText),"aria-hidden":""},Se(e.form$.translations.vueform.a11y.file.description),11,th),w("div",{class:p(e.classes.wrapper)},[w("div",{class:p(e.classes.file)},[m(" Filename "),e.hasLink&&e.clickable?(d(),h("a",{key:0,href:e.link,class:p(e.classes.filenameLink),target:"_blank",rel:"nofollow noopener"},Se(e.filename),11,nh)):(d(),h("span",{key:1,class:p(e.classes.filenameStatic)},Se(e.filename),3))],2),w("div",{class:p(e.classes.actions)},[m(" Remove "),e.canRemove?(d(),h("div",{key:0,class:p(e.classes.remove),onClick:t[0]||(t[0]=he((...a)=>e.remove&&e.remove(...a),["prevent"])),onKeypress:t[1]||(t[1]=ze((...a)=>e.remove&&e.remove(...a),["enter","space"])),"aria-roledescription":"❎",role:"button",tabindex:"0"},[w("span",{class:p(e.classes.removeIcon)},null,2)],34)):m("v-if",!0),m(" Progress "),e.uploading?(d(),h("div",{key:1,class:p(e.classes.percent)},Se(e.progress)+"%",3)):m("v-if",!0),m(" Error "),e.hasError?(d(),h("span",{key:2,class:p(e.classes.warning)},[w("span",{class:p(e.classes.warningIcon)},null,2)],2)):m("v-if",!0),m(" Upload button "),e.canUploadTemp?(d(),h("div",{key:3,class:p(e.classes.upload),onClick:t[2]||(t[2]=he((...a)=>e.upload&&e.upload(...a),["prevent"])),tabindex:"-1"},Se(e.uploadText),3)):e.el$.stage>1?(d(),h(X,{key:4},[m(" Success "),w("span",{class:p(e.classes.uploaded)},[w("span",{class:p(e.classes.uploadedIcon)},null,2)],2)],2112)):m("v-if",!0)],2)],2),e.uploading?(d(),h("div",{key:0,class:p(e.classes.progressBar)},[w("div",{class:p(e.classes.progress),style:Gt({width:e.progress+"%"})},null,6)],2)):m("v-if",!0)],16,eh)),[[Fe,e.visible]])}nl.render=rh;nl.__file="themes/blank/templates/elements/partials/FilePreview.vue";var Xs={name:"FilePreview",render:nl.render,data(){return{merge:!0,defaultClasses:{container:"vf-file-preview",container_sm:"vf-file-preview-sm",container_md:"",container_lg:"vf-file-preview-lg",wrapper:"vf-file-preview-wrapper",file:"vf-file-preview-file",filenameLink:"vf-file-preview-filename-link",filenameStatic:"vf-file-preview-filename",actions:"vf-file-preview-actions",percent:"vf-file-preview-percent",upload:"vf-file-preview-upload",progressBar:"vf-file-preview-progress-bar",progress:"vf-file-preview-progress",warning:"vf-file-preview-warning",warningIcon:"vf-file-preview-warning-icon",uploaded:"vf-file-preview-uploaded",uploadedIcon:"vf-file-preview-uploaded-icon",remove:"vf-file-preview-remove",removeIcon:"vf-file-preview-remove-icon",assistiveText:"vf-assistive-text",$container:(e,{Size:t})=>[e.container,e[`container_${t}`]]}}}},ih=`.vf-file-preview {
4240
+ }`;Y(Zm);Ys.__file="themes/vueform/templates/elements/partials/DragAndDrop.vue";var nl={};const eh=["aria-labelledby","aria-placeholder","aria-describedby"],th=["id"],nh=["href","title"],rh=["title"];function ih(e,t,n,r,i,l){return ye((d(),h("div",q({class:e.classes.container},e.attrs,{tabindex:"0",role:"button","aria-labelledby":e.ariaLabelledby,"aria-placeholder":e.ariaPlaceholder,"aria-describedby":`${e.el$.fieldId}-file-description`,onKeyup:t[3]||(t[3]=(...a)=>e.handleKeyup&&e.handleKeyup(...a))}),[w("span",{id:`${e.el$.fieldId}-file-description`,class:p(e.classes.assistiveText),"aria-hidden":""},Se(e.form$.translations.vueform.a11y.file.description),11,th),w("div",{class:p(e.classes.wrapper)},[w("div",{class:p(e.classes.file)},[m(" Filename "),e.hasLink&&e.clickable?(d(),h("a",{key:0,href:e.link,class:p(e.classes.filenameLink),title:e.filename,target:"_blank",rel:"nofollow noopener"},Se(e.filename),11,nh)):(d(),h("span",{key:1,class:p(e.classes.filenameStatic),title:e.filename},Se(e.filename),11,rh))],2),w("div",{class:p(e.classes.actions)},[m(" Remove "),e.canRemove?(d(),h("div",{key:0,class:p(e.classes.remove),onClick:t[0]||(t[0]=he((...a)=>e.remove&&e.remove(...a),["prevent"])),onKeypress:t[1]||(t[1]=ze((...a)=>e.remove&&e.remove(...a),["enter","space"])),"aria-roledescription":"❎",role:"button",tabindex:"0"},[w("span",{class:p(e.classes.removeIcon)},null,2)],34)):m("v-if",!0),m(" Progress "),e.uploading?(d(),h("div",{key:1,class:p(e.classes.percent)},Se(e.progress)+"%",3)):m("v-if",!0),m(" Error "),e.hasError?(d(),h("span",{key:2,class:p(e.classes.warning)},[w("span",{class:p(e.classes.warningIcon)},null,2)],2)):m("v-if",!0),m(" Upload button "),e.canUploadTemp?(d(),h("div",{key:3,class:p(e.classes.upload),onClick:t[2]||(t[2]=he((...a)=>e.upload&&e.upload(...a),["prevent"])),tabindex:"-1"},Se(e.uploadText),3)):e.el$.stage>1?(d(),h(X,{key:4},[m(" Success "),w("span",{class:p(e.classes.uploaded)},[w("span",{class:p(e.classes.uploadedIcon)},null,2)],2)],2112)):m("v-if",!0)],2)],2),e.uploading?(d(),h("div",{key:0,class:p(e.classes.progressBar)},[w("div",{class:p(e.classes.progress),style:Gt({width:e.progress+"%"})},null,6)],2)):m("v-if",!0)],16,eh)),[[Fe,e.visible]])}nl.render=ih;nl.__file="themes/blank/templates/elements/partials/FilePreview.vue";var Xs={name:"FilePreview",render:nl.render,data(){return{merge:!0,defaultClasses:{container:"vf-file-preview",container_sm:"vf-file-preview-sm",container_md:"",container_lg:"vf-file-preview-lg",wrapper:"vf-file-preview-wrapper",file:"vf-file-preview-file",filenameLink:"vf-file-preview-filename-link",filenameStatic:"vf-file-preview-filename",actions:"vf-file-preview-actions",percent:"vf-file-preview-percent",upload:"vf-file-preview-upload",progressBar:"vf-file-preview-progress-bar",progress:"vf-file-preview-progress",warning:"vf-file-preview-warning",warningIcon:"vf-file-preview-warning-icon",uploaded:"vf-file-preview-uploaded",uploadedIcon:"vf-file-preview-uploaded-icon",remove:"vf-file-preview-remove",removeIcon:"vf-file-preview-remove-icon",assistiveText:"vf-assistive-text",$container:(e,{Size:t})=>[e.container,e[`container_${t}`]]}}}},ah=`.vf-file-preview {
4241
4241
  font-family: inherit;
4242
4242
  font-size: inherit;
4243
4243
  line-height: inherit;
@@ -4278,11 +4278,19 @@ body[dir=rtl] .vf-toggle-text.vf-toggle-text-left.vf-toggle-text-lg {
4278
4278
  .vf-file-preview-file {
4279
4279
  display: flex;
4280
4280
  align-items: center;
4281
+ overflow: hidden;
4282
+ }
4283
+
4284
+ .vf-file-preview-filename {
4285
+ overflow: hidden;
4286
+ text-overflow: ellipsis;
4281
4287
  }
4282
4288
 
4283
4289
  .vf-file-preview-filename-link {
4284
4290
  text-decoration: none;
4285
4291
  color: inherit;
4292
+ overflow: hidden;
4293
+ text-overflow: ellipsis;
4286
4294
  }
4287
4295
 
4288
4296
  .vf-file-preview-filename-link:hover, .vf-file-preview-filename-link:focus, .vf-file-preview-filename-link:active {
@@ -4411,7 +4419,7 @@ body[dir=rtl] .vf-toggle-text.vf-toggle-text-left.vf-toggle-text-lg {
4411
4419
 
4412
4420
  .vf-file-removing .vf-file-preview {
4413
4421
  opacity: 0.6;
4414
- }`;Y(ih);Xs.__file="themes/vueform/templates/elements/partials/FilePreview.vue";var rl={};const ah=["aria-labelledby","aria-placeholder","aria-describedby"],lh=["id"],oh=["href"],sh=["src","alt","title"],dh=["src","alt","title"],uh=["href"];function ch(e,t,n,r,i,l){return ye((d(),h("div",q({class:e.classes.container,tabindex:"0",role:"button"},e.attrs,{"aria-labelledby":e.ariaLabelledby,"aria-placeholder":e.ariaPlaceholder,"aria-describedby":`${e.el$.fieldId}-file-description`,onKeyup:t[4]||(t[4]=(...a)=>e.handleKeyup&&e.handleKeyup(...a))}),[w("span",{id:`${e.el$.fieldId}-file-description`,class:p(e.classes.assistiveText),"aria-hidden":""},Se(e.form$.translations.vueform.a11y.file.description),11,lh),w("div",{class:p(e.classes.wrapper)},[m(" Image "),e.uploaded&&e.hasLink&&e.clickable?(d(),h("a",{key:0,href:e.link,class:p(e.classes.image),target:"_blank",rel:"nofollow noopener"},[w("img",{class:p(e.classes.img),src:e.preview,alt:e.filename,title:e.filename,"aria-hidden":"true"},null,10,sh)],10,oh)):(d(),h("span",{key:1,class:p(e.classes.image)},[w("img",{class:p(e.classes.img),src:e.preview,alt:e.filename,title:e.filename,"aria-hidden":"true"},null,10,dh)],2)),w("div",{class:p(e.classes.file)},[m(" Filename "),e.hasLink&&e.clickable?(d(),h("a",{key:0,href:e.link,class:p(e.classes.filenameLink),target:"_blank",rel:"nofollow noopener"},Se(e.filename),11,uh)):(d(),h("span",{key:1,class:p(e.classes.filenameStatic)},Se(e.filename),3))],2),w("div",{class:p(e.classes.actions)},[m(" Remove "),e.canRemove?(d(),h("div",{key:0,class:p(e.classes.remove),onClick:t[0]||(t[0]=he((...a)=>e.remove&&e.remove(...a),["prevent"])),onKeypress:t[1]||(t[1]=ze((...a)=>e.remove&&e.remove(...a),["enter","space"])),"aria-roledescription":"❎",role:"button",tabindex:"0"},[w("span",{class:p(e.classes.removeIcon)},null,2)],34)):m("v-if",!0),m(" Progress "),e.uploading?(d(),h("div",{key:1,class:p(e.classes.percent)},Se(e.progress)+"%",3)):m("v-if",!0),m(" Error "),e.hasError?(d(),h("span",{key:2,class:p(e.classes.warning)},[w("span",{class:p(e.classes.warningIcon)},null,2)],2)):m("v-if",!0),m(" Upload button "),e.canUploadTemp?(d(),h("div",{key:3,class:p(e.classes.upload),onClick:t[2]||(t[2]=he((...a)=>e.upload&&e.upload(...a),["prevent"])),onKeypress:t[3]||(t[3]=ze((...a)=>e.upload&&e.upload(...a),["enter","space"])),tabindex:"-1",role:"button"},Se(e.uploadText),35)):e.el$.stage>1?(d(),h(X,{key:4},[m(" Success "),w("span",{class:p(e.classes.uploaded)},[w("span",{class:p(e.classes.uploadedIcon)},null,2)],2)],2112)):m("v-if",!0)],2)],2),e.uploading?(d(),h("div",{key:0,class:p(e.classes.progressBar)},[w("div",{class:p(e.classes.progress),style:Gt({width:e.progress+"%"})},null,6)],2)):m("v-if",!0)],16,ah)),[[Fe,e.visible]])}rl.render=ch;rl.__file="themes/blank/templates/elements/partials/FilePreview_image.vue";var Zs={name:"ImagePreview",render:rl.render,data(){return{merge:!0,defaultClasses:{container:"vf-file-preview-image",wrapper:"vf-file-preview-image-wrapper",image:"vf-file-preview-image-image",image_link:"",image_static:"",image_sm:"vf-file-preview-image-image-sm",image_md:"",image_lg:"vf-file-preview-image-image-lg",img:"vf-file-preview-image-img",img_sm:"vf-file-preview-image-img-sm",img_md:"",img_lg:"vf-file-preview-image-img-lg",file:"vf-file-preview-image-file",filenameLink:"vf-file-preview-image-filename-link",filenameStatic:"vf-file-preview-image-filename",actions:"vf-file-preview-image-actions",percent:"vf-file-preview-image-percent",upload:"vf-file-preview-image-upload",progressBar:"vf-file-preview-image-progress-bar",progressBar_sm:"vf-file-preview-image-progress-bar-sm",progressBar_md:"",progressBar_lg:"vf-file-preview-image-progress-bar-lg",progress:"vf-file-preview-image-progress",warning:"vf-file-preview-image-warning",warningIcon:"vf-file-preview-image-warning-icon",uploaded:"vf-file-preview-image-uploaded",uploadedIcon:"vf-file-preview-image-uploaded-icon",remove:"vf-file-preview-image-remove",removeIcon:"vf-file-preview-image-remove-icon",assistiveText:"vf-assistive-text",$image:(e,{hasLink:t,Size:n})=>[e.image,e[`image_${n}`],t?e.image_link:e.image_static],$img:(e,{Size:t})=>[e.img,e[`img_${t}`]],$progressBar:(e,{Size:t})=>[e.progressBar,e[`progressBar_${t}`]]}}}},ph=`.vf-file-preview-image {
4422
+ }`;Y(ah);Xs.__file="themes/vueform/templates/elements/partials/FilePreview.vue";var rl={};const lh=["aria-labelledby","aria-placeholder","aria-describedby"],oh=["id"],sh=["href"],dh=["src","alt","title"],uh=["src","alt","title"],ch=["href"];function ph(e,t,n,r,i,l){return ye((d(),h("div",q({class:e.classes.container,tabindex:"0",role:"button"},e.attrs,{"aria-labelledby":e.ariaLabelledby,"aria-placeholder":e.ariaPlaceholder,"aria-describedby":`${e.el$.fieldId}-file-description`,onKeyup:t[4]||(t[4]=(...a)=>e.handleKeyup&&e.handleKeyup(...a))}),[w("span",{id:`${e.el$.fieldId}-file-description`,class:p(e.classes.assistiveText),"aria-hidden":""},Se(e.form$.translations.vueform.a11y.file.description),11,oh),w("div",{class:p(e.classes.wrapper)},[m(" Image "),e.uploaded&&e.hasLink&&e.clickable?(d(),h("a",{key:0,href:e.link,class:p(e.classes.image),target:"_blank",rel:"nofollow noopener"},[w("img",{class:p(e.classes.img),src:e.preview,alt:e.filename,title:e.filename,"aria-hidden":"true"},null,10,dh)],10,sh)):(d(),h("span",{key:1,class:p(e.classes.image)},[w("img",{class:p(e.classes.img),src:e.preview,alt:e.filename,title:e.filename,"aria-hidden":"true"},null,10,uh)],2)),w("div",{class:p(e.classes.file)},[m(" Filename "),e.hasLink&&e.clickable?(d(),h("a",{key:0,href:e.link,class:p(e.classes.filenameLink),target:"_blank",rel:"nofollow noopener"},Se(e.filename),11,ch)):(d(),h("span",{key:1,class:p(e.classes.filenameStatic)},Se(e.filename),3))],2),w("div",{class:p(e.classes.actions)},[m(" Remove "),e.canRemove?(d(),h("div",{key:0,class:p(e.classes.remove),onClick:t[0]||(t[0]=he((...a)=>e.remove&&e.remove(...a),["prevent"])),onKeypress:t[1]||(t[1]=ze((...a)=>e.remove&&e.remove(...a),["enter","space"])),"aria-roledescription":"❎",role:"button",tabindex:"0"},[w("span",{class:p(e.classes.removeIcon)},null,2)],34)):m("v-if",!0),m(" Progress "),e.uploading?(d(),h("div",{key:1,class:p(e.classes.percent)},Se(e.progress)+"%",3)):m("v-if",!0),m(" Error "),e.hasError?(d(),h("span",{key:2,class:p(e.classes.warning)},[w("span",{class:p(e.classes.warningIcon)},null,2)],2)):m("v-if",!0),m(" Upload button "),e.canUploadTemp?(d(),h("div",{key:3,class:p(e.classes.upload),onClick:t[2]||(t[2]=he((...a)=>e.upload&&e.upload(...a),["prevent"])),onKeypress:t[3]||(t[3]=ze((...a)=>e.upload&&e.upload(...a),["enter","space"])),tabindex:"-1",role:"button"},Se(e.uploadText),35)):e.el$.stage>1?(d(),h(X,{key:4},[m(" Success "),w("span",{class:p(e.classes.uploaded)},[w("span",{class:p(e.classes.uploadedIcon)},null,2)],2)],2112)):m("v-if",!0)],2)],2),e.uploading?(d(),h("div",{key:0,class:p(e.classes.progressBar)},[w("div",{class:p(e.classes.progress),style:Gt({width:e.progress+"%"})},null,6)],2)):m("v-if",!0)],16,lh)),[[Fe,e.visible]])}rl.render=ph;rl.__file="themes/blank/templates/elements/partials/FilePreview_image.vue";var Zs={name:"ImagePreview",render:rl.render,data(){return{merge:!0,defaultClasses:{container:"vf-file-preview-image",wrapper:"vf-file-preview-image-wrapper",image:"vf-file-preview-image-image",image_link:"",image_static:"",image_sm:"vf-file-preview-image-image-sm",image_md:"",image_lg:"vf-file-preview-image-image-lg",img:"vf-file-preview-image-img",img_sm:"vf-file-preview-image-img-sm",img_md:"",img_lg:"vf-file-preview-image-img-lg",file:"vf-file-preview-image-file",filenameLink:"vf-file-preview-image-filename-link",filenameStatic:"vf-file-preview-image-filename",actions:"vf-file-preview-image-actions",percent:"vf-file-preview-image-percent",upload:"vf-file-preview-image-upload",progressBar:"vf-file-preview-image-progress-bar",progressBar_sm:"vf-file-preview-image-progress-bar-sm",progressBar_md:"",progressBar_lg:"vf-file-preview-image-progress-bar-lg",progress:"vf-file-preview-image-progress",warning:"vf-file-preview-image-warning",warningIcon:"vf-file-preview-image-warning-icon",uploaded:"vf-file-preview-image-uploaded",uploadedIcon:"vf-file-preview-image-uploaded-icon",remove:"vf-file-preview-image-remove",removeIcon:"vf-file-preview-image-remove-icon",assistiveText:"vf-assistive-text",$image:(e,{hasLink:t,Size:n})=>[e.image,e[`image_${n}`],t?e.image_link:e.image_static],$img:(e,{Size:t})=>[e.img,e[`img_${t}`]],$progressBar:(e,{Size:t})=>[e.progressBar,e[`progressBar_${t}`]]}}}},fh=`.vf-file-preview-image {
4415
4423
  font-family: inherit;
4416
4424
  font-size: inherit;
4417
4425
  line-height: inherit;
@@ -4635,7 +4643,7 @@ body[dir=rtl] .vf-toggle-text.vf-toggle-text-left.vf-toggle-text-lg {
4635
4643
 
4636
4644
  .vf-file-removing .vf-file-preview-image {
4637
4645
  opacity: 0.6;
4638
- }`;Y(ph);Zs.__file="themes/vueform/templates/elements/partials/FilePreview_image.vue";var il={};const fh=["aria-labelledby","aria-placeholder","aria-role","aria-describedby"],vh=["id"],gh=["href"],mh=["src","alt","title"],hh=["src","alt","title"];function bh(e,t,n,r,i,l){return ye((d(),h("div",q({class:e.classes.container,tabindex:"0",role:"button"},e.attrs,{"aria-labelledby":e.ariaLabelledby,"aria-placeholder":e.ariaPlaceholder,"aria-role":e.ariaRoledescription,"aria-describedby":`${e.el$.fieldId}-file-description`,onKeyup:t[4]||(t[4]=(...a)=>e.handleKeyup&&e.handleKeyup(...a))}),[w("span",{id:`${e.el$.fieldId}-file-description`,class:p(e.classes.assistiveText),"aria-hidden":""},Se(e.form$.translations.vueform.a11y.file.description),11,vh),m(" Image "),e.uploaded&&e.hasLink&&e.clickable?(d(),h("a",{key:0,class:p(e.classes.image),href:e.link,target:"_blank",rel:"nofollow noopener"},[w("img",{src:e.preview,class:p(e.classes.img),alt:e.filename,title:e.filename,"aria-hidden":"true"},null,10,mh)],10,gh)):(d(),h("div",{key:1,class:p(e.classes.image)},[w("img",{class:p(e.classes.img),src:e.preview,alt:e.filename,title:e.filename,"aria-hidden":"true"},null,10,hh)],2)),m(" Overlay "),!e.uploaded&&!e.uploading?(d(),h("div",{key:2,class:p(e.classes.overlay)},[e.canUploadTemp?(d(),h("div",{key:0,class:p(e.classes.upload),onClick:t[0]||(t[0]=he((...a)=>e.upload&&e.upload(...a),["prevent"])),onKeypress:t[1]||(t[1]=ze((...a)=>e.upload&&e.upload(...a),["enter","space"])),tabindex:"-1",role:"button"},Se(e.uploadText),35)):m("v-if",!0)],2)):m("v-if",!0),m(" Error "),e.hasError?(d(),h("span",{key:3,class:p(e.classes.warning)},[w("span",{class:p(e.classes.warningIcon)},null,2)],2)):e.el$.stage>1?(d(),h(X,{key:4},[m(" Success "),w("span",{class:p(e.classes.uploaded)},[w("span",{class:p(e.classes.uploadedIcon)},null,2)],2)],2112)):m("v-if",!0),m(" Remove "),e.canRemove?(d(),h("div",{key:5,class:p(e.classes.remove),onClick:t[2]||(t[2]=he((...a)=>e.remove&&e.remove(...a),["prevent"])),onKeypress:t[3]||(t[3]=ze((...a)=>e.remove&&e.remove(...a),["enter","space"])),"aria-roledescription":"❎",role:"button",tabindex:"0"},[w("span",{class:p(e.classes.removeIcon)},null,2)],34)):m("v-if",!0),m(" Progress "),e.uploading?(d(),h("div",{key:6,class:p(e.classes.progressBar)},[w("div",{class:p(e.classes.progress),style:Gt({width:e.progress+"%"})},null,6)],2)):m("v-if",!0)],16,fh)),[[Fe,e.visible]])}il.render=bh;il.__file="themes/blank/templates/elements/partials/FilePreview_gallery.vue";var ed={name:"GalleryPreview",render:il.render,data(){return{merge:!0,defaultClasses:{container:"vf-file-preview-gallery",container_sm:"vf-file-preview-gallery-sm",container_md:"",container_lg:"vf-file-preview-gallery-lg",image:"vf-file-preview-gallery-image",image_sm:"vf-file-preview-gallery-image-sm",image_md:"",image_lg:"vf-file-preview-gallery-image-lg",image_link:"",image_static:"",img:"vf-file-preview-gallery-img",img_sm:"vf-file-preview-gallery-img-sm",img_md:"",img_lg:"vf-file-preview-gallery-img-lg",overlay:"vf-file-preview-gallery-overlay",overlay_sm:"vf-file-preview-gallery-overlay-sm",overlay_md:"",overlay_lg:"vf-file-preview-gallery-overlay-lg",upload:"vf-file-preview-gallery-upload",progressBar:"vf-file-preview-gallery-progress-bar",progress:"vf-file-preview-gallery-progress",warning:"vf-file-preview-gallery-warning",warningIcon:"vf-file-preview-gallery-warning-icon",uploaded:"vf-file-preview-gallery-uploaded",uploadedIcon:"vf-file-preview-gallery-uploaded-icon",remove:"vf-file-preview-gallery-remove",removeIcon:"vf-file-preview-gallery-remove-icon",assistiveText:"vf-assistive-text",$container:(e,{Size:t})=>[e.container,e[`container_${t}`]],$image:(e,{Size:t})=>[e.image,e[`image_${t}`]],$img:(e,{Size:t})=>[e.img,e[`img_${t}`]],$overlay:(e,{Size:t})=>[e.overlay,e[`overlay_${t}`]]}}}},wh=`.vf-file-preview-gallery {
4646
+ }`;Y(fh);Zs.__file="themes/vueform/templates/elements/partials/FilePreview_image.vue";var il={};const vh=["aria-labelledby","aria-placeholder","aria-role","aria-describedby"],gh=["id"],mh=["href"],hh=["src","alt","title"],bh=["src","alt","title"];function wh(e,t,n,r,i,l){return ye((d(),h("div",q({class:e.classes.container,tabindex:"0",role:"button"},e.attrs,{"aria-labelledby":e.ariaLabelledby,"aria-placeholder":e.ariaPlaceholder,"aria-role":e.ariaRoledescription,"aria-describedby":`${e.el$.fieldId}-file-description`,onKeyup:t[4]||(t[4]=(...a)=>e.handleKeyup&&e.handleKeyup(...a))}),[w("span",{id:`${e.el$.fieldId}-file-description`,class:p(e.classes.assistiveText),"aria-hidden":""},Se(e.form$.translations.vueform.a11y.file.description),11,gh),m(" Image "),e.uploaded&&e.hasLink&&e.clickable?(d(),h("a",{key:0,class:p(e.classes.image),href:e.link,target:"_blank",rel:"nofollow noopener"},[w("img",{src:e.preview,class:p(e.classes.img),alt:e.filename,title:e.filename,"aria-hidden":"true"},null,10,hh)],10,mh)):(d(),h("div",{key:1,class:p(e.classes.image)},[w("img",{class:p(e.classes.img),src:e.preview,alt:e.filename,title:e.filename,"aria-hidden":"true"},null,10,bh)],2)),m(" Overlay "),!e.uploaded&&!e.uploading?(d(),h("div",{key:2,class:p(e.classes.overlay)},[e.canUploadTemp?(d(),h("div",{key:0,class:p(e.classes.upload),onClick:t[0]||(t[0]=he((...a)=>e.upload&&e.upload(...a),["prevent"])),onKeypress:t[1]||(t[1]=ze((...a)=>e.upload&&e.upload(...a),["enter","space"])),tabindex:"-1",role:"button"},Se(e.uploadText),35)):m("v-if",!0)],2)):m("v-if",!0),m(" Error "),e.hasError?(d(),h("span",{key:3,class:p(e.classes.warning)},[w("span",{class:p(e.classes.warningIcon)},null,2)],2)):e.el$.stage>1?(d(),h(X,{key:4},[m(" Success "),w("span",{class:p(e.classes.uploaded)},[w("span",{class:p(e.classes.uploadedIcon)},null,2)],2)],2112)):m("v-if",!0),m(" Remove "),e.canRemove?(d(),h("div",{key:5,class:p(e.classes.remove),onClick:t[2]||(t[2]=he((...a)=>e.remove&&e.remove(...a),["prevent"])),onKeypress:t[3]||(t[3]=ze((...a)=>e.remove&&e.remove(...a),["enter","space"])),"aria-roledescription":"❎",role:"button",tabindex:"0"},[w("span",{class:p(e.classes.removeIcon)},null,2)],34)):m("v-if",!0),m(" Progress "),e.uploading?(d(),h("div",{key:6,class:p(e.classes.progressBar)},[w("div",{class:p(e.classes.progress),style:Gt({width:e.progress+"%"})},null,6)],2)):m("v-if",!0)],16,vh)),[[Fe,e.visible]])}il.render=wh;il.__file="themes/blank/templates/elements/partials/FilePreview_gallery.vue";var ed={name:"GalleryPreview",render:il.render,data(){return{merge:!0,defaultClasses:{container:"vf-file-preview-gallery",container_sm:"vf-file-preview-gallery-sm",container_md:"",container_lg:"vf-file-preview-gallery-lg",image:"vf-file-preview-gallery-image",image_sm:"vf-file-preview-gallery-image-sm",image_md:"",image_lg:"vf-file-preview-gallery-image-lg",image_link:"",image_static:"",img:"vf-file-preview-gallery-img",img_sm:"vf-file-preview-gallery-img-sm",img_md:"",img_lg:"vf-file-preview-gallery-img-lg",overlay:"vf-file-preview-gallery-overlay",overlay_sm:"vf-file-preview-gallery-overlay-sm",overlay_md:"",overlay_lg:"vf-file-preview-gallery-overlay-lg",upload:"vf-file-preview-gallery-upload",progressBar:"vf-file-preview-gallery-progress-bar",progress:"vf-file-preview-gallery-progress",warning:"vf-file-preview-gallery-warning",warningIcon:"vf-file-preview-gallery-warning-icon",uploaded:"vf-file-preview-gallery-uploaded",uploadedIcon:"vf-file-preview-gallery-uploaded-icon",remove:"vf-file-preview-gallery-remove",removeIcon:"vf-file-preview-gallery-remove-icon",assistiveText:"vf-assistive-text",$container:(e,{Size:t})=>[e.container,e[`container_${t}`]],$image:(e,{Size:t})=>[e.image,e[`image_${t}`]],$img:(e,{Size:t})=>[e.img,e[`img_${t}`]],$overlay:(e,{Size:t})=>[e.overlay,e[`overlay_${t}`]]}}}},yh=`.vf-file-preview-gallery {
4639
4647
  font-family: inherit;
4640
4648
  font-size: inherit;
4641
4649
  line-height: inherit;
@@ -4861,7 +4869,7 @@ body[dir=rtl] .vf-toggle-text.vf-toggle-text-left.vf-toggle-text-lg {
4861
4869
  .is-sorting .vf-file-preview-gallery:hover .vf-file-preview-gallery-remove, .vf-gallery.is-disabled .vf-file-preview-gallery:hover .vf-file-preview-gallery-remove {
4862
4870
  opacity: 0;
4863
4871
  visibility: hidden;
4864
- }`;Y(wh);ed.__file="themes/vueform/templates/elements/partials/FilePreview_gallery.vue";var al={};const yh=["value","name","id","disabled","aria-label"],kh=["innerHTML"];function Ch(e,t,n,r,i,l){return d(),h("label",{class:p(e.classes.container)},[T(e.$slots,"default",q({name:e.name},{classes:e.classes,isDisabled:e.isDisabled,id:e.id,item:e.item,value:e.value,items:e.items,index:e.index}),()=>[ye(w("input",q({type:"radio","onUpdate:modelValue":t[0]||(t[0]=a=>e.el$.value=a)},e.attrs,{value:e.value,class:e.classes.input,name:e.name,id:e.id,disabled:e.isDisabled,"aria-label":e.item.label}),null,16,yh),[[Qr,e.el$.value]]),w("span",{class:p(e.classes.text),innerHTML:e.item.label},null,10,kh)])],2)}al.render=Ch;al.__file="themes/blank/templates/elements/partials/RadiogroupRadio.vue";var td={name:"RadiogroupRadio",render:al.render,data(){return{merge:!0,defaultClasses:{container:"vf-radio-container",input:"vf-radio",input_enabled:"",input_disabled:"",input_sm:"vf-radio-sm",input_md:"",input_lg:"vf-radio-lg",text:"vf-radio-text",$input:(e,{isDisabled:t,Size:n})=>[e.input,e[`input_${n}`],t?e.input_disabled:e.input_enabled]}}}},Ah="/* Some styles are contained in Vueform.vue & RadiogroupElement.vue */";Y(Ah);td.__file="themes/vueform/templates/elements/partials/RadiogroupRadio.vue";var ll={};const Eh=["aria-checked"],Lh=["title"],xh=["value","name","id","disabled"],Sh=["innerHTML"];function Th(e,t,n,r,i,l){return d(),h("label",q(e.attrs,{class:e.classes.container,tabindex:"0",role:"radio","aria-checked":e.checked,onKeypress:t[1]||(t[1]=ze(he(a=>e.el$.update(e.value),["prevent"]),["space"])),onKeydown:t[2]||(t[2]=(...a)=>e.handleKeydown&&e.handleKeydown(...a))}),[T(e.$slots,"default",q({name:e.name},{classes:e.classes,isDisabled:e.isDisabled,id:e.id,item:e.item,value:e.value,items:e.items,index:e.index}),()=>[w("div",{class:p(e.classes.wrapper),title:e.item.label},[ye(w("input",{type:"radio","onUpdate:modelValue":t[0]||(t[0]=a=>e.el$.model=a),value:e.value,class:p(e.classes.input),name:e.name,id:e.id,disabled:e.isDisabled},null,10,xh),[[Qr,e.el$.model]]),w("span",{class:p(e.classes.text),innerHTML:`${e.item.label}`},null,10,Sh)],10,Lh)])],16,Eh)}ll.render=Th;ll.__file="themes/blank/templates/elements/partials/RadiogroupRadio_tabs.vue";var nd={name:"RadiogroupRadio_tabs",render:ll.render,data(){return{merge:!0,defaultClasses:{container:"vf-radio-tabs-container",wrapper:"vf-radio-tabs",wrapper_not_last:"vf-radio-tabs-not-last",wrapper_first:"vf-radio-tabs-first",wrapper_first_sm:"vf-radio-tabs-first-sm",wrapper_first_md:"",wrapper_first_lg:"vf-radio-tabs-first-lg",wrapper_last:"vf-radio-tabs-last",wrapper_last_sm:"vf-radio-tabs-last-sm",wrapper_last_md:"",wrapper_last_lg:"vf-radio-tabs-last-lg",wrapper_selected:"vf-radio-tabs-selected",wrapper_unselected:"vf-radio-tabs-unselected",wrapper_disabled:"vf-radio-tabs-disabled",wrapper_sm:"vf-radio-tabs-sm",wrapper_md:"",wrapper_lg:"vf-radio-tabs-lg",input:"vf-radio-tabs-input",text:"",$wrapper:(e,{index:t,items:n,el$:r,value:i,isDisabled:l,Size:a})=>[e.wrapper,e[`wrapper_${a}`],t<Object.keys(n).length-1?e.wrapper_not_last:null,t===0?e.wrapper_first:null,t===Object.keys(n).length-1?e.wrapper_last:null,r.value==i?e.wrapper_selected:e.wrapper_unselected,l?e.wrapper_disabled:null]}}}},Rh=`/* Some styles are contained in Vueform.vue & RadiogroupElement.vue */
4872
+ }`;Y(yh);ed.__file="themes/vueform/templates/elements/partials/FilePreview_gallery.vue";var al={};const kh=["value","name","id","disabled","aria-label"],Ch=["innerHTML"];function Ah(e,t,n,r,i,l){return d(),h("label",{class:p(e.classes.container)},[T(e.$slots,"default",q({name:e.name},{classes:e.classes,isDisabled:e.isDisabled,id:e.id,item:e.item,value:e.value,items:e.items,index:e.index}),()=>[ye(w("input",q({type:"radio","onUpdate:modelValue":t[0]||(t[0]=a=>e.el$.value=a)},e.attrs,{value:e.value,class:e.classes.input,name:e.name,id:e.id,disabled:e.isDisabled,"aria-label":e.item.label}),null,16,kh),[[Qr,e.el$.value]]),w("span",{class:p(e.classes.text),innerHTML:e.item.label},null,10,Ch)])],2)}al.render=Ah;al.__file="themes/blank/templates/elements/partials/RadiogroupRadio.vue";var td={name:"RadiogroupRadio",render:al.render,data(){return{merge:!0,defaultClasses:{container:"vf-radio-container",input:"vf-radio",input_enabled:"",input_disabled:"",input_sm:"vf-radio-sm",input_md:"",input_lg:"vf-radio-lg",text:"vf-radio-text",$input:(e,{isDisabled:t,Size:n})=>[e.input,e[`input_${n}`],t?e.input_disabled:e.input_enabled]}}}},Eh="/* Some styles are contained in Vueform.vue & RadiogroupElement.vue */";Y(Eh);td.__file="themes/vueform/templates/elements/partials/RadiogroupRadio.vue";var ll={};const Lh=["aria-checked"],xh=["title"],Sh=["value","name","id","disabled"],Th=["innerHTML"];function Rh(e,t,n,r,i,l){return d(),h("label",q(e.attrs,{class:e.classes.container,tabindex:"0",role:"radio","aria-checked":e.checked,onKeypress:t[1]||(t[1]=ze(he(a=>e.el$.update(e.value),["prevent"]),["space"])),onKeydown:t[2]||(t[2]=(...a)=>e.handleKeydown&&e.handleKeydown(...a))}),[T(e.$slots,"default",q({name:e.name},{classes:e.classes,isDisabled:e.isDisabled,id:e.id,item:e.item,value:e.value,items:e.items,index:e.index}),()=>[w("div",{class:p(e.classes.wrapper),title:e.item.label},[ye(w("input",{type:"radio","onUpdate:modelValue":t[0]||(t[0]=a=>e.el$.model=a),value:e.value,class:p(e.classes.input),name:e.name,id:e.id,disabled:e.isDisabled},null,10,Sh),[[Qr,e.el$.model]]),w("span",{class:p(e.classes.text),innerHTML:`${e.item.label}`},null,10,Th)],10,xh)])],16,Lh)}ll.render=Rh;ll.__file="themes/blank/templates/elements/partials/RadiogroupRadio_tabs.vue";var nd={name:"RadiogroupRadio_tabs",render:ll.render,data(){return{merge:!0,defaultClasses:{container:"vf-radio-tabs-container",wrapper:"vf-radio-tabs",wrapper_not_last:"vf-radio-tabs-not-last",wrapper_first:"vf-radio-tabs-first",wrapper_first_sm:"vf-radio-tabs-first-sm",wrapper_first_md:"",wrapper_first_lg:"vf-radio-tabs-first-lg",wrapper_last:"vf-radio-tabs-last",wrapper_last_sm:"vf-radio-tabs-last-sm",wrapper_last_md:"",wrapper_last_lg:"vf-radio-tabs-last-lg",wrapper_selected:"vf-radio-tabs-selected",wrapper_unselected:"vf-radio-tabs-unselected",wrapper_disabled:"vf-radio-tabs-disabled",wrapper_sm:"vf-radio-tabs-sm",wrapper_md:"",wrapper_lg:"vf-radio-tabs-lg",input:"vf-radio-tabs-input",text:"",$wrapper:(e,{index:t,items:n,el$:r,value:i,isDisabled:l,Size:a})=>[e.wrapper,e[`wrapper_${a}`],t<Object.keys(n).length-1?e.wrapper_not_last:null,t===0?e.wrapper_first:null,t===Object.keys(n).length-1?e.wrapper_last:null,r.value==i?e.wrapper_selected:e.wrapper_unselected,l?e.wrapper_disabled:null]}}}},Ih=`/* Some styles are contained in Vueform.vue & RadiogroupElement.vue */
4865
4873
 
4866
4874
  .vf-radio-tabs-container {
4867
4875
  display: flex;
@@ -4959,7 +4967,7 @@ body[dir=rtl] .vf-toggle-text.vf-toggle-text-left.vf-toggle-text-lg {
4959
4967
 
4960
4968
  .vf-radio-tabs-input {
4961
4969
  display: none;
4962
- }`;Y(Rh);nd.__file="themes/vueform/templates/elements/partials/RadiogroupRadio_tabs.vue";var ol={};const Ih=["value","name","id","disabled"],Bh=["innerHTML"],Mh=["innerHTML"];function Dh(e,t,n,r,i,l){return d(),h("label",{class:p(e.classes.container)},[T(e.$slots,"default",q({name:e.name},{classes:e.classes,isDisabled:e.isDisabled,id:e.id,item:e.item,value:e.value,items:e.items,index:e.index}),()=>[w("div",{class:p(e.classes.wrapper)},[ye(w("input",q({type:"radio","onUpdate:modelValue":t[0]||(t[0]=a=>e.el$.model=a)},e.attrs,{value:e.value,class:e.classes.input,name:e.name,id:e.id,disabled:e.isDisabled}),null,16,Ih),[[Qr,e.el$.model]]),w("div",{class:p(e.classes.text_wrapper)},[w("div",{class:p(e.classes.text),innerHTML:e.item.label},null,10,Bh),w("div",{class:p(e.classes.description),innerHTML:e.item.description},null,10,Mh)],2)],2)])],2)}ol.render=Dh;ol.__file="themes/blank/templates/elements/partials/RadiogroupRadio_blocks.vue";var rd={name:"RadiogroupRadio_blocks",render:ol.render,data(){return{merge:!0,defaultClasses:{container:"vf-radio-blocks-container",container_sm:"vf-radio-blocks-container-sm",container_md:"",container_lg:"vf-radio-blocks-container-lg",wrapper:"vf-radio-blocks",wrapper_not_last:"vf-radio-blocks-not-last",wrapper_first:"vf-radio-blocks-first",wrapper_first_sm:"vf-radio-blocks-first-sm",wrapper_first_md:"",wrapper_first_lg:"vf-radio-blocks-first-lg",wrapper_last:"vf-radio-blocks-last",wrapper_last_sm:"vf-radio-blocks-last-sm",wrapper_last_md:"",wrapper_last_lg:"vf-radio-blocks-last-lg",wrapper_selected:"vf-radio-blocks-selected",wrapper_unselected:"vf-radio-blocks-unselected",wrapper_disabled:"vf-radio-blocks-disabled",wrapper_sm:"vf-radio-blocks-sm",wrapper_md:"",wrapper_lg:"vf-radio-blocks-lg",input:"vf-radio",input_enabled:"",input_disabled:"",input_sm:"vf-radio-sm",input_md:"",input_lg:"vf-radio-lg",text_wrapper:"vf-radio-blocks-text-wrapper",text:"vf-radio-blocks-text",description:"vf-radio-blocks-description",description_sm:"vf-radio-blocks-description-sm",description_md:"",description_lg:"vf-radio-blocks-description-lg",$container:(e,{Size:t})=>[e.container,e[`container_${t}`]],$wrapper:(e,{index:t,items:n,el$:r,value:i,isDisabled:l,Size:a})=>[e.wrapper,e[`wrapper_${a}`],t<Object.keys(n).length-1?e.wrapper_not_last:null,t===0?e.wrapper_first:null,t===0?e[`wrapper_first_${a}`]:null,t===Object.keys(n).length-1?e.wrapper_last:null,t===Object.keys(n).length-1?e[`wrapper_last_${a}`]:null,r.value==i?e.wrapper_selected:e.wrapper_unselected,l?e.wrapper_disabled:null],$input:(e,{isDisabled:t,Size:n})=>[e.input,e[`input_${n}`],t?e.input_disabled:e.input_enabled],$description:(e,{Size:t})=>[e.description,e[`description_${t}`]]}}}},Oh=`/* Some styles are contained in Vueform.vue & RadiogroupElement.vue */
4970
+ }`;Y(Ih);nd.__file="themes/vueform/templates/elements/partials/RadiogroupRadio_tabs.vue";var ol={};const Bh=["value","name","id","disabled"],Mh=["innerHTML"],Dh=["innerHTML"];function Oh(e,t,n,r,i,l){return d(),h("label",{class:p(e.classes.container)},[T(e.$slots,"default",q({name:e.name},{classes:e.classes,isDisabled:e.isDisabled,id:e.id,item:e.item,value:e.value,items:e.items,index:e.index}),()=>[w("div",{class:p(e.classes.wrapper)},[ye(w("input",q({type:"radio","onUpdate:modelValue":t[0]||(t[0]=a=>e.el$.model=a)},e.attrs,{value:e.value,class:e.classes.input,name:e.name,id:e.id,disabled:e.isDisabled}),null,16,Bh),[[Qr,e.el$.model]]),w("div",{class:p(e.classes.text_wrapper)},[w("div",{class:p(e.classes.text),innerHTML:e.item.label},null,10,Mh),w("div",{class:p(e.classes.description),innerHTML:e.item.description},null,10,Dh)],2)],2)])],2)}ol.render=Oh;ol.__file="themes/blank/templates/elements/partials/RadiogroupRadio_blocks.vue";var rd={name:"RadiogroupRadio_blocks",render:ol.render,data(){return{merge:!0,defaultClasses:{container:"vf-radio-blocks-container",container_sm:"vf-radio-blocks-container-sm",container_md:"",container_lg:"vf-radio-blocks-container-lg",wrapper:"vf-radio-blocks",wrapper_not_last:"vf-radio-blocks-not-last",wrapper_first:"vf-radio-blocks-first",wrapper_first_sm:"vf-radio-blocks-first-sm",wrapper_first_md:"",wrapper_first_lg:"vf-radio-blocks-first-lg",wrapper_last:"vf-radio-blocks-last",wrapper_last_sm:"vf-radio-blocks-last-sm",wrapper_last_md:"",wrapper_last_lg:"vf-radio-blocks-last-lg",wrapper_selected:"vf-radio-blocks-selected",wrapper_unselected:"vf-radio-blocks-unselected",wrapper_disabled:"vf-radio-blocks-disabled",wrapper_sm:"vf-radio-blocks-sm",wrapper_md:"",wrapper_lg:"vf-radio-blocks-lg",input:"vf-radio",input_enabled:"",input_disabled:"",input_sm:"vf-radio-sm",input_md:"",input_lg:"vf-radio-lg",text_wrapper:"vf-radio-blocks-text-wrapper",text:"vf-radio-blocks-text",description:"vf-radio-blocks-description",description_sm:"vf-radio-blocks-description-sm",description_md:"",description_lg:"vf-radio-blocks-description-lg",$container:(e,{Size:t})=>[e.container,e[`container_${t}`]],$wrapper:(e,{index:t,items:n,el$:r,value:i,isDisabled:l,Size:a})=>[e.wrapper,e[`wrapper_${a}`],t<Object.keys(n).length-1?e.wrapper_not_last:null,t===0?e.wrapper_first:null,t===0?e[`wrapper_first_${a}`]:null,t===Object.keys(n).length-1?e.wrapper_last:null,t===Object.keys(n).length-1?e[`wrapper_last_${a}`]:null,r.value==i?e.wrapper_selected:e.wrapper_unselected,l?e.wrapper_disabled:null],$input:(e,{isDisabled:t,Size:n})=>[e.input,e[`input_${n}`],t?e.input_disabled:e.input_enabled],$description:(e,{Size:t})=>[e.description,e[`description_${t}`]]}}}},$h=`/* Some styles are contained in Vueform.vue & RadiogroupElement.vue */
4963
4971
 
4964
4972
  .vf-radio-blocks-container {
4965
4973
  display: flex;
@@ -5082,7 +5090,7 @@ body[dir=rtl] .vf-toggle-text.vf-toggle-text-left.vf-toggle-text-lg {
5082
5090
  line-height: var(--vf-line-height-small-lg);
5083
5091
  letter-spacing: var(--vf-letter-spacing-small-lg);
5084
5092
  margin-top: -0.125rem;
5085
- }`;Y(Oh);rd.__file="themes/vueform/templates/elements/partials/RadiogroupRadio_blocks.vue";var sl={};const $h=["id","placeholder","autocomplete"];function Fh(e,t,n,r,i,l){return d(),h("input",q({type:"text",class:e.classes.datepicker,id:e.id,placeholder:e.placeholder,autocomplete:e.autocomplete},e.attrs,{ref:"input"}),null,16,$h)}sl.render=Fh;sl.__file="themes/blank/templates/wrappers/DatepickerWrapper.vue";var id={name:"DatepickerWrapper",render:sl.render,data(){return{merge:!0,defaultClasses:{datepicker:"",calendarContainer:"flatpickr-calendar-container"}}}},zh=`.flatpickr-wrapper {
5093
+ }`;Y($h);rd.__file="themes/vueform/templates/elements/partials/RadiogroupRadio_blocks.vue";var sl={};const Fh=["id","placeholder","autocomplete"];function zh(e,t,n,r,i,l){return d(),h("input",q({type:"text",class:e.classes.datepicker,id:e.id,placeholder:e.placeholder,autocomplete:e.autocomplete},e.attrs,{ref:"input"}),null,16,Fh)}sl.render=zh;sl.__file="themes/blank/templates/wrappers/DatepickerWrapper.vue";var id={name:"DatepickerWrapper",render:sl.render,data(){return{merge:!0,defaultClasses:{datepicker:"",calendarContainer:"flatpickr-calendar-container"}}}},Ph=`.flatpickr-wrapper {
5086
5094
  width: 100%;
5087
5095
  height: 100%;
5088
5096
  }
@@ -5902,7 +5910,7 @@ span.flatpickr-weekday {
5902
5910
 
5903
5911
  span.flatpickr-day.selected {
5904
5912
  font-weight: bold;
5905
- }`;Y(zh);id.__file="themes/vueform/templates/wrappers/DatepickerWrapper.vue";var Ph="2.1.15";const Ln="[data-trix-attachment]",dl={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}},mt={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,htmlAttributes:["language"],text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test(e){return Pl(e.parentNode)===mt[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test(e){return Pl(e.parentNode)===mt[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}},Pl=e=>{var t;return e==null||(t=e.tagName)===null||t===void 0?void 0:t.toLowerCase()},Nl=navigator.userAgent.match(/android\s([0-9]+.*Chrome)/i),si=Nl&&parseInt(Nl[1]);var yr={composesExistingText:/Android.*Chrome/.test(navigator.userAgent),recentAndroid:si&&si>12,samsungAndroid:si&&navigator.userAgent.match(/Android.*SM-/),forcesObjectResizing:/Trident.*rv:11/.test(navigator.userAgent),supportsInputEvents:typeof InputEvent<"u"&&["data","getTargetRanges","inputType"].every(e=>e in InputEvent.prototype)},ad={ADD_ATTR:["language"],SAFE_FOR_XML:!1,RETURN_DOM:!0},me={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption…",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",url:"URL",urlPlaceholder:"Enter a URL…",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"};const Nh=[me.bytes,me.KB,me.MB,me.GB,me.TB,me.PB];var ld={prefix:"IEC",precision:2,formatter(e){switch(e){case 0:return"0 ".concat(me.bytes);case 1:return"1 ".concat(me.byte);default:let t;this.prefix==="SI"?t=1e3:this.prefix==="IEC"&&(t=1024);const n=Math.floor(Math.log(e)/Math.log(t)),r=(e/Math.pow(t,n)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"");return"".concat(r," ").concat(Nh[n])}}};const ti="\uFEFF",pn=" ",od=function(e){for(const t in e){const n=e[t];this[t]=n}return this},ul=document.documentElement,Hh=ul.matches,_e=function(e){let{onElement:t,matchingSelector:n,withCallback:r,inPhase:i,preventDefault:l,times:a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=t||ul,s=n,u=i==="capturing",f=function(S){a!=null&&--a==0&&f.destroy();const M=gn(S.target,{matchingSelector:s});M!=null&&(r?.call(M,S,M),l&&S.preventDefault())};return f.destroy=()=>o.removeEventListener(e,f,u),o.addEventListener(e,f,u),f},ar=function(e){let{onElement:t,bubbles:n,cancelable:r,attributes:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const l=t??ul;n=n!==!1,r=r!==!1;const a=document.createEvent("Events");return a.initEvent(e,n,r),i!=null&&od.call(a,i),l.dispatchEvent(a)},sd=function(e,t){if(e?.nodeType===1)return Hh.call(e,t)},gn=function(e){let{matchingSelector:t,untilNode:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.parentNode;if(e!=null){if(t==null)return e;if(e.closest&&n==null)return e.closest(t);for(;e&&e!==n;){if(sd(e,t))return e;e=e.parentNode}}},cl=e=>document.activeElement!==e&&An(e,document.activeElement),An=function(e,t){if(e&&t)for(;t;){if(t===e)return!0;t=t.parentNode}},di=function(e){var t;if((t=e)===null||t===void 0||!t.parentNode)return;let n=0;for(e=e.previousSibling;e;)n++,e=e.previousSibling;return n},mn=e=>{var t;return e==null||(t=e.parentNode)===null||t===void 0?void 0:t.removeChild(e)},zr=function(e){let{onlyNodesOfType:t,usingFilter:n,expandEntityReferences:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=(()=>{switch(t){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}})();return document.createTreeWalker(e,i,n??null,r===!0)},gt=e=>{var t;return e==null||(t=e.tagName)===null||t===void 0?void 0:t.toLowerCase()},ke=function(e){let t,n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="object"?(r=e,e=r.tagName):r={attributes:r};const i=document.createElement(e);if(r.editable!=null&&(r.attributes==null&&(r.attributes={}),r.attributes.contenteditable=r.editable),r.attributes)for(t in r.attributes)n=r.attributes[t],i.setAttribute(t,n);if(r.style)for(t in r.style)n=r.style[t],i.style[t]=n;if(r.data)for(t in r.data)n=r.data[t],i.dataset[t]=n;return r.className&&r.className.split(" ").forEach(l=>{i.classList.add(l)}),r.textContent&&(i.textContent=r.textContent),r.childNodes&&[].concat(r.childNodes).forEach(l=>{i.appendChild(l)}),i};let Gn;const lr=function(){if(Gn!=null)return Gn;Gn=[];for(const e in mt){const t=mt[e];t.tagName&&Gn.push(t.tagName)}return Gn},ui=e=>zn(e?.firstChild),Hl=function(e){let{strict:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{strict:!0};return t?zn(e):zn(e)||!zn(e.firstChild)&&function(n){return lr().includes(gt(n))&&!lr().includes(gt(n.firstChild))}(e)},zn=e=>Uh(e)&&e?.data==="block",Uh=e=>e?.nodeType===Node.COMMENT_NODE,Pn=function(e){let{name:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e)return or(e)?e.data===ti?!t||e.parentNode.dataset.trixCursorTarget===t:void 0:Pn(e.firstChild)},xn=e=>sd(e,Ln),dd=e=>or(e)&&e?.data==="",or=e=>e?.nodeType===Node.TEXT_NODE,pl={level2Enabled:!0,getLevel(){return this.level2Enabled&&yr.supportsInputEvents?2:0},pickFiles(e){const t=ke("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId});t.addEventListener("change",()=>{e(t.files),mn(t)}),mn(document.getElementById(this.fileInputId)),document.body.appendChild(t),t.click()}};var Mr={removeBlankTableCells:!1,tableCellSeparator:" | ",tableRowSeparator:`
5913
+ }`;Y(Ph);id.__file="themes/vueform/templates/wrappers/DatepickerWrapper.vue";var Nh="2.1.15";const Ln="[data-trix-attachment]",dl={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}},mt={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,htmlAttributes:["language"],text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test(e){return Pl(e.parentNode)===mt[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test(e){return Pl(e.parentNode)===mt[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}},Pl=e=>{var t;return e==null||(t=e.tagName)===null||t===void 0?void 0:t.toLowerCase()},Nl=navigator.userAgent.match(/android\s([0-9]+.*Chrome)/i),si=Nl&&parseInt(Nl[1]);var yr={composesExistingText:/Android.*Chrome/.test(navigator.userAgent),recentAndroid:si&&si>12,samsungAndroid:si&&navigator.userAgent.match(/Android.*SM-/),forcesObjectResizing:/Trident.*rv:11/.test(navigator.userAgent),supportsInputEvents:typeof InputEvent<"u"&&["data","getTargetRanges","inputType"].every((e=>e in InputEvent.prototype))},ad={ADD_ATTR:["language"],SAFE_FOR_XML:!1,RETURN_DOM:!0},me={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption…",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",url:"URL",urlPlaceholder:"Enter a URL…",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"};const Hh=[me.bytes,me.KB,me.MB,me.GB,me.TB,me.PB];var ld={prefix:"IEC",precision:2,formatter(e){switch(e){case 0:return"0 ".concat(me.bytes);case 1:return"1 ".concat(me.byte);default:let t;this.prefix==="SI"?t=1e3:this.prefix==="IEC"&&(t=1024);const n=Math.floor(Math.log(e)/Math.log(t)),r=(e/Math.pow(t,n)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"");return"".concat(r," ").concat(Hh[n])}}};const ti="\uFEFF",pn=" ",od=function(e){for(const t in e){const n=e[t];this[t]=n}return this},ul=document.documentElement,Uh=ul.matches,_e=function(e){let{onElement:t,matchingSelector:n,withCallback:r,inPhase:i,preventDefault:l,times:a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=t||ul,s=n,u=i==="capturing",f=function(S){a!=null&&--a==0&&f.destroy();const M=gn(S.target,{matchingSelector:s});M!=null&&(r?.call(M,S,M),l&&S.preventDefault())};return f.destroy=()=>o.removeEventListener(e,f,u),o.addEventListener(e,f,u),f},ar=function(e){let{onElement:t,bubbles:n,cancelable:r,attributes:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const l=t??ul;n=n!==!1,r=r!==!1;const a=document.createEvent("Events");return a.initEvent(e,n,r),i!=null&&od.call(a,i),l.dispatchEvent(a)},sd=function(e,t){if(e?.nodeType===1)return Uh.call(e,t)},gn=function(e){let{matchingSelector:t,untilNode:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.parentNode;if(e!=null){if(t==null)return e;if(e.closest&&n==null)return e.closest(t);for(;e&&e!==n;){if(sd(e,t))return e;e=e.parentNode}}},cl=e=>document.activeElement!==e&&An(e,document.activeElement),An=function(e,t){if(e&&t)for(;t;){if(t===e)return!0;t=t.parentNode}},di=function(e){var t;if((t=e)===null||t===void 0||!t.parentNode)return;let n=0;for(e=e.previousSibling;e;)n++,e=e.previousSibling;return n},mn=e=>{var t;return e==null||(t=e.parentNode)===null||t===void 0?void 0:t.removeChild(e)},zr=function(e){let{onlyNodesOfType:t,usingFilter:n,expandEntityReferences:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=(()=>{switch(t){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}})();return document.createTreeWalker(e,i,n??null,r===!0)},gt=e=>{var t;return e==null||(t=e.tagName)===null||t===void 0?void 0:t.toLowerCase()},ke=function(e){let t,n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="object"?(r=e,e=r.tagName):r={attributes:r};const i=document.createElement(e);if(r.editable!=null&&(r.attributes==null&&(r.attributes={}),r.attributes.contenteditable=r.editable),r.attributes)for(t in r.attributes)n=r.attributes[t],i.setAttribute(t,n);if(r.style)for(t in r.style)n=r.style[t],i.style[t]=n;if(r.data)for(t in r.data)n=r.data[t],i.dataset[t]=n;return r.className&&r.className.split(" ").forEach((l=>{i.classList.add(l)})),r.textContent&&(i.textContent=r.textContent),r.childNodes&&[].concat(r.childNodes).forEach((l=>{i.appendChild(l)})),i};let Gn;const lr=function(){if(Gn!=null)return Gn;Gn=[];for(const e in mt){const t=mt[e];t.tagName&&Gn.push(t.tagName)}return Gn},ui=e=>zn(e?.firstChild),Hl=function(e){let{strict:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{strict:!0};return t?zn(e):zn(e)||!zn(e.firstChild)&&(function(n){return lr().includes(gt(n))&&!lr().includes(gt(n.firstChild))})(e)},zn=e=>jh(e)&&e?.data==="block",jh=e=>e?.nodeType===Node.COMMENT_NODE,Pn=function(e){let{name:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e)return or(e)?e.data===ti?!t||e.parentNode.dataset.trixCursorTarget===t:void 0:Pn(e.firstChild)},xn=e=>sd(e,Ln),dd=e=>or(e)&&e?.data==="",or=e=>e?.nodeType===Node.TEXT_NODE,pl={level2Enabled:!0,getLevel(){return this.level2Enabled&&yr.supportsInputEvents?2:0},pickFiles(e){const t=ke("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId});t.addEventListener("change",(()=>{e(t.files),mn(t)})),mn(document.getElementById(this.fileInputId)),document.body.appendChild(t),t.click()}};var Mr={removeBlankTableCells:!1,tableCellSeparator:" | ",tableRowSeparator:`
5906
5914
  `},Tn={bold:{tagName:"strong",inheritable:!0,parser(e){const t=window.getComputedStyle(e);return t.fontWeight==="bold"||t.fontWeight>=600}},italic:{tagName:"em",inheritable:!0,parser:e=>window.getComputedStyle(e).fontStyle==="italic"},href:{groupTagName:"a",parser(e){const t="a:not(".concat(Ln,")"),n=e.closest(t);if(n)return n.getAttribute("href")}},strike:{tagName:"del",inheritable:!0},frozen:{style:{backgroundColor:"highlight"}}},ud={getDefaultHTML:()=>`<div class="trix-button-row">
5907
5915
  <span class="trix-button-group trix-button-group--text-tools" data-trix-button-group="text-tools">
5908
5916
  <button type="button" class="trix-button trix-button--icon trix-button--icon-bold" data-trix-attribute="bold" data-trix-key="b" title="`.concat(me.bold,'" tabindex="-1">').concat(me.bold,`</button>
@@ -5943,40 +5951,40 @@ span.flatpickr-day.selected {
5943
5951
  </div>
5944
5952
  </div>
5945
5953
  </div>
5946
- </div>`)};const Pi={interval:5e3};var kr=Object.freeze({__proto__:null,attachments:dl,blockAttributes:mt,browser:yr,css:{attachment:"attachment",attachmentCaption:"attachment__caption",attachmentCaptionEditor:"attachment__caption-editor",attachmentMetadata:"attachment__metadata",attachmentMetadataContainer:"attachment__metadata-container",attachmentName:"attachment__name",attachmentProgress:"attachment__progress",attachmentSize:"attachment__size",attachmentToolbar:"attachment__toolbar",attachmentGallery:"attachment-gallery"},dompurify:ad,fileSize:ld,input:pl,keyNames:{8:"backspace",9:"tab",13:"return",27:"escape",37:"left",39:"right",46:"delete",68:"d",72:"h",79:"o"},lang:me,parser:Mr,textAttributes:Tn,toolbar:ud,undo:Pi});class it{static proxyMethod(t){const{name:n,toMethod:r,toProperty:i,optional:l}=jh(t);this.prototype[n]=function(){let a,o;var s,u;return r?o=l?(s=this[r])===null||s===void 0?void 0:s.call(this):this[r]():i&&(o=this[i]),l?(a=(u=o)===null||u===void 0?void 0:u[n],a?Ul.call(a,o,arguments):void 0):(a=o[n],Ul.call(a,o,arguments))}}}const jh=function(e){const t=e.match(Wh);if(!t)throw new Error("can't parse @proxyMethod expression: ".concat(e));const n={name:t[4]};return t[2]!=null?n.toMethod=t[1]:n.toProperty=t[1],t[3]!=null&&(n.optional=!0),n},{apply:Ul}=Function.prototype,Wh=new RegExp("^(.+?)(\\(\\))?(\\?)?\\.(.+?)$");var ci,pi,fi;class vr extends it{static box(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t instanceof this?t:this.fromUCS2String(t?.toString())}static fromUCS2String(t){return new this(t,Ni(t))}static fromCodepoints(t){return new this(Hi(t),t)}constructor(t,n){super(...arguments),this.ucs2String=t,this.codepoints=n,this.length=this.codepoints.length,this.ucs2Length=this.ucs2String.length}offsetToUCS2Offset(t){return Hi(this.codepoints.slice(0,Math.max(0,t))).length}offsetFromUCS2Offset(t){return Ni(this.ucs2String.slice(0,Math.max(0,t))).length}slice(){return this.constructor.fromCodepoints(this.codepoints.slice(...arguments))}charAt(t){return this.slice(t,t+1)}isEqualTo(t){return this.constructor.box(t).ucs2String===this.ucs2String}toJSON(){return this.ucs2String}getCacheKey(){return this.ucs2String}toString(){return this.ucs2String}}const Vh=((ci=Array.from)===null||ci===void 0?void 0:ci.call(Array,"👼").length)===1,_h=((pi=" ".codePointAt)===null||pi===void 0?void 0:pi.call(" ",0))!=null,Qh=((fi=String.fromCodePoint)===null||fi===void 0?void 0:fi.call(String,32,128124))===" 👼";let Ni,Hi;Ni=Vh&&_h?e=>Array.from(e).map(t=>t.codePointAt(0)):function(e){const t=[];let n=0;const{length:r}=e;for(;n<r;){let i=e.charCodeAt(n++);if(55296<=i&&i<=56319&&n<r){const l=e.charCodeAt(n++);(64512&l)==56320?i=((1023&i)<<10)+(1023&l)+65536:n--}t.push(i)}return t},Hi=Qh?e=>String.fromCodePoint(...Array.from(e||[])):function(e){return(()=>{const t=[];return Array.from(e).forEach(n=>{let r="";n>65535&&(n-=65536,r+=String.fromCharCode(n>>>10&1023|55296),n=56320|1023&n),t.push(r+String.fromCharCode(n))}),t})().join("")};let qh=0;class Bn extends it{static fromJSONString(t){return this.fromJSON(JSON.parse(t))}constructor(){super(...arguments),this.id=++qh}hasSameConstructorAs(t){return this.constructor===t?.constructor}isEqualTo(t){return this===t}inspect(){const t=[],n=this.contentsForInspection()||{};for(const r in n){const i=n[r];t.push("".concat(r,"=").concat(i))}return"#<".concat(this.constructor.name,":").concat(this.id).concat(t.length?" ".concat(t.join(", ")):"",">")}contentsForInspection(){}toJSONString(){return JSON.stringify(this)}toUTF16String(){return vr.box(this)}getCacheKey(){return this.id.toString()}}const Rn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},fl=function(e){const t=e.slice(0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.splice(...r),t},Kh=/[\u05BE\u05C0\u05C3\u05D0-\u05EA\u05F0-\u05F4\u061B\u061F\u0621-\u063A\u0640-\u064A\u066D\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D5\u06E5\u06E6\u200F\u202B\u202E\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE72\uFE74\uFE76-\uFEFC]/,Gh=function(){const e=ke("input",{dir:"auto",name:"x",dirName:"x.dir"}),t=ke("textarea",{dir:"auto",name:"y",dirName:"y.dir"}),n=ke("form");n.appendChild(e),n.appendChild(t);const r=function(){try{return new FormData(n).has(t.dirName)}catch{return!1}}(),i=function(){try{return e.matches(":dir(ltr),:dir(rtl)")}catch{return!1}}();return r?function(l){return t.value=l,new FormData(n).get(t.dirName)}:i?function(l){return e.value=l,e.matches(":dir(rtl)")?"rtl":"ltr"}:function(l){const a=l.trim().charAt(0);return Kh.test(a)?"rtl":"ltr"}}();let vi=null,gi=null,mi=null,Ar=null;const Ui=()=>(vi||(vi=Yh().concat(Jh())),vi),Xe=e=>mt[e],Jh=()=>(gi||(gi=Object.keys(mt)),gi),ji=e=>Tn[e],Yh=()=>(mi||(mi=Object.keys(Tn)),mi),cd=function(e,t){Xh(e).textContent=t.replace(/%t/g,e)},Xh=function(e){const t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("data-tag-name",e.toLowerCase());const n=Zh();return n&&t.setAttribute("nonce",n),document.head.insertBefore(t,document.head.firstChild),t},Zh=function(){const e=jl("trix-csp-nonce")||jl("csp-nonce");if(e){const{nonce:t,content:n}=e;return t==""?n:t}},jl=e=>document.head.querySelector("meta[name=".concat(e,"]")),Wl={"application/x-trix-feature-detection":"test"},pd=function(e){const t=e.getData("text/plain"),n=e.getData("text/html");if(!t||!n)return t?.length;{const{body:r}=new DOMParser().parseFromString(n,"text/html");if(r.textContent===t)return!r.querySelector("*")}},fd=/Mac|^iP/.test(navigator.platform)?e=>e.metaKey:e=>e.ctrlKey,vl=e=>setTimeout(e,1),vd=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t={};for(const n in e){const r=e[n];t[n]=r}return t},Vn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0},De=function(e){if(e!=null)return Array.isArray(e)||(e=[e,e]),[Vl(e[0]),Vl(e[1]!=null?e[1]:e[0])]},nn=function(e){if(e==null)return;const[t,n]=De(e);return Wi(t,n)},Pr=function(e,t){if(e==null||t==null)return;const[n,r]=De(e),[i,l]=De(t);return Wi(n,i)&&Wi(r,l)},Vl=function(e){return typeof e=="number"?e:vd(e)},Wi=function(e,t){return typeof e=="number"?e===t:Vn(e,t)};class gd extends it{constructor(){super(...arguments),this.update=this.update.bind(this),this.selectionManagers=[]}start(){this.started||(this.started=!0,document.addEventListener("selectionchange",this.update,!0))}stop(){if(this.started)return this.started=!1,document.removeEventListener("selectionchange",this.update,!0)}registerSelectionManager(t){if(!this.selectionManagers.includes(t))return this.selectionManagers.push(t),this.start()}unregisterSelectionManager(t){if(this.selectionManagers=this.selectionManagers.filter(n=>n!==t),this.selectionManagers.length===0)return this.stop()}notifySelectionManagersOfSelectionChange(){return this.selectionManagers.map(t=>t.selectionDidChange())}update(){this.notifySelectionManagersOfSelectionChange()}reset(){this.update()}}const In=new gd,md=function(){const e=window.getSelection();if(e.rangeCount>0)return e},sr=function(){var e;const t=(e=md())===null||e===void 0?void 0:e.getRangeAt(0);if(t&&!e0(t))return t},hd=function(e){const t=window.getSelection();return t.removeAllRanges(),t.addRange(e),In.update()},e0=e=>_l(e.startContainer)||_l(e.endContainer),_l=e=>!Object.getPrototypeOf(e),nr=e=>e.replace(new RegExp("".concat(ti),"g"),"").replace(new RegExp("".concat(pn),"g")," "),gl=new RegExp("[^\\S".concat(pn,"]")),ml=e=>e.replace(new RegExp("".concat(gl.source),"g")," ").replace(/\ {2,}/g," "),Ql=function(e,t){if(e.isEqualTo(t))return["",""];const n=hi(e,t),{length:r}=n.utf16String;let i;if(r){const{offset:l}=n,a=e.codepoints.slice(0,l).concat(e.codepoints.slice(l+r));i=hi(t,vr.fromCodepoints(a))}else i=hi(t,e);return[n.utf16String.toString(),i.utf16String.toString()]},hi=function(e,t){let n=0,r=e.length,i=t.length;for(;n<r&&e.charAt(n).isEqualTo(t.charAt(n));)n++;for(;r>n+1&&e.charAt(r-1).isEqualTo(t.charAt(i-1));)r--,i--;return{utf16String:e.slice(n,r),offset:n}};class It extends Bn{static fromCommonAttributesOfObjects(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(!t.length)return new this;let n=Jn(t[0]),r=n.getKeys();return t.slice(1).forEach(i=>{r=n.getKeysCommonToHash(Jn(i)),n=n.slice(r)}),n}static box(t){return Jn(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(...arguments),this.values=Dr(t)}add(t,n){return this.merge(t0(t,n))}remove(t){return new It(Dr(this.values,t))}get(t){return this.values[t]}has(t){return t in this.values}merge(t){return new It(n0(this.values,r0(t)))}slice(t){const n={};return Array.from(t).forEach(r=>{this.has(r)&&(n[r]=this.values[r])}),new It(n)}getKeys(){return Object.keys(this.values)}getKeysCommonToHash(t){return t=Jn(t),this.getKeys().filter(n=>this.values[n]===t.values[n])}isEqualTo(t){return Rn(this.toArray(),Jn(t).toArray())}isEmpty(){return this.getKeys().length===0}toArray(){if(!this.array){const t=[];for(const n in this.values){const r=this.values[n];t.push(t.push(n,r))}this.array=t.slice(0)}return this.array}toObject(){return Dr(this.values)}toJSON(){return this.toObject()}contentsForInspection(){return{values:JSON.stringify(this.values)}}}const t0=function(e,t){const n={};return n[e]=t,n},n0=function(e,t){const n=Dr(e);for(const r in t){const i=t[r];n[r]=i}return n},Dr=function(e,t){const n={};return Object.keys(e).sort().forEach(r=>{r!==t&&(n[r]=e[r])}),n},Jn=function(e){return e instanceof It?e:new It(e)},r0=function(e){return e instanceof It?e.values:e};class hl{static groupObjects(){let t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{depth:r,asTree:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};i&&r==null&&(r=0);const l=[];return Array.from(n).forEach(a=>{var o;if(t){var s,u,f;if((s=a.canBeGrouped)!==null&&s!==void 0&&s.call(a,r)&&(u=(f=t[t.length-1]).canBeGroupedWith)!==null&&u!==void 0&&u.call(f,a,r))return void t.push(a);l.push(new this(t,{depth:r,asTree:i})),t=null}(o=a.canBeGrouped)!==null&&o!==void 0&&o.call(a,r)?t=[a]:l.push(a)}),t&&l.push(new this(t,{depth:r,asTree:i})),l}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{depth:n,asTree:r}=arguments.length>1?arguments[1]:void 0;this.objects=t,r&&(this.depth=n,this.objects=this.constructor.groupObjects(this.objects,{asTree:r,depth:this.depth+1}))}getObjects(){return this.objects}getDepth(){return this.depth}getCacheKey(){const t=["objectGroup"];return Array.from(this.getObjects()).forEach(n=>{t.push(n.getCacheKey())}),t.join("/")}}class i0 extends it{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.objects={},Array.from(t).forEach(n=>{const r=JSON.stringify(n);this.objects[r]==null&&(this.objects[r]=n)})}find(t){const n=JSON.stringify(t);return this.objects[n]}}class a0{constructor(t){this.reset(t)}add(t){const n=ql(t);this.elements[n]=t}remove(t){const n=ql(t),r=this.elements[n];if(r)return delete this.elements[n],r}reset(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return this.elements={},Array.from(t).forEach(n=>{this.add(n)}),t}}const ql=e=>e.dataset.trixStoreKey;class Nr extends it{isPerforming(){return this.performing===!0}hasPerformed(){return this.performed===!0}hasSucceeded(){return this.performed&&this.succeeded}hasFailed(){return this.performed&&!this.succeeded}getPromise(){return this.promise||(this.promise=new Promise((t,n)=>(this.performing=!0,this.perform((r,i)=>{this.succeeded=r,this.performing=!1,this.performed=!0,this.succeeded?t(i):n(i)})))),this.promise}perform(t){return t(!1)}release(){var t,n;(t=this.promise)===null||t===void 0||(n=t.cancel)===null||n===void 0||n.call(t),this.promise=null,this.performing=null,this.performed=null,this.succeeded=null}}Nr.proxyMethod("getPromise().then"),Nr.proxyMethod("getPromise().catch");class Mn extends it{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.object=t,this.options=n,this.childViews=[],this.rootView=this}getNodes(){return this.nodes||(this.nodes=this.createNodes()),this.nodes.map(t=>t.cloneNode(!0))}invalidate(){var t;return this.nodes=null,this.childViews=[],(t=this.parentView)===null||t===void 0?void 0:t.invalidate()}invalidateViewForObject(t){var n;return(n=this.findViewForObject(t))===null||n===void 0?void 0:n.invalidate()}findOrCreateCachedChildView(t,n,r){let i=this.getCachedViewForObject(n);return i?this.recordChildView(i):(i=this.createChildView(...arguments),this.cacheViewForObject(i,n)),i}createChildView(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};n instanceof hl&&(r.viewClass=t,t=l0);const i=new t(n,r);return this.recordChildView(i)}recordChildView(t){return t.parentView=this,t.rootView=this.rootView,this.childViews.push(t),t}getAllChildViews(){let t=[];return this.childViews.forEach(n=>{t.push(n),t=t.concat(n.getAllChildViews())}),t}findElement(){return this.findElementForObject(this.object)}findElementForObject(t){const n=t?.id;if(n)return this.rootView.element.querySelector("[data-trix-id='".concat(n,"']"))}findViewForObject(t){for(const n of this.getAllChildViews())if(n.object===t)return n}getViewCache(){return this.rootView!==this?this.rootView.getViewCache():this.isViewCachingEnabled()?(this.viewCache||(this.viewCache={}),this.viewCache):void 0}isViewCachingEnabled(){return this.shouldCacheViews!==!1}enableViewCaching(){this.shouldCacheViews=!0}disableViewCaching(){this.shouldCacheViews=!1}getCachedViewForObject(t){var n;return(n=this.getViewCache())===null||n===void 0?void 0:n[t.getCacheKey()]}cacheViewForObject(t,n){const r=this.getViewCache();r&&(r[n.getCacheKey()]=t)}garbageCollectCachedViews(){const t=this.getViewCache();if(t){const n=this.getAllChildViews().concat(this).map(r=>r.object.getCacheKey());for(const r in t)n.includes(r)||delete t[r]}}}class l0 extends Mn{constructor(){super(...arguments),this.objectGroup=this.object,this.viewClass=this.options.viewClass,delete this.options.viewClass}getChildViews(){return this.childViews.length||Array.from(this.objectGroup.getObjects()).forEach(t=>{this.findOrCreateCachedChildView(this.viewClass,t,this.options)}),this.childViews}createNodes(){const t=this.createContainerElement();return this.getChildViews().forEach(n=>{Array.from(n.getNodes()).forEach(r=>{t.appendChild(r)})}),[t]}createContainerElement(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.objectGroup.getDepth();return this.getChildViews()[0].createContainerElement(t)}}/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */const{entries:bd,setPrototypeOf:Kl,isFrozen:o0,getPrototypeOf:s0,getOwnPropertyDescriptor:d0}=Object;let{freeze:bt,seal:zt,create:wd}=Object,{apply:Vi,construct:_i}=typeof Reflect<"u"&&Reflect;bt||(bt=function(e){return e}),zt||(zt=function(e){return e}),Vi||(Vi=function(e,t,n){return e.apply(t,n)}),_i||(_i=function(e,t){return new e(...t)});const Er=wt(Array.prototype.forEach),u0=wt(Array.prototype.lastIndexOf),Gl=wt(Array.prototype.pop),Yn=wt(Array.prototype.push),c0=wt(Array.prototype.splice),Or=wt(String.prototype.toLowerCase),bi=wt(String.prototype.toString),Jl=wt(String.prototype.match),Xn=wt(String.prototype.replace),p0=wt(String.prototype.indexOf),f0=wt(String.prototype.trim),Ht=wt(Object.prototype.hasOwnProperty),ft=wt(RegExp.prototype.test),Zn=(Yl=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _i(Yl,t)});var Yl;function wt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Vi(e,t,r)}}function Ee(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Or;Kl&&Kl(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const l=n(i);l!==i&&(o0(t)||(t[r]=l),i=l)}e[i]=!0}return e}function v0(e){for(let t=0;t<e.length;t++)Ht(e,t)||(e[t]=null);return e}function kn(e){const t=wd(null);for(const[n,r]of bd(e))Ht(e,n)&&(Array.isArray(r)?t[n]=v0(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=kn(r):t[n]=r);return t}function er(e,t){for(;e!==null;){const n=d0(e,t);if(n){if(n.get)return wt(n.get);if(typeof n.value=="function")return wt(n.value)}e=s0(e)}return function(){return null}}const Xl=bt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),wi=bt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),yi=bt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),g0=bt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ki=bt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),m0=bt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Zl=bt(["#text"]),eo=bt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ci=bt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),to=bt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Lr=bt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),h0=zt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),b0=zt(/<%[\w\W]*|[\w\W]*%>/gm),w0=zt(/\$\{[\w\W]*/gm),y0=zt(/^data-[\-\w.\u00B7-\uFFFF]+$/),k0=zt(/^aria-[\-\w]+$/),yd=zt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),C0=zt(/^(?:\w+script|data):/i),A0=zt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),kd=zt(/^html$/i),E0=zt(/^[a-z][.\w]*(-[.\w]+)+$/i);var no=Object.freeze({__proto__:null,ARIA_ATTR:k0,ATTR_WHITESPACE:A0,CUSTOM_ELEMENT:E0,DATA_ATTR:y0,DOCTYPE_NAME:kd,ERB_EXPR:b0,IS_ALLOWED_URI:yd,IS_SCRIPT_OR_DATA:C0,MUSTACHE_EXPR:h0,TMPLIT_EXPR:w0});const L0=1,x0=3,S0=7,T0=8,R0=9,I0=function(){return typeof window>"u"?null:window};var Hr=function e(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:I0();const n=g=>e(g);if(n.version="3.2.5",n.removed=[],!t||!t.document||t.document.nodeType!==R0||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const i=r,l=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:u,NodeFilter:f,NamedNodeMap:S=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:M,DOMParser:C,trustedTypes:E}=t,k=u.prototype,x=er(k,"cloneNode"),O=er(k,"remove"),D=er(k,"nextSibling"),L=er(k,"childNodes"),P=er(k,"parentNode");if(typeof o=="function"){const g=r.createElement("template");g.content&&g.content.ownerDocument&&(r=g.content.ownerDocument)}let H,I="";const{implementation:te,createNodeIterator:G,createDocumentFragment:z,getElementsByTagName:re}=r,{importNode:Z}=i;let _={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported=typeof bd=="function"&&typeof P=="function"&&te&&te.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ae,ERB_EXPR:we,TMPLIT_EXPR:de,DATA_ATTR:be,ARIA_ATTR:fe,IS_SCRIPT_OR_DATA:Ke,ATTR_WHITESPACE:pe,CUSTOM_ELEMENT:ve}=no;let{IS_ALLOWED_URI:W}=no,ee=null;const at=Ee({},[...Xl,...wi,...yi,...ki,...Zl]);let oe=null;const le=Ee({},[...eo,...Ci,...to,...Lr]);let R=Object.seal(wd(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ne=null,Te=null,lt=!0,Mt=!0,Vt=!1,Et=!0,Lt=!1,Pt=!0,et=!1,_t=!1,yt=!1,Ge=!1,tt=!1,nt=!1,kt=!0,xt=!1,Be=!0,ot=!1,qe={},ut=null;const Ct=Ee({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Dt=null;const ln=Ee({},["audio","video","img","source","image","track"]);let ct=null;const Ot=Ee({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zt="http://www.w3.org/1998/Math/MathML",Nt="http://www.w3.org/2000/svg",St="http://www.w3.org/1999/xhtml";let pt=St,At=!1,bn=null;const On=Ee({},[Zt,Nt,St],bi);let Tt=Ee({},["mi","mo","mn","ms","mtext"]),Rt=Ee({},["annotation-xml"]);const wn=Ee({},["title","style","font","a","script"]);let Qt=null;const Qn=["application/xhtml+xml","text/html"];let Pe=null,c=null;const b=r.createElement("form"),y=function(g){return g instanceof RegExp||g instanceof Function},$=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!c||c!==g){if(g&&typeof g=="object"||(g={}),g=kn(g),Qt=Qn.indexOf(g.PARSER_MEDIA_TYPE)===-1?"text/html":g.PARSER_MEDIA_TYPE,Pe=Qt==="application/xhtml+xml"?bi:Or,ee=Ht(g,"ALLOWED_TAGS")?Ee({},g.ALLOWED_TAGS,Pe):at,oe=Ht(g,"ALLOWED_ATTR")?Ee({},g.ALLOWED_ATTR,Pe):le,bn=Ht(g,"ALLOWED_NAMESPACES")?Ee({},g.ALLOWED_NAMESPACES,bi):On,ct=Ht(g,"ADD_URI_SAFE_ATTR")?Ee(kn(Ot),g.ADD_URI_SAFE_ATTR,Pe):Ot,Dt=Ht(g,"ADD_DATA_URI_TAGS")?Ee(kn(ln),g.ADD_DATA_URI_TAGS,Pe):ln,ut=Ht(g,"FORBID_CONTENTS")?Ee({},g.FORBID_CONTENTS,Pe):Ct,ne=Ht(g,"FORBID_TAGS")?Ee({},g.FORBID_TAGS,Pe):{},Te=Ht(g,"FORBID_ATTR")?Ee({},g.FORBID_ATTR,Pe):{},qe=!!Ht(g,"USE_PROFILES")&&g.USE_PROFILES,lt=g.ALLOW_ARIA_ATTR!==!1,Mt=g.ALLOW_DATA_ATTR!==!1,Vt=g.ALLOW_UNKNOWN_PROTOCOLS||!1,Et=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Lt=g.SAFE_FOR_TEMPLATES||!1,Pt=g.SAFE_FOR_XML!==!1,et=g.WHOLE_DOCUMENT||!1,Ge=g.RETURN_DOM||!1,tt=g.RETURN_DOM_FRAGMENT||!1,nt=g.RETURN_TRUSTED_TYPE||!1,yt=g.FORCE_BODY||!1,kt=g.SANITIZE_DOM!==!1,xt=g.SANITIZE_NAMED_PROPS||!1,Be=g.KEEP_CONTENT!==!1,ot=g.IN_PLACE||!1,W=g.ALLOWED_URI_REGEXP||yd,pt=g.NAMESPACE||St,Tt=g.MATHML_TEXT_INTEGRATION_POINTS||Tt,Rt=g.HTML_INTEGRATION_POINTS||Rt,R=g.CUSTOM_ELEMENT_HANDLING||{},g.CUSTOM_ELEMENT_HANDLING&&y(g.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(R.tagNameCheck=g.CUSTOM_ELEMENT_HANDLING.tagNameCheck),g.CUSTOM_ELEMENT_HANDLING&&y(g.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(R.attributeNameCheck=g.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),g.CUSTOM_ELEMENT_HANDLING&&typeof g.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(R.allowCustomizedBuiltInElements=g.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Lt&&(Mt=!1),tt&&(Ge=!0),qe&&(ee=Ee({},Zl),oe=[],qe.html===!0&&(Ee(ee,Xl),Ee(oe,eo)),qe.svg===!0&&(Ee(ee,wi),Ee(oe,Ci),Ee(oe,Lr)),qe.svgFilters===!0&&(Ee(ee,yi),Ee(oe,Ci),Ee(oe,Lr)),qe.mathMl===!0&&(Ee(ee,ki),Ee(oe,to),Ee(oe,Lr))),g.ADD_TAGS&&(ee===at&&(ee=kn(ee)),Ee(ee,g.ADD_TAGS,Pe)),g.ADD_ATTR&&(oe===le&&(oe=kn(oe)),Ee(oe,g.ADD_ATTR,Pe)),g.ADD_URI_SAFE_ATTR&&Ee(ct,g.ADD_URI_SAFE_ATTR,Pe),g.FORBID_CONTENTS&&(ut===Ct&&(ut=kn(ut)),Ee(ut,g.FORBID_CONTENTS,Pe)),Be&&(ee["#text"]=!0),et&&Ee(ee,["html","head","body"]),ee.table&&(Ee(ee,["tbody"]),delete ne.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw Zn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Zn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');H=g.TRUSTED_TYPES_POLICY,I=H.createHTML("")}else H===void 0&&(H=function(K,V){if(typeof K!="object"||typeof K.createPolicy!="function")return null;let ce=null;const Ae="data-tt-policy-suffix";V&&V.hasAttribute(Ae)&&(ce=V.getAttribute(Ae));const v="dompurify"+(ce?"#"+ce:"");try{return K.createPolicy(v,{createHTML:B=>B,createScriptURL:B=>B})}catch{return null}}(E,l)),H!==null&&typeof I=="string"&&(I=H.createHTML(""));bt&&bt(g),c=g}},U=Ee({},[...wi,...yi,...g0]),j=Ee({},[...ki,...m0]),J=function(g){Yn(n.removed,{element:g});try{P(g).removeChild(g)}catch{O(g)}},Q=function(g,K){try{Yn(n.removed,{attribute:K.getAttributeNode(g),from:K})}catch{Yn(n.removed,{attribute:null,from:K})}if(K.removeAttribute(g),g==="is")if(Ge||tt)try{J(K)}catch{}else try{K.setAttribute(g,"")}catch{}},Re=function(g){let K=null,V=null;if(yt)g="<remove></remove>"+g;else{const v=Jl(g,/^[\r\n\t ]+/);V=v&&v[0]}Qt==="application/xhtml+xml"&&pt===St&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");const ce=H?H.createHTML(g):g;if(pt===St)try{K=new C().parseFromString(ce,Qt)}catch{}if(!K||!K.documentElement){K=te.createDocument(pt,"template",null);try{K.documentElement.innerHTML=At?I:ce}catch{}}const Ae=K.body||K.documentElement;return g&&V&&Ae.insertBefore(r.createTextNode(V),Ae.childNodes[0]||null),pt===St?re.call(K,et?"html":"body")[0]:et?K.documentElement:Ae},Ie=function(g){return G.call(g.ownerDocument||g,g,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},Ce=function(g){return g instanceof M&&(typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||!(g.attributes instanceof S)||typeof g.removeAttribute!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function")},$e=function(g){return typeof s=="function"&&g instanceof s};function ge(g,K,V){Er(g,ce=>{ce.call(n,K,V,c)})}const He=function(g){let K=null;if(ge(_.beforeSanitizeElements,g,null),Ce(g))return J(g),!0;const V=Pe(g.nodeName);if(ge(_.uponSanitizeElement,g,{tagName:V,allowedTags:ee}),g.hasChildNodes()&&!$e(g.firstElementChild)&&ft(/<[/\w!]/g,g.innerHTML)&&ft(/<[/\w!]/g,g.textContent)||g.nodeType===S0||Pt&&g.nodeType===T0&&ft(/<[/\w]/g,g.data))return J(g),!0;if(!ee[V]||ne[V]){if(!ne[V]&&Ue(V)&&(R.tagNameCheck instanceof RegExp&&ft(R.tagNameCheck,V)||R.tagNameCheck instanceof Function&&R.tagNameCheck(V)))return!1;if(Be&&!ut[V]){const ce=P(g)||g.parentNode,Ae=L(g)||g.childNodes;if(Ae&&ce)for(let v=Ae.length-1;v>=0;--v){const B=x(Ae[v],!0);B.__removalCount=(g.__removalCount||0)+1,ce.insertBefore(B,D(g))}}return J(g),!0}return g instanceof u&&!function(ce){let Ae=P(ce);Ae&&Ae.tagName||(Ae={namespaceURI:pt,tagName:"template"});const v=Or(ce.tagName),B=Or(Ae.tagName);return!!bn[ce.namespaceURI]&&(ce.namespaceURI===Nt?Ae.namespaceURI===St?v==="svg":Ae.namespaceURI===Zt?v==="svg"&&(B==="annotation-xml"||Tt[B]):!!U[v]:ce.namespaceURI===Zt?Ae.namespaceURI===St?v==="math":Ae.namespaceURI===Nt?v==="math"&&Rt[B]:!!j[v]:ce.namespaceURI===St?!(Ae.namespaceURI===Nt&&!Rt[B])&&!(Ae.namespaceURI===Zt&&!Tt[B])&&!j[v]&&(wn[v]||!U[v]):!(Qt!=="application/xhtml+xml"||!bn[ce.namespaceURI]))}(g)?(J(g),!0):V!=="noscript"&&V!=="noembed"&&V!=="noframes"||!ft(/<\/no(script|embed|frames)/i,g.innerHTML)?(Lt&&g.nodeType===x0&&(K=g.textContent,Er([ae,we,de],ce=>{K=Xn(K,ce," ")}),g.textContent!==K&&(Yn(n.removed,{element:g.cloneNode()}),g.textContent=K)),ge(_.afterSanitizeElements,g,null),!1):(J(g),!0)},Je=function(g,K,V){if(kt&&(K==="id"||K==="name")&&(V in r||V in b))return!1;if(!(Mt&&!Te[K]&&ft(be,K))){if(!(lt&&ft(fe,K))){if(!oe[K]||Te[K]){if(!(Ue(g)&&(R.tagNameCheck instanceof RegExp&&ft(R.tagNameCheck,g)||R.tagNameCheck instanceof Function&&R.tagNameCheck(g))&&(R.attributeNameCheck instanceof RegExp&&ft(R.attributeNameCheck,K)||R.attributeNameCheck instanceof Function&&R.attributeNameCheck(K))||K==="is"&&R.allowCustomizedBuiltInElements&&(R.tagNameCheck instanceof RegExp&&ft(R.tagNameCheck,V)||R.tagNameCheck instanceof Function&&R.tagNameCheck(V))))return!1}else if(!ct[K]){if(!ft(W,Xn(V,pe,""))){if((K!=="src"&&K!=="xlink:href"&&K!=="href"||g==="script"||p0(V,"data:")!==0||!Dt[g])&&!(Vt&&!ft(Ke,Xn(V,pe,"")))){if(V)return!1}}}}}return!0},Ue=function(g){return g!=="annotation-xml"&&Jl(g,ve)},We=function(g){ge(_.beforeSanitizeAttributes,g,null);const{attributes:K}=g;if(!K||Ce(g))return;const V={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:oe,forceKeepAttr:void 0};let ce=K.length;for(;ce--;){const Ae=K[ce],{name:v,namespaceURI:B,value:ue}=Ae,Me=Pe(v);let Ve=v==="value"?ue:f0(ue);if(V.attrName=Me,V.attrValue=Ve,V.keepAttr=!0,V.forceKeepAttr=void 0,ge(_.uponSanitizeAttribute,g,V),Ve=V.attrValue,!xt||Me!=="id"&&Me!=="name"||(Q(v,g),Ve="user-content-"+Ve),Pt&&ft(/((--!?|])>)|<\/(style|title)/i,Ve)){Q(v,g);continue}if(V.forceKeepAttr||(Q(v,g),!V.keepAttr))continue;if(!Et&&ft(/\/>/i,Ve)){Q(v,g);continue}Lt&&Er([ae,we,de],li=>{Ve=Xn(Ve,li," ")});const qn=Pe(g.nodeName);if(Je(qn,Me,Ve)){if(H&&typeof E=="object"&&typeof E.getAttributeType=="function"&&!B)switch(E.getAttributeType(qn,Me)){case"TrustedHTML":Ve=H.createHTML(Ve);break;case"TrustedScriptURL":Ve=H.createScriptURL(Ve)}try{B?g.setAttributeNS(B,v,Ve):g.setAttribute(v,Ve),Ce(g)?J(g):Gl(n.removed)}catch{}}}ge(_.afterSanitizeAttributes,g,null)},qt=function g(K){let V=null;const ce=Ie(K);for(ge(_.beforeSanitizeShadowDOM,K,null);V=ce.nextNode();)ge(_.uponSanitizeShadowNode,V,null),He(V),We(V),V.content instanceof a&&g(V.content);ge(_.afterSanitizeShadowDOM,K,null)};return n.sanitize=function(g){let K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},V=null,ce=null,Ae=null,v=null;if(At=!g,At&&(g="<!-->"),typeof g!="string"&&!$e(g)){if(typeof g.toString!="function")throw Zn("toString is not a function");if(typeof(g=g.toString())!="string")throw Zn("dirty is not a string, aborting")}if(!n.isSupported)return g;if(_t||$(K),n.removed=[],typeof g=="string"&&(ot=!1),ot){if(g.nodeName){const Me=Pe(g.nodeName);if(!ee[Me]||ne[Me])throw Zn("root node is forbidden and cannot be sanitized in-place")}}else if(g instanceof s)V=Re("<!---->"),ce=V.ownerDocument.importNode(g,!0),ce.nodeType===L0&&ce.nodeName==="BODY"||ce.nodeName==="HTML"?V=ce:V.appendChild(ce);else{if(!Ge&&!Lt&&!et&&g.indexOf("<")===-1)return H&&nt?H.createHTML(g):g;if(V=Re(g),!V)return Ge?null:nt?I:""}V&&yt&&J(V.firstChild);const B=Ie(ot?g:V);for(;Ae=B.nextNode();)He(Ae),We(Ae),Ae.content instanceof a&&qt(Ae.content);if(ot)return g;if(Ge){if(tt)for(v=z.call(V.ownerDocument);V.firstChild;)v.appendChild(V.firstChild);else v=V;return(oe.shadowroot||oe.shadowrootmode)&&(v=Z.call(i,v,!0)),v}let ue=et?V.outerHTML:V.innerHTML;return et&&ee["!doctype"]&&V.ownerDocument&&V.ownerDocument.doctype&&V.ownerDocument.doctype.name&&ft(kd,V.ownerDocument.doctype.name)&&(ue="<!DOCTYPE "+V.ownerDocument.doctype.name+`>
5947
- `+ue),Lt&&Er([ae,we,de],Me=>{ue=Xn(ue,Me," ")}),H&&nt?H.createHTML(ue):ue},n.setConfig=function(){$(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),_t=!0},n.clearConfig=function(){c=null,_t=!1},n.isValidAttribute=function(g,K,V){c||$({});const ce=Pe(g),Ae=Pe(K);return Je(ce,Ae,V)},n.addHook=function(g,K){typeof K=="function"&&Yn(_[g],K)},n.removeHook=function(g,K){if(K!==void 0){const V=u0(_[g],K);return V===-1?void 0:c0(_[g],V,1)[0]}return Gl(_[g])},n.removeHooks=function(g){_[g]=[]},n.removeAllHooks=function(){_={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();Hr.addHook("uponSanitizeAttribute",function(e,t){/^data-trix-/.test(t.attrName)&&(t.forceKeepAttr=!0)});const B0="style href src width height language class".split(" "),M0="javascript:".split(" "),D0="script iframe form noscript".split(" ");class ni extends it{static setHTML(t,n,r){const i=new this(n,r).sanitize(),l=i.getHTML?i.getHTML():i.outerHTML;t.innerHTML=l}static sanitize(t,n){const r=new this(t,n);return r.sanitize(),r}constructor(t){let{allowedAttributes:n,forbiddenProtocols:r,forbiddenElements:i,purifyOptions:l}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.allowedAttributes=n||B0,this.forbiddenProtocols=r||M0,this.forbiddenElements=i||D0,this.purifyOptions=l||{},this.body=O0(t)}sanitize(){this.sanitizeElements(),this.normalizeListElementNesting();const t=Object.assign({},ad,this.purifyOptions);return Hr.setConfig(t),this.body=Hr.sanitize(this.body),this.body}getHTML(){return this.body.innerHTML}getBody(){return this.body}sanitizeElements(){const t=zr(this.body),n=[];for(;t.nextNode();){const r=t.currentNode;switch(r.nodeType){case Node.ELEMENT_NODE:this.elementIsRemovable(r)?n.push(r):this.sanitizeElement(r);break;case Node.COMMENT_NODE:n.push(r)}}return n.forEach(r=>mn(r)),this.body}sanitizeElement(t){return t.hasAttribute("href")&&this.forbiddenProtocols.includes(t.protocol)&&t.removeAttribute("href"),Array.from(t.attributes).forEach(n=>{let{name:r}=n;this.allowedAttributes.includes(r)||r.indexOf("data-trix")===0||t.removeAttribute(r)}),t}normalizeListElementNesting(){return Array.from(this.body.querySelectorAll("ul,ol")).forEach(t=>{const n=t.previousElementSibling;n&&gt(n)==="li"&&n.appendChild(t)}),this.body}elementIsRemovable(t){if(t?.nodeType===Node.ELEMENT_NODE)return this.elementIsForbidden(t)||this.elementIsntSerializable(t)}elementIsForbidden(t){return this.forbiddenElements.includes(gt(t))}elementIsntSerializable(t){return t.getAttribute("data-trix-serialize")==="false"&&!xn(t)}}const O0=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";e=e.replace(/<\/html[^>]*>[^]*$/i,"</html>");const t=document.implementation.createHTMLDocument("");return t.documentElement.innerHTML=e,Array.from(t.head.querySelectorAll("style")).forEach(n=>{t.body.appendChild(n)}),t.body},{css:sn}=kr;class bl extends Mn{constructor(){super(...arguments),this.attachment=this.object,this.attachment.uploadProgressDelegate=this,this.attachmentPiece=this.options.piece}createContentNodes(){return[]}createNodes(){let t;const n=t=ke({tagName:"figure",className:this.getClassName(),data:this.getData(),editable:!1}),r=this.getHref();return r&&(t=ke({tagName:"a",editable:!1,attributes:{href:r,tabindex:-1}}),n.appendChild(t)),this.attachment.hasContent()?ni.setHTML(t,this.attachment.getContent()):this.createContentNodes().forEach(i=>{t.appendChild(i)}),t.appendChild(this.createCaptionElement()),this.attachment.isPending()&&(this.progressElement=ke({tagName:"progress",attributes:{class:sn.attachmentProgress,value:this.attachment.getUploadProgress(),max:100},data:{trixMutable:!0,trixStoreKey:["progressElement",this.attachment.id].join("/")}}),n.appendChild(this.progressElement)),[ro("left"),n,ro("right")]}createCaptionElement(){const t=ke({tagName:"figcaption",className:sn.attachmentCaption}),n=this.attachmentPiece.getCaption();if(n)t.classList.add("".concat(sn.attachmentCaption,"--edited")),t.textContent=n;else{let r,i;const l=this.getCaptionConfig();if(l.name&&(r=this.attachment.getFilename()),l.size&&(i=this.attachment.getFormattedFilesize()),r){const a=ke({tagName:"span",className:sn.attachmentName,textContent:r});t.appendChild(a)}if(i){r&&t.appendChild(document.createTextNode(" "));const a=ke({tagName:"span",className:sn.attachmentSize,textContent:i});t.appendChild(a)}}return t}getClassName(){const t=[sn.attachment,"".concat(sn.attachment,"--").concat(this.attachment.getType())],n=this.attachment.getExtension();return n&&t.push("".concat(sn.attachment,"--").concat(n)),t.join(" ")}getData(){const t={trixAttachment:JSON.stringify(this.attachment),trixContentType:this.attachment.getContentType(),trixId:this.attachment.id},{attributes:n}=this.attachmentPiece;return n.isEmpty()||(t.trixAttributes=JSON.stringify(n)),this.attachment.isPending()&&(t.trixSerialize=!1),t}getHref(){if(!$0(this.attachment.getContent(),"a"))return this.attachment.getHref()}getCaptionConfig(){var t;const n=this.attachment.getType(),r=vd((t=dl[n])===null||t===void 0?void 0:t.caption);return n==="file"&&(r.name=!0),r}findProgressElement(){var t;return(t=this.findElement())===null||t===void 0?void 0:t.querySelector("progress")}attachmentDidChangeUploadProgress(){const t=this.attachment.getUploadProgress(),n=this.findProgressElement();n&&(n.value=t)}}const ro=e=>ke({tagName:"span",textContent:ti,data:{trixCursorTarget:e,trixSerialize:!1}}),$0=function(e,t){const n=ke("div");return ni.setHTML(n,e||""),n.querySelector(t)};class Cd extends bl{constructor(){super(...arguments),this.attachment.previewDelegate=this}createContentNodes(){return this.image=ke({tagName:"img",attributes:{src:""},data:{trixMutable:!0}}),this.refresh(this.image),[this.image]}createCaptionElement(){const t=super.createCaptionElement(...arguments);return t.textContent||t.setAttribute("data-trix-placeholder",me.captionPlaceholder),t}refresh(t){var n;if(t||(t=(n=this.findElement())===null||n===void 0?void 0:n.querySelector("img")),t)return this.updateAttributesForImage(t)}updateAttributesForImage(t){const n=this.attachment.getURL(),r=this.attachment.getPreviewURL();if(t.src=r||n,r===n)t.removeAttribute("data-trix-serialized-attributes");else{const o=JSON.stringify({src:n});t.setAttribute("data-trix-serialized-attributes",o)}const i=this.attachment.getWidth(),l=this.attachment.getHeight();i!=null&&(t.width=i),l!=null&&(t.height=l);const a=["imageElement",this.attachment.id,t.src,t.width,t.height].join("/");t.dataset.trixStoreKey=a}attachmentDidChangeAttributes(){return this.refresh(this.image),this.refresh()}}class Ad extends Mn{constructor(){super(...arguments),this.piece=this.object,this.attributes=this.piece.getAttributes(),this.textConfig=this.options.textConfig,this.context=this.options.context,this.piece.attachment?this.attachment=this.piece.attachment:this.string=this.piece.toString()}createNodes(){let t=this.attachment?this.createAttachmentNodes():this.createStringNodes();const n=this.createElement();if(n){const r=function(i){for(;(l=i)!==null&&l!==void 0&&l.firstElementChild;){var l;i=i.firstElementChild}return i}(n);Array.from(t).forEach(i=>{r.appendChild(i)}),t=[n]}return t}createAttachmentNodes(){const t=this.attachment.isPreviewable()?Cd:bl;return this.createChildView(t,this.piece.attachment,{piece:this.piece}).getNodes()}createStringNodes(){var t;if((t=this.textConfig)!==null&&t!==void 0&&t.plaintext)return[document.createTextNode(this.string)];{const n=[],r=this.string.split(`
5948
- `);for(let i=0;i<r.length;i++){const l=r[i];if(i>0){const a=ke("br");n.push(a)}if(l.length){const a=document.createTextNode(this.preserveSpaces(l));n.push(a)}}return n}}createElement(){let t,n,r;const i={};for(n in this.attributes){r=this.attributes[n];const a=ji(n);if(a){if(a.tagName){var l;const o=ke(a.tagName);l?(l.appendChild(o),l=o):t=l=o}if(a.styleProperty&&(i[a.styleProperty]=r),a.style)for(n in a.style)r=a.style[n],i[n]=r}}if(Object.keys(i).length)for(n in t||(t=ke("span")),i)r=i[n],t.style[n]=r;return t}createContainerElement(){for(const t in this.attributes){const n=this.attributes[t],r=ji(t);if(r&&r.groupTagName){const i={};return i[t]=n,ke(r.groupTagName,i)}}}preserveSpaces(t){return this.context.isLast&&(t=t.replace(/\ $/,pn)),t=t.replace(/(\S)\ {3}(\S)/g,"$1 ".concat(pn," $2")).replace(/\ {2}/g,"".concat(pn," ")).replace(/\ {2}/g," ".concat(pn)),(this.context.isFirst||this.context.followsWhitespace)&&(t=t.replace(/^\ /,pn)),t}}class Ed extends Mn{constructor(){super(...arguments),this.text=this.object,this.textConfig=this.options.textConfig}createNodes(){const t=[],n=hl.groupObjects(this.getPieces()),r=n.length-1;for(let l=0;l<n.length;l++){const a=n[l],o={};l===0&&(o.isFirst=!0),l===r&&(o.isLast=!0),F0(i)&&(o.followsWhitespace=!0);const s=this.findOrCreateCachedChildView(Ad,a,{textConfig:this.textConfig,context:o});t.push(...Array.from(s.getNodes()||[]));var i=a}return t}getPieces(){return Array.from(this.text.getPieces()).filter(t=>!t.hasAttribute("blockBreak"))}}const F0=e=>/\s$/.test(e?.toString()),{css:io}=kr;class Ld extends Mn{constructor(){super(...arguments),this.block=this.object,this.attributes=this.block.getAttributes()}createNodes(){const t=[document.createComment("block")];if(this.block.isEmpty())t.push(ke("br"));else{var n;const r=(n=Xe(this.block.getLastAttribute()))===null||n===void 0?void 0:n.text,i=this.findOrCreateCachedChildView(Ed,this.block.text,{textConfig:r});t.push(...Array.from(i.getNodes()||[])),this.shouldAddExtraNewlineElement()&&t.push(ke("br"))}if(this.attributes.length)return t;{let r;const{tagName:i}=mt.default;this.block.isRTL()&&(r={dir:"rtl"});const l=ke({tagName:i,attributes:r});return t.forEach(a=>l.appendChild(a)),[l]}}createContainerElement(t){const n={};let r;const i=this.attributes[t],{tagName:l,htmlAttributes:a=[]}=Xe(i);if(t===0&&this.block.isRTL()&&Object.assign(n,{dir:"rtl"}),i==="attachmentGallery"){const o=this.block.getBlockBreakPosition();r="".concat(io.attachmentGallery," ").concat(io.attachmentGallery,"--").concat(o)}return Object.entries(this.block.htmlAttributes).forEach(o=>{let[s,u]=o;a.includes(s)&&(n[s]=u)}),ke({tagName:l,className:r,attributes:n})}shouldAddExtraNewlineElement(){return/\n\n$/.test(this.block.toString())}}class ri extends Mn{static render(t){const n=ke("div"),r=new this(t,{element:n});return r.render(),r.sync(),n}constructor(){super(...arguments),this.element=this.options.element,this.elementStore=new a0,this.setDocument(this.object)}setDocument(t){t.isEqualTo(this.document)||(this.document=this.object=t)}render(){if(this.childViews=[],this.shadowElement=ke("div"),!this.document.isEmpty()){const t=hl.groupObjects(this.document.getBlocks(),{asTree:!0});Array.from(t).forEach(n=>{const r=this.findOrCreateCachedChildView(Ld,n);Array.from(r.getNodes()).map(i=>this.shadowElement.appendChild(i))})}}isSynced(){return z0(this.shadowElement,this.element)}sync(){const t=this.createDocumentFragmentForSync();for(;this.element.lastChild;)this.element.removeChild(this.element.lastChild);return this.element.appendChild(t),this.didSync()}didSync(){return this.elementStore.reset(ao(this.element)),vl(()=>this.garbageCollectCachedViews())}createDocumentFragmentForSync(){const t=document.createDocumentFragment();return Array.from(this.shadowElement.childNodes).forEach(n=>{t.appendChild(n.cloneNode(!0))}),Array.from(ao(t)).forEach(n=>{const r=this.elementStore.remove(n);r&&n.parentNode.replaceChild(r,n)}),t}}const ao=e=>e.querySelectorAll("[data-trix-store-key]"),z0=(e,t)=>lo(e.innerHTML)===lo(t.innerHTML),lo=e=>e.replace(/&nbsp;/g," ");function ht(e,t,n){return(t=P0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P0(e){var t=function(n,r){if(typeof n!="object"||n===null)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var l=i.call(n,r);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return typeof t=="symbol"?t:String(t)}function Ne(e,t){return N0(e,xd(e,t,"get"))}function wl(e,t,n){return H0(e,xd(e,t,"set"),n),n}function xd(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function N0(e,t){return t.get?t.get.call(e):t.value}function H0(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function xr(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return n}function Sd(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function dr(e,t,n){Sd(e,t),t.set(e,n)}class Dn extends Bn{static registerType(t,n){n.type=t,this.types[t]=n}static fromJSON(t){const n=this.types[t.type];if(n)return n.fromJSON(t)}constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.attributes=It.box(n)}copyWithAttributes(t){return new this.constructor(this.getValue(),t)}copyWithAdditionalAttributes(t){return this.copyWithAttributes(this.attributes.merge(t))}copyWithoutAttribute(t){return this.copyWithAttributes(this.attributes.remove(t))}copy(){return this.copyWithAttributes(this.attributes)}getAttribute(t){return this.attributes.get(t)}getAttributesHash(){return this.attributes}getAttributes(){return this.attributes.toObject()}hasAttribute(t){return this.attributes.has(t)}hasSameStringValueAsPiece(t){return t&&this.toString()===t.toString()}hasSameAttributesAsPiece(t){return t&&(this.attributes===t.attributes||this.attributes.isEqualTo(t.attributes))}isBlockBreak(){return!1}isEqualTo(t){return super.isEqualTo(...arguments)||this.hasSameConstructorAs(t)&&this.hasSameStringValueAsPiece(t)&&this.hasSameAttributesAsPiece(t)}isEmpty(){return this.length===0}isSerializable(){return!0}toJSON(){return{type:this.constructor.type,attributes:this.getAttributes()}}contentsForInspection(){return{type:this.constructor.type,attributes:this.attributes.inspect()}}canBeGrouped(){return this.hasAttribute("href")}canBeGroupedWith(t){return this.getAttribute("href")===t.getAttribute("href")}getLength(){return this.length}canBeConsolidatedWith(t){return!1}}ht(Dn,"types",{});class Td extends Nr{constructor(t){super(...arguments),this.url=t}perform(t){const n=new Image;n.onload=()=>(n.width=this.width=n.naturalWidth,n.height=this.height=n.naturalHeight,t(!0,n)),n.onerror=()=>t(!1),n.src=this.url}}class _n extends Bn{static attachmentForFile(t){const n=new this(this.attributesForFile(t));return n.setFile(t),n}static attributesForFile(t){return new It({filename:t.name,filesize:t.size,contentType:t.type})}static fromJSON(t){return new this(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(t),this.releaseFile=this.releaseFile.bind(this),this.attributes=It.box(t),this.didChangeAttributes()}getAttribute(t){return this.attributes.get(t)}hasAttribute(t){return this.attributes.has(t)}getAttributes(){return this.attributes.toObject()}setAttributes(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=this.attributes.merge(t);var r,i,l,a;if(!this.attributes.isEqualTo(n))return this.attributes=n,this.didChangeAttributes(),(r=this.previewDelegate)===null||r===void 0||(i=r.attachmentDidChangeAttributes)===null||i===void 0||i.call(r,this),(l=this.delegate)===null||l===void 0||(a=l.attachmentDidChangeAttributes)===null||a===void 0?void 0:a.call(l,this)}didChangeAttributes(){if(this.isPreviewable())return this.preloadURL()}isPending(){return this.file!=null&&!(this.getURL()||this.getHref())}isPreviewable(){return this.attributes.has("previewable")?this.attributes.get("previewable"):_n.previewablePattern.test(this.getContentType())}getType(){return this.hasContent()?"content":this.isPreviewable()?"preview":"file"}getURL(){return this.attributes.get("url")}getHref(){return this.attributes.get("href")}getFilename(){return this.attributes.get("filename")||""}getFilesize(){return this.attributes.get("filesize")}getFormattedFilesize(){const t=this.attributes.get("filesize");return typeof t=="number"?ld.formatter(t):""}getExtension(){var t;return(t=this.getFilename().match(/\.(\w+)$/))===null||t===void 0?void 0:t[1].toLowerCase()}getContentType(){return this.attributes.get("contentType")}hasContent(){return this.attributes.has("content")}getContent(){return this.attributes.get("content")}getWidth(){return this.attributes.get("width")}getHeight(){return this.attributes.get("height")}getFile(){return this.file}setFile(t){if(this.file=t,this.isPreviewable())return this.preloadFile()}releaseFile(){this.releasePreloadedFile(),this.file=null}getUploadProgress(){return this.uploadProgress!=null?this.uploadProgress:0}setUploadProgress(t){var n,r;if(this.uploadProgress!==t)return this.uploadProgress=t,(n=this.uploadProgressDelegate)===null||n===void 0||(r=n.attachmentDidChangeUploadProgress)===null||r===void 0?void 0:r.call(n,this)}toJSON(){return this.getAttributes()}getCacheKey(){return[super.getCacheKey(...arguments),this.attributes.getCacheKey(),this.getPreviewURL()].join("/")}getPreviewURL(){return this.previewURL||this.preloadingURL}setPreviewURL(t){var n,r,i,l;if(t!==this.getPreviewURL())return this.previewURL=t,(n=this.previewDelegate)===null||n===void 0||(r=n.attachmentDidChangeAttributes)===null||r===void 0||r.call(n,this),(i=this.delegate)===null||i===void 0||(l=i.attachmentDidChangePreviewURL)===null||l===void 0?void 0:l.call(i,this)}preloadURL(){return this.preload(this.getURL(),this.releaseFile)}preloadFile(){if(this.file)return this.fileObjectURL=URL.createObjectURL(this.file),this.preload(this.fileObjectURL)}releasePreloadedFile(){this.fileObjectURL&&(URL.revokeObjectURL(this.fileObjectURL),this.fileObjectURL=null)}preload(t,n){if(t&&t!==this.getPreviewURL())return this.preloadingURL=t,new Td(t).then(r=>{let{width:i,height:l}=r;return this.getWidth()&&this.getHeight()||this.setAttributes({width:i,height:l}),this.preloadingURL=null,this.setPreviewURL(t),n?.()}).catch(()=>(this.preloadingURL=null,n?.()))}}ht(_n,"previewablePattern",/^image(\/(gif|png|webp|jpe?g)|$)/);class Wn extends Dn{static fromJSON(t){return new this(_n.fromJSON(t.attachment),t.attributes)}constructor(t){super(...arguments),this.attachment=t,this.length=1,this.ensureAttachmentExclusivelyHasAttribute("href"),this.attachment.hasContent()||this.removeProhibitedAttributes()}ensureAttachmentExclusivelyHasAttribute(t){this.hasAttribute(t)&&(this.attachment.hasAttribute(t)||this.attachment.setAttributes(this.attributes.slice([t])),this.attributes=this.attributes.remove(t))}removeProhibitedAttributes(){const t=this.attributes.slice(Wn.permittedAttributes);t.isEqualTo(this.attributes)||(this.attributes=t)}getValue(){return this.attachment}isSerializable(){return!this.attachment.isPending()}getCaption(){return this.attributes.get("caption")||""}isEqualTo(t){var n;return super.isEqualTo(t)&&this.attachment.id===(t==null||(n=t.attachment)===null||n===void 0?void 0:n.id)}toString(){return""}toJSON(){const t=super.toJSON(...arguments);return t.attachment=this.attachment,t}getCacheKey(){return[super.getCacheKey(...arguments),this.attachment.getCacheKey()].join("/")}toConsole(){return JSON.stringify(this.toString())}}ht(Wn,"permittedAttributes",["caption","presentation"]),Dn.registerType("attachment",Wn);class yl extends Dn{static fromJSON(t){return new this(t.string,t.attributes)}constructor(t){super(...arguments),this.string=(n=>n.replace(/\r\n?/g,`
5954
+ </div>`)};const Pi={interval:5e3};var kr=Object.freeze({__proto__:null,attachments:dl,blockAttributes:mt,browser:yr,css:{attachment:"attachment",attachmentCaption:"attachment__caption",attachmentCaptionEditor:"attachment__caption-editor",attachmentMetadata:"attachment__metadata",attachmentMetadataContainer:"attachment__metadata-container",attachmentName:"attachment__name",attachmentProgress:"attachment__progress",attachmentSize:"attachment__size",attachmentToolbar:"attachment__toolbar",attachmentGallery:"attachment-gallery"},dompurify:ad,fileSize:ld,input:pl,keyNames:{8:"backspace",9:"tab",13:"return",27:"escape",37:"left",39:"right",46:"delete",68:"d",72:"h",79:"o"},lang:me,parser:Mr,textAttributes:Tn,toolbar:ud,undo:Pi});class it{static proxyMethod(t){const{name:n,toMethod:r,toProperty:i,optional:l}=Wh(t);this.prototype[n]=function(){let a,o;var s,u;return r?o=l?(s=this[r])===null||s===void 0?void 0:s.call(this):this[r]():i&&(o=this[i]),l?(a=(u=o)===null||u===void 0?void 0:u[n],a?Ul.call(a,o,arguments):void 0):(a=o[n],Ul.call(a,o,arguments))}}}const Wh=function(e){const t=e.match(Vh);if(!t)throw new Error("can't parse @proxyMethod expression: ".concat(e));const n={name:t[4]};return t[2]!=null?n.toMethod=t[1]:n.toProperty=t[1],t[3]!=null&&(n.optional=!0),n},{apply:Ul}=Function.prototype,Vh=new RegExp("^(.+?)(\\(\\))?(\\?)?\\.(.+?)$");var ci,pi,fi;class vr extends it{static box(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t instanceof this?t:this.fromUCS2String(t?.toString())}static fromUCS2String(t){return new this(t,Ni(t))}static fromCodepoints(t){return new this(Hi(t),t)}constructor(t,n){super(...arguments),this.ucs2String=t,this.codepoints=n,this.length=this.codepoints.length,this.ucs2Length=this.ucs2String.length}offsetToUCS2Offset(t){return Hi(this.codepoints.slice(0,Math.max(0,t))).length}offsetFromUCS2Offset(t){return Ni(this.ucs2String.slice(0,Math.max(0,t))).length}slice(){return this.constructor.fromCodepoints(this.codepoints.slice(...arguments))}charAt(t){return this.slice(t,t+1)}isEqualTo(t){return this.constructor.box(t).ucs2String===this.ucs2String}toJSON(){return this.ucs2String}getCacheKey(){return this.ucs2String}toString(){return this.ucs2String}}const _h=((ci=Array.from)===null||ci===void 0?void 0:ci.call(Array,"👼").length)===1,Qh=((pi=" ".codePointAt)===null||pi===void 0?void 0:pi.call(" ",0))!=null,qh=((fi=String.fromCodePoint)===null||fi===void 0?void 0:fi.call(String,32,128124))===" 👼";let Ni,Hi;Ni=_h&&Qh?e=>Array.from(e).map((t=>t.codePointAt(0))):function(e){const t=[];let n=0;const{length:r}=e;for(;n<r;){let i=e.charCodeAt(n++);if(55296<=i&&i<=56319&&n<r){const l=e.charCodeAt(n++);(64512&l)==56320?i=((1023&i)<<10)+(1023&l)+65536:n--}t.push(i)}return t},Hi=qh?e=>String.fromCodePoint(...Array.from(e||[])):function(e){return(()=>{const t=[];return Array.from(e).forEach((n=>{let r="";n>65535&&(n-=65536,r+=String.fromCharCode(n>>>10&1023|55296),n=56320|1023&n),t.push(r+String.fromCharCode(n))})),t})().join("")};let Kh=0;class Bn extends it{static fromJSONString(t){return this.fromJSON(JSON.parse(t))}constructor(){super(...arguments),this.id=++Kh}hasSameConstructorAs(t){return this.constructor===t?.constructor}isEqualTo(t){return this===t}inspect(){const t=[],n=this.contentsForInspection()||{};for(const r in n){const i=n[r];t.push("".concat(r,"=").concat(i))}return"#<".concat(this.constructor.name,":").concat(this.id).concat(t.length?" ".concat(t.join(", ")):"",">")}contentsForInspection(){}toJSONString(){return JSON.stringify(this)}toUTF16String(){return vr.box(this)}getCacheKey(){return this.id.toString()}}const Rn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},fl=function(e){const t=e.slice(0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.splice(...r),t},Gh=/[\u05BE\u05C0\u05C3\u05D0-\u05EA\u05F0-\u05F4\u061B\u061F\u0621-\u063A\u0640-\u064A\u066D\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D5\u06E5\u06E6\u200F\u202B\u202E\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE72\uFE74\uFE76-\uFEFC]/,Jh=(function(){const e=ke("input",{dir:"auto",name:"x",dirName:"x.dir"}),t=ke("textarea",{dir:"auto",name:"y",dirName:"y.dir"}),n=ke("form");n.appendChild(e),n.appendChild(t);const r=(function(){try{return new FormData(n).has(t.dirName)}catch{return!1}})(),i=(function(){try{return e.matches(":dir(ltr),:dir(rtl)")}catch{return!1}})();return r?function(l){return t.value=l,new FormData(n).get(t.dirName)}:i?function(l){return e.value=l,e.matches(":dir(rtl)")?"rtl":"ltr"}:function(l){const a=l.trim().charAt(0);return Gh.test(a)?"rtl":"ltr"}})();let vi=null,gi=null,mi=null,Ar=null;const Ui=()=>(vi||(vi=Xh().concat(Yh())),vi),Xe=e=>mt[e],Yh=()=>(gi||(gi=Object.keys(mt)),gi),ji=e=>Tn[e],Xh=()=>(mi||(mi=Object.keys(Tn)),mi),cd=function(e,t){Zh(e).textContent=t.replace(/%t/g,e)},Zh=function(e){const t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("data-tag-name",e.toLowerCase());const n=e0();return n&&t.setAttribute("nonce",n),document.head.insertBefore(t,document.head.firstChild),t},e0=function(){const e=jl("trix-csp-nonce")||jl("csp-nonce");if(e){const{nonce:t,content:n}=e;return t==""?n:t}},jl=e=>document.head.querySelector("meta[name=".concat(e,"]")),Wl={"application/x-trix-feature-detection":"test"},pd=function(e){const t=e.getData("text/plain"),n=e.getData("text/html");if(!t||!n)return t?.length;{const{body:r}=new DOMParser().parseFromString(n,"text/html");if(r.textContent===t)return!r.querySelector("*")}},fd=/Mac|^iP/.test(navigator.platform)?e=>e.metaKey:e=>e.ctrlKey,vl=e=>setTimeout(e,1),vd=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t={};for(const n in e){const r=e[n];t[n]=r}return t},Vn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0},De=function(e){if(e!=null)return Array.isArray(e)||(e=[e,e]),[Vl(e[0]),Vl(e[1]!=null?e[1]:e[0])]},nn=function(e){if(e==null)return;const[t,n]=De(e);return Wi(t,n)},Pr=function(e,t){if(e==null||t==null)return;const[n,r]=De(e),[i,l]=De(t);return Wi(n,i)&&Wi(r,l)},Vl=function(e){return typeof e=="number"?e:vd(e)},Wi=function(e,t){return typeof e=="number"?e===t:Vn(e,t)};class gd extends it{constructor(){super(...arguments),this.update=this.update.bind(this),this.selectionManagers=[]}start(){this.started||(this.started=!0,document.addEventListener("selectionchange",this.update,!0))}stop(){if(this.started)return this.started=!1,document.removeEventListener("selectionchange",this.update,!0)}registerSelectionManager(t){if(!this.selectionManagers.includes(t))return this.selectionManagers.push(t),this.start()}unregisterSelectionManager(t){if(this.selectionManagers=this.selectionManagers.filter((n=>n!==t)),this.selectionManagers.length===0)return this.stop()}notifySelectionManagersOfSelectionChange(){return this.selectionManagers.map((t=>t.selectionDidChange()))}update(){this.notifySelectionManagersOfSelectionChange()}reset(){this.update()}}const In=new gd,md=function(){const e=window.getSelection();if(e.rangeCount>0)return e},sr=function(){var e;const t=(e=md())===null||e===void 0?void 0:e.getRangeAt(0);if(t&&!t0(t))return t},hd=function(e){const t=window.getSelection();return t.removeAllRanges(),t.addRange(e),In.update()},t0=e=>_l(e.startContainer)||_l(e.endContainer),_l=e=>!Object.getPrototypeOf(e),nr=e=>e.replace(new RegExp("".concat(ti),"g"),"").replace(new RegExp("".concat(pn),"g")," "),gl=new RegExp("[^\\S".concat(pn,"]")),ml=e=>e.replace(new RegExp("".concat(gl.source),"g")," ").replace(/\ {2,}/g," "),Ql=function(e,t){if(e.isEqualTo(t))return["",""];const n=hi(e,t),{length:r}=n.utf16String;let i;if(r){const{offset:l}=n,a=e.codepoints.slice(0,l).concat(e.codepoints.slice(l+r));i=hi(t,vr.fromCodepoints(a))}else i=hi(t,e);return[n.utf16String.toString(),i.utf16String.toString()]},hi=function(e,t){let n=0,r=e.length,i=t.length;for(;n<r&&e.charAt(n).isEqualTo(t.charAt(n));)n++;for(;r>n+1&&e.charAt(r-1).isEqualTo(t.charAt(i-1));)r--,i--;return{utf16String:e.slice(n,r),offset:n}};class It extends Bn{static fromCommonAttributesOfObjects(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(!t.length)return new this;let n=Jn(t[0]),r=n.getKeys();return t.slice(1).forEach((i=>{r=n.getKeysCommonToHash(Jn(i)),n=n.slice(r)})),n}static box(t){return Jn(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(...arguments),this.values=Dr(t)}add(t,n){return this.merge(n0(t,n))}remove(t){return new It(Dr(this.values,t))}get(t){return this.values[t]}has(t){return t in this.values}merge(t){return new It(r0(this.values,i0(t)))}slice(t){const n={};return Array.from(t).forEach((r=>{this.has(r)&&(n[r]=this.values[r])})),new It(n)}getKeys(){return Object.keys(this.values)}getKeysCommonToHash(t){return t=Jn(t),this.getKeys().filter((n=>this.values[n]===t.values[n]))}isEqualTo(t){return Rn(this.toArray(),Jn(t).toArray())}isEmpty(){return this.getKeys().length===0}toArray(){if(!this.array){const t=[];for(const n in this.values){const r=this.values[n];t.push(t.push(n,r))}this.array=t.slice(0)}return this.array}toObject(){return Dr(this.values)}toJSON(){return this.toObject()}contentsForInspection(){return{values:JSON.stringify(this.values)}}}const n0=function(e,t){const n={};return n[e]=t,n},r0=function(e,t){const n=Dr(e);for(const r in t){const i=t[r];n[r]=i}return n},Dr=function(e,t){const n={};return Object.keys(e).sort().forEach((r=>{r!==t&&(n[r]=e[r])})),n},Jn=function(e){return e instanceof It?e:new It(e)},i0=function(e){return e instanceof It?e.values:e};class hl{static groupObjects(){let t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{depth:r,asTree:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};i&&r==null&&(r=0);const l=[];return Array.from(n).forEach((a=>{var o;if(t){var s,u,f;if((s=a.canBeGrouped)!==null&&s!==void 0&&s.call(a,r)&&(u=(f=t[t.length-1]).canBeGroupedWith)!==null&&u!==void 0&&u.call(f,a,r))return void t.push(a);l.push(new this(t,{depth:r,asTree:i})),t=null}(o=a.canBeGrouped)!==null&&o!==void 0&&o.call(a,r)?t=[a]:l.push(a)})),t&&l.push(new this(t,{depth:r,asTree:i})),l}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{depth:n,asTree:r}=arguments.length>1?arguments[1]:void 0;this.objects=t,r&&(this.depth=n,this.objects=this.constructor.groupObjects(this.objects,{asTree:r,depth:this.depth+1}))}getObjects(){return this.objects}getDepth(){return this.depth}getCacheKey(){const t=["objectGroup"];return Array.from(this.getObjects()).forEach((n=>{t.push(n.getCacheKey())})),t.join("/")}}class a0 extends it{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.objects={},Array.from(t).forEach((n=>{const r=JSON.stringify(n);this.objects[r]==null&&(this.objects[r]=n)}))}find(t){const n=JSON.stringify(t);return this.objects[n]}}class l0{constructor(t){this.reset(t)}add(t){const n=ql(t);this.elements[n]=t}remove(t){const n=ql(t),r=this.elements[n];if(r)return delete this.elements[n],r}reset(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return this.elements={},Array.from(t).forEach((n=>{this.add(n)})),t}}const ql=e=>e.dataset.trixStoreKey;class Nr extends it{isPerforming(){return this.performing===!0}hasPerformed(){return this.performed===!0}hasSucceeded(){return this.performed&&this.succeeded}hasFailed(){return this.performed&&!this.succeeded}getPromise(){return this.promise||(this.promise=new Promise(((t,n)=>(this.performing=!0,this.perform(((r,i)=>{this.succeeded=r,this.performing=!1,this.performed=!0,this.succeeded?t(i):n(i)})))))),this.promise}perform(t){return t(!1)}release(){var t,n;(t=this.promise)===null||t===void 0||(n=t.cancel)===null||n===void 0||n.call(t),this.promise=null,this.performing=null,this.performed=null,this.succeeded=null}}Nr.proxyMethod("getPromise().then"),Nr.proxyMethod("getPromise().catch");class Mn extends it{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.object=t,this.options=n,this.childViews=[],this.rootView=this}getNodes(){return this.nodes||(this.nodes=this.createNodes()),this.nodes.map((t=>t.cloneNode(!0)))}invalidate(){var t;return this.nodes=null,this.childViews=[],(t=this.parentView)===null||t===void 0?void 0:t.invalidate()}invalidateViewForObject(t){var n;return(n=this.findViewForObject(t))===null||n===void 0?void 0:n.invalidate()}findOrCreateCachedChildView(t,n,r){let i=this.getCachedViewForObject(n);return i?this.recordChildView(i):(i=this.createChildView(...arguments),this.cacheViewForObject(i,n)),i}createChildView(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};n instanceof hl&&(r.viewClass=t,t=o0);const i=new t(n,r);return this.recordChildView(i)}recordChildView(t){return t.parentView=this,t.rootView=this.rootView,this.childViews.push(t),t}getAllChildViews(){let t=[];return this.childViews.forEach((n=>{t.push(n),t=t.concat(n.getAllChildViews())})),t}findElement(){return this.findElementForObject(this.object)}findElementForObject(t){const n=t?.id;if(n)return this.rootView.element.querySelector("[data-trix-id='".concat(n,"']"))}findViewForObject(t){for(const n of this.getAllChildViews())if(n.object===t)return n}getViewCache(){return this.rootView!==this?this.rootView.getViewCache():this.isViewCachingEnabled()?(this.viewCache||(this.viewCache={}),this.viewCache):void 0}isViewCachingEnabled(){return this.shouldCacheViews!==!1}enableViewCaching(){this.shouldCacheViews=!0}disableViewCaching(){this.shouldCacheViews=!1}getCachedViewForObject(t){var n;return(n=this.getViewCache())===null||n===void 0?void 0:n[t.getCacheKey()]}cacheViewForObject(t,n){const r=this.getViewCache();r&&(r[n.getCacheKey()]=t)}garbageCollectCachedViews(){const t=this.getViewCache();if(t){const n=this.getAllChildViews().concat(this).map((r=>r.object.getCacheKey()));for(const r in t)n.includes(r)||delete t[r]}}}class o0 extends Mn{constructor(){super(...arguments),this.objectGroup=this.object,this.viewClass=this.options.viewClass,delete this.options.viewClass}getChildViews(){return this.childViews.length||Array.from(this.objectGroup.getObjects()).forEach((t=>{this.findOrCreateCachedChildView(this.viewClass,t,this.options)})),this.childViews}createNodes(){const t=this.createContainerElement();return this.getChildViews().forEach((n=>{Array.from(n.getNodes()).forEach((r=>{t.appendChild(r)}))})),[t]}createContainerElement(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.objectGroup.getDepth();return this.getChildViews()[0].createContainerElement(t)}}/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */const{entries:bd,setPrototypeOf:Kl,isFrozen:s0,getPrototypeOf:d0,getOwnPropertyDescriptor:u0}=Object;let{freeze:bt,seal:zt,create:wd}=Object,{apply:Vi,construct:_i}=typeof Reflect<"u"&&Reflect;bt||(bt=function(e){return e}),zt||(zt=function(e){return e}),Vi||(Vi=function(e,t,n){return e.apply(t,n)}),_i||(_i=function(e,t){return new e(...t)});const Er=wt(Array.prototype.forEach),c0=wt(Array.prototype.lastIndexOf),Gl=wt(Array.prototype.pop),Yn=wt(Array.prototype.push),p0=wt(Array.prototype.splice),Or=wt(String.prototype.toLowerCase),bi=wt(String.prototype.toString),Jl=wt(String.prototype.match),Xn=wt(String.prototype.replace),f0=wt(String.prototype.indexOf),v0=wt(String.prototype.trim),Ht=wt(Object.prototype.hasOwnProperty),ft=wt(RegExp.prototype.test),Zn=(Yl=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _i(Yl,t)});var Yl;function wt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Vi(e,t,r)}}function Ee(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Or;Kl&&Kl(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const l=n(i);l!==i&&(s0(t)||(t[r]=l),i=l)}e[i]=!0}return e}function g0(e){for(let t=0;t<e.length;t++)Ht(e,t)||(e[t]=null);return e}function kn(e){const t=wd(null);for(const[n,r]of bd(e))Ht(e,n)&&(Array.isArray(r)?t[n]=g0(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=kn(r):t[n]=r);return t}function er(e,t){for(;e!==null;){const n=u0(e,t);if(n){if(n.get)return wt(n.get);if(typeof n.value=="function")return wt(n.value)}e=d0(e)}return function(){return null}}const Xl=bt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),wi=bt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),yi=bt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),m0=bt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ki=bt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),h0=bt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Zl=bt(["#text"]),eo=bt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ci=bt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),to=bt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Lr=bt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),b0=zt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),w0=zt(/<%[\w\W]*|[\w\W]*%>/gm),y0=zt(/\$\{[\w\W]*/gm),k0=zt(/^data-[\-\w.\u00B7-\uFFFF]+$/),C0=zt(/^aria-[\-\w]+$/),yd=zt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),A0=zt(/^(?:\w+script|data):/i),E0=zt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),kd=zt(/^html$/i),L0=zt(/^[a-z][.\w]*(-[.\w]+)+$/i);var no=Object.freeze({__proto__:null,ARIA_ATTR:C0,ATTR_WHITESPACE:E0,CUSTOM_ELEMENT:L0,DATA_ATTR:k0,DOCTYPE_NAME:kd,ERB_EXPR:w0,IS_ALLOWED_URI:yd,IS_SCRIPT_OR_DATA:A0,MUSTACHE_EXPR:b0,TMPLIT_EXPR:y0});const x0=1,S0=3,T0=7,R0=8,I0=9,B0=function(){return typeof window>"u"?null:window};var Hr=(function e(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:B0();const n=g=>e(g);if(n.version="3.2.5",n.removed=[],!t||!t.document||t.document.nodeType!==I0||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const i=r,l=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:u,NodeFilter:f,NamedNodeMap:S=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:M,DOMParser:C,trustedTypes:E}=t,k=u.prototype,x=er(k,"cloneNode"),O=er(k,"remove"),D=er(k,"nextSibling"),L=er(k,"childNodes"),P=er(k,"parentNode");if(typeof o=="function"){const g=r.createElement("template");g.content&&g.content.ownerDocument&&(r=g.content.ownerDocument)}let H,I="";const{implementation:te,createNodeIterator:G,createDocumentFragment:z,getElementsByTagName:re}=r,{importNode:Z}=i;let _={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported=typeof bd=="function"&&typeof P=="function"&&te&&te.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ae,ERB_EXPR:we,TMPLIT_EXPR:de,DATA_ATTR:be,ARIA_ATTR:fe,IS_SCRIPT_OR_DATA:Ke,ATTR_WHITESPACE:pe,CUSTOM_ELEMENT:ve}=no;let{IS_ALLOWED_URI:W}=no,ee=null;const at=Ee({},[...Xl,...wi,...yi,...ki,...Zl]);let oe=null;const le=Ee({},[...eo,...Ci,...to,...Lr]);let R=Object.seal(wd(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ne=null,Te=null,lt=!0,Mt=!0,Vt=!1,Et=!0,Lt=!1,Pt=!0,et=!1,_t=!1,yt=!1,Ge=!1,tt=!1,nt=!1,kt=!0,xt=!1,Be=!0,ot=!1,qe={},ut=null;const Ct=Ee({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Dt=null;const ln=Ee({},["audio","video","img","source","image","track"]);let ct=null;const Ot=Ee({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zt="http://www.w3.org/1998/Math/MathML",Nt="http://www.w3.org/2000/svg",St="http://www.w3.org/1999/xhtml";let pt=St,At=!1,bn=null;const On=Ee({},[Zt,Nt,St],bi);let Tt=Ee({},["mi","mo","mn","ms","mtext"]),Rt=Ee({},["annotation-xml"]);const wn=Ee({},["title","style","font","a","script"]);let Qt=null;const Qn=["application/xhtml+xml","text/html"];let Pe=null,c=null;const b=r.createElement("form"),y=function(g){return g instanceof RegExp||g instanceof Function},$=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!c||c!==g){if(g&&typeof g=="object"||(g={}),g=kn(g),Qt=Qn.indexOf(g.PARSER_MEDIA_TYPE)===-1?"text/html":g.PARSER_MEDIA_TYPE,Pe=Qt==="application/xhtml+xml"?bi:Or,ee=Ht(g,"ALLOWED_TAGS")?Ee({},g.ALLOWED_TAGS,Pe):at,oe=Ht(g,"ALLOWED_ATTR")?Ee({},g.ALLOWED_ATTR,Pe):le,bn=Ht(g,"ALLOWED_NAMESPACES")?Ee({},g.ALLOWED_NAMESPACES,bi):On,ct=Ht(g,"ADD_URI_SAFE_ATTR")?Ee(kn(Ot),g.ADD_URI_SAFE_ATTR,Pe):Ot,Dt=Ht(g,"ADD_DATA_URI_TAGS")?Ee(kn(ln),g.ADD_DATA_URI_TAGS,Pe):ln,ut=Ht(g,"FORBID_CONTENTS")?Ee({},g.FORBID_CONTENTS,Pe):Ct,ne=Ht(g,"FORBID_TAGS")?Ee({},g.FORBID_TAGS,Pe):{},Te=Ht(g,"FORBID_ATTR")?Ee({},g.FORBID_ATTR,Pe):{},qe=!!Ht(g,"USE_PROFILES")&&g.USE_PROFILES,lt=g.ALLOW_ARIA_ATTR!==!1,Mt=g.ALLOW_DATA_ATTR!==!1,Vt=g.ALLOW_UNKNOWN_PROTOCOLS||!1,Et=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Lt=g.SAFE_FOR_TEMPLATES||!1,Pt=g.SAFE_FOR_XML!==!1,et=g.WHOLE_DOCUMENT||!1,Ge=g.RETURN_DOM||!1,tt=g.RETURN_DOM_FRAGMENT||!1,nt=g.RETURN_TRUSTED_TYPE||!1,yt=g.FORCE_BODY||!1,kt=g.SANITIZE_DOM!==!1,xt=g.SANITIZE_NAMED_PROPS||!1,Be=g.KEEP_CONTENT!==!1,ot=g.IN_PLACE||!1,W=g.ALLOWED_URI_REGEXP||yd,pt=g.NAMESPACE||St,Tt=g.MATHML_TEXT_INTEGRATION_POINTS||Tt,Rt=g.HTML_INTEGRATION_POINTS||Rt,R=g.CUSTOM_ELEMENT_HANDLING||{},g.CUSTOM_ELEMENT_HANDLING&&y(g.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(R.tagNameCheck=g.CUSTOM_ELEMENT_HANDLING.tagNameCheck),g.CUSTOM_ELEMENT_HANDLING&&y(g.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(R.attributeNameCheck=g.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),g.CUSTOM_ELEMENT_HANDLING&&typeof g.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(R.allowCustomizedBuiltInElements=g.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Lt&&(Mt=!1),tt&&(Ge=!0),qe&&(ee=Ee({},Zl),oe=[],qe.html===!0&&(Ee(ee,Xl),Ee(oe,eo)),qe.svg===!0&&(Ee(ee,wi),Ee(oe,Ci),Ee(oe,Lr)),qe.svgFilters===!0&&(Ee(ee,yi),Ee(oe,Ci),Ee(oe,Lr)),qe.mathMl===!0&&(Ee(ee,ki),Ee(oe,to),Ee(oe,Lr))),g.ADD_TAGS&&(ee===at&&(ee=kn(ee)),Ee(ee,g.ADD_TAGS,Pe)),g.ADD_ATTR&&(oe===le&&(oe=kn(oe)),Ee(oe,g.ADD_ATTR,Pe)),g.ADD_URI_SAFE_ATTR&&Ee(ct,g.ADD_URI_SAFE_ATTR,Pe),g.FORBID_CONTENTS&&(ut===Ct&&(ut=kn(ut)),Ee(ut,g.FORBID_CONTENTS,Pe)),Be&&(ee["#text"]=!0),et&&Ee(ee,["html","head","body"]),ee.table&&(Ee(ee,["tbody"]),delete ne.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw Zn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Zn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');H=g.TRUSTED_TYPES_POLICY,I=H.createHTML("")}else H===void 0&&(H=(function(K,V){if(typeof K!="object"||typeof K.createPolicy!="function")return null;let ce=null;const Ae="data-tt-policy-suffix";V&&V.hasAttribute(Ae)&&(ce=V.getAttribute(Ae));const v="dompurify"+(ce?"#"+ce:"");try{return K.createPolicy(v,{createHTML:B=>B,createScriptURL:B=>B})}catch{return null}})(E,l)),H!==null&&typeof I=="string"&&(I=H.createHTML(""));bt&&bt(g),c=g}},U=Ee({},[...wi,...yi,...m0]),j=Ee({},[...ki,...h0]),J=function(g){Yn(n.removed,{element:g});try{P(g).removeChild(g)}catch{O(g)}},Q=function(g,K){try{Yn(n.removed,{attribute:K.getAttributeNode(g),from:K})}catch{Yn(n.removed,{attribute:null,from:K})}if(K.removeAttribute(g),g==="is")if(Ge||tt)try{J(K)}catch{}else try{K.setAttribute(g,"")}catch{}},Re=function(g){let K=null,V=null;if(yt)g="<remove></remove>"+g;else{const v=Jl(g,/^[\r\n\t ]+/);V=v&&v[0]}Qt==="application/xhtml+xml"&&pt===St&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");const ce=H?H.createHTML(g):g;if(pt===St)try{K=new C().parseFromString(ce,Qt)}catch{}if(!K||!K.documentElement){K=te.createDocument(pt,"template",null);try{K.documentElement.innerHTML=At?I:ce}catch{}}const Ae=K.body||K.documentElement;return g&&V&&Ae.insertBefore(r.createTextNode(V),Ae.childNodes[0]||null),pt===St?re.call(K,et?"html":"body")[0]:et?K.documentElement:Ae},Ie=function(g){return G.call(g.ownerDocument||g,g,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},Ce=function(g){return g instanceof M&&(typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||!(g.attributes instanceof S)||typeof g.removeAttribute!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function")},$e=function(g){return typeof s=="function"&&g instanceof s};function ge(g,K,V){Er(g,(ce=>{ce.call(n,K,V,c)}))}const He=function(g){let K=null;if(ge(_.beforeSanitizeElements,g,null),Ce(g))return J(g),!0;const V=Pe(g.nodeName);if(ge(_.uponSanitizeElement,g,{tagName:V,allowedTags:ee}),g.hasChildNodes()&&!$e(g.firstElementChild)&&ft(/<[/\w!]/g,g.innerHTML)&&ft(/<[/\w!]/g,g.textContent)||g.nodeType===T0||Pt&&g.nodeType===R0&&ft(/<[/\w]/g,g.data))return J(g),!0;if(!ee[V]||ne[V]){if(!ne[V]&&Ue(V)&&(R.tagNameCheck instanceof RegExp&&ft(R.tagNameCheck,V)||R.tagNameCheck instanceof Function&&R.tagNameCheck(V)))return!1;if(Be&&!ut[V]){const ce=P(g)||g.parentNode,Ae=L(g)||g.childNodes;if(Ae&&ce)for(let v=Ae.length-1;v>=0;--v){const B=x(Ae[v],!0);B.__removalCount=(g.__removalCount||0)+1,ce.insertBefore(B,D(g))}}return J(g),!0}return g instanceof u&&!(function(ce){let Ae=P(ce);Ae&&Ae.tagName||(Ae={namespaceURI:pt,tagName:"template"});const v=Or(ce.tagName),B=Or(Ae.tagName);return!!bn[ce.namespaceURI]&&(ce.namespaceURI===Nt?Ae.namespaceURI===St?v==="svg":Ae.namespaceURI===Zt?v==="svg"&&(B==="annotation-xml"||Tt[B]):!!U[v]:ce.namespaceURI===Zt?Ae.namespaceURI===St?v==="math":Ae.namespaceURI===Nt?v==="math"&&Rt[B]:!!j[v]:ce.namespaceURI===St?!(Ae.namespaceURI===Nt&&!Rt[B])&&!(Ae.namespaceURI===Zt&&!Tt[B])&&!j[v]&&(wn[v]||!U[v]):!(Qt!=="application/xhtml+xml"||!bn[ce.namespaceURI]))})(g)?(J(g),!0):V!=="noscript"&&V!=="noembed"&&V!=="noframes"||!ft(/<\/no(script|embed|frames)/i,g.innerHTML)?(Lt&&g.nodeType===S0&&(K=g.textContent,Er([ae,we,de],(ce=>{K=Xn(K,ce," ")})),g.textContent!==K&&(Yn(n.removed,{element:g.cloneNode()}),g.textContent=K)),ge(_.afterSanitizeElements,g,null),!1):(J(g),!0)},Je=function(g,K,V){if(kt&&(K==="id"||K==="name")&&(V in r||V in b))return!1;if(!(Mt&&!Te[K]&&ft(be,K))){if(!(lt&&ft(fe,K))){if(!oe[K]||Te[K]){if(!(Ue(g)&&(R.tagNameCheck instanceof RegExp&&ft(R.tagNameCheck,g)||R.tagNameCheck instanceof Function&&R.tagNameCheck(g))&&(R.attributeNameCheck instanceof RegExp&&ft(R.attributeNameCheck,K)||R.attributeNameCheck instanceof Function&&R.attributeNameCheck(K))||K==="is"&&R.allowCustomizedBuiltInElements&&(R.tagNameCheck instanceof RegExp&&ft(R.tagNameCheck,V)||R.tagNameCheck instanceof Function&&R.tagNameCheck(V))))return!1}else if(!ct[K]){if(!ft(W,Xn(V,pe,""))){if((K!=="src"&&K!=="xlink:href"&&K!=="href"||g==="script"||f0(V,"data:")!==0||!Dt[g])&&!(Vt&&!ft(Ke,Xn(V,pe,"")))){if(V)return!1}}}}}return!0},Ue=function(g){return g!=="annotation-xml"&&Jl(g,ve)},We=function(g){ge(_.beforeSanitizeAttributes,g,null);const{attributes:K}=g;if(!K||Ce(g))return;const V={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:oe,forceKeepAttr:void 0};let ce=K.length;for(;ce--;){const Ae=K[ce],{name:v,namespaceURI:B,value:ue}=Ae,Me=Pe(v);let Ve=v==="value"?ue:v0(ue);if(V.attrName=Me,V.attrValue=Ve,V.keepAttr=!0,V.forceKeepAttr=void 0,ge(_.uponSanitizeAttribute,g,V),Ve=V.attrValue,!xt||Me!=="id"&&Me!=="name"||(Q(v,g),Ve="user-content-"+Ve),Pt&&ft(/((--!?|])>)|<\/(style|title)/i,Ve)){Q(v,g);continue}if(V.forceKeepAttr||(Q(v,g),!V.keepAttr))continue;if(!Et&&ft(/\/>/i,Ve)){Q(v,g);continue}Lt&&Er([ae,we,de],(li=>{Ve=Xn(Ve,li," ")}));const qn=Pe(g.nodeName);if(Je(qn,Me,Ve)){if(H&&typeof E=="object"&&typeof E.getAttributeType=="function"&&!B)switch(E.getAttributeType(qn,Me)){case"TrustedHTML":Ve=H.createHTML(Ve);break;case"TrustedScriptURL":Ve=H.createScriptURL(Ve)}try{B?g.setAttributeNS(B,v,Ve):g.setAttribute(v,Ve),Ce(g)?J(g):Gl(n.removed)}catch{}}}ge(_.afterSanitizeAttributes,g,null)},qt=function g(K){let V=null;const ce=Ie(K);for(ge(_.beforeSanitizeShadowDOM,K,null);V=ce.nextNode();)ge(_.uponSanitizeShadowNode,V,null),He(V),We(V),V.content instanceof a&&g(V.content);ge(_.afterSanitizeShadowDOM,K,null)};return n.sanitize=function(g){let K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},V=null,ce=null,Ae=null,v=null;if(At=!g,At&&(g="<!-->"),typeof g!="string"&&!$e(g)){if(typeof g.toString!="function")throw Zn("toString is not a function");if(typeof(g=g.toString())!="string")throw Zn("dirty is not a string, aborting")}if(!n.isSupported)return g;if(_t||$(K),n.removed=[],typeof g=="string"&&(ot=!1),ot){if(g.nodeName){const Me=Pe(g.nodeName);if(!ee[Me]||ne[Me])throw Zn("root node is forbidden and cannot be sanitized in-place")}}else if(g instanceof s)V=Re("<!---->"),ce=V.ownerDocument.importNode(g,!0),ce.nodeType===x0&&ce.nodeName==="BODY"||ce.nodeName==="HTML"?V=ce:V.appendChild(ce);else{if(!Ge&&!Lt&&!et&&g.indexOf("<")===-1)return H&&nt?H.createHTML(g):g;if(V=Re(g),!V)return Ge?null:nt?I:""}V&&yt&&J(V.firstChild);const B=Ie(ot?g:V);for(;Ae=B.nextNode();)He(Ae),We(Ae),Ae.content instanceof a&&qt(Ae.content);if(ot)return g;if(Ge){if(tt)for(v=z.call(V.ownerDocument);V.firstChild;)v.appendChild(V.firstChild);else v=V;return(oe.shadowroot||oe.shadowrootmode)&&(v=Z.call(i,v,!0)),v}let ue=et?V.outerHTML:V.innerHTML;return et&&ee["!doctype"]&&V.ownerDocument&&V.ownerDocument.doctype&&V.ownerDocument.doctype.name&&ft(kd,V.ownerDocument.doctype.name)&&(ue="<!DOCTYPE "+V.ownerDocument.doctype.name+`>
5955
+ `+ue),Lt&&Er([ae,we,de],(Me=>{ue=Xn(ue,Me," ")})),H&&nt?H.createHTML(ue):ue},n.setConfig=function(){$(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),_t=!0},n.clearConfig=function(){c=null,_t=!1},n.isValidAttribute=function(g,K,V){c||$({});const ce=Pe(g),Ae=Pe(K);return Je(ce,Ae,V)},n.addHook=function(g,K){typeof K=="function"&&Yn(_[g],K)},n.removeHook=function(g,K){if(K!==void 0){const V=c0(_[g],K);return V===-1?void 0:p0(_[g],V,1)[0]}return Gl(_[g])},n.removeHooks=function(g){_[g]=[]},n.removeAllHooks=function(){_={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n})();Hr.addHook("uponSanitizeAttribute",(function(e,t){/^data-trix-/.test(t.attrName)&&(t.forceKeepAttr=!0)}));const M0="style href src width height language class".split(" "),D0="javascript:".split(" "),O0="script iframe form noscript".split(" ");class ni extends it{static setHTML(t,n,r){const i=new this(n,r).sanitize(),l=i.getHTML?i.getHTML():i.outerHTML;t.innerHTML=l}static sanitize(t,n){const r=new this(t,n);return r.sanitize(),r}constructor(t){let{allowedAttributes:n,forbiddenProtocols:r,forbiddenElements:i,purifyOptions:l}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.allowedAttributes=n||M0,this.forbiddenProtocols=r||D0,this.forbiddenElements=i||O0,this.purifyOptions=l||{},this.body=$0(t)}sanitize(){this.sanitizeElements(),this.normalizeListElementNesting();const t=Object.assign({},ad,this.purifyOptions);return Hr.setConfig(t),this.body=Hr.sanitize(this.body),this.body}getHTML(){return this.body.innerHTML}getBody(){return this.body}sanitizeElements(){const t=zr(this.body),n=[];for(;t.nextNode();){const r=t.currentNode;switch(r.nodeType){case Node.ELEMENT_NODE:this.elementIsRemovable(r)?n.push(r):this.sanitizeElement(r);break;case Node.COMMENT_NODE:n.push(r)}}return n.forEach((r=>mn(r))),this.body}sanitizeElement(t){return t.hasAttribute("href")&&this.forbiddenProtocols.includes(t.protocol)&&t.removeAttribute("href"),Array.from(t.attributes).forEach((n=>{let{name:r}=n;this.allowedAttributes.includes(r)||r.indexOf("data-trix")===0||t.removeAttribute(r)})),t}normalizeListElementNesting(){return Array.from(this.body.querySelectorAll("ul,ol")).forEach((t=>{const n=t.previousElementSibling;n&&gt(n)==="li"&&n.appendChild(t)})),this.body}elementIsRemovable(t){if(t?.nodeType===Node.ELEMENT_NODE)return this.elementIsForbidden(t)||this.elementIsntSerializable(t)}elementIsForbidden(t){return this.forbiddenElements.includes(gt(t))}elementIsntSerializable(t){return t.getAttribute("data-trix-serialize")==="false"&&!xn(t)}}const $0=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";e=e.replace(/<\/html[^>]*>[^]*$/i,"</html>");const t=document.implementation.createHTMLDocument("");return t.documentElement.innerHTML=e,Array.from(t.head.querySelectorAll("style")).forEach((n=>{t.body.appendChild(n)})),t.body},{css:sn}=kr;class bl extends Mn{constructor(){super(...arguments),this.attachment=this.object,this.attachment.uploadProgressDelegate=this,this.attachmentPiece=this.options.piece}createContentNodes(){return[]}createNodes(){let t;const n=t=ke({tagName:"figure",className:this.getClassName(),data:this.getData(),editable:!1}),r=this.getHref();return r&&(t=ke({tagName:"a",editable:!1,attributes:{href:r,tabindex:-1}}),n.appendChild(t)),this.attachment.hasContent()?ni.setHTML(t,this.attachment.getContent()):this.createContentNodes().forEach((i=>{t.appendChild(i)})),t.appendChild(this.createCaptionElement()),this.attachment.isPending()&&(this.progressElement=ke({tagName:"progress",attributes:{class:sn.attachmentProgress,value:this.attachment.getUploadProgress(),max:100},data:{trixMutable:!0,trixStoreKey:["progressElement",this.attachment.id].join("/")}}),n.appendChild(this.progressElement)),[ro("left"),n,ro("right")]}createCaptionElement(){const t=ke({tagName:"figcaption",className:sn.attachmentCaption}),n=this.attachmentPiece.getCaption();if(n)t.classList.add("".concat(sn.attachmentCaption,"--edited")),t.textContent=n;else{let r,i;const l=this.getCaptionConfig();if(l.name&&(r=this.attachment.getFilename()),l.size&&(i=this.attachment.getFormattedFilesize()),r){const a=ke({tagName:"span",className:sn.attachmentName,textContent:r});t.appendChild(a)}if(i){r&&t.appendChild(document.createTextNode(" "));const a=ke({tagName:"span",className:sn.attachmentSize,textContent:i});t.appendChild(a)}}return t}getClassName(){const t=[sn.attachment,"".concat(sn.attachment,"--").concat(this.attachment.getType())],n=this.attachment.getExtension();return n&&t.push("".concat(sn.attachment,"--").concat(n)),t.join(" ")}getData(){const t={trixAttachment:JSON.stringify(this.attachment),trixContentType:this.attachment.getContentType(),trixId:this.attachment.id},{attributes:n}=this.attachmentPiece;return n.isEmpty()||(t.trixAttributes=JSON.stringify(n)),this.attachment.isPending()&&(t.trixSerialize=!1),t}getHref(){if(!F0(this.attachment.getContent(),"a"))return this.attachment.getHref()}getCaptionConfig(){var t;const n=this.attachment.getType(),r=vd((t=dl[n])===null||t===void 0?void 0:t.caption);return n==="file"&&(r.name=!0),r}findProgressElement(){var t;return(t=this.findElement())===null||t===void 0?void 0:t.querySelector("progress")}attachmentDidChangeUploadProgress(){const t=this.attachment.getUploadProgress(),n=this.findProgressElement();n&&(n.value=t)}}const ro=e=>ke({tagName:"span",textContent:ti,data:{trixCursorTarget:e,trixSerialize:!1}}),F0=function(e,t){const n=ke("div");return ni.setHTML(n,e||""),n.querySelector(t)};class Cd extends bl{constructor(){super(...arguments),this.attachment.previewDelegate=this}createContentNodes(){return this.image=ke({tagName:"img",attributes:{src:""},data:{trixMutable:!0}}),this.refresh(this.image),[this.image]}createCaptionElement(){const t=super.createCaptionElement(...arguments);return t.textContent||t.setAttribute("data-trix-placeholder",me.captionPlaceholder),t}refresh(t){var n;if(t||(t=(n=this.findElement())===null||n===void 0?void 0:n.querySelector("img")),t)return this.updateAttributesForImage(t)}updateAttributesForImage(t){const n=this.attachment.getURL(),r=this.attachment.getPreviewURL();if(t.src=r||n,r===n)t.removeAttribute("data-trix-serialized-attributes");else{const o=JSON.stringify({src:n});t.setAttribute("data-trix-serialized-attributes",o)}const i=this.attachment.getWidth(),l=this.attachment.getHeight();i!=null&&(t.width=i),l!=null&&(t.height=l);const a=["imageElement",this.attachment.id,t.src,t.width,t.height].join("/");t.dataset.trixStoreKey=a}attachmentDidChangeAttributes(){return this.refresh(this.image),this.refresh()}}class Ad extends Mn{constructor(){super(...arguments),this.piece=this.object,this.attributes=this.piece.getAttributes(),this.textConfig=this.options.textConfig,this.context=this.options.context,this.piece.attachment?this.attachment=this.piece.attachment:this.string=this.piece.toString()}createNodes(){let t=this.attachment?this.createAttachmentNodes():this.createStringNodes();const n=this.createElement();if(n){const r=(function(i){for(;(l=i)!==null&&l!==void 0&&l.firstElementChild;){var l;i=i.firstElementChild}return i})(n);Array.from(t).forEach((i=>{r.appendChild(i)})),t=[n]}return t}createAttachmentNodes(){const t=this.attachment.isPreviewable()?Cd:bl;return this.createChildView(t,this.piece.attachment,{piece:this.piece}).getNodes()}createStringNodes(){var t;if((t=this.textConfig)!==null&&t!==void 0&&t.plaintext)return[document.createTextNode(this.string)];{const n=[],r=this.string.split(`
5956
+ `);for(let i=0;i<r.length;i++){const l=r[i];if(i>0){const a=ke("br");n.push(a)}if(l.length){const a=document.createTextNode(this.preserveSpaces(l));n.push(a)}}return n}}createElement(){let t,n,r;const i={};for(n in this.attributes){r=this.attributes[n];const a=ji(n);if(a){if(a.tagName){var l;const o=ke(a.tagName);l?(l.appendChild(o),l=o):t=l=o}if(a.styleProperty&&(i[a.styleProperty]=r),a.style)for(n in a.style)r=a.style[n],i[n]=r}}if(Object.keys(i).length)for(n in t||(t=ke("span")),i)r=i[n],t.style[n]=r;return t}createContainerElement(){for(const t in this.attributes){const n=this.attributes[t],r=ji(t);if(r&&r.groupTagName){const i={};return i[t]=n,ke(r.groupTagName,i)}}}preserveSpaces(t){return this.context.isLast&&(t=t.replace(/\ $/,pn)),t=t.replace(/(\S)\ {3}(\S)/g,"$1 ".concat(pn," $2")).replace(/\ {2}/g,"".concat(pn," ")).replace(/\ {2}/g," ".concat(pn)),(this.context.isFirst||this.context.followsWhitespace)&&(t=t.replace(/^\ /,pn)),t}}class Ed extends Mn{constructor(){super(...arguments),this.text=this.object,this.textConfig=this.options.textConfig}createNodes(){const t=[],n=hl.groupObjects(this.getPieces()),r=n.length-1;for(let l=0;l<n.length;l++){const a=n[l],o={};l===0&&(o.isFirst=!0),l===r&&(o.isLast=!0),z0(i)&&(o.followsWhitespace=!0);const s=this.findOrCreateCachedChildView(Ad,a,{textConfig:this.textConfig,context:o});t.push(...Array.from(s.getNodes()||[]));var i=a}return t}getPieces(){return Array.from(this.text.getPieces()).filter((t=>!t.hasAttribute("blockBreak")))}}const z0=e=>/\s$/.test(e?.toString()),{css:io}=kr;class Ld extends Mn{constructor(){super(...arguments),this.block=this.object,this.attributes=this.block.getAttributes()}createNodes(){const t=[document.createComment("block")];if(this.block.isEmpty())t.push(ke("br"));else{var n;const r=(n=Xe(this.block.getLastAttribute()))===null||n===void 0?void 0:n.text,i=this.findOrCreateCachedChildView(Ed,this.block.text,{textConfig:r});t.push(...Array.from(i.getNodes()||[])),this.shouldAddExtraNewlineElement()&&t.push(ke("br"))}if(this.attributes.length)return t;{let r;const{tagName:i}=mt.default;this.block.isRTL()&&(r={dir:"rtl"});const l=ke({tagName:i,attributes:r});return t.forEach((a=>l.appendChild(a))),[l]}}createContainerElement(t){const n={};let r;const i=this.attributes[t],{tagName:l,htmlAttributes:a=[]}=Xe(i);if(t===0&&this.block.isRTL()&&Object.assign(n,{dir:"rtl"}),i==="attachmentGallery"){const o=this.block.getBlockBreakPosition();r="".concat(io.attachmentGallery," ").concat(io.attachmentGallery,"--").concat(o)}return Object.entries(this.block.htmlAttributes).forEach((o=>{let[s,u]=o;a.includes(s)&&(n[s]=u)})),ke({tagName:l,className:r,attributes:n})}shouldAddExtraNewlineElement(){return/\n\n$/.test(this.block.toString())}}class ri extends Mn{static render(t){const n=ke("div"),r=new this(t,{element:n});return r.render(),r.sync(),n}constructor(){super(...arguments),this.element=this.options.element,this.elementStore=new l0,this.setDocument(this.object)}setDocument(t){t.isEqualTo(this.document)||(this.document=this.object=t)}render(){if(this.childViews=[],this.shadowElement=ke("div"),!this.document.isEmpty()){const t=hl.groupObjects(this.document.getBlocks(),{asTree:!0});Array.from(t).forEach((n=>{const r=this.findOrCreateCachedChildView(Ld,n);Array.from(r.getNodes()).map((i=>this.shadowElement.appendChild(i)))}))}}isSynced(){return P0(this.shadowElement,this.element)}sync(){const t=this.createDocumentFragmentForSync();for(;this.element.lastChild;)this.element.removeChild(this.element.lastChild);return this.element.appendChild(t),this.didSync()}didSync(){return this.elementStore.reset(ao(this.element)),vl((()=>this.garbageCollectCachedViews()))}createDocumentFragmentForSync(){const t=document.createDocumentFragment();return Array.from(this.shadowElement.childNodes).forEach((n=>{t.appendChild(n.cloneNode(!0))})),Array.from(ao(t)).forEach((n=>{const r=this.elementStore.remove(n);r&&n.parentNode.replaceChild(r,n)})),t}}const ao=e=>e.querySelectorAll("[data-trix-store-key]"),P0=(e,t)=>lo(e.innerHTML)===lo(t.innerHTML),lo=e=>e.replace(/&nbsp;/g," ");function ht(e,t,n){return(t=N0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N0(e){var t=(function(n,r){if(typeof n!="object"||n===null)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var l=i.call(n,r);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)})(e,"string");return typeof t=="symbol"?t:String(t)}function Ne(e,t){return H0(e,xd(e,t,"get"))}function wl(e,t,n){return U0(e,xd(e,t,"set"),n),n}function xd(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function H0(e,t){return t.get?t.get.call(e):t.value}function U0(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function xr(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return n}function Sd(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function dr(e,t,n){Sd(e,t),t.set(e,n)}class Dn extends Bn{static registerType(t,n){n.type=t,this.types[t]=n}static fromJSON(t){const n=this.types[t.type];if(n)return n.fromJSON(t)}constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.attributes=It.box(n)}copyWithAttributes(t){return new this.constructor(this.getValue(),t)}copyWithAdditionalAttributes(t){return this.copyWithAttributes(this.attributes.merge(t))}copyWithoutAttribute(t){return this.copyWithAttributes(this.attributes.remove(t))}copy(){return this.copyWithAttributes(this.attributes)}getAttribute(t){return this.attributes.get(t)}getAttributesHash(){return this.attributes}getAttributes(){return this.attributes.toObject()}hasAttribute(t){return this.attributes.has(t)}hasSameStringValueAsPiece(t){return t&&this.toString()===t.toString()}hasSameAttributesAsPiece(t){return t&&(this.attributes===t.attributes||this.attributes.isEqualTo(t.attributes))}isBlockBreak(){return!1}isEqualTo(t){return super.isEqualTo(...arguments)||this.hasSameConstructorAs(t)&&this.hasSameStringValueAsPiece(t)&&this.hasSameAttributesAsPiece(t)}isEmpty(){return this.length===0}isSerializable(){return!0}toJSON(){return{type:this.constructor.type,attributes:this.getAttributes()}}contentsForInspection(){return{type:this.constructor.type,attributes:this.attributes.inspect()}}canBeGrouped(){return this.hasAttribute("href")}canBeGroupedWith(t){return this.getAttribute("href")===t.getAttribute("href")}getLength(){return this.length}canBeConsolidatedWith(t){return!1}}ht(Dn,"types",{});class Td extends Nr{constructor(t){super(...arguments),this.url=t}perform(t){const n=new Image;n.onload=()=>(n.width=this.width=n.naturalWidth,n.height=this.height=n.naturalHeight,t(!0,n)),n.onerror=()=>t(!1),n.src=this.url}}class _n extends Bn{static attachmentForFile(t){const n=new this(this.attributesForFile(t));return n.setFile(t),n}static attributesForFile(t){return new It({filename:t.name,filesize:t.size,contentType:t.type})}static fromJSON(t){return new this(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(t),this.releaseFile=this.releaseFile.bind(this),this.attributes=It.box(t),this.didChangeAttributes()}getAttribute(t){return this.attributes.get(t)}hasAttribute(t){return this.attributes.has(t)}getAttributes(){return this.attributes.toObject()}setAttributes(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=this.attributes.merge(t);var r,i,l,a;if(!this.attributes.isEqualTo(n))return this.attributes=n,this.didChangeAttributes(),(r=this.previewDelegate)===null||r===void 0||(i=r.attachmentDidChangeAttributes)===null||i===void 0||i.call(r,this),(l=this.delegate)===null||l===void 0||(a=l.attachmentDidChangeAttributes)===null||a===void 0?void 0:a.call(l,this)}didChangeAttributes(){if(this.isPreviewable())return this.preloadURL()}isPending(){return this.file!=null&&!(this.getURL()||this.getHref())}isPreviewable(){return this.attributes.has("previewable")?this.attributes.get("previewable"):_n.previewablePattern.test(this.getContentType())}getType(){return this.hasContent()?"content":this.isPreviewable()?"preview":"file"}getURL(){return this.attributes.get("url")}getHref(){return this.attributes.get("href")}getFilename(){return this.attributes.get("filename")||""}getFilesize(){return this.attributes.get("filesize")}getFormattedFilesize(){const t=this.attributes.get("filesize");return typeof t=="number"?ld.formatter(t):""}getExtension(){var t;return(t=this.getFilename().match(/\.(\w+)$/))===null||t===void 0?void 0:t[1].toLowerCase()}getContentType(){return this.attributes.get("contentType")}hasContent(){return this.attributes.has("content")}getContent(){return this.attributes.get("content")}getWidth(){return this.attributes.get("width")}getHeight(){return this.attributes.get("height")}getFile(){return this.file}setFile(t){if(this.file=t,this.isPreviewable())return this.preloadFile()}releaseFile(){this.releasePreloadedFile(),this.file=null}getUploadProgress(){return this.uploadProgress!=null?this.uploadProgress:0}setUploadProgress(t){var n,r;if(this.uploadProgress!==t)return this.uploadProgress=t,(n=this.uploadProgressDelegate)===null||n===void 0||(r=n.attachmentDidChangeUploadProgress)===null||r===void 0?void 0:r.call(n,this)}toJSON(){return this.getAttributes()}getCacheKey(){return[super.getCacheKey(...arguments),this.attributes.getCacheKey(),this.getPreviewURL()].join("/")}getPreviewURL(){return this.previewURL||this.preloadingURL}setPreviewURL(t){var n,r,i,l;if(t!==this.getPreviewURL())return this.previewURL=t,(n=this.previewDelegate)===null||n===void 0||(r=n.attachmentDidChangeAttributes)===null||r===void 0||r.call(n,this),(i=this.delegate)===null||i===void 0||(l=i.attachmentDidChangePreviewURL)===null||l===void 0?void 0:l.call(i,this)}preloadURL(){return this.preload(this.getURL(),this.releaseFile)}preloadFile(){if(this.file)return this.fileObjectURL=URL.createObjectURL(this.file),this.preload(this.fileObjectURL)}releasePreloadedFile(){this.fileObjectURL&&(URL.revokeObjectURL(this.fileObjectURL),this.fileObjectURL=null)}preload(t,n){if(t&&t!==this.getPreviewURL())return this.preloadingURL=t,new Td(t).then((r=>{let{width:i,height:l}=r;return this.getWidth()&&this.getHeight()||this.setAttributes({width:i,height:l}),this.preloadingURL=null,this.setPreviewURL(t),n?.()})).catch((()=>(this.preloadingURL=null,n?.())))}}ht(_n,"previewablePattern",/^image(\/(gif|png|webp|jpe?g)|$)/);class Wn extends Dn{static fromJSON(t){return new this(_n.fromJSON(t.attachment),t.attributes)}constructor(t){super(...arguments),this.attachment=t,this.length=1,this.ensureAttachmentExclusivelyHasAttribute("href"),this.attachment.hasContent()||this.removeProhibitedAttributes()}ensureAttachmentExclusivelyHasAttribute(t){this.hasAttribute(t)&&(this.attachment.hasAttribute(t)||this.attachment.setAttributes(this.attributes.slice([t])),this.attributes=this.attributes.remove(t))}removeProhibitedAttributes(){const t=this.attributes.slice(Wn.permittedAttributes);t.isEqualTo(this.attributes)||(this.attributes=t)}getValue(){return this.attachment}isSerializable(){return!this.attachment.isPending()}getCaption(){return this.attributes.get("caption")||""}isEqualTo(t){var n;return super.isEqualTo(t)&&this.attachment.id===(t==null||(n=t.attachment)===null||n===void 0?void 0:n.id)}toString(){return""}toJSON(){const t=super.toJSON(...arguments);return t.attachment=this.attachment,t}getCacheKey(){return[super.getCacheKey(...arguments),this.attachment.getCacheKey()].join("/")}toConsole(){return JSON.stringify(this.toString())}}ht(Wn,"permittedAttributes",["caption","presentation"]),Dn.registerType("attachment",Wn);class yl extends Dn{static fromJSON(t){return new this(t.string,t.attributes)}constructor(t){super(...arguments),this.string=(n=>n.replace(/\r\n?/g,`
5949
5957
  `))(t),this.length=this.string.length}getValue(){return this.string}toString(){return this.string.toString()}isBlockBreak(){return this.toString()===`
5950
- `&&this.getAttribute("blockBreak")===!0}toJSON(){const t=super.toJSON(...arguments);return t.string=this.string,t}canBeConsolidatedWith(t){return t&&this.hasSameConstructorAs(t)&&this.hasSameAttributesAsPiece(t)}consolidateWith(t){return new this.constructor(this.toString()+t.toString(),this.attributes)}splitAtOffset(t){let n,r;return t===0?(n=null,r=this):t===this.length?(n=this,r=null):(n=new this.constructor(this.string.slice(0,t),this.attributes),r=new this.constructor(this.string.slice(t),this.attributes)),[n,r]}toConsole(){let{string:t}=this;return t.length>15&&(t=t.slice(0,14)+"…"),JSON.stringify(t.toString())}}Dn.registerType("string",yl);class Ur extends Bn{static box(t){return t instanceof this?t:new this(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.objects=t.slice(0),this.length=this.objects.length}indexOf(t){return this.objects.indexOf(t)}splice(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return new this.constructor(fl(this.objects,...n))}eachObject(t){return this.objects.map((n,r)=>t(n,r))}insertObjectAtIndex(t,n){return this.splice(n,0,t)}insertSplittableListAtIndex(t,n){return this.splice(n,0,...t.objects)}insertSplittableListAtPosition(t,n){const[r,i]=this.splitObjectAtPosition(n);return new this.constructor(r).insertSplittableListAtIndex(t,i)}editObjectAtIndex(t,n){return this.replaceObjectAtIndex(n(this.objects[t]),t)}replaceObjectAtIndex(t,n){return this.splice(n,1,t)}removeObjectAtIndex(t){return this.splice(t,1)}getObjectAtIndex(t){return this.objects[t]}getSplittableListInRange(t){const[n,r,i]=this.splitObjectsAtRange(t);return new this.constructor(n.slice(r,i+1))}selectSplittableList(t){const n=this.objects.filter(r=>t(r));return new this.constructor(n)}removeObjectsInRange(t){const[n,r,i]=this.splitObjectsAtRange(t);return new this.constructor(n).splice(r,i-r+1)}transformObjectsInRange(t,n){const[r,i,l]=this.splitObjectsAtRange(t),a=r.map((o,s)=>i<=s&&s<=l?n(o):o);return new this.constructor(a)}splitObjectsAtRange(t){let n,[r,i,l]=this.splitObjectAtPosition(j0(t));return[r,n]=new this.constructor(r).splitObjectAtPosition(W0(t)+l),[r,i,n-1]}getObjectAtPosition(t){const{index:n}=this.findIndexAndOffsetAtPosition(t);return this.objects[n]}splitObjectAtPosition(t){let n,r;const{index:i,offset:l}=this.findIndexAndOffsetAtPosition(t),a=this.objects.slice(0);if(i!=null)if(l===0)n=i,r=0;else{const o=this.getObjectAtIndex(i),[s,u]=o.splitAtOffset(l);a.splice(i,1,s,u),n=i+1,r=s.getLength()-l}else n=a.length,r=0;return[a,n,r]}consolidate(){const t=[];let n=this.objects[0];return this.objects.slice(1).forEach(r=>{var i,l;(i=(l=n).canBeConsolidatedWith)!==null&&i!==void 0&&i.call(l,r)?n=n.consolidateWith(r):(t.push(n),n=r)}),n&&t.push(n),new this.constructor(t)}consolidateFromIndexToIndex(t,n){const r=this.objects.slice(0).slice(t,n+1),i=new this.constructor(r).consolidate().toArray();return this.splice(t,r.length,...i)}findIndexAndOffsetAtPosition(t){let n,r=0;for(n=0;n<this.objects.length;n++){const i=r+this.objects[n].getLength();if(r<=t&&t<i)return{index:n,offset:t-r};r=i}return{index:null,offset:null}}findPositionAtIndexAndOffset(t,n){let r=0;for(let i=0;i<this.objects.length;i++){const l=this.objects[i];if(i<t)r+=l.getLength();else if(i===t){r+=n;break}}return r}getEndPosition(){return this.endPosition==null&&(this.endPosition=0,this.objects.forEach(t=>this.endPosition+=t.getLength())),this.endPosition}toString(){return this.objects.join("")}toArray(){return this.objects.slice(0)}toJSON(){return this.toArray()}isEqualTo(t){return super.isEqualTo(...arguments)||U0(this.objects,t?.objects)}contentsForInspection(){return{objects:"[".concat(this.objects.map(t=>t.inspect()).join(", "),"]")}}}const U0=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(e.length!==t.length)return!1;let n=!0;for(let r=0;r<e.length;r++){const i=e[r];n&&!i.isEqualTo(t[r])&&(n=!1)}return n},j0=e=>e[0],W0=e=>e[1];class Ut extends Bn{static textForAttachmentWithAttributes(t,n){return new this([new Wn(t,n)])}static textForStringWithAttributes(t,n){return new this([new yl(t,n)])}static fromJSON(t){return new this(Array.from(t).map(n=>Dn.fromJSON(n)))}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments);const n=t.filter(r=>!r.isEmpty());this.pieceList=new Ur(n)}copy(){return this.copyWithPieceList(this.pieceList)}copyWithPieceList(t){return new this.constructor(t.consolidate().toArray())}copyUsingObjectMap(t){const n=this.getPieces().map(r=>t.find(r)||r);return new this.constructor(n)}appendText(t){return this.insertTextAtPosition(t,this.getLength())}insertTextAtPosition(t,n){return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t.pieceList,n))}removeTextAtRange(t){return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t))}replaceTextAtRange(t,n){return this.removeTextAtRange(n).insertTextAtPosition(t,n[0])}moveTextFromRangeToPosition(t,n){if(t[0]<=n&&n<=t[1])return;const r=this.getTextAtRange(t),i=r.getLength();return t[0]<n&&(n-=i),this.removeTextAtRange(t).insertTextAtPosition(r,n)}addAttributeAtRange(t,n,r){const i={};return i[t]=n,this.addAttributesAtRange(i,r)}addAttributesAtRange(t,n){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(n,r=>r.copyWithAdditionalAttributes(t)))}removeAttributeAtRange(t,n){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(n,r=>r.copyWithoutAttribute(t)))}setAttributesAtRange(t,n){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(n,r=>r.copyWithAttributes(t)))}getAttributesAtPosition(t){var n;return((n=this.pieceList.getObjectAtPosition(t))===null||n===void 0?void 0:n.getAttributes())||{}}getCommonAttributes(){const t=Array.from(this.pieceList.toArray()).map(n=>n.getAttributes());return It.fromCommonAttributesOfObjects(t).toObject()}getCommonAttributesAtRange(t){return this.getTextAtRange(t).getCommonAttributes()||{}}getExpandedRangeForAttributeAtOffset(t,n){let r,i=r=n;const l=this.getLength();for(;i>0&&this.getCommonAttributesAtRange([i-1,r])[t];)i--;for(;r<l&&this.getCommonAttributesAtRange([n,r+1])[t];)r++;return[i,r]}getTextAtRange(t){return this.copyWithPieceList(this.pieceList.getSplittableListInRange(t))}getStringAtRange(t){return this.pieceList.getSplittableListInRange(t).toString()}getStringAtPosition(t){return this.getStringAtRange([t,t+1])}startsWithString(t){return this.getStringAtRange([0,t.length])===t}endsWithString(t){const n=this.getLength();return this.getStringAtRange([n-t.length,n])===t}getAttachmentPieces(){return this.pieceList.toArray().filter(t=>!!t.attachment)}getAttachments(){return this.getAttachmentPieces().map(t=>t.attachment)}getAttachmentAndPositionById(t){let n=0;for(const i of this.pieceList.toArray()){var r;if(((r=i.attachment)===null||r===void 0?void 0:r.id)===t)return{attachment:i.attachment,position:n};n+=i.length}return{attachment:null,position:null}}getAttachmentById(t){const{attachment:n}=this.getAttachmentAndPositionById(t);return n}getRangeOfAttachment(t){const n=this.getAttachmentAndPositionById(t.id),r=n.position;if(t=n.attachment)return[r,r+1]}updateAttributesForAttachment(t,n){const r=this.getRangeOfAttachment(n);return r?this.addAttributesAtRange(t,r):this}getLength(){return this.pieceList.getEndPosition()}isEmpty(){return this.getLength()===0}isEqualTo(t){var n;return super.isEqualTo(t)||(t==null||(n=t.pieceList)===null||n===void 0?void 0:n.isEqualTo(this.pieceList))}isBlockBreak(){return this.getLength()===1&&this.pieceList.getObjectAtIndex(0).isBlockBreak()}eachPiece(t){return this.pieceList.eachObject(t)}getPieces(){return this.pieceList.toArray()}getPieceAtPosition(t){return this.pieceList.getObjectAtPosition(t)}contentsForInspection(){return{pieceList:this.pieceList.inspect()}}toSerializableText(){const t=this.pieceList.selectSplittableList(n=>n.isSerializable());return this.copyWithPieceList(t)}toString(){return this.pieceList.toString()}toJSON(){return this.pieceList.toJSON()}toConsole(){return JSON.stringify(this.pieceList.toArray().map(t=>JSON.parse(t.toConsole())))}getDirection(){return Gh(this.toString())}isRTL(){return this.getDirection()==="rtl"}}class Jt extends Bn{static fromJSON(t){return new this(Ut.fromJSON(t.text),t.attributes,t.htmlAttributes)}constructor(t,n,r){super(...arguments),this.text=V0(t||new Ut),this.attributes=n||[],this.htmlAttributes=r||{}}isEmpty(){return this.text.isBlockBreak()}isEqualTo(t){return!!super.isEqualTo(t)||this.text.isEqualTo(t?.text)&&Rn(this.attributes,t?.attributes)&&Vn(this.htmlAttributes,t?.htmlAttributes)}copyWithText(t){return new Jt(t,this.attributes,this.htmlAttributes)}copyWithoutText(){return this.copyWithText(null)}copyWithAttributes(t){return new Jt(this.text,t,this.htmlAttributes)}copyWithoutAttributes(){return this.copyWithAttributes(null)}copyUsingObjectMap(t){const n=t.find(this.text);return n?this.copyWithText(n):this.copyWithText(this.text.copyUsingObjectMap(t))}addAttribute(t){const n=this.attributes.concat(oo(t));return this.copyWithAttributes(n)}addHTMLAttribute(t,n){const r=Object.assign({},this.htmlAttributes,{[t]:n});return new Jt(this.text,this.attributes,r)}removeAttribute(t){const{listAttribute:n}=Xe(t),r=uo(uo(this.attributes,t),n);return this.copyWithAttributes(r)}removeLastAttribute(){return this.removeAttribute(this.getLastAttribute())}getLastAttribute(){return so(this.attributes)}getAttributes(){return this.attributes.slice(0)}getAttributeLevel(){return this.attributes.length}getAttributeAtLevel(t){return this.attributes[t-1]}hasAttribute(t){return this.attributes.includes(t)}hasAttributes(){return this.getAttributeLevel()>0}getLastNestableAttribute(){return so(this.getNestableAttributes())}getNestableAttributes(){return this.attributes.filter(t=>Xe(t).nestable)}getNestingLevel(){return this.getNestableAttributes().length}decreaseNestingLevel(){const t=this.getLastNestableAttribute();return t?this.removeAttribute(t):this}increaseNestingLevel(){const t=this.getLastNestableAttribute();if(t){const n=this.attributes.lastIndexOf(t),r=fl(this.attributes,n+1,0,...oo(t));return this.copyWithAttributes(r)}return this}getListItemAttributes(){return this.attributes.filter(t=>Xe(t).listAttribute)}isListItem(){var t;return(t=Xe(this.getLastAttribute()))===null||t===void 0?void 0:t.listAttribute}isTerminalBlock(){var t;return(t=Xe(this.getLastAttribute()))===null||t===void 0?void 0:t.terminal}breaksOnReturn(){var t;return(t=Xe(this.getLastAttribute()))===null||t===void 0?void 0:t.breakOnReturn}findLineBreakInDirectionFromPosition(t,n){const r=this.toString();let i;switch(t){case"forward":i=r.indexOf(`
5958
+ `&&this.getAttribute("blockBreak")===!0}toJSON(){const t=super.toJSON(...arguments);return t.string=this.string,t}canBeConsolidatedWith(t){return t&&this.hasSameConstructorAs(t)&&this.hasSameAttributesAsPiece(t)}consolidateWith(t){return new this.constructor(this.toString()+t.toString(),this.attributes)}splitAtOffset(t){let n,r;return t===0?(n=null,r=this):t===this.length?(n=this,r=null):(n=new this.constructor(this.string.slice(0,t),this.attributes),r=new this.constructor(this.string.slice(t),this.attributes)),[n,r]}toConsole(){let{string:t}=this;return t.length>15&&(t=t.slice(0,14)+"…"),JSON.stringify(t.toString())}}Dn.registerType("string",yl);class Ur extends Bn{static box(t){return t instanceof this?t:new this(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.objects=t.slice(0),this.length=this.objects.length}indexOf(t){return this.objects.indexOf(t)}splice(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return new this.constructor(fl(this.objects,...n))}eachObject(t){return this.objects.map(((n,r)=>t(n,r)))}insertObjectAtIndex(t,n){return this.splice(n,0,t)}insertSplittableListAtIndex(t,n){return this.splice(n,0,...t.objects)}insertSplittableListAtPosition(t,n){const[r,i]=this.splitObjectAtPosition(n);return new this.constructor(r).insertSplittableListAtIndex(t,i)}editObjectAtIndex(t,n){return this.replaceObjectAtIndex(n(this.objects[t]),t)}replaceObjectAtIndex(t,n){return this.splice(n,1,t)}removeObjectAtIndex(t){return this.splice(t,1)}getObjectAtIndex(t){return this.objects[t]}getSplittableListInRange(t){const[n,r,i]=this.splitObjectsAtRange(t);return new this.constructor(n.slice(r,i+1))}selectSplittableList(t){const n=this.objects.filter((r=>t(r)));return new this.constructor(n)}removeObjectsInRange(t){const[n,r,i]=this.splitObjectsAtRange(t);return new this.constructor(n).splice(r,i-r+1)}transformObjectsInRange(t,n){const[r,i,l]=this.splitObjectsAtRange(t),a=r.map(((o,s)=>i<=s&&s<=l?n(o):o));return new this.constructor(a)}splitObjectsAtRange(t){let n,[r,i,l]=this.splitObjectAtPosition(W0(t));return[r,n]=new this.constructor(r).splitObjectAtPosition(V0(t)+l),[r,i,n-1]}getObjectAtPosition(t){const{index:n}=this.findIndexAndOffsetAtPosition(t);return this.objects[n]}splitObjectAtPosition(t){let n,r;const{index:i,offset:l}=this.findIndexAndOffsetAtPosition(t),a=this.objects.slice(0);if(i!=null)if(l===0)n=i,r=0;else{const o=this.getObjectAtIndex(i),[s,u]=o.splitAtOffset(l);a.splice(i,1,s,u),n=i+1,r=s.getLength()-l}else n=a.length,r=0;return[a,n,r]}consolidate(){const t=[];let n=this.objects[0];return this.objects.slice(1).forEach((r=>{var i,l;(i=(l=n).canBeConsolidatedWith)!==null&&i!==void 0&&i.call(l,r)?n=n.consolidateWith(r):(t.push(n),n=r)})),n&&t.push(n),new this.constructor(t)}consolidateFromIndexToIndex(t,n){const r=this.objects.slice(0).slice(t,n+1),i=new this.constructor(r).consolidate().toArray();return this.splice(t,r.length,...i)}findIndexAndOffsetAtPosition(t){let n,r=0;for(n=0;n<this.objects.length;n++){const i=r+this.objects[n].getLength();if(r<=t&&t<i)return{index:n,offset:t-r};r=i}return{index:null,offset:null}}findPositionAtIndexAndOffset(t,n){let r=0;for(let i=0;i<this.objects.length;i++){const l=this.objects[i];if(i<t)r+=l.getLength();else if(i===t){r+=n;break}}return r}getEndPosition(){return this.endPosition==null&&(this.endPosition=0,this.objects.forEach((t=>this.endPosition+=t.getLength()))),this.endPosition}toString(){return this.objects.join("")}toArray(){return this.objects.slice(0)}toJSON(){return this.toArray()}isEqualTo(t){return super.isEqualTo(...arguments)||j0(this.objects,t?.objects)}contentsForInspection(){return{objects:"[".concat(this.objects.map((t=>t.inspect())).join(", "),"]")}}}const j0=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(e.length!==t.length)return!1;let n=!0;for(let r=0;r<e.length;r++){const i=e[r];n&&!i.isEqualTo(t[r])&&(n=!1)}return n},W0=e=>e[0],V0=e=>e[1];class Ut extends Bn{static textForAttachmentWithAttributes(t,n){return new this([new Wn(t,n)])}static textForStringWithAttributes(t,n){return new this([new yl(t,n)])}static fromJSON(t){return new this(Array.from(t).map((n=>Dn.fromJSON(n))))}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments);const n=t.filter((r=>!r.isEmpty()));this.pieceList=new Ur(n)}copy(){return this.copyWithPieceList(this.pieceList)}copyWithPieceList(t){return new this.constructor(t.consolidate().toArray())}copyUsingObjectMap(t){const n=this.getPieces().map((r=>t.find(r)||r));return new this.constructor(n)}appendText(t){return this.insertTextAtPosition(t,this.getLength())}insertTextAtPosition(t,n){return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t.pieceList,n))}removeTextAtRange(t){return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t))}replaceTextAtRange(t,n){return this.removeTextAtRange(n).insertTextAtPosition(t,n[0])}moveTextFromRangeToPosition(t,n){if(t[0]<=n&&n<=t[1])return;const r=this.getTextAtRange(t),i=r.getLength();return t[0]<n&&(n-=i),this.removeTextAtRange(t).insertTextAtPosition(r,n)}addAttributeAtRange(t,n,r){const i={};return i[t]=n,this.addAttributesAtRange(i,r)}addAttributesAtRange(t,n){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(n,(r=>r.copyWithAdditionalAttributes(t))))}removeAttributeAtRange(t,n){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(n,(r=>r.copyWithoutAttribute(t))))}setAttributesAtRange(t,n){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(n,(r=>r.copyWithAttributes(t))))}getAttributesAtPosition(t){var n;return((n=this.pieceList.getObjectAtPosition(t))===null||n===void 0?void 0:n.getAttributes())||{}}getCommonAttributes(){const t=Array.from(this.pieceList.toArray()).map((n=>n.getAttributes()));return It.fromCommonAttributesOfObjects(t).toObject()}getCommonAttributesAtRange(t){return this.getTextAtRange(t).getCommonAttributes()||{}}getExpandedRangeForAttributeAtOffset(t,n){let r,i=r=n;const l=this.getLength();for(;i>0&&this.getCommonAttributesAtRange([i-1,r])[t];)i--;for(;r<l&&this.getCommonAttributesAtRange([n,r+1])[t];)r++;return[i,r]}getTextAtRange(t){return this.copyWithPieceList(this.pieceList.getSplittableListInRange(t))}getStringAtRange(t){return this.pieceList.getSplittableListInRange(t).toString()}getStringAtPosition(t){return this.getStringAtRange([t,t+1])}startsWithString(t){return this.getStringAtRange([0,t.length])===t}endsWithString(t){const n=this.getLength();return this.getStringAtRange([n-t.length,n])===t}getAttachmentPieces(){return this.pieceList.toArray().filter((t=>!!t.attachment))}getAttachments(){return this.getAttachmentPieces().map((t=>t.attachment))}getAttachmentAndPositionById(t){let n=0;for(const i of this.pieceList.toArray()){var r;if(((r=i.attachment)===null||r===void 0?void 0:r.id)===t)return{attachment:i.attachment,position:n};n+=i.length}return{attachment:null,position:null}}getAttachmentById(t){const{attachment:n}=this.getAttachmentAndPositionById(t);return n}getRangeOfAttachment(t){const n=this.getAttachmentAndPositionById(t.id),r=n.position;if(t=n.attachment)return[r,r+1]}updateAttributesForAttachment(t,n){const r=this.getRangeOfAttachment(n);return r?this.addAttributesAtRange(t,r):this}getLength(){return this.pieceList.getEndPosition()}isEmpty(){return this.getLength()===0}isEqualTo(t){var n;return super.isEqualTo(t)||(t==null||(n=t.pieceList)===null||n===void 0?void 0:n.isEqualTo(this.pieceList))}isBlockBreak(){return this.getLength()===1&&this.pieceList.getObjectAtIndex(0).isBlockBreak()}eachPiece(t){return this.pieceList.eachObject(t)}getPieces(){return this.pieceList.toArray()}getPieceAtPosition(t){return this.pieceList.getObjectAtPosition(t)}contentsForInspection(){return{pieceList:this.pieceList.inspect()}}toSerializableText(){const t=this.pieceList.selectSplittableList((n=>n.isSerializable()));return this.copyWithPieceList(t)}toString(){return this.pieceList.toString()}toJSON(){return this.pieceList.toJSON()}toConsole(){return JSON.stringify(this.pieceList.toArray().map((t=>JSON.parse(t.toConsole()))))}getDirection(){return Jh(this.toString())}isRTL(){return this.getDirection()==="rtl"}}class Jt extends Bn{static fromJSON(t){return new this(Ut.fromJSON(t.text),t.attributes,t.htmlAttributes)}constructor(t,n,r){super(...arguments),this.text=_0(t||new Ut),this.attributes=n||[],this.htmlAttributes=r||{}}isEmpty(){return this.text.isBlockBreak()}isEqualTo(t){return!!super.isEqualTo(t)||this.text.isEqualTo(t?.text)&&Rn(this.attributes,t?.attributes)&&Vn(this.htmlAttributes,t?.htmlAttributes)}copyWithText(t){return new Jt(t,this.attributes,this.htmlAttributes)}copyWithoutText(){return this.copyWithText(null)}copyWithAttributes(t){return new Jt(this.text,t,this.htmlAttributes)}copyWithoutAttributes(){return this.copyWithAttributes(null)}copyUsingObjectMap(t){const n=t.find(this.text);return n?this.copyWithText(n):this.copyWithText(this.text.copyUsingObjectMap(t))}addAttribute(t){const n=this.attributes.concat(oo(t));return this.copyWithAttributes(n)}addHTMLAttribute(t,n){const r=Object.assign({},this.htmlAttributes,{[t]:n});return new Jt(this.text,this.attributes,r)}removeAttribute(t){const{listAttribute:n}=Xe(t),r=uo(uo(this.attributes,t),n);return this.copyWithAttributes(r)}removeLastAttribute(){return this.removeAttribute(this.getLastAttribute())}getLastAttribute(){return so(this.attributes)}getAttributes(){return this.attributes.slice(0)}getAttributeLevel(){return this.attributes.length}getAttributeAtLevel(t){return this.attributes[t-1]}hasAttribute(t){return this.attributes.includes(t)}hasAttributes(){return this.getAttributeLevel()>0}getLastNestableAttribute(){return so(this.getNestableAttributes())}getNestableAttributes(){return this.attributes.filter((t=>Xe(t).nestable))}getNestingLevel(){return this.getNestableAttributes().length}decreaseNestingLevel(){const t=this.getLastNestableAttribute();return t?this.removeAttribute(t):this}increaseNestingLevel(){const t=this.getLastNestableAttribute();if(t){const n=this.attributes.lastIndexOf(t),r=fl(this.attributes,n+1,0,...oo(t));return this.copyWithAttributes(r)}return this}getListItemAttributes(){return this.attributes.filter((t=>Xe(t).listAttribute))}isListItem(){var t;return(t=Xe(this.getLastAttribute()))===null||t===void 0?void 0:t.listAttribute}isTerminalBlock(){var t;return(t=Xe(this.getLastAttribute()))===null||t===void 0?void 0:t.terminal}breaksOnReturn(){var t;return(t=Xe(this.getLastAttribute()))===null||t===void 0?void 0:t.breakOnReturn}findLineBreakInDirectionFromPosition(t,n){const r=this.toString();let i;switch(t){case"forward":i=r.indexOf(`
5951
5959
  `,n);break;case"backward":i=r.slice(0,n).lastIndexOf(`
5952
5960
  `)}if(i!==-1)return i}contentsForInspection(){return{text:this.text.inspect(),attributes:this.attributes}}toString(){return this.text.toString()}toJSON(){return{text:this.text,attributes:this.attributes,htmlAttributes:this.htmlAttributes}}getDirection(){return this.text.getDirection()}isRTL(){return this.text.isRTL()}getLength(){return this.text.getLength()}canBeConsolidatedWith(t){return!this.hasAttributes()&&!t.hasAttributes()&&this.getDirection()===t.getDirection()}consolidateWith(t){const n=Ut.textForStringWithAttributes(`
5953
- `),r=this.getTextWithoutBlockBreak().appendText(n);return this.copyWithText(r.appendText(t.text))}splitAtOffset(t){let n,r;return t===0?(n=null,r=this):t===this.getLength()?(n=this,r=null):(n=this.copyWithText(this.text.getTextAtRange([0,t])),r=this.copyWithText(this.text.getTextAtRange([t,this.getLength()]))),[n,r]}getBlockBreakPosition(){return this.text.getLength()-1}getTextWithoutBlockBreak(){return Rd(this.text)?this.text.getTextAtRange([0,this.getBlockBreakPosition()]):this.text.copy()}canBeGrouped(t){return this.attributes[t]}canBeGroupedWith(t,n){const r=t.getAttributes(),i=r[n],l=this.attributes[n];return l===i&&!(Xe(l).group===!1&&!(()=>{if(!Ar){Ar=[];for(const a in mt){const{listAttribute:o}=mt[a];o!=null&&Ar.push(o)}}return Ar})().includes(r[n+1]))&&(this.getDirection()===t.getDirection()||t.isEmpty())}}const V0=function(e){return e=_0(e),e=q0(e)},_0=function(e){let t=!1;const n=e.getPieces();let r=n.slice(0,n.length-1);const i=n[n.length-1];return i?(r=r.map(l=>l.isBlockBreak()?(t=!0,K0(l)):l),t?new Ut([...r,i]):e):e},Q0=Ut.textForStringWithAttributes(`
5954
- `,{blockBreak:!0}),q0=function(e){return Rd(e)?e:e.appendText(Q0)},Rd=function(e){const t=e.getLength();return t===0?!1:e.getTextAtRange([t-1,t]).isBlockBreak()},K0=e=>e.copyWithoutAttribute("blockBreak"),oo=function(e){const{listAttribute:t}=Xe(e);return t?[t,e]:[e]},so=e=>e.slice(-1)[0],uo=function(e,t){const n=e.lastIndexOf(t);return n===-1?e:fl(e,n,1)};class $t extends Bn{static fromJSON(t){return new this(Array.from(t).map(n=>Jt.fromJSON(n)))}static fromString(t,n){const r=Ut.textForStringWithAttributes(t,n);return new this([new Jt(r)])}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),t.length===0&&(t=[new Jt]),this.blockList=Ur.box(t)}isEmpty(){const t=this.getBlockAtIndex(0);return this.blockList.length===1&&t.isEmpty()&&!t.hasAttributes()}copy(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).consolidateBlocks?this.blockList.consolidate().toArray():this.blockList.toArray();return new this.constructor(t)}copyUsingObjectsFromDocument(t){const n=new i0(t.getObjects());return this.copyUsingObjectMap(n)}copyUsingObjectMap(t){const n=this.getBlocks().map(r=>t.find(r)||r.copyUsingObjectMap(t));return new this.constructor(n)}copyWithBaseBlockAttributes(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const n=this.getBlocks().map(r=>{const i=t.concat(r.getAttributes());return r.copyWithAttributes(i)});return new this.constructor(n)}replaceBlock(t,n){const r=this.blockList.indexOf(t);return r===-1?this:new this.constructor(this.blockList.replaceObjectAtIndex(n,r))}insertDocumentAtRange(t,n){const{blockList:r}=t;n=De(n);let[i]=n;const{index:l,offset:a}=this.locationFromPosition(i);let o=this;const s=this.getBlockAtPosition(i);return nn(n)&&s.isEmpty()&&!s.hasAttributes()?o=new this.constructor(o.blockList.removeObjectAtIndex(l)):s.getBlockBreakPosition()===a&&i++,o=o.removeTextAtRange(n),new this.constructor(o.blockList.insertSplittableListAtPosition(r,i))}mergeDocumentAtRange(t,n){let r,i;n=De(n);const[l]=n,a=this.locationFromPosition(l),o=this.getBlockAtIndex(a.index).getAttributes(),s=t.getBaseBlockAttributes(),u=o.slice(-s.length);if(Rn(s,u)){const M=o.slice(0,-s.length);r=t.copyWithBaseBlockAttributes(M)}else r=t.copy({consolidateBlocks:!0}).copyWithBaseBlockAttributes(o);const f=r.getBlockCount(),S=r.getBlockAtIndex(0);if(Rn(o,S.getAttributes())){const M=S.getTextWithoutBlockBreak();if(i=this.insertTextAtRange(M,n),f>1){r=new this.constructor(r.getBlocks().slice(1));const C=l+M.getLength();i=i.insertDocumentAtRange(r,C)}}else i=this.insertDocumentAtRange(r,n);return i}insertTextAtRange(t,n){n=De(n);const[r]=n,{index:i,offset:l}=this.locationFromPosition(r),a=this.removeTextAtRange(n);return new this.constructor(a.blockList.editObjectAtIndex(i,o=>o.copyWithText(o.text.insertTextAtPosition(t,l))))}removeTextAtRange(t){let n;t=De(t);const[r,i]=t;if(nn(t))return this;const[l,a]=Array.from(this.locationRangeFromRange(t)),o=l.index,s=l.offset,u=this.getBlockAtIndex(o),f=a.index,S=a.offset,M=this.getBlockAtIndex(f);if(i-r==1&&u.getBlockBreakPosition()===s&&M.getBlockBreakPosition()!==S&&M.text.getStringAtPosition(S)===`
5955
- `)n=this.blockList.editObjectAtIndex(f,C=>C.copyWithText(C.text.removeTextAtRange([S,S+1])));else{let C;const E=u.text.getTextAtRange([0,s]),k=M.text.getTextAtRange([S,M.getLength()]),x=E.appendText(k);C=o!==f&&s===0&&u.getAttributeLevel()>=M.getAttributeLevel()?M.copyWithText(x):u.copyWithText(x);const O=f+1-o;n=this.blockList.splice(o,O,C)}return new this.constructor(n)}moveTextFromRangeToPosition(t,n){let r;t=De(t);const[i,l]=t;if(i<=n&&n<=l)return this;let a=this.getDocumentAtRange(t),o=this.removeTextAtRange(t);const s=i<n;s&&(n-=a.getLength());const[u,...f]=a.getBlocks();return f.length===0?(r=u.getTextWithoutBlockBreak(),s&&(n+=1)):r=u.text,o=o.insertTextAtRange(r,n),f.length===0?o:(a=new this.constructor(f),n+=r.getLength(),o.insertDocumentAtRange(a,n))}addAttributeAtRange(t,n,r){let{blockList:i}=this;return this.eachBlockAtRange(r,(l,a,o)=>i=i.editObjectAtIndex(o,function(){return Xe(t)?l.addAttribute(t,n):a[0]===a[1]?l:l.copyWithText(l.text.addAttributeAtRange(t,n,a))})),new this.constructor(i)}addAttribute(t,n){let{blockList:r}=this;return this.eachBlock((i,l)=>r=r.editObjectAtIndex(l,()=>i.addAttribute(t,n))),new this.constructor(r)}removeAttributeAtRange(t,n){let{blockList:r}=this;return this.eachBlockAtRange(n,function(i,l,a){Xe(t)?r=r.editObjectAtIndex(a,()=>i.removeAttribute(t)):l[0]!==l[1]&&(r=r.editObjectAtIndex(a,()=>i.copyWithText(i.text.removeAttributeAtRange(t,l))))}),new this.constructor(r)}updateAttributesForAttachment(t,n){const r=this.getRangeOfAttachment(n),[i]=Array.from(r),{index:l}=this.locationFromPosition(i),a=this.getTextAtIndex(l);return new this.constructor(this.blockList.editObjectAtIndex(l,o=>o.copyWithText(a.updateAttributesForAttachment(t,n))))}removeAttributeForAttachment(t,n){const r=this.getRangeOfAttachment(n);return this.removeAttributeAtRange(t,r)}setHTMLAttributeAtPosition(t,n,r){const i=this.getBlockAtPosition(t),l=i.addHTMLAttribute(n,r);return this.replaceBlock(i,l)}insertBlockBreakAtRange(t){let n;t=De(t);const[r]=t,{offset:i}=this.locationFromPosition(r),l=this.removeTextAtRange(t);return i===0&&(n=[new Jt]),new this.constructor(l.blockList.insertSplittableListAtPosition(new Ur(n),r))}applyBlockAttributeAtRange(t,n,r){const i=this.expandRangeToLineBreaksAndSplitBlocks(r);let l=i.document;r=i.range;const a=Xe(t);if(a.listAttribute){l=l.removeLastListAttributeAtRange(r,{exceptAttributeName:t});const o=l.convertLineBreaksToBlockBreaksInRange(r);l=o.document,r=o.range}else l=a.exclusive?l.removeBlockAttributesAtRange(r):a.terminal?l.removeLastTerminalAttributeAtRange(r):l.consolidateBlocksAtRange(r);return l.addAttributeAtRange(t,n,r)}removeLastListAttributeAtRange(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{blockList:r}=this;return this.eachBlockAtRange(t,function(i,l,a){const o=i.getLastAttribute();o&&Xe(o).listAttribute&&o!==n.exceptAttributeName&&(r=r.editObjectAtIndex(a,()=>i.removeAttribute(o)))}),new this.constructor(r)}removeLastTerminalAttributeAtRange(t){let{blockList:n}=this;return this.eachBlockAtRange(t,function(r,i,l){const a=r.getLastAttribute();a&&Xe(a).terminal&&(n=n.editObjectAtIndex(l,()=>r.removeAttribute(a)))}),new this.constructor(n)}removeBlockAttributesAtRange(t){let{blockList:n}=this;return this.eachBlockAtRange(t,function(r,i,l){r.hasAttributes()&&(n=n.editObjectAtIndex(l,()=>r.copyWithoutAttributes()))}),new this.constructor(n)}expandRangeToLineBreaksAndSplitBlocks(t){let n;t=De(t);let[r,i]=t;const l=this.locationFromPosition(r),a=this.locationFromPosition(i);let o=this;const s=o.getBlockAtIndex(l.index);if(l.offset=s.findLineBreakInDirectionFromPosition("backward",l.offset),l.offset!=null&&(n=o.positionFromLocation(l),o=o.insertBlockBreakAtRange([n,n+1]),a.index+=1,a.offset-=o.getBlockAtIndex(l.index).getLength(),l.index+=1),l.offset=0,a.offset===0&&a.index>l.index)a.index-=1,a.offset=o.getBlockAtIndex(a.index).getBlockBreakPosition();else{const u=o.getBlockAtIndex(a.index);u.text.getStringAtRange([a.offset-1,a.offset])===`
5956
- `?a.offset-=1:a.offset=u.findLineBreakInDirectionFromPosition("forward",a.offset),a.offset!==u.getBlockBreakPosition()&&(n=o.positionFromLocation(a),o=o.insertBlockBreakAtRange([n,n+1]))}return r=o.positionFromLocation(l),i=o.positionFromLocation(a),{document:o,range:t=De([r,i])}}convertLineBreaksToBlockBreaksInRange(t){t=De(t);let[n]=t;const r=this.getStringAtRange(t).slice(0,-1);let i=this;return r.replace(/.*?\n/g,function(l){n+=l.length,i=i.insertBlockBreakAtRange([n-1,n])}),{document:i,range:t}}consolidateBlocksAtRange(t){t=De(t);const[n,r]=t,i=this.locationFromPosition(n).index,l=this.locationFromPosition(r).index;return new this.constructor(this.blockList.consolidateFromIndexToIndex(i,l))}getDocumentAtRange(t){t=De(t);const n=this.blockList.getSplittableListInRange(t).toArray();return new this.constructor(n)}getStringAtRange(t){let n;const r=t=De(t);return r[r.length-1]!==this.getLength()&&(n=-1),this.getDocumentAtRange(t).toString().slice(0,n)}getBlockAtIndex(t){return this.blockList.getObjectAtIndex(t)}getBlockAtPosition(t){const{index:n}=this.locationFromPosition(t);return this.getBlockAtIndex(n)}getTextAtIndex(t){var n;return(n=this.getBlockAtIndex(t))===null||n===void 0?void 0:n.text}getTextAtPosition(t){const{index:n}=this.locationFromPosition(t);return this.getTextAtIndex(n)}getPieceAtPosition(t){const{index:n,offset:r}=this.locationFromPosition(t);return this.getTextAtIndex(n).getPieceAtPosition(r)}getCharacterAtPosition(t){const{index:n,offset:r}=this.locationFromPosition(t);return this.getTextAtIndex(n).getStringAtRange([r,r+1])}getLength(){return this.blockList.getEndPosition()}getBlocks(){return this.blockList.toArray()}getBlockCount(){return this.blockList.length}getEditCount(){return this.editCount}eachBlock(t){return this.blockList.eachObject(t)}eachBlockAtRange(t,n){let r,i;t=De(t);const[l,a]=t,o=this.locationFromPosition(l),s=this.locationFromPosition(a);if(o.index===s.index)return r=this.getBlockAtIndex(o.index),i=[o.offset,s.offset],n(r,i,o.index);for(let u=o.index;u<=s.index;u++)if(r=this.getBlockAtIndex(u),r){switch(u){case o.index:i=[o.offset,r.text.getLength()];break;case s.index:i=[0,s.offset];break;default:i=[0,r.text.getLength()]}n(r,i,u)}}getCommonAttributesAtRange(t){t=De(t);const[n]=t;if(nn(t))return this.getCommonAttributesAtPosition(n);{const r=[],i=[];return this.eachBlockAtRange(t,function(l,a){if(a[0]!==a[1])return r.push(l.text.getCommonAttributesAtRange(a)),i.push(co(l))}),It.fromCommonAttributesOfObjects(r).merge(It.fromCommonAttributesOfObjects(i)).toObject()}}getCommonAttributesAtPosition(t){let n,r;const{index:i,offset:l}=this.locationFromPosition(t),a=this.getBlockAtIndex(i);if(!a)return{};const o=co(a),s=a.text.getAttributesAtPosition(l),u=a.text.getAttributesAtPosition(l-1),f=Object.keys(Tn).filter(S=>Tn[S].inheritable);for(n in u)r=u[n],(r===s[n]||f.includes(n))&&(o[n]=r);return o}getRangeOfCommonAttributeAtPosition(t,n){const{index:r,offset:i}=this.locationFromPosition(n),l=this.getTextAtIndex(r),[a,o]=Array.from(l.getExpandedRangeForAttributeAtOffset(t,i)),s=this.positionFromLocation({index:r,offset:a}),u=this.positionFromLocation({index:r,offset:o});return De([s,u])}getBaseBlockAttributes(){let t=this.getBlockAtIndex(0).getAttributes();for(let n=1;n<this.getBlockCount();n++){const r=this.getBlockAtIndex(n).getAttributes(),i=Math.min(t.length,r.length);t=(()=>{const l=[];for(let a=0;a<i&&r[a]===t[a];a++)l.push(r[a]);return l})()}return t}getAttachmentById(t){for(const n of this.getAttachments())if(n.id===t)return n}getAttachmentPieces(){let t=[];return this.blockList.eachObject(n=>{let{text:r}=n;return t=t.concat(r.getAttachmentPieces())}),t}getAttachments(){return this.getAttachmentPieces().map(t=>t.attachment)}getRangeOfAttachment(t){let n=0;const r=this.blockList.toArray();for(let i=0;i<r.length;i++){const{text:l}=r[i],a=l.getRangeOfAttachment(t);if(a)return De([n+a[0],n+a[1]]);n+=l.getLength()}}getLocationRangeOfAttachment(t){const n=this.getRangeOfAttachment(t);return this.locationRangeFromRange(n)}getAttachmentPieceForAttachment(t){for(const n of this.getAttachmentPieces())if(n.attachment===t)return n}findRangesForBlockAttribute(t){let n=0;const r=[];return this.getBlocks().forEach(i=>{const l=i.getLength();i.hasAttribute(t)&&r.push([n,n+l]),n+=l}),r}findRangesForTextAttribute(t){let{withValue:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=0,i=[];const l=[];return this.getPieces().forEach(a=>{const o=a.getLength();(function(s){return n?s.getAttribute(t)===n:s.hasAttribute(t)})(a)&&(i[1]===r?i[1]=r+o:l.push(i=[r,r+o])),r+=o}),l}locationFromPosition(t){const n=this.blockList.findIndexAndOffsetAtPosition(Math.max(0,t));if(n.index!=null)return n;{const r=this.getBlocks();return{index:r.length-1,offset:r[r.length-1].getLength()}}}positionFromLocation(t){return this.blockList.findPositionAtIndexAndOffset(t.index,t.offset)}locationRangeFromPosition(t){return De(this.locationFromPosition(t))}locationRangeFromRange(t){if(!(t=De(t)))return;const[n,r]=Array.from(t),i=this.locationFromPosition(n),l=this.locationFromPosition(r);return De([i,l])}rangeFromLocationRange(t){let n;t=De(t);const r=this.positionFromLocation(t[0]);return nn(t)||(n=this.positionFromLocation(t[1])),De([r,n])}isEqualTo(t){return this.blockList.isEqualTo(t?.blockList)}getTexts(){return this.getBlocks().map(t=>t.text)}getPieces(){const t=[];return Array.from(this.getTexts()).forEach(n=>{t.push(...Array.from(n.getPieces()||[]))}),t}getObjects(){return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())}toSerializableDocument(){const t=[];return this.blockList.eachObject(n=>t.push(n.copyWithText(n.text.toSerializableText()))),new this.constructor(t)}toString(){return this.blockList.toString()}toJSON(){return this.blockList.toJSON()}toConsole(){return JSON.stringify(this.blockList.toArray().map(t=>JSON.parse(t.text.toConsole())))}}const co=function(e){const t={},n=e.getLastAttribute();return n&&(t[n]=!0),t},Ai=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return{string:e=nr(e),attributes:t,type:"string"}},po=(e,t)=>{try{return JSON.parse(e.getAttribute("data-trix-".concat(t)))}catch{return{}}};class gr extends it{static parse(t,n){const r=new this(t,n);return r.parse(),r}constructor(t){let{referenceElement:n,purifyOptions:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.html=t,this.referenceElement=n,this.purifyOptions=r,this.blocks=[],this.blockElements=[],this.processedElements=[]}getDocument(){return $t.fromJSON(this.blocks)}parse(){try{this.createHiddenContainer(),ni.setHTML(this.containerElement,this.html,{purifyOptions:this.purifyOptions});const t=zr(this.containerElement,{usingFilter:J0});for(;t.nextNode();)this.processNode(t.currentNode);return this.translateBlockElementMarginsToNewlines()}finally{this.removeHiddenContainer()}}createHiddenContainer(){return this.referenceElement?(this.containerElement=this.referenceElement.cloneNode(!1),this.containerElement.removeAttribute("id"),this.containerElement.setAttribute("data-trix-internal",""),this.containerElement.style.display="none",this.referenceElement.parentNode.insertBefore(this.containerElement,this.referenceElement.nextSibling)):(this.containerElement=ke({tagName:"div",style:{display:"none"}}),document.body.appendChild(this.containerElement))}removeHiddenContainer(){return mn(this.containerElement)}processNode(t){switch(t.nodeType){case Node.TEXT_NODE:if(!this.isInsignificantTextNode(t))return this.appendBlockForTextNode(t),this.processTextNode(t);break;case Node.ELEMENT_NODE:return this.appendBlockForElement(t),this.processElement(t)}}appendBlockForTextNode(t){const n=t.parentNode;if(n===this.currentBlockElement&&this.isBlockElement(t.previousSibling))return this.appendStringWithAttributes(`
5961
+ `),r=this.getTextWithoutBlockBreak().appendText(n);return this.copyWithText(r.appendText(t.text))}splitAtOffset(t){let n,r;return t===0?(n=null,r=this):t===this.getLength()?(n=this,r=null):(n=this.copyWithText(this.text.getTextAtRange([0,t])),r=this.copyWithText(this.text.getTextAtRange([t,this.getLength()]))),[n,r]}getBlockBreakPosition(){return this.text.getLength()-1}getTextWithoutBlockBreak(){return Rd(this.text)?this.text.getTextAtRange([0,this.getBlockBreakPosition()]):this.text.copy()}canBeGrouped(t){return this.attributes[t]}canBeGroupedWith(t,n){const r=t.getAttributes(),i=r[n],l=this.attributes[n];return l===i&&!(Xe(l).group===!1&&!(()=>{if(!Ar){Ar=[];for(const a in mt){const{listAttribute:o}=mt[a];o!=null&&Ar.push(o)}}return Ar})().includes(r[n+1]))&&(this.getDirection()===t.getDirection()||t.isEmpty())}}const _0=function(e){return e=Q0(e),e=K0(e)},Q0=function(e){let t=!1;const n=e.getPieces();let r=n.slice(0,n.length-1);const i=n[n.length-1];return i?(r=r.map((l=>l.isBlockBreak()?(t=!0,G0(l)):l)),t?new Ut([...r,i]):e):e},q0=Ut.textForStringWithAttributes(`
5962
+ `,{blockBreak:!0}),K0=function(e){return Rd(e)?e:e.appendText(q0)},Rd=function(e){const t=e.getLength();return t===0?!1:e.getTextAtRange([t-1,t]).isBlockBreak()},G0=e=>e.copyWithoutAttribute("blockBreak"),oo=function(e){const{listAttribute:t}=Xe(e);return t?[t,e]:[e]},so=e=>e.slice(-1)[0],uo=function(e,t){const n=e.lastIndexOf(t);return n===-1?e:fl(e,n,1)};class $t extends Bn{static fromJSON(t){return new this(Array.from(t).map((n=>Jt.fromJSON(n))))}static fromString(t,n){const r=Ut.textForStringWithAttributes(t,n);return new this([new Jt(r)])}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),t.length===0&&(t=[new Jt]),this.blockList=Ur.box(t)}isEmpty(){const t=this.getBlockAtIndex(0);return this.blockList.length===1&&t.isEmpty()&&!t.hasAttributes()}copy(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).consolidateBlocks?this.blockList.consolidate().toArray():this.blockList.toArray();return new this.constructor(t)}copyUsingObjectsFromDocument(t){const n=new a0(t.getObjects());return this.copyUsingObjectMap(n)}copyUsingObjectMap(t){const n=this.getBlocks().map((r=>t.find(r)||r.copyUsingObjectMap(t)));return new this.constructor(n)}copyWithBaseBlockAttributes(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const n=this.getBlocks().map((r=>{const i=t.concat(r.getAttributes());return r.copyWithAttributes(i)}));return new this.constructor(n)}replaceBlock(t,n){const r=this.blockList.indexOf(t);return r===-1?this:new this.constructor(this.blockList.replaceObjectAtIndex(n,r))}insertDocumentAtRange(t,n){const{blockList:r}=t;n=De(n);let[i]=n;const{index:l,offset:a}=this.locationFromPosition(i);let o=this;const s=this.getBlockAtPosition(i);return nn(n)&&s.isEmpty()&&!s.hasAttributes()?o=new this.constructor(o.blockList.removeObjectAtIndex(l)):s.getBlockBreakPosition()===a&&i++,o=o.removeTextAtRange(n),new this.constructor(o.blockList.insertSplittableListAtPosition(r,i))}mergeDocumentAtRange(t,n){let r,i;n=De(n);const[l]=n,a=this.locationFromPosition(l),o=this.getBlockAtIndex(a.index).getAttributes(),s=t.getBaseBlockAttributes(),u=o.slice(-s.length);if(Rn(s,u)){const M=o.slice(0,-s.length);r=t.copyWithBaseBlockAttributes(M)}else r=t.copy({consolidateBlocks:!0}).copyWithBaseBlockAttributes(o);const f=r.getBlockCount(),S=r.getBlockAtIndex(0);if(Rn(o,S.getAttributes())){const M=S.getTextWithoutBlockBreak();if(i=this.insertTextAtRange(M,n),f>1){r=new this.constructor(r.getBlocks().slice(1));const C=l+M.getLength();i=i.insertDocumentAtRange(r,C)}}else i=this.insertDocumentAtRange(r,n);return i}insertTextAtRange(t,n){n=De(n);const[r]=n,{index:i,offset:l}=this.locationFromPosition(r),a=this.removeTextAtRange(n);return new this.constructor(a.blockList.editObjectAtIndex(i,(o=>o.copyWithText(o.text.insertTextAtPosition(t,l)))))}removeTextAtRange(t){let n;t=De(t);const[r,i]=t;if(nn(t))return this;const[l,a]=Array.from(this.locationRangeFromRange(t)),o=l.index,s=l.offset,u=this.getBlockAtIndex(o),f=a.index,S=a.offset,M=this.getBlockAtIndex(f);if(i-r==1&&u.getBlockBreakPosition()===s&&M.getBlockBreakPosition()!==S&&M.text.getStringAtPosition(S)===`
5963
+ `)n=this.blockList.editObjectAtIndex(f,(C=>C.copyWithText(C.text.removeTextAtRange([S,S+1]))));else{let C;const E=u.text.getTextAtRange([0,s]),k=M.text.getTextAtRange([S,M.getLength()]),x=E.appendText(k);C=o!==f&&s===0&&u.getAttributeLevel()>=M.getAttributeLevel()?M.copyWithText(x):u.copyWithText(x);const O=f+1-o;n=this.blockList.splice(o,O,C)}return new this.constructor(n)}moveTextFromRangeToPosition(t,n){let r;t=De(t);const[i,l]=t;if(i<=n&&n<=l)return this;let a=this.getDocumentAtRange(t),o=this.removeTextAtRange(t);const s=i<n;s&&(n-=a.getLength());const[u,...f]=a.getBlocks();return f.length===0?(r=u.getTextWithoutBlockBreak(),s&&(n+=1)):r=u.text,o=o.insertTextAtRange(r,n),f.length===0?o:(a=new this.constructor(f),n+=r.getLength(),o.insertDocumentAtRange(a,n))}addAttributeAtRange(t,n,r){let{blockList:i}=this;return this.eachBlockAtRange(r,((l,a,o)=>i=i.editObjectAtIndex(o,(function(){return Xe(t)?l.addAttribute(t,n):a[0]===a[1]?l:l.copyWithText(l.text.addAttributeAtRange(t,n,a))})))),new this.constructor(i)}addAttribute(t,n){let{blockList:r}=this;return this.eachBlock(((i,l)=>r=r.editObjectAtIndex(l,(()=>i.addAttribute(t,n))))),new this.constructor(r)}removeAttributeAtRange(t,n){let{blockList:r}=this;return this.eachBlockAtRange(n,(function(i,l,a){Xe(t)?r=r.editObjectAtIndex(a,(()=>i.removeAttribute(t))):l[0]!==l[1]&&(r=r.editObjectAtIndex(a,(()=>i.copyWithText(i.text.removeAttributeAtRange(t,l)))))})),new this.constructor(r)}updateAttributesForAttachment(t,n){const r=this.getRangeOfAttachment(n),[i]=Array.from(r),{index:l}=this.locationFromPosition(i),a=this.getTextAtIndex(l);return new this.constructor(this.blockList.editObjectAtIndex(l,(o=>o.copyWithText(a.updateAttributesForAttachment(t,n)))))}removeAttributeForAttachment(t,n){const r=this.getRangeOfAttachment(n);return this.removeAttributeAtRange(t,r)}setHTMLAttributeAtPosition(t,n,r){const i=this.getBlockAtPosition(t),l=i.addHTMLAttribute(n,r);return this.replaceBlock(i,l)}insertBlockBreakAtRange(t){let n;t=De(t);const[r]=t,{offset:i}=this.locationFromPosition(r),l=this.removeTextAtRange(t);return i===0&&(n=[new Jt]),new this.constructor(l.blockList.insertSplittableListAtPosition(new Ur(n),r))}applyBlockAttributeAtRange(t,n,r){const i=this.expandRangeToLineBreaksAndSplitBlocks(r);let l=i.document;r=i.range;const a=Xe(t);if(a.listAttribute){l=l.removeLastListAttributeAtRange(r,{exceptAttributeName:t});const o=l.convertLineBreaksToBlockBreaksInRange(r);l=o.document,r=o.range}else l=a.exclusive?l.removeBlockAttributesAtRange(r):a.terminal?l.removeLastTerminalAttributeAtRange(r):l.consolidateBlocksAtRange(r);return l.addAttributeAtRange(t,n,r)}removeLastListAttributeAtRange(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{blockList:r}=this;return this.eachBlockAtRange(t,(function(i,l,a){const o=i.getLastAttribute();o&&Xe(o).listAttribute&&o!==n.exceptAttributeName&&(r=r.editObjectAtIndex(a,(()=>i.removeAttribute(o))))})),new this.constructor(r)}removeLastTerminalAttributeAtRange(t){let{blockList:n}=this;return this.eachBlockAtRange(t,(function(r,i,l){const a=r.getLastAttribute();a&&Xe(a).terminal&&(n=n.editObjectAtIndex(l,(()=>r.removeAttribute(a))))})),new this.constructor(n)}removeBlockAttributesAtRange(t){let{blockList:n}=this;return this.eachBlockAtRange(t,(function(r,i,l){r.hasAttributes()&&(n=n.editObjectAtIndex(l,(()=>r.copyWithoutAttributes())))})),new this.constructor(n)}expandRangeToLineBreaksAndSplitBlocks(t){let n;t=De(t);let[r,i]=t;const l=this.locationFromPosition(r),a=this.locationFromPosition(i);let o=this;const s=o.getBlockAtIndex(l.index);if(l.offset=s.findLineBreakInDirectionFromPosition("backward",l.offset),l.offset!=null&&(n=o.positionFromLocation(l),o=o.insertBlockBreakAtRange([n,n+1]),a.index+=1,a.offset-=o.getBlockAtIndex(l.index).getLength(),l.index+=1),l.offset=0,a.offset===0&&a.index>l.index)a.index-=1,a.offset=o.getBlockAtIndex(a.index).getBlockBreakPosition();else{const u=o.getBlockAtIndex(a.index);u.text.getStringAtRange([a.offset-1,a.offset])===`
5964
+ `?a.offset-=1:a.offset=u.findLineBreakInDirectionFromPosition("forward",a.offset),a.offset!==u.getBlockBreakPosition()&&(n=o.positionFromLocation(a),o=o.insertBlockBreakAtRange([n,n+1]))}return r=o.positionFromLocation(l),i=o.positionFromLocation(a),{document:o,range:t=De([r,i])}}convertLineBreaksToBlockBreaksInRange(t){t=De(t);let[n]=t;const r=this.getStringAtRange(t).slice(0,-1);let i=this;return r.replace(/.*?\n/g,(function(l){n+=l.length,i=i.insertBlockBreakAtRange([n-1,n])})),{document:i,range:t}}consolidateBlocksAtRange(t){t=De(t);const[n,r]=t,i=this.locationFromPosition(n).index,l=this.locationFromPosition(r).index;return new this.constructor(this.blockList.consolidateFromIndexToIndex(i,l))}getDocumentAtRange(t){t=De(t);const n=this.blockList.getSplittableListInRange(t).toArray();return new this.constructor(n)}getStringAtRange(t){let n;const r=t=De(t);return r[r.length-1]!==this.getLength()&&(n=-1),this.getDocumentAtRange(t).toString().slice(0,n)}getBlockAtIndex(t){return this.blockList.getObjectAtIndex(t)}getBlockAtPosition(t){const{index:n}=this.locationFromPosition(t);return this.getBlockAtIndex(n)}getTextAtIndex(t){var n;return(n=this.getBlockAtIndex(t))===null||n===void 0?void 0:n.text}getTextAtPosition(t){const{index:n}=this.locationFromPosition(t);return this.getTextAtIndex(n)}getPieceAtPosition(t){const{index:n,offset:r}=this.locationFromPosition(t);return this.getTextAtIndex(n).getPieceAtPosition(r)}getCharacterAtPosition(t){const{index:n,offset:r}=this.locationFromPosition(t);return this.getTextAtIndex(n).getStringAtRange([r,r+1])}getLength(){return this.blockList.getEndPosition()}getBlocks(){return this.blockList.toArray()}getBlockCount(){return this.blockList.length}getEditCount(){return this.editCount}eachBlock(t){return this.blockList.eachObject(t)}eachBlockAtRange(t,n){let r,i;t=De(t);const[l,a]=t,o=this.locationFromPosition(l),s=this.locationFromPosition(a);if(o.index===s.index)return r=this.getBlockAtIndex(o.index),i=[o.offset,s.offset],n(r,i,o.index);for(let u=o.index;u<=s.index;u++)if(r=this.getBlockAtIndex(u),r){switch(u){case o.index:i=[o.offset,r.text.getLength()];break;case s.index:i=[0,s.offset];break;default:i=[0,r.text.getLength()]}n(r,i,u)}}getCommonAttributesAtRange(t){t=De(t);const[n]=t;if(nn(t))return this.getCommonAttributesAtPosition(n);{const r=[],i=[];return this.eachBlockAtRange(t,(function(l,a){if(a[0]!==a[1])return r.push(l.text.getCommonAttributesAtRange(a)),i.push(co(l))})),It.fromCommonAttributesOfObjects(r).merge(It.fromCommonAttributesOfObjects(i)).toObject()}}getCommonAttributesAtPosition(t){let n,r;const{index:i,offset:l}=this.locationFromPosition(t),a=this.getBlockAtIndex(i);if(!a)return{};const o=co(a),s=a.text.getAttributesAtPosition(l),u=a.text.getAttributesAtPosition(l-1),f=Object.keys(Tn).filter((S=>Tn[S].inheritable));for(n in u)r=u[n],(r===s[n]||f.includes(n))&&(o[n]=r);return o}getRangeOfCommonAttributeAtPosition(t,n){const{index:r,offset:i}=this.locationFromPosition(n),l=this.getTextAtIndex(r),[a,o]=Array.from(l.getExpandedRangeForAttributeAtOffset(t,i)),s=this.positionFromLocation({index:r,offset:a}),u=this.positionFromLocation({index:r,offset:o});return De([s,u])}getBaseBlockAttributes(){let t=this.getBlockAtIndex(0).getAttributes();for(let n=1;n<this.getBlockCount();n++){const r=this.getBlockAtIndex(n).getAttributes(),i=Math.min(t.length,r.length);t=(()=>{const l=[];for(let a=0;a<i&&r[a]===t[a];a++)l.push(r[a]);return l})()}return t}getAttachmentById(t){for(const n of this.getAttachments())if(n.id===t)return n}getAttachmentPieces(){let t=[];return this.blockList.eachObject((n=>{let{text:r}=n;return t=t.concat(r.getAttachmentPieces())})),t}getAttachments(){return this.getAttachmentPieces().map((t=>t.attachment))}getRangeOfAttachment(t){let n=0;const r=this.blockList.toArray();for(let i=0;i<r.length;i++){const{text:l}=r[i],a=l.getRangeOfAttachment(t);if(a)return De([n+a[0],n+a[1]]);n+=l.getLength()}}getLocationRangeOfAttachment(t){const n=this.getRangeOfAttachment(t);return this.locationRangeFromRange(n)}getAttachmentPieceForAttachment(t){for(const n of this.getAttachmentPieces())if(n.attachment===t)return n}findRangesForBlockAttribute(t){let n=0;const r=[];return this.getBlocks().forEach((i=>{const l=i.getLength();i.hasAttribute(t)&&r.push([n,n+l]),n+=l})),r}findRangesForTextAttribute(t){let{withValue:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=0,i=[];const l=[];return this.getPieces().forEach((a=>{const o=a.getLength();(function(s){return n?s.getAttribute(t)===n:s.hasAttribute(t)})(a)&&(i[1]===r?i[1]=r+o:l.push(i=[r,r+o])),r+=o})),l}locationFromPosition(t){const n=this.blockList.findIndexAndOffsetAtPosition(Math.max(0,t));if(n.index!=null)return n;{const r=this.getBlocks();return{index:r.length-1,offset:r[r.length-1].getLength()}}}positionFromLocation(t){return this.blockList.findPositionAtIndexAndOffset(t.index,t.offset)}locationRangeFromPosition(t){return De(this.locationFromPosition(t))}locationRangeFromRange(t){if(!(t=De(t)))return;const[n,r]=Array.from(t),i=this.locationFromPosition(n),l=this.locationFromPosition(r);return De([i,l])}rangeFromLocationRange(t){let n;t=De(t);const r=this.positionFromLocation(t[0]);return nn(t)||(n=this.positionFromLocation(t[1])),De([r,n])}isEqualTo(t){return this.blockList.isEqualTo(t?.blockList)}getTexts(){return this.getBlocks().map((t=>t.text))}getPieces(){const t=[];return Array.from(this.getTexts()).forEach((n=>{t.push(...Array.from(n.getPieces()||[]))})),t}getObjects(){return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())}toSerializableDocument(){const t=[];return this.blockList.eachObject((n=>t.push(n.copyWithText(n.text.toSerializableText())))),new this.constructor(t)}toString(){return this.blockList.toString()}toJSON(){return this.blockList.toJSON()}toConsole(){return JSON.stringify(this.blockList.toArray().map((t=>JSON.parse(t.text.toConsole()))))}}const co=function(e){const t={},n=e.getLastAttribute();return n&&(t[n]=!0),t},Ai=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return{string:e=nr(e),attributes:t,type:"string"}},po=(e,t)=>{try{return JSON.parse(e.getAttribute("data-trix-".concat(t)))}catch{return{}}};class gr extends it{static parse(t,n){const r=new this(t,n);return r.parse(),r}constructor(t){let{referenceElement:n,purifyOptions:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.html=t,this.referenceElement=n,this.purifyOptions=r,this.blocks=[],this.blockElements=[],this.processedElements=[]}getDocument(){return $t.fromJSON(this.blocks)}parse(){try{this.createHiddenContainer(),ni.setHTML(this.containerElement,this.html,{purifyOptions:this.purifyOptions});const t=zr(this.containerElement,{usingFilter:Y0});for(;t.nextNode();)this.processNode(t.currentNode);return this.translateBlockElementMarginsToNewlines()}finally{this.removeHiddenContainer()}}createHiddenContainer(){return this.referenceElement?(this.containerElement=this.referenceElement.cloneNode(!1),this.containerElement.removeAttribute("id"),this.containerElement.setAttribute("data-trix-internal",""),this.containerElement.style.display="none",this.referenceElement.parentNode.insertBefore(this.containerElement,this.referenceElement.nextSibling)):(this.containerElement=ke({tagName:"div",style:{display:"none"}}),document.body.appendChild(this.containerElement))}removeHiddenContainer(){return mn(this.containerElement)}processNode(t){switch(t.nodeType){case Node.TEXT_NODE:if(!this.isInsignificantTextNode(t))return this.appendBlockForTextNode(t),this.processTextNode(t);break;case Node.ELEMENT_NODE:return this.appendBlockForElement(t),this.processElement(t)}}appendBlockForTextNode(t){const n=t.parentNode;if(n===this.currentBlockElement&&this.isBlockElement(t.previousSibling))return this.appendStringWithAttributes(`
5957
5965
  `);if(n===this.containerElement||this.isBlockElement(n)){var r;const i=this.getBlockAttributes(n),l=this.getBlockHTMLAttributes(n);Rn(i,(r=this.currentBlock)===null||r===void 0?void 0:r.attributes)||(this.currentBlock=this.appendBlockForAttributesWithElement(i,n,l),this.currentBlockElement=n)}}appendBlockForElement(t){const n=this.isBlockElement(t),r=An(this.currentBlockElement,t);if(n&&!this.isBlockElement(t.firstChild)){if(!this.isInsignificantTextNode(t.firstChild)||!this.isBlockElement(t.firstElementChild)){const i=this.getBlockAttributes(t),l=this.getBlockHTMLAttributes(t);if(t.firstChild){if(r&&Rn(i,this.currentBlock.attributes))return this.appendStringWithAttributes(`
5958
- `);this.currentBlock=this.appendBlockForAttributesWithElement(i,t,l),this.currentBlockElement=t}}}else if(this.currentBlockElement&&!r&&!n){const i=this.findParentBlockElement(t);if(i)return this.appendBlockForElement(i);this.currentBlock=this.appendEmptyBlock(),this.currentBlockElement=null}}findParentBlockElement(t){let{parentElement:n}=t;for(;n&&n!==this.containerElement;){if(this.isBlockElement(n)&&this.blockElements.includes(n))return n;n=n.parentElement}return null}processTextNode(t){let n=t.data;var r;return fo(t.parentNode)||(n=ml(n),Id((r=t.previousSibling)===null||r===void 0?void 0:r.textContent)&&(n=Y0(n))),this.appendStringWithAttributes(n,this.getTextAttributes(t.parentNode))}processElement(t){let n;if(xn(t)){if(n=po(t,"attachment"),Object.keys(n).length){const r=this.getTextAttributes(t);this.appendAttachmentWithAttributes(n,r),t.innerHTML=""}return this.processedElements.push(t)}switch(gt(t)){case"br":return this.isExtraBR(t)||this.isBlockElement(t.nextSibling)||this.appendStringWithAttributes(`
5959
- `,this.getTextAttributes(t)),this.processedElements.push(t);case"img":n={url:t.getAttribute("src"),contentType:"image"};const r=(i=>{const l=i.getAttribute("width"),a=i.getAttribute("height"),o={};return l&&(o.width=parseInt(l,10)),a&&(o.height=parseInt(a,10)),o})(t);for(const i in r){const l=r[i];n[i]=l}return this.appendAttachmentWithAttributes(n,this.getTextAttributes(t)),this.processedElements.push(t);case"tr":if(this.needsTableSeparator(t))return this.appendStringWithAttributes(Mr.tableRowSeparator);break;case"td":if(this.needsTableSeparator(t))return this.appendStringWithAttributes(Mr.tableCellSeparator)}}appendBlockForAttributesWithElement(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.blockElements.push(n);const i=function(){return{text:[],attributes:arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},htmlAttributes:arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}}}(t,r);return this.blocks.push(i),i}appendEmptyBlock(){return this.appendBlockForAttributesWithElement([],null)}appendStringWithAttributes(t,n){return this.appendPiece(Ai(t,n))}appendAttachmentWithAttributes(t,n){return this.appendPiece(function(r){return{attachment:r,attributes:arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},type:"attachment"}}(t,n))}appendPiece(t){return this.blocks.length===0&&this.appendEmptyBlock(),this.blocks[this.blocks.length-1].text.push(t)}appendStringToTextAtIndex(t,n){const{text:r}=this.blocks[n],i=r[r.length-1];if(i?.type!=="string")return r.push(Ai(t));i.string+=t}prependStringToTextAtIndex(t,n){const{text:r}=this.blocks[n],i=r[0];if(i?.type!=="string")return r.unshift(Ai(t));i.string=t+i.string}getTextAttributes(t){let n;const r={};for(const i in Tn){const l=Tn[i];if(l.tagName&&gn(t,{matchingSelector:l.tagName,untilNode:this.containerElement}))r[i]=!0;else if(l.parser){if(n=l.parser(t),n){let a=!1;for(const o of this.findBlockElementAncestors(t))if(l.parser(o)===n){a=!0;break}a||(r[i]=n)}}else l.styleProperty&&(n=t.style[l.styleProperty],n&&(r[i]=n))}if(xn(t)){const i=po(t,"attributes");for(const l in i)n=i[l],r[l]=n}return r}getBlockAttributes(t){const n=[];for(;t&&t!==this.containerElement;){for(const i in mt){const l=mt[i];var r;l.parse!==!1&&gt(t)===l.tagName&&((r=l.test)!==null&&r!==void 0&&r.call(l,t)||!l.test)&&(n.push(i),l.listAttribute&&n.push(l.listAttribute))}t=t.parentNode}return n.reverse()}getBlockHTMLAttributes(t){const n={},r=Object.values(mt).find(i=>i.tagName===gt(t));return(r?.htmlAttributes||[]).forEach(i=>{t.hasAttribute(i)&&(n[i]=t.getAttribute(i))}),n}findBlockElementAncestors(t){const n=[];for(;t&&t!==this.containerElement;){const r=gt(t);lr().includes(r)&&n.push(t),t=t.parentNode}return n}isBlockElement(t){if(t?.nodeType===Node.ELEMENT_NODE&&!xn(t)&&!gn(t,{matchingSelector:"td",untilNode:this.containerElement}))return lr().includes(gt(t))||window.getComputedStyle(t).display==="block"}isInsignificantTextNode(t){if(t?.nodeType!==Node.TEXT_NODE||!X0(t.data))return;const{parentNode:n,previousSibling:r,nextSibling:i}=t;return G0(n.previousSibling)&&!this.isBlockElement(n.previousSibling)||fo(n)?void 0:!r||this.isBlockElement(r)||!i||this.isBlockElement(i)}isExtraBR(t){return gt(t)==="br"&&this.isBlockElement(t.parentNode)&&t.parentNode.lastChild===t}needsTableSeparator(t){if(Mr.removeBlankTableCells){var n;const r=(n=t.previousSibling)===null||n===void 0?void 0:n.textContent;return r&&/\S/.test(r)}return t.previousSibling}translateBlockElementMarginsToNewlines(){const t=this.getMarginOfDefaultBlockElement();for(let n=0;n<this.blocks.length;n++){const r=this.getMarginOfBlockElementAtIndex(n);r&&(r.top>2*t.top&&this.prependStringToTextAtIndex(`
5966
+ `);this.currentBlock=this.appendBlockForAttributesWithElement(i,t,l),this.currentBlockElement=t}}}else if(this.currentBlockElement&&!r&&!n){const i=this.findParentBlockElement(t);if(i)return this.appendBlockForElement(i);this.currentBlock=this.appendEmptyBlock(),this.currentBlockElement=null}}findParentBlockElement(t){let{parentElement:n}=t;for(;n&&n!==this.containerElement;){if(this.isBlockElement(n)&&this.blockElements.includes(n))return n;n=n.parentElement}return null}processTextNode(t){let n=t.data;var r;return fo(t.parentNode)||(n=ml(n),Id((r=t.previousSibling)===null||r===void 0?void 0:r.textContent)&&(n=X0(n))),this.appendStringWithAttributes(n,this.getTextAttributes(t.parentNode))}processElement(t){let n;if(xn(t)){if(n=po(t,"attachment"),Object.keys(n).length){const r=this.getTextAttributes(t);this.appendAttachmentWithAttributes(n,r),t.innerHTML=""}return this.processedElements.push(t)}switch(gt(t)){case"br":return this.isExtraBR(t)||this.isBlockElement(t.nextSibling)||this.appendStringWithAttributes(`
5967
+ `,this.getTextAttributes(t)),this.processedElements.push(t);case"img":n={url:t.getAttribute("src"),contentType:"image"};const r=(i=>{const l=i.getAttribute("width"),a=i.getAttribute("height"),o={};return l&&(o.width=parseInt(l,10)),a&&(o.height=parseInt(a,10)),o})(t);for(const i in r){const l=r[i];n[i]=l}return this.appendAttachmentWithAttributes(n,this.getTextAttributes(t)),this.processedElements.push(t);case"tr":if(this.needsTableSeparator(t))return this.appendStringWithAttributes(Mr.tableRowSeparator);break;case"td":if(this.needsTableSeparator(t))return this.appendStringWithAttributes(Mr.tableCellSeparator)}}appendBlockForAttributesWithElement(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.blockElements.push(n);const i=(function(){return{text:[],attributes:arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},htmlAttributes:arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}}})(t,r);return this.blocks.push(i),i}appendEmptyBlock(){return this.appendBlockForAttributesWithElement([],null)}appendStringWithAttributes(t,n){return this.appendPiece(Ai(t,n))}appendAttachmentWithAttributes(t,n){return this.appendPiece((function(r){return{attachment:r,attributes:arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},type:"attachment"}})(t,n))}appendPiece(t){return this.blocks.length===0&&this.appendEmptyBlock(),this.blocks[this.blocks.length-1].text.push(t)}appendStringToTextAtIndex(t,n){const{text:r}=this.blocks[n],i=r[r.length-1];if(i?.type!=="string")return r.push(Ai(t));i.string+=t}prependStringToTextAtIndex(t,n){const{text:r}=this.blocks[n],i=r[0];if(i?.type!=="string")return r.unshift(Ai(t));i.string=t+i.string}getTextAttributes(t){let n;const r={};for(const i in Tn){const l=Tn[i];if(l.tagName&&gn(t,{matchingSelector:l.tagName,untilNode:this.containerElement}))r[i]=!0;else if(l.parser){if(n=l.parser(t),n){let a=!1;for(const o of this.findBlockElementAncestors(t))if(l.parser(o)===n){a=!0;break}a||(r[i]=n)}}else l.styleProperty&&(n=t.style[l.styleProperty],n&&(r[i]=n))}if(xn(t)){const i=po(t,"attributes");for(const l in i)n=i[l],r[l]=n}return r}getBlockAttributes(t){const n=[];for(;t&&t!==this.containerElement;){for(const i in mt){const l=mt[i];var r;l.parse!==!1&&gt(t)===l.tagName&&((r=l.test)!==null&&r!==void 0&&r.call(l,t)||!l.test)&&(n.push(i),l.listAttribute&&n.push(l.listAttribute))}t=t.parentNode}return n.reverse()}getBlockHTMLAttributes(t){const n={},r=Object.values(mt).find((i=>i.tagName===gt(t)));return(r?.htmlAttributes||[]).forEach((i=>{t.hasAttribute(i)&&(n[i]=t.getAttribute(i))})),n}findBlockElementAncestors(t){const n=[];for(;t&&t!==this.containerElement;){const r=gt(t);lr().includes(r)&&n.push(t),t=t.parentNode}return n}isBlockElement(t){if(t?.nodeType===Node.ELEMENT_NODE&&!xn(t)&&!gn(t,{matchingSelector:"td",untilNode:this.containerElement}))return lr().includes(gt(t))||window.getComputedStyle(t).display==="block"}isInsignificantTextNode(t){if(t?.nodeType!==Node.TEXT_NODE||!Z0(t.data))return;const{parentNode:n,previousSibling:r,nextSibling:i}=t;return J0(n.previousSibling)&&!this.isBlockElement(n.previousSibling)||fo(n)?void 0:!r||this.isBlockElement(r)||!i||this.isBlockElement(i)}isExtraBR(t){return gt(t)==="br"&&this.isBlockElement(t.parentNode)&&t.parentNode.lastChild===t}needsTableSeparator(t){if(Mr.removeBlankTableCells){var n;const r=(n=t.previousSibling)===null||n===void 0?void 0:n.textContent;return r&&/\S/.test(r)}return t.previousSibling}translateBlockElementMarginsToNewlines(){const t=this.getMarginOfDefaultBlockElement();for(let n=0;n<this.blocks.length;n++){const r=this.getMarginOfBlockElementAtIndex(n);r&&(r.top>2*t.top&&this.prependStringToTextAtIndex(`
5960
5968
  `,n),r.bottom>2*t.bottom&&this.appendStringToTextAtIndex(`
5961
- `,n))}}getMarginOfBlockElementAtIndex(t){const n=this.blockElements[t];if(n&&n.textContent&&!lr().includes(gt(n))&&!this.processedElements.includes(n))return vo(n)}getMarginOfDefaultBlockElement(){const t=ke(mt.default.tagName);return this.containerElement.appendChild(t),vo(t)}}const fo=function(e){const{whiteSpace:t}=window.getComputedStyle(e);return["pre","pre-wrap","pre-line"].includes(t)},G0=e=>e&&!Id(e.textContent),vo=function(e){const t=window.getComputedStyle(e);if(t.display==="block")return{top:parseInt(t.marginTop),bottom:parseInt(t.marginBottom)}},J0=function(e){return gt(e)==="style"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},Y0=e=>e.replace(new RegExp("^".concat(gl.source,"+")),""),X0=e=>new RegExp("^".concat(gl.source,"*$")).test(e),Id=e=>/\s$/.test(e),Z0=["contenteditable","data-trix-id","data-trix-store-key","data-trix-mutable","data-trix-placeholder","tabindex"],Qi="data-trix-serialized-attributes",e1="[".concat(Qi,"]"),t1=new RegExp("<!--block-->","g"),n1={"application/json":function(e){let t;if(e instanceof $t)t=e;else{if(!(e instanceof HTMLElement))throw new Error("unserializable object");t=gr.parse(e.innerHTML).getDocument()}return t.toSerializableDocument().toJSONString()},"text/html":function(e){let t;if(e instanceof $t)t=ri.render(e);else{if(!(e instanceof HTMLElement))throw new Error("unserializable object");t=e.cloneNode(!0)}return Array.from(t.querySelectorAll("[data-trix-serialize=false]")).forEach(n=>{mn(n)}),Z0.forEach(n=>{Array.from(t.querySelectorAll("[".concat(n,"]"))).forEach(r=>{r.removeAttribute(n)})}),Array.from(t.querySelectorAll(e1)).forEach(n=>{try{const r=JSON.parse(n.getAttribute(Qi));n.removeAttribute(Qi);for(const i in r){const l=r[i];n.setAttribute(i,l)}}catch{}}),t.innerHTML.replace(t1,"")}};var r1=Object.freeze({__proto__:null});class Ye extends it{constructor(t,n){super(...arguments),this.attachmentManager=t,this.attachment=n,this.id=this.attachment.id,this.file=this.attachment.file}remove(){return this.attachmentManager.requestRemovalOfAttachment(this.attachment)}}Ye.proxyMethod("attachment.getAttribute"),Ye.proxyMethod("attachment.hasAttribute"),Ye.proxyMethod("attachment.setAttribute"),Ye.proxyMethod("attachment.getAttributes"),Ye.proxyMethod("attachment.setAttributes"),Ye.proxyMethod("attachment.isPending"),Ye.proxyMethod("attachment.isPreviewable"),Ye.proxyMethod("attachment.getURL"),Ye.proxyMethod("attachment.getHref"),Ye.proxyMethod("attachment.getFilename"),Ye.proxyMethod("attachment.getFilesize"),Ye.proxyMethod("attachment.getFormattedFilesize"),Ye.proxyMethod("attachment.getExtension"),Ye.proxyMethod("attachment.getContentType"),Ye.proxyMethod("attachment.getFile"),Ye.proxyMethod("attachment.setFile"),Ye.proxyMethod("attachment.releaseFile"),Ye.proxyMethod("attachment.getUploadProgress"),Ye.proxyMethod("attachment.setUploadProgress");class Bd extends it{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.managedAttachments={},Array.from(t).forEach(n=>{this.manageAttachment(n)})}getAttachments(){const t=[];for(const n in this.managedAttachments){const r=this.managedAttachments[n];t.push(r)}return t}manageAttachment(t){return this.managedAttachments[t.id]||(this.managedAttachments[t.id]=new Ye(this,t)),this.managedAttachments[t.id]}attachmentIsManaged(t){return t.id in this.managedAttachments}requestRemovalOfAttachment(t){var n,r;if(this.attachmentIsManaged(t))return(n=this.delegate)===null||n===void 0||(r=n.attachmentManagerDidRequestRemovalOfAttachment)===null||r===void 0?void 0:r.call(n,t)}unmanageAttachment(t){const n=this.managedAttachments[t.id];return delete this.managedAttachments[t.id],n}}class Md{constructor(t){this.composition=t,this.document=this.composition.document;const n=this.composition.getSelectedRange();this.startPosition=n[0],this.endPosition=n[1],this.startLocation=this.document.locationFromPosition(this.startPosition),this.endLocation=this.document.locationFromPosition(this.endPosition),this.block=this.document.getBlockAtIndex(this.endLocation.index),this.breaksOnReturn=this.block.breaksOnReturn(),this.previousCharacter=this.block.text.getStringAtPosition(this.endLocation.offset-1),this.nextCharacter=this.block.text.getStringAtPosition(this.endLocation.offset)}shouldInsertBlockBreak(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?this.startLocation.offset!==0:this.breaksOnReturn&&this.nextCharacter!==`
5969
+ `,n))}}getMarginOfBlockElementAtIndex(t){const n=this.blockElements[t];if(n&&n.textContent&&!lr().includes(gt(n))&&!this.processedElements.includes(n))return vo(n)}getMarginOfDefaultBlockElement(){const t=ke(mt.default.tagName);return this.containerElement.appendChild(t),vo(t)}}const fo=function(e){const{whiteSpace:t}=window.getComputedStyle(e);return["pre","pre-wrap","pre-line"].includes(t)},J0=e=>e&&!Id(e.textContent),vo=function(e){const t=window.getComputedStyle(e);if(t.display==="block")return{top:parseInt(t.marginTop),bottom:parseInt(t.marginBottom)}},Y0=function(e){return gt(e)==="style"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},X0=e=>e.replace(new RegExp("^".concat(gl.source,"+")),""),Z0=e=>new RegExp("^".concat(gl.source,"*$")).test(e),Id=e=>/\s$/.test(e),e1=["contenteditable","data-trix-id","data-trix-store-key","data-trix-mutable","data-trix-placeholder","tabindex"],Qi="data-trix-serialized-attributes",t1="[".concat(Qi,"]"),n1=new RegExp("<!--block-->","g"),r1={"application/json":function(e){let t;if(e instanceof $t)t=e;else{if(!(e instanceof HTMLElement))throw new Error("unserializable object");t=gr.parse(e.innerHTML).getDocument()}return t.toSerializableDocument().toJSONString()},"text/html":function(e){let t;if(e instanceof $t)t=ri.render(e);else{if(!(e instanceof HTMLElement))throw new Error("unserializable object");t=e.cloneNode(!0)}return Array.from(t.querySelectorAll("[data-trix-serialize=false]")).forEach((n=>{mn(n)})),e1.forEach((n=>{Array.from(t.querySelectorAll("[".concat(n,"]"))).forEach((r=>{r.removeAttribute(n)}))})),Array.from(t.querySelectorAll(t1)).forEach((n=>{try{const r=JSON.parse(n.getAttribute(Qi));n.removeAttribute(Qi);for(const i in r){const l=r[i];n.setAttribute(i,l)}}catch{}})),t.innerHTML.replace(n1,"")}};var i1=Object.freeze({__proto__:null});class Ye extends it{constructor(t,n){super(...arguments),this.attachmentManager=t,this.attachment=n,this.id=this.attachment.id,this.file=this.attachment.file}remove(){return this.attachmentManager.requestRemovalOfAttachment(this.attachment)}}Ye.proxyMethod("attachment.getAttribute"),Ye.proxyMethod("attachment.hasAttribute"),Ye.proxyMethod("attachment.setAttribute"),Ye.proxyMethod("attachment.getAttributes"),Ye.proxyMethod("attachment.setAttributes"),Ye.proxyMethod("attachment.isPending"),Ye.proxyMethod("attachment.isPreviewable"),Ye.proxyMethod("attachment.getURL"),Ye.proxyMethod("attachment.getHref"),Ye.proxyMethod("attachment.getFilename"),Ye.proxyMethod("attachment.getFilesize"),Ye.proxyMethod("attachment.getFormattedFilesize"),Ye.proxyMethod("attachment.getExtension"),Ye.proxyMethod("attachment.getContentType"),Ye.proxyMethod("attachment.getFile"),Ye.proxyMethod("attachment.setFile"),Ye.proxyMethod("attachment.releaseFile"),Ye.proxyMethod("attachment.getUploadProgress"),Ye.proxyMethod("attachment.setUploadProgress");class Bd extends it{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.managedAttachments={},Array.from(t).forEach((n=>{this.manageAttachment(n)}))}getAttachments(){const t=[];for(const n in this.managedAttachments){const r=this.managedAttachments[n];t.push(r)}return t}manageAttachment(t){return this.managedAttachments[t.id]||(this.managedAttachments[t.id]=new Ye(this,t)),this.managedAttachments[t.id]}attachmentIsManaged(t){return t.id in this.managedAttachments}requestRemovalOfAttachment(t){var n,r;if(this.attachmentIsManaged(t))return(n=this.delegate)===null||n===void 0||(r=n.attachmentManagerDidRequestRemovalOfAttachment)===null||r===void 0?void 0:r.call(n,t)}unmanageAttachment(t){const n=this.managedAttachments[t.id];return delete this.managedAttachments[t.id],n}}class Md{constructor(t){this.composition=t,this.document=this.composition.document;const n=this.composition.getSelectedRange();this.startPosition=n[0],this.endPosition=n[1],this.startLocation=this.document.locationFromPosition(this.startPosition),this.endLocation=this.document.locationFromPosition(this.endPosition),this.block=this.document.getBlockAtIndex(this.endLocation.index),this.breaksOnReturn=this.block.breaksOnReturn(),this.previousCharacter=this.block.text.getStringAtPosition(this.endLocation.offset-1),this.nextCharacter=this.block.text.getStringAtPosition(this.endLocation.offset)}shouldInsertBlockBreak(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?this.startLocation.offset!==0:this.breaksOnReturn&&this.nextCharacter!==`
5962
5970
  `}shouldBreakFormattedBlock(){return this.block.hasAttributes()&&!this.block.isListItem()&&(this.breaksOnReturn&&this.nextCharacter===`
5963
5971
  `||this.previousCharacter===`
5964
5972
  `)}shouldDecreaseListLevel(){return this.block.hasAttributes()&&this.block.isListItem()&&this.block.isEmpty()}shouldPrependListItem(){return this.block.isListItem()&&this.startLocation.offset===0&&!this.block.isEmpty()}shouldRemoveLastBlockAttribute(){return this.block.hasAttributes()&&!this.block.isListItem()&&this.block.isEmpty()}}class cn extends it{constructor(){super(...arguments),this.document=new $t,this.attachments=[],this.currentAttributes={},this.revision=0}setDocument(t){var n,r;if(!t.isEqualTo(this.document))return this.document=t,this.refreshAttachments(),this.revision++,(n=this.delegate)===null||n===void 0||(r=n.compositionDidChangeDocument)===null||r===void 0?void 0:r.call(n,t)}getSnapshot(){return{document:this.document,selectedRange:this.getSelectedRange()}}loadSnapshot(t){var n,r,i,l;let{document:a,selectedRange:o}=t;return(n=this.delegate)===null||n===void 0||(r=n.compositionWillLoadSnapshot)===null||r===void 0||r.call(n),this.setDocument(a??new $t),this.setSelection(o??[0,0]),(i=this.delegate)===null||i===void 0||(l=i.compositionDidLoadSnapshot)===null||l===void 0?void 0:l.call(i)}insertText(t){let{updatePosition:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{updatePosition:!0};const r=this.getSelectedRange();this.setDocument(this.document.insertTextAtRange(t,r));const i=r[0],l=i+t.getLength();return n&&this.setSelection(l),this.notifyDelegateOfInsertionAtRange([i,l])}insertBlock(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Jt;const n=new $t([t]);return this.insertDocument(n)}insertDocument(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new $t;const n=this.getSelectedRange();this.setDocument(this.document.insertDocumentAtRange(t,n));const r=n[0],i=r+t.getLength();return this.setSelection(i),this.notifyDelegateOfInsertionAtRange([r,i])}insertString(t,n){const r=this.getCurrentTextAttributes(),i=Ut.textForStringWithAttributes(t,r);return this.insertText(i,n)}insertBlockBreak(){const t=this.getSelectedRange();this.setDocument(this.document.insertBlockBreakAtRange(t));const n=t[0],r=n+1;return this.setSelection(r),this.notifyDelegateOfInsertionAtRange([n,r])}insertLineBreak(){const t=new Md(this);if(t.shouldDecreaseListLevel())return this.decreaseListLevel(),this.setSelection(t.startPosition);if(t.shouldPrependListItem()){const n=new $t([t.block.copyWithoutText()]);return this.insertDocument(n)}return t.shouldInsertBlockBreak()?this.insertBlockBreak():t.shouldRemoveLastBlockAttribute()?this.removeLastBlockAttribute():t.shouldBreakFormattedBlock()?this.breakFormattedBlock(t):this.insertString(`
5965
- `)}insertHTML(t){const n=gr.parse(t,{purifyOptions:{SAFE_FOR_XML:!0}}).getDocument(),r=this.getSelectedRange();this.setDocument(this.document.mergeDocumentAtRange(n,r));const i=r[0],l=i+n.getLength()-1;return this.setSelection(l),this.notifyDelegateOfInsertionAtRange([i,l])}replaceHTML(t){const n=gr.parse(t).getDocument().copyUsingObjectsFromDocument(this.document),r=this.getLocationRange({strict:!1}),i=this.document.rangeFromLocationRange(r);return this.setDocument(n),this.setSelection(i)}insertFile(t){return this.insertFiles([t])}insertFiles(t){const n=[];return Array.from(t).forEach(r=>{var i;if((i=this.delegate)!==null&&i!==void 0&&i.compositionShouldAcceptFile(r)){const l=_n.attachmentForFile(r);n.push(l)}}),this.insertAttachments(n)}insertAttachment(t){return this.insertAttachments([t])}insertAttachments(t){let n=new Ut;return Array.from(t).forEach(r=>{var i;const l=r.getType(),a=(i=dl[l])===null||i===void 0?void 0:i.presentation,o=this.getCurrentTextAttributes();a&&(o.presentation=a);const s=Ut.textForAttachmentWithAttributes(r,o);n=n.appendText(s)}),this.insertText(n)}shouldManageDeletingInDirection(t){const n=this.getLocationRange();if(nn(n)){if(t==="backward"&&n[0].offset===0||this.shouldManageMovingCursorInDirection(t))return!0}else if(n[0].index!==n[1].index)return!0;return!1}deleteInDirection(t){let n,r,i,{length:l}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const a=this.getLocationRange();let o=this.getSelectedRange();const s=nn(o);if(s?r=t==="backward"&&a[0].offset===0:i=a[0].index!==a[1].index,r&&this.canDecreaseBlockAttributeLevel()){const u=this.getBlock();if(u.isListItem()?this.decreaseListLevel():this.decreaseBlockAttributeLevel(),this.setSelection(o[0]),u.isEmpty())return!1}return s&&(o=this.getExpandedRangeInDirection(t,{length:l}),t==="backward"&&(n=this.getAttachmentAtRange(o))),n?(this.editAttachment(n),!1):(this.setDocument(this.document.removeTextAtRange(o)),this.setSelection(o[0]),!r&&!i&&void 0)}moveTextFromRange(t){const[n]=Array.from(this.getSelectedRange());return this.setDocument(this.document.moveTextFromRangeToPosition(t,n)),this.setSelection(n)}removeAttachment(t){const n=this.document.getRangeOfAttachment(t);if(n)return this.stopEditingAttachment(),this.setDocument(this.document.removeTextAtRange(n)),this.setSelection(n[0])}removeLastBlockAttribute(){const[t,n]=Array.from(this.getSelectedRange()),r=this.document.getBlockAtPosition(n);return this.removeCurrentAttribute(r.getLastAttribute()),this.setSelection(t)}insertPlaceholder(){return this.placeholderPosition=this.getPosition(),this.insertString(" ")}selectPlaceholder(){if(this.placeholderPosition!=null)return this.setSelectedRange([this.placeholderPosition,this.placeholderPosition+1]),this.getSelectedRange()}forgetPlaceholder(){this.placeholderPosition=null}hasCurrentAttribute(t){const n=this.currentAttributes[t];return n!=null&&n!==!1}toggleCurrentAttribute(t){const n=!this.currentAttributes[t];return n?this.setCurrentAttribute(t,n):this.removeCurrentAttribute(t)}canSetCurrentAttribute(t){return Xe(t)?this.canSetCurrentBlockAttribute(t):this.canSetCurrentTextAttribute(t)}canSetCurrentTextAttribute(t){const n=this.getSelectedDocument();if(n){for(const r of Array.from(n.getAttachments()))if(!r.hasContent())return!1;return!0}}canSetCurrentBlockAttribute(t){const n=this.getBlock();if(n)return!n.isTerminalBlock()}setCurrentAttribute(t,n){return Xe(t)?this.setBlockAttribute(t,n):(this.setTextAttribute(t,n),this.currentAttributes[t]=n,this.notifyDelegateOfCurrentAttributesChange())}setHTMLAtributeAtPosition(t,n,r){var i;const l=this.document.getBlockAtPosition(t),a=(i=Xe(l.getLastAttribute()))===null||i===void 0?void 0:i.htmlAttributes;if(l&&a!=null&&a.includes(n)){const o=this.document.setHTMLAttributeAtPosition(t,n,r);this.setDocument(o)}}setTextAttribute(t,n){const r=this.getSelectedRange();if(!r)return;const[i,l]=Array.from(r);if(i!==l)return this.setDocument(this.document.addAttributeAtRange(t,n,r));if(t==="href"){const a=Ut.textForStringWithAttributes(n,{href:n});return this.insertText(a)}}setBlockAttribute(t,n){const r=this.getSelectedRange();if(this.canSetCurrentAttribute(t))return this.setDocument(this.document.applyBlockAttributeAtRange(t,n,r)),this.setSelection(r)}removeCurrentAttribute(t){return Xe(t)?(this.removeBlockAttribute(t),this.updateCurrentAttributes()):(this.removeTextAttribute(t),delete this.currentAttributes[t],this.notifyDelegateOfCurrentAttributesChange())}removeTextAttribute(t){const n=this.getSelectedRange();if(n)return this.setDocument(this.document.removeAttributeAtRange(t,n))}removeBlockAttribute(t){const n=this.getSelectedRange();if(n)return this.setDocument(this.document.removeAttributeAtRange(t,n))}canDecreaseNestingLevel(){var t;return((t=this.getBlock())===null||t===void 0?void 0:t.getNestingLevel())>0}canIncreaseNestingLevel(){var t;const n=this.getBlock();if(n){if((t=Xe(n.getLastNestableAttribute()))===null||t===void 0||!t.listAttribute)return n.getNestingLevel()>0;{const r=this.getPreviousBlock();if(r)return function(){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Rn((arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).slice(0,i.length),i)}(r.getListItemAttributes(),n.getListItemAttributes())}}}decreaseNestingLevel(){const t=this.getBlock();if(t)return this.setDocument(this.document.replaceBlock(t,t.decreaseNestingLevel()))}increaseNestingLevel(){const t=this.getBlock();if(t)return this.setDocument(this.document.replaceBlock(t,t.increaseNestingLevel()))}canDecreaseBlockAttributeLevel(){var t;return((t=this.getBlock())===null||t===void 0?void 0:t.getAttributeLevel())>0}decreaseBlockAttributeLevel(){var t;const n=(t=this.getBlock())===null||t===void 0?void 0:t.getLastAttribute();if(n)return this.removeCurrentAttribute(n)}decreaseListLevel(){let[t]=Array.from(this.getSelectedRange());const{index:n}=this.document.locationFromPosition(t);let r=n;const i=this.getBlock().getAttributeLevel();let l=this.document.getBlockAtIndex(r+1);for(;l&&l.isListItem()&&!(l.getAttributeLevel()<=i);)r++,l=this.document.getBlockAtIndex(r+1);t=this.document.positionFromLocation({index:n,offset:0});const a=this.document.positionFromLocation({index:r,offset:0});return this.setDocument(this.document.removeLastListAttributeAtRange([t,a]))}updateCurrentAttributes(){const t=this.getSelectedRange({ignoreLock:!0});if(t){const n=this.document.getCommonAttributesAtRange(t);if(Array.from(Ui()).forEach(r=>{n[r]||this.canSetCurrentAttribute(r)||(n[r]=!1)}),!Vn(n,this.currentAttributes))return this.currentAttributes=n,this.notifyDelegateOfCurrentAttributesChange()}}getCurrentAttributes(){return od.call({},this.currentAttributes)}getCurrentTextAttributes(){const t={};for(const n in this.currentAttributes){const r=this.currentAttributes[n];r!==!1&&ji(n)&&(t[n]=r)}return t}freezeSelection(){return this.setCurrentAttribute("frozen",!0)}thawSelection(){return this.removeCurrentAttribute("frozen")}hasFrozenSelection(){return this.hasCurrentAttribute("frozen")}setSelection(t){var n;const r=this.document.locationRangeFromRange(t);return(n=this.delegate)===null||n===void 0?void 0:n.compositionDidRequestChangingSelectionToLocationRange(r)}getSelectedRange(){const t=this.getLocationRange();if(t)return this.document.rangeFromLocationRange(t)}setSelectedRange(t){const n=this.document.locationRangeFromRange(t);return this.getSelectionManager().setLocationRange(n)}getPosition(){const t=this.getLocationRange();if(t)return this.document.positionFromLocation(t[0])}getLocationRange(t){return this.targetLocationRange?this.targetLocationRange:this.getSelectionManager().getLocationRange(t)||De({index:0,offset:0})}withTargetLocationRange(t,n){let r;this.targetLocationRange=t;try{r=n()}finally{this.targetLocationRange=null}return r}withTargetRange(t,n){const r=this.document.locationRangeFromRange(t);return this.withTargetLocationRange(r,n)}withTargetDOMRange(t,n){const r=this.createLocationRangeFromDOMRange(t,{strict:!1});return this.withTargetLocationRange(r,n)}getExpandedRangeInDirection(t){let{length:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},[r,i]=Array.from(this.getSelectedRange());return t==="backward"?n?r-=n:r=this.translateUTF16PositionFromOffset(r,-1):n?i+=n:i=this.translateUTF16PositionFromOffset(i,1),De([r,i])}shouldManageMovingCursorInDirection(t){if(this.editingAttachment)return!0;const n=this.getExpandedRangeInDirection(t);return this.getAttachmentAtRange(n)!=null}moveCursorInDirection(t){let n,r;if(this.editingAttachment)r=this.document.getRangeOfAttachment(this.editingAttachment);else{const i=this.getSelectedRange();r=this.getExpandedRangeInDirection(t),n=!Pr(i,r)}if(t==="backward"?this.setSelectedRange(r[0]):this.setSelectedRange(r[1]),n){const i=this.getAttachmentAtRange(r);if(i)return this.editAttachment(i)}}expandSelectionInDirection(t){let{length:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getExpandedRangeInDirection(t,{length:n});return this.setSelectedRange(r)}expandSelectionForEditing(){if(this.hasCurrentAttribute("href"))return this.expandSelectionAroundCommonAttribute("href")}expandSelectionAroundCommonAttribute(t){const n=this.getPosition(),r=this.document.getRangeOfCommonAttributeAtPosition(t,n);return this.setSelectedRange(r)}selectionContainsAttachments(){var t;return((t=this.getSelectedAttachments())===null||t===void 0?void 0:t.length)>0}selectionIsInCursorTarget(){return this.editingAttachment||this.positionIsCursorTarget(this.getPosition())}positionIsCursorTarget(t){const n=this.document.locationFromPosition(t);if(n)return this.locationIsCursorTarget(n)}positionIsBlockBreak(t){var n;return(n=this.document.getPieceAtPosition(t))===null||n===void 0?void 0:n.isBlockBreak()}getSelectedDocument(){const t=this.getSelectedRange();if(t)return this.document.getDocumentAtRange(t)}getSelectedAttachments(){var t;return(t=this.getSelectedDocument())===null||t===void 0?void 0:t.getAttachments()}getAttachments(){return this.attachments.slice(0)}refreshAttachments(){const t=this.document.getAttachments(),{added:n,removed:r}=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const a=[],o=[],s=new Set;i.forEach(f=>{s.add(f)});const u=new Set;return l.forEach(f=>{u.add(f),s.has(f)||a.push(f)}),i.forEach(f=>{u.has(f)||o.push(f)}),{added:a,removed:o}}(this.attachments,t);return this.attachments=t,Array.from(r).forEach(i=>{var l,a;i.delegate=null,(l=this.delegate)===null||l===void 0||(a=l.compositionDidRemoveAttachment)===null||a===void 0||a.call(l,i)}),(()=>{const i=[];return Array.from(n).forEach(l=>{var a,o;l.delegate=this,i.push((a=this.delegate)===null||a===void 0||(o=a.compositionDidAddAttachment)===null||o===void 0?void 0:o.call(a,l))}),i})()}attachmentDidChangeAttributes(t){var n,r;return this.revision++,(n=this.delegate)===null||n===void 0||(r=n.compositionDidEditAttachment)===null||r===void 0?void 0:r.call(n,t)}attachmentDidChangePreviewURL(t){var n,r;return this.revision++,(n=this.delegate)===null||n===void 0||(r=n.compositionDidChangeAttachmentPreviewURL)===null||r===void 0?void 0:r.call(n,t)}editAttachment(t,n){var r,i;if(t!==this.editingAttachment)return this.stopEditingAttachment(),this.editingAttachment=t,(r=this.delegate)===null||r===void 0||(i=r.compositionDidStartEditingAttachment)===null||i===void 0?void 0:i.call(r,this.editingAttachment,n)}stopEditingAttachment(){var t,n;this.editingAttachment&&((t=this.delegate)===null||t===void 0||(n=t.compositionDidStopEditingAttachment)===null||n===void 0||n.call(t,this.editingAttachment),this.editingAttachment=null)}updateAttributesForAttachment(t,n){return this.setDocument(this.document.updateAttributesForAttachment(t,n))}removeAttributeForAttachment(t,n){return this.setDocument(this.document.removeAttributeForAttachment(t,n))}breakFormattedBlock(t){let{document:n}=t;const{block:r}=t;let i=t.startPosition,l=[i-1,i];r.getBlockBreakPosition()===t.startLocation.offset?(r.breaksOnReturn()&&t.nextCharacter===`
5973
+ `)}insertHTML(t){const n=gr.parse(t,{purifyOptions:{SAFE_FOR_XML:!0}}).getDocument(),r=this.getSelectedRange();this.setDocument(this.document.mergeDocumentAtRange(n,r));const i=r[0],l=i+n.getLength()-1;return this.setSelection(l),this.notifyDelegateOfInsertionAtRange([i,l])}replaceHTML(t){const n=gr.parse(t).getDocument().copyUsingObjectsFromDocument(this.document),r=this.getLocationRange({strict:!1}),i=this.document.rangeFromLocationRange(r);return this.setDocument(n),this.setSelection(i)}insertFile(t){return this.insertFiles([t])}insertFiles(t){const n=[];return Array.from(t).forEach((r=>{var i;if((i=this.delegate)!==null&&i!==void 0&&i.compositionShouldAcceptFile(r)){const l=_n.attachmentForFile(r);n.push(l)}})),this.insertAttachments(n)}insertAttachment(t){return this.insertAttachments([t])}insertAttachments(t){let n=new Ut;return Array.from(t).forEach((r=>{var i;const l=r.getType(),a=(i=dl[l])===null||i===void 0?void 0:i.presentation,o=this.getCurrentTextAttributes();a&&(o.presentation=a);const s=Ut.textForAttachmentWithAttributes(r,o);n=n.appendText(s)})),this.insertText(n)}shouldManageDeletingInDirection(t){const n=this.getLocationRange();if(nn(n)){if(t==="backward"&&n[0].offset===0||this.shouldManageMovingCursorInDirection(t))return!0}else if(n[0].index!==n[1].index)return!0;return!1}deleteInDirection(t){let n,r,i,{length:l}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const a=this.getLocationRange();let o=this.getSelectedRange();const s=nn(o);if(s?r=t==="backward"&&a[0].offset===0:i=a[0].index!==a[1].index,r&&this.canDecreaseBlockAttributeLevel()){const u=this.getBlock();if(u.isListItem()?this.decreaseListLevel():this.decreaseBlockAttributeLevel(),this.setSelection(o[0]),u.isEmpty())return!1}return s&&(o=this.getExpandedRangeInDirection(t,{length:l}),t==="backward"&&(n=this.getAttachmentAtRange(o))),n?(this.editAttachment(n),!1):(this.setDocument(this.document.removeTextAtRange(o)),this.setSelection(o[0]),!r&&!i&&void 0)}moveTextFromRange(t){const[n]=Array.from(this.getSelectedRange());return this.setDocument(this.document.moveTextFromRangeToPosition(t,n)),this.setSelection(n)}removeAttachment(t){const n=this.document.getRangeOfAttachment(t);if(n)return this.stopEditingAttachment(),this.setDocument(this.document.removeTextAtRange(n)),this.setSelection(n[0])}removeLastBlockAttribute(){const[t,n]=Array.from(this.getSelectedRange()),r=this.document.getBlockAtPosition(n);return this.removeCurrentAttribute(r.getLastAttribute()),this.setSelection(t)}insertPlaceholder(){return this.placeholderPosition=this.getPosition(),this.insertString(" ")}selectPlaceholder(){if(this.placeholderPosition!=null)return this.setSelectedRange([this.placeholderPosition,this.placeholderPosition+1]),this.getSelectedRange()}forgetPlaceholder(){this.placeholderPosition=null}hasCurrentAttribute(t){const n=this.currentAttributes[t];return n!=null&&n!==!1}toggleCurrentAttribute(t){const n=!this.currentAttributes[t];return n?this.setCurrentAttribute(t,n):this.removeCurrentAttribute(t)}canSetCurrentAttribute(t){return Xe(t)?this.canSetCurrentBlockAttribute(t):this.canSetCurrentTextAttribute(t)}canSetCurrentTextAttribute(t){const n=this.getSelectedDocument();if(n){for(const r of Array.from(n.getAttachments()))if(!r.hasContent())return!1;return!0}}canSetCurrentBlockAttribute(t){const n=this.getBlock();if(n)return!n.isTerminalBlock()}setCurrentAttribute(t,n){return Xe(t)?this.setBlockAttribute(t,n):(this.setTextAttribute(t,n),this.currentAttributes[t]=n,this.notifyDelegateOfCurrentAttributesChange())}setHTMLAtributeAtPosition(t,n,r){var i;const l=this.document.getBlockAtPosition(t),a=(i=Xe(l.getLastAttribute()))===null||i===void 0?void 0:i.htmlAttributes;if(l&&a!=null&&a.includes(n)){const o=this.document.setHTMLAttributeAtPosition(t,n,r);this.setDocument(o)}}setTextAttribute(t,n){const r=this.getSelectedRange();if(!r)return;const[i,l]=Array.from(r);if(i!==l)return this.setDocument(this.document.addAttributeAtRange(t,n,r));if(t==="href"){const a=Ut.textForStringWithAttributes(n,{href:n});return this.insertText(a)}}setBlockAttribute(t,n){const r=this.getSelectedRange();if(this.canSetCurrentAttribute(t))return this.setDocument(this.document.applyBlockAttributeAtRange(t,n,r)),this.setSelection(r)}removeCurrentAttribute(t){return Xe(t)?(this.removeBlockAttribute(t),this.updateCurrentAttributes()):(this.removeTextAttribute(t),delete this.currentAttributes[t],this.notifyDelegateOfCurrentAttributesChange())}removeTextAttribute(t){const n=this.getSelectedRange();if(n)return this.setDocument(this.document.removeAttributeAtRange(t,n))}removeBlockAttribute(t){const n=this.getSelectedRange();if(n)return this.setDocument(this.document.removeAttributeAtRange(t,n))}canDecreaseNestingLevel(){var t;return((t=this.getBlock())===null||t===void 0?void 0:t.getNestingLevel())>0}canIncreaseNestingLevel(){var t;const n=this.getBlock();if(n){if((t=Xe(n.getLastNestableAttribute()))===null||t===void 0||!t.listAttribute)return n.getNestingLevel()>0;{const r=this.getPreviousBlock();if(r)return(function(){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Rn((arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).slice(0,i.length),i)})(r.getListItemAttributes(),n.getListItemAttributes())}}}decreaseNestingLevel(){const t=this.getBlock();if(t)return this.setDocument(this.document.replaceBlock(t,t.decreaseNestingLevel()))}increaseNestingLevel(){const t=this.getBlock();if(t)return this.setDocument(this.document.replaceBlock(t,t.increaseNestingLevel()))}canDecreaseBlockAttributeLevel(){var t;return((t=this.getBlock())===null||t===void 0?void 0:t.getAttributeLevel())>0}decreaseBlockAttributeLevel(){var t;const n=(t=this.getBlock())===null||t===void 0?void 0:t.getLastAttribute();if(n)return this.removeCurrentAttribute(n)}decreaseListLevel(){let[t]=Array.from(this.getSelectedRange());const{index:n}=this.document.locationFromPosition(t);let r=n;const i=this.getBlock().getAttributeLevel();let l=this.document.getBlockAtIndex(r+1);for(;l&&l.isListItem()&&!(l.getAttributeLevel()<=i);)r++,l=this.document.getBlockAtIndex(r+1);t=this.document.positionFromLocation({index:n,offset:0});const a=this.document.positionFromLocation({index:r,offset:0});return this.setDocument(this.document.removeLastListAttributeAtRange([t,a]))}updateCurrentAttributes(){const t=this.getSelectedRange({ignoreLock:!0});if(t){const n=this.document.getCommonAttributesAtRange(t);if(Array.from(Ui()).forEach((r=>{n[r]||this.canSetCurrentAttribute(r)||(n[r]=!1)})),!Vn(n,this.currentAttributes))return this.currentAttributes=n,this.notifyDelegateOfCurrentAttributesChange()}}getCurrentAttributes(){return od.call({},this.currentAttributes)}getCurrentTextAttributes(){const t={};for(const n in this.currentAttributes){const r=this.currentAttributes[n];r!==!1&&ji(n)&&(t[n]=r)}return t}freezeSelection(){return this.setCurrentAttribute("frozen",!0)}thawSelection(){return this.removeCurrentAttribute("frozen")}hasFrozenSelection(){return this.hasCurrentAttribute("frozen")}setSelection(t){var n;const r=this.document.locationRangeFromRange(t);return(n=this.delegate)===null||n===void 0?void 0:n.compositionDidRequestChangingSelectionToLocationRange(r)}getSelectedRange(){const t=this.getLocationRange();if(t)return this.document.rangeFromLocationRange(t)}setSelectedRange(t){const n=this.document.locationRangeFromRange(t);return this.getSelectionManager().setLocationRange(n)}getPosition(){const t=this.getLocationRange();if(t)return this.document.positionFromLocation(t[0])}getLocationRange(t){return this.targetLocationRange?this.targetLocationRange:this.getSelectionManager().getLocationRange(t)||De({index:0,offset:0})}withTargetLocationRange(t,n){let r;this.targetLocationRange=t;try{r=n()}finally{this.targetLocationRange=null}return r}withTargetRange(t,n){const r=this.document.locationRangeFromRange(t);return this.withTargetLocationRange(r,n)}withTargetDOMRange(t,n){const r=this.createLocationRangeFromDOMRange(t,{strict:!1});return this.withTargetLocationRange(r,n)}getExpandedRangeInDirection(t){let{length:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},[r,i]=Array.from(this.getSelectedRange());return t==="backward"?n?r-=n:r=this.translateUTF16PositionFromOffset(r,-1):n?i+=n:i=this.translateUTF16PositionFromOffset(i,1),De([r,i])}shouldManageMovingCursorInDirection(t){if(this.editingAttachment)return!0;const n=this.getExpandedRangeInDirection(t);return this.getAttachmentAtRange(n)!=null}moveCursorInDirection(t){let n,r;if(this.editingAttachment)r=this.document.getRangeOfAttachment(this.editingAttachment);else{const i=this.getSelectedRange();r=this.getExpandedRangeInDirection(t),n=!Pr(i,r)}if(t==="backward"?this.setSelectedRange(r[0]):this.setSelectedRange(r[1]),n){const i=this.getAttachmentAtRange(r);if(i)return this.editAttachment(i)}}expandSelectionInDirection(t){let{length:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getExpandedRangeInDirection(t,{length:n});return this.setSelectedRange(r)}expandSelectionForEditing(){if(this.hasCurrentAttribute("href"))return this.expandSelectionAroundCommonAttribute("href")}expandSelectionAroundCommonAttribute(t){const n=this.getPosition(),r=this.document.getRangeOfCommonAttributeAtPosition(t,n);return this.setSelectedRange(r)}selectionContainsAttachments(){var t;return((t=this.getSelectedAttachments())===null||t===void 0?void 0:t.length)>0}selectionIsInCursorTarget(){return this.editingAttachment||this.positionIsCursorTarget(this.getPosition())}positionIsCursorTarget(t){const n=this.document.locationFromPosition(t);if(n)return this.locationIsCursorTarget(n)}positionIsBlockBreak(t){var n;return(n=this.document.getPieceAtPosition(t))===null||n===void 0?void 0:n.isBlockBreak()}getSelectedDocument(){const t=this.getSelectedRange();if(t)return this.document.getDocumentAtRange(t)}getSelectedAttachments(){var t;return(t=this.getSelectedDocument())===null||t===void 0?void 0:t.getAttachments()}getAttachments(){return this.attachments.slice(0)}refreshAttachments(){const t=this.document.getAttachments(),{added:n,removed:r}=(function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const a=[],o=[],s=new Set;i.forEach((f=>{s.add(f)}));const u=new Set;return l.forEach((f=>{u.add(f),s.has(f)||a.push(f)})),i.forEach((f=>{u.has(f)||o.push(f)})),{added:a,removed:o}})(this.attachments,t);return this.attachments=t,Array.from(r).forEach((i=>{var l,a;i.delegate=null,(l=this.delegate)===null||l===void 0||(a=l.compositionDidRemoveAttachment)===null||a===void 0||a.call(l,i)})),(()=>{const i=[];return Array.from(n).forEach((l=>{var a,o;l.delegate=this,i.push((a=this.delegate)===null||a===void 0||(o=a.compositionDidAddAttachment)===null||o===void 0?void 0:o.call(a,l))})),i})()}attachmentDidChangeAttributes(t){var n,r;return this.revision++,(n=this.delegate)===null||n===void 0||(r=n.compositionDidEditAttachment)===null||r===void 0?void 0:r.call(n,t)}attachmentDidChangePreviewURL(t){var n,r;return this.revision++,(n=this.delegate)===null||n===void 0||(r=n.compositionDidChangeAttachmentPreviewURL)===null||r===void 0?void 0:r.call(n,t)}editAttachment(t,n){var r,i;if(t!==this.editingAttachment)return this.stopEditingAttachment(),this.editingAttachment=t,(r=this.delegate)===null||r===void 0||(i=r.compositionDidStartEditingAttachment)===null||i===void 0?void 0:i.call(r,this.editingAttachment,n)}stopEditingAttachment(){var t,n;this.editingAttachment&&((t=this.delegate)===null||t===void 0||(n=t.compositionDidStopEditingAttachment)===null||n===void 0||n.call(t,this.editingAttachment),this.editingAttachment=null)}updateAttributesForAttachment(t,n){return this.setDocument(this.document.updateAttributesForAttachment(t,n))}removeAttributeForAttachment(t,n){return this.setDocument(this.document.removeAttributeForAttachment(t,n))}breakFormattedBlock(t){let{document:n}=t;const{block:r}=t;let i=t.startPosition,l=[i-1,i];r.getBlockBreakPosition()===t.startLocation.offset?(r.breaksOnReturn()&&t.nextCharacter===`
5966
5974
  `?i+=1:n=n.removeTextAtRange(l),l=[i,i]):t.nextCharacter===`
5967
5975
  `?t.previousCharacter===`
5968
5976
  `?l=[i-1,i+1]:(l=[i,i+1],i+=1):t.startLocation.offset-1!=0&&(i+=1);const a=new $t([r.removeLastAttribute().copyWithoutText()]);return this.setDocument(n.insertDocumentAtRange(a,l)),this.setSelection(i)}getPreviousBlock(){const t=this.getLocationRange();if(t){const{index:n}=t[0];if(n>0)return this.document.getBlockAtIndex(n-1)}}getBlock(){const t=this.getLocationRange();if(t)return this.document.getBlockAtIndex(t[0].index)}getAttachmentAtRange(t){const n=this.document.getDocumentAtRange(t);if(n.toString()==="".concat("",`
5969
- `))return n.getAttachments()[0]}notifyDelegateOfCurrentAttributesChange(){var t,n;return(t=this.delegate)===null||t===void 0||(n=t.compositionDidChangeCurrentAttributes)===null||n===void 0?void 0:n.call(t,this.currentAttributes)}notifyDelegateOfInsertionAtRange(t){var n,r;return(n=this.delegate)===null||n===void 0||(r=n.compositionDidPerformInsertionAtRange)===null||r===void 0?void 0:r.call(n,t)}translateUTF16PositionFromOffset(t,n){const r=this.document.toUTF16String(),i=r.offsetFromUCS2Offset(t);return r.offsetToUCS2Offset(i+n)}}cn.proxyMethod("getSelectionManager().getPointRange"),cn.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"),cn.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange"),cn.proxyMethod("getSelectionManager().locationIsCursorTarget"),cn.proxyMethod("getSelectionManager().selectionIsExpanded"),cn.proxyMethod("delegate?.getSelectionManager");class qi extends it{constructor(t){super(...arguments),this.composition=t,this.undoEntries=[],this.redoEntries=[]}recordUndoEntry(t){let{context:n,consolidatable:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.undoEntries.slice(-1)[0];if(!r||!i1(i,t,n)){const l=this.createEntry({description:t,context:n});this.undoEntries.push(l),this.redoEntries=[]}}undo(){const t=this.undoEntries.pop();if(t){const n=this.createEntry(t);return this.redoEntries.push(n),this.composition.loadSnapshot(t.snapshot)}}redo(){const t=this.redoEntries.pop();if(t){const n=this.createEntry(t);return this.undoEntries.push(n),this.composition.loadSnapshot(t.snapshot)}}canUndo(){return this.undoEntries.length>0}canRedo(){return this.redoEntries.length>0}createEntry(){let{description:t,context:n}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{description:t?.toString(),context:JSON.stringify(n),snapshot:this.composition.getSnapshot()}}}const i1=(e,t,n)=>e?.description===t?.toString()&&e?.context===JSON.stringify(n),Ei="attachmentGallery";class Dd{constructor(t){this.document=t.document,this.selectedRange=t.selectedRange}perform(){return this.removeBlockAttribute(),this.applyBlockAttribute()}getSnapshot(){return{document:this.document,selectedRange:this.selectedRange}}removeBlockAttribute(){return this.findRangesOfBlocks().map(t=>this.document=this.document.removeAttributeAtRange(Ei,t))}applyBlockAttribute(){let t=0;this.findRangesOfPieces().forEach(n=>{n[1]-n[0]>1&&(n[0]+=t,n[1]+=t,this.document.getCharacterAtPosition(n[1])!==`
5977
+ `))return n.getAttachments()[0]}notifyDelegateOfCurrentAttributesChange(){var t,n;return(t=this.delegate)===null||t===void 0||(n=t.compositionDidChangeCurrentAttributes)===null||n===void 0?void 0:n.call(t,this.currentAttributes)}notifyDelegateOfInsertionAtRange(t){var n,r;return(n=this.delegate)===null||n===void 0||(r=n.compositionDidPerformInsertionAtRange)===null||r===void 0?void 0:r.call(n,t)}translateUTF16PositionFromOffset(t,n){const r=this.document.toUTF16String(),i=r.offsetFromUCS2Offset(t);return r.offsetToUCS2Offset(i+n)}}cn.proxyMethod("getSelectionManager().getPointRange"),cn.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"),cn.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange"),cn.proxyMethod("getSelectionManager().locationIsCursorTarget"),cn.proxyMethod("getSelectionManager().selectionIsExpanded"),cn.proxyMethod("delegate?.getSelectionManager");class qi extends it{constructor(t){super(...arguments),this.composition=t,this.undoEntries=[],this.redoEntries=[]}recordUndoEntry(t){let{context:n,consolidatable:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.undoEntries.slice(-1)[0];if(!r||!a1(i,t,n)){const l=this.createEntry({description:t,context:n});this.undoEntries.push(l),this.redoEntries=[]}}undo(){const t=this.undoEntries.pop();if(t){const n=this.createEntry(t);return this.redoEntries.push(n),this.composition.loadSnapshot(t.snapshot)}}redo(){const t=this.redoEntries.pop();if(t){const n=this.createEntry(t);return this.undoEntries.push(n),this.composition.loadSnapshot(t.snapshot)}}canUndo(){return this.undoEntries.length>0}canRedo(){return this.redoEntries.length>0}createEntry(){let{description:t,context:n}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{description:t?.toString(),context:JSON.stringify(n),snapshot:this.composition.getSnapshot()}}}const a1=(e,t,n)=>e?.description===t?.toString()&&e?.context===JSON.stringify(n),Ei="attachmentGallery";class Dd{constructor(t){this.document=t.document,this.selectedRange=t.selectedRange}perform(){return this.removeBlockAttribute(),this.applyBlockAttribute()}getSnapshot(){return{document:this.document,selectedRange:this.selectedRange}}removeBlockAttribute(){return this.findRangesOfBlocks().map((t=>this.document=this.document.removeAttributeAtRange(Ei,t)))}applyBlockAttribute(){let t=0;this.findRangesOfPieces().forEach((n=>{n[1]-n[0]>1&&(n[0]+=t,n[1]+=t,this.document.getCharacterAtPosition(n[1])!==`
5970
5978
  `&&(this.document=this.document.insertBlockBreakAtRange(n[1]),n[1]<this.selectedRange[1]&&this.moveSelectedRangeForward(),n[1]++,t++),n[0]!==0&&this.document.getCharacterAtPosition(n[0]-1)!==`
5971
- `&&(this.document=this.document.insertBlockBreakAtRange(n[0]),n[0]<this.selectedRange[0]&&this.moveSelectedRangeForward(),n[0]++,t++),this.document=this.document.applyBlockAttributeAtRange(Ei,!0,n))})}findRangesOfBlocks(){return this.document.findRangesForBlockAttribute(Ei)}findRangesOfPieces(){return this.document.findRangesForTextAttribute("presentation",{withValue:"gallery"})}moveSelectedRangeForward(){this.selectedRange[0]+=1,this.selectedRange[1]+=1}}const Od=function(e){const t=new Dd(e);return t.perform(),t.getSnapshot()},a1=[Od];class $d{constructor(t,n,r){this.insertFiles=this.insertFiles.bind(this),this.composition=t,this.selectionManager=n,this.element=r,this.undoManager=new qi(this.composition),this.filters=a1.slice(0)}loadDocument(t){return this.loadSnapshot({document:t,selectedRange:[0,0]})}loadHTML(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";const n=gr.parse(t,{referenceElement:this.element}).getDocument();return this.loadDocument(n)}loadJSON(t){let{document:n,selectedRange:r}=t;return n=$t.fromJSON(n),this.loadSnapshot({document:n,selectedRange:r})}loadSnapshot(t){return this.undoManager=new qi(this.composition),this.composition.loadSnapshot(t)}getDocument(){return this.composition.document}getSelectedDocument(){return this.composition.getSelectedDocument()}getSnapshot(){return this.composition.getSnapshot()}toJSON(){return this.getSnapshot()}deleteInDirection(t){return this.composition.deleteInDirection(t)}insertAttachment(t){return this.composition.insertAttachment(t)}insertAttachments(t){return this.composition.insertAttachments(t)}insertDocument(t){return this.composition.insertDocument(t)}insertFile(t){return this.composition.insertFile(t)}insertFiles(t){return this.composition.insertFiles(t)}insertHTML(t){return this.composition.insertHTML(t)}insertString(t){return this.composition.insertString(t)}insertText(t){return this.composition.insertText(t)}insertLineBreak(){return this.composition.insertLineBreak()}getSelectedRange(){return this.composition.getSelectedRange()}getPosition(){return this.composition.getPosition()}getClientRectAtPosition(t){const n=this.getDocument().locationRangeFromRange([t,t+1]);return this.selectionManager.getClientRectAtLocationRange(n)}expandSelectionInDirection(t){return this.composition.expandSelectionInDirection(t)}moveCursorInDirection(t){return this.composition.moveCursorInDirection(t)}setSelectedRange(t){return this.composition.setSelectedRange(t)}activateAttribute(t){let n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return this.composition.setCurrentAttribute(t,n)}attributeIsActive(t){return this.composition.hasCurrentAttribute(t)}canActivateAttribute(t){return this.composition.canSetCurrentAttribute(t)}deactivateAttribute(t){return this.composition.removeCurrentAttribute(t)}setHTMLAtributeAtPosition(t,n,r){this.composition.setHTMLAtributeAtPosition(t,n,r)}canDecreaseNestingLevel(){return this.composition.canDecreaseNestingLevel()}canIncreaseNestingLevel(){return this.composition.canIncreaseNestingLevel()}decreaseNestingLevel(){if(this.canDecreaseNestingLevel())return this.composition.decreaseNestingLevel()}increaseNestingLevel(){if(this.canIncreaseNestingLevel())return this.composition.increaseNestingLevel()}canRedo(){return this.undoManager.canRedo()}canUndo(){return this.undoManager.canUndo()}recordUndoEntry(t){let{context:n,consolidatable:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.undoManager.recordUndoEntry(t,{context:n,consolidatable:r})}redo(){if(this.canRedo())return this.undoManager.redo()}undo(){if(this.canUndo())return this.undoManager.undo()}}class Fd{constructor(t){this.element=t}findLocationFromContainerAndOffset(t,n){let{strict:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{strict:!0},i=0,l=!1;const a={index:0,offset:0},o=this.findAttachmentElementParentForNode(t);o&&(t=o.parentNode,n=di(o));const s=zr(this.element,{usingFilter:zd});for(;s.nextNode();){const u=s.currentNode;if(u===t&&or(t)){Pn(u)||(a.offset+=n);break}if(u.parentNode===t){if(i++===n)break}else if(!An(t,u)&&i>0)break;Hl(u,{strict:r})?(l&&a.index++,a.offset=0,l=!0):a.offset+=Li(u)}return a}findContainerAndOffsetFromLocation(t){let n,r;if(t.index===0&&t.offset===0){for(n=this.element,r=0;n.firstChild;)if(n=n.firstChild,ui(n)){r=1;break}return[n,r]}let[i,l]=this.findNodeAndOffsetFromLocation(t);if(i){if(or(i))Li(i)===0?(n=i.parentNode.parentNode,r=di(i.parentNode),Pn(i,{name:"right"})&&r++):(n=i,r=t.offset-l);else{if(n=i.parentNode,!Hl(i.previousSibling)&&!ui(n))for(;i===n.lastChild&&(i=n,n=n.parentNode,!ui(n)););r=di(i),t.offset!==0&&r++}return[n,r]}}findNodeAndOffsetFromLocation(t){let n,r,i=0;for(const l of this.getSignificantNodesForIndex(t.index)){const a=Li(l);if(t.offset<=i+a)if(or(l)){if(n=l,r=i,t.offset===r&&Pn(n))break}else n||(n=l,r=i);if(i+=a,i>t.offset)break}return[n,r]}findAttachmentElementParentForNode(t){for(;t&&t!==this.element;){if(xn(t))return t;t=t.parentNode}}getSignificantNodesForIndex(t){const n=[],r=zr(this.element,{usingFilter:l1});let i=!1;for(;r.nextNode();){const a=r.currentNode;var l;if(zn(a)){if(l!=null?l++:l=0,l===t)i=!0;else if(i)break}else i&&n.push(a)}return n}}const Li=function(e){return e.nodeType===Node.TEXT_NODE?Pn(e)?0:e.textContent.length:gt(e)==="br"||xn(e)?1:0},l1=function(e){return o1(e)===NodeFilter.FILTER_ACCEPT?zd(e):NodeFilter.FILTER_REJECT},o1=function(e){return dd(e)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},zd=function(e){return xn(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT};class Pd{createDOMRangeFromPoint(t){let n,{x:r,y:i}=t;if(document.caretPositionFromPoint){const{offsetNode:l,offset:a}=document.caretPositionFromPoint(r,i);return n=document.createRange(),n.setStart(l,a),n}if(document.caretRangeFromPoint)return document.caretRangeFromPoint(r,i);if(document.body.createTextRange){const l=sr();try{const a=document.body.createTextRange();a.moveToPoint(r,i),a.select()}catch{}return n=sr(),hd(l),n}}getClientRectsForDOMRange(t){const n=Array.from(t.getClientRects());return[n[0],n[n.length-1]]}}class Cn extends it{constructor(t){super(...arguments),this.didMouseDown=this.didMouseDown.bind(this),this.selectionDidChange=this.selectionDidChange.bind(this),this.element=t,this.locationMapper=new Fd(this.element),this.pointMapper=new Pd,this.lockCount=0,_e("mousedown",{onElement:this.element,withCallback:this.didMouseDown})}getLocationRange(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t.strict===!1?this.createLocationRangeFromDOMRange(sr()):t.ignoreLock?this.currentLocationRange:this.lockedLocationRange?this.lockedLocationRange:this.currentLocationRange}setLocationRange(t){if(this.lockedLocationRange)return;t=De(t);const n=this.createDOMRangeFromLocationRange(t);n&&(hd(n),this.updateCurrentLocationRange(t))}setLocationRangeFromPointRange(t){t=De(t);const n=this.getLocationAtPoint(t[0]),r=this.getLocationAtPoint(t[1]);this.setLocationRange([n,r])}getClientRectAtLocationRange(t){const n=this.createDOMRangeFromLocationRange(t);if(n)return this.getClientRectsForDOMRange(n)[1]}locationIsCursorTarget(t){const n=Array.from(this.findNodeAndOffsetFromLocation(t))[0];return Pn(n)}lock(){this.lockCount++==0&&(this.updateCurrentLocationRange(),this.lockedLocationRange=this.getLocationRange())}unlock(){if(--this.lockCount==0){const{lockedLocationRange:t}=this;if(this.lockedLocationRange=null,t!=null)return this.setLocationRange(t)}}clearSelection(){var t;return(t=md())===null||t===void 0?void 0:t.removeAllRanges()}selectionIsCollapsed(){var t;return((t=sr())===null||t===void 0?void 0:t.collapsed)===!0}selectionIsExpanded(){return!this.selectionIsCollapsed()}createLocationRangeFromDOMRange(t,n){if(t==null||!this.domRangeWithinElement(t))return;const r=this.findLocationFromContainerAndOffset(t.startContainer,t.startOffset,n);if(!r)return;const i=t.collapsed?void 0:this.findLocationFromContainerAndOffset(t.endContainer,t.endOffset,n);return De([r,i])}didMouseDown(){return this.pauseTemporarily()}pauseTemporarily(){let t;this.paused=!0;const n=()=>{if(this.paused=!1,clearTimeout(r),Array.from(t).forEach(i=>{i.destroy()}),An(document,this.element))return this.selectionDidChange()},r=setTimeout(n,200);t=["mousemove","keydown"].map(i=>_e(i,{onElement:document,withCallback:n}))}selectionDidChange(){if(!this.paused&&!cl(this.element))return this.updateCurrentLocationRange()}updateCurrentLocationRange(t){var n,r;if((t??(t=this.createLocationRangeFromDOMRange(sr())))&&!Pr(t,this.currentLocationRange))return this.currentLocationRange=t,(n=this.delegate)===null||n===void 0||(r=n.locationRangeDidChange)===null||r===void 0?void 0:r.call(n,this.currentLocationRange.slice(0))}createDOMRangeFromLocationRange(t){const n=this.findContainerAndOffsetFromLocation(t[0]),r=nn(t)?n:this.findContainerAndOffsetFromLocation(t[1])||n;if(n!=null&&r!=null){const i=document.createRange();return i.setStart(...Array.from(n||[])),i.setEnd(...Array.from(r||[])),i}}getLocationAtPoint(t){const n=this.createDOMRangeFromPoint(t);var r;if(n)return(r=this.createLocationRangeFromDOMRange(n))===null||r===void 0?void 0:r[0]}domRangeWithinElement(t){return t.collapsed?An(this.element,t.startContainer):An(this.element,t.startContainer)&&An(this.element,t.endContainer)}}Cn.proxyMethod("locationMapper.findLocationFromContainerAndOffset"),Cn.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"),Cn.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"),Cn.proxyMethod("pointMapper.createDOMRangeFromPoint"),Cn.proxyMethod("pointMapper.getClientRectsForDOMRange");var Nd=Object.freeze({__proto__:null,Attachment:_n,AttachmentManager:Bd,AttachmentPiece:Wn,Block:Jt,Composition:cn,Document:$t,Editor:$d,HTMLParser:gr,HTMLSanitizer:ni,LineBreakInsertion:Md,LocationMapper:Fd,ManagedAttachment:Ye,Piece:Dn,PointMapper:Pd,SelectionManager:Cn,SplittableList:Ur,StringPiece:yl,Text:Ut,UndoManager:qi}),s1=Object.freeze({__proto__:null,ObjectView:Mn,AttachmentView:bl,BlockView:Ld,DocumentView:ri,PieceView:Ad,PreviewableAttachmentView:Cd,TextView:Ed});const{lang:xi,css:yn,keyNames:d1}=kr,Si=function(e){return function(){const t=e.apply(this,arguments);t.do(),this.undos||(this.undos=[]),this.undos.push(t.undo)}};class Hd extends it{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(...arguments),ht(this,"makeElementMutable",Si(()=>({do:()=>{this.element.dataset.trixMutable=!0},undo:()=>delete this.element.dataset.trixMutable}))),ht(this,"addToolbar",Si(()=>{const l=ke({tagName:"div",className:yn.attachmentToolbar,data:{trixMutable:!0},childNodes:ke({tagName:"div",className:"trix-button-row",childNodes:ke({tagName:"span",className:"trix-button-group trix-button-group--actions",childNodes:ke({tagName:"button",className:"trix-button trix-button--remove",textContent:xi.remove,attributes:{title:xi.remove},data:{trixAction:"remove"}})})})});return this.attachment.isPreviewable()&&l.appendChild(ke({tagName:"div",className:yn.attachmentMetadataContainer,childNodes:ke({tagName:"span",className:yn.attachmentMetadata,childNodes:[ke({tagName:"span",className:yn.attachmentName,textContent:this.attachment.getFilename(),attributes:{title:this.attachment.getFilename()}}),ke({tagName:"span",className:yn.attachmentSize,textContent:this.attachment.getFormattedFilesize()})]})})),_e("click",{onElement:l,withCallback:this.didClickToolbar}),_e("click",{onElement:l,matchingSelector:"[data-trix-action]",withCallback:this.didClickActionButton}),ar("trix-attachment-before-toolbar",{onElement:this.element,attributes:{toolbar:l,attachment:this.attachment}}),{do:()=>this.element.appendChild(l),undo:()=>mn(l)}})),ht(this,"installCaptionEditor",Si(()=>{const l=ke({tagName:"textarea",className:yn.attachmentCaptionEditor,attributes:{placeholder:xi.captionPlaceholder},data:{trixMutable:!0}});l.value=this.attachmentPiece.getCaption();const a=l.cloneNode();a.classList.add("trix-autoresize-clone"),a.tabIndex=-1;const o=function(){a.value=l.value,l.style.height=a.scrollHeight+"px"};_e("input",{onElement:l,withCallback:o}),_e("input",{onElement:l,withCallback:this.didInputCaption}),_e("keydown",{onElement:l,withCallback:this.didKeyDownCaption}),_e("change",{onElement:l,withCallback:this.didChangeCaption}),_e("blur",{onElement:l,withCallback:this.didBlurCaption});const s=this.element.querySelector("figcaption"),u=s.cloneNode();return{do:()=>{if(s.style.display="none",u.appendChild(l),u.appendChild(a),u.classList.add("".concat(yn.attachmentCaption,"--editing")),s.parentElement.insertBefore(u,s),o(),this.options.editCaption)return vl(()=>l.focus())},undo(){mn(u),s.style.display=null}}})),this.didClickToolbar=this.didClickToolbar.bind(this),this.didClickActionButton=this.didClickActionButton.bind(this),this.didKeyDownCaption=this.didKeyDownCaption.bind(this),this.didInputCaption=this.didInputCaption.bind(this),this.didChangeCaption=this.didChangeCaption.bind(this),this.didBlurCaption=this.didBlurCaption.bind(this),this.attachmentPiece=t,this.element=n,this.container=r,this.options=i,this.attachment=this.attachmentPiece.attachment,gt(this.element)==="a"&&(this.element=this.element.firstChild),this.install()}install(){this.makeElementMutable(),this.addToolbar(),this.attachment.isPreviewable()&&this.installCaptionEditor()}uninstall(){var t;let n=this.undos.pop();for(this.savePendingCaption();n;)n(),n=this.undos.pop();(t=this.delegate)===null||t===void 0||t.didUninstallAttachmentEditor(this)}savePendingCaption(){if(this.pendingCaption!=null){const l=this.pendingCaption;var t,n,r,i;this.pendingCaption=null,l?(t=this.delegate)===null||t===void 0||(n=t.attachmentEditorDidRequestUpdatingAttributesForAttachment)===null||n===void 0||n.call(t,{caption:l},this.attachment):(r=this.delegate)===null||r===void 0||(i=r.attachmentEditorDidRequestRemovingAttributeForAttachment)===null||i===void 0||i.call(r,"caption",this.attachment)}}didClickToolbar(t){return t.preventDefault(),t.stopPropagation()}didClickActionButton(t){var n;if(t.target.getAttribute("data-trix-action")==="remove")return(n=this.delegate)===null||n===void 0?void 0:n.attachmentEditorDidRequestRemovalOfAttachment(this.attachment)}didKeyDownCaption(t){var n,r;if(d1[t.keyCode]==="return")return t.preventDefault(),this.savePendingCaption(),(n=this.delegate)===null||n===void 0||(r=n.attachmentEditorDidRequestDeselectingAttachment)===null||r===void 0?void 0:r.call(n,this.attachment)}didInputCaption(t){this.pendingCaption=t.target.value.replace(/\s/g," ").trim()}didChangeCaption(t){return this.savePendingCaption()}didBlurCaption(t){return this.savePendingCaption()}}class Ud extends it{constructor(t,n){super(...arguments),this.didFocus=this.didFocus.bind(this),this.didBlur=this.didBlur.bind(this),this.didClickAttachment=this.didClickAttachment.bind(this),this.element=t,this.composition=n,this.documentView=new ri(this.composition.document,{element:this.element}),_e("focus",{onElement:this.element,withCallback:this.didFocus}),_e("blur",{onElement:this.element,withCallback:this.didBlur}),_e("click",{onElement:this.element,matchingSelector:"a[contenteditable=false]",preventDefault:!0}),_e("mousedown",{onElement:this.element,matchingSelector:Ln,withCallback:this.didClickAttachment}),_e("click",{onElement:this.element,matchingSelector:"a".concat(Ln),preventDefault:!0})}didFocus(t){var n;const r=()=>{var i,l;if(!this.focused)return this.focused=!0,(i=this.delegate)===null||i===void 0||(l=i.compositionControllerDidFocus)===null||l===void 0?void 0:l.call(i)};return((n=this.blurPromise)===null||n===void 0?void 0:n.then(r))||r()}didBlur(t){this.blurPromise=new Promise(n=>vl(()=>{var r,i;return cl(this.element)||(this.focused=null,(r=this.delegate)===null||r===void 0||(i=r.compositionControllerDidBlur)===null||i===void 0||i.call(r)),this.blurPromise=null,n()}))}didClickAttachment(t,n){var r,i;const l=this.findAttachmentForElement(n),a=!!gn(t.target,{matchingSelector:"figcaption"});return(r=this.delegate)===null||r===void 0||(i=r.compositionControllerDidSelectAttachment)===null||i===void 0?void 0:i.call(r,l,{editCaption:a})}getSerializableElement(){return this.isEditingAttachment()?this.documentView.shadowElement:this.element}render(){var t,n,r,i,l,a;return this.revision!==this.composition.revision&&(this.documentView.setDocument(this.composition.document),this.documentView.render(),this.revision=this.composition.revision),this.canSyncDocumentView()&&!this.documentView.isSynced()&&((r=this.delegate)===null||r===void 0||(i=r.compositionControllerWillSyncDocumentView)===null||i===void 0||i.call(r),this.documentView.sync(),(l=this.delegate)===null||l===void 0||(a=l.compositionControllerDidSyncDocumentView)===null||a===void 0||a.call(l)),(t=this.delegate)===null||t===void 0||(n=t.compositionControllerDidRender)===null||n===void 0?void 0:n.call(t)}rerenderViewForObject(t){return this.invalidateViewForObject(t),this.render()}invalidateViewForObject(t){return this.documentView.invalidateViewForObject(t)}isViewCachingEnabled(){return this.documentView.isViewCachingEnabled()}enableViewCaching(){return this.documentView.enableViewCaching()}disableViewCaching(){return this.documentView.disableViewCaching()}refreshViewCache(){return this.documentView.garbageCollectCachedViews()}isEditingAttachment(){return!!this.attachmentEditor}installAttachmentEditorForAttachment(t,n){var r;if(((r=this.attachmentEditor)===null||r===void 0?void 0:r.attachment)===t)return;const i=this.documentView.findElementForObject(t);if(!i)return;this.uninstallAttachmentEditor();const l=this.composition.document.getAttachmentPieceForAttachment(t);this.attachmentEditor=new Hd(l,i,this.element,n),this.attachmentEditor.delegate=this}uninstallAttachmentEditor(){var t;return(t=this.attachmentEditor)===null||t===void 0?void 0:t.uninstall()}didUninstallAttachmentEditor(){return this.attachmentEditor=null,this.render()}attachmentEditorDidRequestUpdatingAttributesForAttachment(t,n){var r,i;return(r=this.delegate)===null||r===void 0||(i=r.compositionControllerWillUpdateAttachment)===null||i===void 0||i.call(r,n),this.composition.updateAttributesForAttachment(t,n)}attachmentEditorDidRequestRemovingAttributeForAttachment(t,n){var r,i;return(r=this.delegate)===null||r===void 0||(i=r.compositionControllerWillUpdateAttachment)===null||i===void 0||i.call(r,n),this.composition.removeAttributeForAttachment(t,n)}attachmentEditorDidRequestRemovalOfAttachment(t){var n,r;return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerDidRequestRemovalOfAttachment)===null||r===void 0?void 0:r.call(n,t)}attachmentEditorDidRequestDeselectingAttachment(t){var n,r;return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerDidRequestDeselectingAttachment)===null||r===void 0?void 0:r.call(n,t)}canSyncDocumentView(){return!this.isEditingAttachment()}findAttachmentForElement(t){return this.composition.document.getAttachmentById(parseInt(t.dataset.trixId,10))}}class jd extends it{}const Wd="data-trix-mutable",u1="[".concat(Wd,"]"),c1={attributes:!0,childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0};class Vd extends it{constructor(t){super(t),this.didMutate=this.didMutate.bind(this),this.element=t,this.observer=new window.MutationObserver(this.didMutate),this.start()}start(){return this.reset(),this.observer.observe(this.element,c1)}stop(){return this.observer.disconnect()}didMutate(t){var n,r;if(this.mutations.push(...Array.from(this.findSignificantMutations(t)||[])),this.mutations.length)return(n=this.delegate)===null||n===void 0||(r=n.elementDidMutate)===null||r===void 0||r.call(n,this.getMutationSummary()),this.reset()}reset(){this.mutations=[]}findSignificantMutations(t){return t.filter(n=>this.mutationIsSignificant(n))}mutationIsSignificant(t){if(this.nodeIsMutable(t.target))return!1;for(const n of Array.from(this.nodesModifiedByMutation(t)))if(this.nodeIsSignificant(n))return!0;return!1}nodeIsSignificant(t){return t!==this.element&&!this.nodeIsMutable(t)&&!dd(t)}nodeIsMutable(t){return gn(t,{matchingSelector:u1})}nodesModifiedByMutation(t){const n=[];switch(t.type){case"attributes":t.attributeName!==Wd&&n.push(t.target);break;case"characterData":n.push(t.target.parentNode),n.push(t.target);break;case"childList":n.push(...Array.from(t.addedNodes||[])),n.push(...Array.from(t.removedNodes||[]))}return n}getMutationSummary(){return this.getTextMutationSummary()}getTextMutationSummary(){const{additions:t,deletions:n}=this.getTextChangesFromCharacterData(),r=this.getTextChangesFromChildList();Array.from(r.additions).forEach(o=>{Array.from(t).includes(o)||t.push(o)}),n.push(...Array.from(r.deletions||[]));const i={},l=t.join("");l&&(i.textAdded=l);const a=n.join("");return a&&(i.textDeleted=a),i}getMutationsByType(t){return Array.from(this.mutations).filter(n=>n.type===t)}getTextChangesFromChildList(){let t,n;const r=[],i=[];Array.from(this.getMutationsByType("childList")).forEach(o=>{r.push(...Array.from(o.addedNodes||[])),i.push(...Array.from(o.removedNodes||[]))}),r.length===0&&i.length===1&&zn(i[0])?(t=[],n=[`
5972
- `]):(t=Ki(r),n=Ki(i));const l=t.filter((o,s)=>o!==n[s]).map(nr),a=n.filter((o,s)=>o!==t[s]).map(nr);return{additions:l,deletions:a}}getTextChangesFromCharacterData(){let t,n;const r=this.getMutationsByType("characterData");if(r.length){const i=r[0],l=r[r.length-1],a=function(o,s){let u,f;return o=vr.box(o),(s=vr.box(s)).length<o.length?[f,u]=Ql(o,s):[u,f]=Ql(s,o),{added:u,removed:f}}(nr(i.oldValue),nr(l.target.data));t=a.added,n=a.removed}return{additions:t?[t]:[],deletions:n?[n]:[]}}}const Ki=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const t=[];for(const n of Array.from(e))switch(n.nodeType){case Node.TEXT_NODE:t.push(n.data);break;case Node.ELEMENT_NODE:gt(n)==="br"?t.push(`
5973
- `):t.push(...Array.from(Ki(n.childNodes)||[]))}return t};class _d extends Nr{constructor(t){super(...arguments),this.file=t}perform(t){const n=new FileReader;return n.onerror=()=>t(!1),n.onload=()=>{n.onerror=null;try{n.abort()}catch{}return t(!0,this.file)},n.readAsArrayBuffer(this.file)}}class p1{constructor(t){this.element=t}shouldIgnore(t){return!!yr.samsungAndroid&&(this.previousEvent=this.event,this.event=t,this.checkSamsungKeyboardBuggyModeStart(),this.checkSamsungKeyboardBuggyModeEnd(),this.buggyMode)}checkSamsungKeyboardBuggyModeStart(){this.insertingLongTextAfterUnidentifiedChar()&&f1(this.element.innerText,this.event.data)&&(this.buggyMode=!0,this.event.preventDefault())}checkSamsungKeyboardBuggyModeEnd(){this.buggyMode&&this.event.inputType!=="insertText"&&(this.buggyMode=!1)}insertingLongTextAfterUnidentifiedChar(){var t;return this.isBeforeInputInsertText()&&this.previousEventWasUnidentifiedKeydown()&&((t=this.event.data)===null||t===void 0?void 0:t.length)>50}isBeforeInputInsertText(){return this.event.type==="beforeinput"&&this.event.inputType==="insertText"}previousEventWasUnidentifiedKeydown(){var t,n;return((t=this.previousEvent)===null||t===void 0?void 0:t.type)==="keydown"&&((n=this.previousEvent)===null||n===void 0?void 0:n.key)==="Unidentified"}}const f1=(e,t)=>go(e)===go(t),v1=new RegExp("(".concat("","|").concat(ti,"|").concat(pn,"|\\s)+"),"g"),go=e=>e.replace(v1," ").trim();class ii extends it{constructor(t){super(...arguments),this.element=t,this.mutationObserver=new Vd(this.element),this.mutationObserver.delegate=this,this.flakyKeyboardDetector=new p1(this.element);for(const n in this.constructor.events)_e(n,{onElement:this.element,withCallback:this.handlerFor(n)})}elementDidMutate(t){}editorWillSyncDocumentView(){return this.mutationObserver.stop()}editorDidSyncDocumentView(){return this.mutationObserver.start()}requestRender(){var t,n;return(t=this.delegate)===null||t===void 0||(n=t.inputControllerDidRequestRender)===null||n===void 0?void 0:n.call(t)}requestReparse(){var t,n;return(t=this.delegate)===null||t===void 0||(n=t.inputControllerDidRequestReparse)===null||n===void 0||n.call(t),this.requestRender()}attachFiles(t){const n=Array.from(t).map(r=>new _d(r));return Promise.all(n).then(r=>{this.handleInput(function(){var i,l;return(i=this.delegate)===null||i===void 0||i.inputControllerWillAttachFiles(),(l=this.responder)===null||l===void 0||l.insertFiles(r),this.requestRender()})})}handlerFor(t){return n=>{n.defaultPrevented||this.handleInput(()=>{if(!cl(this.element)){if(this.flakyKeyboardDetector.shouldIgnore(n))return;this.eventName=t,this.constructor.events[t].call(this,n)}})}}handleInput(t){try{var n;(n=this.delegate)===null||n===void 0||n.inputControllerWillHandleInput(),t.call(this)}finally{var r;(r=this.delegate)===null||r===void 0||r.inputControllerDidHandleInput()}}createLinkHTML(t,n){const r=document.createElement("a");return r.href=t,r.textContent=n||t,r.outerHTML}}var Ti;ht(ii,"events",{});const{browser:g1,keyNames:Qd}=kr;let m1=0;class tn extends ii{constructor(){super(...arguments),this.resetInputSummary()}setInputSummary(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.inputSummary.eventName=this.eventName;for(const n in t){const r=t[n];this.inputSummary[n]=r}return this.inputSummary}resetInputSummary(){this.inputSummary={}}reset(){return this.resetInputSummary(),In.reset()}elementDidMutate(t){var n,r;return this.isComposing()?(n=this.delegate)===null||n===void 0||(r=n.inputControllerDidAllowUnhandledInput)===null||r===void 0?void 0:r.call(n):this.handleInput(function(){return this.mutationIsSignificant(t)&&(this.mutationIsExpected(t)?this.requestRender():this.requestReparse()),this.reset()})}mutationIsExpected(t){let{textAdded:n,textDeleted:r}=t;if(this.inputSummary.preferDocument)return!0;const i=n!=null?n===this.inputSummary.textAdded:!this.inputSummary.textAdded,l=r!=null?this.inputSummary.didDelete:!this.inputSummary.didDelete,a=[`
5979
+ `&&(this.document=this.document.insertBlockBreakAtRange(n[0]),n[0]<this.selectedRange[0]&&this.moveSelectedRangeForward(),n[0]++,t++),this.document=this.document.applyBlockAttributeAtRange(Ei,!0,n))}))}findRangesOfBlocks(){return this.document.findRangesForBlockAttribute(Ei)}findRangesOfPieces(){return this.document.findRangesForTextAttribute("presentation",{withValue:"gallery"})}moveSelectedRangeForward(){this.selectedRange[0]+=1,this.selectedRange[1]+=1}}const Od=function(e){const t=new Dd(e);return t.perform(),t.getSnapshot()},l1=[Od];class $d{constructor(t,n,r){this.insertFiles=this.insertFiles.bind(this),this.composition=t,this.selectionManager=n,this.element=r,this.undoManager=new qi(this.composition),this.filters=l1.slice(0)}loadDocument(t){return this.loadSnapshot({document:t,selectedRange:[0,0]})}loadHTML(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";const n=gr.parse(t,{referenceElement:this.element}).getDocument();return this.loadDocument(n)}loadJSON(t){let{document:n,selectedRange:r}=t;return n=$t.fromJSON(n),this.loadSnapshot({document:n,selectedRange:r})}loadSnapshot(t){return this.undoManager=new qi(this.composition),this.composition.loadSnapshot(t)}getDocument(){return this.composition.document}getSelectedDocument(){return this.composition.getSelectedDocument()}getSnapshot(){return this.composition.getSnapshot()}toJSON(){return this.getSnapshot()}deleteInDirection(t){return this.composition.deleteInDirection(t)}insertAttachment(t){return this.composition.insertAttachment(t)}insertAttachments(t){return this.composition.insertAttachments(t)}insertDocument(t){return this.composition.insertDocument(t)}insertFile(t){return this.composition.insertFile(t)}insertFiles(t){return this.composition.insertFiles(t)}insertHTML(t){return this.composition.insertHTML(t)}insertString(t){return this.composition.insertString(t)}insertText(t){return this.composition.insertText(t)}insertLineBreak(){return this.composition.insertLineBreak()}getSelectedRange(){return this.composition.getSelectedRange()}getPosition(){return this.composition.getPosition()}getClientRectAtPosition(t){const n=this.getDocument().locationRangeFromRange([t,t+1]);return this.selectionManager.getClientRectAtLocationRange(n)}expandSelectionInDirection(t){return this.composition.expandSelectionInDirection(t)}moveCursorInDirection(t){return this.composition.moveCursorInDirection(t)}setSelectedRange(t){return this.composition.setSelectedRange(t)}activateAttribute(t){let n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return this.composition.setCurrentAttribute(t,n)}attributeIsActive(t){return this.composition.hasCurrentAttribute(t)}canActivateAttribute(t){return this.composition.canSetCurrentAttribute(t)}deactivateAttribute(t){return this.composition.removeCurrentAttribute(t)}setHTMLAtributeAtPosition(t,n,r){this.composition.setHTMLAtributeAtPosition(t,n,r)}canDecreaseNestingLevel(){return this.composition.canDecreaseNestingLevel()}canIncreaseNestingLevel(){return this.composition.canIncreaseNestingLevel()}decreaseNestingLevel(){if(this.canDecreaseNestingLevel())return this.composition.decreaseNestingLevel()}increaseNestingLevel(){if(this.canIncreaseNestingLevel())return this.composition.increaseNestingLevel()}canRedo(){return this.undoManager.canRedo()}canUndo(){return this.undoManager.canUndo()}recordUndoEntry(t){let{context:n,consolidatable:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.undoManager.recordUndoEntry(t,{context:n,consolidatable:r})}redo(){if(this.canRedo())return this.undoManager.redo()}undo(){if(this.canUndo())return this.undoManager.undo()}}class Fd{constructor(t){this.element=t}findLocationFromContainerAndOffset(t,n){let{strict:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{strict:!0},i=0,l=!1;const a={index:0,offset:0},o=this.findAttachmentElementParentForNode(t);o&&(t=o.parentNode,n=di(o));const s=zr(this.element,{usingFilter:zd});for(;s.nextNode();){const u=s.currentNode;if(u===t&&or(t)){Pn(u)||(a.offset+=n);break}if(u.parentNode===t){if(i++===n)break}else if(!An(t,u)&&i>0)break;Hl(u,{strict:r})?(l&&a.index++,a.offset=0,l=!0):a.offset+=Li(u)}return a}findContainerAndOffsetFromLocation(t){let n,r;if(t.index===0&&t.offset===0){for(n=this.element,r=0;n.firstChild;)if(n=n.firstChild,ui(n)){r=1;break}return[n,r]}let[i,l]=this.findNodeAndOffsetFromLocation(t);if(i){if(or(i))Li(i)===0?(n=i.parentNode.parentNode,r=di(i.parentNode),Pn(i,{name:"right"})&&r++):(n=i,r=t.offset-l);else{if(n=i.parentNode,!Hl(i.previousSibling)&&!ui(n))for(;i===n.lastChild&&(i=n,n=n.parentNode,!ui(n)););r=di(i),t.offset!==0&&r++}return[n,r]}}findNodeAndOffsetFromLocation(t){let n,r,i=0;for(const l of this.getSignificantNodesForIndex(t.index)){const a=Li(l);if(t.offset<=i+a)if(or(l)){if(n=l,r=i,t.offset===r&&Pn(n))break}else n||(n=l,r=i);if(i+=a,i>t.offset)break}return[n,r]}findAttachmentElementParentForNode(t){for(;t&&t!==this.element;){if(xn(t))return t;t=t.parentNode}}getSignificantNodesForIndex(t){const n=[],r=zr(this.element,{usingFilter:o1});let i=!1;for(;r.nextNode();){const a=r.currentNode;var l;if(zn(a)){if(l!=null?l++:l=0,l===t)i=!0;else if(i)break}else i&&n.push(a)}return n}}const Li=function(e){return e.nodeType===Node.TEXT_NODE?Pn(e)?0:e.textContent.length:gt(e)==="br"||xn(e)?1:0},o1=function(e){return s1(e)===NodeFilter.FILTER_ACCEPT?zd(e):NodeFilter.FILTER_REJECT},s1=function(e){return dd(e)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},zd=function(e){return xn(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT};class Pd{createDOMRangeFromPoint(t){let n,{x:r,y:i}=t;if(document.caretPositionFromPoint){const{offsetNode:l,offset:a}=document.caretPositionFromPoint(r,i);return n=document.createRange(),n.setStart(l,a),n}if(document.caretRangeFromPoint)return document.caretRangeFromPoint(r,i);if(document.body.createTextRange){const l=sr();try{const a=document.body.createTextRange();a.moveToPoint(r,i),a.select()}catch{}return n=sr(),hd(l),n}}getClientRectsForDOMRange(t){const n=Array.from(t.getClientRects());return[n[0],n[n.length-1]]}}class Cn extends it{constructor(t){super(...arguments),this.didMouseDown=this.didMouseDown.bind(this),this.selectionDidChange=this.selectionDidChange.bind(this),this.element=t,this.locationMapper=new Fd(this.element),this.pointMapper=new Pd,this.lockCount=0,_e("mousedown",{onElement:this.element,withCallback:this.didMouseDown})}getLocationRange(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t.strict===!1?this.createLocationRangeFromDOMRange(sr()):t.ignoreLock?this.currentLocationRange:this.lockedLocationRange?this.lockedLocationRange:this.currentLocationRange}setLocationRange(t){if(this.lockedLocationRange)return;t=De(t);const n=this.createDOMRangeFromLocationRange(t);n&&(hd(n),this.updateCurrentLocationRange(t))}setLocationRangeFromPointRange(t){t=De(t);const n=this.getLocationAtPoint(t[0]),r=this.getLocationAtPoint(t[1]);this.setLocationRange([n,r])}getClientRectAtLocationRange(t){const n=this.createDOMRangeFromLocationRange(t);if(n)return this.getClientRectsForDOMRange(n)[1]}locationIsCursorTarget(t){const n=Array.from(this.findNodeAndOffsetFromLocation(t))[0];return Pn(n)}lock(){this.lockCount++==0&&(this.updateCurrentLocationRange(),this.lockedLocationRange=this.getLocationRange())}unlock(){if(--this.lockCount==0){const{lockedLocationRange:t}=this;if(this.lockedLocationRange=null,t!=null)return this.setLocationRange(t)}}clearSelection(){var t;return(t=md())===null||t===void 0?void 0:t.removeAllRanges()}selectionIsCollapsed(){var t;return((t=sr())===null||t===void 0?void 0:t.collapsed)===!0}selectionIsExpanded(){return!this.selectionIsCollapsed()}createLocationRangeFromDOMRange(t,n){if(t==null||!this.domRangeWithinElement(t))return;const r=this.findLocationFromContainerAndOffset(t.startContainer,t.startOffset,n);if(!r)return;const i=t.collapsed?void 0:this.findLocationFromContainerAndOffset(t.endContainer,t.endOffset,n);return De([r,i])}didMouseDown(){return this.pauseTemporarily()}pauseTemporarily(){let t;this.paused=!0;const n=()=>{if(this.paused=!1,clearTimeout(r),Array.from(t).forEach((i=>{i.destroy()})),An(document,this.element))return this.selectionDidChange()},r=setTimeout(n,200);t=["mousemove","keydown"].map((i=>_e(i,{onElement:document,withCallback:n})))}selectionDidChange(){if(!this.paused&&!cl(this.element))return this.updateCurrentLocationRange()}updateCurrentLocationRange(t){var n,r;if((t??(t=this.createLocationRangeFromDOMRange(sr())))&&!Pr(t,this.currentLocationRange))return this.currentLocationRange=t,(n=this.delegate)===null||n===void 0||(r=n.locationRangeDidChange)===null||r===void 0?void 0:r.call(n,this.currentLocationRange.slice(0))}createDOMRangeFromLocationRange(t){const n=this.findContainerAndOffsetFromLocation(t[0]),r=nn(t)?n:this.findContainerAndOffsetFromLocation(t[1])||n;if(n!=null&&r!=null){const i=document.createRange();return i.setStart(...Array.from(n||[])),i.setEnd(...Array.from(r||[])),i}}getLocationAtPoint(t){const n=this.createDOMRangeFromPoint(t);var r;if(n)return(r=this.createLocationRangeFromDOMRange(n))===null||r===void 0?void 0:r[0]}domRangeWithinElement(t){return t.collapsed?An(this.element,t.startContainer):An(this.element,t.startContainer)&&An(this.element,t.endContainer)}}Cn.proxyMethod("locationMapper.findLocationFromContainerAndOffset"),Cn.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"),Cn.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"),Cn.proxyMethod("pointMapper.createDOMRangeFromPoint"),Cn.proxyMethod("pointMapper.getClientRectsForDOMRange");var Nd=Object.freeze({__proto__:null,Attachment:_n,AttachmentManager:Bd,AttachmentPiece:Wn,Block:Jt,Composition:cn,Document:$t,Editor:$d,HTMLParser:gr,HTMLSanitizer:ni,LineBreakInsertion:Md,LocationMapper:Fd,ManagedAttachment:Ye,Piece:Dn,PointMapper:Pd,SelectionManager:Cn,SplittableList:Ur,StringPiece:yl,Text:Ut,UndoManager:qi}),d1=Object.freeze({__proto__:null,ObjectView:Mn,AttachmentView:bl,BlockView:Ld,DocumentView:ri,PieceView:Ad,PreviewableAttachmentView:Cd,TextView:Ed});const{lang:xi,css:yn,keyNames:u1}=kr,Si=function(e){return function(){const t=e.apply(this,arguments);t.do(),this.undos||(this.undos=[]),this.undos.push(t.undo)}};class Hd extends it{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(...arguments),ht(this,"makeElementMutable",Si((()=>({do:()=>{this.element.dataset.trixMutable=!0},undo:()=>delete this.element.dataset.trixMutable})))),ht(this,"addToolbar",Si((()=>{const l=ke({tagName:"div",className:yn.attachmentToolbar,data:{trixMutable:!0},childNodes:ke({tagName:"div",className:"trix-button-row",childNodes:ke({tagName:"span",className:"trix-button-group trix-button-group--actions",childNodes:ke({tagName:"button",className:"trix-button trix-button--remove",textContent:xi.remove,attributes:{title:xi.remove},data:{trixAction:"remove"}})})})});return this.attachment.isPreviewable()&&l.appendChild(ke({tagName:"div",className:yn.attachmentMetadataContainer,childNodes:ke({tagName:"span",className:yn.attachmentMetadata,childNodes:[ke({tagName:"span",className:yn.attachmentName,textContent:this.attachment.getFilename(),attributes:{title:this.attachment.getFilename()}}),ke({tagName:"span",className:yn.attachmentSize,textContent:this.attachment.getFormattedFilesize()})]})})),_e("click",{onElement:l,withCallback:this.didClickToolbar}),_e("click",{onElement:l,matchingSelector:"[data-trix-action]",withCallback:this.didClickActionButton}),ar("trix-attachment-before-toolbar",{onElement:this.element,attributes:{toolbar:l,attachment:this.attachment}}),{do:()=>this.element.appendChild(l),undo:()=>mn(l)}}))),ht(this,"installCaptionEditor",Si((()=>{const l=ke({tagName:"textarea",className:yn.attachmentCaptionEditor,attributes:{placeholder:xi.captionPlaceholder},data:{trixMutable:!0}});l.value=this.attachmentPiece.getCaption();const a=l.cloneNode();a.classList.add("trix-autoresize-clone"),a.tabIndex=-1;const o=function(){a.value=l.value,l.style.height=a.scrollHeight+"px"};_e("input",{onElement:l,withCallback:o}),_e("input",{onElement:l,withCallback:this.didInputCaption}),_e("keydown",{onElement:l,withCallback:this.didKeyDownCaption}),_e("change",{onElement:l,withCallback:this.didChangeCaption}),_e("blur",{onElement:l,withCallback:this.didBlurCaption});const s=this.element.querySelector("figcaption"),u=s.cloneNode();return{do:()=>{if(s.style.display="none",u.appendChild(l),u.appendChild(a),u.classList.add("".concat(yn.attachmentCaption,"--editing")),s.parentElement.insertBefore(u,s),o(),this.options.editCaption)return vl((()=>l.focus()))},undo(){mn(u),s.style.display=null}}}))),this.didClickToolbar=this.didClickToolbar.bind(this),this.didClickActionButton=this.didClickActionButton.bind(this),this.didKeyDownCaption=this.didKeyDownCaption.bind(this),this.didInputCaption=this.didInputCaption.bind(this),this.didChangeCaption=this.didChangeCaption.bind(this),this.didBlurCaption=this.didBlurCaption.bind(this),this.attachmentPiece=t,this.element=n,this.container=r,this.options=i,this.attachment=this.attachmentPiece.attachment,gt(this.element)==="a"&&(this.element=this.element.firstChild),this.install()}install(){this.makeElementMutable(),this.addToolbar(),this.attachment.isPreviewable()&&this.installCaptionEditor()}uninstall(){var t;let n=this.undos.pop();for(this.savePendingCaption();n;)n(),n=this.undos.pop();(t=this.delegate)===null||t===void 0||t.didUninstallAttachmentEditor(this)}savePendingCaption(){if(this.pendingCaption!=null){const l=this.pendingCaption;var t,n,r,i;this.pendingCaption=null,l?(t=this.delegate)===null||t===void 0||(n=t.attachmentEditorDidRequestUpdatingAttributesForAttachment)===null||n===void 0||n.call(t,{caption:l},this.attachment):(r=this.delegate)===null||r===void 0||(i=r.attachmentEditorDidRequestRemovingAttributeForAttachment)===null||i===void 0||i.call(r,"caption",this.attachment)}}didClickToolbar(t){return t.preventDefault(),t.stopPropagation()}didClickActionButton(t){var n;if(t.target.getAttribute("data-trix-action")==="remove")return(n=this.delegate)===null||n===void 0?void 0:n.attachmentEditorDidRequestRemovalOfAttachment(this.attachment)}didKeyDownCaption(t){var n,r;if(u1[t.keyCode]==="return")return t.preventDefault(),this.savePendingCaption(),(n=this.delegate)===null||n===void 0||(r=n.attachmentEditorDidRequestDeselectingAttachment)===null||r===void 0?void 0:r.call(n,this.attachment)}didInputCaption(t){this.pendingCaption=t.target.value.replace(/\s/g," ").trim()}didChangeCaption(t){return this.savePendingCaption()}didBlurCaption(t){return this.savePendingCaption()}}class Ud extends it{constructor(t,n){super(...arguments),this.didFocus=this.didFocus.bind(this),this.didBlur=this.didBlur.bind(this),this.didClickAttachment=this.didClickAttachment.bind(this),this.element=t,this.composition=n,this.documentView=new ri(this.composition.document,{element:this.element}),_e("focus",{onElement:this.element,withCallback:this.didFocus}),_e("blur",{onElement:this.element,withCallback:this.didBlur}),_e("click",{onElement:this.element,matchingSelector:"a[contenteditable=false]",preventDefault:!0}),_e("mousedown",{onElement:this.element,matchingSelector:Ln,withCallback:this.didClickAttachment}),_e("click",{onElement:this.element,matchingSelector:"a".concat(Ln),preventDefault:!0})}didFocus(t){var n;const r=()=>{var i,l;if(!this.focused)return this.focused=!0,(i=this.delegate)===null||i===void 0||(l=i.compositionControllerDidFocus)===null||l===void 0?void 0:l.call(i)};return((n=this.blurPromise)===null||n===void 0?void 0:n.then(r))||r()}didBlur(t){this.blurPromise=new Promise((n=>vl((()=>{var r,i;return cl(this.element)||(this.focused=null,(r=this.delegate)===null||r===void 0||(i=r.compositionControllerDidBlur)===null||i===void 0||i.call(r)),this.blurPromise=null,n()}))))}didClickAttachment(t,n){var r,i;const l=this.findAttachmentForElement(n),a=!!gn(t.target,{matchingSelector:"figcaption"});return(r=this.delegate)===null||r===void 0||(i=r.compositionControllerDidSelectAttachment)===null||i===void 0?void 0:i.call(r,l,{editCaption:a})}getSerializableElement(){return this.isEditingAttachment()?this.documentView.shadowElement:this.element}render(){var t,n,r,i,l,a;return this.revision!==this.composition.revision&&(this.documentView.setDocument(this.composition.document),this.documentView.render(),this.revision=this.composition.revision),this.canSyncDocumentView()&&!this.documentView.isSynced()&&((r=this.delegate)===null||r===void 0||(i=r.compositionControllerWillSyncDocumentView)===null||i===void 0||i.call(r),this.documentView.sync(),(l=this.delegate)===null||l===void 0||(a=l.compositionControllerDidSyncDocumentView)===null||a===void 0||a.call(l)),(t=this.delegate)===null||t===void 0||(n=t.compositionControllerDidRender)===null||n===void 0?void 0:n.call(t)}rerenderViewForObject(t){return this.invalidateViewForObject(t),this.render()}invalidateViewForObject(t){return this.documentView.invalidateViewForObject(t)}isViewCachingEnabled(){return this.documentView.isViewCachingEnabled()}enableViewCaching(){return this.documentView.enableViewCaching()}disableViewCaching(){return this.documentView.disableViewCaching()}refreshViewCache(){return this.documentView.garbageCollectCachedViews()}isEditingAttachment(){return!!this.attachmentEditor}installAttachmentEditorForAttachment(t,n){var r;if(((r=this.attachmentEditor)===null||r===void 0?void 0:r.attachment)===t)return;const i=this.documentView.findElementForObject(t);if(!i)return;this.uninstallAttachmentEditor();const l=this.composition.document.getAttachmentPieceForAttachment(t);this.attachmentEditor=new Hd(l,i,this.element,n),this.attachmentEditor.delegate=this}uninstallAttachmentEditor(){var t;return(t=this.attachmentEditor)===null||t===void 0?void 0:t.uninstall()}didUninstallAttachmentEditor(){return this.attachmentEditor=null,this.render()}attachmentEditorDidRequestUpdatingAttributesForAttachment(t,n){var r,i;return(r=this.delegate)===null||r===void 0||(i=r.compositionControllerWillUpdateAttachment)===null||i===void 0||i.call(r,n),this.composition.updateAttributesForAttachment(t,n)}attachmentEditorDidRequestRemovingAttributeForAttachment(t,n){var r,i;return(r=this.delegate)===null||r===void 0||(i=r.compositionControllerWillUpdateAttachment)===null||i===void 0||i.call(r,n),this.composition.removeAttributeForAttachment(t,n)}attachmentEditorDidRequestRemovalOfAttachment(t){var n,r;return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerDidRequestRemovalOfAttachment)===null||r===void 0?void 0:r.call(n,t)}attachmentEditorDidRequestDeselectingAttachment(t){var n,r;return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerDidRequestDeselectingAttachment)===null||r===void 0?void 0:r.call(n,t)}canSyncDocumentView(){return!this.isEditingAttachment()}findAttachmentForElement(t){return this.composition.document.getAttachmentById(parseInt(t.dataset.trixId,10))}}class jd extends it{}const Wd="data-trix-mutable",c1="[".concat(Wd,"]"),p1={attributes:!0,childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0};class Vd extends it{constructor(t){super(t),this.didMutate=this.didMutate.bind(this),this.element=t,this.observer=new window.MutationObserver(this.didMutate),this.start()}start(){return this.reset(),this.observer.observe(this.element,p1)}stop(){return this.observer.disconnect()}didMutate(t){var n,r;if(this.mutations.push(...Array.from(this.findSignificantMutations(t)||[])),this.mutations.length)return(n=this.delegate)===null||n===void 0||(r=n.elementDidMutate)===null||r===void 0||r.call(n,this.getMutationSummary()),this.reset()}reset(){this.mutations=[]}findSignificantMutations(t){return t.filter((n=>this.mutationIsSignificant(n)))}mutationIsSignificant(t){if(this.nodeIsMutable(t.target))return!1;for(const n of Array.from(this.nodesModifiedByMutation(t)))if(this.nodeIsSignificant(n))return!0;return!1}nodeIsSignificant(t){return t!==this.element&&!this.nodeIsMutable(t)&&!dd(t)}nodeIsMutable(t){return gn(t,{matchingSelector:c1})}nodesModifiedByMutation(t){const n=[];switch(t.type){case"attributes":t.attributeName!==Wd&&n.push(t.target);break;case"characterData":n.push(t.target.parentNode),n.push(t.target);break;case"childList":n.push(...Array.from(t.addedNodes||[])),n.push(...Array.from(t.removedNodes||[]))}return n}getMutationSummary(){return this.getTextMutationSummary()}getTextMutationSummary(){const{additions:t,deletions:n}=this.getTextChangesFromCharacterData(),r=this.getTextChangesFromChildList();Array.from(r.additions).forEach((o=>{Array.from(t).includes(o)||t.push(o)})),n.push(...Array.from(r.deletions||[]));const i={},l=t.join("");l&&(i.textAdded=l);const a=n.join("");return a&&(i.textDeleted=a),i}getMutationsByType(t){return Array.from(this.mutations).filter((n=>n.type===t))}getTextChangesFromChildList(){let t,n;const r=[],i=[];Array.from(this.getMutationsByType("childList")).forEach((o=>{r.push(...Array.from(o.addedNodes||[])),i.push(...Array.from(o.removedNodes||[]))})),r.length===0&&i.length===1&&zn(i[0])?(t=[],n=[`
5980
+ `]):(t=Ki(r),n=Ki(i));const l=t.filter(((o,s)=>o!==n[s])).map(nr),a=n.filter(((o,s)=>o!==t[s])).map(nr);return{additions:l,deletions:a}}getTextChangesFromCharacterData(){let t,n;const r=this.getMutationsByType("characterData");if(r.length){const i=r[0],l=r[r.length-1],a=(function(o,s){let u,f;return o=vr.box(o),(s=vr.box(s)).length<o.length?[f,u]=Ql(o,s):[u,f]=Ql(s,o),{added:u,removed:f}})(nr(i.oldValue),nr(l.target.data));t=a.added,n=a.removed}return{additions:t?[t]:[],deletions:n?[n]:[]}}}const Ki=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const t=[];for(const n of Array.from(e))switch(n.nodeType){case Node.TEXT_NODE:t.push(n.data);break;case Node.ELEMENT_NODE:gt(n)==="br"?t.push(`
5981
+ `):t.push(...Array.from(Ki(n.childNodes)||[]))}return t};class _d extends Nr{constructor(t){super(...arguments),this.file=t}perform(t){const n=new FileReader;return n.onerror=()=>t(!1),n.onload=()=>{n.onerror=null;try{n.abort()}catch{}return t(!0,this.file)},n.readAsArrayBuffer(this.file)}}class f1{constructor(t){this.element=t}shouldIgnore(t){return!!yr.samsungAndroid&&(this.previousEvent=this.event,this.event=t,this.checkSamsungKeyboardBuggyModeStart(),this.checkSamsungKeyboardBuggyModeEnd(),this.buggyMode)}checkSamsungKeyboardBuggyModeStart(){this.insertingLongTextAfterUnidentifiedChar()&&v1(this.element.innerText,this.event.data)&&(this.buggyMode=!0,this.event.preventDefault())}checkSamsungKeyboardBuggyModeEnd(){this.buggyMode&&this.event.inputType!=="insertText"&&(this.buggyMode=!1)}insertingLongTextAfterUnidentifiedChar(){var t;return this.isBeforeInputInsertText()&&this.previousEventWasUnidentifiedKeydown()&&((t=this.event.data)===null||t===void 0?void 0:t.length)>50}isBeforeInputInsertText(){return this.event.type==="beforeinput"&&this.event.inputType==="insertText"}previousEventWasUnidentifiedKeydown(){var t,n;return((t=this.previousEvent)===null||t===void 0?void 0:t.type)==="keydown"&&((n=this.previousEvent)===null||n===void 0?void 0:n.key)==="Unidentified"}}const v1=(e,t)=>go(e)===go(t),g1=new RegExp("(".concat("","|").concat(ti,"|").concat(pn,"|\\s)+"),"g"),go=e=>e.replace(g1," ").trim();class ii extends it{constructor(t){super(...arguments),this.element=t,this.mutationObserver=new Vd(this.element),this.mutationObserver.delegate=this,this.flakyKeyboardDetector=new f1(this.element);for(const n in this.constructor.events)_e(n,{onElement:this.element,withCallback:this.handlerFor(n)})}elementDidMutate(t){}editorWillSyncDocumentView(){return this.mutationObserver.stop()}editorDidSyncDocumentView(){return this.mutationObserver.start()}requestRender(){var t,n;return(t=this.delegate)===null||t===void 0||(n=t.inputControllerDidRequestRender)===null||n===void 0?void 0:n.call(t)}requestReparse(){var t,n;return(t=this.delegate)===null||t===void 0||(n=t.inputControllerDidRequestReparse)===null||n===void 0||n.call(t),this.requestRender()}attachFiles(t){const n=Array.from(t).map((r=>new _d(r)));return Promise.all(n).then((r=>{this.handleInput((function(){var i,l;return(i=this.delegate)===null||i===void 0||i.inputControllerWillAttachFiles(),(l=this.responder)===null||l===void 0||l.insertFiles(r),this.requestRender()}))}))}handlerFor(t){return n=>{n.defaultPrevented||this.handleInput((()=>{if(!cl(this.element)){if(this.flakyKeyboardDetector.shouldIgnore(n))return;this.eventName=t,this.constructor.events[t].call(this,n)}}))}}handleInput(t){try{var n;(n=this.delegate)===null||n===void 0||n.inputControllerWillHandleInput(),t.call(this)}finally{var r;(r=this.delegate)===null||r===void 0||r.inputControllerDidHandleInput()}}createLinkHTML(t,n){const r=document.createElement("a");return r.href=t,r.textContent=n||t,r.outerHTML}}var Ti;ht(ii,"events",{});const{browser:m1,keyNames:Qd}=kr;let h1=0;class tn extends ii{constructor(){super(...arguments),this.resetInputSummary()}setInputSummary(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.inputSummary.eventName=this.eventName;for(const n in t){const r=t[n];this.inputSummary[n]=r}return this.inputSummary}resetInputSummary(){this.inputSummary={}}reset(){return this.resetInputSummary(),In.reset()}elementDidMutate(t){var n,r;return this.isComposing()?(n=this.delegate)===null||n===void 0||(r=n.inputControllerDidAllowUnhandledInput)===null||r===void 0?void 0:r.call(n):this.handleInput((function(){return this.mutationIsSignificant(t)&&(this.mutationIsExpected(t)?this.requestRender():this.requestReparse()),this.reset()}))}mutationIsExpected(t){let{textAdded:n,textDeleted:r}=t;if(this.inputSummary.preferDocument)return!0;const i=n!=null?n===this.inputSummary.textAdded:!this.inputSummary.textAdded,l=r!=null?this.inputSummary.didDelete:!this.inputSummary.didDelete,a=[`
5974
5982
  `,`
5975
5983
  `].includes(n)&&!i,o=r===`
5976
- `&&!l;if(a&&!o||o&&!a){const u=this.getSelectedRange();if(u){var s;const f=a?n.replace(/\n$/,"").length||-1:n?.length||1;if((s=this.responder)!==null&&s!==void 0&&s.positionIsBlockBreak(u[1]+f))return!0}}return i&&l}mutationIsSignificant(t){var n;const r=Object.keys(t).length>0,i=((n=this.compositionInput)===null||n===void 0?void 0:n.getEndData())==="";return r||!i}getCompositionInput(){if(this.isComposing())return this.compositionInput;this.compositionInput=new dn(this)}isComposing(){return this.compositionInput&&!this.compositionInput.isEnded()}deleteInDirection(t,n){var r;return((r=this.responder)===null||r===void 0?void 0:r.deleteInDirection(t))!==!1?this.setInputSummary({didDelete:!0}):n?(n.preventDefault(),this.requestRender()):void 0}serializeSelectionToDataTransfer(t){var n;if(!function(i){if(i==null||!i.setData)return!1;for(const l in Wl){const a=Wl[l];try{if(i.setData(l,a),!i.getData(l)===a)return!1}catch{return!1}}return!0}(t))return;const r=(n=this.responder)===null||n===void 0?void 0:n.getSelectedDocument().toSerializableDocument();return t.setData("application/x-trix-document",JSON.stringify(r)),t.setData("text/html",ri.render(r).innerHTML),t.setData("text/plain",r.toString().replace(/\n$/,"")),!0}canAcceptDataTransfer(t){const n={};return Array.from(t?.types||[]).forEach(r=>{n[r]=!0}),n.Files||n["application/x-trix-document"]||n["text/html"]||n["text/plain"]}getPastedHTMLUsingHiddenElement(t){const n=this.getSelectedRange(),r={position:"absolute",left:"".concat(window.pageXOffset,"px"),top:"".concat(window.pageYOffset,"px"),opacity:0},i=ke({style:r,tagName:"div",editable:!0});return document.body.appendChild(i),i.focus(),requestAnimationFrame(()=>{const l=i.innerHTML;return mn(i),this.setSelectedRange(n),t(l)})}}ht(tn,"events",{keydown(e){this.isComposing()||this.resetInputSummary(),this.inputSummary.didInput=!0;const t=Qd[e.keyCode];if(t){var n;let i=this.keys;["ctrl","alt","shift","meta"].forEach(l=>{var a;e["".concat(l,"Key")]&&(l==="ctrl"&&(l="control"),i=(a=i)===null||a===void 0?void 0:a[l])}),((n=i)===null||n===void 0?void 0:n[t])!=null&&(this.setInputSummary({keyName:t}),In.reset(),i[t].call(this,e))}if(fd(e)){const i=String.fromCharCode(e.keyCode).toLowerCase();if(i){var r;const l=["alt","shift"].map(a=>{if(e["".concat(a,"Key")])return a}).filter(a=>a);l.push(i),(r=this.delegate)!==null&&r!==void 0&&r.inputControllerDidReceiveKeyboardCommand(l)&&e.preventDefault()}}},keypress(e){if(this.inputSummary.eventName!=null||e.metaKey||e.ctrlKey&&!e.altKey)return;const t=w1(e);var n,r;return t?((n=this.delegate)===null||n===void 0||n.inputControllerWillPerformTyping(),(r=this.responder)===null||r===void 0||r.insertString(t),this.setInputSummary({textAdded:t,didDelete:this.selectionIsExpanded()})):void 0},textInput(e){const{data:t}=e,{textAdded:n}=this.inputSummary;if(n&&n!==t&&n.toUpperCase()===t){var r;const i=this.getSelectedRange();return this.setSelectedRange([i[0],i[1]+n.length]),(r=this.responder)===null||r===void 0||r.insertString(t),this.setInputSummary({textAdded:t}),this.setSelectedRange(i)}},dragenter(e){e.preventDefault()},dragstart(e){var t,n;return this.serializeSelectionToDataTransfer(e.dataTransfer),this.draggedRange=this.getSelectedRange(),(t=this.delegate)===null||t===void 0||(n=t.inputControllerDidStartDrag)===null||n===void 0?void 0:n.call(t)},dragover(e){if(this.draggedRange||this.canAcceptDataTransfer(e.dataTransfer)){e.preventDefault();const r={x:e.clientX,y:e.clientY};var t,n;if(!Vn(r,this.draggingPoint))return this.draggingPoint=r,(t=this.delegate)===null||t===void 0||(n=t.inputControllerDidReceiveDragOverPoint)===null||n===void 0?void 0:n.call(t,this.draggingPoint)}},dragend(e){var t,n;(t=this.delegate)===null||t===void 0||(n=t.inputControllerDidCancelDrag)===null||n===void 0||n.call(t),this.draggedRange=null,this.draggingPoint=null},drop(e){var t,n;e.preventDefault();const r=(t=e.dataTransfer)===null||t===void 0?void 0:t.files,i=e.dataTransfer.getData("application/x-trix-document"),l={x:e.clientX,y:e.clientY};if((n=this.responder)===null||n===void 0||n.setLocationRangeFromPointRange(l),r!=null&&r.length)this.attachFiles(r);else if(this.draggedRange){var a,o;(a=this.delegate)===null||a===void 0||a.inputControllerWillMoveText(),(o=this.responder)===null||o===void 0||o.moveTextFromRange(this.draggedRange),this.draggedRange=null,this.requestRender()}else if(i){var s;const u=$t.fromJSONString(i);(s=this.responder)===null||s===void 0||s.insertDocument(u),this.requestRender()}this.draggedRange=null,this.draggingPoint=null},cut(e){var t,n;if((t=this.responder)!==null&&t!==void 0&&t.selectionIsExpanded()&&(this.serializeSelectionToDataTransfer(e.clipboardData)&&e.preventDefault(),(n=this.delegate)===null||n===void 0||n.inputControllerWillCutText(),this.deleteInDirection("backward"),e.defaultPrevented))return this.requestRender()},copy(e){var t;(t=this.responder)!==null&&t!==void 0&&t.selectionIsExpanded()&&this.serializeSelectionToDataTransfer(e.clipboardData)&&e.preventDefault()},paste(e){const t=e.clipboardData||e.testClipboardData,n={clipboard:t};if(!t||y1(e))return void this.getPastedHTMLUsingHiddenElement(P=>{var H,I,te;return n.type="text/html",n.html=P,(H=this.delegate)===null||H===void 0||H.inputControllerWillPaste(n),(I=this.responder)===null||I===void 0||I.insertHTML(n.html),this.requestRender(),(te=this.delegate)===null||te===void 0?void 0:te.inputControllerDidPaste(n)});const r=t.getData("URL"),i=t.getData("text/html"),l=t.getData("public.url-name");if(r){var a,o,s;let P;n.type="text/html",P=l?ml(l).trim():r,n.html=this.createLinkHTML(r,P),(a=this.delegate)===null||a===void 0||a.inputControllerWillPaste(n),this.setInputSummary({textAdded:P,didDelete:this.selectionIsExpanded()}),(o=this.responder)===null||o===void 0||o.insertHTML(n.html),this.requestRender(),(s=this.delegate)===null||s===void 0||s.inputControllerDidPaste(n)}else if(pd(t)){var u,f,S;n.type="text/plain",n.string=t.getData("text/plain"),(u=this.delegate)===null||u===void 0||u.inputControllerWillPaste(n),this.setInputSummary({textAdded:n.string,didDelete:this.selectionIsExpanded()}),(f=this.responder)===null||f===void 0||f.insertString(n.string),this.requestRender(),(S=this.delegate)===null||S===void 0||S.inputControllerDidPaste(n)}else if(i){var M,C,E;n.type="text/html",n.html=i,(M=this.delegate)===null||M===void 0||M.inputControllerWillPaste(n),(C=this.responder)===null||C===void 0||C.insertHTML(n.html),this.requestRender(),(E=this.delegate)===null||E===void 0||E.inputControllerDidPaste(n)}else if(Array.from(t.types).includes("Files")){var k,x;const P=(k=t.items)===null||k===void 0||(k=k[0])===null||k===void 0||(x=k.getAsFile)===null||x===void 0?void 0:x.call(k);if(P){var O,D,L;const H=h1(P);!P.name&&H&&(P.name="pasted-file-".concat(++m1,".").concat(H)),n.type="File",n.file=P,(O=this.delegate)===null||O===void 0||O.inputControllerWillAttachFiles(),(D=this.responder)===null||D===void 0||D.insertFile(n.file),this.requestRender(),(L=this.delegate)===null||L===void 0||L.inputControllerDidPaste(n)}}e.preventDefault()},compositionstart(e){return this.getCompositionInput().start(e.data)},compositionupdate(e){return this.getCompositionInput().update(e.data)},compositionend(e){return this.getCompositionInput().end(e.data)},beforeinput(e){this.inputSummary.didInput=!0},input(e){return this.inputSummary.didInput=!0,e.stopPropagation()}}),ht(tn,"keys",{backspace(e){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("backward",e)},delete(e){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("forward",e)},return(e){var t,n;return this.setInputSummary({preferDocument:!0}),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(n=this.responder)===null||n===void 0?void 0:n.insertLineBreak()},tab(e){var t,n;(t=this.responder)!==null&&t!==void 0&&t.canIncreaseNestingLevel()&&((n=this.responder)===null||n===void 0||n.increaseNestingLevel(),this.requestRender(),e.preventDefault())},left(e){var t;if(this.selectionIsInCursorTarget())return e.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("backward")},right(e){var t;if(this.selectionIsInCursorTarget())return e.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("forward")},control:{d(e){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("forward",e)},h(e){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("backward",e)},o(e){var t,n;return e.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(n=this.responder)===null||n===void 0||n.insertString(`
5984
+ `&&!l;if(a&&!o||o&&!a){const u=this.getSelectedRange();if(u){var s;const f=a?n.replace(/\n$/,"").length||-1:n?.length||1;if((s=this.responder)!==null&&s!==void 0&&s.positionIsBlockBreak(u[1]+f))return!0}}return i&&l}mutationIsSignificant(t){var n;const r=Object.keys(t).length>0,i=((n=this.compositionInput)===null||n===void 0?void 0:n.getEndData())==="";return r||!i}getCompositionInput(){if(this.isComposing())return this.compositionInput;this.compositionInput=new dn(this)}isComposing(){return this.compositionInput&&!this.compositionInput.isEnded()}deleteInDirection(t,n){var r;return((r=this.responder)===null||r===void 0?void 0:r.deleteInDirection(t))!==!1?this.setInputSummary({didDelete:!0}):n?(n.preventDefault(),this.requestRender()):void 0}serializeSelectionToDataTransfer(t){var n;if(!(function(i){if(i==null||!i.setData)return!1;for(const l in Wl){const a=Wl[l];try{if(i.setData(l,a),!i.getData(l)===a)return!1}catch{return!1}}return!0})(t))return;const r=(n=this.responder)===null||n===void 0?void 0:n.getSelectedDocument().toSerializableDocument();return t.setData("application/x-trix-document",JSON.stringify(r)),t.setData("text/html",ri.render(r).innerHTML),t.setData("text/plain",r.toString().replace(/\n$/,"")),!0}canAcceptDataTransfer(t){const n={};return Array.from(t?.types||[]).forEach((r=>{n[r]=!0})),n.Files||n["application/x-trix-document"]||n["text/html"]||n["text/plain"]}getPastedHTMLUsingHiddenElement(t){const n=this.getSelectedRange(),r={position:"absolute",left:"".concat(window.pageXOffset,"px"),top:"".concat(window.pageYOffset,"px"),opacity:0},i=ke({style:r,tagName:"div",editable:!0});return document.body.appendChild(i),i.focus(),requestAnimationFrame((()=>{const l=i.innerHTML;return mn(i),this.setSelectedRange(n),t(l)}))}}ht(tn,"events",{keydown(e){this.isComposing()||this.resetInputSummary(),this.inputSummary.didInput=!0;const t=Qd[e.keyCode];if(t){var n;let i=this.keys;["ctrl","alt","shift","meta"].forEach((l=>{var a;e["".concat(l,"Key")]&&(l==="ctrl"&&(l="control"),i=(a=i)===null||a===void 0?void 0:a[l])})),((n=i)===null||n===void 0?void 0:n[t])!=null&&(this.setInputSummary({keyName:t}),In.reset(),i[t].call(this,e))}if(fd(e)){const i=String.fromCharCode(e.keyCode).toLowerCase();if(i){var r;const l=["alt","shift"].map((a=>{if(e["".concat(a,"Key")])return a})).filter((a=>a));l.push(i),(r=this.delegate)!==null&&r!==void 0&&r.inputControllerDidReceiveKeyboardCommand(l)&&e.preventDefault()}}},keypress(e){if(this.inputSummary.eventName!=null||e.metaKey||e.ctrlKey&&!e.altKey)return;const t=y1(e);var n,r;return t?((n=this.delegate)===null||n===void 0||n.inputControllerWillPerformTyping(),(r=this.responder)===null||r===void 0||r.insertString(t),this.setInputSummary({textAdded:t,didDelete:this.selectionIsExpanded()})):void 0},textInput(e){const{data:t}=e,{textAdded:n}=this.inputSummary;if(n&&n!==t&&n.toUpperCase()===t){var r;const i=this.getSelectedRange();return this.setSelectedRange([i[0],i[1]+n.length]),(r=this.responder)===null||r===void 0||r.insertString(t),this.setInputSummary({textAdded:t}),this.setSelectedRange(i)}},dragenter(e){e.preventDefault()},dragstart(e){var t,n;return this.serializeSelectionToDataTransfer(e.dataTransfer),this.draggedRange=this.getSelectedRange(),(t=this.delegate)===null||t===void 0||(n=t.inputControllerDidStartDrag)===null||n===void 0?void 0:n.call(t)},dragover(e){if(this.draggedRange||this.canAcceptDataTransfer(e.dataTransfer)){e.preventDefault();const r={x:e.clientX,y:e.clientY};var t,n;if(!Vn(r,this.draggingPoint))return this.draggingPoint=r,(t=this.delegate)===null||t===void 0||(n=t.inputControllerDidReceiveDragOverPoint)===null||n===void 0?void 0:n.call(t,this.draggingPoint)}},dragend(e){var t,n;(t=this.delegate)===null||t===void 0||(n=t.inputControllerDidCancelDrag)===null||n===void 0||n.call(t),this.draggedRange=null,this.draggingPoint=null},drop(e){var t,n;e.preventDefault();const r=(t=e.dataTransfer)===null||t===void 0?void 0:t.files,i=e.dataTransfer.getData("application/x-trix-document"),l={x:e.clientX,y:e.clientY};if((n=this.responder)===null||n===void 0||n.setLocationRangeFromPointRange(l),r!=null&&r.length)this.attachFiles(r);else if(this.draggedRange){var a,o;(a=this.delegate)===null||a===void 0||a.inputControllerWillMoveText(),(o=this.responder)===null||o===void 0||o.moveTextFromRange(this.draggedRange),this.draggedRange=null,this.requestRender()}else if(i){var s;const u=$t.fromJSONString(i);(s=this.responder)===null||s===void 0||s.insertDocument(u),this.requestRender()}this.draggedRange=null,this.draggingPoint=null},cut(e){var t,n;if((t=this.responder)!==null&&t!==void 0&&t.selectionIsExpanded()&&(this.serializeSelectionToDataTransfer(e.clipboardData)&&e.preventDefault(),(n=this.delegate)===null||n===void 0||n.inputControllerWillCutText(),this.deleteInDirection("backward"),e.defaultPrevented))return this.requestRender()},copy(e){var t;(t=this.responder)!==null&&t!==void 0&&t.selectionIsExpanded()&&this.serializeSelectionToDataTransfer(e.clipboardData)&&e.preventDefault()},paste(e){const t=e.clipboardData||e.testClipboardData,n={clipboard:t};if(!t||k1(e))return void this.getPastedHTMLUsingHiddenElement((P=>{var H,I,te;return n.type="text/html",n.html=P,(H=this.delegate)===null||H===void 0||H.inputControllerWillPaste(n),(I=this.responder)===null||I===void 0||I.insertHTML(n.html),this.requestRender(),(te=this.delegate)===null||te===void 0?void 0:te.inputControllerDidPaste(n)}));const r=t.getData("URL"),i=t.getData("text/html"),l=t.getData("public.url-name");if(r){var a,o,s;let P;n.type="text/html",P=l?ml(l).trim():r,n.html=this.createLinkHTML(r,P),(a=this.delegate)===null||a===void 0||a.inputControllerWillPaste(n),this.setInputSummary({textAdded:P,didDelete:this.selectionIsExpanded()}),(o=this.responder)===null||o===void 0||o.insertHTML(n.html),this.requestRender(),(s=this.delegate)===null||s===void 0||s.inputControllerDidPaste(n)}else if(pd(t)){var u,f,S;n.type="text/plain",n.string=t.getData("text/plain"),(u=this.delegate)===null||u===void 0||u.inputControllerWillPaste(n),this.setInputSummary({textAdded:n.string,didDelete:this.selectionIsExpanded()}),(f=this.responder)===null||f===void 0||f.insertString(n.string),this.requestRender(),(S=this.delegate)===null||S===void 0||S.inputControllerDidPaste(n)}else if(i){var M,C,E;n.type="text/html",n.html=i,(M=this.delegate)===null||M===void 0||M.inputControllerWillPaste(n),(C=this.responder)===null||C===void 0||C.insertHTML(n.html),this.requestRender(),(E=this.delegate)===null||E===void 0||E.inputControllerDidPaste(n)}else if(Array.from(t.types).includes("Files")){var k,x;const P=(k=t.items)===null||k===void 0||(k=k[0])===null||k===void 0||(x=k.getAsFile)===null||x===void 0?void 0:x.call(k);if(P){var O,D,L;const H=b1(P);!P.name&&H&&(P.name="pasted-file-".concat(++h1,".").concat(H)),n.type="File",n.file=P,(O=this.delegate)===null||O===void 0||O.inputControllerWillAttachFiles(),(D=this.responder)===null||D===void 0||D.insertFile(n.file),this.requestRender(),(L=this.delegate)===null||L===void 0||L.inputControllerDidPaste(n)}}e.preventDefault()},compositionstart(e){return this.getCompositionInput().start(e.data)},compositionupdate(e){return this.getCompositionInput().update(e.data)},compositionend(e){return this.getCompositionInput().end(e.data)},beforeinput(e){this.inputSummary.didInput=!0},input(e){return this.inputSummary.didInput=!0,e.stopPropagation()}}),ht(tn,"keys",{backspace(e){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("backward",e)},delete(e){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("forward",e)},return(e){var t,n;return this.setInputSummary({preferDocument:!0}),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(n=this.responder)===null||n===void 0?void 0:n.insertLineBreak()},tab(e){var t,n;(t=this.responder)!==null&&t!==void 0&&t.canIncreaseNestingLevel()&&((n=this.responder)===null||n===void 0||n.increaseNestingLevel(),this.requestRender(),e.preventDefault())},left(e){var t;if(this.selectionIsInCursorTarget())return e.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("backward")},right(e){var t;if(this.selectionIsInCursorTarget())return e.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("forward")},control:{d(e){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("forward",e)},h(e){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("backward",e)},o(e){var t,n;return e.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(n=this.responder)===null||n===void 0||n.insertString(`
5977
5985
  `,{updatePosition:!1}),this.requestRender()}},shift:{return(e){var t,n;(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(n=this.responder)===null||n===void 0||n.insertString(`
5978
- `),this.requestRender(),e.preventDefault()},tab(e){var t,n;(t=this.responder)!==null&&t!==void 0&&t.canDecreaseNestingLevel()&&((n=this.responder)===null||n===void 0||n.decreaseNestingLevel(),this.requestRender(),e.preventDefault())},left(e){if(this.selectionIsInCursorTarget())return e.preventDefault(),this.expandSelectionInDirection("backward")},right(e){if(this.selectionIsInCursorTarget())return e.preventDefault(),this.expandSelectionInDirection("forward")}},alt:{backspace(e){var t;return this.setInputSummary({preferDocument:!1}),(t=this.delegate)===null||t===void 0?void 0:t.inputControllerWillPerformTyping()}},meta:{backspace(e){var t;return this.setInputSummary({preferDocument:!1}),(t=this.delegate)===null||t===void 0?void 0:t.inputControllerWillPerformTyping()}}}),tn.proxyMethod("responder?.getSelectedRange"),tn.proxyMethod("responder?.setSelectedRange"),tn.proxyMethod("responder?.expandSelectionInDirection"),tn.proxyMethod("responder?.selectionIsInCursorTarget"),tn.proxyMethod("responder?.selectionIsExpanded");const h1=e=>{var t;return(t=e.type)===null||t===void 0||(t=t.match(/\/(\w+)$/))===null||t===void 0?void 0:t[1]},b1=!((Ti=" ".codePointAt)===null||Ti===void 0||!Ti.call(" ",0)),w1=function(e){if(e.key&&b1&&e.key.codePointAt(0)===e.keyCode)return e.key;{let t;if(e.which===null?t=e.keyCode:e.which!==0&&e.charCode!==0&&(t=e.charCode),t!=null&&Qd[t]!=="escape")return vr.fromCodepoints([t]).toString()}},y1=function(e){const t=e.clipboardData;if(t){if(t.types.includes("text/html")){for(const n of t.types){const r=/^CorePasteboardFlavorType/.test(n),i=/^dyn\./.test(n)&&t.getData(n);if(r||i)return!0}return!1}{const n=t.types.includes("com.apple.webarchive"),r=t.types.includes("com.apple.flat-rtfd");return n||r}}};class dn extends it{constructor(t){super(...arguments),this.inputController=t,this.responder=this.inputController.responder,this.delegate=this.inputController.delegate,this.inputSummary=this.inputController.inputSummary,this.data={}}start(t){if(this.data.start=t,this.isSignificant()){var n,r;this.inputSummary.eventName==="keypress"&&this.inputSummary.textAdded&&((r=this.responder)===null||r===void 0||r.deleteInDirection("left")),this.selectionIsExpanded()||(this.insertPlaceholder(),this.requestRender()),this.range=(n=this.responder)===null||n===void 0?void 0:n.getSelectedRange()}}update(t){if(this.data.update=t,this.isSignificant()){const n=this.selectPlaceholder();n&&(this.forgetPlaceholder(),this.range=n)}}end(t){return this.data.end=t,this.isSignificant()?(this.forgetPlaceholder(),this.canApplyToDocument()?(this.setInputSummary({preferDocument:!0,didInput:!1}),(n=this.delegate)===null||n===void 0||n.inputControllerWillPerformTyping(),(r=this.responder)===null||r===void 0||r.setSelectedRange(this.range),(i=this.responder)===null||i===void 0||i.insertString(this.data.end),(l=this.responder)===null||l===void 0?void 0:l.setSelectedRange(this.range[0]+this.data.end.length)):this.data.start!=null||this.data.update!=null?(this.requestReparse(),this.inputController.reset()):void 0):this.inputController.reset();var n,r,i,l}getEndData(){return this.data.end}isEnded(){return this.getEndData()!=null}isSignificant(){return!g1.composesExistingText||this.inputSummary.didInput}canApplyToDocument(){var t,n;return((t=this.data.start)===null||t===void 0?void 0:t.length)===0&&((n=this.data.end)===null||n===void 0?void 0:n.length)>0&&this.range}}dn.proxyMethod("inputController.setInputSummary"),dn.proxyMethod("inputController.requestRender"),dn.proxyMethod("inputController.requestReparse"),dn.proxyMethod("responder?.selectionIsExpanded"),dn.proxyMethod("responder?.insertPlaceholder"),dn.proxyMethod("responder?.selectPlaceholder"),dn.proxyMethod("responder?.forgetPlaceholder");class ur extends ii{constructor(){super(...arguments),this.render=this.render.bind(this)}elementDidMutate(){return this.scheduledRender?this.composing?(t=this.delegate)===null||t===void 0||(n=t.inputControllerDidAllowUnhandledInput)===null||n===void 0?void 0:n.call(t):void 0:this.reparse();var t,n}scheduleRender(){return this.scheduledRender?this.scheduledRender:this.scheduledRender=requestAnimationFrame(this.render)}render(){var t,n;cancelAnimationFrame(this.scheduledRender),this.scheduledRender=null,this.composing||(n=this.delegate)===null||n===void 0||n.render(),(t=this.afterRender)===null||t===void 0||t.call(this),this.afterRender=null}reparse(){var t;return(t=this.delegate)===null||t===void 0?void 0:t.reparse()}insertString(){var t;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.withTargetDOMRange(function(){var i;return(i=this.responder)===null||i===void 0?void 0:i.insertString(n,r)})}toggleAttributeIfSupported(t){var n;if(Ui().includes(t))return(n=this.delegate)===null||n===void 0||n.inputControllerWillPerformFormatting(t),this.withTargetDOMRange(function(){var r;return(r=this.responder)===null||r===void 0?void 0:r.toggleCurrentAttribute(t)})}activateAttributeIfSupported(t,n){var r;if(Ui().includes(t))return(r=this.delegate)===null||r===void 0||r.inputControllerWillPerformFormatting(t),this.withTargetDOMRange(function(){var i;return(i=this.responder)===null||i===void 0?void 0:i.setCurrentAttribute(t,n)})}deleteInDirection(t){let{recordUndoEntry:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{recordUndoEntry:!0};var r;n&&((r=this.delegate)===null||r===void 0||r.inputControllerWillPerformTyping());const i=()=>{var a;return(a=this.responder)===null||a===void 0?void 0:a.deleteInDirection(t)},l=this.getTargetDOMRange({minLength:this.composing?1:2});return l?this.withTargetDOMRange(l,i):i()}withTargetDOMRange(t,n){var r;return typeof t=="function"&&(n=t,t=this.getTargetDOMRange()),t?(r=this.responder)===null||r===void 0?void 0:r.withTargetDOMRange(t,n.bind(this)):(In.reset(),n.call(this))}getTargetDOMRange(){var t,n;let{minLength:r}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{minLength:0};const i=(t=(n=this.event).getTargetRanges)===null||t===void 0?void 0:t.call(n);if(i&&i.length){const l=k1(i[0]);if(r===0||l.toString().length>=r)return l}}withEvent(t,n){let r;this.event=t;try{r=n.call(this)}finally{this.event=null}return r}}ht(ur,"events",{keydown(e){if(fd(e)){var t;const n=E1(e);(t=this.delegate)!==null&&t!==void 0&&t.inputControllerDidReceiveKeyboardCommand(n)&&e.preventDefault()}else{let n=e.key;e.altKey&&(n+="+Alt"),e.shiftKey&&(n+="+Shift");const r=this.constructor.keys[n];if(r)return this.withEvent(e,r)}},paste(e){var t;let n;const r=(t=e.clipboardData)===null||t===void 0?void 0:t.getData("URL");return qd(e)?(e.preventDefault(),this.attachFiles(e.clipboardData.files)):A1(e)?(e.preventDefault(),n={type:"text/plain",string:e.clipboardData.getData("text/plain")},(i=this.delegate)===null||i===void 0||i.inputControllerWillPaste(n),(l=this.responder)===null||l===void 0||l.insertString(n.string),this.render(),(a=this.delegate)===null||a===void 0?void 0:a.inputControllerDidPaste(n)):r?(e.preventDefault(),n={type:"text/html",html:this.createLinkHTML(r)},(o=this.delegate)===null||o===void 0||o.inputControllerWillPaste(n),(s=this.responder)===null||s===void 0||s.insertHTML(n.html),this.render(),(u=this.delegate)===null||u===void 0?void 0:u.inputControllerDidPaste(n)):void 0;var i,l,a,o,s,u},beforeinput(e){const t=this.constructor.inputTypes[e.inputType],n=(r=e,!(!/iPhone|iPad/.test(navigator.userAgent)||r.inputType&&r.inputType!=="insertParagraph"));var r;t&&(this.withEvent(e,t),n||this.scheduleRender()),n&&this.render()},input(e){In.reset()},dragstart(e){var t,n;(t=this.responder)!==null&&t!==void 0&&t.selectionContainsAttachments()&&(e.dataTransfer.setData("application/x-trix-dragging",!0),this.dragging={range:(n=this.responder)===null||n===void 0?void 0:n.getSelectedRange(),point:Ii(e)})},dragenter(e){Ri(e)&&e.preventDefault()},dragover(e){if(this.dragging){e.preventDefault();const n=Ii(e);var t;if(!Vn(n,this.dragging.point))return this.dragging.point=n,(t=this.responder)===null||t===void 0?void 0:t.setLocationRangeFromPointRange(n)}else Ri(e)&&e.preventDefault()},drop(e){var t,n;if(this.dragging)return e.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillMoveText(),(n=this.responder)===null||n===void 0||n.moveTextFromRange(this.dragging.range),this.dragging=null,this.scheduleRender();if(Ri(e)){var r;e.preventDefault();const i=Ii(e);return(r=this.responder)===null||r===void 0||r.setLocationRangeFromPointRange(i),this.attachFiles(e.dataTransfer.files)}},dragend(){var e;this.dragging&&((e=this.responder)===null||e===void 0||e.setSelectedRange(this.dragging.range),this.dragging=null)},compositionend(e){this.composing&&(this.composing=!1,yr.recentAndroid||this.scheduleRender())}}),ht(ur,"keys",{ArrowLeft(){var e,t;if((e=this.responder)!==null&&e!==void 0&&e.shouldManageMovingCursorInDirection("backward"))return this.event.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("backward")},ArrowRight(){var e,t;if((e=this.responder)!==null&&e!==void 0&&e.shouldManageMovingCursorInDirection("forward"))return this.event.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("forward")},Backspace(){var e,t,n;if((e=this.responder)!==null&&e!==void 0&&e.shouldManageDeletingInDirection("backward"))return this.event.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(n=this.responder)===null||n===void 0||n.deleteInDirection("backward"),this.render()},Tab(){var e,t;if((e=this.responder)!==null&&e!==void 0&&e.canIncreaseNestingLevel())return this.event.preventDefault(),(t=this.responder)===null||t===void 0||t.increaseNestingLevel(),this.render()},"Tab+Shift"(){var e,t;if((e=this.responder)!==null&&e!==void 0&&e.canDecreaseNestingLevel())return this.event.preventDefault(),(t=this.responder)===null||t===void 0||t.decreaseNestingLevel(),this.render()}}),ht(ur,"inputTypes",{deleteByComposition(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteByCut(){return this.deleteInDirection("backward")},deleteByDrag(){return this.event.preventDefault(),this.withTargetDOMRange(function(){var e;this.deleteByDragRange=(e=this.responder)===null||e===void 0?void 0:e.getSelectedRange()})},deleteCompositionText(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteContent(){return this.deleteInDirection("backward")},deleteContentBackward(){return this.deleteInDirection("backward")},deleteContentForward(){return this.deleteInDirection("forward")},deleteEntireSoftLine(){return this.deleteInDirection("forward")},deleteHardLineBackward(){return this.deleteInDirection("backward")},deleteHardLineForward(){return this.deleteInDirection("forward")},deleteSoftLineBackward(){return this.deleteInDirection("backward")},deleteSoftLineForward(){return this.deleteInDirection("forward")},deleteWordBackward(){return this.deleteInDirection("backward")},deleteWordForward(){return this.deleteInDirection("forward")},formatBackColor(){return this.activateAttributeIfSupported("backgroundColor",this.event.data)},formatBold(){return this.toggleAttributeIfSupported("bold")},formatFontColor(){return this.activateAttributeIfSupported("color",this.event.data)},formatFontName(){return this.activateAttributeIfSupported("font",this.event.data)},formatIndent(){var e;if((e=this.responder)!==null&&e!==void 0&&e.canIncreaseNestingLevel())return this.withTargetDOMRange(function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.increaseNestingLevel()})},formatItalic(){return this.toggleAttributeIfSupported("italic")},formatJustifyCenter(){return this.toggleAttributeIfSupported("justifyCenter")},formatJustifyFull(){return this.toggleAttributeIfSupported("justifyFull")},formatJustifyLeft(){return this.toggleAttributeIfSupported("justifyLeft")},formatJustifyRight(){return this.toggleAttributeIfSupported("justifyRight")},formatOutdent(){var e;if((e=this.responder)!==null&&e!==void 0&&e.canDecreaseNestingLevel())return this.withTargetDOMRange(function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.decreaseNestingLevel()})},formatRemove(){this.withTargetDOMRange(function(){for(const n in(e=this.responder)===null||e===void 0?void 0:e.getCurrentAttributes()){var e,t;(t=this.responder)===null||t===void 0||t.removeCurrentAttribute(n)}})},formatSetBlockTextDirection(){return this.activateAttributeIfSupported("blockDir",this.event.data)},formatSetInlineTextDirection(){return this.activateAttributeIfSupported("textDir",this.event.data)},formatStrikeThrough(){return this.toggleAttributeIfSupported("strike")},formatSubscript(){return this.toggleAttributeIfSupported("sub")},formatSuperscript(){return this.toggleAttributeIfSupported("sup")},formatUnderline(){return this.toggleAttributeIfSupported("underline")},historyRedo(){var e;return(e=this.delegate)===null||e===void 0?void 0:e.inputControllerWillPerformRedo()},historyUndo(){var e;return(e=this.delegate)===null||e===void 0?void 0:e.inputControllerWillPerformUndo()},insertCompositionText(){return this.composing=!0,this.insertString(this.event.data)},insertFromComposition(){return this.composing=!1,this.insertString(this.event.data)},insertFromDrop(){const e=this.deleteByDragRange;var t;if(e)return this.deleteByDragRange=null,(t=this.delegate)===null||t===void 0||t.inputControllerWillMoveText(),this.withTargetDOMRange(function(){var n;return(n=this.responder)===null||n===void 0?void 0:n.moveTextFromRange(e)})},insertFromPaste(){const{dataTransfer:e}=this.event,t={dataTransfer:e},n=e.getData("URL"),r=e.getData("text/html");if(n){var i;let s;this.event.preventDefault(),t.type="text/html";const u=e.getData("public.url-name");s=u?ml(u).trim():n,t.html=this.createLinkHTML(n,s),(i=this.delegate)===null||i===void 0||i.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var f;return(f=this.responder)===null||f===void 0?void 0:f.insertHTML(t.html)}),this.afterRender=()=>{var f;return(f=this.delegate)===null||f===void 0?void 0:f.inputControllerDidPaste(t)}}else if(pd(e)){var l;t.type="text/plain",t.string=e.getData("text/plain"),(l=this.delegate)===null||l===void 0||l.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var s;return(s=this.responder)===null||s===void 0?void 0:s.insertString(t.string)}),this.afterRender=()=>{var s;return(s=this.delegate)===null||s===void 0?void 0:s.inputControllerDidPaste(t)}}else if(C1(this.event)){var a;t.type="File",t.file=e.files[0],(a=this.delegate)===null||a===void 0||a.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var s;return(s=this.responder)===null||s===void 0?void 0:s.insertFile(t.file)}),this.afterRender=()=>{var s;return(s=this.delegate)===null||s===void 0?void 0:s.inputControllerDidPaste(t)}}else if(r){var o;this.event.preventDefault(),t.type="text/html",t.html=r,(o=this.delegate)===null||o===void 0||o.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var s;return(s=this.responder)===null||s===void 0?void 0:s.insertHTML(t.html)}),this.afterRender=()=>{var s;return(s=this.delegate)===null||s===void 0?void 0:s.inputControllerDidPaste(t)}}},insertFromYank(){return this.insertString(this.event.data)},insertLineBreak(){return this.insertString(`
5979
- `)},insertLink(){return this.activateAttributeIfSupported("href",this.event.data)},insertOrderedList(){return this.toggleAttributeIfSupported("number")},insertParagraph(){var e;return(e=this.delegate)===null||e===void 0||e.inputControllerWillPerformTyping(),this.withTargetDOMRange(function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.insertLineBreak()})},insertReplacementText(){const e=this.event.dataTransfer.getData("text/plain"),t=this.event.getTargetRanges()[0];this.withTargetDOMRange(t,()=>{this.insertString(e,{updatePosition:!1})})},insertText(){var e;return this.insertString(this.event.data||((e=this.event.dataTransfer)===null||e===void 0?void 0:e.getData("text/plain")))},insertTranspose(){return this.insertString(this.event.data)},insertUnorderedList(){return this.toggleAttributeIfSupported("bullet")}});const k1=function(e){const t=document.createRange();return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),t},Ri=e=>{var t;return Array.from(((t=e.dataTransfer)===null||t===void 0?void 0:t.types)||[]).includes("Files")},C1=e=>{var t;return((t=e.dataTransfer.files)===null||t===void 0?void 0:t[0])&&!qd(e)&&!(n=>{let{dataTransfer:r}=n;return r.types.includes("Files")&&r.types.includes("text/html")&&r.getData("text/html").includes("urn:schemas-microsoft-com:office:office")})(e)},qd=function(e){const t=e.clipboardData;if(t)return Array.from(t.types).filter(n=>n.match(/file/i)).length===t.types.length&&t.files.length>=1},A1=function(e){const t=e.clipboardData;if(t)return t.types.includes("text/plain")&&t.types.length===1},E1=function(e){const t=[];return e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),t.push(e.key),t},Ii=e=>({x:e.clientX,y:e.clientY}),Gi="[data-trix-attribute]",Ji="[data-trix-action]",L1="".concat(Gi,", ").concat(Ji),ai="[data-trix-dialog]",x1="".concat(ai,"[data-trix-active]"),S1="".concat(ai," [data-trix-method]"),mo="".concat(ai," [data-trix-input]"),ho=(e,t)=>(t||(t=Fn(e)),e.querySelector("[data-trix-input][name='".concat(t,"']"))),bo=e=>e.getAttribute("data-trix-action"),Fn=e=>e.getAttribute("data-trix-attribute")||e.getAttribute("data-trix-dialog-attribute");class Kd extends it{constructor(t){super(t),this.didClickActionButton=this.didClickActionButton.bind(this),this.didClickAttributeButton=this.didClickAttributeButton.bind(this),this.didClickDialogButton=this.didClickDialogButton.bind(this),this.didKeyDownDialogInput=this.didKeyDownDialogInput.bind(this),this.element=t,this.attributes={},this.actions={},this.resetDialogInputs(),_e("mousedown",{onElement:this.element,matchingSelector:Ji,withCallback:this.didClickActionButton}),_e("mousedown",{onElement:this.element,matchingSelector:Gi,withCallback:this.didClickAttributeButton}),_e("click",{onElement:this.element,matchingSelector:L1,preventDefault:!0}),_e("click",{onElement:this.element,matchingSelector:S1,withCallback:this.didClickDialogButton}),_e("keydown",{onElement:this.element,matchingSelector:mo,withCallback:this.didKeyDownDialogInput})}didClickActionButton(t,n){var r;(r=this.delegate)===null||r===void 0||r.toolbarDidClickButton(),t.preventDefault();const i=bo(n);return this.getDialog(i)?this.toggleDialog(i):(l=this.delegate)===null||l===void 0?void 0:l.toolbarDidInvokeAction(i,n);var l}didClickAttributeButton(t,n){var r;(r=this.delegate)===null||r===void 0||r.toolbarDidClickButton(),t.preventDefault();const i=Fn(n);var l;return this.getDialog(i)?this.toggleDialog(i):(l=this.delegate)===null||l===void 0||l.toolbarDidToggleAttribute(i),this.refreshAttributeButtons()}didClickDialogButton(t,n){const r=gn(n,{matchingSelector:ai});return this[n.getAttribute("data-trix-method")].call(this,r)}didKeyDownDialogInput(t,n){if(t.keyCode===13){t.preventDefault();const r=n.getAttribute("name"),i=this.getDialog(r);this.setAttribute(i)}if(t.keyCode===27)return t.preventDefault(),this.hideDialog()}updateActions(t){return this.actions=t,this.refreshActionButtons()}refreshActionButtons(){return this.eachActionButton((t,n)=>{t.disabled=this.actions[n]===!1})}eachActionButton(t){return Array.from(this.element.querySelectorAll(Ji)).map(n=>t(n,bo(n)))}updateAttributes(t){return this.attributes=t,this.refreshAttributeButtons()}refreshAttributeButtons(){return this.eachAttributeButton((t,n)=>(t.disabled=this.attributes[n]===!1,this.attributes[n]||this.dialogIsVisible(n)?(t.setAttribute("data-trix-active",""),t.classList.add("trix-active")):(t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"))))}eachAttributeButton(t){return Array.from(this.element.querySelectorAll(Gi)).map(n=>t(n,Fn(n)))}applyKeyboardCommand(t){const n=JSON.stringify(t.sort());for(const r of Array.from(this.element.querySelectorAll("[data-trix-key]"))){const i=r.getAttribute("data-trix-key").split("+");if(JSON.stringify(i.sort())===n)return ar("mousedown",{onElement:r}),!0}return!1}dialogIsVisible(t){const n=this.getDialog(t);if(n)return n.hasAttribute("data-trix-active")}toggleDialog(t){return this.dialogIsVisible(t)?this.hideDialog():this.showDialog(t)}showDialog(t){var n,r;this.hideDialog(),(n=this.delegate)===null||n===void 0||n.toolbarWillShowDialog();const i=this.getDialog(t);i.setAttribute("data-trix-active",""),i.classList.add("trix-active"),Array.from(i.querySelectorAll("input[disabled]")).forEach(a=>{a.removeAttribute("disabled")});const l=Fn(i);if(l){const a=ho(i,t);a&&(a.value=this.attributes[l]||"",a.select())}return(r=this.delegate)===null||r===void 0?void 0:r.toolbarDidShowDialog(t)}setAttribute(t){var n;const r=Fn(t),i=ho(t,r);return!i.willValidate||(i.setCustomValidity(""),i.checkValidity()&&this.isSafeAttribute(i))?((n=this.delegate)===null||n===void 0||n.toolbarDidUpdateAttribute(r,i.value),this.hideDialog()):(i.setCustomValidity("Invalid value"),i.setAttribute("data-trix-validate",""),i.classList.add("trix-validate"),i.focus())}isSafeAttribute(t){return!t.hasAttribute("data-trix-validate-href")||Hr.isValidAttribute("a","href",t.value)}removeAttribute(t){var n;const r=Fn(t);return(n=this.delegate)===null||n===void 0||n.toolbarDidRemoveAttribute(r),this.hideDialog()}hideDialog(){const t=this.element.querySelector(x1);var n;if(t)return t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"),this.resetDialogInputs(),(n=this.delegate)===null||n===void 0?void 0:n.toolbarDidHideDialog((r=>r.getAttribute("data-trix-dialog"))(t))}resetDialogInputs(){Array.from(this.element.querySelectorAll(mo)).forEach(t=>{t.setAttribute("disabled","disabled"),t.removeAttribute("data-trix-validate"),t.classList.remove("trix-validate")})}getDialog(t){return this.element.querySelector("[data-trix-dialog=".concat(t,"]"))}}class cr extends jd{constructor(t){let{editorElement:n,document:r,html:i}=t;super(...arguments),this.editorElement=n,this.selectionManager=new Cn(this.editorElement),this.selectionManager.delegate=this,this.composition=new cn,this.composition.delegate=this,this.attachmentManager=new Bd(this.composition.getAttachments()),this.attachmentManager.delegate=this,this.inputController=pl.getLevel()===2?new ur(this.editorElement):new tn(this.editorElement),this.inputController.delegate=this,this.inputController.responder=this.composition,this.compositionController=new Ud(this.editorElement,this.composition),this.compositionController.delegate=this,this.toolbarController=new Kd(this.editorElement.toolbarElement),this.toolbarController.delegate=this,this.editor=new $d(this.composition,this.selectionManager,this.editorElement),r?this.editor.loadDocument(r):this.editor.loadHTML(i)}registerSelectionManager(){return In.registerSelectionManager(this.selectionManager)}unregisterSelectionManager(){return In.unregisterSelectionManager(this.selectionManager)}render(){return this.compositionController.render()}reparse(){return this.composition.replaceHTML(this.editorElement.innerHTML)}compositionDidChangeDocument(t){if(this.notifyEditorElement("document-change"),!this.handlingInput)return this.render()}compositionDidChangeCurrentAttributes(t){return this.currentAttributes=t,this.toolbarController.updateAttributes(this.currentAttributes),this.updateCurrentActions(),this.notifyEditorElement("attributes-change",{attributes:this.currentAttributes})}compositionDidPerformInsertionAtRange(t){this.pasting&&(this.pastedRange=t)}compositionShouldAcceptFile(t){return this.notifyEditorElement("file-accept",{file:t})}compositionDidAddAttachment(t){const n=this.attachmentManager.manageAttachment(t);return this.notifyEditorElement("attachment-add",{attachment:n})}compositionDidEditAttachment(t){this.compositionController.rerenderViewForObject(t);const n=this.attachmentManager.manageAttachment(t);return this.notifyEditorElement("attachment-edit",{attachment:n}),this.notifyEditorElement("change")}compositionDidChangeAttachmentPreviewURL(t){return this.compositionController.invalidateViewForObject(t),this.notifyEditorElement("change")}compositionDidRemoveAttachment(t){const n=this.attachmentManager.unmanageAttachment(t);return this.notifyEditorElement("attachment-remove",{attachment:n})}compositionDidStartEditingAttachment(t,n){return this.attachmentLocationRange=this.composition.document.getLocationRangeOfAttachment(t),this.compositionController.installAttachmentEditorForAttachment(t,n),this.selectionManager.setLocationRange(this.attachmentLocationRange)}compositionDidStopEditingAttachment(t){this.compositionController.uninstallAttachmentEditor(),this.attachmentLocationRange=null}compositionDidRequestChangingSelectionToLocationRange(t){if(!this.loadingSnapshot||this.isFocused())return this.requestedLocationRange=t,this.compositionRevisionWhenLocationRangeRequested=this.composition.revision,this.handlingInput?void 0:this.render()}compositionWillLoadSnapshot(){this.loadingSnapshot=!0}compositionDidLoadSnapshot(){this.compositionController.refreshViewCache(),this.render(),this.loadingSnapshot=!1}getSelectionManager(){return this.selectionManager}attachmentManagerDidRequestRemovalOfAttachment(t){return this.removeAttachment(t)}compositionControllerWillSyncDocumentView(){return this.inputController.editorWillSyncDocumentView(),this.selectionManager.lock(),this.selectionManager.clearSelection()}compositionControllerDidSyncDocumentView(){return this.inputController.editorDidSyncDocumentView(),this.selectionManager.unlock(),this.updateCurrentActions(),this.notifyEditorElement("sync")}compositionControllerDidRender(){this.requestedLocationRange&&(this.compositionRevisionWhenLocationRangeRequested===this.composition.revision&&this.selectionManager.setLocationRange(this.requestedLocationRange),this.requestedLocationRange=null,this.compositionRevisionWhenLocationRangeRequested=null),this.renderedCompositionRevision!==this.composition.revision&&(this.runEditorFilters(),this.composition.updateCurrentAttributes(),this.notifyEditorElement("render")),this.renderedCompositionRevision=this.composition.revision}compositionControllerDidFocus(){return this.isFocusedInvisibly()&&this.setLocationRange({index:0,offset:0}),this.toolbarController.hideDialog(),this.notifyEditorElement("focus")}compositionControllerDidBlur(){return this.notifyEditorElement("blur")}compositionControllerDidSelectAttachment(t,n){return this.toolbarController.hideDialog(),this.composition.editAttachment(t,n)}compositionControllerDidRequestDeselectingAttachment(t){const n=this.attachmentLocationRange||this.composition.document.getLocationRangeOfAttachment(t);return this.selectionManager.setLocationRange(n[1])}compositionControllerWillUpdateAttachment(t){return this.editor.recordUndoEntry("Edit Attachment",{context:t.id,consolidatable:!0})}compositionControllerDidRequestRemovalOfAttachment(t){return this.removeAttachment(t)}inputControllerWillHandleInput(){this.handlingInput=!0,this.requestedRender=!1}inputControllerDidRequestRender(){this.requestedRender=!0}inputControllerDidHandleInput(){if(this.handlingInput=!1,this.requestedRender)return this.requestedRender=!1,this.render()}inputControllerDidAllowUnhandledInput(){return this.notifyEditorElement("change")}inputControllerDidRequestReparse(){return this.reparse()}inputControllerWillPerformTyping(){return this.recordTypingUndoEntry()}inputControllerWillPerformFormatting(t){return this.recordFormattingUndoEntry(t)}inputControllerWillCutText(){return this.editor.recordUndoEntry("Cut")}inputControllerWillPaste(t){return this.editor.recordUndoEntry("Paste"),this.pasting=!0,this.notifyEditorElement("before-paste",{paste:t})}inputControllerDidPaste(t){return t.range=this.pastedRange,this.pastedRange=null,this.pasting=null,this.notifyEditorElement("paste",{paste:t})}inputControllerWillMoveText(){return this.editor.recordUndoEntry("Move")}inputControllerWillAttachFiles(){return this.editor.recordUndoEntry("Drop Files")}inputControllerWillPerformUndo(){return this.editor.undo()}inputControllerWillPerformRedo(){return this.editor.redo()}inputControllerDidReceiveKeyboardCommand(t){return this.toolbarController.applyKeyboardCommand(t)}inputControllerDidStartDrag(){this.locationRangeBeforeDrag=this.selectionManager.getLocationRange()}inputControllerDidReceiveDragOverPoint(t){return this.selectionManager.setLocationRangeFromPointRange(t)}inputControllerDidCancelDrag(){this.selectionManager.setLocationRange(this.locationRangeBeforeDrag),this.locationRangeBeforeDrag=null}locationRangeDidChange(t){return this.composition.updateCurrentAttributes(),this.updateCurrentActions(),this.attachmentLocationRange&&!Pr(this.attachmentLocationRange,t)&&this.composition.stopEditingAttachment(),this.notifyEditorElement("selection-change")}toolbarDidClickButton(){if(!this.getLocationRange())return this.setLocationRange({index:0,offset:0})}toolbarDidInvokeAction(t,n){return this.invokeAction(t,n)}toolbarDidToggleAttribute(t){if(this.recordFormattingUndoEntry(t),this.composition.toggleCurrentAttribute(t),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarDidUpdateAttribute(t,n){if(this.recordFormattingUndoEntry(t),this.composition.setCurrentAttribute(t,n),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarDidRemoveAttribute(t){if(this.recordFormattingUndoEntry(t),this.composition.removeCurrentAttribute(t),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarWillShowDialog(t){return this.composition.expandSelectionForEditing(),this.freezeSelection()}toolbarDidShowDialog(t){return this.notifyEditorElement("toolbar-dialog-show",{dialogName:t})}toolbarDidHideDialog(t){return this.thawSelection(),this.editorElement.focus(),this.notifyEditorElement("toolbar-dialog-hide",{dialogName:t})}freezeSelection(){if(!this.selectionFrozen)return this.selectionManager.lock(),this.composition.freezeSelection(),this.selectionFrozen=!0,this.render()}thawSelection(){if(this.selectionFrozen)return this.composition.thawSelection(),this.selectionManager.unlock(),this.selectionFrozen=!1,this.render()}canInvokeAction(t){return!!this.actionIsExternal(t)||!((n=this.actions[t])===null||n===void 0||(n=n.test)===null||n===void 0||!n.call(this));var n}invokeAction(t,n){return this.actionIsExternal(t)?this.notifyEditorElement("action-invoke",{actionName:t,invokingElement:n}):(r=this.actions[t])===null||r===void 0||(r=r.perform)===null||r===void 0?void 0:r.call(this);var r}actionIsExternal(t){return/^x-./.test(t)}getCurrentActions(){const t={};for(const n in this.actions)t[n]=this.canInvokeAction(n);return t}updateCurrentActions(){const t=this.getCurrentActions();if(!Vn(t,this.currentActions))return this.currentActions=t,this.toolbarController.updateActions(this.currentActions),this.notifyEditorElement("actions-change",{actions:this.currentActions})}runEditorFilters(){let t=this.composition.getSnapshot();if(Array.from(this.editor.filters).forEach(i=>{const{document:l,selectedRange:a}=t;t=i.call(this.editor,t)||{},t.document||(t.document=l),t.selectedRange||(t.selectedRange=a)}),n=t,r=this.composition.getSnapshot(),!Pr(n.selectedRange,r.selectedRange)||!n.document.isEqualTo(r.document))return this.composition.loadSnapshot(t);var n,r}updateInputElement(){const t=function(n,r){const i=n1[r];if(i)return i(n);throw new Error("unknown content type: ".concat(r))}(this.compositionController.getSerializableElement(),"text/html");return this.editorElement.setFormValue(t)}notifyEditorElement(t,n){switch(t){case"document-change":this.documentChangedSinceLastRender=!0;break;case"render":this.documentChangedSinceLastRender&&(this.documentChangedSinceLastRender=!1,this.notifyEditorElement("change"));break;case"change":case"attachment-add":case"attachment-edit":case"attachment-remove":this.updateInputElement()}return this.editorElement.notify(t,n)}removeAttachment(t){return this.editor.recordUndoEntry("Delete Attachment"),this.composition.removeAttachment(t),this.render()}recordFormattingUndoEntry(t){const n=Xe(t),r=this.selectionManager.getLocationRange();if(n||!nn(r))return this.editor.recordUndoEntry("Formatting",{context:this.getUndoContext(),consolidatable:!0})}recordTypingUndoEntry(){return this.editor.recordUndoEntry("Typing",{context:this.getUndoContext(this.currentAttributes),consolidatable:!0})}getUndoContext(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return[this.getLocationContext(),this.getTimeContext(),...Array.from(n)]}getLocationContext(){const t=this.selectionManager.getLocationRange();return nn(t)?t[0].index:t}getTimeContext(){return Pi.interval>0?Math.floor(new Date().getTime()/Pi.interval):0}isFocused(){var t;return this.editorElement===((t=this.editorElement.ownerDocument)===null||t===void 0?void 0:t.activeElement)}isFocusedInvisibly(){return this.isFocused()&&!this.getLocationRange()}get actions(){return this.constructor.actions}}ht(cr,"actions",{undo:{test(){return this.editor.canUndo()},perform(){return this.editor.undo()}},redo:{test(){return this.editor.canRedo()},perform(){return this.editor.redo()}},link:{test(){return this.editor.canActivateAttribute("href")}},increaseNestingLevel:{test(){return this.editor.canIncreaseNestingLevel()},perform(){return this.editor.increaseNestingLevel()&&this.render()}},decreaseNestingLevel:{test(){return this.editor.canDecreaseNestingLevel()},perform(){return this.editor.decreaseNestingLevel()&&this.render()}},attachFiles:{test:()=>!0,perform(){return pl.pickFiles(this.editor.insertFiles)}}}),cr.proxyMethod("getSelectionManager().setLocationRange"),cr.proxyMethod("getSelectionManager().getLocationRange");var T1=Object.freeze({__proto__:null,AttachmentEditorController:Hd,CompositionController:Ud,Controller:jd,EditorController:cr,InputController:ii,Level0InputController:tn,Level2InputController:ur,ToolbarController:Kd}),R1=Object.freeze({__proto__:null,MutationObserver:Vd,SelectionChangeObserver:gd}),I1=Object.freeze({__proto__:null,FileVerificationOperation:_d,ImagePreloadOperation:Td});cd("trix-toolbar",`%t {
5986
+ `),this.requestRender(),e.preventDefault()},tab(e){var t,n;(t=this.responder)!==null&&t!==void 0&&t.canDecreaseNestingLevel()&&((n=this.responder)===null||n===void 0||n.decreaseNestingLevel(),this.requestRender(),e.preventDefault())},left(e){if(this.selectionIsInCursorTarget())return e.preventDefault(),this.expandSelectionInDirection("backward")},right(e){if(this.selectionIsInCursorTarget())return e.preventDefault(),this.expandSelectionInDirection("forward")}},alt:{backspace(e){var t;return this.setInputSummary({preferDocument:!1}),(t=this.delegate)===null||t===void 0?void 0:t.inputControllerWillPerformTyping()}},meta:{backspace(e){var t;return this.setInputSummary({preferDocument:!1}),(t=this.delegate)===null||t===void 0?void 0:t.inputControllerWillPerformTyping()}}}),tn.proxyMethod("responder?.getSelectedRange"),tn.proxyMethod("responder?.setSelectedRange"),tn.proxyMethod("responder?.expandSelectionInDirection"),tn.proxyMethod("responder?.selectionIsInCursorTarget"),tn.proxyMethod("responder?.selectionIsExpanded");const b1=e=>{var t;return(t=e.type)===null||t===void 0||(t=t.match(/\/(\w+)$/))===null||t===void 0?void 0:t[1]},w1=!((Ti=" ".codePointAt)===null||Ti===void 0||!Ti.call(" ",0)),y1=function(e){if(e.key&&w1&&e.key.codePointAt(0)===e.keyCode)return e.key;{let t;if(e.which===null?t=e.keyCode:e.which!==0&&e.charCode!==0&&(t=e.charCode),t!=null&&Qd[t]!=="escape")return vr.fromCodepoints([t]).toString()}},k1=function(e){const t=e.clipboardData;if(t){if(t.types.includes("text/html")){for(const n of t.types){const r=/^CorePasteboardFlavorType/.test(n),i=/^dyn\./.test(n)&&t.getData(n);if(r||i)return!0}return!1}{const n=t.types.includes("com.apple.webarchive"),r=t.types.includes("com.apple.flat-rtfd");return n||r}}};class dn extends it{constructor(t){super(...arguments),this.inputController=t,this.responder=this.inputController.responder,this.delegate=this.inputController.delegate,this.inputSummary=this.inputController.inputSummary,this.data={}}start(t){if(this.data.start=t,this.isSignificant()){var n,r;this.inputSummary.eventName==="keypress"&&this.inputSummary.textAdded&&((r=this.responder)===null||r===void 0||r.deleteInDirection("left")),this.selectionIsExpanded()||(this.insertPlaceholder(),this.requestRender()),this.range=(n=this.responder)===null||n===void 0?void 0:n.getSelectedRange()}}update(t){if(this.data.update=t,this.isSignificant()){const n=this.selectPlaceholder();n&&(this.forgetPlaceholder(),this.range=n)}}end(t){return this.data.end=t,this.isSignificant()?(this.forgetPlaceholder(),this.canApplyToDocument()?(this.setInputSummary({preferDocument:!0,didInput:!1}),(n=this.delegate)===null||n===void 0||n.inputControllerWillPerformTyping(),(r=this.responder)===null||r===void 0||r.setSelectedRange(this.range),(i=this.responder)===null||i===void 0||i.insertString(this.data.end),(l=this.responder)===null||l===void 0?void 0:l.setSelectedRange(this.range[0]+this.data.end.length)):this.data.start!=null||this.data.update!=null?(this.requestReparse(),this.inputController.reset()):void 0):this.inputController.reset();var n,r,i,l}getEndData(){return this.data.end}isEnded(){return this.getEndData()!=null}isSignificant(){return!m1.composesExistingText||this.inputSummary.didInput}canApplyToDocument(){var t,n;return((t=this.data.start)===null||t===void 0?void 0:t.length)===0&&((n=this.data.end)===null||n===void 0?void 0:n.length)>0&&this.range}}dn.proxyMethod("inputController.setInputSummary"),dn.proxyMethod("inputController.requestRender"),dn.proxyMethod("inputController.requestReparse"),dn.proxyMethod("responder?.selectionIsExpanded"),dn.proxyMethod("responder?.insertPlaceholder"),dn.proxyMethod("responder?.selectPlaceholder"),dn.proxyMethod("responder?.forgetPlaceholder");class ur extends ii{constructor(){super(...arguments),this.render=this.render.bind(this)}elementDidMutate(){return this.scheduledRender?this.composing?(t=this.delegate)===null||t===void 0||(n=t.inputControllerDidAllowUnhandledInput)===null||n===void 0?void 0:n.call(t):void 0:this.reparse();var t,n}scheduleRender(){return this.scheduledRender?this.scheduledRender:this.scheduledRender=requestAnimationFrame(this.render)}render(){var t,n;cancelAnimationFrame(this.scheduledRender),this.scheduledRender=null,this.composing||(n=this.delegate)===null||n===void 0||n.render(),(t=this.afterRender)===null||t===void 0||t.call(this),this.afterRender=null}reparse(){var t;return(t=this.delegate)===null||t===void 0?void 0:t.reparse()}insertString(){var t;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.withTargetDOMRange((function(){var i;return(i=this.responder)===null||i===void 0?void 0:i.insertString(n,r)}))}toggleAttributeIfSupported(t){var n;if(Ui().includes(t))return(n=this.delegate)===null||n===void 0||n.inputControllerWillPerformFormatting(t),this.withTargetDOMRange((function(){var r;return(r=this.responder)===null||r===void 0?void 0:r.toggleCurrentAttribute(t)}))}activateAttributeIfSupported(t,n){var r;if(Ui().includes(t))return(r=this.delegate)===null||r===void 0||r.inputControllerWillPerformFormatting(t),this.withTargetDOMRange((function(){var i;return(i=this.responder)===null||i===void 0?void 0:i.setCurrentAttribute(t,n)}))}deleteInDirection(t){let{recordUndoEntry:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{recordUndoEntry:!0};var r;n&&((r=this.delegate)===null||r===void 0||r.inputControllerWillPerformTyping());const i=()=>{var a;return(a=this.responder)===null||a===void 0?void 0:a.deleteInDirection(t)},l=this.getTargetDOMRange({minLength:this.composing?1:2});return l?this.withTargetDOMRange(l,i):i()}withTargetDOMRange(t,n){var r;return typeof t=="function"&&(n=t,t=this.getTargetDOMRange()),t?(r=this.responder)===null||r===void 0?void 0:r.withTargetDOMRange(t,n.bind(this)):(In.reset(),n.call(this))}getTargetDOMRange(){var t,n;let{minLength:r}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{minLength:0};const i=(t=(n=this.event).getTargetRanges)===null||t===void 0?void 0:t.call(n);if(i&&i.length){const l=C1(i[0]);if(r===0||l.toString().length>=r)return l}}withEvent(t,n){let r;this.event=t;try{r=n.call(this)}finally{this.event=null}return r}}ht(ur,"events",{keydown(e){if(fd(e)){var t;const n=L1(e);(t=this.delegate)!==null&&t!==void 0&&t.inputControllerDidReceiveKeyboardCommand(n)&&e.preventDefault()}else{let n=e.key;e.altKey&&(n+="+Alt"),e.shiftKey&&(n+="+Shift");const r=this.constructor.keys[n];if(r)return this.withEvent(e,r)}},paste(e){var t;let n;const r=(t=e.clipboardData)===null||t===void 0?void 0:t.getData("URL");return qd(e)?(e.preventDefault(),this.attachFiles(e.clipboardData.files)):E1(e)?(e.preventDefault(),n={type:"text/plain",string:e.clipboardData.getData("text/plain")},(i=this.delegate)===null||i===void 0||i.inputControllerWillPaste(n),(l=this.responder)===null||l===void 0||l.insertString(n.string),this.render(),(a=this.delegate)===null||a===void 0?void 0:a.inputControllerDidPaste(n)):r?(e.preventDefault(),n={type:"text/html",html:this.createLinkHTML(r)},(o=this.delegate)===null||o===void 0||o.inputControllerWillPaste(n),(s=this.responder)===null||s===void 0||s.insertHTML(n.html),this.render(),(u=this.delegate)===null||u===void 0?void 0:u.inputControllerDidPaste(n)):void 0;var i,l,a,o,s,u},beforeinput(e){const t=this.constructor.inputTypes[e.inputType],n=(r=e,!(!/iPhone|iPad/.test(navigator.userAgent)||r.inputType&&r.inputType!=="insertParagraph"));var r;t&&(this.withEvent(e,t),n||this.scheduleRender()),n&&this.render()},input(e){In.reset()},dragstart(e){var t,n;(t=this.responder)!==null&&t!==void 0&&t.selectionContainsAttachments()&&(e.dataTransfer.setData("application/x-trix-dragging",!0),this.dragging={range:(n=this.responder)===null||n===void 0?void 0:n.getSelectedRange(),point:Ii(e)})},dragenter(e){Ri(e)&&e.preventDefault()},dragover(e){if(this.dragging){e.preventDefault();const n=Ii(e);var t;if(!Vn(n,this.dragging.point))return this.dragging.point=n,(t=this.responder)===null||t===void 0?void 0:t.setLocationRangeFromPointRange(n)}else Ri(e)&&e.preventDefault()},drop(e){var t,n;if(this.dragging)return e.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillMoveText(),(n=this.responder)===null||n===void 0||n.moveTextFromRange(this.dragging.range),this.dragging=null,this.scheduleRender();if(Ri(e)){var r;e.preventDefault();const i=Ii(e);return(r=this.responder)===null||r===void 0||r.setLocationRangeFromPointRange(i),this.attachFiles(e.dataTransfer.files)}},dragend(){var e;this.dragging&&((e=this.responder)===null||e===void 0||e.setSelectedRange(this.dragging.range),this.dragging=null)},compositionend(e){this.composing&&(this.composing=!1,yr.recentAndroid||this.scheduleRender())}}),ht(ur,"keys",{ArrowLeft(){var e,t;if((e=this.responder)!==null&&e!==void 0&&e.shouldManageMovingCursorInDirection("backward"))return this.event.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("backward")},ArrowRight(){var e,t;if((e=this.responder)!==null&&e!==void 0&&e.shouldManageMovingCursorInDirection("forward"))return this.event.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("forward")},Backspace(){var e,t,n;if((e=this.responder)!==null&&e!==void 0&&e.shouldManageDeletingInDirection("backward"))return this.event.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(n=this.responder)===null||n===void 0||n.deleteInDirection("backward"),this.render()},Tab(){var e,t;if((e=this.responder)!==null&&e!==void 0&&e.canIncreaseNestingLevel())return this.event.preventDefault(),(t=this.responder)===null||t===void 0||t.increaseNestingLevel(),this.render()},"Tab+Shift"(){var e,t;if((e=this.responder)!==null&&e!==void 0&&e.canDecreaseNestingLevel())return this.event.preventDefault(),(t=this.responder)===null||t===void 0||t.decreaseNestingLevel(),this.render()}}),ht(ur,"inputTypes",{deleteByComposition(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteByCut(){return this.deleteInDirection("backward")},deleteByDrag(){return this.event.preventDefault(),this.withTargetDOMRange((function(){var e;this.deleteByDragRange=(e=this.responder)===null||e===void 0?void 0:e.getSelectedRange()}))},deleteCompositionText(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteContent(){return this.deleteInDirection("backward")},deleteContentBackward(){return this.deleteInDirection("backward")},deleteContentForward(){return this.deleteInDirection("forward")},deleteEntireSoftLine(){return this.deleteInDirection("forward")},deleteHardLineBackward(){return this.deleteInDirection("backward")},deleteHardLineForward(){return this.deleteInDirection("forward")},deleteSoftLineBackward(){return this.deleteInDirection("backward")},deleteSoftLineForward(){return this.deleteInDirection("forward")},deleteWordBackward(){return this.deleteInDirection("backward")},deleteWordForward(){return this.deleteInDirection("forward")},formatBackColor(){return this.activateAttributeIfSupported("backgroundColor",this.event.data)},formatBold(){return this.toggleAttributeIfSupported("bold")},formatFontColor(){return this.activateAttributeIfSupported("color",this.event.data)},formatFontName(){return this.activateAttributeIfSupported("font",this.event.data)},formatIndent(){var e;if((e=this.responder)!==null&&e!==void 0&&e.canIncreaseNestingLevel())return this.withTargetDOMRange((function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.increaseNestingLevel()}))},formatItalic(){return this.toggleAttributeIfSupported("italic")},formatJustifyCenter(){return this.toggleAttributeIfSupported("justifyCenter")},formatJustifyFull(){return this.toggleAttributeIfSupported("justifyFull")},formatJustifyLeft(){return this.toggleAttributeIfSupported("justifyLeft")},formatJustifyRight(){return this.toggleAttributeIfSupported("justifyRight")},formatOutdent(){var e;if((e=this.responder)!==null&&e!==void 0&&e.canDecreaseNestingLevel())return this.withTargetDOMRange((function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.decreaseNestingLevel()}))},formatRemove(){this.withTargetDOMRange((function(){for(const n in(e=this.responder)===null||e===void 0?void 0:e.getCurrentAttributes()){var e,t;(t=this.responder)===null||t===void 0||t.removeCurrentAttribute(n)}}))},formatSetBlockTextDirection(){return this.activateAttributeIfSupported("blockDir",this.event.data)},formatSetInlineTextDirection(){return this.activateAttributeIfSupported("textDir",this.event.data)},formatStrikeThrough(){return this.toggleAttributeIfSupported("strike")},formatSubscript(){return this.toggleAttributeIfSupported("sub")},formatSuperscript(){return this.toggleAttributeIfSupported("sup")},formatUnderline(){return this.toggleAttributeIfSupported("underline")},historyRedo(){var e;return(e=this.delegate)===null||e===void 0?void 0:e.inputControllerWillPerformRedo()},historyUndo(){var e;return(e=this.delegate)===null||e===void 0?void 0:e.inputControllerWillPerformUndo()},insertCompositionText(){return this.composing=!0,this.insertString(this.event.data)},insertFromComposition(){return this.composing=!1,this.insertString(this.event.data)},insertFromDrop(){const e=this.deleteByDragRange;var t;if(e)return this.deleteByDragRange=null,(t=this.delegate)===null||t===void 0||t.inputControllerWillMoveText(),this.withTargetDOMRange((function(){var n;return(n=this.responder)===null||n===void 0?void 0:n.moveTextFromRange(e)}))},insertFromPaste(){const{dataTransfer:e}=this.event,t={dataTransfer:e},n=e.getData("URL"),r=e.getData("text/html");if(n){var i;let s;this.event.preventDefault(),t.type="text/html";const u=e.getData("public.url-name");s=u?ml(u).trim():n,t.html=this.createLinkHTML(n,s),(i=this.delegate)===null||i===void 0||i.inputControllerWillPaste(t),this.withTargetDOMRange((function(){var f;return(f=this.responder)===null||f===void 0?void 0:f.insertHTML(t.html)})),this.afterRender=()=>{var f;return(f=this.delegate)===null||f===void 0?void 0:f.inputControllerDidPaste(t)}}else if(pd(e)){var l;t.type="text/plain",t.string=e.getData("text/plain"),(l=this.delegate)===null||l===void 0||l.inputControllerWillPaste(t),this.withTargetDOMRange((function(){var s;return(s=this.responder)===null||s===void 0?void 0:s.insertString(t.string)})),this.afterRender=()=>{var s;return(s=this.delegate)===null||s===void 0?void 0:s.inputControllerDidPaste(t)}}else if(A1(this.event)){var a;t.type="File",t.file=e.files[0],(a=this.delegate)===null||a===void 0||a.inputControllerWillPaste(t),this.withTargetDOMRange((function(){var s;return(s=this.responder)===null||s===void 0?void 0:s.insertFile(t.file)})),this.afterRender=()=>{var s;return(s=this.delegate)===null||s===void 0?void 0:s.inputControllerDidPaste(t)}}else if(r){var o;this.event.preventDefault(),t.type="text/html",t.html=r,(o=this.delegate)===null||o===void 0||o.inputControllerWillPaste(t),this.withTargetDOMRange((function(){var s;return(s=this.responder)===null||s===void 0?void 0:s.insertHTML(t.html)})),this.afterRender=()=>{var s;return(s=this.delegate)===null||s===void 0?void 0:s.inputControllerDidPaste(t)}}},insertFromYank(){return this.insertString(this.event.data)},insertLineBreak(){return this.insertString(`
5987
+ `)},insertLink(){return this.activateAttributeIfSupported("href",this.event.data)},insertOrderedList(){return this.toggleAttributeIfSupported("number")},insertParagraph(){var e;return(e=this.delegate)===null||e===void 0||e.inputControllerWillPerformTyping(),this.withTargetDOMRange((function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.insertLineBreak()}))},insertReplacementText(){const e=this.event.dataTransfer.getData("text/plain"),t=this.event.getTargetRanges()[0];this.withTargetDOMRange(t,(()=>{this.insertString(e,{updatePosition:!1})}))},insertText(){var e;return this.insertString(this.event.data||((e=this.event.dataTransfer)===null||e===void 0?void 0:e.getData("text/plain")))},insertTranspose(){return this.insertString(this.event.data)},insertUnorderedList(){return this.toggleAttributeIfSupported("bullet")}});const C1=function(e){const t=document.createRange();return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),t},Ri=e=>{var t;return Array.from(((t=e.dataTransfer)===null||t===void 0?void 0:t.types)||[]).includes("Files")},A1=e=>{var t;return((t=e.dataTransfer.files)===null||t===void 0?void 0:t[0])&&!qd(e)&&!(n=>{let{dataTransfer:r}=n;return r.types.includes("Files")&&r.types.includes("text/html")&&r.getData("text/html").includes("urn:schemas-microsoft-com:office:office")})(e)},qd=function(e){const t=e.clipboardData;if(t)return Array.from(t.types).filter((n=>n.match(/file/i))).length===t.types.length&&t.files.length>=1},E1=function(e){const t=e.clipboardData;if(t)return t.types.includes("text/plain")&&t.types.length===1},L1=function(e){const t=[];return e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),t.push(e.key),t},Ii=e=>({x:e.clientX,y:e.clientY}),Gi="[data-trix-attribute]",Ji="[data-trix-action]",x1="".concat(Gi,", ").concat(Ji),ai="[data-trix-dialog]",S1="".concat(ai,"[data-trix-active]"),T1="".concat(ai," [data-trix-method]"),mo="".concat(ai," [data-trix-input]"),ho=(e,t)=>(t||(t=Fn(e)),e.querySelector("[data-trix-input][name='".concat(t,"']"))),bo=e=>e.getAttribute("data-trix-action"),Fn=e=>e.getAttribute("data-trix-attribute")||e.getAttribute("data-trix-dialog-attribute");class Kd extends it{constructor(t){super(t),this.didClickActionButton=this.didClickActionButton.bind(this),this.didClickAttributeButton=this.didClickAttributeButton.bind(this),this.didClickDialogButton=this.didClickDialogButton.bind(this),this.didKeyDownDialogInput=this.didKeyDownDialogInput.bind(this),this.element=t,this.attributes={},this.actions={},this.resetDialogInputs(),_e("mousedown",{onElement:this.element,matchingSelector:Ji,withCallback:this.didClickActionButton}),_e("mousedown",{onElement:this.element,matchingSelector:Gi,withCallback:this.didClickAttributeButton}),_e("click",{onElement:this.element,matchingSelector:x1,preventDefault:!0}),_e("click",{onElement:this.element,matchingSelector:T1,withCallback:this.didClickDialogButton}),_e("keydown",{onElement:this.element,matchingSelector:mo,withCallback:this.didKeyDownDialogInput})}didClickActionButton(t,n){var r;(r=this.delegate)===null||r===void 0||r.toolbarDidClickButton(),t.preventDefault();const i=bo(n);return this.getDialog(i)?this.toggleDialog(i):(l=this.delegate)===null||l===void 0?void 0:l.toolbarDidInvokeAction(i,n);var l}didClickAttributeButton(t,n){var r;(r=this.delegate)===null||r===void 0||r.toolbarDidClickButton(),t.preventDefault();const i=Fn(n);var l;return this.getDialog(i)?this.toggleDialog(i):(l=this.delegate)===null||l===void 0||l.toolbarDidToggleAttribute(i),this.refreshAttributeButtons()}didClickDialogButton(t,n){const r=gn(n,{matchingSelector:ai});return this[n.getAttribute("data-trix-method")].call(this,r)}didKeyDownDialogInput(t,n){if(t.keyCode===13){t.preventDefault();const r=n.getAttribute("name"),i=this.getDialog(r);this.setAttribute(i)}if(t.keyCode===27)return t.preventDefault(),this.hideDialog()}updateActions(t){return this.actions=t,this.refreshActionButtons()}refreshActionButtons(){return this.eachActionButton(((t,n)=>{t.disabled=this.actions[n]===!1}))}eachActionButton(t){return Array.from(this.element.querySelectorAll(Ji)).map((n=>t(n,bo(n))))}updateAttributes(t){return this.attributes=t,this.refreshAttributeButtons()}refreshAttributeButtons(){return this.eachAttributeButton(((t,n)=>(t.disabled=this.attributes[n]===!1,this.attributes[n]||this.dialogIsVisible(n)?(t.setAttribute("data-trix-active",""),t.classList.add("trix-active")):(t.removeAttribute("data-trix-active"),t.classList.remove("trix-active")))))}eachAttributeButton(t){return Array.from(this.element.querySelectorAll(Gi)).map((n=>t(n,Fn(n))))}applyKeyboardCommand(t){const n=JSON.stringify(t.sort());for(const r of Array.from(this.element.querySelectorAll("[data-trix-key]"))){const i=r.getAttribute("data-trix-key").split("+");if(JSON.stringify(i.sort())===n)return ar("mousedown",{onElement:r}),!0}return!1}dialogIsVisible(t){const n=this.getDialog(t);if(n)return n.hasAttribute("data-trix-active")}toggleDialog(t){return this.dialogIsVisible(t)?this.hideDialog():this.showDialog(t)}showDialog(t){var n,r;this.hideDialog(),(n=this.delegate)===null||n===void 0||n.toolbarWillShowDialog();const i=this.getDialog(t);i.setAttribute("data-trix-active",""),i.classList.add("trix-active"),Array.from(i.querySelectorAll("input[disabled]")).forEach((a=>{a.removeAttribute("disabled")}));const l=Fn(i);if(l){const a=ho(i,t);a&&(a.value=this.attributes[l]||"",a.select())}return(r=this.delegate)===null||r===void 0?void 0:r.toolbarDidShowDialog(t)}setAttribute(t){var n;const r=Fn(t),i=ho(t,r);return!i.willValidate||(i.setCustomValidity(""),i.checkValidity()&&this.isSafeAttribute(i))?((n=this.delegate)===null||n===void 0||n.toolbarDidUpdateAttribute(r,i.value),this.hideDialog()):(i.setCustomValidity("Invalid value"),i.setAttribute("data-trix-validate",""),i.classList.add("trix-validate"),i.focus())}isSafeAttribute(t){return!t.hasAttribute("data-trix-validate-href")||Hr.isValidAttribute("a","href",t.value)}removeAttribute(t){var n;const r=Fn(t);return(n=this.delegate)===null||n===void 0||n.toolbarDidRemoveAttribute(r),this.hideDialog()}hideDialog(){const t=this.element.querySelector(S1);var n;if(t)return t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"),this.resetDialogInputs(),(n=this.delegate)===null||n===void 0?void 0:n.toolbarDidHideDialog((r=>r.getAttribute("data-trix-dialog"))(t))}resetDialogInputs(){Array.from(this.element.querySelectorAll(mo)).forEach((t=>{t.setAttribute("disabled","disabled"),t.removeAttribute("data-trix-validate"),t.classList.remove("trix-validate")}))}getDialog(t){return this.element.querySelector("[data-trix-dialog=".concat(t,"]"))}}class cr extends jd{constructor(t){let{editorElement:n,document:r,html:i}=t;super(...arguments),this.editorElement=n,this.selectionManager=new Cn(this.editorElement),this.selectionManager.delegate=this,this.composition=new cn,this.composition.delegate=this,this.attachmentManager=new Bd(this.composition.getAttachments()),this.attachmentManager.delegate=this,this.inputController=pl.getLevel()===2?new ur(this.editorElement):new tn(this.editorElement),this.inputController.delegate=this,this.inputController.responder=this.composition,this.compositionController=new Ud(this.editorElement,this.composition),this.compositionController.delegate=this,this.toolbarController=new Kd(this.editorElement.toolbarElement),this.toolbarController.delegate=this,this.editor=new $d(this.composition,this.selectionManager,this.editorElement),r?this.editor.loadDocument(r):this.editor.loadHTML(i)}registerSelectionManager(){return In.registerSelectionManager(this.selectionManager)}unregisterSelectionManager(){return In.unregisterSelectionManager(this.selectionManager)}render(){return this.compositionController.render()}reparse(){return this.composition.replaceHTML(this.editorElement.innerHTML)}compositionDidChangeDocument(t){if(this.notifyEditorElement("document-change"),!this.handlingInput)return this.render()}compositionDidChangeCurrentAttributes(t){return this.currentAttributes=t,this.toolbarController.updateAttributes(this.currentAttributes),this.updateCurrentActions(),this.notifyEditorElement("attributes-change",{attributes:this.currentAttributes})}compositionDidPerformInsertionAtRange(t){this.pasting&&(this.pastedRange=t)}compositionShouldAcceptFile(t){return this.notifyEditorElement("file-accept",{file:t})}compositionDidAddAttachment(t){const n=this.attachmentManager.manageAttachment(t);return this.notifyEditorElement("attachment-add",{attachment:n})}compositionDidEditAttachment(t){this.compositionController.rerenderViewForObject(t);const n=this.attachmentManager.manageAttachment(t);return this.notifyEditorElement("attachment-edit",{attachment:n}),this.notifyEditorElement("change")}compositionDidChangeAttachmentPreviewURL(t){return this.compositionController.invalidateViewForObject(t),this.notifyEditorElement("change")}compositionDidRemoveAttachment(t){const n=this.attachmentManager.unmanageAttachment(t);return this.notifyEditorElement("attachment-remove",{attachment:n})}compositionDidStartEditingAttachment(t,n){return this.attachmentLocationRange=this.composition.document.getLocationRangeOfAttachment(t),this.compositionController.installAttachmentEditorForAttachment(t,n),this.selectionManager.setLocationRange(this.attachmentLocationRange)}compositionDidStopEditingAttachment(t){this.compositionController.uninstallAttachmentEditor(),this.attachmentLocationRange=null}compositionDidRequestChangingSelectionToLocationRange(t){if(!this.loadingSnapshot||this.isFocused())return this.requestedLocationRange=t,this.compositionRevisionWhenLocationRangeRequested=this.composition.revision,this.handlingInput?void 0:this.render()}compositionWillLoadSnapshot(){this.loadingSnapshot=!0}compositionDidLoadSnapshot(){this.compositionController.refreshViewCache(),this.render(),this.loadingSnapshot=!1}getSelectionManager(){return this.selectionManager}attachmentManagerDidRequestRemovalOfAttachment(t){return this.removeAttachment(t)}compositionControllerWillSyncDocumentView(){return this.inputController.editorWillSyncDocumentView(),this.selectionManager.lock(),this.selectionManager.clearSelection()}compositionControllerDidSyncDocumentView(){return this.inputController.editorDidSyncDocumentView(),this.selectionManager.unlock(),this.updateCurrentActions(),this.notifyEditorElement("sync")}compositionControllerDidRender(){this.requestedLocationRange&&(this.compositionRevisionWhenLocationRangeRequested===this.composition.revision&&this.selectionManager.setLocationRange(this.requestedLocationRange),this.requestedLocationRange=null,this.compositionRevisionWhenLocationRangeRequested=null),this.renderedCompositionRevision!==this.composition.revision&&(this.runEditorFilters(),this.composition.updateCurrentAttributes(),this.notifyEditorElement("render")),this.renderedCompositionRevision=this.composition.revision}compositionControllerDidFocus(){return this.isFocusedInvisibly()&&this.setLocationRange({index:0,offset:0}),this.toolbarController.hideDialog(),this.notifyEditorElement("focus")}compositionControllerDidBlur(){return this.notifyEditorElement("blur")}compositionControllerDidSelectAttachment(t,n){return this.toolbarController.hideDialog(),this.composition.editAttachment(t,n)}compositionControllerDidRequestDeselectingAttachment(t){const n=this.attachmentLocationRange||this.composition.document.getLocationRangeOfAttachment(t);return this.selectionManager.setLocationRange(n[1])}compositionControllerWillUpdateAttachment(t){return this.editor.recordUndoEntry("Edit Attachment",{context:t.id,consolidatable:!0})}compositionControllerDidRequestRemovalOfAttachment(t){return this.removeAttachment(t)}inputControllerWillHandleInput(){this.handlingInput=!0,this.requestedRender=!1}inputControllerDidRequestRender(){this.requestedRender=!0}inputControllerDidHandleInput(){if(this.handlingInput=!1,this.requestedRender)return this.requestedRender=!1,this.render()}inputControllerDidAllowUnhandledInput(){return this.notifyEditorElement("change")}inputControllerDidRequestReparse(){return this.reparse()}inputControllerWillPerformTyping(){return this.recordTypingUndoEntry()}inputControllerWillPerformFormatting(t){return this.recordFormattingUndoEntry(t)}inputControllerWillCutText(){return this.editor.recordUndoEntry("Cut")}inputControllerWillPaste(t){return this.editor.recordUndoEntry("Paste"),this.pasting=!0,this.notifyEditorElement("before-paste",{paste:t})}inputControllerDidPaste(t){return t.range=this.pastedRange,this.pastedRange=null,this.pasting=null,this.notifyEditorElement("paste",{paste:t})}inputControllerWillMoveText(){return this.editor.recordUndoEntry("Move")}inputControllerWillAttachFiles(){return this.editor.recordUndoEntry("Drop Files")}inputControllerWillPerformUndo(){return this.editor.undo()}inputControllerWillPerformRedo(){return this.editor.redo()}inputControllerDidReceiveKeyboardCommand(t){return this.toolbarController.applyKeyboardCommand(t)}inputControllerDidStartDrag(){this.locationRangeBeforeDrag=this.selectionManager.getLocationRange()}inputControllerDidReceiveDragOverPoint(t){return this.selectionManager.setLocationRangeFromPointRange(t)}inputControllerDidCancelDrag(){this.selectionManager.setLocationRange(this.locationRangeBeforeDrag),this.locationRangeBeforeDrag=null}locationRangeDidChange(t){return this.composition.updateCurrentAttributes(),this.updateCurrentActions(),this.attachmentLocationRange&&!Pr(this.attachmentLocationRange,t)&&this.composition.stopEditingAttachment(),this.notifyEditorElement("selection-change")}toolbarDidClickButton(){if(!this.getLocationRange())return this.setLocationRange({index:0,offset:0})}toolbarDidInvokeAction(t,n){return this.invokeAction(t,n)}toolbarDidToggleAttribute(t){if(this.recordFormattingUndoEntry(t),this.composition.toggleCurrentAttribute(t),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarDidUpdateAttribute(t,n){if(this.recordFormattingUndoEntry(t),this.composition.setCurrentAttribute(t,n),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarDidRemoveAttribute(t){if(this.recordFormattingUndoEntry(t),this.composition.removeCurrentAttribute(t),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarWillShowDialog(t){return this.composition.expandSelectionForEditing(),this.freezeSelection()}toolbarDidShowDialog(t){return this.notifyEditorElement("toolbar-dialog-show",{dialogName:t})}toolbarDidHideDialog(t){return this.thawSelection(),this.editorElement.focus(),this.notifyEditorElement("toolbar-dialog-hide",{dialogName:t})}freezeSelection(){if(!this.selectionFrozen)return this.selectionManager.lock(),this.composition.freezeSelection(),this.selectionFrozen=!0,this.render()}thawSelection(){if(this.selectionFrozen)return this.composition.thawSelection(),this.selectionManager.unlock(),this.selectionFrozen=!1,this.render()}canInvokeAction(t){return!!this.actionIsExternal(t)||!((n=this.actions[t])===null||n===void 0||(n=n.test)===null||n===void 0||!n.call(this));var n}invokeAction(t,n){return this.actionIsExternal(t)?this.notifyEditorElement("action-invoke",{actionName:t,invokingElement:n}):(r=this.actions[t])===null||r===void 0||(r=r.perform)===null||r===void 0?void 0:r.call(this);var r}actionIsExternal(t){return/^x-./.test(t)}getCurrentActions(){const t={};for(const n in this.actions)t[n]=this.canInvokeAction(n);return t}updateCurrentActions(){const t=this.getCurrentActions();if(!Vn(t,this.currentActions))return this.currentActions=t,this.toolbarController.updateActions(this.currentActions),this.notifyEditorElement("actions-change",{actions:this.currentActions})}runEditorFilters(){let t=this.composition.getSnapshot();if(Array.from(this.editor.filters).forEach((i=>{const{document:l,selectedRange:a}=t;t=i.call(this.editor,t)||{},t.document||(t.document=l),t.selectedRange||(t.selectedRange=a)})),n=t,r=this.composition.getSnapshot(),!Pr(n.selectedRange,r.selectedRange)||!n.document.isEqualTo(r.document))return this.composition.loadSnapshot(t);var n,r}updateInputElement(){const t=(function(n,r){const i=r1[r];if(i)return i(n);throw new Error("unknown content type: ".concat(r))})(this.compositionController.getSerializableElement(),"text/html");return this.editorElement.setFormValue(t)}notifyEditorElement(t,n){switch(t){case"document-change":this.documentChangedSinceLastRender=!0;break;case"render":this.documentChangedSinceLastRender&&(this.documentChangedSinceLastRender=!1,this.notifyEditorElement("change"));break;case"change":case"attachment-add":case"attachment-edit":case"attachment-remove":this.updateInputElement()}return this.editorElement.notify(t,n)}removeAttachment(t){return this.editor.recordUndoEntry("Delete Attachment"),this.composition.removeAttachment(t),this.render()}recordFormattingUndoEntry(t){const n=Xe(t),r=this.selectionManager.getLocationRange();if(n||!nn(r))return this.editor.recordUndoEntry("Formatting",{context:this.getUndoContext(),consolidatable:!0})}recordTypingUndoEntry(){return this.editor.recordUndoEntry("Typing",{context:this.getUndoContext(this.currentAttributes),consolidatable:!0})}getUndoContext(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return[this.getLocationContext(),this.getTimeContext(),...Array.from(n)]}getLocationContext(){const t=this.selectionManager.getLocationRange();return nn(t)?t[0].index:t}getTimeContext(){return Pi.interval>0?Math.floor(new Date().getTime()/Pi.interval):0}isFocused(){var t;return this.editorElement===((t=this.editorElement.ownerDocument)===null||t===void 0?void 0:t.activeElement)}isFocusedInvisibly(){return this.isFocused()&&!this.getLocationRange()}get actions(){return this.constructor.actions}}ht(cr,"actions",{undo:{test(){return this.editor.canUndo()},perform(){return this.editor.undo()}},redo:{test(){return this.editor.canRedo()},perform(){return this.editor.redo()}},link:{test(){return this.editor.canActivateAttribute("href")}},increaseNestingLevel:{test(){return this.editor.canIncreaseNestingLevel()},perform(){return this.editor.increaseNestingLevel()&&this.render()}},decreaseNestingLevel:{test(){return this.editor.canDecreaseNestingLevel()},perform(){return this.editor.decreaseNestingLevel()&&this.render()}},attachFiles:{test:()=>!0,perform(){return pl.pickFiles(this.editor.insertFiles)}}}),cr.proxyMethod("getSelectionManager().setLocationRange"),cr.proxyMethod("getSelectionManager().getLocationRange");var R1=Object.freeze({__proto__:null,AttachmentEditorController:Hd,CompositionController:Ud,Controller:jd,EditorController:cr,InputController:ii,Level0InputController:tn,Level2InputController:ur,ToolbarController:Kd}),I1=Object.freeze({__proto__:null,MutationObserver:Vd,SelectionChangeObserver:gd}),B1=Object.freeze({__proto__:null,FileVerificationOperation:_d,ImagePreloadOperation:Td});cd("trix-toolbar",`%t {
5980
5988
  display: block;
5981
5989
  }
5982
5990
 
@@ -5994,7 +6002,7 @@ span.flatpickr-day.selected {
5994
6002
 
5995
6003
  %t [data-trix-dialog] [data-trix-validate]:invalid {
5996
6004
  background-color: #ffdddd;
5997
- }`);class Gd extends HTMLElement{connectedCallback(){this.innerHTML===""&&(this.innerHTML=ud.getDefaultHTML())}}let B1=0;const M1=function(e){if(!e.hasAttribute("contenteditable"))return e.setAttribute("contenteditable",""),function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n.times=1,_e(t,n)}("focus",{onElement:e,withCallback:()=>D1(e)})},D1=function(e){return O1(e),$1()},O1=function(e){var t,n;if((t=(n=document).queryCommandSupported)!==null&&t!==void 0&&t.call(n,"enableObjectResizing"))return document.execCommand("enableObjectResizing",!1,!1),_e("mscontrolselect",{onElement:e,preventDefault:!0})},$1=function(e){var t,n;if((t=(n=document).queryCommandSupported)!==null&&t!==void 0&&t.call(n,"DefaultParagraphSeparator")){const{tagName:r}=mt.default;if(["div","p"].includes(r))return document.execCommand("DefaultParagraphSeparator",!1,r)}},wo=yr.forcesObjectResizing?{display:"inline",width:"auto"}:{display:"inline-block",width:"1px"};cd("trix-editor",`%t {
6005
+ }`);class Gd extends HTMLElement{connectedCallback(){this.innerHTML===""&&(this.innerHTML=ud.getDefaultHTML())}}let M1=0;const D1=function(e){if(!e.hasAttribute("contenteditable"))return e.setAttribute("contenteditable",""),(function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n.times=1,_e(t,n)})("focus",{onElement:e,withCallback:()=>O1(e)})},O1=function(e){return $1(e),F1()},$1=function(e){var t,n;if((t=(n=document).queryCommandSupported)!==null&&t!==void 0&&t.call(n,"enableObjectResizing"))return document.execCommand("enableObjectResizing",!1,!1),_e("mscontrolselect",{onElement:e,preventDefault:!0})},F1=function(e){var t,n;if((t=(n=document).queryCommandSupported)!==null&&t!==void 0&&t.call(n,"DefaultParagraphSeparator")){const{tagName:r}=mt.default;if(["div","p"].includes(r))return document.execCommand("DefaultParagraphSeparator",!1,r)}},wo=yr.forcesObjectResizing?{display:"inline",width:"auto"}:{display:"inline-block",width:"1px"};cd("trix-editor",`%t {
5998
6006
  display: block;
5999
6007
  }
6000
6008
 
@@ -6046,7 +6054,7 @@ span.flatpickr-day.selected {
6046
6054
  %t [data-trix-cursor-target=right] {
6047
6055
  vertical-align: bottom !important;
6048
6056
  margin-right: -1px !important;
6049
- }`));var en=new WeakMap,tr=new WeakSet;class F1{constructor(t){var n,r;Sd(n=this,r=tr),r.add(n),dr(this,en,{writable:!0,value:void 0}),this.element=t,wl(this,en,t.attachInternals())}connectedCallback(){xr(this,tr,Sr).call(this)}disconnectedCallback(){}get labels(){return Ne(this,en).labels}get disabled(){var t;return(t=this.element.inputElement)===null||t===void 0?void 0:t.disabled}set disabled(t){this.element.toggleAttribute("disabled",t)}get required(){return this.element.hasAttribute("required")}set required(t){this.element.toggleAttribute("required",t),xr(this,tr,Sr).call(this)}get validity(){return Ne(this,en).validity}get validationMessage(){return Ne(this,en).validationMessage}get willValidate(){return Ne(this,en).willValidate}setFormValue(t){xr(this,tr,Sr).call(this)}checkValidity(){return Ne(this,en).checkValidity()}reportValidity(){return Ne(this,en).reportValidity()}setCustomValidity(t){xr(this,tr,Sr).call(this,t)}}function Sr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";const{required:t,value:n}=this.element,r=t&&!n,i=!!e,l=ke("input",{required:t}),a=e||l.validationMessage;Ne(this,en).setValidity({valueMissing:r,customError:i},a)}var Bi=new WeakMap,Mi=new WeakMap,Di=new WeakMap;class z1{constructor(t){dr(this,Bi,{writable:!0,value:void 0}),dr(this,Mi,{writable:!0,value:n=>{n.defaultPrevented||n.target===this.element.form&&this.element.reset()}}),dr(this,Di,{writable:!0,value:n=>{if(n.defaultPrevented||this.element.contains(n.target))return;const r=gn(n.target,{matchingSelector:"label"});r&&Array.from(this.labels).includes(r)&&this.element.focus()}}),this.element=t}connectedCallback(){wl(this,Bi,function(t){if(t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby"))return;const n=function(){const r=Array.from(t.labels).map(l=>{if(!l.contains(t))return l.textContent}).filter(l=>l),i=r.join(" ");return i?t.setAttribute("aria-label",i):t.removeAttribute("aria-label")};return n(),_e("focus",{onElement:t,withCallback:n})}(this.element)),window.addEventListener("reset",Ne(this,Mi),!1),window.addEventListener("click",Ne(this,Di),!1)}disconnectedCallback(){var t;(t=Ne(this,Bi))===null||t===void 0||t.destroy(),window.removeEventListener("reset",Ne(this,Mi),!1),window.removeEventListener("click",Ne(this,Di),!1)}get labels(){const t=[];this.element.id&&this.element.ownerDocument&&t.push(...Array.from(this.element.ownerDocument.querySelectorAll("label[for='".concat(this.element.id,"']"))||[]));const n=gn(this.element,{matchingSelector:"label"});return n&&[this.element,null].includes(n.control)&&t.push(n),t}get disabled(){return!1}set disabled(t){}get required(){return!1}set required(t){}get validity(){return null}get validationMessage(){return""}get willValidate(){return!1}setFormValue(t){}checkValidity(){return!0}reportValidity(){return!0}setCustomValidity(t){}}var st=new WeakMap;class jr extends HTMLElement{constructor(){super(),dr(this,st,{writable:!0,value:void 0}),wl(this,st,this.constructor.formAssociated?new F1(this):new z1(this))}get trixId(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++B1),this.trixId)}get labels(){return Ne(this,st).labels}get disabled(){return Ne(this,st).disabled}set disabled(t){Ne(this,st).disabled=t}get required(){return Ne(this,st).required}set required(t){Ne(this,st).required=t}get validity(){return Ne(this,st).validity}get validationMessage(){return Ne(this,st).validationMessage}get willValidate(){return Ne(this,st).willValidate}get type(){return this.localName}get toolbarElement(){var t;if(this.hasAttribute("toolbar"))return(t=this.ownerDocument)===null||t===void 0?void 0:t.getElementById(this.getAttribute("toolbar"));if(this.parentNode){const n="trix-toolbar-".concat(this.trixId);return this.setAttribute("toolbar",n),this.internalToolbar=ke("trix-toolbar",{id:n}),this.parentNode.insertBefore(this.internalToolbar,this),this.internalToolbar}}get form(){var t;return(t=this.inputElement)===null||t===void 0?void 0:t.form}get inputElement(){var t;if(this.hasAttribute("input"))return(t=this.ownerDocument)===null||t===void 0?void 0:t.getElementById(this.getAttribute("input"));if(this.parentNode){const n="trix-input-".concat(this.trixId);this.setAttribute("input",n);const r=ke("input",{type:"hidden",id:n});return this.parentNode.insertBefore(r,this.nextElementSibling),r}}get editor(){var t;return(t=this.editorController)===null||t===void 0?void 0:t.editor}get name(){var t;return(t=this.inputElement)===null||t===void 0?void 0:t.name}get value(){var t;return(t=this.inputElement)===null||t===void 0?void 0:t.value}set value(t){var n;this.defaultValue=t,(n=this.editor)===null||n===void 0||n.loadHTML(this.defaultValue)}attributeChangedCallback(t,n,r){t==="connected"&&this.isConnected&&n!=null&&n!==r&&requestAnimationFrame(()=>this.reconnect())}notify(t,n){if(this.editorController)return ar("trix-".concat(t),{onElement:this,attributes:n})}setFormValue(t){this.inputElement&&(this.inputElement.value=t,Ne(this,st).setFormValue(t))}connectedCallback(){this.hasAttribute("data-trix-internal")||(M1(this),function(t){t.hasAttribute("role")||t.setAttribute("role","textbox")}(this),this.editorController||(ar("trix-before-initialize",{onElement:this}),this.editorController=new cr({editorElement:this,html:this.defaultValue=this.value}),requestAnimationFrame(()=>ar("trix-initialize",{onElement:this}))),this.editorController.registerSelectionManager(),Ne(this,st).connectedCallback(),this.toggleAttribute("connected",!0),function(t){!document.querySelector(":focus")&&t.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===t&&t.focus()}(this))}disconnectedCallback(){var t;(t=this.editorController)===null||t===void 0||t.unregisterSelectionManager(),Ne(this,st).disconnectedCallback(),this.toggleAttribute("connected",!1)}reconnect(){this.removeInternalToolbar(),this.disconnectedCallback(),this.connectedCallback()}removeInternalToolbar(){var t;(t=this.internalToolbar)===null||t===void 0||t.remove(),this.internalToolbar=null}checkValidity(){return Ne(this,st).checkValidity()}reportValidity(){return Ne(this,st).reportValidity()}setCustomValidity(t){Ne(this,st).setCustomValidity(t)}formDisabledCallback(t){this.inputElement&&(this.inputElement.disabled=t),this.toggleAttribute("contenteditable",!t)}formResetCallback(){this.reset()}reset(){this.value=this.defaultValue}}ht(jr,"formAssociated","ElementInternals"in window),ht(jr,"observedAttributes",["connected"]);const Wr={VERSION:Ph,config:kr,core:r1,models:Nd,views:s1,controllers:T1,observers:R1,operations:I1,elements:Object.freeze({__proto__:null,TrixEditorElement:jr,TrixToolbarElement:Gd}),filters:Object.freeze({__proto__:null,Filter:Dd,attachmentGalleryFilter:Od})};Object.assign(Wr,Nd),window.Trix=Wr,setTimeout(function(){customElements.get("trix-toolbar")||customElements.define("trix-toolbar",Gd),customElements.get("trix-editor")||customElements.define("trix-editor",jr)},0);typeof Wr?.elements?.TrixEditorElement?.formAssociated<"u"&&(Wr.elements.TrixEditorElement.formAssociated=!1);var kl={};const P1=["id","value"];function N1(e,t,n,r,i,l){const a=se("trix-editor");return d(),h("div",{class:p(e.classes.container)},[w("input",{id:`editor-input-${e.id}`,value:e.value,type:"hidden"},null,8,P1),xe(a,q(e.options,{onTrixChange:e.handleChange,onTrixBlur:e.handleBlur,onTrixFileAccept:e.handleFileAccept,onTrixAttachmentAdd:e.handleAttachmentAdd,ref:"trix$"}),null,16,["onTrixChange","onTrixBlur","onTrixFileAccept","onTrixAttachmentAdd"])],2)}kl.render=N1;kl.__file="themes/blank/templates/wrappers/EditorWrapper.vue";var Jd={name:"EditorWrapper",render:kl.render,data(){return{merge:!0,defaultClasses:{container:"",container_hideBold:"vf-editor-hide-bold",container_hideItalic:"vf-editor-hide-italic",container_hideStrike:"vf-editor-hide-strike",container_hideLink:"vf-editor-hide-link",container_hideHeading:"vf-editor-hide-heading",container_hideQuote:"vf-editor-hide-quote",container_hideCode:"vf-editor-hide-code",container_hideBulletList:"vf-editor-hide-bullet-list",container_hideNumberList:"vf-editor-hide-number-list",container_hideDecreaseNesting:"vf-editor-hide-decrease-nesting",container_hideIncreaseNesting:"vf-editor-hide-increase-nesting",container_hideAttach:"vf-editor-hide-attach",container_hideUndo:"vf-editor-hide-undo",container_hideRedo:"vf-editor-hide-redo",$container:(e,{hideTools:t})=>[e.container].concat(t.map(n=>e[`container_hide${n.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}`]))}}}},H1=`@charset "UTF-8";
6057
+ }`));var en=new WeakMap,tr=new WeakSet;class z1{constructor(t){var n,r;Sd(n=this,r=tr),r.add(n),dr(this,en,{writable:!0,value:void 0}),this.element=t,wl(this,en,t.attachInternals())}connectedCallback(){xr(this,tr,Sr).call(this)}disconnectedCallback(){}get labels(){return Ne(this,en).labels}get disabled(){var t;return(t=this.element.inputElement)===null||t===void 0?void 0:t.disabled}set disabled(t){this.element.toggleAttribute("disabled",t)}get required(){return this.element.hasAttribute("required")}set required(t){this.element.toggleAttribute("required",t),xr(this,tr,Sr).call(this)}get validity(){return Ne(this,en).validity}get validationMessage(){return Ne(this,en).validationMessage}get willValidate(){return Ne(this,en).willValidate}setFormValue(t){xr(this,tr,Sr).call(this)}checkValidity(){return Ne(this,en).checkValidity()}reportValidity(){return Ne(this,en).reportValidity()}setCustomValidity(t){xr(this,tr,Sr).call(this,t)}}function Sr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";const{required:t,value:n}=this.element,r=t&&!n,i=!!e,l=ke("input",{required:t}),a=e||l.validationMessage;Ne(this,en).setValidity({valueMissing:r,customError:i},a)}var Bi=new WeakMap,Mi=new WeakMap,Di=new WeakMap;class P1{constructor(t){dr(this,Bi,{writable:!0,value:void 0}),dr(this,Mi,{writable:!0,value:n=>{n.defaultPrevented||n.target===this.element.form&&this.element.reset()}}),dr(this,Di,{writable:!0,value:n=>{if(n.defaultPrevented||this.element.contains(n.target))return;const r=gn(n.target,{matchingSelector:"label"});r&&Array.from(this.labels).includes(r)&&this.element.focus()}}),this.element=t}connectedCallback(){wl(this,Bi,(function(t){if(t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby"))return;const n=function(){const r=Array.from(t.labels).map((l=>{if(!l.contains(t))return l.textContent})).filter((l=>l)),i=r.join(" ");return i?t.setAttribute("aria-label",i):t.removeAttribute("aria-label")};return n(),_e("focus",{onElement:t,withCallback:n})})(this.element)),window.addEventListener("reset",Ne(this,Mi),!1),window.addEventListener("click",Ne(this,Di),!1)}disconnectedCallback(){var t;(t=Ne(this,Bi))===null||t===void 0||t.destroy(),window.removeEventListener("reset",Ne(this,Mi),!1),window.removeEventListener("click",Ne(this,Di),!1)}get labels(){const t=[];this.element.id&&this.element.ownerDocument&&t.push(...Array.from(this.element.ownerDocument.querySelectorAll("label[for='".concat(this.element.id,"']"))||[]));const n=gn(this.element,{matchingSelector:"label"});return n&&[this.element,null].includes(n.control)&&t.push(n),t}get disabled(){return!1}set disabled(t){}get required(){return!1}set required(t){}get validity(){return null}get validationMessage(){return""}get willValidate(){return!1}setFormValue(t){}checkValidity(){return!0}reportValidity(){return!0}setCustomValidity(t){}}var st=new WeakMap;class jr extends HTMLElement{constructor(){super(),dr(this,st,{writable:!0,value:void 0}),wl(this,st,this.constructor.formAssociated?new z1(this):new P1(this))}get trixId(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++M1),this.trixId)}get labels(){return Ne(this,st).labels}get disabled(){return Ne(this,st).disabled}set disabled(t){Ne(this,st).disabled=t}get required(){return Ne(this,st).required}set required(t){Ne(this,st).required=t}get validity(){return Ne(this,st).validity}get validationMessage(){return Ne(this,st).validationMessage}get willValidate(){return Ne(this,st).willValidate}get type(){return this.localName}get toolbarElement(){var t;if(this.hasAttribute("toolbar"))return(t=this.ownerDocument)===null||t===void 0?void 0:t.getElementById(this.getAttribute("toolbar"));if(this.parentNode){const n="trix-toolbar-".concat(this.trixId);return this.setAttribute("toolbar",n),this.internalToolbar=ke("trix-toolbar",{id:n}),this.parentNode.insertBefore(this.internalToolbar,this),this.internalToolbar}}get form(){var t;return(t=this.inputElement)===null||t===void 0?void 0:t.form}get inputElement(){var t;if(this.hasAttribute("input"))return(t=this.ownerDocument)===null||t===void 0?void 0:t.getElementById(this.getAttribute("input"));if(this.parentNode){const n="trix-input-".concat(this.trixId);this.setAttribute("input",n);const r=ke("input",{type:"hidden",id:n});return this.parentNode.insertBefore(r,this.nextElementSibling),r}}get editor(){var t;return(t=this.editorController)===null||t===void 0?void 0:t.editor}get name(){var t;return(t=this.inputElement)===null||t===void 0?void 0:t.name}get value(){var t;return(t=this.inputElement)===null||t===void 0?void 0:t.value}set value(t){var n;this.defaultValue=t,(n=this.editor)===null||n===void 0||n.loadHTML(this.defaultValue)}attributeChangedCallback(t,n,r){t==="connected"&&this.isConnected&&n!=null&&n!==r&&requestAnimationFrame((()=>this.reconnect()))}notify(t,n){if(this.editorController)return ar("trix-".concat(t),{onElement:this,attributes:n})}setFormValue(t){this.inputElement&&(this.inputElement.value=t,Ne(this,st).setFormValue(t))}connectedCallback(){this.hasAttribute("data-trix-internal")||(D1(this),(function(t){t.hasAttribute("role")||t.setAttribute("role","textbox")})(this),this.editorController||(ar("trix-before-initialize",{onElement:this}),this.editorController=new cr({editorElement:this,html:this.defaultValue=this.value}),requestAnimationFrame((()=>ar("trix-initialize",{onElement:this})))),this.editorController.registerSelectionManager(),Ne(this,st).connectedCallback(),this.toggleAttribute("connected",!0),(function(t){!document.querySelector(":focus")&&t.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===t&&t.focus()})(this))}disconnectedCallback(){var t;(t=this.editorController)===null||t===void 0||t.unregisterSelectionManager(),Ne(this,st).disconnectedCallback(),this.toggleAttribute("connected",!1)}reconnect(){this.removeInternalToolbar(),this.disconnectedCallback(),this.connectedCallback()}removeInternalToolbar(){var t;(t=this.internalToolbar)===null||t===void 0||t.remove(),this.internalToolbar=null}checkValidity(){return Ne(this,st).checkValidity()}reportValidity(){return Ne(this,st).reportValidity()}setCustomValidity(t){Ne(this,st).setCustomValidity(t)}formDisabledCallback(t){this.inputElement&&(this.inputElement.disabled=t),this.toggleAttribute("contenteditable",!t)}formResetCallback(){this.reset()}reset(){this.value=this.defaultValue}}ht(jr,"formAssociated","ElementInternals"in window),ht(jr,"observedAttributes",["connected"]);const Wr={VERSION:Nh,config:kr,core:i1,models:Nd,views:d1,controllers:R1,observers:I1,operations:B1,elements:Object.freeze({__proto__:null,TrixEditorElement:jr,TrixToolbarElement:Gd}),filters:Object.freeze({__proto__:null,Filter:Dd,attachmentGalleryFilter:Od})};Object.assign(Wr,Nd),window.Trix=Wr,setTimeout((function(){customElements.get("trix-toolbar")||customElements.define("trix-toolbar",Gd),customElements.get("trix-editor")||customElements.define("trix-editor",jr)}),0);typeof Wr?.elements?.TrixEditorElement?.formAssociated<"u"&&(Wr.elements.TrixEditorElement.formAssociated=!1);var kl={};const N1=["id","value"];function H1(e,t,n,r,i,l){const a=se("trix-editor");return d(),h("div",{class:p(e.classes.container)},[w("input",{id:`editor-input-${e.id}`,value:e.value,type:"hidden"},null,8,N1),xe(a,q(e.options,{onTrixChange:e.handleChange,onTrixBlur:e.handleBlur,onTrixFileAccept:e.handleFileAccept,onTrixAttachmentAdd:e.handleAttachmentAdd,ref:"trix$"}),null,16,["onTrixChange","onTrixBlur","onTrixFileAccept","onTrixAttachmentAdd"])],2)}kl.render=H1;kl.__file="themes/blank/templates/wrappers/EditorWrapper.vue";var Jd={name:"EditorWrapper",render:kl.render,data(){return{merge:!0,defaultClasses:{container:"",container_hideBold:"vf-editor-hide-bold",container_hideItalic:"vf-editor-hide-italic",container_hideStrike:"vf-editor-hide-strike",container_hideLink:"vf-editor-hide-link",container_hideHeading:"vf-editor-hide-heading",container_hideQuote:"vf-editor-hide-quote",container_hideCode:"vf-editor-hide-code",container_hideBulletList:"vf-editor-hide-bullet-list",container_hideNumberList:"vf-editor-hide-number-list",container_hideDecreaseNesting:"vf-editor-hide-decrease-nesting",container_hideIncreaseNesting:"vf-editor-hide-increase-nesting",container_hideAttach:"vf-editor-hide-attach",container_hideUndo:"vf-editor-hide-undo",container_hideRedo:"vf-editor-hide-redo",$container:(e,{hideTools:t})=>[e.container].concat(t.map(n=>e[`container_hide${n.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}`]))}}}},U1=`@charset "UTF-8";
6050
6058
 
6051
6059
  trix-toolbar {
6052
6060
  padding: 0.5rem 0.375rem;
@@ -6756,4 +6764,4 @@ trix-editor .attachment__caption .attachment__name + .attachment__size::before {
6756
6764
  .dark .trix-content pre,
6757
6765
  .dark trix-editor pre {
6758
6766
  background-color: var(--vf-dark-900);
6759
- }`;Y(H1);Jd.__file="themes/vueform/templates/wrappers/EditorWrapper.vue";function U1(e,t){switch(e){case"default":return"vf-col-".concat(t);default:return"vf-col-".concat(e,"-").concat(t)}}var j1={},W1={"matrix-table":{addClasses:{MatrixElement:{container:"vf-matrix-table",cellWrapper_stretch:"is-stretch"}},overrideClasses:{MatrixElement:{$cellWrapper:(e,t)=>{var{padding:n,centered:r,cells$:i}=t;return(l,a)=>{var o,s,u=["radio","checkbox","toggle"].includes(l);return[e.cellWrapper,n?e.cellWrapper_padding:null,u?e.cellWrapper_centered:null,u?null:e.cellWrapper_stretch,(o=i[a])!==null&&o!==void 0&&o.error?e.cellWrapper_error:null,(s=i[a])!==null&&s!==void 0&&s.isSuccess?e.cellWrapper_success:null]}}}}},"grid-table":{addClasses:{GridElement:{container:"vf-grid-table"},ToggleElement:{wrapper_sm:"vf-toggle-wrapper-sm",wrapper_md:"",wrapper_lg:"vf-toggle-wrapper-lg"}},overrideClasses:{GridElement:{$cell:(e,t)=>{var{colHeader:n,rowHeader:r}=t;return i=>{var{colStart:l,rowStart:a}=i;return[e.cell,r&&l===0||n&&a===0?"form-bg-table-header form-color-table-header":null]}}},ToggleElement:{$wrapper:(e,t)=>{var{align:n,Size:r}=t;return[e.wrapper,e["wrapper_".concat(r)],n==="left"?e.wrapper_left:null,n==="right"?e.wrapper_right:null]}}}}},V1={templates:{Vueform:Ao,FormErrors:Eo,FormMessages:Lo,FormLanguages:xo,FormLanguage:So,FormTabs:To,FormTab:Ro,FormSteps:Io,FormStepsControls:Bo,FormStepsControl:Mo,FormStep:Do,FormElements:Oo,ElementLayout:$o,ElementLayoutInline:Fo,ElementLoader:zo,ElementLabelFloating:Po,ElementLabel:No,ElementInfo:Ho,ElementDescription:Uo,ElementError:jo,ElementMessage:Wo,ElementRequired:Vo,ElementText:_o,ElementAddon:Qo,ElementAddonOptions:qo,ButtonElement:Ko,CaptchaElement:Go,CheckboxElement:Jo,CheckboxgroupElement:Yo,CheckboxgroupElement_tabs:Xo,CheckboxgroupElement_blocks:Zo,DateElement:es,DatesElement:ns,FileElement:rs,GridElement:is,GroupElement:as,HiddenElement:ls,ListElement:os,LocationElement:ss,MatrixElement:ds,MultifileElement:us,MultiselectElement:ws,ObjectElement:ys,PhoneElement:ks,RadioElement:Cs,RadiogroupElement:As,RadiogroupElement_tabs:Es,RadiogroupElement_blocks:Ls,SelectElement:xs,SignatureElement:Ss,SliderElement:$s,StaticElement:Fs,TagsElement:zs,TextareaElement:Ps,TextElement:Ns,ToggleElement:Hs,EditorElement:Us,TTextareaElement:Ws,TTextElement:_s,TEditorElement:qs,CheckboxgroupCheckbox:Ks,CheckboxgroupCheckbox_tabs:Gs,CheckboxgroupCheckbox_blocks:Js,DragAndDrop:Ys,FilePreview:Xs,FilePreview_image:Zs,FilePreview_gallery:ed,RadiogroupRadio:td,RadiogroupRadio_tabs:nd,RadiogroupRadio_blocks:rd,DatepickerWrapper:id,EditorWrapper:Jd},classes:j1,columns:U1,presets:W1};function _1(e){return ru(e,lu({theme:V1,locales:{en:ou},locale:"en"}))}function Q1(e){const t=iu().public.ignis;return t.preset.forms==="vueform"||t.vueform===!0?_1(e):(au.warn("loadVueformConfig: Vueform is not enabled, settings will take no effect"),{})}const G1=Q1({});export{G1 as default};
6767
+ }`;Y(U1);Jd.__file="themes/vueform/templates/wrappers/EditorWrapper.vue";function j1(e,t){switch(e){case"default":return"vf-col-".concat(t);default:return"vf-col-".concat(e,"-").concat(t)}}var W1={},V1={"matrix-table":{addClasses:{MatrixElement:{container:"vf-matrix-table",cellWrapper_stretch:"is-stretch"}},overrideClasses:{MatrixElement:{$cellWrapper:(e,t)=>{var{padding:n,centered:r,cells$:i}=t;return(l,a)=>{var o,s,u=["radio","checkbox","toggle"].includes(l);return[e.cellWrapper,n?e.cellWrapper_padding:null,u?e.cellWrapper_centered:null,u?null:e.cellWrapper_stretch,(o=i[a])!==null&&o!==void 0&&o.error?e.cellWrapper_error:null,(s=i[a])!==null&&s!==void 0&&s.isSuccess?e.cellWrapper_success:null]}}}}},"grid-table":{addClasses:{GridElement:{container:"vf-grid-table"},ToggleElement:{wrapper_sm:"vf-toggle-wrapper-sm",wrapper_md:"",wrapper_lg:"vf-toggle-wrapper-lg"}},overrideClasses:{GridElement:{$cell:(e,t)=>{var{colHeader:n,rowHeader:r}=t;return i=>{var{colStart:l,rowStart:a}=i;return[e.cell,r&&l===0||n&&a===0?"form-bg-table-header form-color-table-header":null]}}},ToggleElement:{$wrapper:(e,t)=>{var{align:n,Size:r}=t;return[e.wrapper,e["wrapper_".concat(r)],n==="left"?e.wrapper_left:null,n==="right"?e.wrapper_right:null]}}}}},_1={templates:{Vueform:Ao,FormErrors:Eo,FormMessages:Lo,FormLanguages:xo,FormLanguage:So,FormTabs:To,FormTab:Ro,FormSteps:Io,FormStepsControls:Bo,FormStepsControl:Mo,FormStep:Do,FormElements:Oo,ElementLayout:$o,ElementLayoutInline:Fo,ElementLoader:zo,ElementLabelFloating:Po,ElementLabel:No,ElementInfo:Ho,ElementDescription:Uo,ElementError:jo,ElementMessage:Wo,ElementRequired:Vo,ElementText:_o,ElementAddon:Qo,ElementAddonOptions:qo,ButtonElement:Ko,CaptchaElement:Go,CheckboxElement:Jo,CheckboxgroupElement:Yo,CheckboxgroupElement_tabs:Xo,CheckboxgroupElement_blocks:Zo,DateElement:es,DatesElement:ns,FileElement:rs,GridElement:is,GroupElement:as,HiddenElement:ls,ListElement:os,LocationElement:ss,MatrixElement:ds,MultifileElement:us,MultiselectElement:ws,ObjectElement:ys,PhoneElement:ks,RadioElement:Cs,RadiogroupElement:As,RadiogroupElement_tabs:Es,RadiogroupElement_blocks:Ls,SelectElement:xs,SignatureElement:Ss,SliderElement:$s,StaticElement:Fs,TagsElement:zs,TextareaElement:Ps,TextElement:Ns,ToggleElement:Hs,EditorElement:Us,TTextareaElement:Ws,TTextElement:_s,TEditorElement:qs,CheckboxgroupCheckbox:Ks,CheckboxgroupCheckbox_tabs:Gs,CheckboxgroupCheckbox_blocks:Js,DragAndDrop:Ys,FilePreview:Xs,FilePreview_image:Zs,FilePreview_gallery:ed,RadiogroupRadio:td,RadiogroupRadio_tabs:nd,RadiogroupRadio_blocks:rd,DatepickerWrapper:id,EditorWrapper:Jd},classes:W1,columns:j1,presets:V1};function Q1(e){return ru(e,lu({theme:_1,locales:{en:ou},locale:"en"}))}function q1(e){const t=iu().public.ignis;return t.preset.forms==="vueform"||t.vueform===!0?Q1(e):(au.warn("loadVueformConfig: Vueform is not enabled, settings will take no effect"),{})}const J1=q1({});export{J1 as default};