slice-machine-ui 2.2.2-alpha.lg-nested-group-snippets.1 → 2.2.2-beta.1

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 (80) hide show
  1. package/out/404.html +1 -1
  2. package/out/_next/static/JGphUg6eFq0-W11Pa7cMU/_buildManifest.js +1 -0
  3. package/out/_next/static/chunks/18539003-eda642ad962ef598.js +22 -0
  4. package/out/_next/static/chunks/212-cbaa35389c0aacf1.js +1 -0
  5. package/out/_next/static/chunks/264-4bb6f3fb14863ef3.js +1 -0
  6. package/out/_next/static/chunks/465-47a6d2a5f66f521e.js +1 -0
  7. package/out/_next/static/chunks/574-6039c48fbc93b4a8.js +1 -0
  8. package/out/_next/static/chunks/{210-565d01ee9777d1a1.js → 66-d37d30551288858b.js} +2 -2
  9. package/out/_next/static/chunks/756-1e44fe84bedc262b.js +10 -0
  10. package/out/_next/static/chunks/816-68d4db26c0adab2e.js +1 -0
  11. package/out/_next/static/chunks/pages/_app-05ac13d573829b68.js +532 -0
  12. package/out/_next/static/chunks/pages/changelog-d309ea186a0e56bf.js +1 -0
  13. package/out/_next/static/chunks/pages/changes-1bb1a7b784a22151.js +1 -0
  14. package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-a6ff1618238b3510.js → [customTypeId]-74be2c0ac9c854c7.js} +1 -1
  15. package/out/_next/static/chunks/pages/index-785a0ab6e2a4fc27.js +1 -0
  16. package/out/_next/static/chunks/pages/labs-2e4f3a5f68e65b93.js +1 -0
  17. package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-c300f963db847451.js → [pageTypeId]-d35c87b9aaec445a.js} +1 -1
  18. package/out/_next/static/chunks/pages/settings-25eb02893ed871b7.js +1 -0
  19. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-b47a72d5e94bd946.js +1 -0
  20. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-996e20b9b295a912.js +1 -0
  21. package/out/_next/static/chunks/pages/slices-cc44eeccd58d23a9.js +1 -0
  22. package/out/_next/static/css/b3bb731ce567d63f.css +1 -0
  23. package/out/changelog.html +1 -1
  24. package/out/changes.html +1 -1
  25. package/out/custom-types/[customTypeId].html +1 -1
  26. package/out/custom-types.html +1 -1
  27. package/out/index.html +1 -1
  28. package/out/labs.html +1 -1
  29. package/out/page-types/[pageTypeId].html +1 -1
  30. package/out/settings.html +1 -1
  31. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  32. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  33. package/out/slices.html +1 -1
  34. package/package.json +7 -7
  35. package/src/legacy/components/ListItem/index.tsx +1 -1
  36. package/src/legacy/lib/builders/CustomTypeBuilder/TabZone/index.tsx +3 -21
  37. package/src/legacy/lib/builders/SliceBuilder/FieldZones/index.tsx +6 -23
  38. package/src/legacy/lib/builders/SliceBuilder/VariationsList/index.tsx +2 -4
  39. package/src/legacy/lib/builders/SliceBuilder/index.tsx +1 -1
  40. package/src/legacy/lib/builders/common/EditModal/index.jsx +1 -1
  41. package/src/legacy/lib/builders/common/Zone/Card/components/Hints/index.tsx +1 -8
  42. package/src/legacy/lib/builders/common/Zone/Card/components/NewField.tsx +1 -1
  43. package/src/legacy/lib/builders/common/Zone/Card/index.jsx +1 -3
  44. package/src/legacy/lib/builders/utils/index.ts +0 -8
  45. package/src/legacy/lib/models/common/Group.ts +28 -51
  46. package/src/legacy/lib/models/common/widgets/Group/ListItem/index.jsx +8 -22
  47. package/src/legacy/lib/models/common/widgets/Group/index.ts +44 -0
  48. package/src/legacy/lib/models/common/widgets/Widget.ts +1 -10
  49. package/src/legacy/lib/models/common/widgets/ctBuilderArray.ts +20 -0
  50. package/src/legacy/lib/models/common/widgets/groupBuilderArray.ts +18 -0
  51. package/src/legacy/lib/models/common/widgets/index.ts +31 -7
  52. package/src/legacy/lib/models/common/widgets/sliceBuilderArray.ts +19 -0
  53. package/src/legacy/lib/models/common/widgets/withGroup.ts +2 -0
  54. package/test/lib/builders/buildersUtils.test.ts +1 -1
  55. package/test/lib/models/common/widgets/index.test.ts +1 -1
  56. package/out/_next/static/chunks/18539003-a6ba9867be2b3472.js +0 -22
  57. package/out/_next/static/chunks/212-58a99ab312f8a03b.js +0 -1
  58. package/out/_next/static/chunks/448-7a6843206737d199.js +0 -1
  59. package/out/_next/static/chunks/465-695ac5fedef986eb.js +0 -1
  60. package/out/_next/static/chunks/574-dfeb0e6aa3079da1.js +0 -1
  61. package/out/_next/static/chunks/756-31b94074da5d5a1c.js +0 -10
  62. package/out/_next/static/chunks/816-96fc9a79308019c7.js +0 -1
  63. package/out/_next/static/chunks/pages/_app-416128c0a7003331.js +0 -532
  64. package/out/_next/static/chunks/pages/changelog-f0cd26a9ae095e9e.js +0 -1
  65. package/out/_next/static/chunks/pages/changes-1a57f90433a0b5e2.js +0 -1
  66. package/out/_next/static/chunks/pages/index-a0530bd55c7e1872.js +0 -1
  67. package/out/_next/static/chunks/pages/labs-7b0abeef69494aec.js +0 -1
  68. package/out/_next/static/chunks/pages/settings-f82286dde10f624c.js +0 -1
  69. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-453f946e8879c829.js +0 -1
  70. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-b530a5e0ac9d0391.js +0 -1
  71. package/out/_next/static/chunks/pages/slices-7411822d74f1f6c1.js +0 -1
  72. package/out/_next/static/css/3c76d732d00eda61.css +0 -1
  73. package/out/_next/static/r4XVBODeD7tPx03gYkhKp/_buildManifest.js +0 -1
  74. package/src/hooks/useNestedGroupExperiment.ts +0 -8
  75. package/src/legacy/lib/models/common/widgets/Group/createGroupWidget.ts +0 -83
  76. package/src/legacy/lib/models/common/widgets/Group/index.tsx +0 -72
  77. package/src/legacy/lib/models/common/widgets/NestedGroup/index.tsx +0 -40
  78. package/src/legacy/lib/models/common/widgets/groupWidgets.ts +0 -7
  79. package/src/legacy/lib/models/common/widgets/nonGroupWidgets.ts +0 -33
  80. /package/out/_next/static/{r4XVBODeD7tPx03gYkhKp → JGphUg6eFq0-W11Pa7cMU}/_ssgManifest.js +0 -0
@@ -0,0 +1,22 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[851],{71463:function(e,t,n){n.d(t,{kS:function(){return elv}});var r,i,o,a,u,s,l=n(77252),c=n(2784),d=n(98863),f=n(22715),p=n(74217),A=n(50054),h=n(86579),m=n(18566),g=n(87322),y=n(1611),v=n(52393),x=n(47124),b=n(50002),C=n(28316),S=n(87598),w=Object.defineProperty,I=(e,t,n)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_=(e,t,n)=>(I(e,"symbol"!=typeof t?t+"":t,n),n),T="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof n.g?n.g:"u">typeof self?self:{};function O(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var R={},k=function(e,t){return(k=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},E=function(){return(E=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},M=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function F(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function j(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function U(e){return this instanceof U?(this.v=e,this):new U(e)}var K=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};let L=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return E},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:U(e[r](t)),done:!1}:i?i(t):t}:i}},__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||u(e,t)})})}function u(e,t){try{var n;n=i[e](t),n.value instanceof U?Promise.resolve(n.value.v).then(s,l):c(o[0][2],n)}catch(r){c(o[0][3],r)}}function s(e){u("next",e)}function l(e){u("throw",e)}function c(e,t){e(t),o.shift(),o.length&&u(o[0][0],o[0][1])}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=F(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}},__await:U,__awaiter:function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{s(r.next(e))}catch(t){o(t)}}function u(e){try{s(r.throw(e))}catch(t){o(t)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},__classPrivateFieldGet:function(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},__classPrivateFieldIn:function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},__classPrivateFieldSet:function(e,t,n,r,i){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},__createBinding:M,__decorate:function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},__esDecorate:function(e,t,n,r,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var u,s=r.kind,l="getter"===s?"get":"setter"===s?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var A={};for(var h in r)A[h]="access"===h?{}:r[h];for(var h in r.access)A.access[h]=r.access[h];A.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var m=(0,n[p])("accessor"===s?{get:d.get,set:d.set}:d[l],A);if("accessor"===s){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(u=a(m.get))&&(d.get=u),(u=a(m.set))&&(d.set=u),(u=a(m.init))&&i.push(u)}else(u=a(m))&&("field"===s?i.push(u):d[l]=u)}c&&Object.defineProperty(c,r.name,d),f=!0},__exportStar:function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||M(t,e,n)},__extends:function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}k(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},__generator:function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(s){u=[6,s],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&M(t,e,n);return K(t,e),t},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__param:function(e,t){return function(n,r){t(n,r,e)}},__propKey:function(e){return"symbol"==typeof e?e:"".concat(e)},__read:j,__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},__runInitializers:function(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0},__setFunctionName:function(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(j(arguments[t]));return e},__spreadArray:function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,u=o.length;a<u;a++,i++)r[i]=o[a];return r},__values:F},Symbol.toStringTag,{value:"Module"})),B=O(L);var P={};function W(e){return function(t){return function(n){return n.reduce(function(t,n){return e.alt(t,function(){return n})},t)}}}let D=Object.freeze(Object.defineProperty({__proto__:null,altAll:W},Symbol.toStringTag,{value:"Module"})),N=Object.freeze(Object.defineProperty({__proto__:null,altAll:function(e){return W(e)(e.zero())}},Symbol.toStringTag,{value:"Module"}));var q=function(e){return function(){return{meet:function(t,n){return function(r){return e.meet(t(r),n(r))}},join:function(t,n){return function(r){return e.join(t(r),n(r))}},zero:function(){return e.zero},one:function(){return e.one},implies:function(t,n){return function(r){return e.implies(t(r),n(r))}},not:function(t){return function(n){return e.not(t(n))}}}}},Q=function(e){return function(){return{concat:function(t,n){return function(r){return e.concat(t(r),n(r))}}}}},V=function(e){var t=Q(e);return function(){return{concat:t().concat,empty:function(){return e.empty}}}},z=function(e){return{add:function(t,n){return function(r){return e.add(t(r),n(r))}},zero:function(){return e.zero},mul:function(t,n){return function(r){return e.mul(t(r),n(r))}},one:function(){return e.one}}},Y=function(e){var t=z(e);return{add:t.add,mul:t.mul,one:t.one,zero:t.zero,sub:function(t,n){return function(r){return e.sub(t(r),n(r))}}}},H=function(e){return function(t){return t(e)}};function Z(e){return e}function J(e){return function(){return e}}var G=J(!0),$=J(!1),X=J(null),ee=J(void 0);function et(e,t,n,r,i,o,a,u,s){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return o(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return a(o(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return u(a(o(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return s(u(a(o(i(r(n(t(e.apply(this,arguments)))))))))}}}function en(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e}function er(e){return e+1}function ei(e){return e-1}function eo(e){throw Error("Called `absurd` function which should be uncallable")}function ea(e,t,n,r,i,o,a,u,s){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return i(r(n(t(e))));case 6:return o(i(r(n(t(e)))));case 7:return a(o(i(r(n(t(e))))));case 8:return u(a(o(i(r(n(t(e)))))));case 9:return s(u(a(o(i(r(n(t(e))))))));default:for(var l=arguments[0],c=1;c<arguments.length;c++)l=arguments[c](l);return l}}var eu=function(e,t){return t},es=function(){return{concat:function(e,t){return et(e,t)},empty:Z}};let el=Object.freeze(Object.defineProperty({__proto__:null,SK:eu,absurd:eo,apply:H,constFalse:$,constNull:X,constTrue:G,constUndefined:ee,constVoid:ee,constant:J,decrement:ei,flip:function(e){return function(t,n){return e(n,t)}},flow:et,getBooleanAlgebra:q,getEndomorphismMonoid:es,getMonoid:V,getRing:Y,getSemigroup:Q,getSemiring:z,hole:eo,identity:Z,increment:er,not:function(e){return function(t){return!e(t)}},pipe:ea,tuple:en,tupled:function(e){return function(t){return e.apply(void 0,t)}},unsafeCoerce:Z,untupled:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(t)}}},Symbol.toStringTag,{value:"Module"}));var ec=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},ed=function(e){return"None"===e._tag},ef=function(e){return"Some"===e._tag},ep={_tag:"None"},eA=function(e){return{_tag:"Some",value:e}},eh=function(e){return"Left"===e._tag},em=function(e){return"Right"===e._tag},eg=function(e){return{_tag:"Left",left:e}},ey=function(e){return{_tag:"Right",right:e}},ev=function(e){return[e]},ex=function(e){return e.length>0},eb=function(e){return e[0]},eC=function(e){return e.slice(1)},eS=[],ew={},eI=Object.prototype.hasOwnProperty,e_=function(e){return ec([e[0]],e.slice(1),!0)};function eT(e,t){return function(n){return function(r){return e.ap(e.map(r,function(e){return function(n){return t.ap(e,n)}}),n)}}}function eO(e){return function(t){return function(n){return e.ap(e.map(n,function(e){return function(){return e}}),t)}}}function eR(e){return function(t){return function(n){return e.ap(e.map(n,function(){return function(e){return e}}),t)}}}function ek(e){return function(t,n){return function(r){return e.ap(e.map(r,function(e){return function(n){var r;return Object.assign({},e,((r={})[t]=n,r))}}),n)}}}function eE(e){return function(t){return{concat:function(n,r){return e.ap(e.map(n,function(e){return function(n){return t.concat(e,n)}}),r)}}}}function eM(e,t,n){return function(r){for(var i=Array(n.length+1),o=0;o<n.length;o++)i[o]=n[o];return i[n.length]=r,0===t?e.apply(null,i):eM(e,t-1,i)}}var eF={1:function(e){return[e]},2:function(e){return function(t){return[e,t]}},3:function(e){return function(t){return function(n){return[e,t,n]}}},4:function(e){return function(t){return function(n){return function(r){return[e,t,n,r]}}}},5:function(e){return function(t){return function(n){return function(r){return function(i){return[e,t,n,r,i]}}}}}};function ej(e){return eI.call(eF,e)||(eF[e]=eM(en,e-1,[])),eF[e]}function eU(e){var t=e.length;switch(t){case 1:return function(t){var n;return(n={})[e[0]]=t,n};case 2:return function(t){return function(n){var r;return(r={})[e[0]]=t,r[e[1]]=n,r}};case 3:return function(t){return function(n){return function(r){var i;return(i={})[e[0]]=t,i[e[1]]=n,i[e[2]]=r,i}}};case 4:return function(t){return function(n){return function(r){return function(i){var o;return(o={})[e[0]]=t,o[e[1]]=n,o[e[2]]=r,o[e[3]]=i,o}}}};case 5:return function(t){return function(n){return function(r){return function(i){return function(o){var a;return(a={})[e[0]]=t,a[e[1]]=n,a[e[2]]=r,a[e[3]]=i,a[e[4]]=o,a}}}}};default:return eM(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i={},o=0;o<t;o++)i[e[o]]=n[o];return i},t-1,[])}}let eK=Object.freeze(Object.defineProperty({__proto__:null,ap:eT,apFirst:eO,apS:ek,apSecond:eR,getApplySemigroup:eE,sequenceS:function(e){return function(t){for(var n=Object.keys(t),r=n.length,i=eU(n),o=e.map(t[n[0]],i),a=1;a<r;a++)o=e.ap(o,t[n[a]]);return o}},sequenceT:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t.length,i=ej(r),o=e.map(t[0],i),a=1;a<r;a++)o=e.ap(o,t[a]);return o}}},Symbol.toStringTag,{value:"Module"}));function eL(e,t){return function(n){return function(r){return e.map(r,function(e){return t.map(e,n)})}}}function eB(e){return function(t){return function(n){return e.map(n,function(e){return e(t)})}}}function eP(e){return function(t){return function(n){return e.map(n,function(e){var n;return(n={})[t]=e,n})}}}function eW(e,t){var n=eL(e,t);return{map:function(e,t){return ea(e,n(t))}}}let eD=Object.freeze(Object.defineProperty({__proto__:null,bindTo:eP,flap:eB,getFunctorComposition:eW,map:eL},Symbol.toStringTag,{value:"Module"}));function eN(e){var t=eE(e);return function(n){return{concat:t(n).concat,empty:e.of(n.empty)}}}function eq(e,t){var n=eW(e,t).map,r=eT(e,t);return{map:n,of:function(n){return e.of(t.of(n))},ap:function(e,t){return ea(e,r(t))}}}let eQ=Object.freeze(Object.defineProperty({__proto__:null,getApplicativeComposition:eq,getApplicativeMonoid:eN},Symbol.toStringTag,{value:"Module"}));function eV(e){return function(t){return function(n){return e.chain(n,function(n){return e.map(t(n),function(){return n})})}}}function ez(e){return function(t,n){return function(r){return e.chain(r,function(r){return e.map(n(r),function(e){var n;return Object.assign({},r,((n={})[t]=e,n))})})}}}let eY=Object.freeze(Object.defineProperty({__proto__:null,bind:ez,chainFirst:eV},Symbol.toStringTag,{value:"Module"}));function eH(e){return function(t){return function(n){return e.fromEither(ed(n)?eg(t()):ey(n.value))}}}function eZ(e){return function(t,n){return function(r){return e.fromEither(t(r)?ey(r):eg(n(r)))}}}function eJ(e){var t=eH(e);return function(e){var n=t(e);return function(e){return et(e,n)}}}function eG(e,t){var n=eJ(e);return function(e){var r=n(e);return function(e){return function(n){return t.chain(n,r(e))}}}}function e$(e){return function(t){return et(t,e.fromEither)}}function eX(e,t){var n=e$(e);return function(e){return function(r){return t.chain(r,n(e))}}}function e0(e,t){return et(e$(e),eV(t))}function e1(e,t){return function(n,r){return function(i){return t.chain(i,function(t){return e.fromEither(n(t)?ey(t):eg(r(t)))})}}}let e2=Object.freeze(Object.defineProperty({__proto__:null,chainEitherK:eX,chainFirstEitherK:e0,chainOptionK:eG,filterOrElse:e1,fromEitherK:e$,fromOption:eH,fromOptionK:eJ,fromPredicate:eZ},Symbol.toStringTag,{value:"Module"}));var e6=function(e){return{equals:function(t,n){return t===n||e(t,n)}}},e5=function(e){return e6(function(t,n){for(var r in e)if(!e[r].equals(t[r],n[r]))return!1;return!0})},e3=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e6(function(t,n){return e.every(function(e,r){return e.equals(t[r],n[r])})})},e9=function(e){return function(t){return e6(function(n,r){return t.equals(e(n),e(r))})}},e4={equals:function(e,t){return e===t}},e7={equals:function(){return!0}},e8=function(){return{concat:function(e,t){return e6(function(n,r){return e.equals(n,r)&&t.equals(n,r)})}}},te=function(){return{concat:e8().concat,empty:e7}},tt={URI:"Eq",contramap:function(e,t){return ea(e,e9(t))}},tn=e4.equals;let tr=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:tt,URI:"Eq",contramap:e9,eq:tt,eqBoolean:e4,eqDate:{equals:function(e,t){return e.valueOf()===t.valueOf()}},eqNumber:e4,eqStrict:e4,eqString:e4,fromEquals:e6,getMonoid:te,getSemigroup:e8,getStructEq:e5,getTupleEq:e3,strictEqual:tn,struct:e5,tuple:e3},Symbol.toStringTag,{value:"Module"}));var ti=function(e){return function(t,n){return t===n||0===e(t,n)}},to=function(e){return{equals:ti(e),compare:function(t,n){return t===n?0:e(t,n)}}},ta=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return to(function(t,n){for(var r=0;r<e.length-1;r++){var i=e[r].compare(t[r],n[r]);if(0!==i)return i}return e[r].compare(t[r],n[r])})},tu=function(e){return to(function(t,n){return e.compare(n,t)})},ts=function(e){return function(t){return to(function(n,r){return t.compare(e(n),e(r))})}},tl=function(){return{concat:function(e,t){return to(function(n,r){var i=e.compare(n,r);return 0!==i?i:t.compare(n,r)})}}},tc=function(){return{concat:tl().concat,empty:to(function(){return 0})}},td={URI:"Ord",contramap:function(e,t){return ea(e,ts(t))}},tf={equals:G,compare:J(0)},tp=function(e){return function(t){return function(n){return n===t||0===e.compare(n,t)}}},tA=function(e){return function(t,n){return -1===e.compare(t,n)}},th=function(e){return function(t,n){return 1===e.compare(t,n)}},tm=function(e){return function(t,n){return 1!==e.compare(t,n)}},tg=function(e){return function(t,n){return -1!==e.compare(t,n)}},ty=function(e){return function(t,n){return t===n||1>e.compare(t,n)?t:n}},tv=function(e){return function(t,n){return t===n||e.compare(t,n)>-1?t:n}},tx=function(e){var t=ty(e),n=tv(e);return function(e,r){return function(i){return n(t(i,r),e)}}},tb=function(e){var t=tA(e),n=th(e);return function(e,r){return function(i){return!(t(i,e)||n(i,r))}}},tC={equals:e4.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},tS=ea(tC,ts(function(e){return e.valueOf()}));let tw=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:td,URI:"Ord",between:tb,clamp:tx,contramap:ts,equals:tp,equalsDefault:ti,fromCompare:to,geq:tg,getDualOrd:tu,getMonoid:tc,getSemigroup:tl,getTupleOrd:ta,gt:th,leq:tm,lt:tA,max:tv,min:ty,ord:td,ordBoolean:tC,ordDate:tS,ordNumber:tC,ordString:tC,reverse:tu,trivial:tf,tuple:ta},Symbol.toStringTag,{value:"Module"}));var tI=function(e){return{concat:function(t,n){return e.concat(n,t)}}},t_=function(e){return function(t){return{concat:function(n,r){return e(n)?t.concat(n,r):r}}}},tT=function(e){return function(t){return{concat:function(n,r){return e(r)?t.concat(n,r):n}}}},tO=function(e){return function(t){return{concat:function(n,r){return t.concat(e(n),e(r))}}}},tR=function(e){return function(t){return function(n){return n.reduce(function(t,n){return e.concat(t,n)},t)}}};let tk=Object.freeze(Object.defineProperty({__proto__:null,concatAll:tR,endo:tO,filterFirst:t_,filterSecond:tT,reverse:tI},Symbol.toStringTag,{value:"Module"}));var tE=function(e){return{concat:ty(e)}},tM=function(e){return{concat:tv(e)}},tF=function(e){return{concat:function(){return e}}},tj=function(e){return{concat:function(t,n){var r={};for(var i in e)eI.call(e,i)&&(r[i]=e[i].concat(t[i],n[i]));return r}}},tU=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{concat:function(t,n){return e.map(function(e,r){return e.concat(t[r],n[r])})}}},tK=function(e){return function(t){return{concat:function(n,r){return t.concat(n,t.concat(e,r))}}}},tL=function(){return{concat:Z}},tB=function(){return{concat:function(e,t){return t}}},tP=tF(void 0),tW=function(){return{concat:function(e,t){return Object.assign({},e,t)}}},tD={concat:function(e,t){return e&&t}},tN={concat:function(e,t){return e||t}},tq={concat:function(e,t){return e+t}},tQ={concat:function(e,t){return e+t}},tV={concat:function(e,t){return e*t}};let tz=Object.freeze(Object.defineProperty({__proto__:null,concatAll:tR,constant:tF,first:tL,fold:function(e){var t=tR(e);return function(e,n){return void 0===n?t(e):t(e)(n)}},getDualSemigroup:tI,getFirstSemigroup:tL,getFunctionSemigroup:Q,getIntercalateSemigroup:tK,getJoinSemigroup:tM,getLastSemigroup:tB,getMeetSemigroup:tE,getObjectSemigroup:tW,getStructSemigroup:tj,getTupleSemigroup:tU,intercalate:tK,last:tB,max:tM,min:tE,reverse:tI,semigroupAll:tD,semigroupAny:tN,semigroupProduct:tV,semigroupString:tq,semigroupSum:tQ,semigroupVoid:tP,struct:tj,tuple:tU},Symbol.toStringTag,{value:"Module"}));var tY=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},tH=function(e,t){return e<0||e>=t.length},tZ=function(e){return function(t){return tY([e],t,!0)}},tJ=function(e){return function(t){return tY(tY([],t,!0),[e],!1)}},tG=function(e,t,n){if(ex(n)){var r=e_(n);return r.splice(e,0,t),r}return[t]},t$=function(e,t,n){if(n[e]===t)return n;var r=e_(n);return r[e]=t,r},tX=function(e){return function(t){if(1===t.length)return t;for(var n=[re(t)],r=rt(t),i=function(t){n.every(function(n){return!e.equals(n,t)})&&n.push(t)},o=0;o<r.length;o++)i(r[o]);return n}},t0=function(e){if(ex(e)){var t=tc();return no(e.reduce(t.concat,t.empty))}return Z},t1=function(e){var t=tX(e);return function(e){return function(n){return t(ea(n,nt(e)))}}},t2=function(e){return function(t){var n=t.length,r=Math.round(e)%n;if(tH(Math.abs(r),t)||0===r)return t;if(!(r<0))return t2(r-n)(t);var i=nA(-r)(t),o=i[0];return ea(i[1],nt(o))}},t6=function(e){return ex(e)?eA(e):ep},t5=function(e){return function(t){for(var n=Math.max(0,Math.floor(t)),r=[e(0)],i=1;i<n;i++)r.push(e(i));return r}},t3=function(e){return t5(function(){return e})},t9=function(e,t){return e<=t?t5(function(t){return e+t})(t-e+1):[e]},t4=function(e){return[re(e),rt(e)]},t7=function(e){return[rr(e),rn(e)]},t8=function(e){return t6(e.slice())};function ne(e){return function(t){return t.concat(e)}}function nt(e,t){return t?e.concat(t):function(t){return t.concat(e)}}var nn=function(e){return 1===e.length?e:tY([rn(e)],e.slice(0,-1).reverse(),!0)};function nr(e){return function(t){var n=t.length;if(0===n)return eS;for(var r=[],i=t[0],o=[i],a=1;a<n;a++){var u=t[a];e.equals(u,i)?o.push(u):(r.push(o),o=[i=u])}return r.push(o),r}}var ni=function(e){return function(t){for(var n={},r=0;r<t.length;r++){var i=t[r],o=e(i);eI.call(n,o)?n[o].push(i):n[o]=[i]}return n}},no=function(e){return function(t){return 1===t.length?t:t.slice().sort(e.compare)}},na=function(e,t){return nu(e,function(){return t})},nu=function(e,t){return function(n){return tH(e,n)?ep:eA(t$(e,t(n[e]),n))}},ns=function(e,t,n){for(var r=[n(e[0],t[0])],i=Math.min(e.length,t.length),o=1;o<i;o++)r[o]=n(e[o],t[o]);return r},nl=function(e){for(var t=[e[0][0]],n=[e[0][1]],r=1;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},nc=function(e){return function(t){for(var n=[e,t[0]],r=1;r<t.length;r++)n.push(e,t[r]);return n}},nd=function(e){return function(t){var n=rt(t);return ex(n)?ea(n,nc(e),tZ(re(t))):t}},nf=function(e){return function(t){for(var n=e_(e(0,re(t))),r=1;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},np=function(e){return function(t){for(var n=e(t),r=n[0],i=n[1],o=[r],a=i;ex(a);){var u=e(a),s=u[0],l=u[1];o.push(s),a=l}return o}},nA=function(e){return function(t){var n=Math.max(1,e);return n>=t.length?[t,eS]:[ea(t.slice(1,n),tZ(re(t))),t.slice(n)]}},nh=function(e){return np(nA(e))},nm=function(e,t){return ea(e,nL(t))},ng=function(e,t){return ea(e,nB(t))},ny=function(e,t){return ea(e,nM(t))},nv=function(e,t){return ea(e,nF(t))},nx=function(e,t){return ea(e,nj(t))},nb=function(e,t,n){return ea(e,nP(t,n))},nC=function(e){var t=nW(e);return function(e,n){return ea(e,t(n))}},nS=function(e,t,n){return ea(e,nD(t,n))},nw=function(e){var t=nV(e);return function(e,n){return ea(e,t(n))}},nI=function(e,t){return ea(e,nE(t))},n_=function(e,t,n){return ea(e,nN(t,n))},nT=function(e){var t=nq(e);return function(e,n){return ea(e,t(n))}},nO=function(e,t,n){return ea(e,nQ(t,n))},nR=function(e){var t=nY(e);return function(e,n){return ea(e,t(n))}},nk=function(e){return function(t){return ea(t,ne(e()))}},nE=nk,nM=function(e){return nF(function(t){return ea(e,nL(t))})},nF=function(e){return nf(function(t,n){return e(n)})},nj=function(e){return function(t){for(var n=rt(t),r=[e(t)];ex(n);)r.push(e(n)),n=rt(n);return r}},nU=nj(Z),nK=nF(Z),nL=function(e){return nB(function(t,n){return e(n)})},nB=function(e){return function(t){for(var n=[e(0,re(t))],r=1;r<t.length;r++)n.push(e(r,t[r]));return n}},nP=function(e,t){return nN(e,function(e,n,r){return t(n,r)})},nW=function(e){return function(t){return function(n){return n.slice(1).reduce(function(n,r){return e.concat(n,t(r))},t(n[0]))}}},nD=function(e,t){return nQ(e,function(e,n,r){return t(n,r)})},nN=function(e,t){return function(n){return n.reduce(function(e,n,r){return t(r,e,n)},e)}},nq=function(e){return function(t){return function(n){return n.slice(1).reduce(function(n,r,i){return e.concat(n,t(i+1,r))},t(0,n[0]))}}},nQ=function(e,t){return function(n){return n.reduceRight(function(e,n,r){return t(r,n,e)},e)}},nV=function(e){var t=nY(e);return function(e){return t(function(t,n){return e(n)})}},nz=function(e){return nY(e)(eu)},nY=function(e){return function(t){return function(n){for(var r=e.map(t(0,re(n)),ev),i=1;i<n.length;i++)r=e.ap(e.map(r,function(e){return function(t){return ea(e,tJ(t))}}),t(i,n[i]));return r}}},nH="ReadonlyNonEmptyArray",nZ=function(e){return{show:function(t){return"[".concat(t.map(e.show).join(", "),"]")}}},nJ=function(){return{concat:nt}},nG=function(e){return e6(function(t,n){return t.length===n.length&&t.every(function(t,r){return e.equals(t,n[r])})})},n$=function(e){var t=t1(e);return{concat:function(e,n){return t(n)(e)}}},nX={URI:nH,map:nm},n0=eB(nX),n1={URI:nH,map:nm,ap:ny},n2=eO(n1),n6=eR(n1),n5={URI:nH,map:nm,ap:ny,chain:nv},n3=eV(n5),n9=ev(ew),n4=eP(nX),n7=ez(n5),n8=ek(n1),re=eb,rt=eC,rn=function(e){return e[e.length-1]},rr=function(e){return e.slice(0,-1)},ri=function(e){var t=tE(e);return function(e){return e.reduce(t.concat)}},ro=function(e){var t=tM(e);return function(e){return e.reduce(t.concat)}},ra=function(e){return function(t){return t.reduce(e.concat)}},ru=function(e){return function(t){return e(re(t),rt(t))}},rs=function(e){return function(t){return e(rr(t),rn(t))}},rl=function(e){return function(t){return tY([e(re(t))],rt(t),!0)}},rc=function(e){return rl(function(){return e})},rd=function(e){return function(t){return ea(rr(t),tJ(e(rn(t))))}},rf=function(e){return rd(function(){return e})},rp=function(e){var t=ra(e);return function(e){return et(nd(e),t)}},rA=function(e){return function(t){return t6(t.filter(function(t,n){return e(n,t)}))}};function rh(e,t){return void 0===t?tZ(e):ea(t,tZ(e))}var rm=function(e,t){return ea(e,nt([t]))},rg=function(e,t){return function(n){return e<0||e>n.length?ep:eA(tG(e,t,n))}};let ry=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:nH,map:nm,alt:nI},Applicative:{URI:nH,map:nm,ap:ny,of:ev},Apply:n1,Chain:n5,Comonad:{URI:nH,map:nm,extend:nx,extract:eb},Do:n9,Foldable:{URI:nH,reduce:nb,foldMap:nC,reduceRight:nS},FoldableWithIndex:{URI:nH,reduce:nb,foldMap:nC,reduceRight:nS,reduceWithIndex:n_,foldMapWithIndex:nT,reduceRightWithIndex:nO},Functor:nX,FunctorWithIndex:{URI:nH,map:nm,mapWithIndex:ng},Monad:{URI:nH,map:nm,ap:ny,of:ev,chain:nv},Pointed:{URI:nH,of:ev},Traversable:{URI:nH,map:nm,reduce:nb,foldMap:nC,reduceRight:nS,traverse:nw,sequence:nz},TraversableWithIndex:{URI:nH,map:nm,mapWithIndex:ng,reduce:nb,foldMap:nC,reduceRight:nS,traverse:nw,sequence:nz,reduceWithIndex:n_,foldMapWithIndex:nT,reduceRightWithIndex:nO,traverseWithIndex:nR},URI:nH,alt:nE,altW:nk,ap:nM,apFirst:n2,apS:n8,apSecond:n6,append:tJ,appendW:tJ,bind:n7,bindTo:n4,chain:nF,chainFirst:n3,chainWithIndex:nf,chop:np,chunksOf:nh,concat:nt,concatAll:ra,concatW:ne,cons:rh,duplicate:nU,empty:eS,extend:nj,extract:eb,filter:function(e){return rA(function(t,n){return e(n)})},filterWithIndex:rA,flap:n0,flatten:nK,fold:ra,foldMap:nW,foldMapWithIndex:nq,fromArray:t8,fromReadonlyArray:t6,getEq:nG,getSemigroup:nJ,getShow:nZ,getUnionSemigroup:n$,group:nr,groupBy:ni,groupSort:function(e){var t=no(e),n=nr(e);return function(e){return ex(e)?n(t(e)):eS}},head:re,init:rr,insertAt:rg,intercalate:rp,intersperse:nd,isNonEmpty:ex,isOutOfBound:tH,last:rn,makeBy:t5,map:nL,mapWithIndex:nB,matchLeft:ru,matchRight:rs,max:ro,min:ri,modifyAt:nu,modifyHead:rl,modifyLast:rd,of:ev,prepend:tZ,prependAll:nc,prependToAll:nc,prependW:tZ,range:t9,readonlyNonEmptyArray:{URI:nH,of:ev,map:nm,mapWithIndex:ng,ap:ny,chain:nv,extend:nx,extract:eb,reduce:nb,foldMap:nC,reduceRight:nS,traverse:nw,sequence:nz,reduceWithIndex:n_,foldMapWithIndex:nT,reduceRightWithIndex:nO,traverseWithIndex:nR,alt:nI},reduce:nP,reduceRight:nD,reduceRightWithIndex:nQ,reduceWithIndex:nN,replicate:t3,reverse:nn,rotate:t2,sequence:nz,snoc:rm,sort:no,sortBy:t0,splitAt:nA,tail:rt,traverse:nV,traverseWithIndex:nY,unappend:t7,uncons:t4,union:t1,uniq:tX,unprepend:t4,unsafeInsertAt:tG,unsafeUpdateAt:t$,unsnoc:t7,unzip:nl,updateAt:na,updateHead:rc,updateLast:rf,zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:ns(t,n,function(e,t){return[e,t]})},zipWith:ns},Symbol.toStringTag,{value:"Module"}));var rv=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},rx=function(e){return e.length>0},rb=function(e,t){return e<0||e>=t.length},rC=function(e){return function(t){return rv([e],t,!0)}},rS=function(e){return function(t){return rv(rv([],t,!0),[e],!1)}},rw=function(e,t,n){if(rx(n)){var r=rk(n);return r.splice(e,0,t),r}return[t]},rI=function(e,t,n){var r=rk(n);return r[e]=t,r},r_=function(e){return function(t){if(1===t.length)return rz(t);for(var n=[iB(t)],r=iP(t),i=function(t){n.every(function(n){return!e.equals(n,t)})&&n.push(t)},o=0;o<r.length;o++)i(r[o]);return n}},rT=function(e){if(rx(e)){var t=tc();return rN(e.reduce(t.concat,t.empty))}return rz},rO=function(e){var t=r_(e);return function(e){return function(n){return t(ea(n,rB(e)))}}},rR=function(e){return function(t){var n=t.length,r=Math.round(e)%n;if(rb(Math.abs(r),t)||0===r)return rz(t);if(!(r<0))return rR(r-n)(t);var i=r0(-r)(t),o=i[0];return ea(i[1],rB(o))}},rk=e_,rE=function(e){return rx(e)?eA(e):ep},rM=function(e){return function(t){for(var n=Math.max(0,Math.floor(t)),r=[e(0)],i=1;i<n;i++)r.push(e(i));return r}},rF=function(e){return rM(function(){return e})},rj=function(e,t){return e<=t?rM(function(t){return e+t})(t-e+1):[e]},rU=function(e){return[iB(e),iP(e)]},rK=function(e){return[iD(e),iW(e)]};function rL(e){return function(t){return t.concat(e)}}function rB(e,t){return t?e.concat(t):function(t){return t.concat(e)}}var rP=function(e){return rv([iW(e)],e.slice(0,-1).reverse(),!0)};function rW(e){return function(t){var n=t.length;if(0===n)return[];for(var r=[],i=t[0],o=[i],a=1;a<n;a++){var u=t[a];e.equals(u,i)?o.push(u):(r.push(o),o=[i=u])}return r.push(o),r}}var rD=function(e){return function(t){for(var n={},r=0;r<t.length;r++){var i=t[r],o=e(i);eI.call(n,o)?n[o].push(i):n[o]=[i]}return n}},rN=function(e){return function(t){return t.slice().sort(e.compare)}},rq=function(e,t){return function(n){return e<0||e>n.length?ep:eA(rw(e,t,n))}},rQ=function(e,t){return rV(e,function(){return t})},rV=function(e,t){return function(n){return rb(e,n)?ep:eA(rI(e,t(n[e]),n))}},rz=rk,rY=function(e){return[e]},rH=function(e,t,n){for(var r=[n(e[0],t[0])],i=Math.min(e.length,t.length),o=1;o<i;o++)r[o]=n(e[o],t[o]);return r},rZ=function(e){for(var t=[e[0][0]],n=[e[0][1]],r=1;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},rJ=function(e){return function(t){for(var n=[e,t[0]],r=1;r<t.length;r++)n.push(e,t[r]);return n}},rG=function(e){return function(t){var n=iP(t);return rx(n)?ea(n,rJ(e),rC(iB(t))):rz(t)}},r$=function(e){return function(t){for(var n=rk(e(0,iB(t))),r=1;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},rX=function(e){return function(t){for(var n=e(t),r=n[0],i=n[1],o=[r],a=i;rx(a);){var u=e(a),s=u[0],l=u[1];o.push(s),a=l}return o}},r0=function(e){return function(t){var n=Math.max(1,e);return n>=t.length?[rz(t),[]]:[ea(t.slice(1,n),rC(iB(t))),t.slice(n)]}},r1=function(e){return rX(r0(e))},r2=function(e,t){return ea(e,ih(t))},r6=function(e,t){return ea(e,im(t))},r5=function(e,t){return ea(e,il(t))},r3=function(e,t){return ea(e,ic(t))},r9=function(e,t){return ea(e,id(t))},r4=function(e,t,n){return ea(e,ig(t,n))},r7=function(e){var t=nW(e);return function(e,n){return ea(e,t(n))}},r8=function(e,t,n){return ea(e,iv(t,n))},ie=function(e){var t=ib(e);return function(e,n){return ea(e,t(n))}},it=function(e,t){return ea(e,is(t))},ir=function(e,t,n){return ea(e,iy(t,n))},ii=function(e){var t=nq(e);return function(e,n){return ea(e,t(n))}},io=function(e,t,n){return ea(e,ix(t,n))},ia=function(e){var t=iS(e);return function(e,n){return ea(e,t(n))}},iu=function(e){return function(t){return ea(t,rL(e()))}},is=iu,il=function(e){return ic(function(t){return ea(e,ih(t))})},ic=function(e){return r$(function(t,n){return e(n)})},id=function(e){return function(t){for(var n=iP(t),r=[e(t)];rx(n);)r.push(e(n)),n=iP(n);return r}},ip=id(Z),iA=ic(Z),ih=function(e){return im(function(t,n){return e(n)})},im=function(e){return function(t){for(var n=[e(0,iB(t))],r=1;r<t.length;r++)n.push(e(r,t[r]));return n}},ig=nP,iy=nN,iv=nD,ix=nQ,ib=function(e){var t=iS(e);return function(e){return t(function(t,n){return e(n)})}},iC=function(e){return iS(e)(function(e,t){return t})},iS=function(e){return function(t){return function(n){for(var r=e.map(t(0,iB(n)),rY),i=1;i<n.length;i++)r=e.ap(e.map(r,function(e){return function(t){return ea(e,rS(t))}}),t(i,n[i]));return r}}},iw="NonEmptyArray",iI=function(){return{concat:rB}},i_=function(e){var t=rO(e);return{concat:function(e,n){return t(n)(e)}}},iT={URI:iw,map:r2},iO=eB(iT),iR={URI:iw,map:r2,ap:r5},ik=eO(iR),iE=eR(iR),iM={URI:iw,map:r2,ap:r5,chain:r3},iF=eV(iM),ij=rY(ew),iU=eP(iT),iK=ez(iM),iL=ek(iR),iB=re,iP=function(e){return e.slice(1)},iW=rn,iD=function(e){return e.slice(0,-1)},iN=function(e){return function(t){return t.reduce(e.concat)}},iq=function(e){return function(t){return e(iB(t),iP(t))}},iQ=function(e){return function(t){return e(iD(t),iW(t))}},iV=function(e){return function(t){return rv([e(iB(t))],iP(t),!0)}},iz=function(e){return iV(function(){return e})},iY=function(e){return function(t){return ea(iD(t),rS(e(iW(t))))}},iH=function(e){return iY(function(){return e})},iZ=function(e){return function(t){return rE(t.filter(function(t,n){return e(n,t)}))}};function iJ(e,t){return void 0===t?rC(e):ea(t,rC(e))}var iG=function(e,t){return ea(e,rS(t))};let i$=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:iw,map:r2,alt:it},Applicative:{URI:iw,map:r2,ap:r5,of:rY},Apply:iR,Chain:iM,Comonad:{URI:iw,map:r2,extend:r9,extract:re},Do:ij,Foldable:{URI:iw,reduce:r4,foldMap:r7,reduceRight:r8},FoldableWithIndex:{URI:iw,reduce:r4,foldMap:r7,reduceRight:r8,reduceWithIndex:ir,foldMapWithIndex:ii,reduceRightWithIndex:io},Functor:iT,FunctorWithIndex:{URI:iw,map:r2,mapWithIndex:r6},Monad:{URI:iw,map:r2,ap:r5,of:rY,chain:r3},Pointed:{URI:iw,of:rY},Traversable:{URI:iw,map:r2,reduce:r4,foldMap:r7,reduceRight:r8,traverse:ie,sequence:iC},TraversableWithIndex:{URI:iw,map:r2,mapWithIndex:r6,reduce:r4,foldMap:r7,reduceRight:r8,traverse:ie,sequence:iC,reduceWithIndex:ir,foldMapWithIndex:ii,reduceRightWithIndex:io,traverseWithIndex:ia},URI:iw,alt:is,altW:iu,ap:il,apFirst:ik,apS:iL,apSecond:iE,append:rS,appendW:rS,bind:iK,bindTo:iU,chain:ic,chainFirst:iF,chainWithIndex:r$,chop:rX,chunksOf:r1,concat:rB,concatAll:iN,concatW:rL,cons:iJ,copy:rz,duplicate:ip,extend:id,extract:re,filter:function(e){return iZ(function(t,n){return e(n)})},filterWithIndex:iZ,flap:iO,flatten:iA,fold:ra,foldMap:nW,foldMapWithIndex:nq,fromArray:rE,fromReadonlyNonEmptyArray:rk,getEq:nG,getSemigroup:iI,getShow:nZ,getUnionSemigroup:i_,group:rW,groupBy:rD,groupSort:function(e){var t=rN(e),n=rW(e);return function(e){return rx(e)?n(t(e)):[]}},head:iB,init:iD,insertAt:rq,intercalate:rp,intersperse:rG,isNonEmpty:rx,isOutOfBound:rb,last:iW,makeBy:rM,map:ih,mapWithIndex:im,matchLeft:iq,matchRight:iQ,max:ro,min:ri,modifyAt:rV,modifyHead:iV,modifyLast:iY,nonEmptyArray:{URI:iw,of:rY,map:r2,mapWithIndex:r6,ap:r5,chain:r3,extend:r9,extract:re,reduce:r4,foldMap:r7,reduceRight:r8,traverse:ie,sequence:iC,reduceWithIndex:ir,foldMapWithIndex:ii,reduceRightWithIndex:io,traverseWithIndex:ia,alt:it},of:rY,prepend:rC,prependAll:rJ,prependToAll:rJ,prependW:rC,range:rj,reduce:ig,reduceRight:iv,reduceRightWithIndex:ix,reduceWithIndex:iy,replicate:rF,reverse:rP,rotate:rR,sequence:iC,snoc:iG,sort:rN,sortBy:rT,splitAt:r0,tail:iP,traverse:ib,traverseWithIndex:iS,unappend:rK,uncons:rU,union:rO,uniq:r_,unprepend:rU,unsafeInsertAt:rw,unsafeUpdateAt:rI,unsnoc:rK,unzip:rZ,updateAt:rQ,updateHead:iz,updateLast:iH,zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:rH(t,n,function(e,t){return[e,t]})},zipWith:rH},Symbol.toStringTag,{value:"Module"}));var iX=function(e){return"number"==typeof e},i0={equals:function(e,t){return e===t}},i1={equals:i0.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},i2={equals:i0.equals,compare:i1.compare,top:1/0,bottom:-1/0},i6={concat:function(e,t){return e-t}},i5={concat:function(e,t){return e+t}},i3={concat:function(e,t){return e*t}},i9={concat:i5.concat,empty:0},i4={concat:i3.concat,empty:1},i7={add:i5.concat,zero:0,mul:i3.concat,one:1,sub:i6.concat,degree:function(e){return 1},div:function(e,t){return e/t},mod:function(e,t){return e%t}};let i8=Object.freeze(Object.defineProperty({__proto__:null,Bounded:i2,Eq:i0,Field:i7,MagmaSub:i6,MonoidProduct:i4,MonoidSum:i9,Ord:i1,SemigroupProduct:i3,SemigroupSum:i5,Show:{show:function(e){return JSON.stringify(e)}},isNumber:iX},Symbol.toStringTag,{value:"Module"}));var oe=function(e,t){return{left:e,right:t}},ot=function(e,t){return ea(e,oi(t))},on=function(e,t,n){return ea(e,oo(t,n))},or=function(e){return function(t){return oe(oc(t),e(od(t)))}},oi=function(e){return function(t){return oe(e(oc(t)),od(t))}},oo=function(e,t){return function(n){return oe(e(oc(n)),t(od(n)))}},oa="Separated",ou={URI:oa,map:function(e,t){return ea(e,or(t))}},ol=eB(ou),oc=function(e){return e.left},od=function(e){return e.right};let of=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:{URI:oa,mapLeft:ot,bimap:on},Functor:ou,URI:oa,bimap:oo,flap:ol,left:oc,map:or,mapLeft:oi,right:od,separated:oe},Symbol.toStringTag,{value:"Module"}));function op(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.separate)}}}function oA(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.compact)}}}function oh(e){return function(t){var n=e.wither(t);return function(e){return function(r){return n(r,function(n){return t.map(e(n),function(e){return e?eA(n):ep})})}}}}let om=Object.freeze(Object.defineProperty({__proto__:null,filterE:oh,wiltDefault:op,witherDefault:oA},Symbol.toStringTag,{value:"Module"}));function og(e,t){return function(n){return n?t.of(void 0):e.zero()}}let oy=Object.freeze(Object.defineProperty({__proto__:null,guard:og},Symbol.toStringTag,{value:"Module"}));var ov=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},ox=function(e){return 0===e.length},ob=function(e,t){return e<=0?uj:t5(t)(e)},oC=function(e,t){return ob(e,function(){return t})},oS=function(e){return ed(e)?uj:[e.value]},ow=function(e){return eh(e)?uj:[e.right]},oI=function(e,t){return function(n){return ex(n)?t(n):e()}},o_=function(e,t){return function(n){return ex(n)?t(re(n),rt(n)):e()}},oT=function(e,t){return function(n){return ex(n)?t(rr(n),rn(n)):e()}},oO=function(e){return function(t){if(ox(t))return uj;for(var n=[],r=0;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},oR=function(e,t){return function(n){var r=n.length,i=Array(r+1);i[0]=e;for(var o=0;o<r;o++)i[o+1]=t(i[o],n[o]);return i}},ok=function(e,t){return function(n){var r=n.length,i=Array(r+1);i[r]=e;for(var o=r-1;o>=0;o--)i[o]=t(n[o],i[o+1]);return i}},oE=function(e){return e.length};function oM(e,t){return void 0===t?function(t){return oM(e,t)}:tH(e,t)?ep:eA(t[e])}var oF=function(e){return ex(e)?eA(re(e)):ep},oj=function(e){return ex(e)?eA(rn(e)):ep},oU=function(e){return ex(e)?eA(rt(e)):ep},oK=function(e){return ex(e)?eA(rr(e)):ep},oL=function(e){return function(t){return tH(e,t)?t:0===e?uj:t.slice(0,e)}},oB=function(e){return function(t){return tH(e,t)?t:0===e?uj:t.slice(-e)}},oP=function(e,t){for(var n=e.length,r=0;r<n&&t(e[r]);r++);return r},oW=function(e){return function(t){return e<=0||ox(t)?t:e>=t.length?uj:t.slice(e,t.length)}},oD=function(e){return function(t){return e<=0||ox(t)?t:e>=t.length?uj:t.slice(0,t.length-e)}},oN=function(e){return function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return eA(n);return ep}};function oq(e){return function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return eA(t[n]);return ep}}var oQ=function(e){return function(t){for(var n=0;n<t.length;n++){var r=e(t[n]);if(ef(r))return r}return ep}};function oV(e){return function(t){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return eA(t[n]);return ep}}var oz=function(e){return function(t){for(var n=t.length-1;n>=0;n--){var r=e(t[n]);if(ef(r))return r}return ep}},oY=function(e){return function(t){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return eA(n);return ep}},oH=function(e,t){return function(n){return e<0||e>n.length?ep:eA(tG(e,t,n))}},oZ=function(e,t){return oG(e,function(){return t})},oJ=function(e){return function(t){return tH(e,t)?ep:eA(uE(e,t))}},oG=function(e,t){return function(n){return tH(e,n)?ep:eA(uk(e,t(n[e]),n))}},o$=function(e){return e.length<=1?e:e.slice().reverse()},oX=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Right"===r._tag&&t.push(r.right)}return t},o0=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Left"===r._tag&&t.push(r.left)}return t},o1=function(e){return function(t){return t.length<=1?t:t.slice().sort(e.compare)}},o2=function(e,t,n){for(var r=[],i=Math.min(e.length,t.length),o=0;o<i;o++)r[o]=n(e[o],t[o]);return r},o6=function(e){for(var t=[],n=[],r=0;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},o5=function(e){var t=nc(e);return function(e){return ex(e)?t(e):e}},o3=function(e){var t=nd(e);return function(e){return ex(e)?t(e):e}},o9=function(e){var t=t2(e);return function(e){return ex(e)?t(e):e}};function o4(e){return function(t,n){if(void 0===n){var r,i=o4(e);return function(e){return i(t,e)}}for(var o=0;o<n.length;o++)if(r=n[o],e.equals(r,t))return!0;return!1}}var o7=function(e){var t=tX(e);return function(e){return ex(e)?t(e):e}},o8=function(e){var t=t0(e);return function(e){return ex(e)?t(e):e}},ae=function(e){var t=np(e);return function(e){return ex(e)?t(e):uj}},at=function(e){return function(t){return e>=1&&ex(t)?nA(e)(t):ox(t)?[t,uj]:[uj,t]}},an=function(e){var t=nh(e);return function(e){return ex(e)?t(e):uj}},ar=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return oS(e.apply(void 0,t))}},ai=function(e){return function(t){return ox(t)?e:ox(e)?t:t.concat(e)}};function ao(e){var t=t1(e);return function(n,r){if(void 0===r){var i=ao(e);return function(e){return i(e,n)}}return ex(n)&&ex(r)?t(r)(n):ex(n)?n:r}}function aa(e){var t=o4(e);return function(n,r){if(void 0===r){var i=aa(e);return function(e){return i(e,n)}}return n.filter(function(e){return t(e,r)})}}function au(e){var t=o4(e);return function(n,r){if(void 0===r){var i=au(e);return function(e){return i(e,n)}}return n.filter(function(e){return!t(e,r)})}}var as=function(e,t){return ea(e,aB(t))},al=function(e,t){return ea(e,aP(t))},ac=function(e,t){return ea(e,aU(t))},ad=function(e,t){return ea(e,aK(t))},af=function(e,t){return ea(e,aD(t))},ap=function(e,t){return ea(e,aq(t))},aA=function(e,t){return ea(e,aV(t))},ah=function(e,t){return ea(e,aY(t))},am=function(e,t){return ea(e,az(t))},ag=function(e,t){return ea(e,aH(t))},ay=function(e,t){return ea(e,aj(t))},av=function(e,t,n){return ea(e,aX(t,n))},ax=function(e){var t=a0(e);return function(e,n){return ea(e,t(n))}},ab=function(e,t,n){return ea(e,a2(t,n))},aC=function(e,t,n){return ea(e,a1(t,n))},aS=function(e){var t=a$(e);return function(e,n){return ea(e,t(n))}},aw=function(e,t,n){return ea(e,a6(t,n))},aI=function(e,t){return ea(e,aN(t))},a_=function(e,t){return ea(e,aZ(t))},aT=function(e,t){return ea(e,aJ(t))},aO=function(e){var t=a5(e);return function(e,n){return ea(e,t(n))}},aR=function(e){var t=a9(e);return function(e,n){return ea(e,t(n))}},ak=function(e,t){return ea(e,uC(t))},aE=function(e,t){return ea(e,uS(t))},aM=function(){return uj},aF=function(e){return function(t){return t.concat(e())}},aj=aF,aU=function(e){return aK(function(t){return ea(e,aB(t))})},aK=function(e){return function(t){return ea(t,oO(function(t,n){return e(n)}))}},aL=aK(Z),aB=function(e){return function(t){return t.map(function(t){return e(t)})}},aP=function(e){return function(t){return t.map(function(t,n){return e(n,t)})}},aW=function(e){for(var t=[],n=[],r=0;r<e.length;r++){var i=e[r];"Left"===i._tag?t.push(i.left):n.push(i.right)}return oe(t,n)},aD=function(e){return function(t){return t.filter(e)}},aN=function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=e(r,t[r]);ef(i)&&n.push(i.value)}return n}},aq=function(e){return aN(function(t,n){return e(n)})},aQ=aq(Z),aV=function(e){return az(function(t,n){return e(n)})},az=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=t[i];e(i,o)?r.push(o):n.push(o)}return oe(n,r)}},aY=function(e){return aH(function(t,n){return e(n)})},aH=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=e(i,t[i]);"Left"===o._tag?n.push(o.left):r.push(o.right)}return oe(n,r)}},aZ=function(e){return function(t){return t.filter(function(t,n){return e(n,t)})}},aJ=function(e){return function(t){return t.map(function(n,r){return e(t.slice(r))})}},aG=aJ(Z),a$=function(e){return function(t){return function(n){return n.reduce(function(n,r,i){return e.concat(n,t(i,r))},e.empty)}}},aX=function(e,t){return a1(e,function(e,n,r){return t(n,r)})},a0=function(e){var t=a$(e);return function(e){return t(function(t,n){return e(n)})}},a1=function(e,t){return function(n){for(var r=n.length,i=e,o=0;o<r;o++)i=t(o,i,n[o]);return i}},a2=function(e,t){return a6(e,function(e,n,r){return t(n,r)})},a6=function(e,t){return function(n){return n.reduceRight(function(e,n,r){return t(r,n,e)},e)}},a5=function(e){var t=a9(e);return function(e){return t(function(t,n){return e(n)})}},a3=function(e){return function(t){return av(t,e.of(aM()),function(t,n){return e.ap(e.map(t,function(e){return function(t){return ea(e,tJ(t))}}),n)})}},a9=function(e){return function(t){return a1(e.of(aM()),function(n,r,i){return e.ap(e.map(r,function(e){return function(t){return ea(e,tJ(t))}}),t(n,i))})}},a4=function(e){var t=uw(e);return function(e){return function(n){return t(n,e)}}},a7=function(e){var t=uI(e);return function(e){return function(n){return t(n,e)}}},a8=function(e,t){for(var n=[],r=e;;){var i=t(r);if(ef(i)){var o=i.value,a=o[0],u=o[1];n.push(a),r=u}else break}return n},ue="ReadonlyArray",ut=function(e){return{show:function(t){return"[".concat(t.map(e.show).join(", "),"]")}}},un=function(){return{concat:function(e,t){return ox(e)?t:ox(t)?e:e.concat(t)}}},ur=function(){return{concat:un().concat,empty:uj}},ui=function(e){return e6(function(t,n){return t.length===n.length&&t.every(function(t,r){return e.equals(t,n[r])})})},uo=function(e){return to(function(t,n){for(var r=t.length,i=n.length,o=Math.min(r,i),a=0;a<o;a++){var u=e.compare(t[a],n[a]);if(0!==u)return u}return i1.compare(r,i)})},ua=function(e){var t=ao(e);return{concat:function(e,n){return t(n)(e)}}},uu=function(e){return{concat:ua(e).concat,empty:uj}},us=function(e){var t=aa(e);return{concat:function(e,n){return t(n)(e)}}},ul=function(e){var t=au(e);return{concat:function(e,n){return t(n)(e)}}},uc={URI:ue,map:as},ud=eB(uc),uf={URI:ue,of:ev},up={URI:ue,map:as,ap:ac},uA=eO(up),uh=eR(up),um={URI:ue,map:as,ap:ac,chain:ad},ug=eV(um),uy={URI:ue,zero:aM},uv=og(uy,uf),ux={URI:ue,compact:aQ,separate:aW},ub={URI:ue,map:as,reduce:av,foldMap:ax,reduceRight:ab,traverse:aO,sequence:a3},uC=function(e){return function(t){for(var n=ov([],e(t),!0),r=[];n.length>0;){var i=n.shift();eh(i)?n.unshift.apply(n,e(i.left)):r.push(i.right)}return r}},uS=function(e){return function(t){var n=e(t),r=[],i=[];function o(t){eh(t)?e(t.left).forEach(function(e){return r.push(e)}):i.push(t.right)}for(var a=0;a<n.length;a++)o(n[a]);for(;r.length>0;)o(r.shift());return i}},uw=oA(ub,ux),uI=op(ub,ux),u_={URI:ue,map:as,compact:aQ,separate:aW,filter:af,filterMap:ap,partition:aA,partitionMap:ah,reduce:av,foldMap:ax,reduceRight:ab,traverse:aO,sequence:a3,wither:uw,wilt:uI},uT=oh(u_),uO={URI:ue,fromEither:ow},uR=e$(uO),uk=function(e,t,n){return ex(n)?t$(e,t,n):n},uE=function(e,t){var n=t.slice();return n.splice(e,1),n},uM=function(e){return e.slice()},uF=function(e){return ox(e)?uj:e.slice()},uj=eS;function uU(e){return function(t){return t.every(e)}}var uK=function(e){return function(t){return t.some(e)}},uL=function(e){var t=rp(e);return function(n){return oI(function(){return e.empty},t(n))}},uB=ev(ew),uP=eP(uc),uW=ez(um),uD=ek(up);let uN=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:ue,map:as,alt:ay},Alternative:{URI:ue,map:as,ap:ac,of:ev,alt:ay,zero:aM},Applicative:{URI:ue,map:as,ap:ac,of:ev},Apply:up,Chain:um,ChainRecBreadthFirst:{URI:ue,map:as,ap:ac,chain:ad,chainRec:aE},ChainRecDepthFirst:{URI:ue,map:as,ap:ac,chain:ad,chainRec:ak},Compactable:ux,Do:uB,Extend:{URI:ue,map:as,extend:aT},Filterable:{URI:ue,map:as,compact:aQ,separate:aW,filter:af,filterMap:ap,partition:aA,partitionMap:ah},FilterableWithIndex:{URI:ue,map:as,mapWithIndex:al,compact:aQ,separate:aW,filter:af,filterMap:ap,partition:aA,partitionMap:ah,partitionMapWithIndex:ag,partitionWithIndex:am,filterMapWithIndex:aI,filterWithIndex:a_},Foldable:{URI:ue,reduce:av,foldMap:ax,reduceRight:ab},FoldableWithIndex:{URI:ue,reduce:av,foldMap:ax,reduceRight:ab,reduceWithIndex:aC,foldMapWithIndex:aS,reduceRightWithIndex:aw},FromEither:uO,Functor:uc,FunctorWithIndex:{URI:ue,map:as,mapWithIndex:al},Monad:{URI:ue,map:as,ap:ac,of:ev,chain:ad},Pointed:uf,Traversable:ub,TraversableWithIndex:{URI:ue,map:as,mapWithIndex:al,reduce:av,foldMap:ax,reduceRight:ab,reduceWithIndex:aC,foldMapWithIndex:aS,reduceRightWithIndex:aw,traverse:aO,sequence:a3,traverseWithIndex:aR},URI:ue,Unfoldable:{URI:ue,unfold:a8},Witherable:u_,Zero:uy,_chainRecBreadthFirst:aE,_chainRecDepthFirst:ak,alt:aj,altW:aF,ap:aU,apFirst:uA,apS:uD,apSecond:uh,append:tJ,appendW:tJ,bind:uW,bindTo:uP,chain:aK,chainFirst:ug,chainRecBreadthFirst:uS,chainRecDepthFirst:uC,chainWithIndex:oO,chop:ae,chunksOf:an,compact:aQ,comprehension:function(e,t,n){void 0===n&&(n=function(){return!0});var r=function(e,i){return ex(i)?ea(re(i),aK(function(t){return r(ea(e,tJ(t)),rt(i))})):n.apply(void 0,e)?[t.apply(void 0,e)]:uj};return r(uj,e)},concat:ai,concatW:ai,cons:rh,deleteAt:oJ,difference:au,dropLeft:oW,dropLeftWhile:function(e){return function(t){var n=oP(t,e);return 0===n?t:n===t.length?uj:t.slice(n)}},dropRight:oD,duplicate:aG,elem:o4,empty:uj,every:uU,exists:uK,extend:aJ,filter:aD,filterE:uT,filterMap:aq,filterMapWithIndex:aN,filterWithIndex:aZ,findFirst:oq,findFirstMap:oQ,findIndex:oN,findLast:oV,findLastIndex:oY,findLastMap:oz,flap:ud,flatten:aL,foldLeft:o_,foldMap:a0,foldMapWithIndex:a$,foldRight:oT,fromArray:uF,fromEither:ow,fromEitherK:uR,fromOption:oS,fromOptionK:ar,fromPredicate:function(e){return function(t){return e(t)?[t]:uj}},getDifferenceMagma:ul,getEq:ui,getIntersectionSemigroup:us,getMonoid:ur,getOrd:uo,getSemigroup:un,getShow:ut,getUnionMonoid:uu,getUnionSemigroup:ua,guard:uv,head:oF,init:oK,insertAt:oH,intercalate:uL,intersection:aa,intersperse:o3,isEmpty:ox,isNonEmpty:ex,isOutOfBound:tH,last:oj,lefts:o0,lookup:oM,makeBy:ob,map:aB,mapWithIndex:aP,match:oI,matchLeft:o_,matchLeftW:o_,matchRight:oT,matchRightW:oT,matchW:oI,modifyAt:oG,of:ev,partition:aV,partitionMap:aY,partitionMapWithIndex:aH,partitionWithIndex:az,prepend:tZ,prependAll:o5,prependToAll:o5,prependW:tZ,range:t9,readonlyArray:{URI:ue,compact:aQ,separate:aW,map:as,ap:ac,of:ev,chain:ad,filter:af,filterMap:ap,partition:aA,partitionMap:ah,mapWithIndex:al,partitionMapWithIndex:ag,partitionWithIndex:am,filterMapWithIndex:aI,filterWithIndex:a_,alt:ay,zero:aM,unfold:a8,reduce:av,foldMap:ax,reduceRight:ab,traverse:aO,sequence:a3,reduceWithIndex:aC,foldMapWithIndex:aS,reduceRightWithIndex:aw,traverseWithIndex:aR,extend:aT,wither:uw,wilt:uI},reduce:aX,reduceRight:a2,reduceRightWithIndex:a6,reduceWithIndex:a1,replicate:oC,reverse:o$,rights:oX,rotate:o9,scanLeft:oR,scanRight:ok,separate:aW,sequence:a3,size:oE,snoc:rm,some:uK,sort:o1,sortBy:o8,spanLeft:function(e){return function(t){var n,r=at(oP(t,e))(t);return{init:r[0],rest:r[1]}}},splitAt:at,tail:oU,takeLeft:oL,takeLeftWhile:function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=t[r];if(!e(i))break;n.push(i)}var o=n.length;return o===t.length?t:0===o?uj:n}},takeRight:oB,toArray:uM,traverse:a5,traverseWithIndex:a9,unfold:a8,union:ao,uniq:o7,unsafeDeleteAt:uE,unsafeInsertAt:tG,unsafeUpdateAt:uk,unzip:o6,updateAt:oZ,wilt:a7,wither:a4,zero:aM,zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:o2(t,n,function(e,t){return[e,t]})},zipWith:o2},Symbol.toStringTag,{value:"Module"}));var uq=function(e){return 0===e.length},uQ=function(e,t){return e<=0?[]:rM(t)(e)},uV=function(e,t){return uQ(e,function(){return t})},uz=function(e){return ed(e)?[]:[e.value]},uY=function(e){return eh(e)?[]:[e.right]},uH=function(e,t){return function(n){return rx(n)?t(n):e()}},uZ=function(e,t){return function(n){return rx(n)?t(iB(n),iP(n)):e()}},uJ=function(e,t){return function(n){return rx(n)?t(iD(n),iW(n)):e()}},uG=function(e){return function(t){for(var n=[],r=0;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},u$=function(e,t){return function(n){var r=n.length,i=Array(r+1);i[0]=e;for(var o=0;o<r;o++)i[o+1]=t(i[o],n[o]);return i}},uX=function(e,t){return function(n){var r=n.length,i=Array(r+1);i[r]=e;for(var o=r-1;o>=0;o--)i[o]=t(n[o],i[o+1]);return i}},u0=function(e){return e.length},u1=function(e){return rx(e)?eA(iP(e)):ep},u2=function(e){return rx(e)?eA(iD(e)):ep},u6=function(e){return function(t){return rb(e,t)?se(t):t.slice(0,e)}},u5=function(e){return function(t){return rb(e,t)?se(t):0===e?[]:t.slice(-e)}},u3=function(e,t){for(var n=e.length,r=0;r<n&&t(e[r]);r++);return r},u9=function(e){return function(t){return e<=0||uq(t)?se(t):e>=t.length?[]:t.slice(e,t.length)}},u4=function(e){return function(t){return e<=0||uq(t)?se(t):e>=t.length?[]:t.slice(0,t.length-e)}};function u7(e){return oq(e)}function u8(e){return oV(e)}var se=function(e){return e.slice()},st=function(e,t){return function(n){return e<0||e>n.length?ep:eA(lW(e,t,n))}},sn=function(e,t){return si(e,function(){return t})},sr=function(e){return function(t){return rb(e,t)?ep:eA(lN(e,t))}},si=function(e,t){return function(n){return rb(e,n)?ep:eA(lD(e,t(n[e]),n))}},so=function(e){return uq(e)?[]:e.slice().reverse()},sa=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Right"===r._tag&&t.push(r.right)}return t},su=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Left"===r._tag&&t.push(r.left)}return t},ss=function(e){return function(t){return t.length<=1?se(t):t.slice().sort(e.compare)}},sl=function(e,t,n){for(var r=[],i=Math.min(e.length,t.length),o=0;o<i;o++)r[o]=n(e[o],t[o]);return r},sc=function(e){for(var t=[],n=[],r=0;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},sd=function(e){var t=rJ(e);return function(e){return rx(e)?t(e):[]}},sf=function(e){var t=rG(e);return function(e){return rx(e)?t(e):se(e)}},sp=function(e){var t=rR(e);return function(e){return rx(e)?t(e):se(e)}},sA=function(e){var t=r_(e);return function(e){return rx(e)?t(e):se(e)}},sh=function(e){var t=rT(e);return function(e){return rx(e)?t(e):se(e)}},sm=function(e){var t=rX(e);return function(e){return rx(e)?t(e):[]}},sg=function(e){return function(t){return e>=1&&rx(t)?r0(e)(t):uq(t)?[se(t),[]]:[[],se(t)]}},sy=function(e){var t=r1(e);return function(e){return rx(e)?t(e):[]}},sv=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return uz(e.apply(void 0,t))}},sx=function(e){return function(t){return uq(t)?se(e):uq(e)?se(t):t.concat(e)}};function sb(e){var t=rO(e);return function(n,r){if(void 0===r){var i=sb(e);return function(e){return i(e,n)}}return rx(n)&&rx(r)?t(r)(n):rx(n)?se(n):se(r)}}function sC(e){var t=o4(e);return function(n,r){if(void 0===r){var i=sC(e);return function(e){return i(e,n)}}return n.filter(function(e){return t(e,r)})}}function sS(e){var t=o4(e);return function(n,r){if(void 0===r){var i=sS(e);return function(e){return i(e,n)}}return n.filter(function(e){return!t(e,r)})}}var sw=function(e,t){return ea(e,sY(t))},sI=function(e,t){return ea(e,sG(t))},s_=function(e,t){return ea(e,sH(t))},sT=function(e,t){return ea(e,sZ(t))},sO=function(e,t){return ea(e,s2(t))},sR=function(e,t){return ea(e,sX(t))},sk=function(e,t){return ea(e,s6(t))},sE=function(e,t){return ea(e,s3(t))},sM=function(e,t){return ea(e,s5(t))},sF=function(e,t){return ea(e,s9(t))},sj=function(e,t){return ea(e,s7(t))},sU=function(e,t,n){return ea(e,li(t,n))},sK=function(e){var t=ln(e);return function(e,n){return ea(e,t(n))}},sL=function(e,t,n){return ea(e,la(t,n))},sB=function(e,t,n){return ea(e,lo(t,n))},sP=function(e){var t=lr(e);return function(e,n){return ea(e,t(n))}},sW=function(e,t,n){return ea(e,lu(t,n))},sD=function(e,t){return ea(e,s$(t))},sN=function(e,t){return ea(e,s8(t))},sq=function(e,t){return ea(e,le(t))},sQ=function(e){var t=ls(e);return function(e,n){return ea(e,t(n))}},sV=function(e){var t=lc(e);return function(e,n){return ea(e,t(n))}},sz=function(){return[]},sY=function(e){return function(t){return t.map(function(t){return e(t)})}},sH=function(e){return sZ(function(t){return ea(e,sY(t))})},sZ=function(e){return function(t){return ea(t,uG(function(t,n){return e(n)}))}},sJ=sZ(Z),sG=function(e){return function(t){return t.map(function(t,n){return e(n,t)})}},s$=function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=e(r,t[r]);ef(i)&&n.push(i.value)}return n}},sX=function(e){return s$(function(t,n){return e(n)})},s0=sX(Z),s1=function(e){for(var t=[],n=[],r=0;r<e.length;r++){var i=e[r];"Left"===i._tag?t.push(i.left):n.push(i.right)}return oe(t,n)},s2=function(e){return function(t){return t.filter(e)}},s6=function(e){return s5(function(t,n){return e(n)})},s5=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=t[i];e(i,o)?r.push(o):n.push(o)}return oe(n,r)}},s3=function(e){return s9(function(t,n){return e(n)})},s9=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=e(i,t[i]);"Left"===o._tag?n.push(o.left):r.push(o.right)}return oe(n,r)}},s4=function(e){return function(t){return t.concat(e())}},s7=s4,s8=function(e){return function(t){return t.filter(function(t,n){return e(n,t)})}},le=function(e){return function(t){return t.map(function(n,r){return e(t.slice(r))})}},lt=le(Z),ln=a0,lr=a$,li=aX,lo=a1,la=a2,lu=a6,ls=function(e){var t=lc(e);return function(e){return t(function(t,n){return e(n)})}},ll=function(e){return function(t){return sU(t,e.of(sz()),function(t,n){return e.ap(e.map(t,function(e){return function(t){return ea(e,rS(t))}}),n)})}},lc=function(e){return function(t){return lo(e.of(sz()),function(n,r,i){return e.ap(e.map(r,function(e){return function(t){return ea(e,rS(t))}}),t(n,i))})}},ld=function(e){var t=lj(e);return function(e){return function(n){return t(n,e)}}},lf=function(e){var t=lU(e);return function(e){return function(n){return t(n,e)}}},lp=function(e,t){for(var n=[],r=e;;){var i=t(r);if(ef(i)){var o=i.value,a=o[0],u=o[1];n.push(a),r=u}else break}return n},lA="Array",lh=function(){return{concat:function(e,t){return e.concat(t)}}},lm=function(){return{concat:lh().concat,empty:[]}},lg=function(e){var t=sb(e);return{concat:function(e,n){return t(n)(e)}}},ly=function(e){return{concat:lg(e).concat,empty:[]}},lv=function(e){var t=sC(e);return{concat:function(e,n){return t(n)(e)}}},lx=function(e){var t=sS(e);return{concat:function(e,n){return t(n)(e)}}},lb={URI:lA,map:sw},lC=eB(lb),lS={URI:lA,of:rY},lw={URI:lA,map:sw,ap:s_},lI=eO(lw),l_=eR(lw),lT={URI:lA,map:sw,ap:s_,chain:sT},lO=eV(lT),lR={URI:lA,zero:sz},lk=og(lR,lS),lE={URI:lA,compact:s0,separate:s1},lM={URI:lA,reduce:sU,foldMap:sK,reduceRight:sL},lF={URI:lA,map:sw,reduce:sU,foldMap:sK,reduceRight:sL,traverse:sQ,sequence:ll},lj=oA(lF,lE),lU=op(lF,lE),lK={URI:lA,map:sw,compact:s0,separate:s1,filter:sO,filterMap:sR,partition:sk,partitionMap:sE,reduce:sU,foldMap:sK,reduceRight:sL,traverse:sQ,sequence:ll,wither:lj,wilt:lU},lL=oh(lK),lB={URI:lA,fromEither:uY},lP=e$(lB),lW=rw,lD=function(e,t,n){return rx(n)?rI(e,t,n):[]},lN=function(e,t){var n=t.slice();return n.splice(e,1),n},lq=function(e){return function(t){return t.some(e)}},lQ=rY(ew),lV=eP(lb),lz=ez(lT),lY=ek(lw);let lH=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:lA,map:sw,alt:sj},Alternative:{URI:lA,map:sw,ap:s_,of:rY,alt:sj,zero:sz},Applicative:{URI:lA,map:sw,ap:s_,of:rY},Apply:lw,Chain:lT,ChainRecBreadthFirst:{URI:lA,map:sw,ap:s_,chain:sT,chainRec:aE},ChainRecDepthFirst:{URI:lA,map:sw,ap:s_,chain:sT,chainRec:ak},Compactable:lE,Do:lQ,Extend:{URI:lA,map:sw,extend:sq},Filterable:{URI:lA,map:sw,compact:s0,separate:s1,filter:sO,filterMap:sR,partition:sk,partitionMap:sE},FilterableWithIndex:{URI:lA,map:sw,mapWithIndex:sI,compact:s0,separate:s1,filter:sO,filterMap:sR,partition:sk,partitionMap:sE,partitionMapWithIndex:sF,partitionWithIndex:sM,filterMapWithIndex:sD,filterWithIndex:sN},Foldable:lM,FoldableWithIndex:{URI:lA,reduce:sU,foldMap:sK,reduceRight:sL,reduceWithIndex:sB,foldMapWithIndex:sP,reduceRightWithIndex:sW},FromEither:lB,Functor:lb,FunctorWithIndex:{URI:lA,map:sw,mapWithIndex:sI},Monad:{URI:lA,map:sw,ap:s_,of:rY,chain:sT},Pointed:lS,Traversable:lF,TraversableWithIndex:{URI:lA,map:sw,mapWithIndex:sI,reduce:sU,foldMap:sK,reduceRight:sL,reduceWithIndex:sB,foldMapWithIndex:sP,reduceRightWithIndex:sW,traverse:sQ,sequence:ll,traverseWithIndex:sV},URI:lA,Unfoldable:{URI:lA,unfold:lp},Witherable:lK,Zero:lR,alt:s7,altW:s4,ap:sH,apFirst:lI,apS:lY,apSecond:l_,append:rS,appendW:rS,array:{URI:lA,compact:s0,separate:s1,map:sw,ap:s_,of:rY,chain:sT,filter:sO,filterMap:sR,partition:sk,partitionMap:sE,mapWithIndex:sI,partitionMapWithIndex:sF,partitionWithIndex:sM,filterMapWithIndex:sD,filterWithIndex:sN,alt:sj,zero:sz,unfold:lp,reduce:sU,foldMap:sK,reduceRight:sL,traverse:sQ,sequence:ll,reduceWithIndex:sB,foldMapWithIndex:sP,reduceRightWithIndex:sW,traverseWithIndex:sV,extend:sq,wither:lj,wilt:lU},bind:lz,bindTo:lV,chain:sZ,chainFirst:lO,chainRecBreadthFirst:uS,chainRecDepthFirst:uC,chainWithIndex:uG,chop:sm,chunksOf:sy,compact:s0,comprehension:function(e,t,n){void 0===n&&(n=function(){return!0});var r=function(e,i){return rx(i)?ea(iB(i),sZ(function(t){return r(ea(e,rS(t)),iP(i))})):n.apply(void 0,e)?[t.apply(void 0,e)]:[]};return r([],e)},concat:sx,concatW:sx,cons:iJ,copy:se,deleteAt:sr,difference:sS,dropLeft:u9,dropLeftWhile:function(e){return function(t){return t.slice(u3(t,e))}},dropRight:u4,duplicate:lt,elem:o4,empty:[],every:uU,exists:lq,extend:le,filter:s2,filterE:lL,filterMap:sX,filterMapWithIndex:s$,filterWithIndex:s8,findFirst:u7,findFirstMap:oQ,findIndex:oN,findLast:u8,findLastIndex:oY,findLastMap:oz,flap:lC,flatten:sJ,foldLeft:uZ,foldMap:ln,foldMapWithIndex:lr,foldRight:uJ,fromEither:uY,fromEitherK:lP,fromOption:uz,fromOptionK:sv,fromPredicate:function(e){return function(t){return e(t)?[t]:[]}},getDifferenceMagma:lx,getEq:ui,getIntersectionSemigroup:lv,getMonoid:lm,getOrd:uo,getSemigroup:lh,getShow:ut,getUnionMonoid:ly,getUnionSemigroup:lg,guard:lk,head:oF,init:u2,insertAt:st,intercalate:uL,intersection:sC,intersperse:sf,isEmpty:uq,isNonEmpty:rx,isOutOfBound:rb,last:oj,lefts:su,lookup:oM,makeBy:uQ,map:sY,mapWithIndex:sG,match:uH,matchLeft:uZ,matchLeftW:uZ,matchRight:uJ,matchRightW:uJ,matchW:uH,modifyAt:si,of:rY,partition:s6,partitionMap:s3,partitionMapWithIndex:s9,partitionWithIndex:s5,prepend:rC,prependAll:sd,prependToAll:sd,prependW:rC,range:rj,reduce:li,reduceRight:la,reduceRightWithIndex:lu,reduceWithIndex:lo,replicate:uV,reverse:so,rights:sa,rotate:sp,scanLeft:u$,scanRight:uX,separate:s1,sequence:ll,size:u0,snoc:iG,some:lq,sort:ss,sortBy:sh,spanLeft:function(e){return function(t){var n,r=sg(u3(t,e))(t);return{init:r[0],rest:r[1]}}},splitAt:sg,tail:u1,takeLeft:u6,takeLeftWhile:function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=t[r];if(!e(i))break;n.push(i)}return n}},takeRight:u5,traverse:ls,traverseWithIndex:lc,unfold:lp,union:sb,uniq:sA,unsafeDeleteAt:lN,unsafeInsertAt:lW,unsafeUpdateAt:lD,unzip:sc,updateAt:sn,wilt:lf,wither:ld,zero:sz,zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:sl(t,n,function(e,t){return[e,t]})},zipWith:sl},Symbol.toStringTag,{value:"Module"})),lZ=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var lJ=function(e){return"boolean"==typeof e},lG=function(e,t){return function(n){return n?t():e()}},l$={equals:function(e,t){return e===t}},lX={concat:function(e,t){return e&&t}},l0={concat:function(e,t){return e||t}},l1={concat:lX.concat,empty:!0},l2={concat:l0.concat,empty:!1},l6={equals:l$.equals,compare:function(e,t){return e<t?-1:e>t?1:0}};let l5=Object.freeze(Object.defineProperty({__proto__:null,BooleanAlgebra:{meet:function(e,t){return e&&t},join:function(e,t){return e||t},zero:!1,one:!0,implies:function(e,t){return!e||t},not:function(e){return!e}},Eq:l$,MonoidAll:l1,MonoidAny:l2,Ord:l6,SemigroupAll:lX,SemigroupAny:l0,Show:{show:function(e){return JSON.stringify(e)}},fold:lG,foldW:lG,isBoolean:lJ,match:lG,matchW:lG},Symbol.toStringTag,{value:"Module"}));var l3=function(e){return{meet:function(t,n){return e.join(t,n)},join:function(t,n){return e.meet(t,n)},zero:e.one,one:e.zero,implies:function(t,n){return e.join(e.not(t),n)},not:e.not}};let l9=Object.freeze(Object.defineProperty({__proto__:null,booleanAlgebraBoolean:{meet:function(e,t){return e&&t},join:function(e,t){return e||t},zero:!1,one:!0,implies:function(e,t){return!e||t},not:function(e){return!e}},booleanAlgebraVoid:{meet:function(){},join:function(){},zero:void 0,one:void 0,implies:function(){},not:function(){}},getDualBooleanAlgebra:l3,getFunctionBooleanAlgebra:q,reverse:l3},Symbol.toStringTag,{value:"Module"}));var l4=function(e){return tx(e)(e.bottom,e.top)},l7=function(e){var t=tu(e);return{equals:t.equals,compare:t.compare,top:e.bottom,bottom:e.top}},l8={equals:tC.equals,compare:tC.compare,top:1/0,bottom:-1/0};let ce=Object.freeze(Object.defineProperty({__proto__:null,boundedNumber:l8,clamp:l4,reverse:l7},Symbol.toStringTag,{value:"Module"}));function ct(e){return{meet:ty(e),join:tv(e)}}let cn=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxDistributiveLattice:ct},Symbol.toStringTag,{value:"Module"})),cr=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxBoundedDistributiveLattice:function(e){var t=ct(e);return function(e,n){return{join:t.join,meet:t.meet,zero:e,one:n}}}},Symbol.toStringTag,{value:"Module"})),ci=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),co=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),ca=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),cu=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var cs=function(e,t){for(var n=t(e);"Left"===n._tag;)n=t(n.left);return n.right};let cl=Object.freeze(Object.defineProperty({__proto__:null,tailRec:cs},Symbol.toStringTag,{value:"Module"}));function cc(e,t){return function(n,r){return t.compose(e.right(r),e.left(n))}}function cd(e,t){var n=cc(e,t);return function(r,i){return t.compose(e.promap(t.id(),function(e){return"Left"===e._tag?e.left:e.right},Z),n(r,i))}}let cf=Object.freeze(Object.defineProperty({__proto__:null,fanIn:cd,fanin:function(e){return cd(e,e)},split:cc,splitChoice:function(e){return cc(e,e)}},Symbol.toStringTag,{value:"Module"})),cp=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var cA=function(e,t){return ea(e,ch(t))},ch=function(e){return function(t){return et(e,t)}},cm="Predicate",cg=function(){return{concat:function(e,t){return ea(e,cC(t))}}},cy=function(){return{concat:cg().concat,empty:$}},cv=function(){return{concat:function(e,t){return ea(e,cS(t))}}},cx=function(){return{concat:cv().concat,empty:G}},cb=function(e){return function(t){return!e(t)}},cC=function(e){return function(t){return function(n){return t(n)||e(n)}}},cS=function(e){return function(t){return function(n){return t(n)&&e(n)}}};let cw=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:{URI:cm,contramap:cA},URI:cm,and:cS,contramap:ch,getMonoidAll:cx,getMonoidAny:cy,getSemigroupAll:cv,getSemigroupAny:cg,not:cb,or:cC},Symbol.toStringTag,{value:"Module"}));function cI(e){return function(t){return e(t)?eA(t):ep}}var c_=function(e){return"Right"===e._tag?ep:eA(e.left)},cT=function(e){return"Left"===e._tag?ep:eA(e.right)},cO=function(e,t){return ea(e,cz(t))},cR=function(e,t){return ea(e,cZ(t))},ck=function(e,t){return ea(e,c$(t))},cE=function(e,t,n){return ea(e,c0(t,n))},cM=function(e){var t=c1(e);return function(e,n){return ea(e,t(n))}},cF=function(e,t,n){return ea(e,c2(t,n))},cj=function(e){var t=dl(e);return function(e,n){return ea(e,t(n))}},cU=function(e,t){return ea(e,c5(t))},cK=function(e,t){return ea(e,dr(t))},cL=function(e,t){return ea(e,di(t))},cB=function(e,t){return ea(e,c7(t))},cP=function(e,t){return ea(e,da(t))},cW=function(e,t){return ea(e,du(t))},cD="Option",cN=function(e){return{show:function(t){return dv(t)?"none":"some(".concat(e.show(t.value),")")}}},cq=function(e){return{equals:function(t,n){return t===n||(dv(t)?dv(n):!dv(n)&&e.equals(t.value,n.value))}}},cQ=function(e){return{equals:cq(e).equals,compare:function(t,n){return t===n?0:dy(t)?dy(n)?e.compare(t.value,n.value):1:-1}}},cV=function(e){return{concat:function(t,n){return dv(t)?n:dv(n)?t:eA(e.concat(t.value,n.value))},empty:ep}},cz=function(e){return function(t){return dv(t)?ep:eA(e(t.value))}},cY={URI:cD,map:cO},cH={URI:cD,of:eA},cZ=function(e){return function(t){return dv(t)||dv(e)?ep:eA(t.value(e.value))}},cJ={URI:cD,map:cO,ap:cR},cG={URI:cD,map:cO,ap:cR,of:eA},c$=function(e){return function(t){return dv(t)?ep:e(t.value)}},cX={URI:cD,map:cO,ap:cR,chain:ck},c0=function(e,t){return function(n){return dv(n)?e:t(e,n.value)}},c1=function(e){return function(t){return function(n){return dv(n)?e.empty:t(n.value)}}},c2=function(e,t){return function(n){return dv(n)?e:t(n.value,e)}},c6=function(e){return function(t){return dv(t)?e():t}},c5=c6,c3=function(){return ep},c9={URI:cD,zero:c3},c4=og(c9,cH),c7=function(e){return function(t){return dv(t)?ep:eA(e(t))}},c8=c$(Z),de=oe(ep,ep),dt=function(e){return dv(e)?de:oe(c_(e.value),cT(e.value))},dn={URI:cD,compact:c8,separate:dt},dr=function(e){return function(t){return dv(t)?ep:e(t.value)?t:ep}},di=function(e){return function(t){return dv(t)?ep:e(t.value)}},da=function(e){return function(t){return oe(cK(t,cb(e)),cK(t,e))}},du=function(e){return et(cz(e),dt)},ds={URI:cD,map:cO,compact:c8,separate:dt,filter:cK,filterMap:cL,partition:cP,partitionMap:cW},dl=function(e){return function(t){return function(n){return dv(n)?e.of(ep):e.map(t(n.value),eA)}}},dc=function(e){return function(t){return dv(t)?e.of(ep):e.map(t.value,eA)}},dd={URI:cD,map:cO,reduce:cE,foldMap:cM,reduceRight:cF,traverse:cj,sequence:dc},df=oA(dd,dn),dp=op(dd,dn),dA=function(e){var t=df(e);return function(e){return function(n){return t(n,e)}}},dh=function(e){var t=dp(e);return function(e){return function(n){return t(n,e)}}},dm=function(){return ep},dg={URI:cD,fromEither:cT},dy=ef,dv=function(e){return"None"===e._tag},dx=function(e,t){return function(n){return dv(n)?e():t(n.value)}},db=function(e){return function(t){return dv(t)?e():t.value}},dC=eB(cY),dS=eO(cJ),dw=eR(cJ),dI=eV(cX),d_=c7(Z),dT=e$(dg),dO=eX(dg,cX),dR=e0(dg,cX),dk=function(e){return null==e?ep:eA(e)},dE=function(e){try{return eA(e())}catch{return ep}},dM=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return dE(function(){return e.apply(void 0,t)})}},dF=function(e){return et(e,dk)},dj=function(e){return function(t){return dv(t)?ep:dk(e(t.value))}},dU=dx(X,Z),dK=dx(ee,Z),dL=function(e){return function(t){return!dv(t)&&e(t.value)}},dB=eA(ew),dP=eP(cY),dW=ez(cX),dD=ek(cJ),dN=eA(eS),dq=function(e){return function(t){var n=e(0,eb(t));if(dv(n))return ep;for(var r=[n.value],i=1;i<t.length;i++){var o=e(i,t[i]);if(dv(o))return ep;r.push(o.value)}return eA(r)}},dQ=function(e){var t=dq(e);return function(e){return ex(e)?t(e):dN}},dV=function(e){return dQ(function(t,n){return e(n)})},dz=dV(Z),dY={URI:cD,map:cO,of:eA,ap:cR,chain:ck,reduce:cE,foldMap:cM,reduceRight:cF,traverse:cj,sequence:dc,zero:c3,alt:cU,extend:cB,compact:c8,separate:dt,filter:cK,filterMap:cL,partition:cP,partitionMap:cW,wither:df,wilt:dp,throwError:dm},dH=eE(cJ),dZ=eN(cG),dJ=function(){return cV(tL())},dG=function(){return cV(tB())};let d$=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:cD,map:cO,alt:cU},Alternative:{URI:cD,map:cO,ap:cR,of:eA,alt:cU,zero:c3},ApT:dN,Applicative:cG,Apply:cJ,Chain:cX,Compactable:dn,Do:dB,Extend:{URI:cD,map:cO,extend:cB},Filterable:ds,Foldable:{URI:cD,reduce:cE,foldMap:cM,reduceRight:cF},FromEither:dg,Functor:cY,Monad:{URI:cD,map:cO,ap:cR,of:eA,chain:ck},MonadThrow:{URI:cD,map:cO,ap:cR,of:eA,chain:ck,throwError:dm},Pointed:cH,Traversable:dd,URI:cD,Witherable:{URI:cD,map:cO,reduce:cE,foldMap:cM,reduceRight:cF,traverse:cj,sequence:dc,compact:c8,separate:dt,filter:cK,filterMap:cL,partition:cP,partitionMap:cW,wither:df,wilt:dp},Zero:c9,alt:c5,altW:c6,ap:cZ,apFirst:dS,apS:dD,apSecond:dw,bind:dW,bindTo:dP,chain:c$,chainEitherK:dO,chainFirst:dI,chainFirstEitherK:dR,chainNullableK:dj,compact:c8,duplicate:d_,elem:function e(t){return function(n,r){if(void 0===r){var i=e(t);return function(e){return i(n,e)}}return!dv(r)&&t.equals(n,r.value)}},exists:dL,extend:c7,filter:dr,filterMap:di,flap:dC,flatten:c8,fold:dx,foldMap:c1,foldW:dx,fromEither:cT,fromEitherK:dT,fromNullable:dk,fromNullableK:dF,fromPredicate:cI,getApplyMonoid:dZ,getApplySemigroup:dH,getEq:cq,getFirstMonoid:dJ,getLastMonoid:dG,getLeft:c_,getMonoid:cV,getOrElse:db,getOrElseW:db,getOrd:cQ,getRefinement:function(e){return function(t){return dy(e(t))}},getRight:cT,getShow:cN,guard:c4,isNone:dv,isSome:dy,map:cz,mapNullable:dj,match:dx,matchW:dx,none:ep,of:eA,option:dY,partition:da,partitionMap:du,reduce:c0,reduceRight:c2,separate:dt,sequence:dc,sequenceArray:dz,some:eA,throwError:dm,toNullable:dU,toUndefined:dK,traverse:dl,traverseArray:dV,traverseArrayWithIndex:dQ,traverseReadonlyArrayWithIndex:dQ,traverseReadonlyNonEmptyArrayWithIndex:dq,tryCatch:dE,tryCatchK:dM,wilt:dh,wither:dA,zero:c3},Symbol.toStringTag,{value:"Module"}));function dX(e,t){return function(n){return e.map(n,t.compact)}}function d0(e,t,n){var r=dX(e,t),i=eL(e,n);return function(e){return oe(r(ea(e,i(c_))),r(ea(e,i(cT))))}}let d1=Object.freeze(Object.defineProperty({__proto__:null,compact:dX,getCompactableComposition:function(e,t){return{map:eW(e,t).map,compact:dX(e,t),separate:d0(e,t,t)}},separate:d0},Symbol.toStringTag,{value:"Module"}));var d2=function(e){return function(){return console.log(e)}},d6=function(e){return function(){return console.warn(e)}},d5=function(e){return function(){return console.error(e)}},d3=function(e){return function(){return console.info(e)}};let d9=Object.freeze(Object.defineProperty({__proto__:null,error:d5,info:d3,log:d2,warn:d6},Symbol.toStringTag,{value:"Module"}));function d4(e){return{URI:fu,_E:void 0,map:fe,ap:function(t,n){return Z(e.concat(t,n))}}}function d7(e){var t=d4(e);return{URI:fu,_E:void 0,map:t.map,ap:t.ap,of:function(){return Z(e.empty)}}}var d8=function(e,t){return ea(e,fr())},fe=function(e,t){return ea(e,fi())},ft=function(e,t,n){return ea(e,fo(t))},fn=function(e,t){return ea(e,fa(t))},fr=function(){return Z},fi=function(){return Z},fo=function(e){return function(t){return Z(e(t))}},fa=function(e){return function(t){return Z(e(t))}},fu="Const",fs={URI:fu,map:fe},fl=eB(fs);let fc=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:{URI:fu,bimap:ft,mapLeft:fn},Contravariant:{URI:fu,contramap:d8},Functor:fs,URI:fu,bimap:fo,const_:{URI:fu,map:fe,contramap:d8,bimap:ft,mapLeft:fn},contramap:fr,flap:fl,getApplicative:d7,getApply:d4,getBooleanAlgebra:Z,getBounded:Z,getEq:Z,getHeytingAlgebra:Z,getMonoid:Z,getOrd:Z,getRing:Z,getSemigroup:Z,getSemiring:Z,getShow:function(e){return{show:function(t){return"make(".concat(e.show(t),")")}}},make:Z,map:fi,mapLeft:fa},Symbol.toStringTag,{value:"Module"})),fd=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var ff=ea(i1,ts(function(e){return e.valueOf()})),fp=function(){return new Date},fA=function(){return new Date().getTime()};let fh=Object.freeze(Object.defineProperty({__proto__:null,Eq:{equals:function(e,t){return e.valueOf()===t.valueOf()}},Ord:ff,create:fp,eqDate:{equals:function(e,t){return e.getDate()===t.getDate()}},eqMonth:{equals:function(e,t){return e.getMonth()===t.getMonth()}},eqYear:{equals:function(e,t){return e.getFullYear()===t.getFullYear()}},now:fA},Symbol.toStringTag,{value:"Module"}));var fm=function(e,t){return ea(e,fL(t))},fg=function(e,t){return ea(e,fD(t))},fy=function(e,t){return ea(e,fV(t))},fv=function(e,t,n){return ea(e,fY(t,n))},fx=function(e){return function(t,n){var r=fH(e);return ea(t,r(n))}},fb=function(e,t,n){return ea(e,fZ(t,n))},fC=function(e){var t=fJ(e);return function(e,n){return ea(e,t(n))}},fS=function(e,t,n){return ea(e,fX(t,n))},fw=function(e,t){return ea(e,f0(t))},fI=function(e,t){return ea(e,f2(t))},f_=function(e,t){return ea(e,f6(t))},fT=function(e,t){return cs(t(e),function(e){return f4(e)?ey(eg(e.left)):f4(e.right)?eg(t(e.right.left)):ey(ey(e.right.right))})},fO="Either",fR=function(e,t){return{show:function(n){return f4(n)?"left(".concat(e.show(n.left),")"):"right(".concat(t.show(n.right),")")}}},fk=function(e,t){return{equals:function(n,r){return n===r||(f4(n)?f4(r)&&e.equals(n.left,r.left):f7(r)&&t.equals(n.right,r.right))}}},fE=function(e){return{concat:function(t,n){return f4(n)?t:f4(t)?n:ey(e.concat(t.right,n.right))}}},fM=function(e){var t=eg(e.empty);return{URI:fO,_E:void 0,compact:function(e){return f4(e)?e:"None"===e.right._tag?t:ey(e.right.value)},separate:function(e){return f4(e)?oe(e,e):f4(e.right)?oe(ey(e.right.left),t):oe(t,ey(e.right.right))}}},fF=function(e){var t,n=eg(e.empty),r=fM(e),i=r.compact;return{URI:fO,_E:void 0,map:fm,compact:i,separate:r.separate,filter:function(e,t){return f4(e)||t(e.right)?e:n},filterMap:function(e,t){if(f4(e))return e;var r=t(e.right);return"None"===r._tag?n:ey(r.value)},partition:function(e,t){return f4(e)?oe(e,e):t(e.right)?oe(n,ey(e.right)):oe(ey(e.right),n)},partitionMap:function(e,t){if(f4(e))return oe(e,e);var r=t(e.right);return f4(r)?oe(ey(r.left),n):oe(n,ey(r.right))}}},fj=function(e){var t=fF(e),n=fM(e);return{URI:fO,_E:void 0,map:fm,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:fC,sequence:fG,reduce:fv,foldMap:fx,reduceRight:fb,wither:oA(f$,n),wilt:op(f$,n)}},fU=function(e){return{URI:fO,_E:void 0,map:fm,ap:function(t,n){return f4(t)?f4(n)?eg(e.concat(t.left,n.left)):t:f4(n)?n:ey(t.right(n.right))},of:fP}},fK=function(e){return{URI:fO,_E:void 0,map:fm,alt:function(t,n){if(f7(t))return t;var r=n();return f4(r)?eg(e.concat(t.left,r.left)):r}}},fL=function(e){return function(t){return f4(t)?t:ey(e(t.right))}},fB={URI:fO,map:fm},fP=ey,fW=function(e){return function(t){return f4(t)?t:f4(e)?e:ey(t.right(e.right))}},fD=fW,fN={URI:fO,map:fm,ap:fg},fq={URI:fO,map:fm,ap:fg,of:fP},fQ=function(e){return function(t){return f4(t)?t:e(t.right)}},fV=fQ,fz={URI:fO,map:fm,ap:fg,chain:fy},fY=function(e,t){return function(n){return f4(n)?e:t(e,n.right)}},fH=function(e){return function(t){return function(n){return f4(n)?e.empty:t(n.right)}}},fZ=function(e,t){return function(n){return f4(n)?e:t(n.right,e)}},fJ=function(e){return function(t){return function(n){return f4(n)?e.of(eg(n.left)):e.map(t(n.right),ey)}}},fG=function(e){return function(t){return f4(t)?e.of(eg(t.left)):e.map(t.right,ey)}},f$={URI:fO,map:fm,reduce:fv,foldMap:fx,reduceRight:fb,traverse:fC,sequence:fG},fX=function(e,t){return function(n){return f4(n)?eg(e(n.left)):ey(t(n.right))}},f0=function(e){return function(t){return f4(t)?eg(e(t.left)):t}},f1=function(e){return function(t){return f4(t)?e():t}},f2=f1,f6=function(e){return function(t){return f4(t)?t:ey(e(t))}},f5={URI:fO,fromEither:Z},f3=eZ(f5),f9=eH(f5),f4=eh,f7=em,f8=function(e,t){return function(n){return f4(n)?e(n.left):t(n.right)}},pe=function(e){return function(t){return f4(t)?e(t.left):t.right}},pt=eB(fB),pn=eO(fN),pr=eR(fN),pi=eV(fz),po=fQ(Z),pa=f6(Z),pu=eJ(f5),ps=eG(f5,fz),pl=e1(f5,fz),pc=function(e){return f4(e)?ey(e.left):eg(e.right)},pd=function(e){return function(t){return f4(t)?e(t.left):t}},pf=function(e){return function(t){return null==t?eg(e):ey(t)}},pp=function(e,t){try{return ey(e())}catch(n){return eg(t(n))}},pA=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return pp(function(){return e.apply(void 0,n)},t)}},ph=function(e){var t=pf(e);return function(e){return et(e,t)}},pm=function(e){var t=ph(e);return function(e){return fV(t(e))}},pg=f8(Z,Z),py=function(e){return function(t){return!f4(t)&&e(t.right)}},pv=fP(ew),px=eP(fB),pb=ez(fz),pC=ek(fN),pS=fP(eS),pw=function(e){return function(t){var n=e(0,eb(t));if(f4(n))return n;for(var r=[n.right],i=1;i<t.length;i++){var o=e(i,t[i]);if(f4(o))return o;r.push(o.right)}return ey(r)}},pI=function(e){var t=pw(e);return function(e){return ex(e)?t(e):pS}},p_=function(e){return pI(function(t,n){return e(n)})},pT=p_(Z),pO=function(e,t){return pp(function(){var t=JSON.stringify(e);if("string"!=typeof t)throw Error("Converting unsupported structure to JSON");return t},t)},pR=eE(fN),pk=eN(fq),pE=function(e,t){return eE(fU(e))(t)},pM=function(e,t){return eN(fU(e))(t)};let pF=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:fO,map:fm,alt:fI},ApT:pS,Applicative:fq,Apply:fN,Bifunctor:{URI:fO,bimap:fS,mapLeft:fw},Chain:fz,ChainRec:{URI:fO,map:fm,ap:fg,chain:fy,chainRec:fT},Do:pv,Extend:{URI:fO,map:fm,extend:f_},Foldable:{URI:fO,reduce:fv,foldMap:fx,reduceRight:fb},FromEither:f5,Functor:fB,Monad:{URI:fO,map:fm,ap:fg,of:fP,chain:fy},MonadThrow:{URI:fO,map:fm,ap:fg,of:fP,chain:fy,throwError:eg},Pointed:{URI:fO,of:fP},Traversable:f$,URI:fO,alt:f2,altW:f1,ap:fD,apFirst:pn,apFirstW:pn,apS:pC,apSW:pC,apSecond:pr,apSecondW:pr,apW:fW,bimap:fX,bind:pb,bindTo:px,bindW:pb,chain:fV,chainFirst:pi,chainFirstW:pi,chainNullableK:pm,chainOptionK:ps,chainW:fQ,duplicate:pa,either:{URI:fO,map:fm,of:fP,ap:fg,chain:fy,reduce:fv,foldMap:fx,reduceRight:fb,traverse:fC,sequence:fG,bimap:fS,mapLeft:fw,alt:fI,extend:f_,chainRec:fT,throwError:eg},elem:function e(t){return function(n,r){if(void 0===r){var i=e(t);return function(e){return i(n,e)}}return!f4(r)&&t.equals(n,r.right)}},exists:py,extend:f6,filterOrElse:pl,filterOrElseW:pl,flap:pt,flatten:po,flattenW:po,fold:f8,foldMap:fH,foldW:f8,fromNullable:pf,fromNullableK:ph,fromOption:f9,fromOptionK:pu,fromPredicate:f3,getAltValidation:fK,getApplicativeValidation:fU,getApplyMonoid:pk,getApplySemigroup:pR,getCompactable:fM,getEq:fk,getFilterable:fF,getOrElse:pe,getOrElseW:pe,getSemigroup:fE,getShow:fR,getValidation:function(e){var t=fU(e).ap,n=fK(e).alt;return{URI:fO,_E:void 0,map:fm,of:fP,chain:fy,bimap:fS,mapLeft:fw,reduce:fv,foldMap:fx,reduceRight:fb,extend:f_,traverse:fC,sequence:fG,chainRec:fT,throwError:eg,ap:t,alt:n}},getValidationMonoid:pM,getValidationSemigroup:pE,getWitherable:fj,isLeft:f4,isRight:f7,left:eg,map:fL,mapLeft:f0,match:f8,matchW:f8,of:fP,orElse:pd,orElseW:pd,parseJSON:function(e,t){return pp(function(){return JSON.parse(e)},t)},reduce:fY,reduceRight:fZ,right:ey,sequence:fG,sequenceArray:pT,stringifyJSON:pO,swap:pc,throwError:eg,toError:function(e){return e instanceof Error?e:Error(String(e))},toUnion:pg,traverse:fJ,traverseArray:p_,traverseArrayWithIndex:pI,traverseReadonlyArrayWithIndex:pI,traverseReadonlyNonEmptyArrayWithIndex:pw,tryCatch:pp,tryCatchK:pA},Symbol.toStringTag,{value:"Module"}));function pj(e){return et(ey,e.of)}function pU(e){return et(eg,e.of)}function pK(e){return function(t){return e.map(t,ey)}}function pL(e){return function(t){return e.map(t,eg)}}function pB(e){return function(t){return et(pf(t),e.of)}}function pP(e){var t=pB(e);return function(e){var n=t(e);return function(e){return et(e,n)}}}function pW(e){var t=pq(e),n=pP(e);return function(e){var r=n(e);return function(e){return t(r(e))}}}function pD(e){return eL(e,fB)}function pN(e){return eT(e,fN)}function pq(e){return function(t){return function(n){return e.chain(n,function(n){return f4(n)?e.of(n):t(n.right)})}}}function pQ(e){return function(t){return function(n){return e.chain(n,function(n){return f4(n)?t():e.of(n)})}}}function pV(e){return function(t,n){return function(r){return e.map(r,fX(t,n))}}}function pz(e){return function(t){return function(n){return e.map(n,f0(t))}}}function pY(e,t){return function(n){return function(r){return e.chain(r,f8(function(r){return e.map(n(),f0(function(e){return t.concat(r,e)}))},pj(e)))}}}function pH(e){return function(t,n){return function(r){return e.map(r,f8(t,n))}}}function pZ(e){return function(t,n){return function(r){return e.chain(r,f8(t,n))}}}function pJ(e){return function(t){return function(n){return e.chain(n,f8(t,e.of))}}}function pG(e){return function(t){return function(n){return e.chain(n,function(n){return f4(n)?t(n.left):e.of(n)})}}}function p$(e){var t=pG(e);return function(n){return t(function(t){return e.map(n(t),function(e){return f4(e)?e:eg(t)})})}}function pX(e){return function(t){return function(n){return e.chain(n,f8(function(n){return e.map(t(n),eg)},function(t){return e.of(ey(t))}))}}}function p0(e){return function(t){return e.map(t,pc)}}function p1(e){return function(t){return e.map(t,pg)}}let p2=Object.freeze(Object.defineProperty({__proto__:null,alt:pQ,altValidation:pY,ap:pN,bimap:pV,chain:pq,chainNullableK:pW,fromNullable:pB,fromNullableK:pP,getEitherM:function(e){var t=pN(e),n=pD(e),r=pq(e),i=pQ(e),o=pV(e),a=pz(e),u=pZ(e),s=pJ(e),l=pG(e);return{map:function(e,t){return ea(e,n(t))},ap:function(e,n){return ea(e,t(n))},of:pj(e),chain:function(e,t){return ea(e,r(t))},alt:function(e,t){return ea(e,i(t))},bimap:function(e,t,n){return ea(e,o(t,n))},mapLeft:function(e,t){return ea(e,a(t))},fold:function(e,t,n){return ea(e,u(t,n))},getOrElse:function(e,t){return ea(e,s(t))},orElse:function(e,t){return ea(e,l(t))},swap:p0(e),rightM:pK(e),leftM:pL(e),left:pU(e)}},getOrElse:pJ,left:pU,leftF:pL,map:pD,mapLeft:pz,match:pH,matchE:pZ,orElse:pG,orElseFirst:p$,orLeft:pX,right:pj,rightF:pK,swap:p0,toUnion:p1},Symbol.toStringTag,{value:"Module"}));var p6=function(){return{concat:function(e,t){return et(e,t)}}},p5=function(){return{concat:p6().concat,empty:Z}};let p3=Object.freeze(Object.defineProperty({__proto__:null,URI:"Endomorphism",getMonoid:p5,getSemigroup:p6},Symbol.toStringTag,{value:"Module"})),p9=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function p4(e,t){var n=t.zero,r=function(i,o){return e.equals(o,n)?i:r(o,t.mod(i,o))};return r}let p7=Object.freeze(Object.defineProperty({__proto__:null,fieldNumber:{add:function(e,t){return e+t},zero:0,mul:function(e,t){return e*t},one:1,sub:function(e,t){return e-t},degree:function(e){return 1},div:function(e,t){return e/t},mod:function(e,t){return e%t}},gcd:p4,lcm:function(e,t){var n=t.zero,r=p4(e,t);return function(i,o){return e.equals(i,n)||e.equals(o,n)?n:t.div(t.mul(i,o),r(i,o))}}},Symbol.toStringTag,{value:"Module"}));function p8(e,t){return function(n){return function(r){return e.map(r,function(e){return t.filter(e,n)})}}}function Ae(e,t){return function(n){return function(r){return e.map(r,function(e){return t.filterMap(e,n)})}}}function At(e,t){var n=p8(e,t);return function(e){var t=n(cb(e)),r=n(e);return function(e){return oe(t(e),r(e))}}}function An(e,t){var n=Ae(e,t);return function(e){return function(t){return oe(ea(t,n(function(t){return c_(e(t))})),ea(t,n(function(t){return cT(e(t))})))}}}let Ar=Object.freeze(Object.defineProperty({__proto__:null,filter:p8,filterMap:Ae,getFilterableComposition:function(e,t){var n=eW(e,t).map,r=dX(e,t),i=d0(e,t,t),o=p8(e,t),a=Ae(e,t),u=At(e,t),s=An(e,t);return{map:n,compact:r,separate:i,filter:function(e,t){return ea(e,o(t))},filterMap:function(e,t){return ea(e,a(t))},partition:function(e,t){return ea(e,u(t))},partitionMap:function(e,t){return ea(e,s(t))}}},partition:At,partitionMap:An},Symbol.toStringTag,{value:"Module"})),Ai=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Ao(e,t){return function(n,r){return function(i){return e.reduce(i,n,function(e,n){return t.reduce(n,e,r)})}}}function Aa(e,t){return function(n){var r=e.foldMap(n),i=t.foldMap(n);return function(e){return function(t){return r(t,function(t){return i(t,e)})}}}}function Au(e,t){return function(n,r){return function(i){return e.reduceRight(i,n,function(e,n){return t.reduceRight(e,n,r)})}}}function As(e){return function(t){return e.reduce(t,[],function(e,t){return e.push(t),e})}}function Al(e,t){var n=Ao(e,t),r=Aa(e,t),i=Au(e,t);return{reduce:function(e,t,r){return ea(e,n(t,r))},foldMap:function(e){var t=r(e);return function(e,n){return ea(e,t(n))}},reduceRight:function(e,t,n){return ea(e,i(t,n))}}}let Ac=Object.freeze(Object.defineProperty({__proto__:null,foldM:function(e,t){return function(n,r,i){return t.reduce(n,e.of(r),function(t,n){return e.chain(t,function(e){return i(e,n)})})}},foldMap:Aa,getFoldableComposition:Al,intercalate:function(e,t){return function(n,r){var i=function(t,r){var i=t.init,o=t.acc;return i?{init:!1,acc:r}:{init:!1,acc:e.concat(e.concat(o,n),r)}};return t.reduce(r,{init:!0,acc:e.empty},i).acc}},reduce:Ao,reduceM:function(e,t){return function(n,r){return function(i){return t.reduce(i,e.of(n),function(t,n){return e.chain(t,function(e){return r(e,n)})})}}},reduceRight:Au,toArray:As,toReadonlyArray:As,traverse_:function(e,t){var n=e.of(void 0);return function(r,i){return t.reduce(r,n,function(t,n){var r,o;return o=i(n),e.ap(e.map(t,J),o)})}}},Symbol.toStringTag,{value:"Module"}));function Ad(e,t){return function(n,r){return function(i){return e.reduceWithIndex(i,n,function(e,n,i){return t.reduceWithIndex(i,n,function(t,n,i){return r([e,t],n,i)})})}}}function Af(e,t){return function(n){var r=e.foldMapWithIndex(n),i=t.foldMapWithIndex(n);return function(e){return function(t){return r(t,function(t,n){return i(n,function(n,r){return e([t,n],r)})})}}}}function Ap(e,t){return function(n,r){return function(i){return e.reduceRightWithIndex(i,n,function(e,n,i){return t.reduceRightWithIndex(n,i,function(t,n,i){return r([e,t],n,i)})})}}}let AA=Object.freeze(Object.defineProperty({__proto__:null,foldMapWithIndex:Af,getFoldableWithIndexComposition:function(e,t){var n=Al(e,t),r=Ad(e,t),i=Af(e,t),o=Ap(e,t);return{reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,reduceWithIndex:function(e,t,n){return ea(e,r(t,n))},foldMapWithIndex:function(e){var t=i(e);return function(e,n){return ea(e,t(n))}},reduceRightWithIndex:function(e,t,n){return ea(e,o(t,n))}}},reduceRightWithIndex:Ap,reduceWithIndex:Ad},Symbol.toStringTag,{value:"Module"}));function Ah(e){return function(t){return et(t,e.fromIO)}}function Am(e,t){return function(n){var r=et(n,e.fromIO);return function(e){return t.chain(e,r)}}}function Ag(e,t){var n=eV(t);return function(t){return n(et(t,e.fromIO))}}let Ay=Object.freeze(Object.defineProperty({__proto__:null,chainFirstIOK:Ag,chainIOK:Am,fromIOK:Ah},Symbol.toStringTag,{value:"Module"}));var Av=function(){return Z},Ax=function(e){return function(t){return function(n){return t(e(n))}}},Ab=function(e){return function(t){return e(t)(t)}},AC=function(e,t){return ea(e,AT(t))},AS=function(e,t){return ea(e,AR(t))},Aw=function(e,t){return ea(e,AE(t))},AI=function(e,t){return ea(e,AF(t))},A_=function(e,t,n){return ea(e,Aj(t,n))},AT=function(e){return function(t){return function(n){return e(t(n))}}},AO=function(e){return function(t){return function(n){return t(n)(e(n))}}},AR=AO,Ak=function(e){return function(t){return function(n){return e(t(n))(n)}}},AE=Ak,AM=Ak(Z),AF=function(e){return function(t){return et(e,t)}},Aj=function(e,t){return function(n){return function(r){return t(n(e(r)))}}},AU=function(){return Z},AK=function(e){return function(t){var n=t[0],r=t[1];return[e(n),r]}},AL=function(e){return function(t){var n;return[t[0],e(t[1])]}},AB=function(e){return f8(function(t){return eg(e(t))},ey)},AP=function(e){return f8(eg,function(t){return ey(e(t))})},AW="Reader",AD={URI:AW,map:AC},AN=eB(AD),Aq={URI:AW,of:J},AQ={URI:AW,map:AC,ap:AS},AV=eO(AQ),Az=eR(AQ),AY={URI:AW,map:AC,ap:AS,of:J},AH={URI:AW,map:AC,ap:AS,chain:Aw},AZ={URI:AW,map:AC,of:J,ap:AS,chain:Aw},AJ=eV(AH),AG=eP(AD),A$=ez(AH),AX=J(ew),A0=ek(AQ),A1=J(eS),A2=function(e){return function(t){return function(n){for(var r=[e(0,eb(t))(n)],i=1;i<t.length;i++)r.push(e(i,t[i])(n));return r}}},A6=function(e){var t=A2(e);return function(e){return ex(e)?t(e):A1}},A5=function(e){return A6(function(t,n){return e(n)})},A3=A5(Z),A9=eE(AQ),A4=eN(AY);let A7=Object.freeze(Object.defineProperty({__proto__:null,ApT:A1,Applicative:AY,Apply:AQ,Category:{URI:AW,compose:AI,id:AU},Chain:AH,Choice:{URI:AW,map:AC,promap:A_,left:AB,right:AP},Do:AX,Functor:AD,Monad:AZ,Pointed:Aq,Profunctor:{URI:AW,map:AC,promap:A_},Strong:{URI:AW,map:AC,promap:A_,first:AK,second:AL},URI:AW,ap:AR,apFirst:AV,apFirstW:AV,apS:A0,apSW:A0,apSecond:Az,apSecondW:Az,apW:AO,ask:Av,asks:Z,asksReader:Ab,asksReaderW:Ab,bind:A$,bindTo:AG,bindW:A$,chain:AE,chainFirst:AJ,chainFirstW:AJ,chainW:Ak,compose:AF,first:AK,flap:AN,flatten:AM,flattenW:AM,getMonoid:A4,getSemigroup:A9,id:AU,left:AB,local:Ax,map:AT,of:J,promap:Aj,reader:{URI:AW,map:AC,of:J,ap:AS,chain:Aw,promap:A_,compose:AI,id:AU,first:AK,second:AL,left:AB,right:AP},right:AP,second:AL,sequenceArray:A3,traverseArray:A5,traverseArrayWithIndex:A6,traverseReadonlyArrayWithIndex:A6,traverseReadonlyNonEmptyArrayWithIndex:A2},Symbol.toStringTag,{value:"Module"}));function A8(e){return function(){return e.fromReader(Av())}}function he(e){return e.fromReader}function ht(e){return function(t){return et(t,e.fromReader)}}function hn(e,t){var n=ht(e);return function(e){return function(r){return t.chain(r,n(e))}}}function hr(e,t){return et(ht(e),eV(t))}let hi=Object.freeze(Object.defineProperty({__proto__:null,ask:A8,asks:he,chainFirstReaderK:hr,chainReaderK:hn,fromReaderK:ht},Symbol.toStringTag,{value:"Module"}));var ho=function(){return function(e){return[e,e]}},ha=function(e){return function(){return[void 0,e]}},hu=function(e){return function(t){return[void 0,e(t)]}},hs=function(e){return function(t){return[e(t),t]}},hl=function(e,t){return ea(e,hf(t))},hc=function(e,t){return ea(e,hp(t))},hd=function(e,t){return ea(e,hh(t))},hf=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=r[1];return[e(i),o]}}},hp=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=e(r[1]),a=o[0],u=o[1];return[i(a),u]}}},hA=function(e){return function(t){return[e,t]}},hh=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=r[1];return e(i)(o)}}},hm=hh(Z),hg="State",hy={URI:hg,map:hl},hv=eB(hy),hx={URI:hg,map:hl,ap:hc},hb=eO(hx),hC=eR(hx),hS={URI:hg,map:hl,ap:hc,chain:hd},hw={URI:hg,map:hl,ap:hc,of:hA,chain:hd},hI=eV(hS),h_=function(e){return function(t){return t(e)[0]}},hT=function(e){return function(t){return t(e)[1]}},hO=eP(hy),hR=ez(hS),hk=ek(hx),hE=function(e){return function(t){return function(n){for(var r=e(0,eb(t))(n),i=r[0],o=r[1],a=[i],u=o,s=1;s<t.length;s++){var l=e(s,t[s])(u),c=l[0],d=l[1];a.push(c),u=d}return[a,u]}}},hM=function(e){var t=hE(e);return function(e){return ex(e)?t(e):hA(eS)}},hF=function(e){return hM(function(t,n){return e(n)})},hj=hF(Z),hU=function(e,t){return e(t)[0]},hK=function(e,t){return e(t)[1]};let hL=Object.freeze(Object.defineProperty({__proto__:null,Applicative:{URI:hg,map:hl,ap:hc,of:hA},Apply:hx,Chain:hS,FromState:{URI:hg,fromState:Z},Functor:hy,Monad:hw,Pointed:{URI:hg,of:hA},URI:hg,ap:hp,apFirst:hb,apS:hk,apSecond:hC,bind:hR,bindTo:hO,chain:hh,chainFirst:hI,evalState:hU,evaluate:h_,execState:hK,execute:hT,flap:hv,flatten:hm,get:ho,gets:hs,map:hf,modify:hu,of:hA,put:ha,sequenceArray:hj,state:hw,traverseArray:hF,traverseArrayWithIndex:hM,traverseReadonlyArrayWithIndex:hM,traverseReadonlyNonEmptyArrayWithIndex:hE},Symbol.toStringTag,{value:"Module"}));function hB(e){return function(){return e.fromState(ho())}}function hP(e){return function(t){return e.fromState(ha(t))}}function hW(e){return et(hu,e.fromState)}function hD(e){return et(hs,e.fromState)}function hN(e){return function(t){return et(t,e.fromState)}}function hq(e,t){var n=hN(e);return function(e){return function(r){return t.chain(r,n(e))}}}let hQ=Object.freeze(Object.defineProperty({__proto__:null,chainStateK:hq,fromStateK:hN,get:hB,gets:hD,modify:hW,put:hP},Symbol.toStringTag,{value:"Module"}));function hV(e){return function(t){return et(t,e.fromTask)}}function hz(e,t){return function(n){var r=et(n,e.fromTask);return function(e){return t.chain(e,r)}}}function hY(e,t){var n=eV(t);return function(t){return n(et(t,e.fromTask))}}let hH=Object.freeze(Object.defineProperty({__proto__:null,chainFirstTaskK:hY,chainTaskK:hz,fromTaskK:hV},Symbol.toStringTag,{value:"Module"}));function hZ(e){return function(t){return et(t,e.fromThese)}}let hJ=Object.freeze(Object.defineProperty({__proto__:null,fromTheseK:hZ},Symbol.toStringTag,{value:"Module"}));function hG(e,t){return function(n){return function(r){return e.mapWithIndex(r,function(e,r){return t.mapWithIndex(r,function(t,r){return n([e,t],r)})})}}}let h$=Object.freeze(Object.defineProperty({__proto__:null,getFunctorWithIndexComposition:function(e,t){var n=eW(e,t).map,r=hG(e,t);return{map:n,mapWithIndex:function(e,t){return ea(e,r(t))}}},mapWithIndex:hG},Symbol.toStringTag,{value:"Module"})),hX=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),h0=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),h1=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var h2=function(e,t){return ea(e,mt(t))},h6=function(e,t){return ea(e,mn(t))},h5=function(e,t){return ea(e,mr(t))},h3=function(e,t,n){return ea(e,mu(t,n))},h9=function(e){return function(e,t){return ea(e,ms()(t))}},h4=function(e,t,n){return ea(e,ml(t,n))},h7=function(e,t){return ea(e,mp())},h8=function(e,t){return ea(e,mi(t))},me=function(e){var t=mc(e);return function(e,n){return ea(e,t(n))}},mt=function(e){return function(t){return e(t)}},mn=function(e){return function(t){return t(e)}},mr=function(e){return function(t){return e(t)}},mi=function(e){return function(t){return e(t)}},mo=mi(Z),ma=mr(Z),mu=function(e,t){return function(n){return t(e,n)}},ms=function(){return function(e){return function(t){return e(t)}}},ml=function(e,t){return function(n){return t(n,e)}},mc=function(e){return function(t){return function(n){return e.map(t(n),Z)}}},md=function(e){return function(t){return e.map(t,Z)}},mf=function(){return Z},mp=mf,mA="Identity",mh={URI:mA,map:h2},mm=eB(mh),mg={URI:mA,map:h2,ap:h6},my=eO(mg),mv=eR(mg),mx={URI:mA,map:h2,ap:h6,chain:h5},mb=eV(mx),mC=Z(ew),mS=eP(mh),mw=ez(mx),mI=ek(mg);let m_=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:mA,map:h2,alt:h7},Applicative:{URI:mA,map:h2,ap:h6,of:Z},Apply:mg,Chain:mx,ChainRec:{URI:mA,map:h2,ap:h6,chain:h5,chainRec:cs},Comonad:{URI:mA,map:h2,extend:h8,extract:Z},Do:mC,Foldable:{URI:mA,reduce:h3,foldMap:h9,reduceRight:h4},Functor:mh,Monad:{URI:mA,map:h2,ap:h6,of:Z,chain:h5},Pointed:{URI:mA,of:Z},Traversable:{URI:mA,map:h2,reduce:h3,foldMap:h9,reduceRight:h4,traverse:me,sequence:md},URI:mA,alt:mp,altW:mf,ap:mn,apFirst:my,apS:mI,apSecond:mv,bind:mw,bindTo:mS,chain:mr,chainFirst:mb,duplicate:mo,extend:mi,extract:Z,flap:mm,flatten:ma,foldMap:ms,getEq:Z,getShow:Z,identity:{URI:mA,map:h2,ap:h6,of:Z,chain:h5,reduce:h3,foldMap:h9,reduceRight:h4,traverse:me,sequence:md,alt:h7,extract:Z,extend:h8,chainRec:cs},map:mt,of:Z,reduce:mu,reduceRight:ml,sequence:md,traverse:mc},Symbol.toStringTag,{value:"Module"})),mT=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var mO=function(e,t){return function(){return t(e())}},mR=function(e,t){return function(){return e()(t())}},mk=function(e,t){return function(){return t(e())()}},mE=function(e,t){return function(){for(var n=t(e)();"Left"===n._tag;)n=t(n.left)();return n.right}},mM=function(e){return function(t){return mO(t,e)}},mF=function(e){return function(t){return mR(t,e)}},mj=function(e){return function(t){return mk(t,e)}},mU=mj(Z),mK={URI:"IO",map:mO},mL=eB(mK),mB={URI:"IO",of:J},mP={URI:"IO",map:mO,ap:mR},mW=eO(mP),mD=eR(mP),mN={URI:"IO",map:mO,ap:mR,of:J},mq={URI:"IO",map:mO,ap:mR,chain:mk},mQ={URI:"IO",map:mO,ap:mR,of:J,chain:mk},mV=eV(mq),mz=J(ew),mY=eP(mK),mH=ez(mq),mZ=ek(mP),mJ=J(eS),mG=function(e){return function(t){return function(){for(var n=[e(0,eb(t))()],r=1;r<t.length;r++)n.push(e(r,t[r])());return n}}},m$=function(e){var t=mG(e);return function(e){return ex(e)?t(e):mJ}},mX=function(e){return m$(function(t,n){return e(n)})},m0=mX(Z),m1=eE(mP),m2=eN(mN);let m6=Object.freeze(Object.defineProperty({__proto__:null,ApT:mJ,Applicative:mN,Apply:mP,Chain:mq,ChainRec:{URI:"IO",map:mO,ap:mR,chain:mk,chainRec:mE},Do:mz,FromIO:{URI:"IO",fromIO:Z},Functor:mK,Monad:mQ,MonadIO:{URI:"IO",map:mO,ap:mR,of:J,chain:mk,fromIO:Z},Pointed:mB,URI:"IO",ap:mF,apFirst:mW,apS:mZ,apSecond:mD,bind:mH,bindTo:mY,chain:mj,chainFirst:mV,flap:mL,flatten:mU,fromIO:Z,getMonoid:m2,getSemigroup:m1,io:{URI:"IO",map:mO,of:J,ap:mR,chain:mk,fromIO:Z,chainRec:mE},map:mM,of:J,sequenceArray:m0,traverseArray:mX,traverseArrayWithIndex:m$,traverseReadonlyArrayWithIndex:m$,traverseReadonlyNonEmptyArrayWithIndex:mG},Symbol.toStringTag,{value:"Module"}));var m5=pU(mB),m3=pj(mB),m9=pK(mK),m4=pL(mK),m7=pH(mK),m8=pZ(mQ),ge=pJ(mQ),gt=function(e,t){return function(){return pp(e,t)}},gn=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return gt(function(){return e.apply(void 0,n)},t)}},gr=p1(mK),gi=pG(mQ),go=p$(mQ),ga=function(e){return go(gK(e))},gu=pX(mQ),gs=p0(mK),gl=function(e,t){return ea(e,gm(t))},gc=function(e,t){return ea(e,gv(t))},gd=function(e,t){return ea(e,gx(function(e){return ea(t,gm(e))}))},gf=function(e,t){return ea(e,gx(t))},gp=function(e,t,n){return ea(e,gg(t,n))},gA=function(e,t){return ea(e,gy(t))},gh=function(e,t){return ea(e,gC(t))},gm=pD(mK),gg=pV(mK),gy=pz(mK),gv=pN(mP),gx=pq(mQ),gb=gx(Z),gC=pQ(mQ),gS="IOEither";function gw(e){var t=eT(mP,fU(e));return{URI:gS,_E:void 0,map:gl,ap:function(e,n){return ea(e,t(n))},of:m3}}function gI(e){var t=pY(mQ,e);return{URI:gS,_E:void 0,map:gl,alt:function(e,n){return ea(e,t(n))}}}var g_=function(e){var t=fM(e);return{URI:gS,_E:void 0,compact:dX(mK,t),separate:d0(mK,t,fB)}},gT={URI:gS,map:gl},gO=eB(gT),gR={URI:gS,map:gl,ap:gc},gk=eO(gR),gE=eR(gR),gM={URI:gS,map:gl,ap:gc,of:m3},gF={URI:gS,map:gl,ap:gc,chain:gf},gj=eV(gF),gU={URI:gS,fromIO:m9},gK=Ah(gU),gL=Am(gU,gF),gB=Ag(gU,gF),gP={URI:gS,fromEither:J},gW=eH(gP),gD=eJ(gP),gN=eG(gP,gF),gq=eX(gP,gF),gQ=e0(gP,gF),gV=eZ(gP),gz=e1(gP,gF),gY=e$(gP),gH=function(e,t,n){return gZ(e,t,n)},gZ=function(e,t,n){return ea(e,gx(function(e){return ea(t(e),mj(function(t){return ea(n(e,t),gx(function(){return J(t)}))}))}))},gJ=m3(ew),gG=eP(gT),g$=ez(gF),gX=ek(gR),g0=m3(eS),g1=function(e){return et(mG(e),mM(pw(eu)))},g2=function(e){var t=g1(e);return function(e){return ex(e)?t(e):g0}},g6=function(e){return function(t){return function(){var n=e(0,eb(t))();if(eh(n))return n;for(var r=[n.right],i=1;i<t.length;i++){var o=e(i,t[i])();if(eh(o))return o;r.push(o.right)}return ey(r)}}},g5=function(e){var t=g6(e);return function(e){return ex(e)?t(e):g0}},g3=function(e){return g2(function(t,n){return e(n)})},g9=g3(Z),g4=function(e){return g5(function(t,n){return e(n)})},g7=g4(Z),g8=eE(gR),ye=eN(gM),yt=function(e){return eE(mP)(fE(e))};let yn=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:gS,map:gl,alt:gh},ApT:g0,Applicative:gM,ApplicativePar:gM,ApplicativeSeq:{URI:gS,map:gl,ap:gd,of:m3},ApplyPar:gR,Bifunctor:{URI:gS,bimap:gp,mapLeft:gA},Chain:gF,Do:gJ,FromEither:gP,FromIO:gU,Functor:gT,Monad:{URI:gS,map:gl,ap:gc,of:m3,chain:gf},MonadIO:{URI:gS,map:gl,ap:gc,of:m3,chain:gf,fromIO:m9},MonadThrow:{URI:gS,map:gl,ap:gc,of:m3,chain:gf,throwError:m5},Pointed:{URI:gS,of:m3},URI:gS,alt:gC,altW:gC,ap:gv,apFirst:gk,apFirstW:gk,apS:gX,apSW:gX,apSecond:gE,apSecondW:gE,apW:gv,bimap:gg,bind:g$,bindTo:gG,bindW:g$,bracket:gH,bracketW:gZ,chain:gx,chainEitherK:gq,chainEitherKW:gq,chainFirst:gj,chainFirstEitherK:gQ,chainFirstEitherKW:gQ,chainFirstIOK:gB,chainFirstW:gj,chainIOK:gL,chainOptionK:gN,chainW:gx,filterOrElse:gz,filterOrElseW:gz,flap:gO,flatten:gb,flattenW:gb,fold:m8,foldW:m8,fromEither:J,fromEitherK:gY,fromIO:m9,fromIOK:gK,fromOption:gW,fromOptionK:gD,fromPredicate:gV,getAltIOValidation:gI,getApplicativeIOValidation:gw,getApplyMonoid:ye,getApplySemigroup:g8,getCompactable:g_,getFilterable:function(e){var t=fF(e),n=g_(e),r=p8(mK,t),i=Ae(mK,t),o=At(mK,t),a=An(mK,t);return{URI:gS,_E:void 0,map:gl,compact:n.compact,separate:n.separate,filter:function(e,t){return ea(e,r(t))},filterMap:function(e,t){return ea(e,i(t))},partition:function(e,t){return ea(e,o(t))},partitionMap:function(e,t){return ea(e,a(t))}}},getIOValidation:function(e){var t=gw(e),n=gI(e);return{URI:gS,_E:void 0,map:gl,ap:t.ap,of:m3,chain:gf,bimap:gp,mapLeft:gA,alt:n.alt,fromIO:m9,throwError:m5}},getOrElse:ge,getOrElseW:ge,getSemigroup:yt,ioEither:{URI:gS,bimap:gp,mapLeft:gA,map:gl,of:m3,ap:gc,chain:gf,alt:gh,fromIO:m9,throwError:m5},left:m5,leftIO:m4,map:gm,mapLeft:gy,match:m7,matchE:m8,matchEW:m8,matchW:m7,of:m3,orElse:gi,orElseFirst:go,orElseFirstIOK:ga,orElseFirstW:go,orElseW:gi,orLeft:gu,right:m3,rightIO:m9,sequenceArray:g9,sequenceSeqArray:g7,swap:gs,throwError:m5,toUnion:gr,traverseArray:g3,traverseArrayWithIndex:g2,traverseReadonlyArrayWithIndex:g2,traverseReadonlyArrayWithIndexSeq:g5,traverseReadonlyNonEmptyArrayWithIndex:g1,traverseReadonlyNonEmptyArrayWithIndexSeq:g6,traverseSeqArray:g4,traverseSeqArrayWithIndex:g5,tryCatch:gt,tryCatchK:gn},Symbol.toStringTag,{value:"Module"}));function yr(e){return et(eA,e.of)}function yi(e){return J(e.of(ep))}function yo(e){return function(t){return e.map(t,eA)}}function ya(e){return et(dk,e.of)}function yu(e){var t=ya(e);return function(e){return et(e,t)}}function ys(e){var t=yy(e),n=yu(e);return function(e){return t(n(e))}}function yl(e){return function(t){return et(t,e.of)}}function yc(e){var t=yy(e),n=yl(e);return function(e){return t(n(e))}}function yd(e){return function(t){return function(n){return e.of(cI(t)(n))}}}function yf(e){return et(cT,e.of)}function yp(e){return function(t,n){return function(r){return e.map(r,dx(t,n))}}}function yA(e){return function(t,n){return function(r){return e.chain(r,dx(t,n))}}}function yh(e){return function(t){return function(n){return e.chain(n,dx(t,e.of))}}}function ym(e){return eL(e,cY)}function yg(e){return eT(e,cJ)}function yy(e){var t=yi(e);return function(n){return function(r){return e.chain(r,dx(function(){return t()},n))}}}function yv(e){var t=yr(e);return function(n){return function(r){return e.chain(r,dx(n,t))}}}let yx=Object.freeze(Object.defineProperty({__proto__:null,alt:yv,ap:yg,chain:yy,chainNullableK:ys,chainOptionK:yc,fromEither:yf,fromF:yo,fromNullable:ya,fromNullableK:yu,fromOptionK:yl,fromPredicate:yd,getOptionM:function(e){var t=yg(e),n=ym(e),r=yy(e),i=yv(e),o=yA(e),a=yh(e),u=yi(e);return{map:function(e,t){return ea(e,n(t))},ap:function(e,n){return ea(e,t(n))},of:yr(e),chain:function(e,t){return ea(e,r(t))},alt:function(e,t){return ea(e,i(t))},fold:function(e,t,n){return ea(e,o(t,n))},getOrElse:function(e,t){return ea(e,a(t))},fromM:yo(e),none:function(){return u()}}},getOrElse:yh,map:ym,match:yp,matchE:yA,some:yr,zero:yi},Symbol.toStringTag,{value:"Module"}));var yb=yr(mB),yC=yd(mB),yS=yf(mB),yw=yo(mK),yI=mM(cT),y_=yp(mK),yT=yA(mq),yO=yh(mQ),yR=mM(dK),yk=mM(dU),yE=ya(mB),yM=yu(mB),yF=ys(mQ),yj=yl(mB),yU=yc(mQ),yK=ym(mK),yL=yg(mP),yB=yy(mQ),yP=yB(Z),yW=yv(mQ),yD=yi(mB),yN=yD(),yq=dX(mK,dn),yQ=d0(mK,dn,cY),yV=p8(mK,ds),yz=Ae(mK,ds),yY=At(mK,ds),yH=An(mK,ds),yZ=function(e,t){return ea(e,yK(t))},yJ=function(e,t){return ea(e,yL(t))},yG=function(e,t){return ea(e,yB(t))},y$=function(e,t){return ea(e,yW(t))},yX=function(e,t){return ea(e,yV(t))},y0=function(e,t){return ea(e,yz(t))},y1=function(e,t){return ea(e,yY(t))},y2=function(e,t){return ea(e,yH(t))},y6="IOOption",y5={URI:y6,map:yZ},y3=eB(y5),y9={URI:y6,of:yb},y4={URI:y6,map:yZ,ap:yJ},y7=eO(y4),y8=eR(y4),ve={URI:y6,map:yZ,ap:yJ,chain:yG},vt=eV(ve),vn={URI:y6,zero:yD},vr=og(vn,y9),vi={URI:y6,fromIO:yw},vo=Ah(vi),va=Am(vi,ve),vu=Ag(vi,ve),vs={URI:y6,fromEither:yS},vl=e$(vs),vc=eX(vs,ve),vd=e0(vs,ve),vf=yb(ew),vp=eP(y5),vA=ez(ve),vh=ek(y4),vm=yb(eS),vg=function(e){return et(mG(e),mM(dq(eu)))},vy=function(e){var t=vg(e);return function(e){return ex(e)?t(e):vm}};let vv=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:y6,map:yZ,alt:y$},Alternative:{URI:y6,map:yZ,ap:yJ,of:yb,alt:y$,zero:yD},ApT:vm,Applicative:{URI:y6,map:yZ,ap:yJ,of:yb},Apply:y4,Chain:ve,Compactable:{URI:y6,compact:yq,separate:yQ},Do:vf,Filterable:{URI:y6,map:yZ,compact:yq,separate:yQ,filter:yX,filterMap:y0,partition:y1,partitionMap:y2},FromEither:vs,FromIO:vi,Functor:y5,Monad:{URI:y6,map:yZ,ap:yJ,of:yb,chain:yG},MonadIO:{URI:y6,map:yZ,ap:yJ,of:yb,chain:yG,fromIO:yw},Pointed:y9,Zero:vn,alt:yW,altW:yW,ap:yL,apFirst:y7,apS:vh,apSecond:y8,bind:vA,bindTo:vp,chain:yB,chainEitherK:vc,chainFirst:vt,chainFirstEitherK:vd,chainFirstIOK:vu,chainIOK:va,chainNullableK:yF,chainOptionK:yU,compact:yq,filter:yV,filterMap:yz,flap:y3,flatten:yP,fold:yT,fromEither:yS,fromEitherK:vl,fromIO:yw,fromIOEither:yI,fromIOK:vo,fromNullable:yE,fromNullableK:yM,fromOption:J,fromOptionK:yj,fromPredicate:yC,getOrElse:yO,getOrElseW:yO,guard:vr,map:yK,match:y_,matchE:yT,matchEW:yT,matchW:y_,none:yN,of:yb,partition:yY,partitionMap:yH,separate:yQ,some:yb,toNullable:yk,toUndefined:yR,traverseReadonlyArrayWithIndex:vy,traverseReadonlyNonEmptyArrayWithIndex:vg,zero:yD},Symbol.toStringTag,{value:"Module"}));var vx=function(){function e(e){var t=this;this.value=e,this.read=function(){return t.value},this.write=this.write.bind(this),this.modify=this.modify.bind(this)}return e.prototype.write=function(e){var t=this;return function(){t.value=e}},e.prototype.modify=function(e){var t=this;return function(){t.value=e(t.value)}},e}();let vb=Object.freeze(Object.defineProperty({__proto__:null,IORef:vx,newIORef:function(e){return function(){return new vx(e)}}},Symbol.toStringTag,{value:"Module"})),vC=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var vS=function(e){return pp(function(){return JSON.parse(e)},Z)},vw=function(e){return pp(function(){var t=JSON.stringify(e);if("string"!=typeof t)throw Error("Converting unsupported structure to JSON");return t},Z)};let vI=Object.freeze(Object.defineProperty({__proto__:null,parse:vS,stringify:vw},Symbol.toStringTag,{value:"Module"})),v_=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var vT=function(e){return new Map(e)};function vO(e,t){return{show:function(n){var r=[];return n.forEach(function(n,i){r.push("[".concat(e.show(i),", ").concat(t.show(n),"]"))}),"new Map([".concat(r.sort().join(", "),"])")}}}var vR=function(e){return e.size},vk=function(e){return 0===e.size};function vE(e){var t=vN(e);return function(n,r){if(void 0===r){var i=vE(e);return function(e){return i(n,e)}}return ef(t(n,r))}}function vM(e){return function(t,n){if(void 0===n){var r=vM(e);return function(e){return r(t,e)}}for(var i,o=n.values();!(i=o.next()).done;){var a=i.value;if(e.equals(t,a))return!0}return!1}}var vF=function(e){return function(t){return Array.from(t.keys()).sort(e.compare)}},vj=function(e){return function(t){return Array.from(t.values()).sort(e.compare)}};function vU(e){var t=vF(e);return function(e){return function(n){for(var r=[],i=t(n),o=0;o<i.length;o++){var a=i[o];r.push(e(a,n.get(a)))}return r}}}var vK=function(e){return vU(e)(function(e,t){return[e,t]})},vL=function(e){var t=vD(e);return function(e,n){var r=t(e);return function(t){var i=r(t);if(ed(i)){var o=new Map(t);return o.set(e,n),o}if(i.value[1]!==n){var o=new Map(t);return o.set(i.value[0],n),o}return t}}},vB=function(e){var t=vD(e);return function(e){return function(n){var r=t(e,n);if(ef(r)){var i=new Map(n);return i.delete(r.value[0]),i}return n}}},vP=function(e){var t=vW(e);return function(e,n){return t(e,function(){return n})}},vW=function(e){var t=vD(e);return function(e,n){return function(r){var i=t(e,r);if(ed(i))return ep;var o=i.value,a=o[0],u=o[1],s=n(u);if(s===u)return eA(r);var l=new Map(r);return l.set(a,s),eA(l)}}};function vD(e){return function(t,n){if(void 0===n){var r=vD(e);return function(e){return r(t,e)}}for(var i,o=n.entries();!(i=o.next()).done;){var a=i.value,u=a[0],s=a[1];if(e.equals(u,t))return eA([u,s])}return ep}}function vN(e){var t=vD(e);return function(n,r){if(void 0===r){var i=vN(e);return function(e){return i(n,e)}}return ea(t(n,r),cz(function(e){return e[0],e[1]}))}}function vq(e,t){var n=vD(e);return function(r,i){if(void 0===i){var o=vq(e,t);return function(e){return o(e,r)}}for(var a,u=r.entries();!(a=u.next()).done;){var s=a.value,l=s[0],c=s[1],d=n(l,i);if(ed(d)||!e.equals(l,d.value[0])||!t.equals(c,d.value[1]))return!1}return!0}}var vQ=new Map;function vV(e,t){var n=vq(e,t);return e6(function(e,t){return n(e,t)&&n(t,e)})}var vz=function(e,t){return new Map([[e,t]])},vY=function(e,t){for(var n,r=new Map,i=e.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];r.set(a,t(a,u))}return r},vH=function(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=e(u,a[1]);eh(s)?r.set(u,s.left):i.set(u,s.right)}return oe(r,i)}};function vZ(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=a[1];e(u,s)?i.set(u,s):r.set(u,s)}return oe(r,i)}}var vJ=function(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=e(a,o[1]);ef(u)&&r.set(a,u.value)}return r}};function vG(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];e(a,u)&&r.set(a,u)}return r}}var v$=function(e,t){return vY(e,function(e,n){return t(n)})},vX=function(e,t){return v6(e,function(e,n){return t(n)})},v0=function(e,t){return v5(e,function(e,n){return t(n)})},v1=function(e,t){return v3(e,function(e,n){return t(n)})},v2=function(e,t){return v9(e,function(e,n){return t(n)})},v6=function(e,t){return ea(e,vG(t))},v5=function(e,t){return ea(e,vJ(t))},v3=function(e,t){return ea(e,vZ(t))},v9=function(e,t){return ea(e,vH(t))},v4=function(e){for(var t,n=new Map,r=e.entries();!(t=r.next()).done;){var i=t.value,o=i[0],a=i[1];ef(a)&&n.set(o,a.value)}return n},v7=function(e){return function(t){return vX(t,e)}},v8=function(e){return function(t){return v0(t,e)}},xe=function(e){return function(t){return v$(t,e)}},xt=function(e){return function(t){return vY(t,e)}},xn=function(e){return function(t){return v1(t,e)}},xr=function(e){return function(t){return v2(t,e)}},xi=function(e){for(var t,n=new Map,r=new Map,i=e.entries();!(t=i.next()).done;){var o=t.value,a=o[0],u=o[1];eh(u)?n.set(a,u.left):r.set(a,u.right)}return oe(n,r)},xo="ReadonlyMap",xa=function(e,t){var n=xw(e,t);return{concat:function(e,t){return n(t)(e)}}},xu=function(e,t){return{concat:xa(e,t).concat,empty:vQ}},xs=function(e,t){var n=xI(e,t);return{concat:function(e,t){return n(t)(e)}}},xl=function(e){return function(){var t=x_(e);return{concat:function(e,n){return t(n)(e)}}}},xc={URI:xo,map:v$},xd=eB(xc),xf=function(){return{URI:xo,_E:void 0,map:v$,mapWithIndex:vY}},xp={URI:xo,compact:v4,separate:xi},xA=function(e){var t=xy(e);return function(e,n){return t(e,function(e,t,r){return n(t,r)})}},xh=function(e){var t=xv(e);return function(e){var n=t(e);return function(e){return n(function(t,n){return e(n)})}}},xm=function(e){var t=xx(e);return function(e,n){return t(e,function(e,t,r){return n(t,r)})}},xg=function(e){var t=xA(e),n=xh(e),r=xm(e);return{URI:xo,_E:void 0,reduce:function(e,n,r){return ea(e,t(n,r))},foldMap:function(e){var t=n(e);return function(e,n){return ea(e,t(n))}},reduceRight:function(e,t,n){return ea(e,r(t,n))}}},xy=function(e){var t=vF(e);return function(e,n){return function(r){for(var i=e,o=0,a=t(r);o<a.length;o++){var u=a[o];i=n(u,i,r.get(u))}return i}}},xv=function(e){var t=vF(e);return function(e){return function(n){return function(r){for(var i=e.empty,o=0,a=t(r);o<a.length;o++){var u=a[o];i=e.concat(i,n(u,r.get(u)))}return i}}}},xx=function(e){var t=vF(e);return function(e,n){return function(r){for(var i=e,o=t(r),a=o.length,u=a-1;u>=0;u--){var s=o[u];i=n(s,r.get(s),i)}return i}}},xb=function(e){var t=xg(e),n=xy(e),r=xv(e),i=xx(e);return{URI:xo,_E:void 0,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:function(e,t,r){return ea(e,n(t,r))},foldMapWithIndex:function(e){var t=r(e);return function(e,n){return ea(e,t(n))}},reduceRightWithIndex:function(e,t,n){return ea(e,i(t,n))}}},xC=function(e){var t=xS(e),n=xg(e);return{URI:xo,_E:void 0,map:v$,reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,traverse:t.traverse,sequence:t.sequence}},xS=function(e){var t=xb(e),n=vF(e),r=function(e){return function(t,r){for(var i=e.of(new Map),o=n(t),a=o.length,u=0;u<a;u++)!function(n){var a=o[n],u=t.get(a);i=e.ap(e.map(i,function(e){return function(t){return e.set(a,t)}}),r(a,u))}(u);return i}},i=function(e){var t=r(e);return function(e,n){return t(e,function(e,t){return n(t)})}},o=function(e){var t=r(e);return function(e){return t(e,eu)}};return{URI:xo,_E:void 0,map:v$,mapWithIndex:vY,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverse:i,sequence:o,traverseWithIndex:r}},xw=function(e,t){var n=vN(e);return function(e){return function(r){if(vk(r))return e;if(vk(e))return r;for(var i,o=new Map,a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s)(e);ef(c)?o.set(s,t.concat(l,c.value)):o.set(s,l)}for(var d=e.entries();!(i=d.next()).done;){var f=i.value,s=f[0],l=f[1],c=n(s)(o);ed(c)&&o.set(s,l)}return o}}},xI=function(e,t){var n=vN(e);return function(e){return function(r){if(vk(r)||vk(e))return vQ;for(var i,o=new Map,a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s)(e);ef(c)&&o.set(s,t.concat(l,c.value))}return o}}},x_=function(e){var t=vE(e);return function(e){return function(n){if(vk(n))return e;if(vk(e))return n;for(var r,i=new Map,o=n.entries();!(r=o.next()).done;){var a=r.value,u=a[0],s=a[1];t(u)(e)||i.set(u,s)}for(var l=e.entries();!(r=l.next()).done;){var c=r.value,u=c[0],s=c[1];t(u)(n)||i.set(u,s)}return i}}};let xT=Object.freeze(Object.defineProperty({__proto__:null,Compactable:xp,Filterable:{URI:xo,map:v$,compact:v4,separate:xi,filter:vX,filterMap:v0,partition:v1,partitionMap:v2},Functor:xc,URI:xo,collect:vU,compact:v4,deleteAt:vB,difference:x_,elem:vM,empty:vQ,filter:v7,filterMap:v8,filterMapWithIndex:vJ,filterWithIndex:vG,flap:xd,foldMap:xh,foldMapWithIndex:xv,fromFoldable:function(e,t,n){return function(r){var i=vD(e);return n.reduce(r,new Map,function(e,n){var r=n[0],o=n[1],a=i(r,e);return ef(a)?e.set(a.value[0],t.concat(a.value[1],o)):e.set(r,o),e})}},fromMap:vT,getDifferenceMagma:xl,getEq:vV,getFilterableWithIndex:function(){return{URI:xo,_E:void 0,map:v$,mapWithIndex:vY,compact:v4,separate:xi,filter:vX,filterMap:v0,partition:v1,partitionMap:v2,partitionMapWithIndex:v9,partitionWithIndex:v3,filterMapWithIndex:v5,filterWithIndex:v6}},getFoldable:xg,getFoldableWithIndex:xb,getFunctorWithIndex:xf,getIntersectionSemigroup:xs,getMonoid:function(e,t){var n=vD(e);return{concat:function(e,r){if(vk(e))return r;if(vk(r))return e;for(var i,o=new Map(e),a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s,e);ef(c)?o.set(c.value[0],t.concat(c.value[1],l)):o.set(s,l)}return o},empty:vQ}},getShow:vO,getTraversable:xC,getTraversableWithIndex:xS,getUnionMonoid:xu,getUnionSemigroup:xa,getWitherable:function(e){var t=xS(e);return{URI:xo,_E:void 0,map:v$,compact:v4,separate:xi,filter:vX,filterMap:v0,partition:v1,partitionMap:v2,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,traverse:t.traverse,sequence:t.sequence,mapWithIndex:vY,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverseWithIndex:t.traverseWithIndex,wilt:op(t,xp),wither:oA(t,xp)}},insertAt:vL,intersection:xI,isEmpty:vk,isSubmap:vq,keys:vF,lookup:vN,lookupWithKey:vD,map:xe,mapWithIndex:xt,member:vE,modifyAt:vW,partition:xn,partitionMap:xr,partitionMapWithIndex:vH,partitionWithIndex:vZ,pop:function(e){var t=vN(e),n=vB(e);return function(e){var r=n(e);return function(n){return ea(t(e,n),cz(function(e){return[e,r(n)]}))}}},readonlyMap:{URI:xo,map:v$,compact:v4,separate:xi,filter:vX,filterMap:v0,partition:v1,partitionMap:v2},reduce:xA,reduceRight:xm,reduceRightWithIndex:xx,reduceWithIndex:xy,separate:xi,singleton:vz,size:vR,toMap:function(e){return new Map(e)},toReadonlyArray:vK,toUnfoldable:function(e,t){var n=vK(e);return function(e){var r=n(e),i=r.length;return t.unfold(0,function(e){return e<i?eA([r[e],e+1]):ep})}},union:xw,updateAt:vP,upsertAt:vL,values:vj},Symbol.toStringTag,{value:"Module"}));var xO=function(){return(xO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},xR=function(e){return function(t){return Array.from(t.keys()).sort(e.compare)}},xk=function(e){return function(t){return Array.from(t.values()).sort(e.compare)}};function xE(e){var t=xR(e);return function(e){return function(n){for(var r=[],i=t(n),o=0;o<i.length;o++){var a=i[o];r.push(e(a,n.get(a)))}return r}}}function xM(e){return xE(e)(function(e,t){return[e,t]})}var xF=function(e){var t=xL(e);return function(e,n){var r=t(e);return function(t){var i=r(t);if(ed(i)){var o=new Map(t);return o.set(e,n),o}if(i.value[1]!==n){var o=new Map(t);return o.set(i.value[0],n),o}return t}}},xj=function(e){var t=xL(e);return function(e){return function(n){var r=t(e,n);if(ef(r)){var i=new Map(n);return i.delete(r.value[0]),i}return n}}},xU=function(e){var t=xK(e);return function(e,n){return t(e,function(){return n})}},xK=function(e){var t=xL(e);return function(e,n){return function(r){var i=t(e,r);if(ed(i))return ep;var o=new Map(r);return o.set(i.value[0],n(i.value[1])),eA(o)}}};function xL(e){return function(t,n){if(void 0===n){var r=xL(e);return function(e){return r(t,e)}}for(var i,o=n.entries();!(i=o.next()).done;){var a=i.value,u=a[0],s=a[1];if(e.equals(u,t))return eA([u,s])}return ep}}var xB=function(e,t){return new Map([[e,t]])},xP=function(e,t){for(var n,r=new Map,i=e.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];r.set(a,t(a,u))}return r},xW=function(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=e(u,a[1]);eh(s)?r.set(u,s.left):i.set(u,s.right)}return oe(r,i)}};function xD(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=a[1];e(u,s)?i.set(u,s):r.set(u,s)}return oe(r,i)}}var xN=function(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=e(a,o[1]);ef(u)&&r.set(a,u.value)}return r}};function xq(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];e(a,u)&&r.set(a,u)}return r}}var xQ=function(e,t){return xP(e,function(e,n){return t(n)})},xV=function(e,t){return xZ(e,function(e,n){return t(n)})},xz=function(e,t){return xJ(e,function(e,n){return t(n)})},xY=function(e,t){return xG(e,function(e,n){return t(n)})},xH=function(e,t){return x$(e,function(e,n){return t(n)})},xZ=function(e,t){return ea(e,xq(t))},xJ=function(e,t){return ea(e,xN(t))},xG=function(e,t){return ea(e,xD(t))},x$=function(e,t){return ea(e,xW(t))},xX=function(e){for(var t,n=new Map,r=e.entries();!(t=r.next()).done;){var i=t.value,o=i[0],a=i[1];ef(a)&&n.set(o,a.value)}return n},x0=function(e){return function(t){return xV(t,e)}},x1=function(e){return function(t){return xz(t,e)}},x2=function(e){return function(t){return xQ(t,e)}},x6=function(e){return function(t){return xP(t,e)}},x5=function(e){return function(t){return xY(t,e)}},x3=function(e){return function(t){return xH(t,e)}},x9=function(e){for(var t,n=new Map,r=new Map,i=e.entries();!(t=i.next()).done;){var o=t.value,a=o[0],u=o[1];eh(u)?n.set(a,u.left):r.set(a,u.right)}return oe(n,r)},x4=function(e,t){var n=bl(e,t);return{concat:function(e,t){return n(t)(e)}}},x7=function(e,t){return{concat:x4(e,t).concat,empty:new Map}},x8=function(e,t){var n=bc(e,t);return{concat:function(e,t){return n(t)(e)}}},be=function(e){return function(){var t=bd(e);return{concat:function(e,n){return t(n)(e)}}}},bt=function(e){return xO(xO({},xg(e)),{URI:"Map"})},bn=function(e){return xO(xO({},xb(e)),{URI:"Map"})},br=function(e){var t=bn(e),n=xR(e),r=function(e){return function(t,r){for(var i=e.of(new Map),o=n(t),a=o.length,u=0;u<a;u++)!function(n){var a=o[n],u=t.get(a);i=e.ap(e.map(i,function(e){return function(t){return e.set(a,t)}}),r(a,u))}(u);return i}},i=function(e){var t=r(e);return function(e,n){return t(e,function(e,t){return n(t)})}},o=function(e){var t=r(e);return function(e){return t(e,function(e,t){return t})}};return{URI:"Map",_E:void 0,map:xQ,mapWithIndex:xP,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverse:i,sequence:o,traverseWithIndex:r}},bi={URI:"Map",map:xQ},bo=eB(bi),ba={URI:"Map",compact:xX,separate:x9},bu={URI:"Map",map:xQ,compact:xX,separate:x9,filter:xV,filterMap:xz,partition:xY,partitionMap:xH},bs=function(e){return new Map(e)},bl=function(e,t){var n=xw(e,t);return function(e){return function(t){return vk(t)?bs(e):vk(e)?bs(t):n(e)(t)}}},bc=function(e,t){var n=xI(e,t);return function(e){return function(t){return vk(t)||vk(e)?new Map:n(e)(t)}}},bd=function(e){var t=x_(e);return function(e){return function(n){return vk(n)?bs(e):vk(e)?bs(n):t(e)(n)}}},bf=new Map;let bp=Object.freeze(Object.defineProperty({__proto__:null,Compactable:ba,Filterable:bu,Functor:bi,URI:"Map",collect:xE,compact:xX,deleteAt:xj,difference:bd,elem:vM,empty:bf,filter:x0,filterMap:x1,filterMapWithIndex:xN,filterWithIndex:xq,flap:bo,foldMap:xh,foldMapWithIndex:xv,fromFoldable:function(e,t,n){return function(r){var i=xL(e);return n.reduce(r,new Map,function(e,n){var r=n[0],o=n[1],a=i(r,e);return ef(a)?e.set(a.value[0],t.concat(a.value[1],o)):e.set(r,o),e})}},getDifferenceMagma:be,getEq:vV,getFilterableWithIndex:function(){return{URI:"Map",_E:void 0,map:xQ,mapWithIndex:xP,compact:xX,separate:x9,filter:xV,filterMap:xz,partition:xY,partitionMap:xH,partitionMapWithIndex:x$,partitionWithIndex:xG,filterMapWithIndex:xJ,filterWithIndex:xZ}},getFoldable:bt,getFoldableWithIndex:bn,getIntersectionSemigroup:x8,getMonoid:function(e,t){var n=xL(e);return{concat:function(e,r){if(vk(e))return r;if(vk(r))return e;for(var i,o=new Map(e),a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s,e);ef(c)?o.set(c.value[0],t.concat(c.value[1],l)):o.set(s,l)}return o},empty:new Map}},getShow:vO,getTraversableWithIndex:br,getUnionMonoid:x7,getUnionSemigroup:x4,getWitherable:function(e){var t=br(e);return{URI:"Map",_E:void 0,map:xQ,compact:xX,separate:x9,filter:xV,filterMap:xz,partition:xY,partitionMap:xH,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,traverse:t.traverse,sequence:t.sequence,mapWithIndex:xP,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverseWithIndex:t.traverseWithIndex,wilt:op(t,ba),wither:oA(t,ba)}},insertAt:xF,intersection:bc,isEmpty:vk,isSubmap:vq,keys:xR,lookup:vN,lookupWithKey:xL,map:x2,mapWithIndex:x6,map_:bu,member:vE,modifyAt:xK,partition:x5,partitionMap:x3,partitionMapWithIndex:xW,partitionWithIndex:xD,pop:function(e){var t=vN(e),n=xj(e);return function(e){var r=n(e);return function(n){return ea(t(e,n),cz(function(e){return[e,r(n)]}))}}},reduce:xA,reduceRight:xm,reduceRightWithIndex:xx,reduceWithIndex:xy,separate:x9,singleton:xB,size:vR,toArray:xM,toUnfoldable:function(e,t){var n=xM(e);return function(e){var r=n(e),i=r.length;return t.unfold(0,function(e){return e<i?eA([r[e],e+1]):ep})}},union:bl,updateAt:xU,upsertAt:xF,values:xk},Symbol.toStringTag,{value:"Module"})),bA=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),bh=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),bm=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),bg=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),by=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var bv=function(e){return{concat:tE(e).concat,empty:e.top}},bx=function(e){return{concat:tM(e).concat,empty:e.bottom}},bb=function(e){return{concat:tI(e).concat,empty:e.empty}},bC=function(e){var t={};for(var n in e)eI.call(e,n)&&(t[n]=e[n].empty);return{concat:tj(e).concat,empty:t}},bS=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{concat:tU.apply(tz,e).concat,empty:e.map(function(e){return e.empty})}},bw=function(e){return tR(e)(e.empty)},bI={concat:tP.concat,empty:void 0},b_={concat:tD.concat,empty:!0},bT={concat:tN.concat,empty:!1},bO=function(){return bb(p5())},bR={concat:tq.concat,empty:""},bk={concat:tQ.concat,empty:0},bE={concat:tV.concat,empty:1};let bM=Object.freeze(Object.defineProperty({__proto__:null,concatAll:bw,fold:bw,getDualMonoid:bb,getEndomorphismMonoid:bO,getFunctionMonoid:V,getJoinMonoid:bx,getMeetMonoid:bv,getStructMonoid:bC,getTupleMonoid:bS,max:bx,min:bv,monoidAll:b_,monoidAny:bT,monoidProduct:bE,monoidString:bR,monoidSum:bk,monoidVoid:bI,reverse:bb,struct:bC,tuple:bS},Symbol.toStringTag,{value:"Module"})),bF=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var bj=function(e,t,n){return function(r){return -1===r?e():0===r?t():n()}},bU=function(e){return -1===e?1:1===e?-1:0},bK={equals:function(e,t){return e===t}},bL={concat:function(e,t){return 0!==e?e:t}},bB={concat:bL.concat,empty:0},bP=function(e){return e<=-1?-1:e>=1?1:0};let bW=Object.freeze(Object.defineProperty({__proto__:null,Eq:bK,Monoid:bB,Semigroup:bL,eqOrdering:bK,invert:bU,match:bj,matchW:bj,monoidOrdering:bB,reverse:bU,semigroupOrdering:bL,sign:bP},Symbol.toStringTag,{value:"Module"})),bD=Object.freeze(Object.defineProperty({__proto__:null,pipe:ea,pipeable:function(e){var t,n,r,i,o,a,u,s,l,c,d,f,p,A,h,m={};if("function"==typeof e.map){var g=function(t){return function(n){return e.map(n,t)}};m.map=g}if("function"==typeof e.contramap){var y=function(t){return function(n){return e.contramap(n,t)}};m.contramap=y}if("function"==typeof e.mapWithIndex){var v=function(t){return function(n){return e.mapWithIndex(n,t)}};m.mapWithIndex=v}if("function"==typeof e.ap){var x=function(t){return function(n){return e.ap(n,t)}},b=function(t){return function(n){return e.ap(e.map(n,function(e){return function(){return e}}),t)}};m.ap=x,m.apFirst=b,m.apSecond=function(t){return function(n){return e.ap(e.map(n,function(){return function(e){return e}}),t)}}}if("function"==typeof e.chain){var C=function(t){return function(n){return e.chain(n,t)}},S=function(t){return function(n){return e.chain(n,function(n){return e.map(t(n),function(){return n})})}},w=function(t){return e.chain(t,Z)};m.chain=C,m.chainFirst=S,m.flatten=w}if("function"==typeof e.bimap){var I=function(t,n){return function(r){return e.bimap(r,t,n)}},_=function(t){return function(n){return e.mapLeft(n,t)}};m.bimap=I,m.mapLeft=_}if("function"==typeof e.extend){var T=function(t){return function(n){return e.extend(n,t)}},O=function(t){return e.extend(t,Z)};m.extend=T,m.duplicate=O}if("function"==typeof e.reduce){var R=function(t,n){return function(r){return e.reduce(r,t,n)}},k=function(t){var n=e.foldMap(t);return function(e){return function(t){return n(t,e)}}},E=function(t,n){return function(r){return e.reduceRight(r,t,n)}};m.reduce=R,m.foldMap=k,m.reduceRight=E}if("function"==typeof e.reduceWithIndex){var M=function(t,n){return function(r){return e.reduceWithIndex(r,t,n)}},F=function(t){var n=e.foldMapWithIndex(t);return function(e){return function(t){return n(t,e)}}},j=function(t,n){return function(r){return e.reduceRightWithIndex(r,t,n)}};m.reduceWithIndex=M,m.foldMapWithIndex=F,m.reduceRightWithIndex=j}if("function"==typeof e.alt){var U=function(t){return function(n){return e.alt(n,t)}};m.alt=U}if("function"==typeof e.compact&&(m.compact=e.compact,m.separate=e.separate),"function"==typeof e.filter){var K=function(t){return function(n){return e.filter(n,t)}},L=function(t){return function(n){return e.filterMap(n,t)}},B=function(t){return function(n){return e.partition(n,t)}},P=function(t){return function(n){return e.partitionMap(n,t)}};m.filter=K,m.filterMap=L,m.partition=B,m.partitionMap=P}if("function"==typeof e.filterWithIndex){var W=function(t){return function(n){return e.filterWithIndex(n,t)}},D=function(t){return function(n){return e.filterMapWithIndex(n,t)}},N=function(t){return function(n){return e.partitionWithIndex(n,t)}},q=function(t){return function(n){return e.partitionMapWithIndex(n,t)}};m.filterWithIndex=W,m.filterMapWithIndex=D,m.partitionWithIndex=N,m.partitionMapWithIndex=q}if("function"==typeof e.promap){var Q=function(t,n){return function(r){return e.promap(r,t,n)}};m.promap=Q}if("function"==typeof e.compose){var V=function(t){return function(n){return e.compose(n,t)}};m.compose=V}if("function"==typeof e.throwError){var z=function(t){return function(n){return"None"===n._tag?e.throwError(t()):e.of(n.value)}},Y=function(t){return"Left"===t._tag?e.throwError(t.left):e.of(t.right)},H=function(t,n){return function(r){return t(r)?e.of(r):e.throwError(n(r))}},J=function(t,n){return function(r){return e.chain(r,function(r){return t(r)?e.of(r):e.throwError(n(r))})}};m.fromOption=z,m.fromEither=Y,m.fromPredicate=H,m.filterOrElse=J}return m}},Symbol.toStringTag,{value:"Module"})),bN=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),bq=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var bQ=function(){return Math.random()};function bV(e,t){return ea(bQ,mM(function(n){return Math.floor((t-e+1)*n+e)}))}var bz=ea(bQ,mM(function(e){return e<.5})),bY=function(e){return ea(bV(0,e.length-1),mM(function(t){return e[t]}))};let bH=Object.freeze(Object.defineProperty({__proto__:null,random:bQ,randomBool:bz,randomElem:bY,randomInt:bV,randomRange:function(e,t){return ea(bQ,mM(function(n){return(t-e)*n+e}))}},Symbol.toStringTag,{value:"Module"}));var bZ=pU(Aq),bJ=pj(Aq),bG=pK(AD),b$=pL(AD),bX=pH(AD),b0=pZ(AZ),b1=pJ(AZ),b2=p1(AD),b6=pG(AZ),b5=p$(AZ),b3=pX(AZ),b9=p0(AD),b4=function(e,t){return ea(e,Cr(t))},b7=function(e,t,n){return ea(e,Ci(t,n))},b8=function(e,t){return ea(e,Co(t))},Ce=function(e,t){return ea(e,Ca(t))},Ct=function(e,t){return ea(e,Cu(t))},Cn=function(e,t){return ea(e,Cl(t))},Cr=pD(AD),Ci=pV(AD),Co=pz(AD),Ca=pN(AQ),Cu=pq(AZ),Cs=Cu(Z),Cl=pQ(AZ),Cc="ReaderEither",Cd=function(e){var t=fM(e);return{URI:Cc,_E:void 0,compact:dX(AD,t),separate:d0(AD,t,fB)}};function Cf(e){var t=eT(AQ,fU(e));return{URI:Cc,_E:void 0,map:b4,ap:function(e,n){return ea(e,t(n))},of:bJ}}function Cp(e){var t=pY(AZ,e);return{URI:Cc,_E:void 0,map:b4,alt:function(e,n){return ea(e,t(n))}}}var CA={URI:Cc,map:b4},Ch=eB(CA),Cm={URI:Cc,map:b4,ap:Ce},Cg=eO(Cm),Cy=eR(Cm),Cv={URI:Cc,map:b4,ap:Ce,of:bJ},Cx={URI:Cc,map:b4,ap:Ce,chain:Ct},Cb=eV(Cx),CC={URI:Cc,fromReader:bG},CS=A8(CC),Cw=he(CC),CI=ht(CC),C_=hn(CC,Cx),CT=hr(CC,Cx),CO={URI:Cc,fromEither:J},CR=eH(CO),Ck=eJ(CO),CE=eG(CO,Cx),CM=eX(CO,Cx),CF=e0(CO,Cx),Cj=eZ(CO),CU=e1(CO,Cx),CK=e$(CO),CL=bJ(ew),CB=eP(CA),CP=ez(Cx),CW=ek(Cm),CD=bJ(eS),CN=function(e){return et(A2(e),AT(pw(eu)))},Cq=function(e){var t=CN(e);return function(e){return ex(e)?t(e):CD}},CQ=function(e){return Cq(function(t,n){return e(n)})},CV=CQ(Z),Cz=eE(Cm),CY=eN(Cv),CH=function(e){return eE(AQ)(fE(e))};let CZ=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:Cc,map:b4,alt:Cn},ApT:CD,Applicative:Cv,Apply:Cm,Bifunctor:{URI:Cc,bimap:b7,mapLeft:b8},Chain:Cx,Do:CL,FromEither:CO,FromReader:CC,Functor:CA,Monad:{URI:Cc,map:b4,ap:Ce,of:bJ,chain:Ct},MonadThrow:{URI:Cc,map:b4,ap:Ce,of:bJ,chain:Ct,throwError:bZ},Pointed:{URI:Cc,of:bJ},URI:Cc,alt:Cl,altW:Cl,ap:Ca,apFirst:Cg,apFirstW:Cg,apS:CW,apSW:CW,apSecond:Cy,apSecondW:Cy,apW:Ca,ask:CS,asks:Cw,asksReaderEither:Ab,asksReaderEitherW:Ab,bimap:Ci,bind:CP,bindTo:CB,bindW:CP,chain:Cu,chainEitherK:CM,chainEitherKW:CM,chainFirst:Cb,chainFirstEitherK:CF,chainFirstEitherKW:CF,chainFirstReaderK:CT,chainFirstReaderKW:CT,chainFirstW:Cb,chainOptionK:CE,chainReaderK:C_,chainReaderKW:C_,chainW:Cu,filterOrElse:CU,filterOrElseW:CU,flap:Ch,flatten:Cs,flattenW:Cs,fold:b0,foldW:b0,fromEither:J,fromEitherK:CK,fromOption:CR,fromOptionK:Ck,fromPredicate:Cj,fromReader:bG,fromReaderK:CI,getAltReaderValidation:Cp,getApplicativeReaderValidation:Cf,getApplyMonoid:CY,getApplySemigroup:Cz,getCompactable:Cd,getFilterable:function(e){var t=fF(e),n=Cd(e),r=p8(AD,t),i=Ae(AD,t),o=At(AD,t),a=An(AD,t);return{URI:Cc,_E:void 0,map:b4,compact:n.compact,separate:n.separate,filter:function(e,t){return ea(e,r(t))},filterMap:function(e,t){return ea(e,i(t))},partition:function(e,t){return ea(e,o(t))},partitionMap:function(e,t){return ea(e,a(t))}}},getOrElse:b1,getOrElseW:b1,getReaderValidation:function(e){var t=Cf(e),n=Cp(e);return{URI:Cc,_E:void 0,map:b4,ap:t.ap,of:bJ,chain:Ct,bimap:b7,mapLeft:b8,alt:n.alt,throwError:bZ}},getSemigroup:CH,left:bZ,leftReader:b$,local:Ax,map:Cr,mapLeft:Co,match:bX,matchE:b0,matchEW:b0,matchW:bX,of:bJ,orElse:b6,orElseFirst:b5,orElseFirstW:b5,orElseW:b6,orLeft:b3,readerEither:{URI:Cc,bimap:b7,mapLeft:b8,map:b4,of:bJ,ap:Ce,chain:Ct,alt:Cn,throwError:bZ},right:bJ,rightReader:bG,sequenceArray:CV,swap:b9,throwError:bZ,toUnion:b2,traverseArray:CQ,traverseArrayWithIndex:Cq,traverseReadonlyArrayWithIndex:Cq,traverseReadonlyNonEmptyArrayWithIndex:CN},Symbol.toStringTag,{value:"Module"}));function CJ(e){return function(t){return function(){return e.of(t)}}}function CG(e){return function(t){return function(n){return function(r){return e.map(n(r),t)}}}}function C$(e){return function(t){return function(n){return function(r){return e.ap(n(r),t(r))}}}}function CX(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(e){return t(e)(r)})}}}}function C0(e){return function(t){return et(t,e.of)}}let C1=Object.freeze(Object.defineProperty({__proto__:null,ap:C$,chain:CX,fromNaturalTransformation:function(e){return function(t){return et(t,e)}},fromReader:C0,getReaderM:function(e){var t=C$(e),n=CG(e),r=CX(e);return{map:function(e,t){return ea(e,n(t))},ap:function(e,n){return ea(e,t(n))},of:CJ(e),chain:function(e,t){return ea(e,r(t))},ask:function(){return e.of},asks:function(t){return et(t,e.of)},local:function(e,t){return function(n){return e(t(n))}},fromReader:C0(e),fromM:function(e){return function(){return e}}}},map:CG,of:CJ},Symbol.toStringTag,{value:"Module"}));var C2=function(e){return function(){return Promise.resolve().then(e)}},C6=function(e,t){return ea(e,C4(t))},C5=function(e,t){return ea(e,C7(t))},C3=function(e,t){return ea(e,Se(function(e){return ea(t,C4(e))}))},C9=function(e,t){return ea(e,Se(t))},C4=function(e){return function(t){return function(){return Promise.resolve().then(t).then(e)}}},C7=function(e){return function(t){return function(){return Promise.all([Promise.resolve().then(t),Promise.resolve().then(e)]).then(function(e){var t;return(0,e[0])(e[1])})}}},C8=function(e){return function(){return Promise.resolve(e)}},Se=function(e){return function(t){return function(){return Promise.resolve().then(t).then(function(t){return e(t)()})}}},St=Se(Z),Sn="Task",Sr={URI:Sn,map:C6},Si=eB(Sr),So={URI:Sn,of:C8},Sa={URI:Sn,map:C6,ap:C5},Su=eO(Sa),Ss=eR(Sa),Sl={URI:Sn,map:C6,ap:C5,of:C8},Sc={URI:Sn,map:C6,ap:C3},Sd={URI:Sn,map:C6,ap:C3,of:C8},Sf={URI:Sn,map:C6,ap:C5,chain:C9},Sp={URI:Sn,map:C6,of:C8,ap:C5,chain:C9},SA=eV(Sf),Sh={URI:Sn,fromIO:C2},Sm=Ah(Sh),Sg=Am(Sh,Sf),Sy=Ag(Sh,Sf),Sv=function(){return new Promise(function(e){})},Sx=C8(ew),Sb=eP(Sr),SC=ez(Sf),SS=ek(Sa),Sw=C8(eS),SI=function(e){return function(t){return function(){return Promise.all(t.map(function(t,n){return Promise.resolve().then(function(){return e(n,t)()})}))}}},S_=function(e){var t=SI(e);return function(e){return ex(e)?t(e):Sw}},ST=function(e){return function(t){return function(){return eC(t).reduce(function(t,n,r){return t.then(function(t){return Promise.resolve().then(e(r+1,n)).then(function(e){return t.push(e),t})})},Promise.resolve().then(e(0,eb(t))).then(ev))}}},SO=function(e){var t=ST(e);return function(e){return ex(e)?t(e):Sw}},SR=function(e){return S_(function(t,n){return e(n)})},Sk=SR(Z),SE=function(e){return SO(function(t,n){return e(n)})},SM=SE(Z),SF=eE(Sc),Sj=eN(Sd);let SU=Object.freeze(Object.defineProperty({__proto__:null,ApT:Sw,ApplicativePar:Sl,ApplicativeSeq:Sd,ApplyPar:Sa,ApplySeq:Sc,Chain:Sf,Do:Sx,FromIO:Sh,FromTask:{URI:Sn,fromIO:C2,fromTask:Z},Functor:Sr,Monad:Sp,MonadIO:{URI:Sn,map:C6,of:C8,ap:C5,chain:C9,fromIO:C2},MonadTask:{URI:Sn,map:C6,of:C8,ap:C5,chain:C9,fromIO:C2,fromTask:Z},Pointed:So,URI:Sn,ap:C7,apFirst:Su,apS:SS,apSecond:Ss,bind:SC,bindTo:Sb,chain:Se,chainFirst:SA,chainFirstIOK:Sy,chainIOK:Sg,delay:function(e){return function(t){return function(){return new Promise(function(n){setTimeout(function(){Promise.resolve().then(t).then(n)},e)})}}},flap:Si,flatten:St,fromIO:C2,fromIOK:Sm,fromTask:Z,getMonoid:Sj,getRaceMonoid:function(){return{concat:function(e,t){return function(){return Promise.race([Promise.resolve().then(e),Promise.resolve().then(t)])}},empty:Sv}},getSemigroup:SF,map:C4,never:Sv,of:C8,sequenceArray:Sk,sequenceSeqArray:SM,task:{URI:Sn,map:C6,of:C8,ap:C5,chain:C9,fromIO:C2,fromTask:Z},taskSeq:{URI:Sn,map:C6,of:C8,ap:C3,chain:C9,fromIO:C2,fromTask:Z},traverseArray:SR,traverseArrayWithIndex:S_,traverseReadonlyArrayWithIndex:S_,traverseReadonlyArrayWithIndexSeq:SO,traverseReadonlyNonEmptyArrayWithIndex:SI,traverseReadonlyNonEmptyArrayWithIndexSeq:ST,traverseSeqArray:SE,traverseSeqArrayWithIndex:SO},Symbol.toStringTag,{value:"Module"}));var SK=C0(So),SL=et(C2,J),SB=function(e,t){return ea(e,SN(t))},SP=function(e,t){return ea(e,Sq(t))},SW=function(e,t){return ea(e,SV(function(e){return ea(t,SN(e))}))},SD=function(e,t){return ea(e,SV(t))},SN=CG(Sr),Sq=C$(Sa),SQ=CJ(So),SV=CX(Sp),Sz=SV(Z),SY="ReaderTask",SH={URI:SY,map:SB},SZ=eB(SH),SJ={URI:SY,of:SQ},SG={URI:SY,map:SB,ap:SP},S$=eO(SG),SX=eR(SG),S0={URI:SY,map:SB,ap:SW},S1={URI:SY,map:SB,ap:SW,of:SQ},S2={URI:SY,map:SB,ap:SP,chain:SD},S6={URI:SY,map:SB,of:SQ,ap:SP,chain:SD},S5=eV(S2),S3={URI:SY,fromIO:SL},S9=Ah(S3),S4=Am(S3,S2),S7=Ag(S3,S2),S8={URI:SY,fromReader:SK},we=A8(S8),wt=he(S8),wn=ht(S8),wr=hn(S8,S2),wi=hr(S8,S2),wo={URI:SY,fromIO:SL,fromTask:J},wa=hV(wo),wu=hz(wo,S2),ws=hY(wo,S2),wl=SQ(ew),wc=eP(SH),wd=ez(S2),wf=ek(SG),wp=SQ(eS),wA=function(e){return et(A2(e),AT(SI(eu)))},wh=function(e){var t=wA(e);return function(e){return ex(e)?t(e):wp}},wm=function(e){return et(A2(e),AT(ST(eu)))},wg=function(e){var t=wm(e);return function(e){return ex(e)?t(e):wp}},wy=function(e){return wh(function(t,n){return e(n)})},wv=wy(Z),wx=function(e){return wg(function(t,n){return e(n)})},wb=wx(Z),wC=eE(S0),wS=eN(S1);function ww(e,t){return e(t)()}let wI=Object.freeze(Object.defineProperty({__proto__:null,ApT:wp,ApplicativePar:{URI:SY,map:SB,ap:SP,of:SQ},ApplicativeSeq:S1,ApplyPar:SG,ApplySeq:S0,Chain:S2,Do:wl,FromIO:S3,FromReader:S8,FromTask:wo,Functor:SH,Monad:S6,MonadIO:{URI:SY,map:SB,of:SQ,ap:SP,chain:SD,fromIO:SL},MonadTask:{URI:SY,map:SB,of:SQ,ap:SP,chain:SD,fromIO:SL,fromTask:J},Pointed:SJ,URI:SY,ap:Sq,apFirst:S$,apS:wf,apSW:wf,apSecond:SX,apW:Sq,ask:we,asks:wt,asksReaderTask:Ab,asksReaderTaskW:Ab,bind:wd,bindTo:wc,bindW:wd,chain:SV,chainFirst:S5,chainFirstIOK:S7,chainFirstReaderK:wi,chainFirstReaderKW:wi,chainFirstTaskK:ws,chainFirstW:S5,chainIOK:S4,chainReaderK:wr,chainReaderKW:wr,chainTaskK:wu,chainW:SV,flap:SZ,flatten:Sz,flattenW:Sz,fromIO:SL,fromIOK:S9,fromReader:SK,fromReaderK:wn,fromTask:J,fromTaskK:wa,getMonoid:wS,getSemigroup:wC,local:Ax,map:SN,of:SQ,readerTask:{URI:SY,map:SB,of:SQ,ap:SP,chain:SD,fromIO:SL,fromTask:J},readerTaskSeq:{URI:SY,map:SB,of:SQ,ap:SW,chain:SD,fromIO:SL,fromTask:J},run:ww,sequenceArray:wv,sequenceSeqArray:wb,traverseArray:wy,traverseArrayWithIndex:wh,traverseReadonlyArrayWithIndex:wh,traverseReadonlyArrayWithIndexSeq:wg,traverseReadonlyNonEmptyArrayWithIndex:wA,traverseReadonlyNonEmptyArrayWithIndexSeq:wm,traverseSeqArray:wx,traverseSeqArrayWithIndex:wg},Symbol.toStringTag,{value:"Module"}));var w_=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(u){o=[6,u],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},wT=pU(So),wO=pj(So),wR=pK(Sr),wk=pL(Sr),wE=et(C2,wR),wM=et(C2,wk),wF=function(e){return C4(f9(e))},wj=pH(Sr),wU=pZ(Sp),wK=pJ(Sp),wL=function(e,t){return function(){var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function(){var n;return w_(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e().then(ey)];case 1:return[2,n.sent()];case 2:return[2,eg(t(n.sent()))];case 3:return[2]}})},new(i||(i=Promise))(function(e,t){function a(e){try{s(o.next(e))}catch(n){t(n)}}function u(e){try{s(o.throw(e))}catch(n){t(n)}}function s(t){var n;t.done?e(t.value):((n=t.value)instanceof i?n:new i(function(e){e(n)})).then(a,u)}s((o=o.apply(n,r||[])).next())})}},wB=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return wL(function(){return e.apply(void 0,n)},t)}},wP=p1(Sr),wW=pB(So),wD=pP(So),wN=pW(Sp),wq=pG(Sp),wQ=p$(Sp),wV=function(e){return wQ(IT(e))},wz=function(e){return wQ(IE(e))},wY=pX(Sp),wH=p0(Sr),wZ=function(e){var t=wF(e);return function(e){return et(e,t)}},wJ=function(e){return function(t){return function(n){return ea(n,Ie(wZ(e)(t)))}}},wG=function(e){return et(e,C2)},w$=function(e){return It(wG(e))},wX=function(e,t){return ea(e,w9(t))},w0=function(e,t){return ea(e,w8(t))},w1=function(e,t){return ea(e,Ie(function(e){return ea(t,w9(e))}))},w2=function(e,t){return ea(e,Ie(t))},w6=function(e,t,n){return ea(e,w4(t,n))},w5=function(e,t){return ea(e,w7(t))},w3=function(e,t){return ea(e,Ir(t))},w9=pD(Sr),w4=pV(Sr),w7=pz(Sr),w8=pN(Sa),Ie=pq(Sp),It=Ie,In=It(Z),Ir=pQ(Sp),Ii="TaskEither";function Io(e,t){var n=eT(e,fU(t));return{URI:Ii,_E:void 0,map:wX,ap:function(e,t){return ea(e,n(t))},of:wO}}function Ia(e){var t=pY(Sp,e);return{URI:Ii,_E:void 0,map:wX,alt:function(e,n){return ea(e,t(n))}}}var Iu=function(e){var t=fM(e);return{URI:Ii,_E:void 0,compact:dX(Sr,t),separate:d0(Sr,t,fB)}},Is={URI:Ii,map:wX},Il=eB(Is),Ic={URI:Ii,map:wX,ap:w0},Id=eO(Ic),If=eR(Ic),Ip={URI:Ii,map:wX,ap:w1},IA={URI:Ii,map:wX,ap:w1,of:wO},Ih={URI:Ii,map:wX,ap:w0,chain:w2},Im=eV(Ih),Ig={URI:Ii,fromEither:C8},Iy=eH(Ig),Iv=eJ(Ig),Ix=eG(Ig,Ih),Ib=eX(Ig,Ih),IC=e0(Ig,Ih),IS=eZ(Ig),Iw=e1(Ig,Ih),II=e$(Ig),I_={URI:Ii,fromIO:wE},IT=Ah(I_),IO=Am(I_,Ih),IR=Ag(I_,Ih),Ik={URI:Ii,fromIO:wE,fromTask:wR},IE=hV(Ik),IM=hz(Ik,Ih),IF=hY(Ik,Ih),Ij=function(e,t,n){return IU(e,t,n)},IU=function(e,t,n){return ea(e,It(function(e){return ea(t(e),Se(function(t){return ea(n(e,t),It(function(){return C8(t)}))}))}))},IK=wO(ew),IL=eP(Is),IB=ez(Ih),IP=ek(Ic),IW=wO(eS),ID=function(e){return et(SI(e),C4(pw(eu)))},IN=function(e){var t=ID(e);return function(e){return ex(e)?t(e):IW}},Iq=function(e){return function(t){return function(){return eC(t).reduce(function(t,n,r){return t.then(function(i){return eh(i)?t:e(r+1,n)().then(function(e){return eh(e)?e:(i.right.push(e.right),i)})})},e(0,eb(t))().then(fL(ev)))}}},IQ=function(e){var t=Iq(e);return function(e){return ex(e)?t(e):IW}},IV=function(e){return IN(function(t,n){return e(n)})},Iz=IV(Z),IY=function(e){return IQ(function(t,n){return e(n)})},IH=IY(Z),IZ=eE(Ip),IJ=eN(IA),IG=function(e){return eE(Sc)(fE(e))};let I$=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:Ii,map:wX,alt:w3},ApT:IW,ApplicativePar:{URI:Ii,map:wX,ap:w0,of:wO},ApplicativeSeq:IA,ApplyPar:Ic,ApplySeq:Ip,Bifunctor:{URI:Ii,bimap:w6,mapLeft:w5},Chain:Ih,Do:IK,FromEither:Ig,FromIO:I_,FromTask:Ik,Functor:Is,Monad:{URI:Ii,map:wX,ap:w0,chain:w2,of:wO},MonadIO:{URI:Ii,map:wX,ap:w0,chain:w2,of:wO,fromIO:wE},MonadTask:{URI:Ii,map:wX,ap:w0,chain:w2,of:wO,fromIO:wE,fromTask:wR},MonadThrow:{URI:Ii,map:wX,ap:w0,chain:w2,of:wO,throwError:wT},Pointed:{URI:Ii,of:wO},URI:Ii,alt:Ir,altW:Ir,ap:w8,apFirst:Id,apFirstW:Id,apS:IP,apSW:IP,apSecond:If,apSecondW:If,apW:w8,bimap:w4,bind:IB,bindTo:IL,bindW:IB,bracket:Ij,bracketW:IU,chain:Ie,chainEitherK:Ib,chainEitherKW:Ib,chainFirst:Im,chainFirstEitherK:IC,chainFirstEitherKW:IC,chainFirstIOK:IR,chainFirstTaskK:IF,chainFirstW:Im,chainIOEitherK:w$,chainIOEitherKW:w$,chainIOK:IO,chainNullableK:wN,chainOptionK:Ix,chainTaskK:IM,chainTaskOptionK:wJ,chainTaskOptionKW:wJ,chainW:It,filterOrElse:Iw,filterOrElseW:Iw,flap:Il,flatten:In,flattenW:In,fold:wU,foldW:wU,fromEither:C8,fromEitherK:II,fromIO:wE,fromIOEither:C2,fromIOEitherK:wG,fromIOK:IT,fromNullable:wW,fromNullableK:wD,fromOption:Iy,fromOptionK:Iv,fromPredicate:IS,fromTask:wR,fromTaskK:IE,fromTaskOption:wF,fromTaskOptionK:wZ,getAltTaskValidation:Ia,getApplicativeTaskValidation:Io,getApplyMonoid:IJ,getApplySemigroup:IZ,getCompactable:Iu,getFilterable:function(e){var t=fF(e),n=Iu(e),r=p8(Sr,t),i=Ae(Sr,t),o=At(Sr,t),a=An(Sr,t);return{URI:Ii,_E:void 0,map:wX,compact:n.compact,separate:n.separate,filter:function(e,t){return ea(e,r(t))},filterMap:function(e,t){return ea(e,i(t))},partition:function(e,t){return ea(e,o(t))},partitionMap:function(e,t){return ea(e,a(t))}}},getOrElse:wK,getOrElseW:wK,getSemigroup:IG,getTaskValidation:function(e){var t=Io(Sl,e),n=Ia(e);return{URI:Ii,_E:void 0,map:wX,ap:t.ap,of:wO,chain:w2,bimap:w6,mapLeft:w5,alt:n.alt,fromIO:wE,fromTask:wR,throwError:wT}},left:wT,leftIO:wM,leftTask:wk,map:w9,mapLeft:w7,match:wj,matchE:wU,matchEW:wU,matchW:wj,of:wO,orElse:wq,orElseFirst:wQ,orElseFirstIOK:wV,orElseFirstTaskK:wz,orElseFirstW:wQ,orElseW:wq,orLeft:wY,right:wO,rightIO:wE,rightTask:wR,sequenceArray:Iz,sequenceSeqArray:IH,swap:wH,taskEither:{URI:Ii,bimap:w6,mapLeft:w5,map:wX,of:wO,ap:w0,chain:w2,alt:w3,fromIO:wE,fromTask:wR,throwError:wT},taskEitherSeq:{URI:Ii,bimap:w6,mapLeft:w5,map:wX,of:wO,ap:w1,chain:w2,alt:w3,fromIO:wE,fromTask:wR,throwError:wT},taskify:function(e){return function(){var t=Array.prototype.slice.call(arguments);return function(){return new Promise(function(n){var r=function(e,t){return null!=e?n(eg(e)):n(ey(t))};e.apply(null,t.concat(r))})}}},throwError:wT,toUnion:wP,traverseArray:IV,traverseArrayWithIndex:IN,traverseReadonlyArrayWithIndex:IN,traverseReadonlyArrayWithIndexSeq:IQ,traverseReadonlyNonEmptyArrayWithIndex:ID,traverseReadonlyNonEmptyArrayWithIndexSeq:Iq,traverseSeqArray:IY,traverseSeqArrayWithIndex:IQ,tryCatch:wL,tryCatchK:wB},Symbol.toStringTag,{value:"Module"}));var IX=pU(SJ),I0=pj(SJ),I1=et(wR,J),I2=et(wk,J),I6=function(e){return et(e,wO)},I5=function(e){return et(e,wT)},I3=pK(SH),I9=pL(SH),I4=et(wE,J),I7=et(wM,J),I8=et(C2,J),_e=function(e){return et(e,C8)},_t=pH(SH),_n=pZ(S2),_r=pJ(S6),_i=p1(SH),_o=pB(SJ),_a=pP(SJ),_u=pW(S6),_s=pG(S6),_l=p$(S6),_c=pX(S6),_d=p0(SH),_f=function(e){return et(e,I8)},_p=function(e){return _M(_f(e))},_A=function(e){return et(e,J)},_h=function(e){return _M(_A(e))},_m=function(e){return _Z(_A(e))},_g=function(e){return et(e,_e)},_y=function(e){return _M(_g(e))},_v=function(e){return _Z(_g(e))},_x=function(e,t){return ea(e,_T(t))},_b=function(e,t){return ea(e,_k(t))},_C=function(e,t){return ea(e,_E(function(e){return ea(t,_T(e))}))},_S=function(e,t){return ea(e,_E(t))},_w=function(e,t){return ea(e,_j(t))},_I=function(e,t,n){return ea(e,_O(t,n))},__=function(e,t){return ea(e,_R(t))},_T=pD(SH),_O=pV(SH),_R=pz(SH),_k=pN(SG),_E=pq(S6),_M=_E,_F=_M(Z),_j=pQ(S6),_U="ReaderTaskEither",_K=function(e){var t=fM(e);return{URI:_U,_E:void 0,compact:dX(SH,t),separate:d0(SH,t,fB)}};function _L(e,t){var n=eT(AQ,Io(e,t));return{URI:_U,_E:void 0,map:_x,ap:function(e,t){return ea(e,n(t))},of:I0}}function _B(e){var t=pY(S6,e);return{URI:_U,_E:void 0,map:_x,alt:function(e,n){return ea(e,t(n))}}}var _P={URI:_U,map:_x},_W=eB(_P),_D={URI:_U,of:I0},_N={URI:_U,map:_x,ap:_b},_q=eO(_N),_Q=eR(_N),_V={URI:_U,map:_x,ap:_C},_z={URI:_U,map:_x,ap:_C,of:I0},_Y={URI:_U,map:_x,ap:_b,chain:_S},_H=eV(_Y),_Z=_H,_J={URI:_U,fromReader:I6},_G=A8(_J),_$=he(_J),_X=ht(_J),_0=hn(_J,_Y),_1=hr(_J,_Y),_2=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return I3(e.apply(void 0,t))}},_6=function(e){return _M(_2(e))},_5=function(e){return _Z(_2(e))},_3={URI:_U,fromEither:SQ},_9=eH(_3),_4=eJ(_3),_7=eG(_3,_Y),_8=eX(_3,_Y),Te=e0(_3,_Y),Tt=eZ(_3),Tn=e1(_3,_Y),Tr=e$(_3),Ti={URI:_U,fromIO:I4},To=Ah(Ti),Ta=Am(Ti,_Y),Tu=Ag(Ti,_Y),Ts={URI:_U,fromIO:I4,fromTask:I1},Tl=hV(Ts),Tc=hz(Ts,_Y),Td=hY(Ts,_Y);function Tf(e,t,n){return Tp(e,t,n)}function Tp(e,t,n){return function(r){return IU(e(r),function(e){return t(e)(r)},function(e,t){return n(e,t)(r)})}}var TA=I0(ew),Th=eP(_P),Tm=ez(_Y),Tg=ek(_N),Ty=I0(eS),Tv=function(e){return et(A2(e),AT(ID(eu)))},Tx=function(e){var t=Tv(e);return function(e){return ex(e)?t(e):Ty}},Tb=function(e){return et(A2(e),AT(Iq(eu)))},TC=function(e){var t=Tb(e);return function(e){return ex(e)?t(e):Ty}},TS=function(e){return Tx(function(t,n){return e(n)})},Tw=TS(Z),TI=function(e){return TC(function(t,n){return e(n)})},T_=TI(Z),TT=eE(_V),TO=eN(_z),TR=function(e){return eE(S0)(fE(e))};function Tk(e,t){return e(t)()}let TE=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:_U,map:_x,alt:_w},ApT:Ty,ApplicativePar:{URI:_U,map:_x,ap:_b,of:I0},ApplicativeSeq:_z,ApplyPar:_N,ApplySeq:_V,Bifunctor:{URI:_U,bimap:_I,mapLeft:__},Chain:_Y,Do:TA,FromEither:_3,FromIO:Ti,FromReader:_J,FromTask:Ts,Functor:_P,Monad:{URI:_U,map:_x,ap:_b,chain:_S,of:I0},MonadIO:{URI:_U,map:_x,ap:_b,chain:_S,of:I0,fromIO:I4},MonadTask:{URI:_U,map:_x,ap:_b,chain:_S,of:I0,fromIO:I4,fromTask:I1},MonadThrow:{URI:_U,map:_x,ap:_b,chain:_S,of:I0,throwError:IX},Pointed:_D,URI:_U,alt:_j,altW:_j,ap:_k,apFirst:_q,apFirstW:_q,apS:Tg,apSW:Tg,apSecond:_Q,apSecondW:_Q,apW:_k,ask:_G,asks:_$,asksReaderTaskEither:Ab,asksReaderTaskEitherW:Ab,bimap:_O,bind:Tm,bindTo:Th,bindW:Tm,bracket:Tf,bracketW:Tp,chain:_E,chainEitherK:_8,chainEitherKW:_8,chainFirst:_H,chainFirstEitherK:Te,chainFirstEitherKW:Te,chainFirstIOK:Tu,chainFirstReaderEitherK:_v,chainFirstReaderEitherKW:_v,chainFirstReaderK:_1,chainFirstReaderKW:_1,chainFirstReaderTaskK:_5,chainFirstReaderTaskKW:_5,chainFirstTaskEitherK:_m,chainFirstTaskEitherKW:_m,chainFirstTaskK:Td,chainFirstW:_Z,chainIOEitherK:_p,chainIOEitherKW:_p,chainIOK:Ta,chainNullableK:_u,chainOptionK:_7,chainReaderEitherK:_y,chainReaderEitherKW:_y,chainReaderK:_0,chainReaderKW:_0,chainReaderTaskK:_6,chainReaderTaskKW:_6,chainTaskEitherK:_h,chainTaskEitherKW:_h,chainTaskK:Tc,chainW:_M,filterOrElse:Tn,filterOrElseW:Tn,flap:_W,flatten:_F,flattenW:_F,fold:_n,foldW:_n,fromEither:SQ,fromEitherK:Tr,fromIO:I4,fromIOEither:I8,fromIOEitherK:_f,fromIOK:To,fromNullable:_o,fromNullableK:_a,fromOption:_9,fromOptionK:_4,fromPredicate:Tt,fromReader:I6,fromReaderEither:_e,fromReaderEitherK:_g,fromReaderK:_X,fromReaderTaskK:_2,fromTask:I1,fromTaskEither:J,fromTaskEitherK:_A,fromTaskK:Tl,getAltReaderTaskValidation:_B,getApplicativeReaderTaskValidation:_L,getApplyMonoid:TO,getApplySemigroup:TT,getCompactable:_K,getFilterable:function(e){var t=fF(e),n=_K(e),r=p8(SH,t),i=Ae(SH,t),o=At(SH,t),a=An(SH,t);return{URI:_U,_E:void 0,map:_x,compact:n.compact,separate:n.separate,filter:function(e,t){return ea(e,r(t))},filterMap:function(e,t){return ea(e,i(t))},partition:function(e,t){return ea(e,o(t))},partitionMap:function(e,t){return ea(e,a(t))}}},getOrElse:_r,getOrElseW:_r,getReaderTaskValidation:function(e){var t=_L(Sl,e),n=_B(e);return{URI:_U,_E:void 0,map:_x,of:I0,chain:_S,bimap:_I,mapLeft:__,ap:t.ap,alt:n.alt,fromIO:I4,fromTask:I1,throwError:IX}},getSemigroup:TR,left:IX,leftIO:I7,leftReader:I5,leftReaderTask:I9,leftTask:I2,local:Ax,map:_T,mapLeft:_R,match:_t,matchE:_n,matchEW:_n,matchW:_t,of:I0,orElse:_s,orElseFirst:_l,orElseFirstW:_l,orElseW:_s,orLeft:_c,readerTaskEither:{URI:_U,map:_x,of:I0,ap:_b,chain:_S,alt:_w,bimap:_I,mapLeft:__,fromIO:I4,fromTask:I1,throwError:IX},readerTaskEitherSeq:{URI:_U,map:_x,of:I0,ap:_C,chain:_S,alt:_w,bimap:_I,mapLeft:__,fromIO:I4,fromTask:I1,throwError:IX},right:I0,rightIO:I4,rightReader:I6,rightReaderTask:I3,rightTask:I1,run:Tk,sequenceArray:Tw,sequenceSeqArray:T_,swap:_d,throwError:IX,toUnion:_i,traverseArray:TS,traverseArrayWithIndex:Tx,traverseReadonlyArrayWithIndex:Tx,traverseReadonlyArrayWithIndexSeq:TC,traverseReadonlyNonEmptyArrayWithIndex:Tv,traverseReadonlyNonEmptyArrayWithIndexSeq:Tb,traverseSeqArray:TI,traverseSeqArrayWithIndex:TC},Symbol.toStringTag,{value:"Module"}));var TM={equals:function(e,t){return e===t}},TF={concat:function(e,t){return e+t}},Tj={concat:TF.concat,empty:""},TU={equals:TM.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},TK=function(e){return"string"==typeof e},TL=function(e){return e.toUpperCase()},TB=function(e){return e.toLowerCase()},TP=function(e,t){return function(n){return n.replace(e,t)}},TW=function(e){return e.trim()},TD=function(e){return e.trimLeft()},TN=function(e){return e.trimRight()},Tq=function(e,t){return function(n){return n.slice(e,t)}},TQ=function(e){return 0===e.length},TV=function(e){return e.length},Tz=function(e){return function(t){var n=t.split(e);return ex(n)?n:[t]}},TY=function(e,t){return function(n){return n.includes(e,t)}},TH=function(e,t){return function(n){return n.startsWith(e,t)}},TZ=function(e,t){return function(n){return n.endsWith(e,t)}};let TJ=Object.freeze(Object.defineProperty({__proto__:null,Eq:TM,Monoid:Tj,Ord:TU,Semigroup:TF,Show:{show:function(e){return JSON.stringify(e)}},empty:"",endsWith:TZ,includes:TY,isEmpty:TQ,isString:TK,replace:TP,size:TV,slice:Tq,split:Tz,startsWith:TH,toLowerCase:TB,toUpperCase:TL,trim:TW,trimLeft:TD,trimRight:TN},Symbol.toStringTag,{value:"Module"}));var TG=function(e){return Object.assign({},e)},T$=function(e){return Object.assign({},e)},TX=function(e){return Object.keys(e).length},T0=function(e){for(var t in e)if(eI.call(e,t))return!1;return!0},T1=function(e){return function(t){return Object.keys(t).sort(e.compare)}},T2=T1(TU);function T6(e){if("function"==typeof e)return T6(TU)(e);var t=T1(e);return function(e){return function(n){for(var r=[],i=0,o=t(n);i<o.length;i++){var a=o[i];r.push(e(a,n[a]))}return r}}}var T5=T6(TU)(function(e,t){return[e,t]}),T3=function(e,t){return function(n){if(eI.call(n,e)&&n[e]===t)return n;var r=Object.assign({},n);return r[e]=t,r}},T9=function(e,t){return eI.call(t,e)};function T4(e){return function(t){if(!eI.call(t,e))return t;var n=Object.assign({},t);return delete n[e],n}}var T7=function(e,t){return function(n){if(!T9(e,n))return ep;if(n[e]===t)return eA(n);var r=Object.assign({},n);return r[e]=t,eA(r)}},T8=function(e,t){return function(n){if(!T9(e,n))return ep;var r=t(n[e]);if(r===n[e])return eA(n);var i=Object.assign({},n);return i[e]=r,eA(i)}};function Oe(e){return function(t,n){if(void 0===n){var r=Oe(e);return function(e){return r(e,t)}}for(var i in t)if(!eI.call(n,i)||!e.equals(t[i],n[i]))return!1;return!0}}function Ot(e,t){return void 0===t?function(t){return Ot(e,t)}:eI.call(t,e)?eA(t[e]):ep}var On={};function Or(e){return function(t){var n={};for(var r in t)eI.call(t,r)&&(n[r]=e(r,t[r]));return n}}function Oi(e){return Or(function(t,n){return e(n)})}function Oo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(2===e.length)return Oo(TU).apply(void 0,e);var n=T1(e[0]);return function(e,t){return function(r){for(var i=e,o=n(r),a=o.length,u=0;u<a;u++){var s=o[u];i=t(s,i,r[s])}return i}}}function Oa(e){if("compare"in e){var t=T1(e);return function(e){return function(n){return function(r){for(var i=e.empty,o=t(r),a=o.length,u=0;u<a;u++){var s=o[u];i=e.concat(i,n(s,r[s]))}return i}}}}return Oa(TU)(e)}function Ou(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(2===e.length)return Ou(TU).apply(void 0,e);var n=T1(e[0]);return function(e,t){return function(r){for(var i=e,o=n(r),a=o.length,u=a-1;u>=0;u--){var s=o[u];i=t(s,r[s],i)}return i}}}var Os=function(e,t){var n;return(n={})[e]=t,n};function Ol(e){var t=OV(TU)(e);return function(e){return function(n){return t(n,e)}}}function Oc(e){var t=Oq(TU)(e);return function(e){return function(n){return t(n,e)}}}function Od(e){return OQ(TU)(e)}var Of=function(e){var t=Oc(e);return function(n){return function(r){return e.map(ea(r,t(n)),OX)}}},Op=function(e){var t=Oc(e);return function(n){return function(r){return e.map(ea(r,t(n)),O0)}}};function OA(e){return function(t){var n={},r={};for(var i in t)if(eI.call(t,i)){var o=e(i,t[i]);switch(o._tag){case"Left":n[i]=o.left;break;case"Right":r[i]=o.right}}return oe(n,r)}}function Oh(e){return function(t){var n={},r={};for(var i in t)if(eI.call(t,i)){var o=t[i];e(i,o)?r[i]=o:n[i]=o}return oe(n,r)}}function Om(e){return function(t){var n={};for(var r in t)if(eI.call(t,r)){var i=e(r,t[r]);ef(i)&&(n[r]=i.value)}return n}}function Og(e){return function(t){var n={},r=!1;for(var i in t)if(eI.call(t,i)){var o=t[i];e(i,o)?n[i]=o:r=!0}return r?n:t}}function Oy(e,t){var n=Ov(e,t);return function(e){return n(e,Z)}}function Ov(e,t){return function(n,r){return t.reduce(n,{},function(t,n){var i=r(n),o=i[0],a=i[1];return t[o]=eI.call(t,o)?e.concat(t[o],a):a,t})}}var Ox=function(e){for(var t={},n=0;n<e.length;n++){var r=e[n];t[r[0]]=r[1]}return t};function Ob(e){return function(t){for(var n in t)if(!e(t[n]))return!1;return!0}}function OC(e){return function(t){for(var n in t)if(e(t[n]))return!0;return!1}}function OS(e){return function(t,n){if(void 0===n){var r=OS(e);return function(e){return r(t,e)}}for(var i in n)if(e.equals(n[i],t))return!0;return!1}}var Ow=function(e){return function(t){return function(n){if(T0(n))return t;if(T0(t))return n;var r={};for(var i in n)T9(i,t)?r[i]=e.concat(n[i],t[i]):r[i]=n[i];for(var i in t)T9(i,r)||(r[i]=t[i]);return r}}},OI=function(e){return function(t){return function(n){if(T0(n)||T0(t))return On;var r={};for(var i in n)T9(i,t)&&(r[i]=e.concat(n[i],t[i]));return r}}},O_=function(e){return function(t){if(T0(t))return e;if(T0(e))return t;var n={};for(var r in t)T9(r,e)||(n[r]=t[r]);for(var r in e)T9(r,t)||(n[r]=e[r]);return n}},OT=function(e,t){return ea(e,Oi(t))},OO=function(e,t){return ea(e,Or(t))},OR=function(e){var t=OJ(e);return function(e,n,r){return ea(e,t(n,r))}},Ok=function(e){return function(t){var n=OG(e)(t);return function(e,t){return ea(e,n(t))}}},OE=function(e){var t=O$(e);return function(e,n,r){return ea(e,t(n,r))}},OM=function(e,t){return ea(e,Oz(t))},OF=function(e,t){return ea(e,OY(t))},Oj=function(e,t){return ea(e,OH(t))},OU=function(e,t){return ea(e,OZ(t))},OK=function(e){var t=Oo(e);return function(e,n,r){return ea(e,t(n,r))}},OL=function(e){var t=Oa(e);return function(e){var n=t(e);return function(e,t){return ea(e,n(t))}}},OB=function(e){var t=Ou(e);return function(e,n,r){return ea(e,t(n,r))}},OP=function(e,t){return ea(e,OA(t))},OW=function(e,t){return ea(e,Oh(t))},OD=function(e,t){return ea(e,Om(t))},ON=function(e,t){return ea(e,Og(t))},Oq=function(e){var t=OV(e);return function(e){var n=t(e);return function(e,t){return n(e,et(eu,t))}}},OQ=function(e){var t=Oq(e);return function(e){var n=t(e);return function(e){return n(e,Z)}}},OV=function(e){return function(t){var n=T1(e);return function(e,r){var i=n(e);if(0===i.length)return t.of(On);for(var o=t.of({}),a=function(n){o=t.ap(t.map(o,function(e){return function(t){var r;return Object.assign({},e,((r={})[n]=t,r))}}),r(n,e[n]))},u=0;u<i.length;u++)a(i[u]);return o}}},Oz=function(e){return Og(function(t,n){return e(n)})},OY=function(e){return Om(function(t,n){return e(n)})},OH=function(e){return Oh(function(t,n){return e(n)})},OZ=function(e){return OA(function(t,n){return e(n)})};function OJ(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){var n=Oo(e[0]);return function(e,t){return n(e,function(e,n,r){return t(n,r)})}}return OJ(TU).apply(void 0,e)}function OG(e){if("compare"in e){var t=Oa(e);return function(e){var n=t(e);return function(e){return n(function(t,n){return e(n)})}}}return OG(TU)(e)}function O$(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){var n=Ou(e[0]);return function(e,t){return n(e,function(e,n,r){return t(n,r)})}}return O$(TU).apply(void 0,e)}var OX=function(e){var t={};for(var n in e)if(eI.call(e,n)){var r=e[n];ef(r)&&(t[n]=r.value)}return t},O0=function(e){var t={},n={};for(var r in e)if(eI.call(e,r)){var i=e[r];eh(i)?t[r]=i.left:n[r]=i.right}return oe(t,n)},O1="ReadonlyRecord";function O2(e){return"compare"in e?function(t){return{show:function(n){var r=T6(e)(function(e,n){return"".concat(JSON.stringify(e),": ").concat(t.show(n))})(n).join(", ");return""===r?"{}":"{ ".concat(r," }")}}}:O2(TU)(e)}function O6(e){var t=Oe(e);return e6(function(e,n){return t(e)(n)&&t(n)(e)})}function O5(e){return{concat:function(t,n){if(T0(t))return n;if(T0(n))return t;var r=Object.assign({},t);for(var i in n)eI.call(n,i)&&(r[i]=eI.call(t,i)?e.concat(t[i],n[i]):n[i]);return r},empty:On}}var O3={URI:O1,map:OT},O9=eB(O3),O4=function(e){return{URI:O1,reduce:OR(e),foldMap:Ok(e),reduceRight:OE(e)}},O7=function(e){return{URI:O1,reduce:OR(e),foldMap:Ok(e),reduceRight:OE(e),reduceWithIndex:OK(e),foldMapWithIndex:OL(e),reduceRightWithIndex:OB(e)}},O8={URI:O1,compact:OX,separate:O0},Re=function(e){return{URI:O1,map:OT,reduce:OR(e),foldMap:Ok(e),reduceRight:OE(e),traverse:Oq(e),sequence:OQ(e)}},Rt=function(e){return{URI:O1,map:OT,mapWithIndex:OO,reduce:OR(e),foldMap:Ok(e),reduceRight:OE(e),reduceWithIndex:OK(e),foldMapWithIndex:OL(e),reduceRightWithIndex:OB(e),traverse:Oq(e),sequence:OQ(e),traverseWithIndex:OV(e)}},Rn=function(e){var t=Re(e);return{URI:O1,map:OT,reduce:OR(e),foldMap:Ok(e),reduceRight:OE(e),traverse:t.traverse,sequence:t.sequence,compact:OX,separate:O0,filter:OM,filterMap:OF,partition:Oj,partitionMap:OU,wither:oA(t,O8),wilt:op(t,O8)}},Rr=function(e){var t=Ow(e);return{concat:function(e,n){return t(n)(e)}}},Ri=function(e){return{concat:Rr(e).concat,empty:On}},Ro=function(e){var t=OI(e);return{concat:function(e,n){return t(n)(e)}}},Ra=function(){return{concat:function(e,t){return O_(t)(e)}}},Ru={URI:O1,reduce:OR(TU),foldMap:Ok(TU),reduceRight:OE(TU)},Rs={URI:O1,reduce:OR(TU),foldMap:Ok(TU),reduceRight:OE(TU),reduceWithIndex:OK(TU),foldMapWithIndex:OL(TU),reduceRightWithIndex:OB(TU)},Rl={URI:O1,map:OT,reduce:OR(TU),foldMap:Ok(TU),reduceRight:OE(TU),traverse:Oq(TU),sequence:Od},Rc={URI:O1,map:OT,mapWithIndex:OO,reduce:OR(TU),foldMap:Ok(TU),reduceRight:OE(TU),reduceWithIndex:OK(TU),foldMapWithIndex:OL(TU),reduceRightWithIndex:OB(TU),traverse:Oq(TU),sequence:Od,traverseWithIndex:OV(TU)},Rd=oA(Rl,O8),Rf=op(Rl,O8),Rp={URI:O1,map:OT,reduce:OR(TU),foldMap:Ok(TU),reduceRight:OE(TU),traverse:Oq(TU),sequence:Od,compact:OX,separate:O0,filter:OM,filterMap:OF,partition:Oj,partitionMap:OU,wither:Rd,wilt:Rf};function RA(e,t){return eI.call(void 0===t?this:t,e)}var Rh={URI:O1,map:OT,reduce:OR(TU),foldMap:Ok(TU),reduceRight:OE(TU),traverse:Oq(TU),sequence:Od,compact:OX,separate:O0,filter:OM,filterMap:OF,partition:Oj,partitionMap:OU,mapWithIndex:OO,reduceWithIndex:OK(TU),foldMapWithIndex:OL(TU),reduceRightWithIndex:OB(TU),filterMapWithIndex:OD,filterWithIndex:ON,partitionMapWithIndex:OP,partitionWithIndex:OW,traverseWithIndex:OV(TU),wither:Rd,wilt:Rf};let Rm=Object.freeze(Object.defineProperty({__proto__:null,Compactable:O8,Filterable:{URI:O1,map:OT,compact:OX,separate:O0,filter:OM,filterMap:OF,partition:Oj,partitionMap:OU},FilterableWithIndex:{URI:O1,map:OT,mapWithIndex:OO,compact:OX,separate:O0,filter:OM,filterMap:OF,partition:Oj,partitionMap:OU,filterMapWithIndex:OD,filterWithIndex:ON,partitionMapWithIndex:OP,partitionWithIndex:OW},Foldable:Ru,FoldableWithIndex:Rs,Functor:O3,FunctorWithIndex:{URI:O1,map:OT,mapWithIndex:OO},Traversable:Rl,TraversableWithIndex:Rc,URI:O1,Witherable:Rp,_filter:OM,_filterMap:OF,_filterMapWithIndex:OD,_filterWithIndex:ON,_foldMap:Ok,_foldMapWithIndex:OL,_map:OT,_mapWithIndex:OO,_partition:Oj,_partitionMap:OU,_partitionMapWithIndex:OP,_partitionWithIndex:OW,_reduce:OR,_reduceRight:OE,_reduceRightWithIndex:OB,_reduceWithIndex:OK,_sequence:OQ,_traverse:Oq,collect:T6,compact:OX,deleteAt:T4,difference:O_,elem:OS,empty:On,every:Ob,filter:Oz,filterMap:OY,filterMapWithIndex:Om,filterWithIndex:Og,flap:O9,foldMap:OG,foldMapWithIndex:Oa,fromEntries:Ox,fromFoldable:Oy,fromFoldableMap:Ov,fromRecord:TG,getDifferenceMagma:Ra,getEq:O6,getFoldable:O4,getFoldableWithIndex:O7,getIntersectionSemigroup:Ro,getMonoid:O5,getShow:O2,getTraversable:Re,getTraversableWithIndex:Rt,getUnionMonoid:Ri,getUnionSemigroup:Rr,getWitherable:Rn,has:T9,hasOwnProperty:RA,insertAt:T3,intersection:OI,isEmpty:T0,isSubrecord:Oe,keys:T2,lookup:Ot,map:Oi,mapWithIndex:Or,modifyAt:T8,partition:OH,partitionMap:OZ,partitionMapWithIndex:OA,partitionWithIndex:Oh,pop:function(e){var t=T4(e);return function(n){var r=Ot(e,n);return ed(r)?ep:eA([r.value,t(n)])}},readonlyRecord:Rh,reduce:OJ,reduceRight:O$,reduceRightWithIndex:Ou,reduceWithIndex:Oo,separate:O0,sequence:Od,singleton:Os,size:TX,some:OC,toEntries:T5,toReadonlyArray:T5,toRecord:T$,toUnfoldable:function(e){return function(t){var n=T5(t),r=n.length;return e.unfold(0,function(e){return e<r?eA([n[e],e+1]):ep})}},traverse:Oc,traverseWithIndex:Ol,union:Ow,updateAt:T7,upsertAt:T3,wilt:Op,wither:Of},Symbol.toStringTag,{value:"Module"}));var Rg=function(e){return new Set(e)},Ry=function(e){return new Set([e])},Rv=function(e){return function(t){for(var n=t.length,r=new Set,i=RB(e),o=0;o<n;o++){var a=t[o];i(a,r)||r.add(a)}return r}};function Rx(e){return function(t){for(var n,r=t.values(),i=new Set;!(n=r.next()).done;){var o=n.value;e(o)&&i.add(o)}return i}}function Rb(e){var t=RB(e);return function(n,r){if(void 0===r){var i=Rb(e);return function(e){return i(n,e)}}if(RF(n))return r;if(RF(r))return n;var o=new Set(n);return r.forEach(function(e){t(e,o)||o.add(e)}),o}}function RC(e){var t=RB(e);return function(n,r){if(void 0===r){var i=RC(e);return function(e){return i(e,n)}}if(RF(n)||RF(r))return RM;var o=new Set;return n.forEach(function(e){t(e,r)&&o.add(e)}),o}}function RS(e){var t=RB(e);return function(n,r){if(void 0===r){var i=RS(e);return function(e){return i(e,n)}}return Rx(function(e){return!t(e,r)})(n)}}function Rw(e){var t=RP(e);return function(e,n){return function(r){return t(r).reduce(n,e)}}}function RI(e,t){var n=RP(e);return function(e){return function(r){return n(r).reduce(function(n,r){return t.concat(n,e(r))},t.empty)}}}var R_=function(e){var t=RP(e);return function(e,n){return function(r){return t(r).reduceRight(function(e,t){return n(t,e)},e)}}};function RT(e){var t=RB(e);return function(e){return function(n){if(t(e)(n))return n;var r=new Set(n);return r.add(e),r}}}var RO=function(e){return function(t){return function(n){return Rx(function(n){return!e.equals(t,n)})(n)}}},RR=function(e){var t=RB(e),n=RO(e),r=RT(e);return function(e){return function(i){return(t(e,i)?n:r)(e)(i)}}},Rk=function(e){return RE(e)(Z)};function RE(e){var t=RB(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);"Some"!==i._tag||t(i.value,r)||r.add(i.value)}),r}}}var RM=new Set,RF=function(e){return 0===e.size},Rj=function(e){return e.size},RU=function(e){return function(t){for(var n,r=t.values(),i=!1;!i&&!(n=r.next()).done;)i=e(n.value);return i}};function RK(e){return cb(RU(cb(e)))}function RL(e){var t=RB(e);return function(n,r){if(void 0===r){var i=RL(e);return function(e){return i(e,n)}}return RK(function(e){return t(e,r)})(n)}}function RB(e){return function(t,n){if(void 0===n){var r=RB(e);return function(e){return r(t,e)}}for(var i,o=n.values(),a=!1;!a&&!(i=o.next()).done;)a=e.equals(t,i.value);return a}}var RP=function(e){return function(t){var n=[];return t.forEach(function(e){return n.push(e)}),n.sort(e.compare)}};function RW(e){return{show:function(t){var n=[];return t.forEach(function(t){n.push(e.show(t))}),"new Set([".concat(n.sort().join(", "),"])")}}}function RD(e){var t=RL(e);return e6(function(e,n){return t(e,n)&&t(n,e)})}var RN=function(e){return{concat:Rb(e)}},Rq=function(e){return{concat:RN(e).concat,empty:RM}},RQ=function(e){return{concat:RC(e)}},RV=function(e){return{concat:RS(e)}};let Rz=Object.freeze(Object.defineProperty({__proto__:null,URI:"ReadonlySet",chain:function(e){var t=RB(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){e(n).forEach(function(e){t(e,r)||r.add(e)})}),r}}},compact:Rk,difference:RS,elem:RB,empty:RM,every:RK,filter:Rx,filterMap:RE,foldMap:RI,fromArray:Rv,fromReadonlyArray:Rv,fromSet:Rg,getDifferenceMagma:RV,getEq:RD,getIntersectionSemigroup:RQ,getShow:RW,getUnionMonoid:Rq,getUnionSemigroup:RN,insert:RT,intersection:RC,isEmpty:RF,isSubset:RL,map:function(e){var t=RB(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);t(i,r)||r.add(i)}),r}}},partition:function(e){return function(t){for(var n,r=t.values(),i=new Set,o=new Set;!(n=r.next()).done;){var a=n.value;e(a)?i.add(a):o.add(a)}return oe(o,i)}},partitionMap:function(e,t){return function(n){return function(r){for(var i,o=r.values(),a=new Set,u=new Set,s=RB(e),l=RB(t);!(i=o.next()).done;){var c=n(i.value);switch(c._tag){case"Left":s(c.left,a)||a.add(c.left);break;case"Right":l(c.right,u)||u.add(c.right)}}return oe(a,u)}}},reduce:Rw,reduceRight:R_,remove:RO,separate:function(e,t){return function(n){var r=RB(e),i=RB(t),o=new Set,a=new Set;return n.forEach(function(e){switch(e._tag){case"Left":r(e.left,o)||o.add(e.left);break;case"Right":i(e.right,a)||a.add(e.right)}}),oe(o,a)}},singleton:Ry,size:Rj,some:RU,toReadonlyArray:RP,toSet:function(e){return new Set(e)},toggle:RR,union:Rb},Symbol.toStringTag,{value:"Module"}));function RY(e){return e[0]}function RH(e){return e[1]}var RZ=function(e){var t;return[RH(e),e[0]]};function RJ(e){return{URI:kl,_E:void 0,map:R0,ap:function(t,n){var r,i;return[(0,t[0])(n[0]),e.concat(RH(t),RH(n))]}}}var RG=function(e){return function(t){return[t,e.empty]}};function R$(e){var t=RJ(e);return{URI:kl,_E:void 0,map:t.map,ap:t.ap,chain:function(t,n){var r,i=n(t[0]),o=i[0],a=i[1];return[o,e.concat(RH(t),a)]}}}var RX=function(e,t){return ea(e,kt(t))},R0=function(e,t){return ea(e,R8(t))},R1=function(e,t,n){return ea(e,R7(t,n))},R2=function(e,t){return ea(e,ke(t))},R6=function(e,t){return ea(e,kn(t))},R5=function(e,t,n){return ea(e,ki(t,n))},R3=function(e){var t=ko();return function(e,n){return ea(e,t(n))}},R9=function(e,t,n){return ea(e,ka(t,n))},R4=function(e){var t=ku(e);return function(e,n){return ea(e,t(n))}},R7=function(e,t){return function(n){var r;return[t(n[0]),e(RH(n))]}},R8=function(e){return function(t){var n;return[e(t[0]),RH(t)]}},ke=function(e){return function(t){var n;return[t[0],e(RH(t))]}},kt=function(e){return function(t){var n;return[t[0],RH(e)]}},kn=function(e){return function(t){return[e(t),RH(t)]}},kr=kn(Z),ki=function(e,t){return function(n){var r;return t(e,n[0])}},ko=function(){return function(e){return function(t){var n;return e(t[0])}}},ka=function(e,t){return function(n){var r;return t(n[0],e)}},ku=function(e){return function(t){return function(n){var r;return e.map(t(n[0]),function(e){return[e,RH(n)]})}}},ks=function(e){return function(t){var n;return e.map(t[0],function(e){return[e,RH(t)]})}},kl="ReadonlyTuple",kc={URI:kl,map:R0},kd=eB(kc);let kf=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:{URI:kl,bimap:R1,mapLeft:R2},Comonad:{URI:kl,map:R0,extend:R6,extract:RY},Foldable:{URI:kl,reduce:R5,foldMap:R3,reduceRight:R9},Functor:kc,Semigroupoid:{URI:kl,compose:RX},Traversable:{URI:kl,map:R0,reduce:R5,foldMap:R3,reduceRight:R9,traverse:R4,sequence:ks},URI:kl,bimap:R7,compose:kt,duplicate:kr,extend:kn,extract:RY,flap:kd,foldMap:ko,fst:RY,getApplicative:function(e){var t=RJ(e);return{URI:kl,_E:void 0,map:t.map,ap:t.ap,of:RG(e)}},getApply:RJ,getChain:R$,getChainRec:function(e){var t=function(t,n){for(var r,i,o=n(t),a=e.empty,u=(r=o)[0];"Left"===u._tag;)a=e.concat(a,RH(o)),u=(o=n(u.left))[0];return[u.right,e.concat(a,RH(o))]},n=R$(e);return{URI:kl,_E:void 0,map:n.map,ap:n.ap,chain:n.chain,chainRec:t}},getMonad:function(e){var t=R$(e);return{URI:kl,_E:void 0,map:t.map,ap:t.ap,chain:t.chain,of:RG(e)}},map:R8,mapFst:R8,mapLeft:ke,mapSnd:ke,readonlyTuple:{URI:kl,compose:RX,map:R0,bimap:R1,mapLeft:R2,extract:RY,extend:R6,reduce:R5,foldMap:R3,reduceRight:R9,traverse:R4,sequence:ks},reduce:ki,reduceRight:ka,sequence:ks,snd:RH,swap:RZ,traverse:ku},Symbol.toStringTag,{value:"Module"}));var kp=function(){return(kp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},kA=function(e){return function(t){return Object.keys(t).sort(e.compare)}},kh=kA(TU);function km(e){if("function"==typeof e)return km(TU)(e);var t=kA(e);return function(e){return function(n){for(var r=[],i=0,o=t(n);i<o.length;i++){var a=o[i];r.push(e(a,n[a]))}return r}}}var kg=km(TU)(function(e,t){return[e,t]});function ky(e){return function(t){if(!eI.call(t,e))return t;var n=Object.assign({},t);return delete n[e],n}}var kv=function(e,t){return kx(e,function(){return t})},kx=function(e,t){return function(n){if(!T9(e,n))return ep;var r=Object.assign({},n);return r[e]=t(n[e]),eA(r)}};function kb(e){return Ol(e)}function kC(e){return Oc(e)}function kS(e){return Od(e)}var kw=function(e){var t,n=Oc(e);return function(t){return function(r){return e.map(ea(r,n(t)),kU)}}},kI=function(e){var t,n=Oc(e);return function(t){return function(r){return e.map(ea(r,n(t)),kK)}}};function k_(e){return Oh(e)}function kT(e){return Og(e)}function kO(e,t){return Oy(e,t)}var kR=function(e){var t,n;return(t=tB(),Oy(t,lM))(e)};function kk(e,t){return Ov(e,t)}var kE=function(e){var t=Ow(e);return function(e){return function(n){return T0(n)?kp({},e):T0(e)?kp({},n):t(e)(n)}}},kM=function(e){return function(t){return function(n){return T0(n)||T0(t)?{}:OI(e)(t)(n)}}},kF=function(e){return function(t){return T0(t)?kp({},e):T0(e)?kp({},t):O_(e)(t)}},kj=function(e){return function(t){var n=kA(e);return function(e,r){var i=n(e);if(0===i.length)return t.of({});for(var o=t.of({}),a=function(n){o=t.ap(t.map(o,function(e){return function(t){return e[n]=t,e}}),r(n,e[n]))},u=0;u<i.length;u++)a(i[u]);return o}}},kU=OX,kK=O0,kL="Record",kB={URI:kL,map:OT},kP=eB(kB),kW=function(e){return{URI:kL,reduce:OR(e),foldMap:Ok(e),reduceRight:OE(e)}},kD=function(e){return{URI:kL,reduce:OR(e),foldMap:Ok(e),reduceRight:OE(e),reduceWithIndex:OK(e),foldMapWithIndex:OL(e),reduceRightWithIndex:OB(e)}},kN={URI:kL,compact:kU,separate:kK},kq=function(e){return{URI:kL,map:OT,reduce:OR(e),foldMap:Ok(e),reduceRight:OE(e),traverse:Oq(e),sequence:OQ(e)}},kQ=function(e){return{URI:kL,map:OT,mapWithIndex:OO,reduce:OR(e),foldMap:Ok(e),reduceRight:OE(e),reduceWithIndex:OK(e),foldMapWithIndex:OL(e),reduceRightWithIndex:OB(e),traverse:Oq(e),sequence:OQ(e),traverseWithIndex:kj(e)}},kV=function(e){var t=kq(e);return{URI:kL,map:OT,reduce:OR(e),foldMap:Ok(e),reduceRight:OE(e),traverse:t.traverse,sequence:t.sequence,compact:kU,separate:kK,filter:OM,filterMap:OF,partition:Oj,partitionMap:OU,wither:oA(t,kN),wilt:op(t,kN)}},kz=function(e){var t=kE(e);return{concat:function(e,n){return t(n)(e)}}},kY=function(e){return{concat:kz(e).concat,empty:{}}},kH=function(e){var t=kM(e);return{concat:function(e,n){return t(n)(e)}}},kZ=function(){return{concat:function(e,t){return kF(t)(e)}}},kJ={URI:kL,reduce:OR(TU),foldMap:Ok(TU),reduceRight:OE(TU)},kG={URI:kL,reduce:OR(TU),foldMap:Ok(TU),reduceRight:OE(TU),reduceWithIndex:OK(TU),foldMapWithIndex:OL(TU),reduceRightWithIndex:OB(TU)},k$={URI:kL,map:OT,reduce:OR(TU),foldMap:Ok(TU),reduceRight:OE(TU),traverse:Oq(TU),sequence:kS},kX={URI:kL,map:OT,mapWithIndex:OO,reduce:OR(TU),foldMap:Ok(TU),reduceRight:OE(TU),reduceWithIndex:OK(TU),foldMapWithIndex:OL(TU),reduceRightWithIndex:OB(TU),traverse:Oq(TU),sequence:kS,traverseWithIndex:kj(TU)},k0=oA(k$,kN),k1=op(k$,kN),k2={URI:kL,map:OT,reduce:OR(TU),foldMap:Ok(TU),reduceRight:OE(TU),traverse:Oq(TU),sequence:kS,compact:kU,separate:kK,filter:OM,filterMap:OF,partition:Oj,partitionMap:OU,wither:k0,wilt:k1},k6={URI:kL,map:OT,reduce:OR(TU),foldMap:Ok(TU),reduceRight:OE(TU),traverse:Oq(TU),sequence:kS,compact:kU,separate:kK,filter:OM,filterMap:OF,partition:Oj,partitionMap:OU,mapWithIndex:OO,reduceWithIndex:OK(TU),foldMapWithIndex:OL(TU),reduceRightWithIndex:OB(TU),filterMapWithIndex:OD,filterWithIndex:ON,partitionMapWithIndex:OP,partitionWithIndex:OW,traverseWithIndex:kj(TU),wither:k0,wilt:k1};let k5=Object.freeze(Object.defineProperty({__proto__:null,Compactable:kN,Filterable:{URI:kL,map:OT,compact:kU,separate:kK,filter:OM,filterMap:OF,partition:Oj,partitionMap:OU},FilterableWithIndex:{URI:kL,map:OT,mapWithIndex:OO,compact:kU,separate:kK,filter:OM,filterMap:OF,partition:Oj,partitionMap:OU,filterMapWithIndex:OD,filterWithIndex:ON,partitionMapWithIndex:OP,partitionWithIndex:OW},Foldable:kJ,FoldableWithIndex:kG,Functor:kB,FunctorWithIndex:{URI:kL,map:OT,mapWithIndex:OO},Traversable:k$,TraversableWithIndex:kX,URI:kL,Witherable:k2,collect:km,compact:kU,deleteAt:ky,difference:kF,elem:OS,empty:{},every:Ob,filter:Oz,filterMap:OY,filterMapWithIndex:Om,filterWithIndex:kT,flap:kP,foldMap:function(e){return"compare"in e?OG(e):OG(TU)(e)},foldMapWithIndex:function(e){return"compare"in e?Oa(e):Oa(TU)(e)},fromEntries:kR,fromFoldable:kO,fromFoldableMap:kk,getDifferenceMagma:kZ,getEq:O6,getFoldable:kW,getFoldableWithIndex:kD,getIntersectionSemigroup:kH,getMonoid:O5,getShow:function(e){return"compare"in e?O2(e):O2(TU)(e)},getTraversable:kq,getTraversableWithIndex:kQ,getUnionMonoid:kY,getUnionSemigroup:kz,getWitherable:kV,has:T9,hasOwnProperty:RA,insertAt:T3,intersection:kM,isEmpty:T0,isSubrecord:Oe,keys:kh,lookup:Ot,map:Oi,mapWithIndex:Or,modifyAt:kx,partition:OH,partitionMap:OZ,partitionMapWithIndex:OA,partitionWithIndex:k_,pop:function(e){var t=ky(e);return function(n){var r=Ot(e,n);return ed(r)?ep:eA([r.value,t(n)])}},record:k6,reduce:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?OJ(e[0]):OJ(TU).apply(void 0,e)},reduceRight:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?O$(e[0]):O$(TU).apply(void 0,e)},reduceRightWithIndex:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?Ou(e[0]):Ou(TU).apply(void 0,e)},reduceWithIndex:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?Oo(e[0]):Oo(TU).apply(void 0,e)},separate:kK,sequence:kS,singleton:Os,size:TX,some:OC,toArray:kg,toEntries:kg,toUnfoldable:function(e){return function(t){var n=kg(t),r=n.length;return e.unfold(0,function(e){return e<r?eA([n[e],e+1]):ep})}},traverse:kC,traverseWithIndex:kb,union:kE,updateAt:kv,upsertAt:T3,wilt:kI,wither:kw},Symbol.toStringTag,{value:"Module"}));var k3=function(e){return function(t){return ef(e(t))}},k9=function(e){return function(t){return em(e(t))}},k4=function(){return function(e){return!0}},k7=function(e){return function(t){return!e(t)}},k8=function(e){return function(t){return function(n){return t(n)||e(n)}}},Ee=function(e){return function(t){return function(n){return t(n)&&e(n)}}},Et=function(){return function(e){return!1}},En=function(e){return function(t){return function(n){return t(n)&&e(n)}}};let Er=Object.freeze(Object.defineProperty({__proto__:null,and:Ee,compose:En,fromEitherK:k9,fromOptionK:k3,id:k4,not:k7,or:k8,zero:Et},Symbol.toStringTag,{value:"Module"}));var Ei=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{add:function(t,n){return e.map(function(e,r){return e.add(t[r],n[r])})},zero:e.map(function(e){return e.zero}),mul:function(t,n){return e.map(function(e,r){return e.mul(t[r],n[r])})},one:e.map(function(e){return e.one}),sub:function(t,n){return e.map(function(e,r){return e.sub(t[r],n[r])})}}},Eo=function(e){return function(t){return e.sub(e.zero,t)}};let Ea=Object.freeze(Object.defineProperty({__proto__:null,getFunctionRing:Y,getTupleRing:Ei,negate:Eo,tuple:Ei},Symbol.toStringTag,{value:"Module"})),Eu=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Es=Object.freeze(Object.defineProperty({__proto__:null,getFunctionSemiring:z},Symbol.toStringTag,{value:"Module"}));function El(e){return function(t){for(var n,r=t.values(),i=new Set;!(n=r.next()).done;){var o=n.value;e(o)&&i.add(o)}return i}}function Ec(e){var t=ET(e);return function(n,r){if(void 0===r){var i=Ec(e);return function(e){return i(n,e)}}if(EI(n))return r;if(EI(r))return n;var o=new Set(n);return r.forEach(function(e){t(e,o)||o.add(e)}),o}}function Ed(e){var t=ET(e);return function(n,r){if(void 0===r){var i=Ed(e);return function(e){return i(e,n)}}if(EI(n)||EI(r))return new Set;var o=new Set;return n.forEach(function(e){t(e,r)&&o.add(e)}),o}}function Ef(e){var t=ET(e);return function(n,r){if(void 0===r){var i=Ef(e);return function(e){return i(e,n)}}return El(function(e){return!t(e,r)})(n)}}var Ep=function(e){return{concat:Ec(e)}},EA=function(e){return{concat:Ep(e).concat,empty:new Set}},Eh=function(e){return{concat:Ed(e)}},Em=function(e){return{concat:Ef(e)}},Eg=function(e){return new Set([e])};function Ey(e){var t=ET(e);return function(e){return function(n){if(t(e)(n))return n;var r=new Set(n);return r.add(e),r}}}var Ev=function(e){return function(t){return function(n){return El(function(n){return!e.equals(t,n)})(n)}}},Ex=function(e){var t=ET(e),n=Ev(e),r=Ey(e);return function(e){return function(i){return(t(e,i)?n:r)(e)(i)}}},Eb=function(e){return function(t){for(var n=t.length,r=new Set,i=ET(e),o=0;o<n;o++){var a=t[o];i(a,r)||r.add(a)}return r}},EC=function(e){return ES(e)(Z)};function ES(e){var t=ET(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);"Some"!==i._tag||t(i.value,r)||r.add(i.value)}),r}}}var Ew=new Set,EI=function(e){return 0===e.size},E_=function(e){return e.size},ET=RB,EO=function(e){return function(t){var n=[];return t.forEach(function(e){return n.push(e)}),n.sort(e.compare)}};let ER=Object.freeze(Object.defineProperty({__proto__:null,chain:function(e){var t=ET(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){e(n).forEach(function(e){t(e,r)||r.add(e)})}),r}}},compact:EC,difference:Ef,elem:ET,empty:Ew,every:RK,filter:El,filterMap:ES,foldMap:RI,fromArray:Eb,getDifferenceMagma:Em,getEq:RD,getIntersectionSemigroup:Eh,getShow:RW,getUnionMonoid:EA,getUnionSemigroup:Ep,insert:Ey,intersection:Ed,isEmpty:EI,isSubset:RL,map:function(e){var t=ET(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);t(i,r)||r.add(i)}),r}}},partition:function(e){return function(t){for(var n,r=t.values(),i=new Set,o=new Set;!(n=r.next()).done;){var a=n.value;e(a)?i.add(a):o.add(a)}return oe(o,i)}},partitionMap:function(e,t){return function(n){return function(r){for(var i,o=r.values(),a=new Set,u=new Set,s=ET(e),l=ET(t);!(i=o.next()).done;){var c=n(i.value);switch(c._tag){case"Left":s(c.left,a)||a.add(c.left);break;case"Right":l(c.right,u)||u.add(c.right)}}return oe(a,u)}}},reduce:Rw,reduceRight:R_,remove:Ev,separate:function(e,t){return function(n){var r=ET(e),i=ET(t),o=new Set,a=new Set;return n.forEach(function(e){switch(e._tag){case"Left":r(e.left,o)||o.add(e.left);break;case"Right":i(e.right,a)||a.add(e.right)}}),oe(o,a)}},singleton:Eg,size:E_,some:RU,subset:RL,toArray:EO,toggle:Ex,union:Ec},Symbol.toStringTag,{value:"Module"}));var Ek=function(e){return{show:function(t){var n="{";for(var r in e)eI.call(e,r)&&(n+=" ".concat(r,": ").concat(e[r].show(t[r]),","));return n.length>1&&(n=n.slice(0,-1)+" "),n+="}"}}},EE=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{show:function(t){return"[".concat(t.map(function(t,n){return e[n].show(t)}).join(", "),"]")}}};let EM=Object.freeze(Object.defineProperty({__proto__:null,getStructShow:Ek,getTupleShow:EE,showBoolean:{show:function(e){return JSON.stringify(e)}},showNumber:{show:function(e){return JSON.stringify(e)}},showString:{show:function(e){return JSON.stringify(e)}},struct:Ek,tuple:EE},Symbol.toStringTag,{value:"Module"}));function EF(e){return function(t){return function(n){return e.of([t,n])}}}function Ej(e){return function(t){return function(n){return function(r){return e.map(n(r),function(e){var n=e[0],r=e[1];return[t(n),r]})}}}}function EU(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(n){var r=n[0],i=n[1];return e.map(t(i),function(e){var t=e[0],n=e[1];return[r(t),n]})})}}}}function EK(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(e){var n=e[0],r=e[1];return t(n)(r)})}}}}function EL(e){return function(t){return function(n){return e.of(t(n))}}}function EB(e){return function(t){return function(n){return e.map(t,function(e){return[e,n]})}}}function EP(e){return function(t){return function(n){return e.map(n(t),function(e){return e[0]})}}}function EW(e){return function(t){return function(n){return e.map(n(t),RH)}}}let ED=Object.freeze(Object.defineProperty({__proto__:null,ap:EU,chain:EK,evaluate:EP,execute:EW,fromF:EB,fromState:EL,getStateM:function(e){var t=EU(e),n=Ej(e),r=EK(e),i=EP(e),o=EW(e);return{map:function(e,t){return ea(e,n(t))},ap:function(e,n){return ea(e,t(n))},of:EF(e),chain:function(e,t){return ea(e,r(t))},get:function(){return function(t){return e.of([t,t])}},put:function(t){return function(){return e.of([void 0,t])}},modify:function(t){return function(n){return e.of([void 0,t(n)])}},gets:function(t){return function(n){return e.of([t(n),n])}},fromState:EL(e),fromM:EB(e),evalState:function(e,t){return ea(e,i(t))},execState:function(e,t){return ea(e,o(t))}}},map:Ej,of:EF},Symbol.toStringTag,{value:"Module"}));var EN=function(e){return function(){return IX(e)}},Eq=EF(_D);function EQ(e){return E0(I1(e))}function EV(e){return E0(I6(e))}function Ez(e){return E0(I4(e))}var EY=function(e){return et(e,I0)},EH=function(e){return function(t){return IX(e(t)[0])}},EZ=f8(function(e){return EN(e)},Eq),EJ=EL(_D),EG=function(e){return E0(J(e))},E$=function(e){return E0(I8(e))},EX=function(e){return E0(_e(e))},E0=EB(_P),E1=function(e){return function(t){return et(t,Ax(e))}},E2=function(e){return function(t){return function(n){return e(n)(t)(n)}}},E6=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return E$(e.apply(void 0,t))}},E5=function(e){return function(t){return ea(t,Mc(E6(e)))}},E3=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return EG(e.apply(void 0,t))}},E9=function(e){return function(t){return ea(t,Mc(E3(e)))}},E4=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return E0(e.apply(void 0,t))}},E7=function(e){return function(t){return ea(t,Mc(E4(e)))}},E8=function(e,t){return ea(e,Mo(t))},Me=function(e,t){return ea(e,Ms(t))},Mt=function(e,t){return ea(e,Ml(t))},Mn=function(e,t){return function(n){return ea(e(n),_j(function(){return t()(n)}))}},Mr=function(e,t,n){return function(r){return ea(e(r),_O(t,function(e){var t=e[0],r=e[1];return[n(t),r]}))}},Mi=function(e,t){return function(n){return ea(e(n),_R(t))}},Mo=Ej(_P),Ma=function(e,t){return function(n){return Mr(n,e,t)}},Mu=function(e){return function(t){return Mi(t,e)}},Ms=EU(_Y),Ml=EK(_Y),Mc=Ml,Md=Mc(Z),Mf=function(e){return function(t){return function(n){return ea(t(n),_j(function(){return e()(n)}))}}},Mp="StateReaderTaskEither",MA={URI:Mp,map:E8},Mh=eB(MA),Mm={URI:Mp,map:E8,ap:Me},Mg=eO(Mm),My=eR(Mm),Mv={URI:Mp,map:E8,ap:Me,chain:Mt},Mx={URI:Mp,fromState:EJ},Mb=hB(Mx),MC=hP(Mx),MS=hW(Mx),Mw=hD(Mx),MI=hN(Mx),M_=hq(Mx,Mv),MT=eV(Mv),MO={URI:Mp,fromReader:EV},MR=A8(MO),Mk=he(MO),ME=ht(MO),MM=hn(MO,Mv),MF=hr(MO,Mv),Mj={URI:Mp,fromEither:EZ},MU=eH(Mj),MK=eJ(Mj),ML=eG(Mj,Mv),MB=eX(Mj,Mv),MP=e0(Mj,Mv),MW=eZ(Mj),MD=e1(Mj,Mv),MN=e$(Mj),Mq={URI:Mp,fromIO:Ez},MQ=Ah(Mq),MV=Am(Mq,Mv),Mz=Ag(Mq,Mv),MY={URI:Mp,fromIO:Ez,fromTask:EQ},MH=hV(MY),MZ=hz(MY,Mv),MJ=hY(MY,Mv),MG=EP(_P),M$=EW(_P),MX=eP(MA),M0=ez(Mv),M1=ek(Mm),M2=function(e){return function(t){return function(n){return function(r){return function(){return eC(t).reduce(function(t,n,i){return t.then(function(o){return eh(o)?t:e(i+1,n)(o.right[1])(r)().then(function(e){if(eh(e))return e;var t=e.right,n=t[0],r=t[1];return o.right[0].push(n),o.right[1]=r,o})})},e(0,eb(t))(n)(r)().then(fL(function(e){var t;return[[e[0]],e[1]]})))}}}}},M6=function(e){var t=M2(e);return function(e){return ex(e)?t(e):Eq(eS)}},M5=function(e){return M6(function(t,n){return e(n)})},M3=M5(Z),M9=function(e,t){return ea(e(t),_T(function(e){return e[0]}))},M4=function(e,t){return ea(e(t),_T(function(e){return e[0],e[1]}))};let M7=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:Mp,map:E8,alt:Mn},Applicative:{URI:Mp,map:E8,ap:Me,of:Eq},Apply:Mm,Bifunctor:{URI:Mp,bimap:Mr,mapLeft:Mi},Chain:Mv,FromEither:Mj,FromIO:Mq,FromReader:MO,FromState:Mx,FromTask:MY,Functor:MA,Monad:{URI:Mp,map:E8,ap:Me,of:Eq,chain:Mt},MonadIO:{URI:Mp,map:E8,ap:Me,of:Eq,chain:Mt,fromIO:Ez},MonadTask:{URI:Mp,map:E8,ap:Me,of:Eq,chain:Mt,fromIO:Ez,fromTask:EQ},MonadThrow:{URI:Mp,map:E8,ap:Me,of:Eq,chain:Mt,throwError:EN},Pointed:{URI:Mp,of:Eq},URI:Mp,alt:Mf,altW:Mf,ap:Ms,apFirst:Mg,apFirstW:Mg,apS:M1,apSW:M1,apSecond:My,apSecondW:My,apW:Ms,ask:MR,asks:Mk,asksStateReaderTaskEither:E2,asksStateReaderTaskEitherW:E2,bimap:Ma,bind:M0,bindTo:MX,bindW:M0,chain:Ml,chainEitherK:MB,chainEitherKW:MB,chainFirst:MT,chainFirstEitherK:MP,chainFirstEitherKW:MP,chainFirstIOK:Mz,chainFirstReaderK:MF,chainFirstReaderKW:MF,chainFirstTaskK:MJ,chainFirstW:MT,chainIOEitherK:E5,chainIOEitherKW:E5,chainIOK:MV,chainOptionK:ML,chainReaderK:MM,chainReaderKW:MM,chainReaderTaskEitherK:E7,chainReaderTaskEitherKW:E7,chainStateK:M_,chainTaskEitherK:E9,chainTaskEitherKW:E9,chainTaskK:MZ,chainW:Mc,evalState:M9,evaluate:MG,execState:M4,execute:M$,filterOrElse:MD,filterOrElseW:MD,flap:Mh,flatten:Md,flattenW:Md,fromEither:EZ,fromEitherK:MN,fromIO:Ez,fromIOEither:E$,fromIOEitherK:E6,fromIOK:MQ,fromOption:MU,fromOptionK:MK,fromPredicate:MW,fromReader:EV,fromReaderEither:EX,fromReaderK:ME,fromReaderTaskEither:E0,fromReaderTaskEitherK:E4,fromState:EJ,fromStateK:MI,fromTask:EQ,fromTaskEither:EG,fromTaskEitherK:E3,fromTaskK:MH,get:Mb,gets:Mw,left:EN,leftIO:function(e){return E0(I7(e))},leftReader:function(e){return E0(I5(e))},leftState:EH,leftTask:function(e){return E0(I2(e))},local:E1,map:Mo,mapLeft:Mu,modify:MS,of:Eq,put:MC,right:Eq,rightIO:Ez,rightReader:EV,rightState:EY,rightTask:EQ,run:function(e,t,n){return e(t)(n)()},sequenceArray:M3,stateReaderTaskEither:{URI:Mp,map:E8,of:Eq,ap:Me,chain:Mt,bimap:Mr,mapLeft:Mi,alt:Mn,fromIO:Ez,fromTask:EQ,throwError:EN},stateReaderTaskEitherSeq:{URI:Mp,map:E8,of:Eq,ap:Me,chain:Mt,bimap:Mr,mapLeft:Mi,alt:Mn,fromIO:Ez,fromTask:EQ,throwError:EN},throwError:EN,traverseArray:M5,traverseArrayWithIndex:M6,traverseReadonlyArrayWithIndex:M6,traverseReadonlyNonEmptyArrayWithIndex:M2},Symbol.toStringTag,{value:"Module"}));var M8=function(e,t){return ea(e,Fi(t))},Fe=function(e,t){return ea(e,Ft(t))},Ft=function(e){return function(t){return{peek:function(n){return e({peek:t.peek,pos:n})},pos:t.pos}}},Fn=function(e){return e.peek(e.pos)},Fr=Ft(Z),Fi=function(e){return function(t){return{peek:function(n){return e(t.peek(n))},pos:t.pos}}},Fo="Store",Fa={URI:Fo,map:M8},Fu=eB(Fa),Fs={URI:Fo,map:M8,extend:Fe,extract:Fn};let Fl=Object.freeze(Object.defineProperty({__proto__:null,Comonad:Fs,Functor:Fa,URI:Fo,duplicate:Fr,experiment:function(e){return function(t){return function(n){return e.map(t(n.pos),function(e){return n.peek(e)})}}},extend:Ft,extract:Fn,flap:Fu,map:Fi,peeks:function(e){return function(t){return t.peek(e(t.pos))}},seek:function(e){return function(t){return{peek:t.peek,pos:e}}},seeks:function(e){return function(t){return{peek:t.peek,pos:e(t.pos)}}},store:Fs},Symbol.toStringTag,{value:"Module"}));function Fc(e,t){return function(n,r){return t.compose(e.second(r),e.first(n))}}function Fd(e,t){var n=Fc(e,t);return function(r,i){return t.compose(n(r,i),e.promap(t.id(),Z,function(e){return[e,e]}))}}let Ff=Object.freeze(Object.defineProperty({__proto__:null,fanOut:Fd,fanout:function(e){return Fd(e,e)},split:Fc,splitStrong:function(e){return Fc(e,e)}},Symbol.toStringTag,{value:"Module"}));var Fp=function(){return{concat:function(e,t){return Object.assign({},e,t)}}},FA=function(e){return function(t){var n={};for(var r in t)eI.call(t,r)&&(n[r]=e[r](t[r]));return n}};let Fh=Object.freeze(Object.defineProperty({__proto__:null,evolve:FA,getAssignSemigroup:Fp},Symbol.toStringTag,{value:"Module"}));var Fm=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(u){o=[6,u],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},Fg=yr(So),Fy=yd(So),Fv=yf(So),Fx=function(e){return Fb(C2(e))},Fb=yo(Sr),FC=C4(cT),FS=yp(Sr),Fw=yA(Sf),FI=yh(Sp),F_=ya(So),FT=function(e){return function(){var t,n,r,i;return t=void 0,n=void 0,r=void 0,i=function(){return Fm(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e().then(eA)];case 1:return[2,t.sent()];case 2:return t.sent(),[2,ep];case 3:return[2]}})},new(r||(r=Promise))(function(e,o){function a(e){try{s(i.next(e))}catch(t){o(t)}}function u(e){try{s(i.throw(e))}catch(t){o(t)}}function s(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(a,u)}s((i=i.apply(t,n||[])).next())})}},FO=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return FT(function(){return e.apply(void 0,t)})}},FR=yu(So),Fk=ys(Sp),FE=yl(So),FM=yc(Sp),FF=ym(Sr),Fj=yg(Sa),FU=yy(Sp),FK=FU(Z),FL=yv(Sp),FB=yi(So),FP=FB(),FW=dX(Sr,dn),FD=d0(Sr,dn,cY),FN=p8(Sr,ds),Fq=Ae(Sr,ds),FQ=At(Sr,ds),FV=An(Sr,ds),Fz=function(e,t){return ea(e,FF(t))},FY=function(e,t){return ea(e,Fj(t))},FH=function(e,t){return ea(e,FU(t))},FZ=function(e,t){return ea(e,FL(t))},FJ=function(e,t){return ea(e,FN(t))},FG=function(e,t){return ea(e,Fq(t))},F$=function(e,t){return ea(e,FQ(t))},FX=function(e,t){return ea(e,FV(t))},F0="TaskOption",F1={URI:F0,map:Fz},F2=eB(F1),F6={URI:F0,of:Fg},F5={URI:F0,map:Fz,ap:FY},F3=eO(F5),F9=eR(F5),F4=function(e,t){return ea(e,FU(function(e){return ea(t,FF(e))}))},F7={URI:F0,map:Fz,ap:FY,chain:FH},F8=eV(F7),je={URI:F0,zero:FB},jt=og(je,F6),jn={URI:F0,fromIO:Fx},jr=Ah(jn),ji=Am(jn,F7),jo=Ag(jn,F7),ja={URI:F0,fromEither:Fv},ju=e$(ja),js=eX(ja,F7),jl=e0(ja,F7),jc={URI:F0,fromIO:Fx,fromTask:Fb},jd=hV(jc),jf=hz(jc,F7),jp=hY(jc,F7),jA=Fg(ew),jh=eP(F1),jm=ez(F7),jg=ek(F5),jy=Fg(eS),jv=function(e){return et(SI(e),C4(dq(eu)))},jx=function(e){var t=jv(e);return function(e){return ex(e)?t(e):jy}},jb=function(e){return function(t){return function(){return eC(t).reduce(function(t,n,r){return t.then(function(i){return ed(i)?t:e(r+1,n)().then(function(e){return ed(e)?e:(i.value.push(e.value),i)})})},e(0,eb(t))().then(cz(ev)))}}},jC=function(e){var t=jb(e);return function(e){return ex(e)?t(e):jy}},jS=function(e){return jx(function(t,n){return e(n)})},jw=jS(Z),jI=function(e){return jC(function(t,n){return e(n)})},j_=jI(Z);let jT=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:F0,map:Fz,alt:FZ},Alternative:{URI:F0,map:Fz,ap:FY,of:Fg,alt:FZ,zero:FB},ApT:jy,ApplicativePar:{URI:F0,map:Fz,ap:FY,of:Fg},ApplicativeSeq:{URI:F0,map:Fz,ap:F4,of:Fg},ApplyPar:F5,ApplySeq:{URI:F0,map:Fz,ap:F4},Chain:F7,Compactable:{URI:F0,compact:FW,separate:FD},Do:jA,Filterable:{URI:F0,map:Fz,compact:FW,separate:FD,filter:FJ,filterMap:FG,partition:F$,partitionMap:FX},FromEither:ja,FromIO:jn,FromTask:jc,Functor:F1,Monad:{URI:F0,map:Fz,ap:FY,of:Fg,chain:FH},MonadIO:{URI:F0,map:Fz,ap:FY,of:Fg,chain:FH,fromIO:Fx},MonadTask:{URI:F0,map:Fz,ap:FY,of:Fg,chain:FH,fromIO:Fx,fromTask:Fb},Pointed:F6,Zero:je,alt:FL,altW:FL,ap:Fj,apFirst:F3,apS:jg,apSecond:F9,bind:jm,bindTo:jh,chain:FU,chainEitherK:js,chainFirst:F8,chainFirstEitherK:jl,chainFirstIOK:jo,chainFirstTaskK:jp,chainIOK:ji,chainNullableK:Fk,chainOptionK:FM,chainTaskK:jf,compact:FW,filter:FN,filterMap:Fq,flap:F2,flatten:FK,fold:Fw,foldW:Fw,fromEither:Fv,fromEitherK:ju,fromIO:Fx,fromIOK:jr,fromNullable:F_,fromNullableK:FR,fromOption:C8,fromOptionK:FE,fromPredicate:Fy,fromTask:Fb,fromTaskEither:FC,fromTaskK:jd,getOrElse:FI,getOrElseW:FI,guard:jt,map:FF,match:FS,matchE:Fw,matchEW:Fw,matchW:FS,none:FP,of:Fg,partition:FQ,partitionMap:FV,separate:FD,sequenceArray:jw,sequenceSeqArray:j_,some:Fg,traverseArray:jS,traverseArrayWithIndex:jx,traverseReadonlyArrayWithIndex:jx,traverseReadonlyArrayWithIndexSeq:jC,traverseReadonlyNonEmptyArrayWithIndex:jv,traverseReadonlyNonEmptyArrayWithIndexSeq:jb,traverseSeqArray:jI,traverseSeqArrayWithIndex:jC,tryCatch:FT,tryCatchK:FO,zero:FB},Symbol.toStringTag,{value:"Module"}));var jO=function(e){return"Left"===e._tag},jR=function(e){return"Right"===e._tag};function jk(e){return"Both"===e._tag}function jE(e){return{_tag:"Left",left:e}}function jM(e){return{_tag:"Right",right:e}}function jF(e,t){return{_tag:"Both",left:e,right:t}}var jj=function(e,t,n){return function(r){switch(r._tag){case"Left":return e(r.left);case"Right":return t(r.right);case"Both":return n(r.left,r.right)}}},jU=jj(jM,jE,function(e,t){return jF(t,e)});function jK(e,t){return{concat:function(n,r){return jO(n)?jO(r)?jE(e.concat(n.left,r.left)):jR(r)?jF(n.left,r.right):jF(e.concat(n.left,r.left),r.right):jR(n)?jO(r)?jF(r.left,n.right):jR(r)?jM(t.concat(n.right,r.right)):jF(r.left,t.concat(n.right,r.right)):jO(r)?jF(e.concat(n.left,r.left),n.right):jR(r)?jF(n.left,t.concat(n.right,r.right)):jF(e.concat(n.left,r.left),t.concat(n.right,r.right))}}}var jL=function(e){return{URI:j1,_E:void 0,map:jW,ap:function(t,n){return jO(t)?jO(n)?jE(e.concat(t.left,n.left)):jR(n)?jE(t.left):jE(e.concat(t.left,n.left)):jR(t)?jO(n)?jE(n.left):jR(n)?jM(t.right(n.right)):jF(n.left,t.right(n.right)):jO(n)?jE(e.concat(t.left,n.left)):jR(n)?jF(t.left,t.right(n.right)):jF(e.concat(t.left,n.left),t.right(n.right))}}};function jB(e){var t=jL(e),n=function(t,n){if(jO(t))return t;if(jR(t))return n(t.right);var r=n(t.right);return jO(r)?jE(e.concat(t.left,r.left)):jR(r)?jF(t.left,r.right):jF(e.concat(t.left,r.left),r.right)};return{URI:j1,_E:void 0,map:jW,ap:t.ap,chain:n}}var jP=function(e,t){return ed(e)?ed(t)?ep:eA(jM(t.value)):ed(t)?eA(jE(e.value)):eA(jF(e.value,t.value))},jW=function(e,t){return ea(e,jZ(t))},jD=function(e,t,n){return ea(e,jY(t,n))},jN=function(e,t){return ea(e,jH(t))},jq=function(e,t,n){return ea(e,jJ(t,n))},jQ=function(e){var t=jG(e);return function(e,n){return ea(e,t(n))}},jV=function(e,t,n){return ea(e,j$(t,n))},jz=function(e){var t=jX(e);return function(e,n){return ea(e,t(n))}},jY=function(e,t){return function(n){return jO(n)?jE(e(n.left)):jR(n)?jM(t(n.right)):jF(e(n.left),t(n.right))}},jH=function(e){return function(t){return jO(t)?jE(e(t.left)):jk(t)?jF(e(t.left),t.right):t}},jZ=function(e){return function(t){return jO(t)?t:jR(t)?jM(e(t.right)):jF(t.left,e(t.right))}},jJ=function(e,t){return function(n){return jO(n)?e:t(e,n.right)}},jG=function(e){return function(t){return function(n){return jO(n)?e.empty:t(n.right)}}},j$=function(e,t){return function(n){return jO(n)?e:t(n.right,e)}},jX=function(e){return function(t){return function(n){return jO(n)?e.of(n):jR(n)?e.map(t(n.right),jM):e.map(t(n.right),function(e){return jF(n.left,e)})}}},j0=function(e){return function(t){return jO(t)?e.of(t):jR(t)?e.map(t.right,jM):e.map(t.right,function(e){return jF(t.left,e)})}},j1="These",j2={URI:j1,map:jW},j6=eB(j2),j5={URI:j1,fromEither:Z},j3=eH(j5),j9=eJ(j5),j4=function(e){return function(t){return function(n){return!jO(n)&&e.equals(t,n.right)}}},j7=function(e){return function(t){return!jO(t)&&e(t.right)}},j8=function(e,t){return function(n){return jO(n)?[n.left,t()]:jR(n)?[e(),n.right]:[n.left,n.right]}},Ue=function(e,t){return j8(function(){return e},function(){return t})},Ut=jM(eS),Un=function(e){return function(t){return function(n){var r=ep,i=t(0,eb(n));if(jO(i))return i;jk(i)&&(r=eA(i.left));for(var o=[i.right],a=1;a<n.length;a++){var u=t(a,n[a]);if(jO(u))return u;jk(u)&&(r=ed(r)?eA(u.left):eA(e.concat(r.value,u.left))),o.push(u.right)}return ed(r)?jM(o):jF(r.value,o)}}},Ur=function(e){return function(t){var n=Un(e)(t);return function(e){return ex(e)?n(e):Ut}}};let Ui=Object.freeze(Object.defineProperty({__proto__:null,ApT:Ut,Bifunctor:{URI:j1,bimap:jD,mapLeft:jN},Foldable:{URI:j1,reduce:jq,foldMap:jQ,reduceRight:jV},FromEither:j5,FromThese:{URI:j1,fromThese:Z},Functor:j2,Pointed:{URI:j1,of:jM},Traversable:{URI:j1,map:jW,reduce:jq,foldMap:jQ,reduceRight:jV,traverse:jz,sequence:j0},URI:j1,bimap:jY,both:jF,elem:j4,exists:j7,flap:j6,fold:jj,foldMap:jG,foldW:jj,fromOption:j3,fromOptionK:j9,fromOptions:jP,getApplicative:function(e){var t=jL(e);return{URI:j1,_E:void 0,map:jW,ap:t.ap,of:jM}},getApply:jL,getChain:jB,getEq:function(e,t){return e6(function(n,r){return jO(n)?jO(r)&&e.equals(n.left,r.left):jR(n)?jR(r)&&t.equals(n.right,r.right):jk(r)&&e.equals(n.left,r.left)&&t.equals(n.right,r.right)})},getLeft:function(e){return jO(e)?eA(e.left):jR(e)?ep:eA(e.left)},getLeftOnly:function(e){return jO(e)?eA(e.left):ep},getMonad:function(e){var t=jB(e);return{URI:j1,_E:void 0,map:jW,of:jM,ap:t.ap,chain:t.chain,throwError:jE}},getRight:function(e){return jO(e)?ep:(jR(e),eA(e.right))},getRightOnly:function(e){return jR(e)?eA(e.right):ep},getSemigroup:jK,getShow:function(e,t){return{show:jj(function(t){return"left(".concat(e.show(t),")")},function(e){return"right(".concat(t.show(e),")")},function(n,r){return"both(".concat(e.show(n),", ").concat(t.show(r),")")})}},isBoth:jk,isLeft:jO,isRight:jR,left:jE,leftOrBoth:function(e){return function(t){return ed(t)?jE(e):jF(e,t.value)}},map:jZ,mapLeft:jH,match:jj,matchW:jj,of:jM,reduce:jJ,reduceRight:j$,right:jM,rightOrBoth:function(e){return function(t){return ed(t)?jM(e):jF(t.value,e)}},sequence:j0,swap:jU,these:{URI:j1,map:jW,bimap:jD,mapLeft:jN,reduce:jq,foldMap:jQ,reduceRight:jV,traverse:jz,sequence:j0},toTuple:Ue,toTuple2:j8,traverse:jX,traverseReadonlyArrayWithIndex:Ur,traverseReadonlyNonEmptyArrayWithIndex:Un},Symbol.toStringTag,{value:"Module"}));function Uo(e){return et(jM,e.of)}function Ua(e){return et(jE,e.of)}function Uu(e){return et(jF,e.of)}function Us(e){return function(t){return e.map(t,jM)}}function Ul(e){return function(t){return e.map(t,jE)}}function Uc(e){return eL(e,j2)}function Ud(e,t){return eT(e,jL(t))}function Uf(e,t){var n=Ua(e);return function(r){return function(i){return e.chain(i,jj(n,r,function(n,i){return e.map(r(i),jj(function(e){return jE(t.concat(n,e))},function(e){return jF(n,e)},function(e,r){return jF(t.concat(n,e),r)}))}))}}}function Up(e){return function(t,n){return function(r){return e.map(r,jY(t,n))}}}function UA(e){return function(t){return function(n){return e.map(n,jH(t))}}}function Uh(e){return function(t,n,r){return function(i){return e.map(i,jj(t,n,r))}}}function Um(e){return function(t,n,r){return function(i){return e.chain(i,jj(t,n,r))}}}function Ug(e){return function(t){return e.map(t,jU)}}function Uy(e){return function(t,n){return function(r){return e.map(r,j8(t,n))}}}let Uv=Object.freeze(Object.defineProperty({__proto__:null,ap:Ud,bimap:Up,both:Uu,chain:Uf,getTheseM:function(e){var t=Uc(e),n=Up(e),r=UA(e),i=Um(e),o=Uy(e),a=Uo(e),u=function(e,n){return ea(e,t(n))};return{map:u,bimap:function(e,t,r){return ea(e,n(t,r))},mapLeft:function(e,t){return ea(e,r(t))},fold:function(e,t,n,r){return ea(e,i(t,n,r))},swap:Ug(e),rightM:Us(e),leftM:Ul(e),left:Ua(e),right:Uo(e),both:Uu(e),toTuple:function(e,t,n){return ea(e,o(function(){return t},function(){return n}))},getMonad:function(t){var n=Ud(e,t),r=Uf(e,t);return{_E:void 0,map:u,of:a,ap:function(e,t){return ea(e,n(t))},chain:function(e,t){return ea(e,r(t))}}}}},left:Ua,leftF:Ul,map:Uc,mapLeft:UA,match:Uh,matchE:Um,right:Uo,rightF:Us,swap:Ug,toTuple2:Uy},Symbol.toStringTag,{value:"Module"}));var Ux=Ua(So),Ub=Uo(So),UC=Uu(So),US=Us(Sr),Uw=Ul(Sr),UI=et(C2,US),U_=et(C2,Uw),UT=Uh(Sr),UO=Um(Sp),UR=Ug(Sr),Uk=function(e,t){return ea(e,UF(t))},UE=function(e,t,n){return ea(e,Uj(t,n))},UM=function(e,t){return ea(e,UU(t))},UF=Uc(Sr),Uj=Up(Sr),UU=UA(Sr),UK="TaskThese",UL=function(e,t){var n=Ud(e,t);return{URI:UK,_E:void 0,map:Uk,ap:function(e,t){return ea(e,n(t))}}};function UB(e,t){var n=UL(e,t).ap;return{URI:UK,_E:void 0,map:Uk,ap:n,of:Ub}}function UP(e){var t=UL(Sl,e),n=Uf(Sp,e);return{URI:UK,_E:void 0,map:Uk,ap:t.ap,chain:function(e,t){return ea(e,n(t))}}}var UW={URI:UK,map:Uk},UD=eB(UW),UN={URI:UK,fromEither:C8},Uq=eH(UN),UQ=eJ(UN),UV=eZ(UN),Uz={URI:UK,fromThese:C8},UY=hZ(Uz),UH={URI:UK,fromIO:UI},UZ=Ah(UH),UJ={URI:UK,fromIO:UI,fromTask:US},UG=hV(UJ),U$=Uy(Sr),UX=Ub(eS),U0=function(e){var t=Un(e);return function(e){return et(SI(e),C4(t(eu)))}},U1=function(e){return function(t){var n=U0(e)(t);return function(e){return ex(e)?n(e):UX}}},U2=function(e){return function(t){return function(n){return function(){return eC(n).reduce(function(n,r,i){return n.then(function(o){return jO(o)?n:t(i+1,r)().then(function(t){if(jO(t))return t;if(jk(t)){var n=o.right;return n.push(t.right),jk(o)?jF(e.concat(o.left,t.left),n):jF(t.left,n)}return o.right.push(t.right),o})})},t(0,eb(n))().then(jZ(ev)))}}}},U6=function(e){return function(t){var n=U2(e)(t);return function(e){return ex(e)?n(e):UX}}},U5=function(e,t){return U$(function(){return e},function(){return t})},U3=function(e,t){return eE(Sc)(jK(e,t))};let U9=Object.freeze(Object.defineProperty({__proto__:null,ApT:UX,Bifunctor:{URI:UK,bimap:UE,mapLeft:UM},FromEither:UN,FromIO:UH,FromTask:UJ,FromThese:Uz,Functor:UW,Pointed:{URI:UK,of:Ub},URI:UK,bifunctorTaskThese:{URI:UK,bimap:UE,mapLeft:UM},bimap:Uj,both:UC,flap:UD,fold:UO,foldW:UO,fromEither:C8,fromIO:UI,fromIOEither:C2,fromIOK:UZ,fromOption:Uq,fromOptionK:UQ,fromPredicate:UV,fromTask:US,fromTaskK:UG,fromThese:C8,fromTheseK:UY,functorTaskThese:{URI:UK,map:Uk},getApplicative:UB,getApply:UL,getChain:UP,getMonad:function(e){var t=UB(Sl,e),n=UP(e);return{URI:UK,_E:void 0,map:Uk,ap:t.ap,of:Ub,chain:n.chain,fromIO:UI,fromTask:US}},getSemigroup:U3,left:Ux,leftIO:U_,leftTask:Uw,map:UF,mapLeft:UU,match:UT,matchE:UO,matchEW:UO,matchW:UT,of:Ub,right:Ub,rightIO:UI,rightTask:US,swap:UR,taskThese:{URI:UK,map:Uk,bimap:UE,mapLeft:UM},toTuple:U5,toTuple2:U$,traverseReadonlyArrayWithIndex:U1,traverseReadonlyArrayWithIndexSeq:U6,traverseReadonlyNonEmptyArrayWithIndex:U0,traverseReadonlyNonEmptyArrayWithIndexSeq:U2},Symbol.toStringTag,{value:"Module"}));var U4=function(e,t){return ea(e,U7(t))},U7=function(e){return function(t){return function(n){return e(t(n))}}},U8="Traced",Ke={URI:U8,map:U4},Kt=eB(Ke);let Kn=Object.freeze(Object.defineProperty({__proto__:null,Functor:Ke,URI:U8,censor:function(e){return function(t){return function(n){return t(e(n))}}},flap:Kt,getComonad:function(e){return{URI:U8,_E:void 0,map:U4,extend:function(t,n){return function(r){return n(function(n){return t(e.concat(r,n))})}},extract:function(t){return t(e.empty)}}},listen:function(e){return function(t){return[e(t),t]}},listens:function(e){return function(t){return function(n){return[t(n),e(n)]}}},map:U7,traced:Ke,tracks:function(e,t){return function(n){return n(t(n(e.empty)))}}},Symbol.toStringTag,{value:"Module"}));function Kr(e,t){return function(n){var r=e.traverse(n),i=t.traverse(n);return function(e){return function(t){return r(t,function(t){return i(t,e)})}}}}function Ki(e,t){return function(n){var r=e.sequence(n),i=t.sequence(n);return function(t){return r(e.map(t,i))}}}let Ko=Object.freeze(Object.defineProperty({__proto__:null,getTraversableComposition:function(e,t){var n=eW(e,t).map,r=Al(e,t),i=Kr(e,t),o=Ki(e,t);return{map:n,reduce:r.reduce,foldMap:r.foldMap,reduceRight:r.reduceRight,traverse:function(e){var t=i(e);return function(e,n){return ea(e,t(n))}},sequence:function(e){var t=o(e);return function(e){return ea(e,t)}}}},sequence:Ki,traverse:Kr},Symbol.toStringTag,{value:"Module"})),Ka=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Ku(e,t){return void 0===t&&(t=[]),{value:e,forest:t}}var Ks=function(e,t){for(var n,r="",i=t.length,o=0;o<i;o++){n=t[o];var a=o===i-1;r+=e+(a?"└":"├")+"─ "+n.value,r+=Ks(e+(i>1&&!a?"│ ":" "),n.forest)}return r};function Kl(e){return Ks(`
2
+ `,e)}function Kc(e,t){var n,r=t(e);return{value:r[0],forest:Kd(r[1],t)}}function Kd(e,t){return e.map(function(e){return Kc(e,t)})}function Kf(e){var t=Kp(e);return function(n,r){return e.chain(r(n),function(n){var i=n[0],o=n[1];return e.map(t(o,r),function(e){return{value:i,forest:e}})})}}function Kp(e){var t=ls(e);return function(n,r){return ea(n,t(function(t){return Kf(e)(t,r)}))}}var KA=function(e,t){return ea(e,KT(t))},Kh=function(e,t){return ea(e,KS(function(e){return ea(t,KT(e))}))},Km=function(e,t){return ea(e,KS(t))},Kg=function(e,t,n){return ea(e,KO(t,n))},Ky=function(e){var t=KR(e);return function(e,n){return ea(e,t(n))}},Kv=function(e,t,n){return ea(e,Kk(t,n))},Kx=function(e,t){return ea(e,Kw(t))},Kb=function(e){var t=KM(e);return function(e,n){return ea(e,t(n))}},KC=function(e){return function(t){return Kh(t,e)}},KS=function(e){return function(t){var n=e(t.value),r=n.value,i=n.forest,o=lm().concat;return{value:r,forest:o(i,t.forest.map(KS(e)))}}},Kw=function(e){return function(t){return{value:e(t),forest:t.forest.map(Kw(e))}}},KI=Kw(Z),K_=KS(Z),KT=function(e){return function(t){return{value:e(t.value),forest:t.forest.map(KT(e))}}},KO=function(e,t){return function(n){for(var r=t(e,n.value),i=n.forest.length,o=0;o<i;o++)r=ea(n.forest[o],KO(r,t));return r}},KR=function(e){return function(t){return KO(e.empty,function(n,r){return e.concat(n,t(r))})}},Kk=function(e,t){return function(n){for(var r=e,i=n.forest.length,o=i-1;o>=0;o--)r=ea(n.forest[o],Kk(r,t));return t(n.value,r)}},KE=function(e){return e.value},KM=function(e){var t=ls(e),n=function(r){return function(i){return e.ap(e.map(r(i.value),function(e){return function(t){return{value:e,forest:t}}}),ea(i.forest,t(n(r))))}};return n},KF=function(e){return KM(e)(Z)},Kj=function(e){return Ku(e)},KU="Tree",KK={URI:KU,map:KA},KL=eB(KK),KB={URI:KU,map:KA,ap:Kh},KP=eO(KB),KW=eR(KB),KD={URI:KU,map:KA,ap:Kh,chain:Km},KN=eV(KD),Kq=Kj(ew),KQ=eP(KK),KV=ez(KD),Kz=ek(KB),KY=function(e){return function(t){return e(t.value)||t.forest.some(KY(e))}};let KH=Object.freeze(Object.defineProperty({__proto__:null,Applicative:{URI:KU,map:KA,ap:Kh,of:Kj},Apply:KB,Chain:KD,Comonad:{URI:KU,map:KA,extend:Kx,extract:KE},Do:Kq,Foldable:{URI:KU,reduce:Kg,foldMap:Ky,reduceRight:Kv},Functor:KK,Monad:{URI:KU,map:KA,ap:Kh,of:Kj,chain:Km},Pointed:{URI:KU,of:Kj},Traversable:{URI:KU,map:KA,reduce:Kg,foldMap:Ky,reduceRight:Kv,traverse:Kb,sequence:KF},URI:KU,ap:KC,apFirst:KP,apS:Kz,apSecond:KW,bind:KV,bindTo:KQ,chain:KS,chainFirst:KN,drawForest:Kl,drawTree:function(e){return e.value+Kl(e.forest)},duplicate:KI,elem:function(e){var t=function(n,r){return e.equals(n,r.value)||r.forest.some(function(e){return t(n,e)})};return t},exists:KY,extend:Kw,extract:KE,flap:KL,flatten:K_,fold:function(e){var t=function(n){return e(n.value,n.forest.map(t))};return t},foldMap:KR,getEq:function(e){var t,n=e6(function(n,r){return e.equals(n.value,r.value)&&t.equals(n.forest,r.forest)});return t=ui(n),n},getShow:function(e){var t=function(n){return uq(n.forest)?"make(".concat(e.show(n.value),")"):"make(".concat(e.show(n.value),", [").concat(n.forest.map(t).join(", "),"])")};return{show:t}},make:Ku,map:KT,of:Kj,reduce:KO,reduceRight:Kk,sequence:KF,traverse:KM,tree:{URI:KU,map:KA,of:Kj,ap:Kh,chain:Km,reduce:Kg,foldMap:Ky,reduceRight:Kv,traverse:Kb,sequence:KF,extract:KE,extend:Kx},unfoldForest:Kd,unfoldForestM:Kp,unfoldTree:Kc,unfoldTreeM:Kf},Symbol.toStringTag,{value:"Module"}));var KZ=function(e){var t;return[RH(e),(t=e,t[0])]};function KJ(e){return{URI:Ll,_E:void 0,map:K0,ap:function(t,n){var r,i;return[(r=t,r[0])((i=n,i[0])),e.concat(RH(t),RH(n))]}}}var KG=function(e){return function(t){return[t,e.empty]}};function K$(e){var t=KJ(e);return{URI:Ll,_E:void 0,map:t.map,ap:t.ap,chain:function(t,n){var r,i=n((r=t,r[0])),o=i[0],a=i[1];return[o,e.concat(RH(t),a)]}}}var KX=function(e,t){return ea(e,Lt(t))},K0=function(e,t){return ea(e,K8(t))},K1=function(e,t,n){return ea(e,K7(t,n))},K2=function(e,t){return ea(e,Le(t))},K6=function(e,t){return ea(e,Ln(t))},K5=function(e,t,n){return ea(e,Lo(t,n))},K3=function(e){var t=Li();return function(e,n){return ea(e,t(n))}},K9=function(e,t,n){return ea(e,La(t,n))};function K4(e){var t=Lu(e);return function(e,n){return ea(e,t(n))}}var K7=function(e,t){return function(n){var r;return[t((r=n,r[0])),e(RH(n))]}},K8=function(e){return function(t){var n;return[e((n=t,n[0])),RH(t)]}},Le=function(e){return function(t){var n;return[(n=t,n[0]),e(RH(t))]}},Lt=function(e){return function(t){var n;return[(n=t,n[0]),RH(e)]}},Ln=function(e){return function(t){return[e(t),RH(t)]}},Lr=Ln(Z),Li=ko,Lo=ki,La=ka,Lu=function(e){return function(t){return function(n){var r;return e.map(t((r=n,r[0])),function(e){return[e,RH(n)]})}}},Ls=function(e){return function(t){var n;return e.map((n=t,n[0]),function(e){return[e,RH(t)]})}},Ll="Tuple",Lc={URI:Ll,map:K0},Ld=eB(Lc);let Lf=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:{URI:Ll,bimap:K1,mapLeft:K2},Comonad:{URI:Ll,map:K0,extend:K6,extract:RY},Foldable:{URI:Ll,reduce:K5,foldMap:K3,reduceRight:K9},Functor:Lc,Semigroupoid:{URI:Ll,compose:KX},Traversable:{URI:Ll,map:K0,reduce:K5,foldMap:K3,reduceRight:K9,traverse:K4,sequence:Ls},URI:Ll,bimap:K7,compose:Lt,duplicate:Lr,extend:Ln,extract:RY,flap:Ld,foldMap:Li,fst:RY,getApplicative:function(e){var t=KJ(e);return{URI:Ll,_E:void 0,map:t.map,ap:t.ap,of:KG(e)}},getApply:KJ,getChain:K$,getChainRec:function(e){var t=function(t,n){for(var r,i,o=n(t),a=e.empty,u=(r=o,r[0]);"Left"===u._tag;){a=e.concat(a,RH(o)),u=(i=o=n(u.left))[0]}return[u.right,e.concat(a,RH(o))]},n=K$(e);return{URI:Ll,_E:void 0,map:n.map,ap:n.ap,chain:n.chain,chainRec:t}},getMonad:function(e){var t=K$(e);return{URI:Ll,_E:void 0,map:t.map,ap:t.ap,chain:t.chain,of:KG(e)}},map:K8,mapFst:K8,mapLeft:Le,mapSnd:Le,reduce:Lo,reduceRight:La,sequence:Ls,snd:RH,swap:KZ,traverse:Lu,tuple:{URI:Ll,compose:KX,map:K0,bimap:K1,mapLeft:K2,extract:RY,extend:K6,reduce:K5,foldMap:K3,reduceRight:K9,traverse:K4,sequence:Ls}},Symbol.toStringTag,{value:"Module"})),Lp=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),LA=Object.freeze(Object.defineProperty({__proto__:null,getValidationM:function(e,t){var n=eq(t,fU(e));return{map:n.map,ap:n.ap,of:n.of,chain:function(e,n){return t.chain(e,function(e){return eh(e)?t.of(eg(e.left)):n(e.right)})},alt:function(n,r){return t.chain(n,function(n){return em(n)?t.of(n):t.map(r(),function(t){return eh(t)?eg(e.concat(n.left,t.left)):t})})}}}},Symbol.toStringTag,{value:"Module"}));var Lh=tF(void 0),Lm={concat:Lh.concat,empty:void 0};let Lg=Object.freeze(Object.defineProperty({__proto__:null,Monoid:Lm,Semigroup:Lh},Symbol.toStringTag,{value:"Module"}));var Ly=function(e){return function(){return[void 0,e]}},Lv=function(e){return function(){var t=e(),n=t[0],r=t[1];return[[n,r],r]}},Lx=function(e){return function(){var t,n=e(),r=n[0],i=r[0];return[i,(0,r[1])(n[1])]}},Lb=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[[r,e(i)],i]}}},LC=function(e){return function(t){return function(){var n,r=t();return[r[0],e(r[1])]}}},LS=function(e,t){return ea(e,Lw(t))},Lw=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[e(r),i]}}},LI="Writer",L_=function(e){return{URI:LI,_E:void 0,of:function(t){return function(){return[t,e.empty]}}}},LT=function(e){return{URI:LI,_E:void 0,map:LS,ap:function(t,n){return function(){var r=t(),i=r[0],o=r[1],a=n(),u=a[0],s=a[1];return[i(u),e.concat(o,s)]}}}},LO=function(e){var t=LT(e),n=L_(e);return{URI:LI,_E:void 0,map:LS,ap:t.ap,of:n.of}};function LR(e){var t=LT(e);return{URI:LI,_E:void 0,map:LS,ap:t.ap,chain:function(t,n){return function(){var r=t(),i=r[0],o=r[1],a=n(i)(),u=a[0],s=a[1];return[u,e.concat(o,s)]}}}}var Lk={URI:LI,map:LS},LE=eB(Lk),LM=function(e){return e()[0]},LF=function(e){return e()[1]},Lj=function(e){return e()[0]},LU=function(e){return e()[1]};let LK=Object.freeze(Object.defineProperty({__proto__:null,Functor:Lk,URI:LI,censor:LC,evalWriter:Lj,evaluate:LM,execWriter:LU,execute:LF,flap:LE,getApplicative:LO,getApply:LT,getChain:LR,getMonad:function(e){var t=LO(e),n=LR(e);return{URI:LI,_E:void 0,map:LS,ap:t.ap,of:t.of,chain:n.chain}},getPointed:L_,listen:Lv,listens:Lb,map:Lw,pass:Lx,tell:Ly,writer:Lk},Symbol.toStringTag,{value:"Module"})),LL=Object.freeze(Object.defineProperty({__proto__:null,getWriterM:function(e){var t=function(t,n){return function(){return e.map(t(),function(e){var t=e[0],r=e[1];return[n(t),r]})}};return{map:t,evalWriter:function(t){return e.map(t(),function(e){return e[0]})},execWriter:function(t){return e.map(t(),function(e){return e[0],e[1]})},tell:function(t){return function(){return e.of([void 0,t])}},listen:function(t){return function(){return e.map(t(),function(e){var t=e[0],n=e[1];return[[t,n],n]})}},pass:function(t){return function(){return e.map(t(),function(e){var t,n=e[0],r=n[0];return[r,(0,n[1])(e[1])]})}},listens:function(t,n){return function(){return e.map(t(),function(e){var t=e[0],r=e[1];return[[t,n(r)],r]})}},censor:function(t,n){return function(){return e.map(t(),function(e){var t;return[e[0],n(e[1])]})}},getMonad:function(n){return{_E:void 0,map:t,of:function(t){return function(){return e.of([t,n.empty])}},ap:function(t,r){return function(){return e.chain(t(),function(t){var i=t[0],o=t[1];return e.map(r(),function(e){var t=e[0],r=e[1];return[i(t),n.concat(o,r)]})})}},chain:function(t,r){return function(){return e.chain(t(),function(t){var i=t[0],o=t[1];return e.map(r(i)(),function(e){var t=e[0],r=e[1];return[t,n.concat(o,r)]})})}}}}}}},Symbol.toStringTag,{value:"Module"})),LB=Object.freeze(Object.defineProperty({__proto__:null,alt:D,alternative:N,applicative:eQ,apply:eK,array:lH,bifunctor:lZ,boolean:l5,booleanAlgebra:l9,bounded:ce,boundedDistributiveLattice:cr,boundedJoinSemilattice:ci,boundedLattice:co,boundedMeetSemilattice:ca,category:cu,chain:eY,chainRec:cl,choice:cf,comonad:cp,compactable:d1,console:d9,const:fc,contravariant:fd,date:fh,distributiveLattice:cn,either:pF,eitherT:p2,endomorphism:p3,eq:tr,extend:p9,field:p7,filterable:Ar,filterableWithIndex:Ai,foldable:Ac,foldableWithIndex:AA,fromEither:e2,fromIO:Ay,fromReader:hi,fromState:hQ,fromTask:hH,fromThese:hJ,function:el,functor:eD,functorWithIndex:h$,group:hX,heytingAlgebra:h0,hkt:h1,identity:m_,invariant:mT,io:m6,ioEither:yn,ioOption:vv,ioRef:vb,joinSemilattice:vC,json:vI,lattice:v_,magma:tk,map:bp,meetSemilattice:bA,monad:bh,monadIO:bm,monadTask:bg,monadThrow:by,monoid:bM,naturalTransformation:bF,nonEmptyArray:i$,number:i8,option:d$,optionT:yx,ord:tw,ordering:bW,pipeable:bD,pointed:bN,predicate:cw,profunctor:bq,random:bH,reader:A7,readerEither:CZ,readerT:C1,readerTask:wI,readerTaskEither:TE,readonlyArray:uN,readonlyMap:xT,readonlyNonEmptyArray:ry,readonlyRecord:Rm,readonlySet:Rz,readonlyTuple:kf,record:k5,refinement:Er,ring:Ea,semigroup:tz,semigroupoid:Eu,semiring:Es,separated:of,set:ER,show:EM,state:hL,stateReaderTaskEither:M7,stateT:ED,store:Fl,string:TJ,strong:Ff,struct:Fh,task:SU,taskEither:I$,taskOption:jT,taskThese:U9,these:Ui,theseT:Uv,traced:Kn,traversable:Ko,traversableWithIndex:Ka,tree:KH,tuple:Lf,unfoldable:Lp,validationT:LA,void:Lg,witherable:om,writer:LK,writerT:LL,zero:oy},Symbol.toStringTag,{value:"Module"})),LP=O(LB);var LW={},LD={},LN={},Lq={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getEndomorphismMonoid=e.not=e.SK=e.hole=e.pipe=e.untupled=e.tupled=e.absurd=e.decrement=e.increment=e.tuple=e.flow=e.flip=e.constVoid=e.constUndefined=e.constNull=e.constFalse=e.constTrue=e.constant=e.unsafeCoerce=e.identity=e.apply=e.getRing=e.getSemiring=e.getMonoid=e.getSemigroup=e.getBooleanAlgebra=void 0;var t=function(e){return function(){return{meet:function(t,n){return function(r){return e.meet(t(r),n(r))}},join:function(t,n){return function(r){return e.join(t(r),n(r))}},zero:function(){return e.zero},one:function(){return e.one},implies:function(t,n){return function(r){return e.implies(t(r),n(r))}},not:function(t){return function(n){return e.not(t(n))}}}}};e.getBooleanAlgebra=t;var n=function(e){return function(){return{concat:function(t,n){return function(r){return e.concat(t(r),n(r))}}}}};e.getSemigroup=n;var r=function(t){var n=(0,e.getSemigroup)(t);return function(){return{concat:n().concat,empty:function(){return t.empty}}}};e.getMonoid=r;var i=function(e){return{add:function(t,n){return function(r){return e.add(t(r),n(r))}},zero:function(){return e.zero},mul:function(t,n){return function(r){return e.mul(t(r),n(r))}},one:function(){return e.one}}};e.getSemiring=i;var o=function(t){var n=(0,e.getSemiring)(t);return{add:n.add,mul:n.mul,one:n.one,zero:n.zero,sub:function(e,n){return function(r){return t.sub(e(r),n(r))}}}};e.getRing=o;var a=function(e){return function(t){return t(e)}};function u(e){return e}function s(e){return function(){return e}}function l(e,t,n,r,i,o,a,u,s){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return o(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return a(o(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return u(a(o(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return s(u(a(o(i(r(n(t(e.apply(this,arguments)))))))))}}}function c(e){return e+1}function d(e){return e-1}function f(e){throw Error("Called `absurd` function which should be uncallable")}e.apply=a,e.identity=u,e.unsafeCoerce=u,e.constant=s,e.constTrue=s(!0),e.constFalse=s(!1),e.constNull=s(null),e.constUndefined=s(void 0),e.constVoid=e.constUndefined,e.flip=function(e){return function(t,n){return e(n,t)}},e.flow=l,e.tuple=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e},e.increment=c,e.decrement=d,e.absurd=f,e.tupled=function(e){return function(t){return e.apply(void 0,t)}},e.untupled=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(t)}},e.pipe=function(e,t,n,r,i,o,a,u,s){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return i(r(n(t(e))));case 6:return o(i(r(n(t(e)))));case 7:return a(o(i(r(n(t(e))))));case 8:return u(a(o(i(r(n(t(e)))))));case 9:return s(u(a(o(i(r(n(t(e))))))));default:for(var l=arguments[0],c=1;c<arguments.length;c++)l=arguments[c](l);return l}},e.hole=f;var p=function(e,t){return t};e.SK=p,e.not=function(e){return function(t){return!e(t)}};var A=function(){return{concat:function(e,t){return l(e,t)},empty:u}};e.getEndomorphismMonoid=A}(Lq);var LQ={},LV=T&&T.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(LQ,"__esModule",{value:!0}),LQ.fromReadonlyNonEmptyArray=LQ.has=LQ.emptyRecord=LQ.emptyReadonlyArray=LQ.tail=LQ.head=LQ.isNonEmpty=LQ.singleton=LQ.right=LQ.left=LQ.isRight=LQ.isLeft=LQ.some=LQ.none=LQ.isSome=LQ.isNone=void 0;var Lz=function(e){return"None"===e._tag};LQ.isNone=Lz;var LY=function(e){return"Some"===e._tag};LQ.isSome=LY,LQ.none={_tag:"None"};var LH=function(e){return{_tag:"Some",value:e}};LQ.some=LH;var LZ=function(e){return"Left"===e._tag};LQ.isLeft=LZ;var LJ=function(e){return"Right"===e._tag};LQ.isRight=LJ;var LG=function(e){return{_tag:"Left",left:e}};LQ.left=LG;var L$=function(e){return{_tag:"Right",right:e}};LQ.right=L$;var LX=function(e){return[e]};LQ.singleton=LX;var L0=function(e){return e.length>0};LQ.isNonEmpty=L0;var L1=function(e){return e[0]};LQ.head=L1;var L2=function(e){return e.slice(1)};LQ.tail=L2,LQ.emptyReadonlyArray=[],LQ.emptyRecord={},LQ.has=Object.prototype.hasOwnProperty;var L6=function(e){return LV([e[0]],e.slice(1),!0)};LQ.fromReadonlyNonEmptyArray=L6;var L5=T&&T.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),L3=T&&T.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),L9=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&L5(t,e,n);return L3(t,e),t};Object.defineProperty(LN,"__esModule",{value:!0}),LN.sequenceS=LN.sequenceT=LN.getApplySemigroup=LN.apS=LN.apSecond=LN.apFirst=LN.ap=void 0;var L4=L9(LQ);function L7(e,t,n){return function(r){for(var i=Array(n.length+1),o=0;o<n.length;o++)i[o]=n[o];return i[n.length]=r,0===t?e.apply(null,i):L7(e,t-1,i)}}LN.ap=function(e,t){return function(n){return function(r){return e.ap(e.map(r,function(e){return function(n){return t.ap(e,n)}}),n)}}},LN.apFirst=function(e){return function(t){return function(n){return e.ap(e.map(n,function(e){return function(){return e}}),t)}}},LN.apSecond=function(e){return function(t){return function(n){return e.ap(e.map(n,function(){return function(e){return e}}),t)}}},LN.apS=function(e){return function(t,n){return function(r){return e.ap(e.map(r,function(e){return function(n){var r;return Object.assign({},e,((r={})[t]=n,r))}}),n)}}},LN.getApplySemigroup=function(e){return function(t){return{concat:function(n,r){return e.ap(e.map(n,function(e){return function(n){return t.concat(e,n)}}),r)}}}};var L8={1:function(e){return[e]},2:function(e){return function(t){return[e,t]}},3:function(e){return function(t){return function(n){return[e,t,n]}}},4:function(e){return function(t){return function(n){return function(r){return[e,t,n,r]}}}},5:function(e){return function(t){return function(n){return function(r){return function(i){return[e,t,n,r,i]}}}}}};function Be(e){return L4.has.call(L8,e)||(L8[e]=L7(Lq.tuple,e-1,[])),L8[e]}function Bt(e){var t=e.length;switch(t){case 1:return function(t){var n;return(n={})[e[0]]=t,n};case 2:return function(t){return function(n){var r;return(r={})[e[0]]=t,r[e[1]]=n,r}};case 3:return function(t){return function(n){return function(r){var i;return(i={})[e[0]]=t,i[e[1]]=n,i[e[2]]=r,i}}};case 4:return function(t){return function(n){return function(r){return function(i){var o;return(o={})[e[0]]=t,o[e[1]]=n,o[e[2]]=r,o[e[3]]=i,o}}}};case 5:return function(t){return function(n){return function(r){return function(i){return function(o){var a;return(a={})[e[0]]=t,a[e[1]]=n,a[e[2]]=r,a[e[3]]=i,a[e[4]]=o,a}}}}};default:return L7(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i={},o=0;o<t;o++)i[e[o]]=n[o];return i},t-1,[])}}LN.sequenceT=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t.length,i=Be(r),o=e.map(t[0],i),a=1;a<r;a++)o=e.ap(o,t[a]);return o}},LN.sequenceS=function(e){return function(t){for(var n=Object.keys(t),r=n.length,i=Bt(n),o=e.map(t[n[0]],i),a=1;a<r;a++)o=e.ap(o,t[n[a]]);return o}};var Bn={};function Br(e,t){return function(n){return function(r){return e.map(r,function(e){return t.map(e,n)})}}}Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.getFunctorComposition=Bn.bindTo=Bn.flap=Bn.map=void 0,Bn.map=Br,Bn.flap=function(e){return function(t){return function(n){return e.map(n,function(e){return e(t)})}}},Bn.bindTo=function(e){return function(t){return function(n){return e.map(n,function(e){var n;return(n={})[t]=e,n})}}},Bn.getFunctorComposition=function(e,t){var n=Br(e,t);return{map:function(e,t){return(0,Lq.pipe)(e,n(t))}}},Object.defineProperty(LD,"__esModule",{value:!0}),LD.getApplicativeComposition=LD.getApplicativeMonoid=void 0,LD.getApplicativeMonoid=function(e){var t=(0,LN.getApplySemigroup)(e);return function(n){return{concat:t(n).concat,empty:e.of(n.empty)}}},LD.getApplicativeComposition=function(e,t){var n=(0,Bn.getFunctorComposition)(e,t).map,r=(0,LN.ap)(e,t);return{map:n,of:function(n){return e.of(t.of(n))},ap:function(e,t){return(0,Lq.pipe)(e,r(t))}}};var Bi={};Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.bind=Bi.chainFirst=void 0,Bi.chainFirst=function(e){return function(t){return function(n){return e.chain(n,function(n){return e.map(t(n),function(){return n})})}}},Bi.bind=function(e){return function(t,n){return function(r){return e.chain(r,function(r){return e.map(n(r),function(e){var n;return Object.assign({},r,((n={})[t]=e,n))})})}}};var Bo={};Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.tailRec=void 0;var Ba=function(e,t){for(var n=t(e);"Left"===n._tag;)n=t(n.left);return n.right};Bo.tailRec=Ba;var Bu={},Bs=T&&T.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Bl=T&&T.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Bc=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Bs(t,e,n);return Bl(t,e),t};Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.filterOrElse=Bu.chainFirstEitherK=Bu.chainEitherK=Bu.fromEitherK=Bu.chainOptionK=Bu.fromOptionK=Bu.fromPredicate=Bu.fromOption=void 0;var Bd=Bc(LQ);function Bf(e){return function(t){return function(n){return e.fromEither(Bd.isNone(n)?Bd.left(t()):Bd.right(n.value))}}}function Bp(e){var t=Bf(e);return function(e){var n=t(e);return function(e){return(0,Lq.flow)(e,n)}}}function BA(e){return function(t){return(0,Lq.flow)(t,e.fromEither)}}Bu.fromOption=Bf,Bu.fromPredicate=function(e){return function(t,n){return function(r){return e.fromEither(t(r)?Bd.right(r):Bd.left(n(r)))}}},Bu.fromOptionK=Bp,Bu.chainOptionK=function(e,t){var n=Bp(e);return function(e){var r=n(e);return function(e){return function(n){return t.chain(n,r(e))}}}},Bu.fromEitherK=BA,Bu.chainEitherK=function(e,t){var n=BA(e);return function(e){return function(r){return t.chain(r,n(e))}}},Bu.chainFirstEitherK=function(e,t){return(0,Lq.flow)(BA(e),(0,Bi.chainFirst)(t))},Bu.filterOrElse=function(e,t){return function(n,r){return function(i){return t.chain(i,function(t){return e.fromEither(n(t)?Bd.right(t):Bd.left(r(t)))})}}};var Bh,Bm,Bg,By,Bv,Bx,Bb,BC,BS,Bw,BI={};Object.defineProperty(Bh=BI,"__esModule",{value:!0}),Bh.right=Bh.left=Bh.flap=Bh.Functor=Bh.Bifunctor=Bh.URI=Bh.bimap=Bh.mapLeft=Bh.map=Bh.separated=void 0,Bm=function(e,t){return{left:e,right:t}},Bh.separated=Bm,Bg=function(e,t){return(0,Lq.pipe)(e,(0,Bh.map)(t))},By=function(e,t){return(0,Lq.pipe)(e,(0,Bh.mapLeft)(t))},Bv=function(e,t,n){return(0,Lq.pipe)(e,(0,Bh.bimap)(t,n))},Bx=function(e){return function(t){return(0,Bh.separated)((0,Bh.left)(t),e((0,Bh.right)(t)))}},Bh.map=Bx,Bb=function(e){return function(t){return(0,Bh.separated)(e((0,Bh.left)(t)),(0,Bh.right)(t))}},Bh.mapLeft=Bb,BC=function(e,t){return function(n){return(0,Bh.separated)(e((0,Bh.left)(n)),t((0,Bh.right)(n)))}},Bh.bimap=BC,Bh.URI="Separated",Bh.Bifunctor={URI:Bh.URI,mapLeft:By,bimap:Bv},Bh.Functor={URI:Bh.URI,map:Bg},Bh.flap=(0,Bn.flap)(Bh.Functor),BS=function(e){return e.left},Bh.left=BS,Bw=function(e){return e.right},Bh.right=Bw;var B_={},BT=T&&T.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),BO=T&&T.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),BR=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&BT(t,e,n);return BO(t,e),t};Object.defineProperty(B_,"__esModule",{value:!0}),B_.filterE=B_.witherDefault=B_.wiltDefault=void 0;var Bk=BR(LQ);B_.wiltDefault=function(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.separate)}}},B_.witherDefault=function(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.compact)}}},B_.filterE=function(e){return function(t){var n=e.wither(t);return function(e){return function(r){return n(r,function(n){return t.map(e(n),function(e){return e?Bk.some(n):Bk.none})})}}}},Px=LW,Pb=T&&T.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),PC=T&&T.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),PS=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Pb(t,e,n);return PC(t,e),t},Object.defineProperty(Px,"__esModule",{value:!0}),Px.fold=Px.match=Px.foldW=Px.matchW=Px.isRight=Px.isLeft=Px.fromOption=Px.fromPredicate=Px.FromEither=Px.MonadThrow=Px.throwError=Px.ChainRec=Px.Extend=Px.extend=Px.Alt=Px.alt=Px.altW=Px.Bifunctor=Px.mapLeft=Px.bimap=Px.Traversable=Px.sequence=Px.traverse=Px.Foldable=Px.reduceRight=Px.foldMap=Px.reduce=Px.Monad=Px.Chain=Px.chain=Px.chainW=Px.Applicative=Px.Apply=Px.ap=Px.apW=Px.Pointed=Px.of=Px.Functor=Px.map=Px.getAltValidation=Px.getApplicativeValidation=Px.getWitherable=Px.getFilterable=Px.getCompactable=Px.getSemigroup=Px.getEq=Px.getShow=Px.URI=Px.right=Px.left=void 0,Px.getValidation=Px.getValidationMonoid=Px.getValidationSemigroup=Px.getApplyMonoid=Px.getApplySemigroup=Px.either=Px.stringifyJSON=Px.parseJSON=Px.sequenceArray=Px.traverseArray=Px.traverseArrayWithIndex=Px.traverseReadonlyArrayWithIndex=Px.traverseReadonlyNonEmptyArrayWithIndex=Px.ApT=Px.apSW=Px.apS=Px.bindW=Px.bind=Px.bindTo=Px.Do=Px.exists=Px.elem=Px.toError=Px.toUnion=Px.chainNullableK=Px.fromNullableK=Px.tryCatchK=Px.tryCatch=Px.fromNullable=Px.orElse=Px.orElseW=Px.swap=Px.filterOrElseW=Px.filterOrElse=Px.chainOptionK=Px.fromOptionK=Px.duplicate=Px.flatten=Px.flattenW=Px.chainFirstW=Px.chainFirst=Px.apSecondW=Px.apSecond=Px.apFirstW=Px.apFirst=Px.flap=Px.getOrElse=Px.getOrElseW=void 0,Pw=PS(LQ),Px.left=Pw.left,Px.right=Pw.right,PI=function(e,t){return(0,Lq.pipe)(e,(0,Px.map)(t))},P_=function(e,t){return(0,Lq.pipe)(e,(0,Px.ap)(t))},PT=function(e,t){return(0,Lq.pipe)(e,(0,Px.chain)(t))},PO=function(e,t,n){return(0,Lq.pipe)(e,(0,Px.reduce)(t,n))},PR=function(e){return function(t,n){var r=(0,Px.foldMap)(e);return(0,Lq.pipe)(t,r(n))}},Pk=function(e,t,n){return(0,Lq.pipe)(e,(0,Px.reduceRight)(t,n))},PE=function(e){var t=(0,Px.traverse)(e);return function(e,n){return(0,Lq.pipe)(e,t(n))}},PM=function(e,t,n){return(0,Lq.pipe)(e,(0,Px.bimap)(t,n))},PF=function(e,t){return(0,Lq.pipe)(e,(0,Px.mapLeft)(t))},Pj=function(e,t){return(0,Lq.pipe)(e,(0,Px.alt)(t))},PU=function(e,t){return(0,Lq.pipe)(e,(0,Px.extend)(t))},PK=function(e,t){return(0,Bo.tailRec)(t(e),function(e){return(0,Px.isLeft)(e)?(0,Px.right)((0,Px.left)(e.left)):(0,Px.isLeft)(e.right)?(0,Px.left)(t(e.right.left)):(0,Px.right)((0,Px.right)(e.right.right))})},Px.URI="Either",PL=function(e,t){return{show:function(n){return(0,Px.isLeft)(n)?"left(".concat(e.show(n.left),")"):"right(".concat(t.show(n.right),")")}}},Px.getShow=PL,PB=function(e,t){return{equals:function(n,r){return n===r||((0,Px.isLeft)(n)?(0,Px.isLeft)(r)&&e.equals(n.left,r.left):(0,Px.isRight)(r)&&t.equals(n.right,r.right))}}},Px.getEq=PB,PP=function(e){return{concat:function(t,n){return(0,Px.isLeft)(n)?t:(0,Px.isLeft)(t)?n:(0,Px.right)(e.concat(t.right,n.right))}}},Px.getSemigroup=PP,PW=function(e){var t=(0,Px.left)(e.empty);return{URI:Px.URI,_E:void 0,compact:function(e){return(0,Px.isLeft)(e)?e:"None"===e.right._tag?t:(0,Px.right)(e.right.value)},separate:function(e){return(0,Px.isLeft)(e)?(0,BI.separated)(e,e):(0,Px.isLeft)(e.right)?(0,BI.separated)((0,Px.right)(e.right.left),t):(0,BI.separated)(t,(0,Px.right)(e.right.right))}}},Px.getCompactable=PW,PD=function(e){var t=(0,Px.left)(e.empty),n=(0,Px.getCompactable)(e),r=n.compact,i=n.separate,o=function(e,n){return(0,Px.isLeft)(e)||n(e.right)?e:t},a=function(e,n){return(0,Px.isLeft)(e)?(0,BI.separated)(e,e):n(e.right)?(0,BI.separated)(t,(0,Px.right)(e.right)):(0,BI.separated)((0,Px.right)(e.right),t)};return{URI:Px.URI,_E:void 0,map:PI,compact:r,separate:i,filter:o,filterMap:function(e,n){if((0,Px.isLeft)(e))return e;var r=n(e.right);return"None"===r._tag?t:(0,Px.right)(r.value)},partition:a,partitionMap:function(e,n){if((0,Px.isLeft)(e))return(0,BI.separated)(e,e);var r=n(e.right);return(0,Px.isLeft)(r)?(0,BI.separated)((0,Px.right)(r.left),t):(0,BI.separated)(t,(0,Px.right)(r.right))}}},Px.getFilterable=PD,PN=function(e){var t=(0,Px.getFilterable)(e),n=(0,Px.getCompactable)(e);return{URI:Px.URI,_E:void 0,map:PI,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:PE,sequence:Px.sequence,reduce:PO,foldMap:PR,reduceRight:Pk,wither:(0,B_.witherDefault)(Px.Traversable,n),wilt:(0,B_.wiltDefault)(Px.Traversable,n)}},Px.getWitherable=PN,Pq=function(e){return{URI:Px.URI,_E:void 0,map:PI,ap:function(t,n){return(0,Px.isLeft)(t)?(0,Px.isLeft)(n)?(0,Px.left)(e.concat(t.left,n.left)):t:(0,Px.isLeft)(n)?n:(0,Px.right)(t.right(n.right))},of:Px.of}},Px.getApplicativeValidation=Pq,PQ=function(e){return{URI:Px.URI,_E:void 0,map:PI,alt:function(t,n){if((0,Px.isRight)(t))return t;var r=n();return(0,Px.isLeft)(r)?(0,Px.left)(e.concat(t.left,r.left)):r}}},Px.getAltValidation=PQ,PV=function(e){return function(t){return(0,Px.isLeft)(t)?t:(0,Px.right)(e(t.right))}},Px.map=PV,Px.Functor={URI:Px.URI,map:PI},Px.of=Px.right,Px.Pointed={URI:Px.URI,of:Px.of},Pz=function(e){return function(t){return(0,Px.isLeft)(t)?t:(0,Px.isLeft)(e)?e:(0,Px.right)(t.right(e.right))}},Px.apW=Pz,Px.ap=Px.apW,Px.Apply={URI:Px.URI,map:PI,ap:P_},Px.Applicative={URI:Px.URI,map:PI,ap:P_,of:Px.of},PY=function(e){return function(t){return(0,Px.isLeft)(t)?t:e(t.right)}},Px.chainW=PY,Px.chain=Px.chainW,Px.Chain={URI:Px.URI,map:PI,ap:P_,chain:PT},Px.Monad={URI:Px.URI,map:PI,ap:P_,of:Px.of,chain:PT},PH=function(e,t){return function(n){return(0,Px.isLeft)(n)?e:t(e,n.right)}},Px.reduce=PH,PZ=function(e){return function(t){return function(n){return(0,Px.isLeft)(n)?e.empty:t(n.right)}}},Px.foldMap=PZ,PJ=function(e,t){return function(n){return(0,Px.isLeft)(n)?e:t(n.right,e)}},Px.reduceRight=PJ,Px.Foldable={URI:Px.URI,reduce:PO,foldMap:PR,reduceRight:Pk},PG=function(e){return function(t){return function(n){return(0,Px.isLeft)(n)?e.of((0,Px.left)(n.left)):e.map(t(n.right),Px.right)}}},Px.traverse=PG,P$=function(e){return function(t){return(0,Px.isLeft)(t)?e.of((0,Px.left)(t.left)):e.map(t.right,Px.right)}},Px.sequence=P$,Px.Traversable={URI:Px.URI,map:PI,reduce:PO,foldMap:PR,reduceRight:Pk,traverse:PE,sequence:Px.sequence},PX=function(e,t){return function(n){return(0,Px.isLeft)(n)?(0,Px.left)(e(n.left)):(0,Px.right)(t(n.right))}},Px.bimap=PX,P0=function(e){return function(t){return(0,Px.isLeft)(t)?(0,Px.left)(e(t.left)):t}},Px.mapLeft=P0,Px.Bifunctor={URI:Px.URI,bimap:PM,mapLeft:PF},P1=function(e){return function(t){return(0,Px.isLeft)(t)?e():t}},Px.altW=P1,Px.alt=Px.altW,Px.Alt={URI:Px.URI,map:PI,alt:Pj},P2=function(e){return function(t){return(0,Px.isLeft)(t)?t:(0,Px.right)(e(t))}},Px.extend=P2,Px.Extend={URI:Px.URI,map:PI,extend:PU},Px.ChainRec={URI:Px.URI,map:PI,ap:P_,chain:PT,chainRec:PK},Px.throwError=Px.left,Px.MonadThrow={URI:Px.URI,map:PI,ap:P_,of:Px.of,chain:PT,throwError:Px.throwError},Px.FromEither={URI:Px.URI,fromEither:Lq.identity},Px.fromPredicate=(0,Bu.fromPredicate)(Px.FromEither),Px.fromOption=(0,Bu.fromOption)(Px.FromEither),Px.isLeft=Pw.isLeft,Px.isRight=Pw.isRight,P6=function(e,t){return function(n){return(0,Px.isLeft)(n)?e(n.left):t(n.right)}},Px.matchW=P6,Px.foldW=Px.matchW,Px.match=Px.matchW,Px.fold=Px.match,P5=function(e){return function(t){return(0,Px.isLeft)(t)?e(t.left):t.right}},Px.getOrElseW=P5,Px.getOrElse=Px.getOrElseW,Px.flap=(0,Bn.flap)(Px.Functor),Px.apFirst=(0,LN.apFirst)(Px.Apply),Px.apFirstW=Px.apFirst,Px.apSecond=(0,LN.apSecond)(Px.Apply),Px.apSecondW=Px.apSecond,Px.chainFirst=(0,Bi.chainFirst)(Px.Chain),Px.chainFirstW=Px.chainFirst,Px.flattenW=(0,Px.chainW)(Lq.identity),Px.flatten=Px.flattenW,Px.duplicate=(0,Px.extend)(Lq.identity),Px.fromOptionK=(0,Bu.fromOptionK)(Px.FromEither),Px.chainOptionK=(0,Bu.chainOptionK)(Px.FromEither,Px.Chain),Px.filterOrElse=(0,Bu.filterOrElse)(Px.FromEither,Px.Chain),Px.filterOrElseW=Px.filterOrElse,P3=function(e){return(0,Px.isLeft)(e)?(0,Px.right)(e.left):(0,Px.left)(e.right)},Px.swap=P3,P9=function(e){return function(t){return(0,Px.isLeft)(t)?e(t.left):t}},Px.orElseW=P9,Px.orElse=Px.orElseW,P4=function(e){return function(t){return null==t?(0,Px.left)(e):(0,Px.right)(t)}},Px.fromNullable=P4,P7=function(e,t){try{return(0,Px.right)(e())}catch(n){return(0,Px.left)(t(n))}},Px.tryCatch=P7,P8=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return(0,Px.tryCatch)(function(){return e.apply(void 0,n)},t)}},Px.tryCatchK=P8,We=function(e){var t=(0,Px.fromNullable)(e);return function(e){return(0,Lq.flow)(e,t)}},Px.fromNullableK=We,Wt=function(e){var t=(0,Px.fromNullableK)(e);return function(e){return(0,Px.chain)(t(e))}},Px.chainNullableK=Wt,Px.toUnion=(0,Px.foldW)(Lq.identity,Lq.identity),Px.toError=function(e){return e instanceof Error?e:Error(String(e))},Px.elem=function e(t){return function(n,r){if(void 0===r){var i=e(t);return function(e){return i(n,e)}}return!(0,Px.isLeft)(r)&&t.equals(n,r.right)}},Wn=function(e){return function(t){return!(0,Px.isLeft)(t)&&e(t.right)}},Px.exists=Wn,Px.Do=(0,Px.of)(Pw.emptyRecord),Px.bindTo=(0,Bn.bindTo)(Px.Functor),Px.bind=(0,Bi.bind)(Px.Chain),Px.bindW=Px.bind,Px.apS=(0,LN.apS)(Px.Apply),Px.apSW=Px.apS,Px.ApT=(0,Px.of)(Pw.emptyReadonlyArray),Wr=function(e){return function(t){var n=e(0,Pw.head(t));if((0,Px.isLeft)(n))return n;for(var r=[n.right],i=1;i<t.length;i++){var o=e(i,t[i]);if((0,Px.isLeft)(o))return o;r.push(o.right)}return(0,Px.right)(r)}},Px.traverseReadonlyNonEmptyArrayWithIndex=Wr,Wi=function(e){var t=(0,Px.traverseReadonlyNonEmptyArrayWithIndex)(e);return function(e){return Pw.isNonEmpty(e)?t(e):Px.ApT}},Px.traverseReadonlyArrayWithIndex=Wi,Px.traverseArrayWithIndex=Px.traverseReadonlyArrayWithIndex,Wo=function(e){return(0,Px.traverseReadonlyArrayWithIndex)(function(t,n){return e(n)})},Px.traverseArray=Wo,Px.sequenceArray=(0,Px.traverseArray)(Lq.identity),Px.parseJSON=function(e,t){return(0,Px.tryCatch)(function(){return JSON.parse(e)},t)},Wa=function(e,t){return(0,Px.tryCatch)(function(){var t=JSON.stringify(e);if("string"!=typeof t)throw Error("Converting unsupported structure to JSON");return t},t)},Px.stringifyJSON=Wa,Px.either={URI:Px.URI,map:PI,of:Px.of,ap:P_,chain:PT,reduce:PO,foldMap:PR,reduceRight:Pk,traverse:PE,sequence:Px.sequence,bimap:PM,mapLeft:PF,alt:Pj,extend:PU,chainRec:PK,throwError:Px.throwError},Px.getApplySemigroup=(0,LN.getApplySemigroup)(Px.Apply),Px.getApplyMonoid=(0,LD.getApplicativeMonoid)(Px.Applicative),Wu=function(e,t){return(0,LN.getApplySemigroup)((0,Px.getApplicativeValidation)(e))(t)},Px.getValidationSemigroup=Wu,Ws=function(e,t){return(0,LD.getApplicativeMonoid)((0,Px.getApplicativeValidation)(e))(t)},Px.getValidationMonoid=Ws,Px.getValidation=function(e){var t=(0,Px.getApplicativeValidation)(e).ap,n=(0,Px.getAltValidation)(e).alt;return{URI:Px.URI,_E:void 0,map:PI,of:Px.of,chain:PT,bimap:PM,mapLeft:PF,reduce:PO,foldMap:PR,reduceRight:Pk,extend:PU,traverse:PE,sequence:Px.sequence,chainRec:PK,throwError:Px.throwError,ap:t,alt:n}};var BE=(Wl=function(e,t){return(Wl=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Wl(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),BM=function(){return(BM=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},BF=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},Bj=function(e,t,n){return eg([{value:e,context:t,message:n}])},BU=function(){function e(e,t,n,r){this.name=e,this.is=t,this.validate=n,this.encode=r,this.decode=this.decode.bind(this)}return e.prototype.pipe=function(t,n){var r=this;return void 0===n&&(n="pipe(".concat(this.name,", ").concat(t.name,")")),new e(n,t.is,function(e,n){var i=r.validate(e,n);return f4(i)?i:t.validate(i.right,n)},this.encode===BK&&t.encode===BK?BK:function(e){return r.encode(t.encode(e))})},e.prototype.asDecoder=function(){return this},e.prototype.asEncoder=function(){return this},e.prototype.decode=function(e){return this.validate(e,[{key:"",type:this,actual:e}])},e}(),BK=function(e){return e};function BL(e){return e.displayName||e.name||"<function".concat(e.length,">")}function BB(e,t,n,r){for(var i=e.length,o=Array(i+1),a=0;a<i;a++)o[a]=e[a];return o[i]={key:t,type:n,actual:r},o}function BP(e,t){for(var n=t.length,r=0;r<n;r++)e.push(t[r])}var BW=Object.prototype.hasOwnProperty;function BD(e){return Object.keys(e).map(function(t){return"".concat(t,": ").concat(e[t].name)}).join(", ")}function BN(e){for(var t=0;t<e.length;t++)if(e[t].encode!==BK)return!1;return!0}function Bq(e){return"{ ".concat(BD(e)," }")}function BQ(e){return"Partial<".concat(e,">")}function BV(e){if(BX(e)){var t,n,r=e.value;if(Pi.is(r))return(t={})[r]=null,t}else{if(n=e,"KeyofType"===n._tag)return e.keys;if(B1(e)){var i=e.types.map(function(e){return BV(e)});return i.some(B7.is)?void 0:Object.assign.apply(Object,BF([{}],i,!1))}}}function Bz(e){return"("+e.map(function(e){return e.name}).join(" | ")+")"}function BY(e,t){for(var n=!0,r=!0,i=!PA.is(e),o=0;o<t.length;o++){var a=t[o];a!==e&&(n=!1),PA.is(a)&&(r=!1)}if(n)return e;if(r)return t[t.length-1];for(var u={},s=0;s<t.length;s++){var a=t[s];for(var l in a)(!BW.call(u,l)||i||a[l]!==e[l])&&(u[l]=a[l])}return u}function BH(e,t){for(var n=Object.getOwnPropertyNames(e),r=!1,i={},o=0;o<n.length;o++){var a=n[o];BW.call(t,a)?i[a]=e[a]:r=!0}return r?i:e}function BZ(e){return e.length>0}var BJ={};function BG(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];-1!==t.indexOf(i)&&n.push(i)}return n}function B$(e){return"AnyType"===e._tag}function BX(e){return"LiteralType"===e._tag}function B0(e){return"InterfaceType"===e._tag}function B1(e){return"UnionType"===e._tag}var B2=[];function B6(e){if(-1!==B2.indexOf(e))return BJ;if(B0(e)||"StrictType"===(t=e)._tag){var t,n,r,i,o,a=BJ;for(var u in e.props){var s=e.props[u];BX(s)&&(a===BJ&&(a={}),a[u]=[s.value])}return a}if("ExactType"===e._tag||"RefinementType"===e._tag)return B6(e.type);if("IntersectionType"===e._tag)return e.types.reduce(function(e,t){return function(e,t){if(e===BJ)return t;if(t===BJ)return e;var n=Object.assign({},e);for(var r in t)if(BW.call(e,r)){var i=BG(e[r],t[r]);if(BZ(i))n[r]=i;else{n=BJ;break}}else n[r]=t[r];return n}(e,B6(t))},BJ);if(B1(e))return e.types.slice(1).reduce(function(e,t){return function(e,t){if(e===BJ||t===BJ)return BJ;var n=BJ;for(var r in e)BW.call(t,r)&&0===BG(e[r],t[r]).length&&(n===BJ&&(n={}),n[r]=e[r].concat(t[r]));return n}(e,B6(t))},B6(e.types[0]));if("RecursiveType"===e._tag){B2.push(e);var l=B6(e.type);return B2.pop(),l}return BJ}function B5(e){var t=B6(e[0]),n=Object.keys(t),r=e.length;e:for(var i=0;i<n.length;i++){var o=function(n){for(var i=t[n].slice(),o=[t[n]],a=1;a<r;a++){var u=B6(e[a])[n];if(void 0===u||u.some(function(e){return -1!==i.indexOf(e)}))return"continue-keys";i.push.apply(i,u),o.push(u)}return{value:[n,o]}}(n[i]);if("object"==typeof o)return o.value;if("continue-keys"===o)continue e}}var B3=function(e){function t(){var t=e.call(this,"null",function(e){return null===e},function(e,n){return t.is(e)?ey(e):Bj(e,n)},BK)||this;return t._tag="NullType",t}return BE(t,e),t}(BU),B9=new B3,B4=function(e){function t(){var t=e.call(this,"undefined",function(e){return void 0===e},function(e,n){return t.is(e)?ey(e):Bj(e,n)},BK)||this;return t._tag="UndefinedType",t}return BE(t,e),t}(BU),B7=new B4,B8=function(e){function t(){var t=e.call(this,"void",B7.is,B7.validate,BK)||this;return t._tag="VoidType",t}return BE(t,e),t}(BU),Pe=new B8,Pt=function(e){function t(){var t=e.call(this,"unknown",function(e){return!0},ey,BK)||this;return t._tag="UnknownType",t}return BE(t,e),t}(BU),Pn=new Pt,Pr=function(e){function t(){var t=e.call(this,"string",function(e){return"string"==typeof e},function(e,n){return t.is(e)?ey(e):Bj(e,n)},BK)||this;return t._tag="StringType",t}return BE(t,e),t}(BU),Pi=new Pr,Po=function(e){function t(){var t=e.call(this,"number",function(e){return"number"==typeof e},function(e,n){return t.is(e)?ey(e):Bj(e,n)},BK)||this;return t._tag="NumberType",t}return BE(t,e),t}(BU),Pa=new Po,Pu=function(e){function t(){var t=e.call(this,"bigint",function(e){return"bigint"==typeof e},function(e,n){return t.is(e)?ey(e):Bj(e,n)},BK)||this;return t._tag="BigIntType",t}return BE(t,e),t}(BU),Ps=new Pu,Pl=function(e){function t(){var t=e.call(this,"boolean",function(e){return"boolean"==typeof e},function(e,n){return t.is(e)?ey(e):Bj(e,n)},BK)||this;return t._tag="BooleanType",t}return BE(t,e),t}(BU),Pc=new Pl,Pd=function(e){function t(){var t=e.call(this,"UnknownArray",Array.isArray,function(e,n){return t.is(e)?ey(e):Bj(e,n)},BK)||this;return t._tag="AnyArrayType",t}return BE(t,e),t}(BU),Pf=new Pd,Pp=function(e){function t(){var t=e.call(this,"UnknownRecord",function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t||"[object Window]"===t},function(e,n){return t.is(e)?ey(e):Bj(e,n)},BK)||this;return t._tag="AnyDictionaryType",t}return BE(t,e),t}(BU),PA=new Pp,Ph=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.value=o,a._tag="LiteralType",a}return BE(t,e),t}(BU);function Pm(e,t){void 0===t&&(t=JSON.stringify(e));var n=function(t){return t===e};return new Ph(t,n,function(t,r){return n(t)?ey(e):Bj(t,r)},BK,e)}var Pg=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.keys=o,a._tag="KeyofType",a}return BE(t,e),t}(BU),Py=function(e){function t(t,n,r,i,o,a){var u=e.call(this,t,n,r,i)||this;return u.type=o,u.predicate=a,u._tag="RefinementType",u}return BE(t,e),t}(BU);function Pv(e,t,n){return WQ(e,t,n)}var Px,Pb,PC,PS,Pw,PI,P_,PT,PO,PR,Pk,PE,PM,PF,Pj,PU,PK,PL,PB,PP,PW,PD,PN,Pq,PQ,PV,Pz,PY,PH,PZ,PJ,PG,P$,PX,P0,P1,P2,P6,P5,P3,P9,P4,P7,P8,We,Wt,Wn,Wr,Wi,Wo,Wa,Wu,Ws,Wl,Wc,Wd,Wf=WQ(Pa,Wd=function(e){return Number.isInteger(e)},"Int"),Wp=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.runDefinition=o,a._tag="RecursiveType",a}return BE(t,e),t}(BU);function WA(e,t){var n,r=function(){return n||((n=t(i)).name=e),n},i=new Wp(e,function(e){return r().is(e)},function(e,t){return r().validate(e,t)},function(e){return r().encode(e)},r);return i}Object.defineProperty(Wp.prototype,"type",{get:function(){return this.runDefinition()},enumerable:!0,configurable:!0});var Wh=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ArrayType",a}return BE(t,e),t}(BU);function Wm(e,t){return void 0===t&&(t="Array<".concat(e.name,">")),new Wh(t,function(t){return Pf.is(t)&&t.every(e.is)},function(t,n){var r=Pf.validate(t,n);if(f4(r))return r;for(var i=r.right,o=i.length,a=i,u=[],s=0;s<o;s++){var l=i[s],c=e.validate(l,BB(n,String(s),e,l));if(f4(c))BP(u,c.left);else{var d=c.right;d!==l&&(a===i&&(a=i.slice()),a[s]=d)}}return u.length>0?eg(u):ey(a)},e.encode===BK?BK:function(t){return t.map(e.encode)},e)}var Wg=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.props=o,a._tag="InterfaceType",a}return BE(t,e),t}(BU);function Wy(e,t){void 0===t&&(t=Bq(e));var n=Object.keys(e),r=n.map(function(t){return e[t]}),i=n.length;return new Wg(t,function(e){if(PA.is(e)){for(var t=0;t<i;t++){var o=n[t],a=e[o];if(void 0===a&&!BW.call(e,o)||!r[t].is(a))return!1}return!0}return!1},function(e,t){var o=PA.validate(e,t);if(f4(o))return o;for(var a=o.right,u=a,s=[],l=0;l<i;l++){var c=n[l],d=u[c],f=r[l],p=f.validate(d,BB(t,c,f,d));if(f4(p))BP(s,p.left);else{var A=p.right;A===d&&(void 0!==A||BW.call(u,c))||(u===a&&(u=BM({},a)),u[c]=A)}}return s.length>0?eg(s):ey(u)},BN(r)?BK:function(e){for(var t=BM({},e),o=0;o<i;o++){var a=n[o],u=r[o].encode;u!==BK&&(t[a]=u(e[a]))}return t},e)}var Wv=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.props=o,a._tag="PartialType",a}return BE(t,e),t}(BU),Wx=function(e){function t(t,n,r,i,o,a){var u=e.call(this,t,n,r,i)||this;return u.domain=o,u.codomain=a,u._tag="DictionaryType",u}return BE(t,e),t}(BU);function Wb(e,t,n){var r,i,o,a,u,s,l,c,d=BV(e);return d?(r=Object.keys(d),void 0===(a=n)&&(a="{ [K in ".concat(e.name,"]: ").concat(t.name," }")),u=r.length,new Wx(a,function(e){return PA.is(e)&&r.every(function(n){return t.is(e[n])})},function(e,n){var i=PA.validate(e,n);if(f4(i))return i;for(var o=i.right,a={},s=[],l=!1,c=0;c<u;c++){var d=r[c],f=o[d],p=t.validate(f,BB(n,d,t,f));if(f4(p))BP(s,p.left);else{var A=p.right;l=l||A!==f,a[d]=A}}return s.length>0?eg(s):ey(l||Object.keys(o).length!==u?a:o)},t.encode===BK?BK:function(e){for(var n={},i=0;i<u;i++){var o=r[i];n[o]=t.encode(e[o])}return n},e,t)):(s=e,void 0===(c=n)&&(c="{ [K in ".concat(s.name,"]: ").concat(t.name," }")),new Wx(c,function(e){return PA.is(e)?Object.keys(e).every(function(n){return s.is(n)&&t.is(e[n])}):B$(t)&&Array.isArray(e)},function(e,n){if(PA.is(e)){for(var r={},i=[],o=Object.keys(e),a=o.length,u=!1,l=0;l<a;l++){var c=o[l],d=e[c],f=s.validate(c,BB(n,c,s,c));if(f4(f))BP(i,f.left);else{var p=f.right;u=u||p!==c,c=p;var A=t.validate(d,BB(n,c,t,d));if(f4(A))BP(i,A.left);else{var h=A.right;u=u||h!==d,r[c]=h}}}return i.length>0?eg(i):ey(u?r:e)}return B$(t)&&Array.isArray(e)?ey(e):Bj(e,n)},s.encode===BK&&t.encode===BK?BK:function(e){for(var n={},r=Object.keys(e),i=r.length,o=0;o<i;o++){var a=r[o];n[String(s.encode(a))]=t.encode(e[a])}return n},s,t))}var WC=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.types=o,a._tag="UnionType",a}return BE(t,e),t}(BU);function WS(e,t){void 0===t&&(t=Bz(e));var n=B5(e);if(void 0===n||!(e.length>0))return new WC(t,function(t){return e.some(function(e){return e.is(t)})},function(t,n){for(var r=[],i=0;i<e.length;i++){var o=e[i],a=o.validate(t,BB(n,String(i),o,t));if(!f4(a))return ey(a.right);BP(r,a.left)}return eg(r)},BN(e)?BK:function(n){for(var r=0;r<e.length;r++){var i=e[r];if(i.is(n))return i.encode(n)}throw Error("no codec found to encode value in union type ".concat(t))},e);var r=n[0],i=n[1],o=i.length,a=function(e){for(var t=0;t<o;t++)if(-1!==i[t].indexOf(e))return t};return new Wj(t,function(t){if(PA.is(t)){var n=a(t[r]);return void 0!==n&&e[n].is(t)}return!1},function(t,n){var i=PA.validate(t,n);if(f4(i))return i;var o=i.right,u=a(o[r]);if(void 0===u)return Bj(t,n);var s=e[u];return s.validate(o,BB(n,String(u),s,o))},BN(e)?BK:function(n){var i=a(n[r]);if(void 0===i)throw Error("no codec found to encode value in union codec ".concat(t));return e[i].encode(n)},e,r)}var Ww=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.types=o,a._tag="IntersectionType",a}return BE(t,e),t}(BU),WI=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.types=o,a._tag="TupleType",a}return BE(t,e),t}(BU),W_=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ReadonlyType",a}return BE(t,e),t}(BU),WT=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ReadonlyArrayType",a}return BE(t,e),t}(BU);function WO(e,t){void 0===t&&(t="ReadonlyArray<".concat(e.name,">"));var n=Wm(e);return new WT(t,n.is,n.validate,n.encode,e)}var WR=function(e,t){return WE(Wy(e),t)},Wk=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ExactType",a}return BE(t,e),t}(BU);function WE(e,t){void 0===t&&(t=B0(r=e)?"{| ".concat(BD(r.props)," |}"):(n=r,"PartialType"===n._tag)?BQ("{| ".concat(BD(r.props)," |}")):"Exact<".concat(r.name,">"));var n,r,i=function e(t){switch(t._tag){case"RefinementType":case"ReadonlyType":return e(t.type);case"InterfaceType":case"StrictType":case"PartialType":return t.props;case"IntersectionType":return t.types.reduce(function(t,n){return Object.assign(t,e(n))},{})}}(e);return new Wk(t,e.is,function(t,n){var r=PA.validate(t,n);if(f4(r))return r;var o=e.validate(t,n);return f4(o)?o:ey(BH(o.right,i))},function(t){return e.encode(BH(t,i))},e)}var WM=function(e){function t(){var t=e.call(this,"Function",function(e){return"function"==typeof e},function(e,n){return t.is(e)?ey(e):Bj(e,n)},BK)||this;return t._tag="FunctionType",t}return BE(t,e),t}(BU),WF=new WM,Wj=function(e){function t(t,n,r,i,o,a){var u=e.call(this,t,n,r,i,o)||this;return u.tag=a,u}return BE(t,e),t}(WC),WU=function(e,t,n){void 0===n&&(n=Bz(t));var r=WS(t,n);return r instanceof Wj?r:(console.warn("[io-ts] Cannot build a tagged union for ".concat(n,", returning a de-optimized union")),new Wj(n,r.is,r.validate,r.encode,t,e))},WK=function(e,t){return{value:e,context:t}},WL=function(e){return[{key:"",type:e}]},WB=function(e){function t(){var t=e.call(this,"never",function(e){return!1},function(e,t){return Bj(e,t)},function(){throw Error("cannot encode never")})||this;return t._tag="NeverType",t}return BE(t,e),t}(BU),WP=new WB,WW=function(e){function t(){var t=e.call(this,"any",function(e){return!0},ey,BK)||this;return t._tag="AnyType",t}return BE(t,e),t}(BU),WD=new WW,WN=function(e){function t(){var t=e.call(this,"object",function(e){return null!==e&&"object"==typeof e},function(e,n){return t.is(e)?ey(e):Bj(e,n)},BK)||this;return t._tag="ObjectType",t}return BE(t,e),t}(BU),Wq=new WN;function WQ(e,t,n){return void 0===n&&(n="(".concat(e.name," | ").concat(BL(t),")")),new Py(n,function(n){return e.is(n)&&t(n)},function(n,r){var i=e.validate(n,r);if(f4(i))return i;var o=i.right;return t(o)?ey(o):Bj(o,r)},e.encode,e,t)}var WV=WQ(Pa,Number.isInteger,"Integer"),Wz=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.props=o,a._tag="StrictType",a}return BE(t,e),t}(BU);function WY(e){return e}let WH=Object.freeze(Object.defineProperty({__proto__:null,AnyArrayType:Pd,AnyDictionaryType:Pp,AnyType:WW,Array:Pf,ArrayType:Wh,BigIntType:Pu,BooleanType:Pl,Dictionary:PA,DictionaryType:Wx,ExactType:Wk,Function:WF,FunctionType:WM,Int:Wf,Integer:WV,InterfaceType:Wg,IntersectionType:Ww,KeyofType:Pg,LiteralType:Ph,NeverType:WB,NullType:B3,NumberType:Po,ObjectType:WN,PartialType:Wv,ReadonlyArrayType:WT,ReadonlyType:W_,RecursiveType:Wp,RefinementType:Py,StrictType:Wz,StringType:Pr,TaggedUnionType:Wj,TupleType:WI,Type:BU,UndefinedType:B4,UnionType:WC,UnknownArray:Pf,UnknownRecord:PA,UnknownType:Pt,VoidType:B8,alias:function(e){return function(){return e}},any:WD,appendContext:BB,array:Wm,bigint:Ps,boolean:Pc,brand:Pv,clean:WY,dictionary:Wb,emptyTags:BJ,exact:WE,failure:Bj,failures:eg,getContextEntry:function(e,t){return{key:e,type:t}},getDefaultContext:WL,getDomainKeys:BV,getFunctionName:BL,getIndex:B5,getTags:B6,getValidationError:WK,identity:BK,interface:Wy,intersection:function(e,t){void 0===t&&(t="(".concat(e.map(function(e){return e.name}).join(" & "),")"));var n=e.length;return new Ww(t,function(t){return e.every(function(e){return e.is(t)})},0===e.length?ey:function(t,r){for(var i=[],o=[],a=0;a<n;a++){var u=e[a],s=u.validate(t,BB(r,String(a),u,t));f4(s)?BP(o,s.left):i.push(s.right)}return o.length>0?eg(o):ey(BY(t,i))},0===e.length?BK:function(t){return BY(t,e.map(function(e){return e.encode(t)}))},e)},keyof:function(e,t){void 0===t&&(t=Object.keys(e).map(function(e){return JSON.stringify(e)}).join(" | "));var n=function(t){return Pi.is(t)&&BW.call(e,t)};return new Pg(t,n,function(e,t){return n(e)?ey(e):Bj(e,t)},BK,e)},literal:Pm,mergeAll:BY,never:WP,null:B9,nullType:B9,number:Pa,object:Wq,partial:function(e,t){void 0===t&&(t=BQ(Bq(e)));var n=Object.keys(e),r=n.map(function(t){return e[t]}),i=n.length;return new Wv(t,function(t){if(PA.is(t)){for(var r=0;r<i;r++){var o=n[r],a=t[o];if(void 0!==a&&!e[o].is(a))return!1}return!0}return!1},function(t,r){var o=PA.validate(t,r);if(f4(o))return o;for(var a=o.right,u=a,s=[],l=0;l<i;l++){var c=n[l],d=u[c],f=e[c],p=f.validate(d,BB(r,c,f,d));if(f4(p))void 0!==d&&BP(s,p.left);else{var A=p.right;A!==d&&(u===a&&(u=BM({},a)),u[c]=A)}}return s.length>0?eg(s):ey(u)},BN(r)?BK:function(e){for(var t=BM({},e),o=0;o<i;o++){var a=n[o],u=e[a];void 0!==u&&(t[a]=r[o].encode(u))}return t},e)},readonly:function(e,t){return void 0===t&&(t="Readonly<".concat(e.name,">")),new W_(t,e.is,e.validate,e.encode,e)},readonlyArray:WO,record:Wb,recursion:WA,refinement:WQ,strict:WR,string:Pi,success:ey,taggedUnion:WU,tuple:function(e,t){void 0===t&&(t="[".concat(e.map(function(e){return e.name}).join(", "),"]"));var n=e.length;return new WI(t,function(t){return Pf.is(t)&&t.length===n&&e.every(function(e,n){return e.is(t[n])})},function(t,r){var i=Pf.validate(t,r);if(f4(i))return i;for(var o=i.right,a=o.length>n?o.slice(0,n):o,u=[],s=0;s<n;s++){var l=o[s],c=e[s],d=c.validate(l,BB(r,String(s),c,l));if(f4(d))BP(u,d.left);else{var f=d.right;f!==l&&(a===o&&(a=o.slice()),a[s]=f)}}return u.length>0?eg(u):ey(a)},BN(e)?BK:function(t){return e.map(function(e,n){return e.encode(t[n])})},e)},type:Wy,undefined:B7,union:WS,unknown:Pn,void:Pe,voidType:Pe},Symbol.toStringTag,{value:"Module"})),WZ=O(WH);var WJ={};Object.defineProperty(WJ,"__esModule",{value:!0}),WJ.ContentPath=void 0,WJ.ContentPath={serialize:e=>e.map(e=>e.key).join("::"),current:e=>e[e.length-1],append:(e,t)=>e+"::"+t,make:e=>e.reduce((e,{key:t,type:n})=>t?e.concat({key:t,type:n}):e,[])};var WG={},W$={};Object.defineProperty(W$,"__esModule",{value:!0}),W$.getAssetOrThrow=void 0;let WX=e=>t=>{let n=e[t];if(!n)throw Error(`Missing asset with id '${t}'!`);return n};W$.getAssetOrThrow=WX;var W0={};Object.defineProperty(W0,"__esModule",{value:!0}),W0.getEmbedOrThrow=void 0;let W1=e=>t=>{let n=e[t];if(!n)throw Error(`Missing embed with url '${t}'`);return n};W0.getEmbedOrThrow=W1;var W2={},W6={};let W5=O(el);function W3(e,t,n){return void 0===n&&(n=e.name),new BU(n,e.is,e.validate,function(n){return t(e.encode(n))})}let W9=Object.freeze(Object.defineProperty({__proto__:null,mapOutput:W3},Symbol.toStringTag,{value:"Module"}));var W4,W7,W8,De=WQ(Pi,W7=function(e){return e.length>0},"NonEmptyString");function Dt(e,t){void 0===t&&(t="NonEmptyArray<"+e.name+">");var n=Wm(e);return new BU(t,function(e){return n.is(e)&&rx(e)},function(e,t){return ea(n.validate(e,t),fV(function(n){var r=rE(n);return dv(r)?Bj(e,t):ey(r.value)}))},function(e){return n.encode(e)})}function Dn(e,t,n){void 0===n&&(n="Set<"+e.name+">");var r=Wm(e),i=EO(t),o=Eb(t);return new BU(n,function(t){return t instanceof Set&&RK(e.is)(t)},function(e,t){return ea(r.validate(e,t),fV(function(n){var r=o(n);return r.size!==n.length?Bj(e,t):ey(r)}))},function(e){return r.encode(i(e))})}function Dr(e,t){return new BU(e,t,function(e,n){return t(e)?ey(e):Bj(e,n)},BK)}var Di=Dr("Date",function(e){return e instanceof Date}),Do=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},Da=function(e,t){return{get:e,reverseGet:t}},Du=function(e){return Dd(e.get,et(e.reverseGet,J))},Ds=function(e){return DC(et(e.get,eA),e.reverseGet)},Dl=function(e){return DT(et(e.get,eA),et(e.reverseGet,J))},Dc=function(e){return DF(function(t){return function(n){return function(r){return t.map(n(e.get(r)),function(t){return e.reverseGet(t)})}}})},Dd=function(e,t){return{get:e,set:t}},Df=function(e){return DT(et(e.get,eA),e.set)},Dp=function(e){return DF(function(t){return function(n){return function(r){return t.map(n(e.get(r)),function(t){return e.set(t)(r)})}}})},DA=function(e){return function(t){return Dd(function(n){return e.get(t.get(n))},function(n){return function(r){return t.set(e.set(n)(t.get(r)))(r)}})}},Dh=function(e){return function(t){return DC(et(t.getOption,c$(e.getOption)),et(e.reverseGet,t.reverseGet))}},Dm=function(e){return function(t){return DE(DS(e))(Df(t))}},Dg=function(){return Dd(Z,J)},Dy=function(e){return function(t){return Dd(function(n){return t.get(n)[e]},function(n){return function(r){var i,o=t.get(r);return n===o[e]?r:t.set(Object.assign({},o,((i={})[e]=n,i)))(r)}})}},Dv=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Dd(function(n){for(var r=t.get(n),i={},o=0;o<e.length;o++){var a=e[o];i[a]=r[a]}return i},function(n){return function(r){for(var i=t.get(r),o=0;o<e.length;o++){var a=e[o];if(n[a]!==i[a])return t.set(Object.assign({},i,n))(r)}return r}})}},Dx=function(e){return function(t){return Dd(function(n){return t.get(n)[e]},function(n){return function(r){var i=t.get(r);if(n===i[e])return r;var o=i.slice();return o[e]=n,t.set(o)(r)}})}},Db=function(e){return function(t){var n;return ea(t,DA(({at:n=function(e){return Dd(function(t){return Ot(e,t)},dx(function(){return T4(e)},function(t){return T3(e,t)}))}}).at(e)))}},DC=function(e,t){return{getOption:e,reverseGet:t}},DS=function(e){return DT(e.getOption,function(t){return DI(t)(e)})},Dw=function(e){return DF(function(t){return function(n){return function(r){return ea(e.getOption(r),dx(function(){return t.of(r)},function(i){return t.map(n(i),function(t){return DI(t)(e)(r)})}))}}})},DI=function(e){var t;return t=function(){return e},function(e){var n,r,i=(n=e,function(e){return ea(n.getOption(e),cz(function(r){var i=t(r);return i===r?e:n.reverseGet(i)}))});return function(e){return ea(i(e),db(function(){return e}))}}},D_=function(e){return DC(cI(e),Z)},DT=function(e,t){return{getOption:e,set:t}},DO=function(e){return DF(function(t){return function(n){return function(r){return ea(e.getOption(r),dx(function(){return t.of(r)},function(i){return t.map(n(i),function(t){return e.set(t)(r)})}))}}})},DR=function(e){return function(t){return function(n){return ea(t.getOption(n),cz(function(r){var i=e(r);return i===r?n:t.set(i)(n)}))}}},Dk=function(e){return function(t){var n=DR(e)(t);return function(e){return ea(n(e),db(function(){return e}))}}},DE=function(e){return function(t){return DT(et(t.getOption,c$(e.getOption)),function(n){return Dk(e.set(n))(t)})}},DM=function(e,t,n){if(n[e]===t)return n;var r=Do([n[0]],n.slice(1),!0);return r[e]=t,r},DF=function(e){return{modifyF:e}};function Dj(e){return function(t){return DF(function(n){return function(r){return t.modifyF(n)(e.modifyF(n)(r))}})}}var DU={URI:"Identity",map:function(e,t){return t(e)},of:Z,ap:function(e,t){return e(t)}},DK=function(e){return{index:e}},DL=et(Du,DA),DB=function(e){return et(Df,DE(e))},DP=function(e){return et(Dp,Dj(e))},DW=function(e){return function(t){return function(n){var r=t.get(n),i=e(r);return r===i?n:t.set(i)(n)}}},DD=function(e){return Dm(DC(dk,Z))(e)},DN=function(e){var t;return et(Df,function(t){return ea(t,DE(DK(function(e){return DT(function(t){return oM(e,t)},function(t){return function(n){return ea(oM(e,n),dx(function(){return n},function(){return uk(e,t,n)}))}})}).index(e)))})},Dq=function(e){var t;return et(Df,function(t){return ea(t,DE(DK(function(e){return DT(function(t){return oM(e,t)},function(t){return function(n){return ea(oM(e,n),dx(function(){return n},function(){return DM(e,t,n)}))}})}).index(e)))})},DQ=function(e){var t;return et(Df,function(t){return ea(t,DE(DK(function(e){return DT(function(t){return Ot(e,t)},function(t){return function(n){return n[e]===t||dv(Ot(e,n))?n:T3(e,t)(n)}})}).index(e)))})},DV=Dm(DC(Z,eA)),Dz=Dm(DC(cT,ey)),DY=Dm(DC(function(e){return f4(e)?eA(e.left):ep},eg)),DH=function(e,t){return function(n){return DZ(n,e,t)}},DZ=function(e,t,n){return Dd(et(e.get,t),et(n,e.set))},DJ="monocle-ts/Lens",DG={URI:DJ,compose:function(e,t){return DA(e)(t)}},D$={URI:DJ,compose:DG.compose,id:Dg};let DX=Object.freeze(Object.defineProperty({__proto__:null,Category:D$,Invariant:{URI:DJ,imap:DZ},Semigroupoid:DG,URI:DJ,asOptional:Df,asTraversal:Dp,atKey:Db,component:Dx,compose:DA,composeIso:DL,composeLens:DA,composeOptional:DB,composePrism:Dm,composeTraversal:DP,filter:function(e){return Dm(D_(e))},findFirst:function(e){var t;return DB(DT(oq(e),function(t){return function(n){return ea(oN(e)(n),dx(function(){return n},function(e){return uk(e,t,n)}))}}))},findFirstNonEmpty:function(e){var t;return DB(DT(oq(e),function(t){return function(n){return ea(oN(e)(n),dx(function(){return n},function(e){return DM(e,t,n)}))}}))},fromNullable:DD,id:Dg,imap:DH,index:DN,indexNonEmpty:Dq,key:DQ,left:DY,lens:Dd,modify:DW,modifyF:function(e){return function(t){return function(n){return function(r){return ea(n.get(r),t,function(t){return e.map(t,function(e){return n.set(e)(r)})})}}}},prop:Dy,props:Dv,right:Dz,some:DV,traverse:function(e){var t,n;return et(Dp,Dj(DF(function(t){var n,r="Identity"===t.URI?e.map:e.traverse(t);return function(e){return function(t){return r(t,e)}}})))}},Symbol.toStringTag,{value:"Module"}));var D0=function(e){return function(t){return t.modifyF(DU)(e)}},D1=function(e){return new D4(e.get,e.reverseGet)},D2=function(e){return new D7(e.get,e.set)},D6=function(e){return new D8(e.getOption,e.reverseGet)},D5=function(e){return new Nt(e.getOption,e.set)},D3=function(e){return new Nn(e.modifyF)},D9=function(e,t,n){var r;return n===e[t]?e:Object.assign({},e,((r={})[t]=n,r))},D4=function(){function e(e,t){this.get=e,this.reverseGet=t,this._tag="Iso",this.unwrap=this.get,this.to=this.get,this.wrap=this.reverseGet,this.from=this.reverseGet}return e.prototype.reverse=function(){var e;return D1(Da(this.reverseGet,this.get))},e.prototype.modify=function(e){var t,n;return n=this,function(t){return n.reverseGet(e(n.get(t)))}},e.prototype.asLens=function(){return D2(Du(this))},e.prototype.asPrism=function(){return D6(Ds(this))},e.prototype.asOptional=function(){return D5(Dl(this))},e.prototype.asTraversal=function(){return D3(Dc(this))},e.prototype.asFold=function(){var e=this;return new Ni(function(){return function(t){return function(n){return t(e.get(n))}}})},e.prototype.asGetter=function(){var e=this;return new Nr(function(t){return e.get(t)})},e.prototype.asSetter=function(){var e=this;return new No(function(t){return e.modify(t)})},e.prototype.compose=function(e){var t,n;return D1((n=this,Da(et(n.get,e.get),et(e.reverseGet,n.reverseGet))))},e.prototype.composeIso=function(e){return this.compose(e)},e.prototype.composeLens=function(e){return D2(ea(this,Du,DA(e)))},e.prototype.composePrism=function(e){return D6(ea(this,Ds,Dh(e)))},e.prototype.composeOptional=function(e){return D5(ea(this,Dl,DE(e)))},e.prototype.composeTraversal=function(e){return D3(ea(this,Dc,Dj(e)))},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeGetter=function(e){return this.asGetter().compose(e)},e.prototype.composeSetter=function(e){return this.asSetter().compose(e)},e}(),D7=function(){function e(e,t){this.get=e,this.set=t,this._tag="Lens"}return e.fromPath=function(){var t=e.fromProp();return function(e){var n=t(e[0]);return e.slice(1).reduce(function(e,n){return e.compose(t(n))},n)}},e.fromProp=function(){return function(e){return D2(ea(Dg(),Dy(e)))}},e.fromProps=function(){return function(e){return D2(ea(Dg(),Dv.apply(DX,e)))}},e.fromNullableProp=function(){return function(t,n){return new e(function(e){var r=dk(e[t]);return dv(r)?n:r.value},function(e){return function(n){return D9(n,t,e)}})}},e.prototype.modify=function(e){return DW(e)(this)},e.prototype.asOptional=function(){return D5(Df(this))},e.prototype.asTraversal=function(){return D3(Dp(this))},e.prototype.asSetter=function(){var e=this;return new No(function(t){return e.modify(t)})},e.prototype.asGetter=function(){var e=this;return new Nr(function(t){return e.get(t)})},e.prototype.asFold=function(){var e=this;return new Ni(function(){return function(t){return function(n){return t(e.get(n))}}})},e.prototype.compose=function(e){return D2(DA(e)(this))},e.prototype.composeLens=function(e){return this.compose(e)},e.prototype.composeGetter=function(e){return this.asGetter().compose(e)},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeOptional=function(e){return D5(ea(this,Df,DE(e)))},e.prototype.composeTraversal=function(e){return D3(ea(this,Dp,Dj(e)))},e.prototype.composeSetter=function(e){return this.asSetter().compose(e)},e.prototype.composeIso=function(e){return D2(ea(this,DA(ea(e,Du))))},e.prototype.composePrism=function(e){return D5(Dm(e)(this))},e}(),D8=function(){function e(e,t){this.getOption=e,this.reverseGet=t,this._tag="Prism"}return e.fromPredicate=function(e){return D6(D_(e))},e.some=function(){return Ne},e.prototype.modify=function(e){var t=this;return function(n){var r=t.modifyOption(e)(n);return dv(r)?n:r.value}},e.prototype.modifyOption=function(e){var t=this;return function(n){return dY.map(t.getOption(n),function(r){var i=e(r);return i===r?n:t.reverseGet(i)})}},e.prototype.set=function(e){return this.modify(function(){return e})},e.prototype.asOptional=function(){return D5(DS(this))},e.prototype.asTraversal=function(){return D3(Dw(this))},e.prototype.asSetter=function(){var e=this;return new No(function(t){return e.modify(t)})},e.prototype.asFold=function(){var e=this;return new Ni(function(t){return function(n){return function(r){var i=e.getOption(r);return dv(i)?t.empty:n(i.value)}}})},e.prototype.compose=function(e){return D6(Dh(e)(this))},e.prototype.composePrism=function(e){return this.compose(e)},e.prototype.composeOptional=function(e){return D5(ea(this,DS,DE(e)))},e.prototype.composeTraversal=function(e){return D3(ea(this,Dw,Dj(e)))},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeSetter=function(e){return this.asSetter().compose(e)},e.prototype.composeIso=function(e){return D6(ea(this,Dh(ea(e,Ds))))},e.prototype.composeLens=function(e){var t;return D5((t=e,function(e){return DE(Df(t))(DS(e))})(this))},e.prototype.composeGetter=function(e){return this.asFold().compose(e.asFold())},e}(),Ne=new D8(Z,eA),Nt=function(){function e(e,t){this.getOption=e,this.set=t,this._tag="Optional"}return e.fromPath=function(){var t=e.fromNullableProp();return function(e){var n=t(e[0]);return e.slice(1).reduce(function(e,n){return e.compose(t(n))},n)}},e.fromNullableProp=function(){return function(t){return new e(function(e){return dk(e[t])},function(e){return function(n){return null==n[t]?n:D9(n,t,e)}})}},e.fromOptionProp=function(){var e=D7.fromProp();return function(t){return e(t).composePrism(Ne)}},e.prototype.modify=function(e){return Dk(e)(this)},e.prototype.modifyOption=function(e){return DR(e)(this)},e.prototype.asTraversal=function(){return D3(DO(this))},e.prototype.asFold=function(){var e=this;return new Ni(function(t){return function(n){return function(r){var i=e.getOption(r);return dv(i)?t.empty:n(i.value)}}})},e.prototype.asSetter=function(){var e=this;return new No(function(t){return e.modify(t)})},e.prototype.compose=function(e){return D5(DE(e)(this))},e.prototype.composeOptional=function(e){return this.compose(e)},e.prototype.composeTraversal=function(e){return D3(ea(this,DO,Dj(e)))},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeSetter=function(e){return this.asSetter().compose(e)},e.prototype.composeLens=function(e){return D5(ea(this,DE(ea(e,Df))))},e.prototype.composePrism=function(e){return D5(ea(this,DE(ea(e,DS))))},e.prototype.composeIso=function(e){return D5(ea(this,DE(ea(e,Dl))))},e.prototype.composeGetter=function(e){return this.asFold().compose(e.asFold())},e}(),Nn=function(){function e(e){this.modifyF=e,this._tag="Traversal"}return e.prototype.modify=function(e){return D0(e)(this)},e.prototype.set=function(e){var t;return D0(function(){return e})(this)},e.prototype.filter=function(e){var t;return D3(Dj(Dw(D_(e)))(this))},e.prototype.asFold=function(){var e=this;return new Ni(function(t){return function(n){return e.modifyF(d7(t))(function(e){return Z(n(e))})}})},e.prototype.asSetter=function(){var e=this;return new No(function(t){return e.modify(t)})},e.prototype.compose=function(e){return D3(Dj(e)(this))},e.prototype.composeTraversal=function(e){return this.compose(e)},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeSetter=function(e){return this.asSetter().compose(e)},e.prototype.composeOptional=function(e){return this.compose(e.asTraversal())},e.prototype.composeLens=function(e){return D3(ea(this,Dj(ea(e,Dp))))},e.prototype.composePrism=function(e){return D3(ea(this,Dj(ea(e,Dw))))},e.prototype.composeIso=function(e){return D3(ea(this,Dj(ea(e,Dc))))},e.prototype.composeGetter=function(e){return this.asFold().compose(e.asFold())},e}(),Nr=function(){function e(e){this.get=e,this._tag="Getter"}return e.prototype.asFold=function(){var e=this;return new Ni(function(){return function(t){return function(n){return t(e.get(n))}}})},e.prototype.compose=function(t){var n=this;return new e(function(e){return t.get(n.get(e))})},e.prototype.composeGetter=function(e){return this.compose(e)},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeLens=function(e){return this.compose(e.asGetter())},e.prototype.composeIso=function(e){return this.compose(e.asGetter())},e.prototype.composeTraversal=function(e){return this.asFold().compose(e.asFold())},e.prototype.composeOptional=function(e){return this.asFold().compose(e.asFold())},e.prototype.composePrism=function(e){return this.asFold().compose(e.asFold())},e}(),Ni=function(){function e(e){this.foldMap=e,this._tag="Fold",this.getAll=e(lm())(rY),this.exist=e(bT),this.all=e(b_),this.foldMapFirst=e(dJ())}return e.prototype.compose=function(t){var n=this;return new e(function(e){return function(r){return n.foldMap(e)(t.foldMap(e)(r))}})},e.prototype.composeFold=function(e){return this.compose(e)},e.prototype.composeGetter=function(e){return this.compose(e.asFold())},e.prototype.composeTraversal=function(e){return this.compose(e.asFold())},e.prototype.composeOptional=function(e){return this.compose(e.asFold())},e.prototype.composeLens=function(e){return this.compose(e.asFold())},e.prototype.composePrism=function(e){return this.compose(e.asFold())},e.prototype.composeIso=function(e){return this.compose(e.asFold())},e.prototype.find=function(e){return this.foldMapFirst(cI(e))},e.prototype.headOption=function(e){return this.find(function(){return!0})(e)},e}(),No=function(){function e(e){this.modify=e,this._tag="Setter"}return e.prototype.set=function(e){return this.modify(J(e))},e.prototype.compose=function(t){var n=this;return new e(function(e){return n.modify(t.modify(e))})},e.prototype.composeSetter=function(e){return this.compose(e)},e.prototype.composeTraversal=function(e){return this.compose(e.asSetter())},e.prototype.composeOptional=function(e){return this.compose(e.asSetter())},e.prototype.composeLens=function(e){return this.compose(e.asSetter())},e.prototype.composePrism=function(e){return this.compose(e.asSetter())},e.prototype.composeIso=function(e){return this.compose(e.asSetter())},e}(),Na=new D4(Z,Z),Nu=WR({_tag:Pm("None")}),Ns=Pm("Some");function Nl(e,t){return void 0===t&&(t="Option<"+e.name+">"),WS([Nu,WR({_tag:Ns,value:e},"Some<"+e.name+">")],t)}var Nc=new BU("DateFromISOString",function(e){return e instanceof Date},function(e,t){return ea(Pi.validate(e,t),fV(function(n){var r=new Date(n);return isNaN(r.getTime())?Bj(e,t):ey(r)}))},function(e){return e.toISOString()});function Nd(e){var t=Object.create(Object.getPrototypeOf(e));return Object.assign(t,e),t}var Nf=new BU("DateFromNumber",function(e){return e instanceof Date},function(e,t){return ea(Pa.validate(e,t),fV(function(n){var r=new Date(n);return isNaN(r.getTime())?Bj(e,t):ey(r)}))},function(e){return e.getTime()});function Np(e,t,n){void 0===n&&(n=e.name);var r=Nd(e);return r.validate=t,r.decode=function(e){return t(e,WL(r))},r.name=n,r}var NA,Nh,Nm,Ng=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Ny=WQ(Pi,Nh=function(e){return Ng.test(e)},"UUID"),Nv=new BU("BooleanFromString",Pc.is,function(e,t){return ea(Pi.validate(e,t),fV(function(n){return"true"===n?ey(!0):"false"===n?ey(!1):Bj(e,t)}))},String);function Nx(e){switch(e._tag){case"InterfaceType":return e.props;case"ExactType":return Nx(e.type)}}var Nb=D7.fromProp(),NC=Dr("RegExp",function(e){return"[object RegExp]"===Object.prototype.toString.call(e)}),NS=new BU("DateFromUnixTime",function(e){return e instanceof Date},function(e,t){return ea(Wf.validate(e,t),fV(function(n){var r=new Date(1e3*n);return isNaN(r.getTime())?Bj(e,t):ey(r)}))},function(e){return Math.floor(e.getTime()/1e3)}),Nw=new BU("NumberFromString",Pa.is,function(e,t){return ea(Pi.validate(e,t),fV(function(n){var r=+n;return isNaN(r)||""===n.trim()?Bj(e,t):ey(r)}))},String),NI=new BU("IntFromString",Wf.is,function(e,t){return ea(Nw.validate(e,t),fV(function(n){return Wf.is(n)?ey(n):Bj(e,t)}))},Nw.encode),N_=WA("JsonArray",function(){return WO(NO)}),NT=WA("JsonRecord",function(){return Wb(Pi,NO)}),NO=WS([Pc,Pa,Pi,B9,N_,NT],"Json"),NR=new BU("JsonFromString",NO.is,function(e,t){try{return ey(JSON.parse(e))}catch{return Bj(e,t)}},function(e){return JSON.stringify(e)}),Nk=Pm("Left"),NE=Pm("Right"),NM=new BU("BigIntFromString",function(e){return"bigint"==typeof e},function(e,t){return ea(Pi.validate(e,t),fV(function(n){if(!De.is(n.trim()))return Bj(e,t);try{return ey(BigInt(n))}catch{return Bj(e,t)}}))},String),NF=new BU("BooleanFromNumber",Pc.is,function(e,t){return ea(Pa.validate(e,t),fL(function(e){return 0!==e}))},Number);let Nj=Object.freeze(Object.defineProperty({__proto__:null,BigIntFromString:NM,BooleanFromNumber:NF,BooleanFromString:Nv,DateFromISOString:Nc,DateFromNumber:Nf,DateFromUnixTime:NS,IntFromString:NI,Json:NO,JsonArray:N_,JsonFromString:NR,JsonRecord:NT,NonEmptyString:De,NumberFromString:Nw,UUID:Ny,clone:Nd,date:Di,either:function(e,t,n){return void 0===n&&(n="Either<"+e.name+", "+t.name+">"),WS([WR({_tag:Nk,left:e},"Left<"+e.name+">"),WR({_tag:NE,right:t},"Right<"+e.name+">")],n)},fromNewtype:function(e,t){return void 0===t&&(t="fromNewtype("+e.name+")"),new BU(t,function(t){return e.is(t)},function(t,n){return ea(e.validate(t,n),fL(Na.wrap))},function(t){return e.encode(Na.unwrap(t))})},fromNullable:function(e,t,n){return void 0===n&&(n="fromNullable("+e.name+")"),Np(e,function(n,r){return null==n?ey(t):e.validate(n,r)},n)},fromRefinement:Dr,getLenses:function(e){var t={};for(var n in Nx(e))t[n]=Nb(n);return t},mapOutput:W3,nonEmptyArray:Dt,option:Nl,optionFromNullable:function(e,t){return void 0===t&&(t="Option<"+e.name+">"),new BU(t,Nl(e).is,function(t,n){return null==t?ey(ep):ea(e.validate(t,n),fL(eA))},function(t){return dU(ea(t,cz(e.encode)))})},readonlyNonEmptyArray:function(e,t){return void 0===t&&(t="ReadonlyNonEmptyArray<"+e.name+">"),Dt(e,t)},readonlySetFromArray:function(e,t,n){return void 0===n&&(n="ReadonlySet<"+e.name+">"),Dn(e,t,n)},regexp:NC,setFromArray:Dn,withEncode:function(e,t,n){return void 0===n&&(n=e.name),new BU(n,e.is,e.validate,t)},withFallback:function(e,t,n){return void 0===n&&(n="withFallback("+e.name+")"),Np(e,function(n,r){return pd(function(){return ey(t)})(e.validate(n,r))},n)},withMessage:function(e,t){return Np(e,function(n,r){return f0(function(){return[{value:n,context:r,message:t(n,r),actual:n}]})(e.validate(n,r))})},withValidate:Np},Symbol.toStringTag,{value:"Module"})),NU=O(Nj),NK=O(W9);Object.defineProperty(W6,"__esModule",{value:!0}),W6.withCustomError=W6.addType=W6.isEmpty=W6.objectToMap=W6.grouped=W6.formatDate=W6.formatDateTime=W6.filterDouble=W6.refineType=W6.nullable=void 0;let NL=(0,B.__importStar)(WZ);W6.nullable=function(e){return NL.union([e,NL.null,NL.undefined])},W6.refineType=function(e,t,n){return new NL.Type(t,e.is,(t,r)=>(0,W5.pipe)(e.validate(t,r),LP.either.chain(e=>n(e)?NL.success(e):NL.failure(t,r))),e.encode)},W6.filterDouble=function(e){if(""===e)return null;let t=Number(e);return Number.isNaN(t)?null:t},W6.formatDateTime=function(e){return e.toISOString().replace(/\.\d{3}Z$/,"+0000")},W6.formatDate=function(e){return e.toISOString().replace(/T.*/,"")},W6.grouped=function(e,t){return e.reduce((e,n,r)=>(r%t==0?e.push([n]):e[Math.floor(r/t)].push(n),e),[])},W6.objectToMap=function(e){return new Map(Object.entries(e))},W6.isEmpty=function(e){for(let t in e)return!1;return!0},W6.addType=function(e,t){return(0,NK.mapOutput)(e,e=>({...e,__TYPE__:t}))},W6.withCustomError=function(e,t){return(0,NU.withValidate)(e,(n,r)=>LP.either.mapLeft(e=>e.find(e=>e.message)?e:[{value:n,context:r,message:t(n,r),actual:n}])(e.validate(n,r)))},Object.defineProperty(W2,"__esModule",{value:!0}),W2.WidgetKey=void 0;let NB=(0,B.__importStar)(WZ),NP=RegExp("^[^<>]+$");W2.WidgetKey=(0,W6.refineType)(NB.string,"WidgetKey",e=>0===e.length||NP.test(e)),Object.defineProperty(q1=WG,"__esModule",{value:!0}),(0,B.__exportStar)(W$,q1),(0,B.__exportStar)(W0,q1),(0,B.__exportStar)(W2,q1);var NW={},ND={},NN={},Nq={},NQ={};Object.defineProperty(NQ,"__esModule",{value:!0}),NQ.clone=void 0,NQ.clone=function(e){var t=Object.create(Object.getPrototypeOf(e));return Object.assign(t,e),t};var NV=T&&T.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Nz=T&&T.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),NY=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&NV(t,e,n);return Nz(t,e),t};Object.defineProperty(Nq,"__esModule",{value:!0}),Nq.withValidate=void 0;var NH=NY(WZ);Nq.withValidate=function(e,t,n){void 0===n&&(n=e.name);var r=NQ.clone(e);return r.validate=t,r.decode=function(e){return t(e,NH.getDefaultContext(r))},r.name=n,r};var NZ=T&&T.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),NJ=T&&T.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),NG=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&NZ(t,e,n);return NJ(t,e),t};Object.defineProperty(NN,"__esModule",{value:!0}),NN.withFallback=void 0;var N$=NG(WZ);NN.withFallback=function(e,t,n){return void 0===n&&(n="withFallback("+e.name+")"),Nq.withValidate(e,function(n,r){return LW.orElse(function(){return N$.success(t)})(e.validate(n,r))},n)};var NX={},N0={};Object.defineProperty(N0,"__esModule",{value:!0}),N0.EmptyArray=N0.EmptyObject=N0.Boolean=N0.NumberOrNull=N0.Number=N0.StringOrNull=N0.String=void 0;let N1=(0,B.__importStar)(WZ);N0.String=(0,W6.withCustomError)(N1.string,()=>"The value must be a string"),N0.StringOrNull=(0,W6.withCustomError)(N1.union([N1.string,N1.null]),()=>"The value must be a string or null"),N0.Number=(0,W6.withCustomError)(N1.number,()=>"The value must be a number"),N0.NumberOrNull=(0,W6.withCustomError)(N1.union([N1.number,N1.null]),()=>"The value must be a number or null"),N0.Boolean=(0,W6.withCustomError)(N1.boolean,()=>"The value must be a boolean"),N0.EmptyObject=N1.UnknownRecord.pipe(new N1.Type("emptyObject",e=>N1.UnknownRecord.is(e),(e,t)=>Object.keys(e).length>0?N1.failure(e,t,"The object is not empty."):N1.success({}),N1.identity)),N0.EmptyArray=new N1.Type("emptyArray",e=>N1.UnknownArray.is(e)&&0===e.length,(e,t)=>(0,Lq.pipe)(N1.UnknownArray.decode(e),LP.either.chain(n=>n.length>0?N1.failure(e,t,"The array is not empty."):N1.success([]))),()=>[]);var N2={};let N6=O(pF);var N5={};Object.defineProperty(N5,"__esModule",{value:!0});let N3=(0,B.__importStar)(WZ);N5.default=new N3.Type("dateFromStringOrNumber",e=>e instanceof Date,(e,t)=>(0,W5.pipe)(N3.union([N3.number,N3.string]).validate(e,t),(0,N6.chain)(n=>{let r=new Date(n);return isNaN(r.getTime())?N3.failure(e,t):N3.success(r)})),e=>e);var N9={};Object.defineProperty(N9,"__esModule",{value:!0});let N4=(0,B.__importStar)(WZ);N9.default=new N4.Type("dateFromTsMs",e=>e instanceof Date,(e,t)=>(0,W5.pipe)(N4.number.validate(e,t),(0,N6.chain)(n=>{let r=new Date(n);return isNaN(r.getTime())?N4.failure(e,t):N4.success(r)})),e=>e.getTime());var N7={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyArrayOrElse=e.EmptyObjectOrElse=e.NullOrElse=e.DefaultOrElse=void 0;let t=(0,B.__importStar)(WZ),n=e=>n=>new t.Type(`DefaultOrElse<${e.name}, ${n.name}>`,e=>null===e||n.is(e),(r,i)=>(0,LW.isRight)(e.validate(r,i))?t.success(null):n.validate(r,i),e=>e?n.encode(e):void 0);e.DefaultOrElse=n;let r=n=>(0,e.DefaultOrElse)(t.null)(n);e.NullOrElse=r;let i=t=>(0,e.DefaultOrElse)(N0.EmptyObject)(t);e.EmptyObjectOrElse=i;let o=t=>(0,e.DefaultOrElse)(N0.EmptyArray)(t);e.EmptyArrayOrElse=o}(N7);var N8={};Object.defineProperty(N8,"__esModule",{value:!0});let qe=(0,B.__importStar)(WZ);N8.default=new qe.Type("IntFromNumber",qe.Int.is,(e,t)=>(0,W5.pipe)(qe.number.validate(e,t),(0,N6.chain)(e=>qe.Int.is(e)?qe.success(e):qe.success(Math.round(e)))),qe.Int.encode);var qt={};Object.defineProperty(qt,"__esModule",{value:!0});let qn=(0,B.__importStar)(WZ),qr=/^([0-9]+)px$/;qt.default=new qn.Type("IntFromPixels",qn.Int.is,(e,t)=>(0,W5.pipe)(qn.string.validate(e,t),(0,N6.chain)(n=>{try{let r=n.match(qr);if(!r)return qn.failure(e,t);let i=parseInt(r[1]);return qn.success(i)}catch{return qn.failure(e,t)}})),String);var qi={};Object.defineProperty(qi,"__esModule",{value:!0});let qo=(0,B.__importStar)(WZ);qi.default=(0,W6.withCustomError)((0,W6.refineType)(qo.string,"nonEmptyString",e=>e.trim().length>0),()=>"The value must be a non-empty string");var qa={},qu={};Object.defineProperty(qu,"__esModule",{value:!0});let qs=(0,B.__importStar)(WZ);qu.default=(0,W6.nullable)(qs.string),Object.defineProperty(qa,"__esModule",{value:!0});let ql=(0,B.__importDefault)(qu);qa.default=new WZ.Type("nonEmptyStringOrNull",e=>"string"==typeof e||null===e,(e,t)=>(0,W5.pipe)(ql.default.validate(e,t),(0,N6.chain)(e=>"string"==typeof e&&e.length>0?(0,WZ.success)(e):(0,WZ.success)(null))),e=>e);var qc={};Object.defineProperty(qc,"__esModule",{value:!0});let qd=(0,B.__importStar)(WZ);qc.default=(0,W6.nullable)(qd.number);var qf={};Object.defineProperty(qf,"__esModule",{value:!0});let qp=(0,B.__importStar)(WZ);qf.default=(e,t,n)=>N0.Number.pipe(new qp.Type("numberInRange",e=>N0.Number.is(e),(r,i)=>r>t||r<e?qp.failure(r,i,`${n} must be a number between ${e} and ${t}`):qp.success(r),qp.identity));var qA={};Object.defineProperty(qA,"__esModule",{value:!0});let qh=(0,B.__importStar)(WZ);qA.default=new qh.Type("StringFromInt",qh.string.is,(e,t)=>(0,W5.pipe)(qh.boolean.validate(e,t),(0,N6.chain)(e=>qh.success(e.toString()))),e=>e);var qm={};Object.defineProperty(qm,"__esModule",{value:!0});let qg=(0,B.__importStar)(WZ);function qy(){var e,t;return QB||(QB=1,Object.defineProperty(e=NX,"__esModule",{value:!0}),e.StringOrNull=e.StringFromNumber=e.StringFromBoolean=e.NumberRange=e.NumberOrNull=e.NonEmptyStringOrNull=e.NonEmptyString=e.IntFromPixels=e.IntFromNumber=e.Function=e.DateFromTsMs=e.DateFromStringOrNumber=e.DateFromString=void 0,(0,B.__exportStar)(N0,e),t=function(){if(QL)return N2;QL=1,Object.defineProperty(N2,"__esModule",{value:!0});let e=(0,B.__importStar)(WZ),t=qy();return N2.default=new e.Type("dateFromString",e=>e instanceof Date,(n,r)=>(0,W5.pipe)(t.String.validate(n,r),(0,N6.chain)(t=>{let i=new Date(t);return isNaN(i.getTime())?e.failure(n,r):e.success(i)})),e=>e.toISOString()),N2}(),Object.defineProperty(e,"DateFromString",{enumerable:!0,get:function(){return(0,B.__importDefault)(t).default}}),Object.defineProperty(e,"DateFromStringOrNumber",{enumerable:!0,get:function(){return(0,B.__importDefault)(N5).default}}),Object.defineProperty(e,"DateFromTsMs",{enumerable:!0,get:function(){return(0,B.__importDefault)(N9).default}}),(0,B.__exportStar)(N7,e),e.Function=(0,B.__importStar)(W6),Object.defineProperty(e,"IntFromNumber",{enumerable:!0,get:function(){return(0,B.__importDefault)(N8).default}}),Object.defineProperty(e,"IntFromPixels",{enumerable:!0,get:function(){return(0,B.__importDefault)(qt).default}}),Object.defineProperty(e,"NonEmptyString",{enumerable:!0,get:function(){return(0,B.__importDefault)(qi).default}}),Object.defineProperty(e,"NonEmptyStringOrNull",{enumerable:!0,get:function(){return(0,B.__importDefault)(qa).default}}),Object.defineProperty(e,"NumberOrNull",{enumerable:!0,get:function(){return(0,B.__importDefault)(qc).default}}),Object.defineProperty(e,"NumberRange",{enumerable:!0,get:function(){return(0,B.__importDefault)(qf).default}}),Object.defineProperty(e,"StringFromBoolean",{enumerable:!0,get:function(){return(0,B.__importDefault)(qA).default}}),Object.defineProperty(e,"StringFromNumber",{enumerable:!0,get:function(){return(0,B.__importDefault)(qm).default}}),Object.defineProperty(e,"StringOrNull",{enumerable:!0,get:function(){return(0,B.__importDefault)(qu).default}})),NX}qm.default=new qg.Type("StringFromInt",qg.string.is,(e,t)=>(0,W5.pipe)(qg.number.validate(e,t),(0,N6.chain)(e=>qg.success(e.toString()))),e=>e);var qv={},qx={},qb={},qC={},qS={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BooleanField=e.BooleanConfig=e.BooleanFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.BooleanFieldType="Boolean",e.BooleanConfig=t.exact(t.partial({label:n.StringOrNull,default_value:t.boolean,placeholder_true:t.string,placeholder_false:t.string})),e.BooleanField=t.exact(t.intersection([t.type({type:t.literal(e.BooleanFieldType)}),t.partial({config:e.BooleanConfig})]))}(qS);var qw={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.ColorConfig=e.ColorFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.ColorFieldType="Color",e.ColorConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string})),e.Color=t.exact(t.intersection([t.type({type:t.literal(e.ColorFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.ColorConfig})]))}(qw);var qI={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Date=e.DateConfig=e.DateFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.DateFieldType="Date",e.DateConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,default:t.string})),e.Date=t.exact(t.intersection([t.type({type:t.literal(e.DateFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.DateConfig})]))}(qI);var q_={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Embed=e.EmbedConfig=e.EmbedFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.EmbedFieldType="Embed",e.EmbedConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,useAsTitle:t.boolean})),e.Embed=t.exact(t.intersection([t.type({type:t.literal(e.EmbedFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.EmbedConfig})]))}(q_);var qT={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPoint=e.GeoPointConfig=e.GeoPointFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.GeoPointFieldType="GeoPoint",e.GeoPointConfig=t.exact(t.partial({label:n.StringOrNull})),e.GeoPoint=t.exact(t.intersection([t.type({type:t.literal(e.GeoPointFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.GeoPointConfig})]))}(qT);var qO={},qR={},qk={},qE={},qM={};Object.defineProperty(qM,"__esModule",{value:!0}),qM.pipe=qM.pipeable=void 0,qM.pipeable=function(e){var t,n,r,i,o,a,u,s,l,c,d,f,p,A,h,m={};if("function"==typeof e.map){var g=function(t){return function(n){return e.map(n,t)}};m.map=g}if("function"==typeof e.contramap){var y=function(t){return function(n){return e.contramap(n,t)}};m.contramap=y}if("function"==typeof e.mapWithIndex){var v=function(t){return function(n){return e.mapWithIndex(n,t)}};m.mapWithIndex=v}if("function"==typeof e.ap){var x=function(t){return function(n){return e.ap(n,t)}},b=function(t){return function(n){return e.ap(e.map(n,function(e){return function(){return e}}),t)}};m.ap=x,m.apFirst=b,m.apSecond=function(t){return function(n){return e.ap(e.map(n,function(){return function(e){return e}}),t)}}}if("function"==typeof e.chain){var C=function(t){return function(n){return e.chain(n,t)}},S=function(t){return function(n){return e.chain(n,function(n){return e.map(t(n),function(){return n})})}},w=function(t){return e.chain(t,Lq.identity)};m.chain=C,m.chainFirst=S,m.flatten=w}if("function"==typeof e.bimap){var I=function(t,n){return function(r){return e.bimap(r,t,n)}},_=function(t){return function(n){return e.mapLeft(n,t)}};m.bimap=I,m.mapLeft=_}if("function"==typeof e.extend){var T=function(t){return function(n){return e.extend(n,t)}},O=function(t){return e.extend(t,Lq.identity)};m.extend=T,m.duplicate=O}if("function"==typeof e.reduce){var R=function(t,n){return function(r){return e.reduce(r,t,n)}},k=function(t){var n=e.foldMap(t);return function(e){return function(t){return n(t,e)}}},E=function(t,n){return function(r){return e.reduceRight(r,t,n)}};m.reduce=R,m.foldMap=k,m.reduceRight=E}if("function"==typeof e.reduceWithIndex){var M=function(t,n){return function(r){return e.reduceWithIndex(r,t,n)}},F=function(t){var n=e.foldMapWithIndex(t);return function(e){return function(t){return n(t,e)}}},j=function(t,n){return function(r){return e.reduceRightWithIndex(r,t,n)}};m.reduceWithIndex=M,m.foldMapWithIndex=F,m.reduceRightWithIndex=j}if("function"==typeof e.alt){var U=function(t){return function(n){return e.alt(n,t)}};m.alt=U}if("function"==typeof e.compact&&(m.compact=e.compact,m.separate=e.separate),"function"==typeof e.filter){var K=function(t){return function(n){return e.filter(n,t)}},L=function(t){return function(n){return e.filterMap(n,t)}},B=function(t){return function(n){return e.partition(n,t)}},P=function(t){return function(n){return e.partitionMap(n,t)}};m.filter=K,m.filterMap=L,m.partition=B,m.partitionMap=P}if("function"==typeof e.filterWithIndex){var W=function(t){return function(n){return e.filterWithIndex(n,t)}},D=function(t){return function(n){return e.filterMapWithIndex(n,t)}},N=function(t){return function(n){return e.partitionWithIndex(n,t)}},q=function(t){return function(n){return e.partitionMapWithIndex(n,t)}};m.filterWithIndex=W,m.filterMapWithIndex=D,m.partitionWithIndex=N,m.partitionMapWithIndex=q}if("function"==typeof e.promap){var Q=function(t,n){return function(r){return e.promap(r,t,n)}};m.promap=Q}if("function"==typeof e.compose){var V=function(t){return function(n){return e.compose(n,t)}};m.compose=V}if("function"==typeof e.throwError){var z=function(t){return function(n){return"None"===n._tag?e.throwError(t()):e.of(n.value)}},Y=function(t){return"Left"===t._tag?e.throwError(t.left):e.of(t.right)},H=function(t,n){return function(r){return t(r)?e.of(r):e.throwError(n(r))}},Z=function(t,n){return function(r){return e.chain(r,function(r){return t(r)?e.of(r):e.throwError(n(r))})}};m.fromOption=z,m.fromEither=Y,m.fromPredicate=H,m.filterOrElse=Z}return m},qM.pipe=Lq.pipe;var qF=T&&T.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),qj=T&&T.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),qU=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&qF(t,e,n);return qj(t,e),t};Object.defineProperty(qE,"__esModule",{value:!0}),qE.NumberFromString=void 0;var qK=qU(WZ);qE.NumberFromString=new qK.Type("NumberFromString",qK.number.is,function(e,t){return qM.pipe(qK.string.validate(e,t),LW.chain(function(n){var r=+n;return isNaN(r)||""===n.trim()?qK.failure(e,t):qK.success(r)}))},String);var qL=T&&T.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),qB=T&&T.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),qP=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&qL(t,e,n);return qB(t,e),t};Object.defineProperty(qk,"__esModule",{value:!0}),qk.IntFromString=void 0;var qW=qP(WZ);qk.IntFromString=new qW.Type("IntFromString",qW.Int.is,function(e,t){return qM.pipe(qE.NumberFromString.validate(e,t),LW.chain(function(n){return qW.Int.is(n)?qW.success(n):qW.failure(e,t)}))},qE.NumberFromString.encode),Object.defineProperty(qR,"__esModule",{value:!0});let qD=(0,B.__importStar)(WZ),qN=qy(),qq=new qD.Type("SideConstraints",e=>!e||"number"==typeof e,(e,t)=>LW.either.chain(qD.union([qD.literal("auto"),qD.literal(""),qD.Int,qk.IntFromString,qN.IntFromNumber,qN.IntFromPixels,qD.null]).validate(e,t),e=>"auto"===e||""===e?qD.success(null):qD.success(e)),e=>e),qQ=qD.partial({width:qq,height:qq});qR.default=qQ,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Image=e.ImageConfig=e.Thumbnail=e.ImageFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy(),r=(0,B.__importDefault)(qR);e.ImageFieldType="Image",e.Thumbnail=t.exact(t.intersection([t.type({name:t.string}),r.default])),e.ImageConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,constraint:r.default,thumbnails:t.readonlyArray(e.Thumbnail)})),e.Image=t.exact(t.intersection([t.type({type:t.literal(e.ImageFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.ImageConfig})]))}(qO);var qV={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrationField=e.IntegrationFieldConfig=e.IntegrationFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.IntegrationFieldType="IntegrationFields",e.IntegrationFieldConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,catalog:t.string})),e.IntegrationField=t.exact(t.intersection([t.type({type:t.literal(e.IntegrationFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.IntegrationFieldConfig})]))}(qV);var qz={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Link=e.LinkConfig=e.LinkFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy(),r=e=>{if(e instanceof Array&&e.reduce((e,t)=>e&&"string"==typeof t,!0))return t.success(e)},i=e=>{if("string"==typeof e)return t.success([e])},o=new t.Type("MasksArrayString",e=>e instanceof Array,(e,n)=>LW.either.chain(t.union([t.array(t.string),t.string]).validate(e,n),o=>r(o)||i(o)||t.failure(e,n)),e=>e);e.LinkFieldType="Link",e.LinkConfig=t.exact(t.partial({label:n.StringOrNull,useAsTitle:t.boolean,placeholder:t.string,select:(0,NN.withFallback)(t.union([t.literal("media"),t.literal("document"),t.literal("web"),t.null]),null),customtypes:t.readonlyArray(t.string),masks:o,tags:o,allowTargetBlank:t.boolean})),e.Link=t.exact(t.intersection([t.type({type:t.literal(e.LinkFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.LinkConfig})]))}(qz);var qY={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Number=e.NumberConfig=e.NumberFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.NumberFieldType="Number",e.NumberConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,min:t.union([t.number,qE.NumberFromString]),max:t.union([t.number,qE.NumberFromString]),step:t.union([t.number,qE.NumberFromString])})),e.Number=t.exact(t.intersection([t.type({type:t.literal(e.NumberFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.NumberConfig})]))}(qY);var qH={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Range=e.RangeConfig=e.RangeFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.RangeFieldType="Range",e.RangeConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,min:t.union([t.number,qE.NumberFromString]),max:t.union([t.number,qE.NumberFromString]),step:t.union([t.number,qE.NumberFromString])})),e.Range=t.exact(t.intersection([t.type({type:t.literal(e.RangeFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.RangeConfig})]))}(qH);var qZ={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RichText=e.RichTextConfig=e.RichTextNodeTypeCodec=e.RichTextNodeType=e.DEFAULT_OPTION=e.RichTextFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy(),r=(0,B.__importDefault)(qR);e.RichTextFieldType="StructuredText",e.DEFAULT_OPTION="paragraph",e.RichTextNodeType={heading1:"heading1",heading2:"heading2",heading3:"heading3",heading4:"heading4",heading5:"heading5",heading6:"heading6",paragraph:"paragraph",strong:"strong",em:"em",preformatted:"preformatted",hyperlink:"hyperlink",image:"image",embed:"embed",list:"list-item",orderedList:"o-list-item",rtl:"rtl"},e.RichTextNodeTypeCodec=t.keyof({[e.RichTextNodeType.heading1]:null,[e.RichTextNodeType.heading2]:null,[e.RichTextNodeType.heading3]:null,[e.RichTextNodeType.heading4]:null,[e.RichTextNodeType.heading5]:null,[e.RichTextNodeType.heading6]:null,[e.RichTextNodeType.paragraph]:null,[e.RichTextNodeType.strong]:null,[e.RichTextNodeType.em]:null,[e.RichTextNodeType.preformatted]:null,[e.RichTextNodeType.hyperlink]:null,[e.RichTextNodeType.image]:null,[e.RichTextNodeType.embed]:null,[e.RichTextNodeType.list]:null,[e.RichTextNodeType.orderedList]:null,[e.RichTextNodeType.rtl]:null});let i=new t.Type("RichTextOptions",e=>"string"==typeof e,n=>(0,Lq.pipe)(t.union([t.string,t.null]).decode(n),LP.either.map(t=>{if(!t)return e.DEFAULT_OPTION;let n=t.split(",").map(e=>e.trim()).filter(t=>(0,LW.getOrElseW)(()=>{})(e.RichTextNodeTypeCodec.decode(t)));return n.length?n.join(","):e.DEFAULT_OPTION})),e=>e),o=e=>{if(!e)return t.success([])},a=e=>{if(e instanceof Object){if(!Object.entries(e).length)return t.success([]);if(e[""])return t.success(e[""].map(e=>e.name));let n=Object.entries(e).reduce((e,[,t])=>e.concat(t.map(e=>e.name)),[]).filter(Boolean);return t.success(n)}},u=e=>{if(e instanceof Array&&e.reduce((e,t)=>e&&"string"==typeof t,!0))return t.success(e)},s=e=>{if("string"==typeof e)return t.success([e])},l=new t.Type("RichTextLabels",e=>e instanceof Array,(e,n)=>{let r=t.record(t.string,t.readonlyArray(t.record(t.literal("name"),t.string))),i=t.readonlyArray(t.string);return(0,Lq.pipe)(t.union([r,i,t.string,t.null]).decode(e),LP.either.chain(r=>o(r)||u(r)||a(r)||s(r)||t.failure(e,n)))},e=>e);e.RichTextConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,useAsTitle:t.boolean,single:i,multi:i,imageConstraint:r.default,labels:l,allowTargetBlank:t.boolean})),e.RichText=t.exact(t.intersection([t.type({type:t.literal(e.RichTextFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.RichTextConfig})]))}(qZ);var qJ={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Select=e.SelectConfig=e.SelectFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.SelectFieldType="Select",e.SelectConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,default_value:t.string,options:t.readonlyArray(t.union([t.string,n.StringFromNumber,n.StringFromBoolean]))})),e.Select=t.exact(t.intersection([t.type({type:t.literal(e.SelectFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.SelectConfig})]))}(qJ);var qG={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Separator=e.SeparatorConfig=e.SeparatorFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.SeparatorFieldType="Separator",e.SeparatorConfig=t.exact(t.partial({label:n.StringOrNull})),e.Separator=t.exact(t.intersection([t.type({type:t.literal(e.SeparatorFieldType)}),t.partial({config:e.SeparatorConfig})]))}(qG);var q$={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Text=e.TextConfig=e.TextFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.TextFieldType="Text",e.TextConfig=t.exact(t.partial({label:n.StringOrNull,useAsTitle:t.boolean,placeholder:t.string})),e.Text=t.exact(t.intersection([t.type({type:t.literal(e.TextFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.TextConfig})]))}(q$);var qX={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Timestamp=e.TimestampConfig=e.TimestampFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.TimestampFieldType="Timestamp",e.TimestampConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,default:t.string})),e.Timestamp=t.exact(t.intersection([t.type({type:t.literal(e.TimestampFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.TimestampConfig})]))}(qX),Object.defineProperty(qC,"__esModule",{value:!0}),qC.NestableWidget=void 0;let q0=(0,B.__importStar)(WZ);qC.NestableWidget=q0.union([qw.Color,qS.BooleanField,q_.Embed,qT.GeoPoint,qI.Date,qY.Number,qH.Range,qZ.RichText,qJ.Select,qG.Separator,q$.Text,qX.Timestamp,qz.Link,qO.Image,qV.IntegrationField]),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Group=e.GroupConfig=e.GroupFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.GroupFieldType="Group",e.GroupConfig=t.exact(t.partial({label:n.StringOrNull,repeat:t.boolean,fields:t.record(WG.WidgetKey,qC.NestableWidget)})),e.Group=t.exact(t.intersection([t.type({type:t.literal(e.GroupFieldType)}),t.partial({fieldset:n.StringOrNull,icon:t.string,description:t.string,config:e.GroupConfig})]))}(qb);var q1,q2,q6={};Object.defineProperty(q6,"__esModule",{value:!0}),(0,B.__exportStar)(qS,q6),(0,B.__exportStar)(qw,q6),(0,B.__exportStar)(qI,q6),(0,B.__exportStar)(q_,q6),(0,B.__exportStar)(qT,q6),(0,B.__exportStar)(qO,q6),(0,B.__exportStar)(qV,q6),(0,B.__exportStar)(qz,q6),(0,B.__exportStar)(qC,q6),(0,B.__exportStar)(qY,q6),(0,B.__exportStar)(qH,q6),(0,B.__exportStar)(qZ,q6),(0,B.__exportStar)(qJ,q6),(0,B.__exportStar)(qG,q6),(0,B.__exportStar)(q$,q6),(0,B.__exportStar)(qX,q6);var q5={},q3={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isCompositeSlice=e.CompositeSlice=e.CompositeSliceConfig=e.CompositeSliceType=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.CompositeSliceType="Slice",e.CompositeSliceConfig=t.exact(t.partial({label:n.StringOrNull})),e.CompositeSlice=t.exact(t.intersection([t.type({type:t.literal(e.CompositeSliceType)}),t.partial({fieldset:n.StringOrNull,description:t.string,icon:t.string,display:t.string,"non-repeat":t.record(WG.WidgetKey,qC.NestableWidget),repeat:t.record(WG.WidgetKey,qC.NestableWidget),config:e.CompositeSliceConfig})])),e.isCompositeSlice=function(e){return"Slice"===e.type}}(q3);var q9={};Object.defineProperty(q9,"__esModule",{value:!0}),q9.isLegacySlice=q9.LegacySlice=void 0;let q4=(0,B.__importStar)(WZ);q9.LegacySlice=q4.union([qC.NestableWidget,qb.Group]),q9.isLegacySlice=function(e){return"Slice"!==e.type&&"SharedSlice"!==e.type};var q7={},q8={};Object.defineProperty(q8,"__esModule",{value:!0}),q8.isSlicePrimaryWidget=q8.SlicePrimaryWidget=void 0;let Qe=(0,B.__importStar)(WZ);q8.SlicePrimaryWidget=Qe.union([q6.NestableWidget,qb.Group]);let Qt=e=>q6.NestableWidget.is(e)||qb.Group.is(e);q8.isSlicePrimaryWidget=Qt,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isDynamicSharedSlice=e.isStaticSharedSlice=e.SharedSlice=e.SharedSliceType=e.Variation=void 0;let t=(0,B.__importStar)(WZ);e.Variation=t.exact(t.intersection([t.type({id:t.string,name:t.string,description:t.string,imageUrl:(0,NN.withFallback)(t.string,"https://images.prismic.io/slice-machine/621a5ec4-0387-4bc5-9860-2dd46cbc07cd_default_ss.png?auto=compress,format"),docURL:t.string,version:t.string}),t.partial({display:t.string,primary:t.record(WG.WidgetKey,q8.SlicePrimaryWidget),items:t.record(WG.WidgetKey,qC.NestableWidget)})])),e.SharedSliceType="SharedSlice";let n=t.string,r=t.string;e.SharedSlice=t.exact(t.intersection([t.type({id:t.string,type:t.literal(e.SharedSliceType),name:t.string,variations:t.readonlyArray(e.Variation)}),t.partial({description:t.string,legacyPaths:t.record(n,r)})])),e.isStaticSharedSlice=function(e){return"SharedSlice"===e.type},e.isDynamicSharedSlice=function(e){return"SharedSlice"===e.type}}(q7);var Qn={};Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.SharedSliceRef=void 0;let Qr=(0,B.__importStar)(WZ);Qn.SharedSliceRef=Qr.exact(Qr.type({type:Qr.literal(q7.SharedSliceType)})),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Slices=e.DynamicSlices=e.StaticSlices=e.slicesReader=e.DynamicSlicesConfig=e.StaticSlicesConfig=e.slicesConfigReader=e.SlicesLabels=e.SlicesFieldType=e.LegacySlicesFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy();function r(r){return t.exact(t.partial({label:n.StringOrNull,labels:e.SlicesLabels,choices:t.record(WG.WidgetKey,t.union([q9.LegacySlice,q3.CompositeSlice,r]))}))}e.LegacySlicesFieldType="Choice",e.SlicesFieldType="Slices",e.SlicesLabels=t.union([t.record(t.string,t.readonlyArray(t.exact(t.intersection([t.type({name:t.string}),t.partial({display:t.string})])))),t.null]),e.slicesConfigReader=r,e.StaticSlicesConfig=r(q7.SharedSlice),e.DynamicSlicesConfig=r(Qn.SharedSliceRef);let i={toStatic(e,t){let n=Object.entries(e.choices||{}).reduce((e,[n,r])=>{if("SharedSlice"!==r.type)return{...e,[n]:r};{let i=t.get(n);return i?{...e,[n]:i}:e}},{});return{...e,choices:n}}};function o(r){return t.exact(t.intersection([t.type({type:t.keyof({[e.SlicesFieldType]:null,[e.LegacySlicesFieldType]:null})}),t.partial({fieldset:n.StringOrNull,config:r})]))}e.slicesReader=o,e.StaticSlices=o(e.StaticSlicesConfig),e.DynamicSlices=o(e.DynamicSlicesConfig),e.Slices={toStatic:(e,t)=>e.config?{...e,config:i.toStatic(e.config,t)}:e}}(q5);var Qi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UID=e.UIDConfig=e.UIDFieldType=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.UIDFieldType="UID",e.UIDConfig=t.exact(t.partial({label:n.StringOrNull,useAsTitle:t.boolean,placeholder:t.string})),e.UID=t.exact(t.intersection([t.type({type:t.literal(e.UIDFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.UIDConfig})]))}(Qi),Object.defineProperty(qx,"__esModule",{value:!0}),qx.Widgets=qx.FieldType=qx.DynamicWidget=qx.StaticWidget=qx.widgetReader=void 0;let Qo=(0,B.__importStar)(WZ);function Qa(e){return Qo.union([Qi.UID,qC.NestableWidget,qb.Group,e])}qx.widgetReader=Qa,qx.StaticWidget=Qa(q5.StaticSlices),qx.DynamicWidget=Qa(q5.DynamicSlices),qx.FieldType=Qo.keyof({[q6.ColorFieldType]:null,[q6.BooleanFieldType]:null,[q6.NumberFieldType]:null,[q6.EmbedFieldType]:null,[q6.GeoPointFieldType]:null,[q6.DateFieldType]:null,[q6.RangeFieldType]:null,[q6.RichTextFieldType]:null,[q6.SelectFieldType]:null,[q6.SeparatorFieldType]:null,[q6.TextFieldType]:null,[q6.TimestampFieldType]:null,[q6.LinkFieldType]:null,[q6.ImageFieldType]:null,[q6.IntegrationFieldType]:null,[Qi.UIDFieldType]:null,[qb.GroupFieldType]:null,[q5.SlicesFieldType]:null,[q5.LegacySlicesFieldType]:null}),qx.Widgets={toStatic(e,t){switch(e.type){case"Choice":case"Slices":return q5.Slices.toStatic(e,t);default:return e}}},Object.defineProperty(qv,"__esModule",{value:!0}),qv.Sections=qv.DynamicSection=qv.StaticSection=qv.sectionReader=void 0;let Qu=(0,B.__importStar)(WZ);function Qs(e){return Qu.record(WG.WidgetKey,e)}qv.sectionReader=Qs,qv.StaticSection=Qs(qx.StaticWidget),qv.DynamicSection=Qs(qx.DynamicWidget),qv.Sections={toStatic:(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:qx.Widgets.toStatic(r,t)}),{})},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.collectSharedSlices=e.flattenCustomTypeFields=e.filterMissingSharedSlices=e.collectWidgets=e.validateSlices=e.toStatic=e.flattenSections=e.flattenWidgets=e.CustomType=e.StaticCustomType=e.CustomTypeFormat=void 0;let t=(0,B.__importStar)(WZ),n=qy();e.CustomTypeFormat={page:"page",custom:"custom"};class r extends Error{constructor(e){super(),Object.defineProperty(this,"slices",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"message",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.slices=e,this.message=this._formatError(e)}_formatError(e){return`The following slices doesn't exists in your Prismic repository:
3
+ ${e.map(e=>` - ${e}`).join(`
4
+ `)}
5
+ `}}function i(r){return t.exact(t.intersection([t.type({id:t.string,label:n.StringOrNull,repeatable:(0,NN.withFallback)(t.boolean,!0),json:t.record(t.string,r),status:(0,NN.withFallback)(t.boolean,!0)}),t.partial({hash:t.string,format:(0,NN.withFallback)(t.keyof(e.CustomTypeFormat),"custom")})]))}function o(e){return Object.entries(e.json).reduce((e,[,t])=>{let n=Object.entries(t);return e.concat(n)},[])}function a(e,t){let n=Object.entries(e.json).reduce((e,[n,r])=>{let i=Object.entries(r).reduce((e,[n,r])=>{let i=t(n,r);return i?{...e,[n]:i}:e},{});return{...e,[n]:i}},{});return{...e,json:n}}e.StaticCustomType=i(qv.StaticSection),e.CustomType=i(qv.DynamicSection),e.flattenWidgets=o,e.flattenSections=function(e){return Object.entries(e.json).reduce((e,[,t])=>{let n=Object.entries(t);return e.concat(n)},[])},e.toStatic=function(e,t){let n=Object.entries(e.json).reduce((e,[n,r])=>({...e,[n]:qv.Sections.toStatic(r,t)}),{});return{...e,json:n}},e.validateSlices=function(e,t){let n=(function(e){var t;let n=o(e).filter(([,e])=>"Slices"===e.type).reduce((e,[,t])=>{let n=Object.entries(t.config&&t.config.choices?t.config.choices:{}).filter(([,e])=>"SharedSlice"===e.type).map(([e])=>e);return e.concat(n)},[]);return function(e){return n.map(e)}})(e)(e=>{if(!t.get(e))return e}).filter(Boolean);return n.length>0?(0,LW.left)(new r(n)):(0,LW.right)(e)},e.collectWidgets=a,e.filterMissingSharedSlices=function(e,t){return a(e,(e,n)=>{if("Slices"===n.type){if(!n.config||!n.config.choices)return n;let r=Object.entries(n.config.choices).reduce((e,[n,r])=>"SharedSlice"!==r.type||t.get(n)?{...e,[n]:r}:e,{}),i={...n.config,choices:r};return{...n,config:i}}return n})},e.flattenCustomTypeFields=function(e){return Object.values(e.json).reduce((e,t)=>({...e,...t}),{})},e.collectSharedSlices=function(e){return Object.entries(e.fields).reduce((e,[,t])=>{var n;return"Slices"===t.type||"Choice"===t.type?{...e,...Object.entries((null===(n=t.config)||void 0===n?void 0:n.choices)||{}).reduce((e,[t,n])=>"SharedSlice"===n.type?{...e,[t]:n}:e,{})}:e},{})}}(ND);var Ql,Qc,Qd={},Qf={};Object.defineProperty(Ql=Qf,"__esModule",{value:!0}),Ql.DiffOperation=void 0,(Qc=Ql.DiffOperation||(Ql.DiffOperation={})).Added="added",Qc.Removed="removed",Qc.Updated="updated";var Qp={},QA={},Qh={};Object.defineProperty(Qh,"__esModule",{value:!0}),Qh.HexaColor=void 0;let Qm=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;Qh.HexaColor={is:e=>Qm.test(e)};var Qg={};Object.defineProperty(Qg,"__esModule",{value:!0}),Qg.toRecord=void 0,Qg.toRecord=function(e,t){return e.reduce((e,n)=>{let r=t(n);return{...e,[r]:n}},{})};var Qy={};Object.defineProperty(Qy,"__esModule",{value:!0}),Qy.mapValues=Qy.isObject=Qy.withOptionals=Qy.isNotEmpty=Qy.zipObjects=void 0;let Qv=(0,B.__importStar)(WZ);Qy.zipObjects=function(e,t){return[...new Set(Object.keys(e||{}).concat(Object.keys(t||{})))].reduce((n,r)=>{let i=null==e?void 0:e[r],o=null==t?void 0:t[r];return{...n,[r]:{left:i,right:o}}},{})},Qy.isNotEmpty=function(e){return!!Object.keys(e).length},Qy.withOptionals=function(e,t){return{...e,...t.reduce((e,[t,n])=>n?{...e,[t]:n}:e,{})}};let Qx=Qv.record(Qv.string,Qv.unknown);Qy.isObject=function(e){return(0,LW.isRight)(Qx.decode(e))},Qy.mapValues=function(e,t){return Object.entries(e).reduce((e,[n,r])=>({...e,[n]:t(r,n)}),{})},Object.defineProperty(QA,"__esModule",{value:!0}),QA.Objects=QA.Arrays=QA.HexaColorCode=void 0,QA.HexaColorCode=(0,B.__importStar)(Qh),QA.Arrays=(0,B.__importStar)(Qg),QA.Objects=(0,B.__importStar)(Qy);var Qb={};function QC(e,t){let n=QA.Objects.zipObjects(e,t),r=Object.entries(n).reduce((e,[t,n])=>{if(JSON.stringify(null==n?void 0:n.left)===JSON.stringify(null==n?void 0:n.right))return e;let r=(()=>{var e,t,r,i,o,a,u;if(!(!(null!=n&&n.left)&&!(null!=n&&n.right))){if(null!=n&&n.left&&!n.right)return{op:Qf.DiffOperation.Removed};if(!(null!=n&&n.left)&&null!=n&&n.right){if((null===(e=n.right)||void 0===e?void 0:e.type)===qb.GroupFieldType){let s={...n.right,config:{...n.right.config,fields:{}}};return s.config.fields=QC(void 0,null===(t=n.right.config)||void 0===t?void 0:t.fields)||{},{op:Qf.DiffOperation.Added,value:s}}return{op:Qf.DiffOperation.Added,value:n.right}}if((null===(r=n.right)||void 0===r?void 0:r.type)===qb.GroupFieldType){let l={...n.right,config:{...n.right.config,fields:{}}};return l.config.fields=QC((null===(i=n.left)||void 0===i?void 0:i.type)===qb.GroupFieldType?null===(a=null===(o=n.left)||void 0===o?void 0:o.config)||void 0===a?void 0:a.fields:void 0,null===(u=n.right.config)||void 0===u?void 0:u.fields)||{},{op:Qf.DiffOperation.Updated,value:l}}return{op:Qf.DiffOperation.Updated,value:n.right}}})();return r?{...e,[t]:r}:e},{});return QA.Objects.isNotEmpty(r)?r:void 0}Object.defineProperty(Qb,"__esModule",{value:!0}),Qb.VariationComparator=void 0,Qb.VariationComparator={compare(e,t){if(e&&!t)return{op:Qf.DiffOperation.Removed};if(!e&&t)return{op:Qf.DiffOperation.Added,value:t};let n=function(e,t){let n=QA.Objects.zipObjects(e,t);return Object.entries(n).reduce((e,[t,n])=>"primary"===t||"items"===t||(null==n?void 0:n.left)===(null==n?void 0:n.right)?e:{...e,[t]:null==n?void 0:n.right},{})}(e,t),r=QC(null==e?void 0:e.primary,null==t?void 0:t.primary),i=QC(null==e?void 0:e.items,null==t?void 0:t.items),o={...n,...r?{primary:r}:{},...i?{items:i}:{}};if(QA.Objects.isNotEmpty(o))return{op:Qf.DiffOperation.Updated,value:o}}},Object.defineProperty(Qp,"__esModule",{value:!0}),Qp.SliceComparator=void 0,Qp.SliceComparator={compare(e,t){if(!e&&t)return{op:Qf.DiffOperation.Added,value:t};if(e&&!t)return{op:Qf.DiffOperation.Removed};let n=function(e,t){let n=QA.Objects.zipObjects(e,t);return Object.entries(n).reduce((e,[t,n])=>"variations"===t||(null==n?void 0:n.left)===(null==n?void 0:n.right)?e:{...e,[t]:null==n?void 0:n.right},{})}(e,t),r=QA.Objects.zipObjects(e&&QA.Arrays.toRecord(e.variations,e=>e.id),t&&QA.Arrays.toRecord(t.variations,e=>e.id)),i=Object.entries(r).reduce((e,[t,n])=>{if(!n)return e;let r=Qb.VariationComparator.compare(n.left,n.right);return r?{...e,[t]:r}:e},{}),o={...n,...QA.Objects.isNotEmpty(i)?{variations:i}:{}};if(QA.Objects.isNotEmpty(o))return{op:Qf.DiffOperation.Updated,value:o}}};var QS,Qw={};Object.defineProperty(Qw,"__esModule",{value:!0}),Object.defineProperty(Qd,"__esModule",{value:!0}),(0,B.__exportStar)(Qf,Qd),(0,B.__exportStar)(Qp,Qd),(0,B.__exportStar)(Qb,Qd),(0,B.__exportStar)(Qw,Qd);var QI,Q_,QT={},QO={};QI=QO,Q_=T&&T.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(QI,"__esModule",{value:!0}),QI.ImageConstraint=void 0,Object.defineProperty(QI,"ImageConstraint",{enumerable:!0,get:function(){return Q_(qR).default}});var QR={},Qk={};Object.defineProperty(Qk,"__esModule",{value:!0});var QE={};Object.defineProperty(QE,"__esModule",{value:!0}),QE.SlicesTypes=void 0;let QM=(0,B.__importStar)(WZ);QE.SlicesTypes=QM.keyof({[q3.CompositeSliceType]:null,[q7.SharedSliceType]:null}),Object.defineProperty(QF=QR,"__esModule",{value:!0}),(0,B.__exportStar)(q3,QF),(0,B.__exportStar)(q9,QF),(0,B.__exportStar)(q7,QF),(0,B.__exportStar)(Qn,QF),(0,B.__exportStar)(Qk,QF),(0,B.__exportStar)(q8,QF),(0,B.__exportStar)(q5,QF),(0,B.__exportStar)(QE,QF),Object.defineProperty(Qj=QT,"__esModule",{value:!0}),(0,B.__exportStar)(qb,Qj),(0,B.__exportStar)(q6,Qj),(0,B.__exportStar)(QO,Qj),(0,B.__exportStar)(QR,Qj),(0,B.__exportStar)(Qi,Qj),(0,B.__exportStar)(qx,Qj),Object.defineProperty(QU=NW,"__esModule",{value:!0}),(0,B.__exportStar)(ND,QU),(0,B.__exportStar)(Qd,QU),(0,B.__exportStar)(qv,QU),(0,B.__exportStar)(QT,QU);var QF,Qj,QU,QK,QL,QB,QP,QW={},QD={},QN={};function Qq(){if(QP)return QN;QP=1,Object.defineProperty(QN,"__esModule",{value:!0}),QN.hasContentType=QN.hasFieldContentType=void 0;let e=zg();function t(e){return"object"==typeof e&&null!==e&&"__TYPE__"in e}return QN.hasFieldContentType=function(n){return t(n)&&n.__TYPE__===e.FieldContentType&&(null==n?void 0:n.type)!==void 0&&"string"==typeof n.type&&(0,LW.isRight)(e.FieldType.decode(n.type))},QN.hasContentType=t,QN}function QQ(){return QZ||(QZ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyContent=e.EmptyLegacy=e.isEmptyContent=e.EmptyContentType=void 0;let t=(0,B.__importStar)(WZ),n=Qq();e.EmptyContentType="EmptyContent";let r=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.EmptyContentType;e.isEmptyContent=r;let i=t.union([t.null,t.type({value:t.null})]),o=n=>new t.Type("EmptyLegacy",e.isEmptyContent,t=>(0,Lq.pipe)(i.decode(t),LP.either.map(()=>({type:n,__TYPE__:e.EmptyContentType}))),()=>null);e.EmptyLegacy=o,e.EmptyContent=t.strict({type:t.string,__TYPE__:t.literal(e.EmptyContentType)})}(QD)),QD}var QV={},Qz={};Object.defineProperty(Qz,"__esModule",{value:!0}),Qz.defaultCtx=Qz.getFieldCtx=Qz.LegacyContentCtx=Qz.FieldOrSliceType=void 0;let QY=(0,B.__importStar)(WZ);Qz.FieldOrSliceType=QY.union([QT.FieldType,QT.SlicesTypes]);class QH{constructor(e,t,n){Object.defineProperty(this,"fieldKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"prefixedKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"keyOfType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fieldPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fieldType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fieldKey=e,this.fieldPath=t||[],this.allTypes=n||new Map;let r=Array.of(this.fieldPath,[this.fieldKey]).flat().join(".");this.prefixedKey=r,this.keyOfType=`${r}_TYPE`,this.fieldType=this.allTypes.get(this.prefixedKey)}}Qz.LegacyContentCtx=QH,Qz.getFieldCtx=function(e,t,n){return new QH(e,[...t.fieldPath,t.fieldKey,...n||[]],t.allTypes)},Qz.defaultCtx=function(e,t=new Map){return new QH(e,[],t)};var QZ,QJ,QG={},Q$={};function QX(){return QJ||(QJ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BooleanContentDefaultValue=e.BooleanContent=e.BooleanLegacy=e.isBooleanContent=e.BooleanContentType=void 0;let t=(0,B.__importStar)(WZ),n=Qq();e.BooleanContentType="BooleanContent";let r=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.BooleanContentType;e.isBooleanContent=r;let i=n=>new t.Type("BooleanLegacy",e.isBooleanContent,n=>(0,Lq.pipe)(t.boolean.decode(n),LP.either.map(t=>e.BooleanContent.encode({value:t,__TYPE__:e.BooleanContentType}))),e=>({content:e.value,types:{[n.keyOfType]:"Boolean"}}));e.BooleanLegacy=i,e.BooleanContent=t.strict({__TYPE__:t.literal(e.BooleanContentType),value:t.boolean});let o=t=>{var n;return(null===(n=t.config)||void 0===n?void 0:n.default_value)!==void 0?{__TYPE__:e.BooleanContentType,value:t.config.default_value||!1}:void 0};e.BooleanContentDefaultValue=o}(Q$)),Q$}var Q0,Q1={};function Q2(){return Q0||(Q0=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmbedContent=e.EmbedLegacy=e.EmbedContentLegacy=e.isEmbedContent=e.EmbedContentType=void 0;let t=(0,B.__importStar)(WZ),n=qy(),r=Qq();e.EmbedContentType="EmbedContent";let i=t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.EmbedContentType;e.isEmbedContent=i,e.EmbedContentLegacy=t.exact(t.intersection([t.type({embed_url:t.string,type:t.string}),t.partial({version:t.union([t.string,t.number,t.null]),title:n.StringOrNull,author_name:n.StringOrNull,author_url:n.StringOrNull,provider_name:n.StringOrNull,provider_url:n.StringOrNull,cache_age:t.union([t.string,t.number,t.null]),thumbnail_url:n.StringOrNull,thumbnail_width:n.NumberOrNull,thumbnail_height:n.NumberOrNull,html:n.StringOrNull})]));let o=n=>new t.Type("EmbedLegacy",e.isEmbedContent,t=>(0,Lq.pipe)(e.EmbedContentLegacy.decode(t),LP.either.map(n=>({...n,all:t,__TYPE__:e.EmbedContentType}))),e=>({content:e.all,types:{[n.keyOfType]:"Embed"}}));e.EmbedLegacy=o,e.EmbedContent=t.intersection([e.EmbedContentLegacy,t.strict({__TYPE__:t.literal(e.EmbedContentType),all:t.unknown})])}(Q1)),Q1}var Q6={},Q5={},Q3={};Object.defineProperty(Q3,"__esModule",{value:!0});let Q9=(0,B.__importStar)(WZ);Q3.default=new Q9.Type("TrimmedString",Q9.string.is,(e,t)=>(0,W5.pipe)(Q9.string.validate(e,t),(0,N6.chain)(e=>Q9.success(function(e){let t=0;for(;t<e.length&&e[t]<=" ";)t++;let n=e.length;for(;t<n&&e[n-1]<=" ";)n--;return e.substring(t,n)}(e)))),e=>e);var Q4={};function Q7(){return Q8||(Q8=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContent=e.ColorLegacy=e.isColorContent=void 0;let t=(0,B.__importStar)(WZ),n=(0,B.__importDefault)(Q3),r=Qq(),i=e=>(0,r.hasContentType)(e)&&e.__TYPE__===Q4.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Color"===e.type;e.isColorContent=i;let o=r=>new t.Type("ColorLegacy",e.isColorContent,t=>(0,Lq.pipe)(n.default.decode(t),LP.either.map(t=>e.ColorContent.encode({value:t,type:QT.ColorFieldType,__TYPE__:Q4.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:QT.ColorFieldType}}));e.ColorLegacy=o,e.ColorContent=t.strict({type:t.literal(QT.ColorFieldType),value:n.default,__TYPE__:t.literal(Q4.FieldContentType)})}(Q5)),Q5}Object.defineProperty(Q4,"__esModule",{value:!0}),Q4.FieldContentType=void 0,Q4.FieldContentType="FieldContent";var Q8,Ve,Vt={};function Vn(){return Ve||(Ve=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DateContent=e.DateLegacy=e.isDateContent=void 0;let t=(0,B.__importStar)(WZ),n=(0,B.__importDefault)(Q3),r=Qq(),i=e=>(0,r.hasContentType)(e)&&e.__TYPE__===Q4.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Date"===e.type;e.isDateContent=i;let o=r=>new t.Type("DateLegacy",e.isDateContent,t=>(0,Lq.pipe)(n.default.decode(t),LP.either.map(t=>e.DateContent.encode({value:t,type:QT.DateFieldType,__TYPE__:Q4.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:QT.DateFieldType}}));e.DateLegacy=o,e.DateContent=t.strict({type:t.literal(QT.DateFieldType),value:n.default,__TYPE__:t.literal(Q4.FieldContentType)})}(Vt)),Vt}var Vr,Vi={};function Vo(){return Vr||(Vr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberContent=e.NumberLegacy=e.isNumberContent=void 0;let t=(0,B.__importStar)(WZ),n=(0,B.__importDefault)(Q3),r=Qq(),i=e=>(0,r.hasContentType)(e)&&e.__TYPE__===Q4.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Number"===e.type;e.isNumberContent=i;let o=r=>new t.Type("NumberLegacy",e.isNumberContent,t=>(0,Lq.pipe)(n.default.decode(t),LP.either.map(t=>e.NumberContent.encode({value:t,type:QT.NumberFieldType,__TYPE__:Q4.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:QT.NumberFieldType}}));e.NumberLegacy=o,e.NumberContent=t.strict({type:t.literal(QT.NumberFieldType),value:n.default,__TYPE__:t.literal(Q4.FieldContentType)})}(Vi)),Vi}var Va,Vu={};function Vs(){return Va||(Va=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RangeContent=e.RangeLegacy=e.isRangeContent=void 0;let t=(0,B.__importStar)(WZ),n=(0,B.__importDefault)(Q3),r=Qq(),i=e=>(0,r.hasContentType)(e)&&e.__TYPE__===Q4.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Range"===e.type;e.isRangeContent=i;let o=r=>new t.Type("RangeLegacy",e.isRangeContent,t=>(0,Lq.pipe)(n.default.decode(t),LP.either.map(t=>e.RangeContent.encode({value:t,type:QT.RangeFieldType,__TYPE__:Q4.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:QT.RangeFieldType}}));e.RangeLegacy=o,e.RangeContent=t.strict({type:t.literal(QT.RangeFieldType),value:n.default,__TYPE__:t.literal(Q4.FieldContentType)})}(Vu)),Vu}var Vl,Vc={};function Vd(){return Vl||(Vl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectContentDefaultValue=e.SelectContent=e.SelectLegacy=e.isSelectContent=void 0;let t=(0,B.__importStar)(WZ),n=(0,B.__importDefault)(Q3),r=Qq(),i=e=>(0,r.hasContentType)(e)&&e.__TYPE__===Q4.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Select"===e.type;e.isSelectContent=i;let o=r=>new t.Type("SelectLegacy",e.isSelectContent,t=>(0,Lq.pipe)(n.default.decode(t),LP.either.map(t=>e.SelectContent.encode({value:t,type:QT.SelectFieldType,__TYPE__:Q4.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:QT.SelectFieldType}}));e.SelectLegacy=o,e.SelectContent=t.strict({type:t.literal(QT.SelectFieldType),value:n.default,__TYPE__:t.literal(Q4.FieldContentType)});let a=e=>{var t;return!(null===(t=e.config)||void 0===t)&&t.default_value?{__TYPE__:Q4.FieldContentType,type:QT.SelectFieldType,value:e.config.default_value||""}:void 0};e.SelectContentDefaultValue=a}(Vc)),Vc}var Vf,Vp={};function VA(){return Vf||(Vf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TextContent=e.TextLegacy=e.isTextContent=void 0;let t=(0,B.__importStar)(WZ),n=(0,B.__importDefault)(Q3),r=Qq(),i=e=>(0,r.hasContentType)(e)&&e.__TYPE__===Q4.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Text"===e.type;e.isTextContent=i;let o=r=>new t.Type("TextLegacy",e.isTextContent,t=>(0,Lq.pipe)(n.default.decode(t),LP.either.map(t=>e.TextContent.encode({value:t,type:QT.TextFieldType,__TYPE__:Q4.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:QT.TextFieldType}}));e.TextLegacy=o,e.TextContent=t.strict({type:t.literal(QT.TextFieldType),value:n.default,__TYPE__:t.literal(Q4.FieldContentType)})}(Vp)),Vp}var Vh,Vm={};function Vg(){return Vh||(Vh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TimestampContent=e.TimestampLegacy=e.isTimestampContent=void 0;let t=(0,B.__importStar)(WZ),n=(0,B.__importDefault)(Q3),r=Qq(),i=e=>(0,r.hasContentType)(e)&&e.__TYPE__===Q4.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Timestamp"===e.type;e.isTimestampContent=i;let o=r=>new t.Type("TimestampLegacy",e.isTimestampContent,t=>(0,Lq.pipe)(n.default.decode(t),LP.either.map(t=>e.TimestampContent.encode({value:t,type:QT.TimestampFieldType,__TYPE__:Q4.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:QT.TimestampFieldType}}));e.TimestampLegacy=o,e.TimestampContent=t.strict({type:t.literal(QT.TimestampFieldType),value:n.default,__TYPE__:t.literal(Q4.FieldContentType)})}(Vm)),Vm}function Vy(){return Vv||(Vv=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FieldContent=e.FieldType=void 0;let t=(0,B.__importStar)(WZ),n=Q7(),r=Vn(),i=Vo(),o=Vs(),a=Vd(),u=VA(),s=Vg();e.FieldType=t.keyof({Text:null,Date:null,Timestamp:null,Color:null,Number:null,Range:null,Select:null}),e.FieldContent=t.union([r.DateContent,n.ColorContent,i.NumberContent,o.RangeContent,a.SelectContent,u.TextContent,s.TimestampContent]),(0,B.__exportStar)(Q7(),e),(0,B.__exportStar)(Q4,e),(0,B.__exportStar)(Vn(),e),(0,B.__exportStar)(Vo(),e),(0,B.__exportStar)(Vs(),e),(0,B.__exportStar)(Vd(),e),(0,B.__exportStar)(VA(),e),(0,B.__exportStar)(Vg(),e)}(Q6)),Q6}var Vv,Vx,Vb={};function VC(){return Vx||(Vx=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPointContent=e.GeoPointLegacy=e.isGeoPointContent=e.GeoPointContentType=void 0;let t=(0,B.__importStar)(WZ),n=Qq();e.GeoPointContentType="GeoPointContent";let r=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.GeoPointContentType;e.isGeoPointContent=r;let i=t.strict({position:t.strict({lat:t.number,lng:t.number})}),o=n=>new t.Type("GeoPointLegacy",e.isGeoPointContent,t=>(0,W5.pipe)(i.decode(t),LP.either.map(t=>e.GeoPointContent.encode({...t,__TYPE__:e.GeoPointContentType}))),e=>({content:{position:e.position},types:{[n.keyOfType]:"GeoPoint"}}));e.GeoPointLegacy=o,e.GeoPointContent=t.intersection([i,t.strict({__TYPE__:t.literal(e.GeoPointContentType)})])}(Vb)),Vb}var VS,Vw={};function VI(){return VS||(VS=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImageContent=e.ImageLegacy=e.ImageContentView=e.isImageContent=e.ImageContentType=void 0;let t=(0,B.__importStar)(WZ),n=qy(),r=Qq();e.ImageContentType="ImageContent";let i=t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ImageContentType;e.isImageContent=i;let o=t.exact(t.type({id:t.string,url:t.string,width:t.number,height:t.number}));e.ImageContentView=t.exact(t.intersection([t.type({origin:o,width:t.number,height:t.number,edit:t.type({zoom:t.number,crop:t.type({x:t.number,y:t.number}),background:t.string})}),t.partial({url:t.string,credits:n.NonEmptyStringOrNull,alt:n.NonEmptyStringOrNull,provider:n.StringOrNull})]));let a=t.intersection([e.ImageContentView,t.partial({thumbnails:t.record(t.string,e.ImageContentView)})]),u=n=>new t.Type("ImageLegacy",e.isImageContent,t=>(0,Lq.pipe)(a.decode(t),LP.either.map(t=>e.ImageContent.encode({...t,__TYPE__:e.ImageContentType}))),e=>({content:(0,Qy.withOptionals)({edit:e.edit,height:e.height,origin:e.origin,width:e.width},[["alt",e.alt],["credits",e.credits],["provider",e.provider],["thumbnails",e.thumbnails],["url",e.url]]),types:{[n.keyOfType]:"Image"}}));e.ImageLegacy=u,e.ImageContent=t.intersection([a,t.strict({__TYPE__:t.literal(e.ImageContentType)})])}(Vw)),Vw}var V_,VT={};function VO(){return V_||(V_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrationFieldContent=e.IntegrationFieldLegacy=e.isIntegrationFieldContent=e.IntegrationFieldContentType=void 0;let t=(0,B.__importStar)(WZ),n=Qq();e.IntegrationFieldContentType="IntegrationFieldsContent";let r=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.IntegrationFieldContentType;e.isIntegrationFieldContent=r;let i=n=>new t.Type("IntegrationFieldLegacy",e.isIntegrationFieldContent,n=>(0,Lq.pipe)(t.string.decode(n),LP.either.map(t=>e.IntegrationFieldContent.encode({value:t,__TYPE__:e.IntegrationFieldContentType}))),e=>({content:e.value,types:{[n.keyOfType]:"IntegrationFields"}}));e.IntegrationFieldLegacy=i,e.IntegrationFieldContent=t.strict({__TYPE__:t.literal(e.IntegrationFieldContentType),value:t.string})}(VT)),VT}var VR,Vk={};function VE(){return VR||(VR=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkContent=e.Link=e.LinkContentLegacy=e.LinkLegacy=e.isLinkContent=e.LinkContentType=e.ExternalLinkContent=e.ExternalLinkType=e.DocumentLinkContent=e.DocumentLinkType=e.FileLinkContent=e.FileLinkType=e.ImageLinkContent=e.ImageLinkType=void 0;let t=(0,B.__importStar)(WZ),n=qy(),r=Qq();e.ImageLinkType="ImageLink";let i=t.exact(t.intersection([t.type({id:t.string,url:t.string,height:t.string,width:t.string,size:t.string,name:t.string,kind:t.string}),t.partial({date:n.StringOrNull})])),o=new t.Type("ImageLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ImageLinkType,t=>(0,Lq.pipe)(i.decode(t),LP.either.map(t=>e.ImageLinkContent.encode({...t,__TYPE__:e.ImageLinkType}))),e=>i.encode(e));e.ImageLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.ImageLinkType)}),i]),e.FileLinkType="FileLink";let a=t.exact(t.intersection([t.type({id:t.string,url:t.string,name:t.string,kind:t.string,size:(0,NU.withFallback)(t.string,"0")}),t.partial({date:(0,W6.nullable)(t.string)})])),u=new t.Type("FileLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.FileLinkType,t=>(0,Lq.pipe)(a.decode(t),LP.either.map(t=>e.FileLinkContent.encode({...t,__TYPE__:e.FileLinkType}))),e=>a.encode(e));e.FileLinkContent=t.intersection([a,t.exact(t.intersection([t.type({__TYPE__:t.literal(e.FileLinkType)}),t.partial({size:(0,NU.withFallback)(t.string,"0")})]))]),e.DocumentLinkType="DocumentLink";let s=t.strict({id:n.NonEmptyString}),l=new t.Type("DocumentLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.DocumentLinkType,t=>(0,Lq.pipe)(s.decode(t),LP.either.map(t=>e.DocumentLinkContent.encode({...t,__TYPE__:e.DocumentLinkType}))),e=>s.encode(e));e.DocumentLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.DocumentLinkType)}),s]),e.ExternalLinkType="ExternalLink";let c=t.exact(t.intersection([t.type({url:t.string}),t.partial({kind:t.literal("web"),target:n.StringOrNull,preview:(0,W6.nullable)(t.partial({title:t.string}))})])),d=new t.Type("ExternalLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ExternalLinkType,t=>(0,Lq.pipe)(c.decode(t),LP.either.map(t=>e.ExternalLinkContent.encode({...t,__TYPE__:e.ExternalLinkType}))),e=>c.encode(e));e.ExternalLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.ExternalLinkType)}),c]),e.LinkContentType="LinkContent";let f=t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.LinkContentType;e.isLinkContent=f,e.LinkLegacy=t.union([o,u,l,d]);let p=n=>new t.Type("LinkLegacy",e.isLinkContent,t=>(0,Lq.pipe)(e.LinkLegacy.decode(t),LP.either.map(t=>e.LinkContent.encode({value:t,__TYPE__:e.LinkContentType}))),t=>({content:e.LinkLegacy.encode(t.value),types:{[n.keyOfType]:"Link"}}));e.LinkContentLegacy=p,e.Link=t.union([e.ImageLinkContent,e.FileLinkContent,e.DocumentLinkContent,e.ExternalLinkContent]),e.LinkContent=t.strict({__TYPE__:t.literal(e.LinkContentType),value:e.Link})}(Vk)),Vk}var VM,VF={},Vj={},VU={};function VK(){return VM||(VM=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Block=e.BlockLegacy=e.TextBlock=e.checkEmbedBlock=e.EmbedBlock=e.checkImageBlock=e.ImageBlock=e.ValidatedSpans=e.SpanLegacy=e.Span=void 0;let t=(0,B.__importStar)(WZ),n=qy(),r=Q2(),i=VI(),o=VE(),a=e=>t.strict({data:e,start:t.number,end:t.number,type:t.literal(q6.RichTextNodeType.hyperlink)}),u=t.strict({data:(0,NU.withFallback)(t.string,""),start:t.number,end:t.number,type:t.literal("label")}),s=t.strict({start:t.number,end:t.number,type:t.keyof({[q6.RichTextNodeType.strong]:null,[q6.RichTextNodeType.em]:null,"list-item":null})});e.Span=t.union([a(o.Link),u,s]),e.SpanLegacy=t.union([a(o.LinkLegacy),u,s]);let l=e=>new t.Type("ValidatedSpans",t=>Array.isArray(t)&&t.every(e.is),(n,r)=>{if(!Array.isArray(n))return t.failure(n,r);{let i=n.reduce((t,n)=>{let r=e.decode(n);return(0,LW.isLeft)(r)?t:[...t,r.right]},[]).sort((e,t)=>e.start-t.start);return t.success(i)}},t=>t.reduce((t,n)=>{let r=e.encode(n);return[...t,r]},[]));e.ValidatedSpans=l;let c=e=>t.exact(t.intersection([t.type({type:t.literal(q6.RichTextNodeType.image),data:t.intersection([i.ImageContentView,t.partial({linkTo:(0,W6.nullable)(e)})])}),t.partial({label:n.StringOrNull,direction:n.StringOrNull})]));e.ImageBlock=c(o.Link);let d=c(o.LinkLegacy);e.checkImageBlock=function(e){return e.type===q6.RichTextNodeType.image};let f=t.exact(t.intersection([t.type({type:t.literal(q6.RichTextNodeType.embed),data:t.unknown}),t.partial({label:n.StringOrNull,direction:n.StringOrNull})])),p=new t.Type("EmbedBlockLegacy",e=>"embed"===e.type,t=>(0,Lq.pipe)(f.decode(t),LP.either.chain(e=>LP.either.map(t=>[e,t])(r.EmbedContentLegacy.decode(e.data))),LP.either.map(([t,n])=>e.EmbedBlock.encode({...t,data:{...n,__TYPE__:r.EmbedContentType,all:t.data}}))),e=>({...f.encode(e),data:r.EmbedContentLegacy.encode(e.data)}));e.EmbedBlock=t.exact(t.intersection([t.type({type:t.literal(q6.RichTextNodeType.embed),data:r.EmbedContent}),t.partial({label:n.StringOrNull,direction:n.StringOrNull})])),e.checkEmbedBlock=function(e){return e.type===q6.RichTextNodeType.embed};let A=n=>t.exact(t.intersection([t.type({type:(0,W6.refineType)(q6.RichTextNodeTypeCodec,`string which isn't ${q6.RichTextNodeType.image} ${q6.RichTextNodeType.embed}`,e=>e!==q6.RichTextNodeType.image&&e!==q6.RichTextNodeType.embed),content:t.intersection([t.type({text:t.string}),t.partial({spans:(0,e.ValidatedSpans)(n)})])}),t.partial({label:t.string,direction:t.string})]));e.TextBlock=A(e.Span);let h=A(e.SpanLegacy),m=t.union([p,d,h]);e.BlockLegacy=new t.Type("BlockLegacy",e=>p.is(e)||d.is(e)||h.is(e),e=>m.decode(e),t=>e.ImageBlock.is(t)?d.encode(t):e.EmbedBlock.is(t)?p.encode(t):h.encode(t)),e.Block=t.union([e.ImageBlock,e.EmbedBlock,e.TextBlock])}(VU)),VU}function VL(){return VB||(VB=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RichTextLegacy=e.RichTextContent=e.isRichTextContent=e.RichTextContentType=void 0;let t=(0,B.__importStar)(WZ),n=Qq(),r=VK();e.RichTextContentType="StructuredTextContent";let i=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.RichTextContentType;e.isRichTextContent=i;let o=t.array(r.BlockLegacy);e.RichTextContent=t.strict({__TYPE__:t.literal(e.RichTextContentType),value:t.array(r.Block)}),(0,B.__exportStar)(VK(),e);let a=n=>new t.Type("RichTextLegacy",e.isRichTextContent,t=>(0,Lq.pipe)(o.decode(t),LP.either.map(t=>({value:t,__TYPE__:e.RichTextContentType}))),e=>({content:o.encode(e.value),types:{[n.keyOfType]:"StructuredText"}}));e.RichTextLegacy=a}(Vj)),Vj}var VB,VP,VW={};function VD(){return VP||(VP=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SeparatorContent=e.SeparatorLegacy=e.isSeparatorContent=e.SeparatorContentType=void 0;let t=(0,B.__importStar)(WZ),n=Qq();e.SeparatorContentType="SeparatorContent";let r=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.SeparatorContentType;e.isSeparatorContent=r;let i=n=>new t.Type("SeparatorLegacy",e.isSeparatorContent,()=>t.success(e.SeparatorContent.encode({__TYPE__:e.SeparatorContentType})),()=>({content:{},types:{[n.keyOfType]:"Separator"}}));e.SeparatorLegacy=i,e.SeparatorContent=t.strict({__TYPE__:t.literal(e.SeparatorContentType)})}(VW)),VW}function VN(){var e;return VQ||(VQ=1,Object.defineProperty(QG,"__esModule",{value:!0}),(0,B.__exportStar)(QX(),QG),(0,B.__exportStar)(Q2(),QG),(0,B.__exportStar)(Vy(),QG),(0,B.__exportStar)(VC(),QG),(0,B.__exportStar)(VI(),QG),(0,B.__exportStar)(VO(),QG),(0,B.__exportStar)(VE(),QG),(0,B.__exportStar)(function(){if(Vq)return VF;Vq=1,Object.defineProperty(VF,"__esModule",{value:!0}),VF.NestableLegacy=VF.isNestableContent=VF.NestableContentDefaultValue=VF.NestableContent=void 0;let e=(0,B.__importStar)(WZ),t=QQ(),n=QX(),r=Q2(),i=Vy(),o=VC(),a=VI(),u=VO(),s=VE(),l=VL(),c=VD();VF.NestableContent=e.union([t.EmptyContent,n.BooleanContent,r.EmbedContent,i.TextContent,i.TimestampContent,i.SelectContent,i.RangeContent,i.NumberContent,i.DateContent,i.ColorContent,o.GeoPointContent,a.ImageContent,u.IntegrationFieldContent,s.LinkContent,l.RichTextContent,c.SeparatorContent]);let d=e=>{switch(e.type){case"Boolean":return(0,n.BooleanContentDefaultValue)(e);case"Select":return(0,i.SelectContentDefaultValue)(e);default:return}};VF.NestableContentDefaultValue=d;let f=e=>(0,i.isTextContent)(e)||(0,i.isColorContent)(e)||(0,i.isDateContent)(e)||(0,i.isTimestampContent)(e)||(0,i.isNumberContent)(e)||(0,i.isRangeContent)(e)||(0,i.isSelectContent)(e)||(0,o.isGeoPointContent)(e)||(0,l.isRichTextContent)(e)||(0,n.isBooleanContent)(e)||(0,r.isEmbedContent)(e)||(0,a.isImageContent)(e)||(0,u.isIntegrationFieldContent)(e)||(0,s.isLinkContent)(e)||(0,c.isSeparatorContent)(e)||(0,t.isEmptyContent)(e);VF.isNestableContent=f;let p=e=>({decode(d){if(!e.fieldType)return;let f=(0,t.EmptyLegacy)(e.fieldType).decode(d);if((0,LW.isRight)(f))return f;let p=(()=>{switch(e.fieldType){case"Text":return(0,i.TextLegacy)(e);case"Color":return(0,i.ColorLegacy)(e);case"Date":return(0,i.DateLegacy)(e);case"Timestamp":return(0,i.TimestampLegacy)(e);case"Number":return(0,i.NumberLegacy)(e);case"Range":return(0,i.RangeLegacy)(e);case"Select":return(0,i.SelectLegacy)(e);case"GeoPoint":return(0,o.GeoPointLegacy)(e);case"StructuredText":return(0,l.RichTextLegacy)(e);case"Boolean":return(0,n.BooleanLegacy)(e);case"Embed":return(0,r.EmbedLegacy)(e);case"Image":return(0,a.ImageLegacy)(e);case"IntegrationFields":return(0,u.IntegrationFieldLegacy)(e);case"Link":return(0,s.LinkContentLegacy)(e);case"Separator":return(0,c.SeparatorLegacy)(e);default:return}})();if(p)return p.decode(d)},encode(t){switch(t.__TYPE__){case Q4.FieldContentType:return"Text"===t.type?(0,i.TextLegacy)(e).encode(t):"Color"===t.type?(0,i.ColorLegacy)(e).encode(t):"Range"===t.type?(0,i.RangeLegacy)(e).encode(t):"Date"===t.type?(0,i.DateLegacy)(e).encode(t):"Number"===t.type?(0,i.NumberLegacy)(e).encode(t):"Timestamp"===t.type?(0,i.TimestampLegacy)(e).encode(t):"Select"===t.type?(0,i.SelectLegacy)(e).encode(t):void 0;case o.GeoPointContentType:return(0,o.GeoPointLegacy)(e).encode(t);case l.RichTextContentType:return(0,l.RichTextLegacy)(e).encode(t);case r.EmbedContentType:return(0,r.EmbedLegacy)(e).encode(t);case n.BooleanContentType:return(0,n.BooleanLegacy)(e).encode(t);case a.ImageContentType:return(0,a.ImageLegacy)(e).encode(t);case u.IntegrationFieldContentType:return(0,u.IntegrationFieldLegacy)(e).encode(t);case s.LinkContentType:return(0,s.LinkContentLegacy)(e).encode(t);case c.SeparatorContentType:return(0,c.SeparatorLegacy)(e).encode(t);default:return}}});return VF.NestableLegacy=p,VF}(),QG),(0,B.__exportStar)(VL(),QG),(0,B.__exportStar)(VD(),QG)),QG}var Vq,VQ,VV,Vz={};function VY(){if(VV)return Vz;VV=1,Object.defineProperty(Vz,"__esModule",{value:!0}),Vz.repeatableContentWithDefaultNestableContentValues=Vz.withDefaultNestableContentValues=Vz.withDefaultSlicePrimaryContentValues=void 0;let e=VH(),t=VN();return Vz.withDefaultSlicePrimaryContentValues=function(n,r){let i=r;for(let[o,a]of Object.entries(n)){let u=r[o];if(void 0===u){if(a.type===NW.GroupFieldType)i[o]=(0,e.groupContentWithDefaultValues)(a,e.GroupContentDefaultValue);else{let s=(0,t.NestableContentDefaultValue)(a);s&&(i[o]=s)}continue}a.type===NW.GroupFieldType&&(0,e.isGroupContent)(u)&&(i[o]=(0,e.groupContentWithDefaultValues)(a,u))}return i},Vz.withDefaultNestableContentValues=function(e,n){return Object.entries(e).reduce((e,[r,i])=>{if(void 0===n[r]){let o=(0,t.NestableContentDefaultValue)(i);return void 0!==o?{...e,[r]:o}:e}return e},n)},Vz.repeatableContentWithDefaultNestableContentValues=function(e,n){let r=Object.entries(e);return n.map(e=>r.reduce((n,[r,i])=>{if(!e.value.find(([e])=>e===r)){let o=(0,t.NestableContentDefaultValue)(i);return{...n,value:[...n.value,...o?[[r,o]]:[]]}}return n},e))},Vz}function VH(){return VZ||(VZ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseGroupItemsContent=e.traverseGroupContent=e.groupContentWithDefaultValues=e.GroupContentDefaultValue=e.GroupContent=e.isGroupContent=e.GroupContentType=e.GroupLegacy=e.GroupItemLegacy=e.GroupItemContent=e.GroupItemContentType=void 0;let t=(0,B.__importStar)(WZ),n=Qq(),r=VN(),i=VY();e.GroupItemContentType="GroupItemContent",e.GroupItemContent=t.strict({__TYPE__:t.literal(e.GroupItemContentType),value:t.array(t.tuple([t.string,r.NestableContent]))});let o=t.record(t.string,t.unknown),a=i=>new t.Type("GroupItemLegacy",t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.GroupItemContentType,t=>(0,Lq.pipe)(o.decode(t),LP.either.map(t=>({value:Object.entries(t).reduce((e,[t,n])=>{let o=(0,Qz.getFieldCtx)(t,i),a=(0,r.NestableLegacy)(o).decode(n);return!a||(0,LW.isLeft)(a)?e:[...e,[t,a.right]]},[]),__TYPE__:e.GroupItemContentType}))),e=>e.value.reduce((e,[t,n])=>{let o=(0,Qz.getFieldCtx)(t,i),a=(0,r.NestableLegacy)(o).encode(n);return a?{content:{...e.content,[t]:a.content},types:{...e.types,...a.types}}:e},{content:{},types:{}}));e.GroupItemLegacy=a;let u=n=>{let r=t.array(t.union([t.null,(0,e.GroupItemLegacy)(n)])),i=t.array((0,e.GroupItemLegacy)(n));return new t.Type("GroupLegacy",e.isGroupContent,t=>(0,Lq.pipe)(r.decode(t),LP.either.map(t=>({value:t.map(t=>null===t?{__TYPE__:e.GroupItemContentType,value:[]}:t),__TYPE__:e.GroupContentType}))),e=>{let t=i.encode(e.value);return{content:t.map(e=>e.content),types:t.reduce((e,t)=>({...e,...t.types}),{[n.keyOfType]:"Group"})}})};e.GroupLegacy=u,e.GroupContentType="GroupContentType";let s=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.GroupContentType;function l({path:e,model:t,content:n}){return i=>n.map((n,o)=>{let a=e.concat([{key:o.toString(),type:"GroupItem"}]),u=n.value.reduce((e,[n,o])=>{let u=null==t?void 0:t[n],s=i({path:a.concat([{key:n,type:"Widget"}]),key:n,apiId:n,model:u,content:o});return s&&(0,r.isNestableContent)(s)?e.concat([[n,s]]):e},[]);return{__TYPE__:n.__TYPE__,value:u}})}e.isGroupContent=s,e.GroupContent=t.strict({__TYPE__:t.literal(e.GroupContentType),value:t.array(e.GroupItemContent)}),e.GroupContentDefaultValue={__TYPE__:e.GroupContentType,value:[]},e.groupContentWithDefaultValues=function(e,t){var n;let r=null===(n=e.config)||void 0===n?void 0:n.fields;return r?{...t,value:(0,i.repeatableContentWithDefaultNestableContentValues)(r,t.value)}:t},e.traverseGroupContent=function({path:e,key:t,apiId:n,model:r,content:i}){return o=>{var a;let u=l({path:e,model:null===(a=null==r?void 0:r.config)||void 0===a?void 0:a.fields,content:i.value})(o);return o({path:e,key:t,apiId:n,model:r,content:{__TYPE__:i.__TYPE__,value:u}})}},e.traverseGroupItemsContent=l}(QV)),QV}var VZ,VJ,VG={},V$={},VX={},V0={};function V1(){if(VJ)return V0;VJ=1,Object.defineProperty(V0,"__esModule",{value:!0}),V0.RepeatableWidgets=V0.RepeatableWidgetsLegacy=void 0;let e=(0,B.__importStar)(WZ),t=VH(),n=VN(),r=n=>e.array((0,t.GroupItemLegacy)(n));V0.RepeatableWidgetsLegacy=r;let i=e.tuple([e.string,n.NestableContent]),o=e.strict({__TYPE__:e.literal(t.GroupItemContentType),value:e.array(i)});return V0.RepeatableWidgets=e.array(o),V0}function V2(){return V6||(V6=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.migrateCompositeSlice=e.traverseCompositeSliceContent=e.compositeSliceContentWithDefaultValues=e.CompositeSliceContent=e.CompositeSliceLegacy=e.isCompositeSliceContent=e.CompositeSliceContentType=void 0;let t=(0,B.__importStar)(WZ),n=Qq(),r=VH(),i=VN(),o=VY(),a=V1();e.CompositeSliceContentType="CompositeSliceContent";let u=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.CompositeSliceContentType;e.isCompositeSliceContent=u;let s=t.exact(t.partial({repeat:t.array(t.unknown),"non-repeat":t.UnknownRecord})),l=n=>new t.Type("CompositeSliceLegacy",e.isCompositeSliceContent,t=>(0,Lq.pipe)(s.decode(t),LP.either.map(t=>{let r=(()=>{let e=(0,Qz.getFieldCtx)("repeat",n),r=(0,a.RepeatableWidgetsLegacy)(e).decode(t.repeat);if(!(!r||(0,LW.isLeft)(r)))return r.right})()||[];return{nonRepeat:Object.entries(t["non-repeat"]||{}).reduce((e,[t,r])=>{let o=(0,Qz.getFieldCtx)(t,n,["non-repeat"]);if(!o)return e;let a=(0,i.NestableLegacy)(o).decode(r);return!a||(0,LW.isLeft)(a)?e:{...e,[t]:a.right}},{}),repeat:r,__TYPE__:e.CompositeSliceContentType}})),e=>{let t=Object.entries(e.nonRepeat).reduce((e,[t,r])=>{let o=(0,Qz.getFieldCtx)(t,n,["non-repeat"]),a=(0,i.NestableLegacy)(o).encode(r);return a?{content:{...e.content,[t]:a.content},types:{...e.types,...a.types}}:e},{content:{},types:{}}),r=(()=>{let t=(0,Qz.getFieldCtx)("repeat",n);return(0,a.RepeatableWidgetsLegacy)(t).encode(e.repeat)})()||[];return{content:{"non-repeat":t.content,repeat:r.map(e=>e.content)},types:{[n.keyOfType]:"Slice",...t.types,...r.reduce((e,t)=>({...e,...t.types}),{})}}});e.CompositeSliceLegacy=l,e.CompositeSliceContent=t.strict({__TYPE__:t.literal(e.CompositeSliceContentType),nonRepeat:t.record(t.string,i.NestableContent),repeat:a.RepeatableWidgets}),e.compositeSliceContentWithDefaultValues=function(e,t){var n,r;let i=(0,o.withDefaultNestableContentValues)(null!==(n=e["non-repeat"])&&void 0!==n?n:{},t.nonRepeat),a=(0,o.repeatableContentWithDefaultNestableContentValues)(null!==(r=e.repeat)&&void 0!==r?r:{},t.repeat);return{...t,nonRepeat:i,repeat:a}},e.traverseCompositeSliceContent=function({path:e,sliceKey:t,sliceName:n,model:o,content:a}){return(u,s)=>{let l=Object.entries(a.widget.nonRepeat).reduce((r,[a,s])=>{var l,c,d;let f=(null==o?void 0:o.type)==="SharedSlice"?null===(c=null===(l=null==o?void 0:o.fields)||void 0===l?void 0:l.primary)||void 0===c?void 0:c[a]:null===(d=null==o?void 0:o["non-repeat"])||void 0===d?void 0:d[a],p=u({path:e.concat([{key:"non-repeat",type:"primary"},{key:a,type:"Widget"}]),key:a,apiId:n,model:f,content:s});return p?(0,i.isNestableContent)(p)?{...r,[a]:p}:(console.warn(`Warn: Non nestable content with key [${a}] detected in a composite slice [${n}] with key [${t}]`),r):r},{}),c=(0,r.traverseGroupItemsContent)({path:e.concat([{key:"repeat",type:"items"}]),model:(null==o?void 0:o.type)==="SharedSlice"?null==o?void 0:o.fields.items:null==o?void 0:o.repeat,content:a.widget.repeat})(u);return s({key:t,apiId:n,path:e,model:o,content:{...a,widget:{__TYPE__:"CompositeSliceContent",repeat:c,nonRepeat:l}}})}},e.migrateCompositeSlice=function(e,t){let[,n]=t.key.split("$");return{key:`${e.sliceName}$${n}`,name:e.sliceName,maybeLabel:t.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:e.variationId,primary:Object.entries(t.widget.nonRepeat).reduce((n,[r,i])=>{var o;return!(null===(o=e.fields.primary)||void 0===o)&&o[r]?{...n,[r]:i}:(console.warn(`The widget ${r} in the non-repeat zone of the composite slice [${e.sliceName}] with key [${t.key}] doesn't exist in the model.`),n)},{}),items:t.widget.repeat.map(n=>({__TYPE__:"GroupItemContent",value:n.value.reduce((n,[r,i])=>{var o;return!(null===(o=e.fields.items)||void 0===o)&&o[r]?n.concat([[r,i]]):(console.warn(`The widget ${r} in the repeat zone of the composite slice [${e.sliceName}] with key [${t.key}] doesn't exist in the model.`),n)},[])}),[])}}}}(VX)),VX}var V6,V5,V3={},V9={};function V4(){if(V5)return V9;V5=1,Object.defineProperty(V9,"__esModule",{value:!0}),V9.isSlicePrimaryContent=V9.SlicePrimaryLegacy=V9.SlicePrimaryContent=void 0;let e=(0,B.__importStar)(WZ),t=VH(),n=VN();V9.SlicePrimaryContent=e.union([n.NestableContent,t.GroupContent]);let r=e=>{let r=(0,t.GroupLegacy)(e),i=(0,n.NestableLegacy)(e);return{decode:t=>e.fieldType===NW.GroupFieldType?r.decode(t):i.decode(t),encode:e=>(0,t.isGroupContent)(e)?r.encode(e):i.encode(e)}};V9.SlicePrimaryLegacy=r;let i=e=>(0,n.isNestableContent)(e)||(0,t.isGroupContent)(e);return V9.isSlicePrimaryContent=i,V9}function V7(){return V8||(V8=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSharedSliceContent=e.sharedSliceContentWithDefaultValues=e.SharedSliceContent=e.SharedSliceLegacy=e.isSharedSliceContent=e.SharedSliceContentType=void 0;let t=(0,B.__importStar)(WZ),n=Qq(),r=VH(),i=VN(),o=VY(),a=V1(),u=V4();e.SharedSliceContentType="SharedSliceContent";let s=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.SharedSliceContentType;e.isSharedSliceContent=s;let l=t.exact(t.type({variation:t.string,items:(0,NU.withFallback)(t.array(t.unknown),[]),primary:(0,NU.withFallback)(t.UnknownRecord,{})})),c=n=>new t.Type("SharedSliceLegacy",e.isSharedSliceContent,t=>(0,Lq.pipe)(l.decode(t),LP.either.map(t=>{let r=(()=>{let e=(0,Qz.getFieldCtx)("items",n,["variations",t.variation]),r=(0,a.RepeatableWidgetsLegacy)(e).decode(t.items);if(!(!r||(0,LW.isLeft)(r)))return r.right})()||[],i=Object.entries(t.primary).reduce((e,[r,i])=>{let o=(0,Qz.getFieldCtx)(r,n,["variations",t.variation,"primary"]),a=(0,u.SlicePrimaryLegacy)(o).decode(i);return!a||(0,LW.isLeft)(a)?e:{...e,[r]:a.right}},{});return{variation:t.variation,primary:i,items:r,__TYPE__:e.SharedSliceContentType}})),e=>{let t=Object.entries(e.primary).reduce((t,[r,i])=>{let o=(0,Qz.getFieldCtx)(r,n,["variations",e.variation,"primary"]),a=(0,u.SlicePrimaryLegacy)(o).encode(i);return a?{content:{...t.content,[r]:a.content},types:{...t.types,...a.types}}:t},{content:{},types:{}}),r=(()=>{let t=(0,Qz.getFieldCtx)("items",n,["variations",e.variation]);return(0,a.RepeatableWidgetsLegacy)(t).encode(e.items)})()||[];return{content:{primary:t.content,items:r.map(e=>e.content),variation:e.variation},types:{[n.keyOfType]:"SharedSlice",...t.types,...r.reduce((e,t)=>({...e,...t.types}),{})}}});e.SharedSliceLegacy=c,e.SharedSliceContent=t.strict({__TYPE__:t.literal(e.SharedSliceContentType),variation:t.string,primary:t.record(t.string,u.SlicePrimaryContent),items:a.RepeatableWidgets}),e.sharedSliceContentWithDefaultValues=function(e,t){var n,r;let i=e.variations.find(e=>e.id===t.variation),a=null!==(n=null==i?void 0:i.primary)&&void 0!==n?n:{},u=null!==(r=null==i?void 0:i.items)&&void 0!==r?r:{},s=(0,o.withDefaultSlicePrimaryContentValues)(a,t.primary),l=(0,o.repeatableContentWithDefaultNestableContentValues)(u,t.items);return{...t,primary:s,items:l}},e.traverseSharedSliceContent=function({path:e,sliceKey:t,sliceName:n,model:o,content:a}){return(s,l)=>{let c=Object.entries(a.widget.primary).reduce((a,[l,c])=>{var d,f;let p=null===(f=null===(d=null==o?void 0:o.fields)||void 0===d?void 0:d.primary)||void 0===f?void 0:f[l],A=(0,r.isGroupContent)(c)?(0,r.traverseGroupContent)({path:e.concat([{key:"primary",type:"primary"},{key:l,type:"Widget"}]),key:l,apiId:l,content:c,model:(null==p?void 0:p.type)===NW.GroupFieldType?p:void 0})(s):(0,i.isNestableContent)(c)?s({path:e.concat([{key:"primary",type:"primary"},{key:l,type:"Widget"}]),key:l,apiId:l,model:p,content:c}):void 0;return A?((0,u.isSlicePrimaryContent)(A)||console.warn(`Warn: Non nestable or group content with key [${l}] detected in a shared slice [${n}] with key [${t}]`),{...a,[l]:A}):a},{}),d=(0,r.traverseGroupItemsContent)({path:e.concat([{key:"items",type:"items"}]),model:null==o?void 0:o.fields.items,content:a.widget.items})(s);return l({key:t,apiId:n,path:e,model:o,content:{...a,widget:{__TYPE__:"SharedSliceContent",variation:a.widget.variation,primary:c,items:d}}})}}}(V3)),V3}var V8,ze,zt={};function zn(){if(ze)return zt;ze=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.migrateSimpleSlice=zt.traverseSimpleSliceContent=zt.SimpleSliceLegacy=zt.isSimpleSliceContent=zt.SimpleSliceContent=void 0;let e=(0,B.__importStar)(WZ),t=VH(),n=VN();zt.SimpleSliceContent=e.union([n.NestableContent,t.GroupContent]);let r=e=>(0,n.isNestableContent)(e)||(0,t.isGroupContent)(e);zt.isSimpleSliceContent=r;let i=e=>({decode:"Group"===e.fieldType?(0,t.GroupLegacy)(e).decode.bind(null):(0,n.NestableLegacy)(e).decode.bind(null),encode:r=>"GroupContentType"===r.__TYPE__?(0,t.GroupLegacy)(e).encode(r):(0,n.NestableLegacy)(e).encode(r)});return zt.SimpleSliceLegacy=i,zt.traverseSimpleSliceContent=function({path:e,sliceKey:n,sliceName:r,model:i,content:o}){return(a,u)=>{var s;if((0,t.isGroupContent)(o.widget)){let l=(0,t.traverseGroupContent)({path:e,key:o.key,apiId:o.name,model:(null==i?void 0:i.type)==="Group"?i:(null==i?void 0:i.type)==="SharedSlice"?{type:"Group",config:{fields:i.fields.items||{}}}:void 0,content:o.widget})(a);return l&&u({key:o.key,apiId:o.name,path:e,model:i,content:{...o,widget:l}})}let c=a({key:o.key,apiId:o.name,path:e,model:(null==i?void 0:i.type)==="SharedSlice"?null===(s=i.fields.primary)||void 0===s?void 0:s[o.name]:(null==i?void 0:i.type)!=="Group"?i:void 0,content:o.widget});return c&&u({key:n,apiId:r,path:e,model:i,content:{...o,widget:c}})}},zt.migrateSimpleSlice=function(e,t){var n;let[,r]=t.key.split("$"),i=`${e.sliceName}$${r}`;return"GroupContentType"===t.widget.__TYPE__?{key:i,name:e.sliceName,maybeLabel:t.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:e.variationId,primary:{},items:t.widget.value.map(t=>({__TYPE__:"GroupItemContent",value:t.value.reduce((t,[n,r])=>{var i;return!(null===(i=e.fields.items)||void 0===i)&&i[n]?t.concat([[n,r]]):t},[])}),[])}}:{key:i,name:e.sliceName,maybeLabel:t.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:e.variationId,primary:!(null===(n=e.fields.primary)||void 0===n)&&n[t.name]?{[t.name]:t.widget}:{},items:[]}}},zt}function zr(){return zi||(zi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SliceContent=e.SliceLegacy=void 0;let t=(0,B.__importStar)(WZ),n=V2(),r=V7(),i=zn(),o=e=>({decode:t=>(()=>{switch(e.fieldType){case"Slice":return(0,n.CompositeSliceLegacy)(e);case"SharedSlice":return(0,r.SharedSliceLegacy)(e);default:return(0,i.SimpleSliceLegacy)(e)}})().decode(t),encode(t){switch(t.__TYPE__){case"SharedSliceContent":return(0,r.SharedSliceLegacy)(e).encode(t);case"CompositeSliceContent":return(0,n.CompositeSliceLegacy)(e).encode(t);default:return(0,i.SimpleSliceLegacy)(e).encode(t)}}});e.SliceLegacy=o,e.SliceContent=t.union([n.CompositeSliceContent,r.SharedSliceContent,i.SimpleSliceContent]),(0,B.__exportStar)(V2(),e),(0,B.__exportStar)(V7(),e),(0,B.__exportStar)(zn(),e),(0,B.__exportStar)(V4(),e)}(V$)),V$}var zi,zo,za={};function zu(){if(zo)return za;zo=1,Object.defineProperty(za,"__esModule",{value:!0}),za.migrateSliceItem=za.SlicesItemLegacy=za.sliceItemContentWithDefaultValues=za.isSimpleSliceItemContent=za.isCompositeSliceItemContent=za.isSharedSliceItemContent=za.SliceItemContent=void 0;let e=(0,B.__importStar)(WZ),t=VH(),n=VN(),r=VY(),i=zr(),o=V2(),a=V7(),u=zn();function s(e){return(0,o.isCompositeSliceContent)(e.widget)}function l(e){return(0,t.isGroupContent)(e.widget)||(0,n.isNestableContent)(e.widget)}za.SliceItemContent=e.type({key:e.string,name:e.string,maybeLabel:e.union([e.string,e.undefined]),widget:i.SliceContent}),za.isSharedSliceItemContent=function(e){return(0,a.isSharedSliceContent)(e.widget)},za.isCompositeSliceItemContent=s,za.isSimpleSliceItemContent=l,za.sliceItemContentWithDefaultValues=function(e,n){var u;if("SharedSlice"===e.type&&(0,a.isSharedSliceContent)(n))return(0,i.sharedSliceContentWithDefaultValues)(e,n);if("Slice"===e.type&&(0,o.isCompositeSliceContent)(n))return(0,i.compositeSliceContentWithDefaultValues)(e,n);if("Group"===e.type&&(0,t.isGroupContent)(n)&&!(null===(u=e.config)||void 0===u)&&u.fields){let s=(0,r.repeatableContentWithDefaultNestableContentValues)(e.config.fields,n.value);return{...n,value:s}}return n};let c=e.exact(e.intersection([e.type({key:e.string,value:e.unknown}),e.partial({label:(0,W6.nullable)(e.string)})])),d=t=>new e.Type("SlicesItemLegacy",e=>((0,a.isSharedSliceContent)(e.widget),(0,o.isCompositeSliceContent)(e.widget),(0,u.isSimpleSliceContent)(e.widget)),(n,r)=>(0,Lq.pipe)(c.decode(n),LP.either.chain(o=>{var a;let u=o.key.indexOf("$"),s=o.key.substring(0,u>0?u:void 0),l=(0,Qz.getFieldCtx)(s,t),c=(0,i.SliceLegacy)(l).decode(o.value);return!c||(0,LW.isLeft)(c)?e.failure(n,r):e.success({key:o.key,name:s,maybeLabel:null!==(a=o.label)&&void 0!==a?a:void 0,widget:c.right})})),e=>{let n=(0,Qz.getFieldCtx)(e.name,t),r=(0,i.SliceLegacy)(n).encode(e.widget);return{content:{key:e.key,label:e.maybeLabel,value:(null==r?void 0:r.content)||{}},types:(null==r?void 0:r.types)||{}}});za.SlicesItemLegacy=d;let f=({model:e,content:t})=>s(t)&&(null==e?void 0:e.type)==="SharedSlice"?(0,o.migrateCompositeSlice)(e,t):l(t)&&(null==e?void 0:e.type)==="SharedSlice"?(0,u.migrateSimpleSlice)(e,t):t;return za.migrateSliceItem=f,za}var zs,zl={};function zc(){var e;return zd||(zd=1,Object.defineProperty(VG,"__esModule",{value:!0}),(0,B.__exportStar)(zr(),VG),(0,B.__exportStar)(zu(),VG),(0,B.__exportStar)((zs||(zs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSlices=e.slicesContentWithDefaultValues=e.SlicesContent=e.SlicesLegacy=e.isSlicesContent=e.SlicesContentType=void 0;let t=(0,B.__importStar)(WZ),n=Qq(),r=V2(),i=V7(),o=zn(),a=zu();e.SlicesContentType="SliceContentType";let u=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.SlicesContentType;e.isSlicesContent=u;let s=n=>{let r=t.array((0,a.SlicesItemLegacy)(n));return new t.Type("SlicesLegacy",e.isSlicesContent,t=>(0,Lq.pipe)(r.decode(t),LP.either.map(t=>({__TYPE__:e.SlicesContentType,value:t}))),e=>{let t=r.encode(e.value);return{content:t.map(e=>e.content),types:t.reduce((e,t)=>({...e,...t.types}),{[n.keyOfType]:"Slices"})}})};e.SlicesLegacy=s,e.SlicesContent=t.type({__TYPE__:t.literal(e.SlicesContentType),value:t.array(a.SliceItemContent)}),e.slicesContentWithDefaultValues=function(e,t){var n;let r=null===(n=null==e?void 0:e.config)||void 0===n?void 0:n.choices;if(void 0===r)return t;let i=t.value.map(e=>{let t=r[e.name];if(t){let n=(0,a.sliceItemContentWithDefaultValues)(t,e.widget);return{...e,widget:n}}return e});return{...t,value:i}},e.traverseSlices=function({path:e,key:t,model:n,content:u}){return({transformWidget:s=({content:e})=>e,transformSlice:l=({content:e})=>e})=>{let c=u.value.reduce((t,u)=>{let c=n&&function(e,t,n){var r,i;let o=null===(i=null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.choices)||void 0===i?void 0:i[n.name];return(()=>{if((0,a.isSharedSliceItemContent)(n)&&o&&(0,NW.isStaticSharedSlice)(o)){let e=o.variations.find(e=>e.id===n.widget.variation);return e?{type:"SharedSlice",sliceName:o.id,variationId:e.id,fields:{primary:e.primary||{},items:e.items||{}}}:void 0}})()||(()=>{var r;let i=WJ.ContentPath.append(WJ.ContentPath.serialize(e),n.name),o=Object.values((null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.choices)||{}).find(e=>{var t;return!!(0,NW.isStaticSharedSlice)(e)&&!!(!(null===(t=e.legacyPaths)||void 0===t)&&t[i])});if(!o)return;let a=null==o?void 0:o.variations.find(e=>{var t;return e.id===(null===(t=o.legacyPaths)||void 0===t?void 0:t[i])});if(a)return{type:"SharedSlice",sliceName:o.id,variationId:a.id,fields:{primary:a.primary||{},items:a.items||{}}}})()||(()=>{if(o){if((0,NW.isCompositeSlice)(o))return{type:"Slice","non-repeat":o["non-repeat"]||{},repeat:o.repeat||{}};if((0,NW.isLegacySlice)(o))return o}})()}(e,n,u),d=(0,a.isSharedSliceItemContent)(u)?(0,i.traverseSharedSliceContent)({path:e.concat({key:u.key,type:"SharedSlice"}),sliceKey:u.key,sliceName:u.name,model:(null==c?void 0:c.type)==="SharedSlice"?c:void 0,content:u})(s,l):(0,a.isCompositeSliceItemContent)(u)?(0,r.traverseCompositeSliceContent)({path:e.concat({key:u.key,type:"Slice"}),sliceKey:u.key,sliceName:u.name,model:(null==c?void 0:c.type)==="Slice"||(null==c?void 0:c.type)==="SharedSlice"?c:void 0,content:u})(s,l):(0,a.isSimpleSliceItemContent)(u)?(0,o.traverseSimpleSliceContent)({path:e.concat({key:u.key,type:"LegacySlice"}),sliceKey:u.key,sliceName:u.name,model:c&&(null==c?void 0:c.type)!=="Slice"?c:void 0,content:u})(s,l):void 0;return d?t.concat(d):t},[]);return s({path:e,key:t,apiId:t,model:n,content:{__TYPE__:u.__TYPE__,value:c}})}}}(zl)),zl),VG)),VG}var zd,zf,zp={};function zA(){return zf||(zf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UIDContent=e.UIDLegacy=e.isUIDContent=e.UIDContentType=void 0;let t=(0,B.__importStar)(WZ),n=Qq();e.UIDContentType="UIDContent";let r=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.UIDContentType;e.isUIDContent=r;let i=n=>new t.Type("UIDLegacy",e.isUIDContent,n=>(0,Lq.pipe)(t.string.decode(n),LP.either.map(t=>e.UIDContent.encode({value:t,__TYPE__:e.UIDContentType}))),e=>({content:e.value,types:{[n.keyOfType]:"UID"}}));e.UIDLegacy=i,e.UIDContent=t.type({__TYPE__:t.literal(e.UIDContentType),value:t.string})}(zp)),zp}var zh,zm={};function zg(){var e;return r||(r=1,Object.defineProperty(QW,"__esModule",{value:!0}),(0,B.__exportStar)(QQ(),QW),(0,B.__exportStar)(VH(),QW),(0,B.__exportStar)(VN(),QW),(0,B.__exportStar)(zc(),QW),(0,B.__exportStar)(zA(),QW),(0,B.__exportStar)(function(){if(zh)return zm;zh=1,Object.defineProperty(zm,"__esModule",{value:!0}),zm.WidgetLegacy=zm.isWidgetContent=zm.WidgetContent=void 0;let e=(0,B.__importStar)(WZ),t=VH(),n=VN(),r=zc(),i=zA();zm.WidgetContent=e.union([t.GroupContent,n.NestableContent,i.UIDContent,r.SlicesContent]);let o=e=>(0,t.isGroupContent)(e)||(0,n.isNestableContent)(e)||(0,i.isUIDContent)(e)||(0,r.isSlicesContent)(e);zm.isWidgetContent=o;let a=e=>({decode(o){if(!e.fieldType)return;let a=(()=>{switch(e.fieldType){case"UID":return(0,i.UIDLegacy)(e);case"Group":return(0,t.GroupLegacy)(e);case"Choice":case"Slices":return(0,r.SlicesLegacy)(e);default:return(0,n.NestableLegacy)(e)}})();if(a)return a.decode(o)},encode(o){switch(o.__TYPE__){case i.UIDContentType:return(0,i.UIDLegacy)(e).encode(o);case t.GroupContentType:return(0,t.GroupLegacy)(e).encode(o);case r.SlicesContentType:return(0,r.SlicesLegacy)(e).encode(o);default:return(0,n.NestableLegacy)(e).encode(o)}}});return zm.WidgetLegacy=a,zm}(),QW)),QW}Object.defineProperty(P,"__esModule",{value:!0}),P.migrateDocument=P.collectWidgets=P.traverseDocument=P.fillDocumentWithDefaultValues=P.DocumentLegacy=P.Document=void 0;let zy=(0,B.__importStar)(WZ),zv=zg();P.Document=zy.record(WG.WidgetKey,zv.WidgetContent);let zx=zy.record(WG.WidgetKey,zy.unknown),zb=e=>new zy.Type("Document",e=>!!e&&"object"==typeof e,t=>(0,Lq.pipe)(zx.decode(t),LP.either.map(t=>Object.entries(t).reduce((t,[n,r])=>{let i=(0,Qz.defaultCtx)(n,e),o=(0,zv.WidgetLegacy)(i).decode(r);return!o||(0,LW.isLeft)(o)?t:{...t,[n]:o.right}},{}))),t=>Object.entries(t).reduce((t,[n,r])=>{let i=(0,Qz.defaultCtx)(n,e),o=(0,zv.WidgetLegacy)(i).encode(r);return o?{content:{...t.content,[n]:o.content},types:{...t.types,...o.types}}:t},{content:{},types:{}}));function zC(e){let t=Object.entries(e),{types:n,widgets:r}=t.reduce((e,[t,n])=>{if(t.endsWith("_TYPE")){let r=Qz.FieldOrSliceType.decode(n);if((0,LW.isRight)(r))return{...e,types:e.types.set(t.substring(0,t.length-5),r.right)}}return t.endsWith("_POSITION")||t.endsWith("_TYPE")?e:{...e,widgets:{...e.widgets,[t]:n}}},{types:new Map,widgets:{}}),i=e.slugs_INTERNAL||[],o=e.uid;return{widgets:r,types:n,uid:o,slugs:i}}function zS(e){return{customTypeId:null==e?void 0:e.id,fields:Object.fromEntries((0,NW.flattenSections)(e))}}function zw({document:e,customType:t}){let n=t&&NW.StaticCustomType.is(t)?zS(t):t;return({transformWidget:t=({content:e})=>e,transformSlice:r=({content:e})=>e})=>{let i=n&&Object.entries(n.fields).reduce((e,[t,n])=>({...e,[t]:n}),{});return Object.entries(e).reduce((e,[o,a])=>{let u=i&&i[o],s=WJ.ContentPath.make([{key:null==n?void 0:n.customTypeId,type:"CustomType"},{key:o,type:"Widget"}]),l=(()=>{switch(a.__TYPE__){case"SliceContentType":return(0,zv.traverseSlices)({path:s,key:o,model:(null==u?void 0:u.type)==="Slices"||(null==u?void 0:u.type)==="Choice"?u:void 0,content:a})({transformWidget:t,transformSlice:r});case"GroupContentType":return(0,zv.traverseGroupContent)({path:s,key:o,apiId:o,model:(null==u?void 0:u.type)==="Group"?u:void 0,content:a})(t);default:return t({path:s,key:o,apiId:o,model:(null==u?void 0:u.type)!=="Group"&&(null==u?void 0:u.type)!=="Slices"&&(null==u?void 0:u.type)!=="Choice"?u:void 0,content:a})}})();return{...e,...l?{[o]:l}:{}}},{})}}function zI(e,t){let n=NW.StaticCustomType.is(t)?zS(t):t;return Object.values((0,NW.collectSharedSlices)(n)).some(e=>!!e.legacyPaths)?zw({document:e,customType:t})({transformSlice:zv.migrateSliceItem}):e}P.DocumentLegacy={_codec:zb,extractMetadata:zC,parse:function(e,t){let n=(0,Lq.pipe)(zy.record(WG.WidgetKey,zy.unknown).decode(e),LP.either.chain(e=>{let{types:t,widgets:n}=zC(e);return zb(t).decode(n)}));return(0,LW.isLeft)(n)?void 0:zI(n.right,t)},encode:function(e){let t=zb().encode(e);return{...t.content,...t.types}}},P.fillDocumentWithDefaultValues=function(e,t){let{fields:n}=e&&NW.StaticCustomType.is(e)?zS(e):e;return Object.entries(n).reduce((e,[n,r])=>{let i=t[n],o=(()=>{switch(r.type){case"Group":return(0,zv.isGroupContent)(i)?(0,zv.groupContentWithDefaultValues)(r,i):i;case"Choice":case"Slices":return(0,zv.isSlicesContent)(i)?(0,zv.slicesContentWithDefaultValues)(r,i):i;default:return void 0===i&&NW.NestableWidget.is(r)?(0,zv.NestableContentDefaultValue)(r):i}})();return o?{...e,[n]:o}:e},t)},P.traverseDocument=zw,P.collectWidgets=function(e,t){let n={};return zw({document:e})({transformWidget({content:e,path:r}){let i=WJ.ContentPath.serialize(r);return t(e,r)&&(n[i]=e),e}}),n},P.migrateDocument=zI,Object.defineProperty(eiT=R,"__esModule",{value:!0}),(0,B.__exportStar)(P,eiT),(0,B.__exportStar)(zg(),eiT),(0,B.__exportStar)(Qz,eiT);let z_={unclassified:{title:"Draft",color:"amber"},published:{title:"Live",color:"green"},release:{title:"Planned",color:"purple"},archived:{title:"Archived",color:"grey"}},zT={unclassified:["unclassified","published"],archived:["unclassified","published"],release:["release","published"],published:["published"]};function zO(e){let{documentId:t,versionId:n,baseUrl:r,status:i,releaseId:o}=e,a=(0,l.aO)({params:{s:i,v:n,r:o}}),u=new URLSearchParams(a).toString();return new URL(`pages/${t}?${u}`,r)}var zR={exports:{}},zk={};zR.exports=function(){if(i)return zk;i=1;var e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,r=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(t,i,a){var u,s={},l=null,c=null;for(u in void 0!==a&&(l=""+a),void 0!==i.key&&(l=""+i.key),void 0!==i.ref&&(c=i.ref),i)n.call(i,u)&&!o.hasOwnProperty(u)&&(s[u]=i[u]);if(t&&t.defaultProps)for(u in i=t.defaultProps)void 0===s[u]&&(s[u]=i[u]);return{$$typeof:e,type:t,key:l,ref:c,props:s,_owner:r.current}}return zk.Fragment=t,zk.jsx=a,zk.jsxs=a,zk}();var zE=zR.exports;let zM="media-library-newMediaLibraryFeaturesBannerClosed";function zF(e){let{maxWidth:t}=e,[n,r]=(0,c.useState)(()=>!(b.Xb.isAvailable()&&b.Xb.read(zM)));return n?zE.jsx(f.xu,{justifyContent:"center",padding:{inline:16,block:12},backgroundColor:"purple9",children:zE.jsxs(f.xu,{maxWidth:t,width:"100%",alignItems:"center",gap:8,children:[zE.jsx(f.xu,{borderRadius:"100%",alignItems:"center",justifyContent:"center",width:28,height:28,border:!0,borderColor:"purple8",flexShrink:0,children:zE.jsx(f.I5,{name:"autoFixHigh",color:"white",size:"small"})}),zE.jsxs("div",{children:[zE.jsx(f.xv,{color:"white",variant:"bold",children:"New features on the Media Library coming soon!"}),zE.jsxs(f.xu,{gap:4,flexWrap:"wrap",children:[zE.jsx(f.xv,{color:"white",children:"Media Tagging, Filtering, Improved Search & Bulk Deletion"}),zE.jsx(f.xv,{color:"white",variant:"bold",href:"https://prismic.io/lp/new-media-library",target:"_blank",rel:"noopener noreferrer",underline:!0,children:"Get notified →"})]})]}),zE.jsx(f.zx,{invisible:!0,color:"white",sx:{marginLeft:"auto",marginBottom:"auto",flexShrink:0},underline:!0,onClick:function(){r(!1),b.Xb.isAvailable()&&b.Xb.write(zM,String(Date.now()))},children:"Close"})]})}):null}function zj(){return zE.jsx(f.xu,{justifyContent:"center",flexDirection:"column",height:"100%",backgroundColor:"grey3",children:zE.jsxs(f.R$,{children:[zE.jsx(f.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),zE.jsx(f._T,{size:"big",children:'"Oops!"'}),zE.jsx(f.nf,{width:360,children:'"We can\'t find any items with that name"'})]})})}let zU={warning:{uploadWhileUploading:{title:"Hang tight!",description:"Your current images are still being uploaded. Once they're all set, you'll be free to upload more."}}},zK=(0,c.createContext)(void 0);function zL(){let e=(0,c.useContext)(zK);if(!e)throw Error("Missing EditorConfigContext.Provider");return e}class zB extends Error{}function zP(e){throw new zB(`Missing EditorConfig.${e}`)}(eiO=o||(o={})).assertEqual=e=>e,eiO.assertIs=function(e){},eiO.assertNever=function(e){throw Error()},eiO.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},eiO.getValidEnumValues=e=>{let t=eiO.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),n={};for(let r of t)n[r]=e[r];return eiO.objectValues(n)},eiO.objectValues=e=>eiO.objectKeys(e).map(function(t){return e[t]}),eiO.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},eiO.find=(e,t)=>{for(let n of e)if(t(n))return n},eiO.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,eiO.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},eiO.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(eiR=a||(a={})).mergeShapes=(e,t)=>({...e,...t});let zW=o.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),zD=e=>{switch(typeof e){case"undefined":return zW.undefined;case"string":return zW.string;case"number":return isNaN(e)?zW.nan:zW.number;case"boolean":return zW.boolean;case"function":return zW.function;case"bigint":return zW.bigint;case"symbol":return zW.symbol;case"object":return Array.isArray(e)?zW.array:null===e?zW.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?zW.promise:"u">typeof Map&&e instanceof Map?zW.map:"u">typeof Set&&e instanceof Set?zW.set:"u">typeof Date&&e instanceof Date?zW.date:zW.object;default:return zW.unknown}},zN=o.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),zq=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class zQ extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let o=n,a=0;for(;a<i.path.length;){let u=i.path[a];a===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(t(i))):o[u]=o[u]||{_errors:[]},o=o[u],a++}}};return r(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,o.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}zQ.create=e=>new zQ(e);let zV=(e,t)=>{let n;switch(e.code){case zN.invalid_type:n=e.received===zW.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case zN.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,o.jsonStringifyReplacer)}`;break;case zN.unrecognized_keys:n=`Unrecognized key(s) in object: ${o.joinValues(e.keys,", ")}`;break;case zN.invalid_union:n="Invalid input";break;case zN.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${o.joinValues(e.options)}`;break;case zN.invalid_enum_value:n=`Invalid enum value. Expected ${o.joinValues(e.options)}, received '${e.received}'`;break;case zN.invalid_arguments:n="Invalid function arguments";break;case zN.invalid_return_type:n="Invalid function return type";break;case zN.invalid_date:n="Invalid date";break;case zN.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:o.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case zN.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case zN.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case zN.custom:n="Invalid input";break;case zN.invalid_intersection_types:n="Intersection results could not be merged";break;case zN.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case zN.not_finite:n="Number must be finite";break;default:n=t.defaultError,o.assertNever(e)}return{message:n}},zz=zV;function zY(e){zz=e}function zH(){return zz}let zZ=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o},u="",s=r.filter(e=>!!e).slice().reverse();for(let l of s)u=l(a,{data:t,defaultError:u}).message;return{...i,path:o,message:i.message||u}};function zJ(e,t){let n=zZ({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,zz,zV].filter(e=>!!e)});e.common.issues.push(n)}class zG{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let r of t){if("aborted"===r.status)return z$;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let r of t)n.push({key:await r.key,value:await r.value});return zG.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:i,value:o}=r;if("aborted"===i.status||"aborted"===o.status)return z$;"dirty"===i.status&&e.dirty(),"dirty"===o.status&&e.dirty(),("u">typeof o.value||r.alwaysSet)&&(n[i.value]=o.value)}return{status:e.value,value:n}}}let z$=Object.freeze({status:"aborted"}),zX=e=>({status:"dirty",value:e}),z0=e=>({status:"valid",value:e}),z1=e=>"aborted"===e.status,z2=e=>"dirty"===e.status,z6=e=>"valid"===e.status,z5=e=>"u">typeof Promise&&e instanceof Promise;(eik=u||(u={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},eik.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class z3{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let z9=(e,t)=>{if(z6(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new zQ(e.common.issues);return this._error=n,this._error}}};function z4(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:typeof t.data>"u"?{message:r??t.defaultError}:{message:n??t.defaultError},description:i}}class z7{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return zD(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:zD(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new zG,ctx:{common:e.parent.common,data:e.data,parsedType:zD(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(z5(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;let r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:zD(e)},i=this._parseSync({data:e,path:r.path,parent:r});return z9(r,i)}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:zD(e)},r=this._parse({data:e,path:n.path,parent:n}),i=await (z5(r)?r:Promise.resolve(r));return z9(n,i)}refine(e,t){let n=e=>"string"==typeof t||typeof t>"u"?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,r)=>{let i=e(t),o=()=>r.addIssue({code:zN.custom,...n(t)});return"u">typeof Promise&&i instanceof Promise?i.then(e=>!!e||(o(),!1)):!!i||(o(),!1)})}refinement(e,t){return this._refinement((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1))}_refinement(e){return new YP({schema:this,typeName:s.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return YW.create(this,this._def)}nullable(){return YD.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return YC.create(this,this._def)}promise(){return YB.create(this,this._def)}or(e){return Yw.create([this,e],this._def)}and(e){return YT.create(this,e,this._def)}transform(e){return new YP({...z4(this._def),schema:this,typeName:s.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new YN({...z4(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:s.ZodDefault})}brand(){return new Yz({typeName:s.ZodBranded,type:this,...z4(this._def)})}catch(e){return new Yq({...z4(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:s.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return YY.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let z8=/^c[^\s-]{8,}$/i,Ye=/^[a-z][a-z0-9]*$/,Yt=/[0-9A-HJKMNP-TV-Z]{26}/,Yn=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,Yr=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,Yi=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),Yo=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Ya=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Yu=e=>e.precision?e.offset?RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):0===e.precision?e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Ys(e,t){return!!(("v4"===t||!t)&&Yo.test(e)||("v6"===t||!t)&&Ya.test(e))}class Yl extends z7{constructor(){super(...arguments),this._regex=(e,t,n)=>this.refinement(t=>e.test(t),{validation:t,code:zN.invalid_string,...u.errToObj(n)}),this.nonempty=e=>this.min(1,u.errToObj(e)),this.trim=()=>new Yl({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new Yl({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new Yl({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==zW.string){let t=this._getOrReturnCtx(e);return zJ(t,{code:zN.invalid_type,expected:zW.string,received:t.parsedType}),z$}let n=new zG,r;for(let i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(zJ(r=this._getOrReturnCtx(e,r),{code:zN.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if("max"===i.kind)e.data.length>i.value&&(zJ(r=this._getOrReturnCtx(e,r),{code:zN.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if("length"===i.kind){let a=e.data.length>i.value,u=e.data.length<i.value;(a||u)&&(r=this._getOrReturnCtx(e,r),a?zJ(r,{code:zN.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&zJ(r,{code:zN.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if("email"===i.kind)Yr.test(e.data)||(zJ(r=this._getOrReturnCtx(e,r),{validation:"email",code:zN.invalid_string,message:i.message}),n.dirty());else if("emoji"===i.kind)Yi.test(e.data)||(zJ(r=this._getOrReturnCtx(e,r),{validation:"emoji",code:zN.invalid_string,message:i.message}),n.dirty());else if("uuid"===i.kind)Yn.test(e.data)||(zJ(r=this._getOrReturnCtx(e,r),{validation:"uuid",code:zN.invalid_string,message:i.message}),n.dirty());else if("cuid"===i.kind)z8.test(e.data)||(zJ(r=this._getOrReturnCtx(e,r),{validation:"cuid",code:zN.invalid_string,message:i.message}),n.dirty());else if("cuid2"===i.kind)Ye.test(e.data)||(zJ(r=this._getOrReturnCtx(e,r),{validation:"cuid2",code:zN.invalid_string,message:i.message}),n.dirty());else if("ulid"===i.kind)Yt.test(e.data)||(zJ(r=this._getOrReturnCtx(e,r),{validation:"ulid",code:zN.invalid_string,message:i.message}),n.dirty());else if("url"===i.kind)try{new URL(e.data)}catch{zJ(r=this._getOrReturnCtx(e,r),{validation:"url",code:zN.invalid_string,message:i.message}),n.dirty()}else"regex"===i.kind?(i.regex.lastIndex=0,i.regex.test(e.data)||(zJ(r=this._getOrReturnCtx(e,r),{validation:"regex",code:zN.invalid_string,message:i.message}),n.dirty())):"trim"===i.kind?e.data=e.data.trim():"includes"===i.kind?e.data.includes(i.value,i.position)||(zJ(r=this._getOrReturnCtx(e,r),{code:zN.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):"toLowerCase"===i.kind?e.data=e.data.toLowerCase():"toUpperCase"===i.kind?e.data=e.data.toUpperCase():"startsWith"===i.kind?e.data.startsWith(i.value)||(zJ(r=this._getOrReturnCtx(e,r),{code:zN.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):"endsWith"===i.kind?e.data.endsWith(i.value)||(zJ(r=this._getOrReturnCtx(e,r),{code:zN.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):"datetime"===i.kind?Yu(i).test(e.data)||(zJ(r=this._getOrReturnCtx(e,r),{code:zN.invalid_string,validation:"datetime",message:i.message}),n.dirty()):"ip"===i.kind?Ys(e.data,i.version)||(zJ(r=this._getOrReturnCtx(e,r),{validation:"ip",code:zN.invalid_string,message:i.message}),n.dirty()):o.assertNever(i);return{status:n.value,value:e.data}}_addCheck(e){return new Yl({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...u.errToObj(e)})}url(e){return this._addCheck({kind:"url",...u.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...u.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...u.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...u.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...u.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...u.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...u.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(null==e?void 0:e.precision)>"u"?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...u.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...u.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...u.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...u.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...u.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...u.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...u.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...u.errToObj(t)})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function Yc(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}Yl.create=e=>{var t;return new Yl({checks:[],typeName:s.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...z4(e)})};class Yd extends z7{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==zW.number){let t=this._getOrReturnCtx(e);return zJ(t,{code:zN.invalid_type,expected:zW.number,received:t.parsedType}),z$}let n,r=new zG;for(let i of this._def.checks)"int"===i.kind?o.isInteger(e.data)||(zJ(n=this._getOrReturnCtx(e,n),{code:zN.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(zJ(n=this._getOrReturnCtx(e,n),{code:zN.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):"max"===i.kind?(i.inclusive?e.data>i.value:e.data>=i.value)&&(zJ(n=this._getOrReturnCtx(e,n),{code:zN.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):"multipleOf"===i.kind?0!==Yc(e.data,i.value)&&(zJ(n=this._getOrReturnCtx(e,n),{code:zN.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(zJ(n=this._getOrReturnCtx(e,n),{code:zN.not_finite,message:i.message}),r.dirty()):o.assertNever(i);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,u.toString(t))}gt(e,t){return this.setLimit("min",e,!1,u.toString(t))}lte(e,t){return this.setLimit("max",e,!0,u.toString(t))}lt(e,t){return this.setLimit("max",e,!1,u.toString(t))}setLimit(e,t,n,r){return new Yd({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:u.toString(r)}]})}_addCheck(e){return new Yd({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:u.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:u.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:u.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:u.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:u.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&o.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Yd.create=e=>new Yd({checks:[],typeName:s.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...z4(e)});class Yf extends z7{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==zW.bigint){let t=this._getOrReturnCtx(e);return zJ(t,{code:zN.invalid_type,expected:zW.bigint,received:t.parsedType}),z$}let n,r=new zG;for(let i of this._def.checks)"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(zJ(n=this._getOrReturnCtx(e,n),{code:zN.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):"max"===i.kind?(i.inclusive?e.data>i.value:e.data>=i.value)&&(zJ(n=this._getOrReturnCtx(e,n),{code:zN.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(zJ(n=this._getOrReturnCtx(e,n),{code:zN.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):o.assertNever(i);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,u.toString(t))}gt(e,t){return this.setLimit("min",e,!1,u.toString(t))}lte(e,t){return this.setLimit("max",e,!0,u.toString(t))}lt(e,t){return this.setLimit("max",e,!1,u.toString(t))}setLimit(e,t,n,r){return new Yf({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:u.toString(r)}]})}_addCheck(e){return new Yf({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:u.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Yf.create=e=>{var t;return new Yf({checks:[],typeName:s.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...z4(e)})};class Yp extends z7{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==zW.boolean){let t=this._getOrReturnCtx(e);return zJ(t,{code:zN.invalid_type,expected:zW.boolean,received:t.parsedType}),z$}return z0(e.data)}}Yp.create=e=>new Yp({typeName:s.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...z4(e)});class YA extends z7{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==zW.date){let t=this._getOrReturnCtx(e);return zJ(t,{code:zN.invalid_type,expected:zW.date,received:t.parsedType}),z$}if(isNaN(e.data.getTime())){let n=this._getOrReturnCtx(e);return zJ(n,{code:zN.invalid_date}),z$}let r=new zG,i;for(let a of this._def.checks)"min"===a.kind?e.data.getTime()<a.value&&(zJ(i=this._getOrReturnCtx(e,i),{code:zN.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):"max"===a.kind?e.data.getTime()>a.value&&(zJ(i=this._getOrReturnCtx(e,i),{code:zN.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):o.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new YA({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:u.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:u.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}YA.create=e=>new YA({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:s.ZodDate,...z4(e)});class Yh extends z7{_parse(e){if(this._getType(e)!==zW.symbol){let t=this._getOrReturnCtx(e);return zJ(t,{code:zN.invalid_type,expected:zW.symbol,received:t.parsedType}),z$}return z0(e.data)}}Yh.create=e=>new Yh({typeName:s.ZodSymbol,...z4(e)});class Ym extends z7{_parse(e){if(this._getType(e)!==zW.undefined){let t=this._getOrReturnCtx(e);return zJ(t,{code:zN.invalid_type,expected:zW.undefined,received:t.parsedType}),z$}return z0(e.data)}}Ym.create=e=>new Ym({typeName:s.ZodUndefined,...z4(e)});class Yg extends z7{_parse(e){if(this._getType(e)!==zW.null){let t=this._getOrReturnCtx(e);return zJ(t,{code:zN.invalid_type,expected:zW.null,received:t.parsedType}),z$}return z0(e.data)}}Yg.create=e=>new Yg({typeName:s.ZodNull,...z4(e)});class Yy extends z7{constructor(){super(...arguments),this._any=!0}_parse(e){return z0(e.data)}}Yy.create=e=>new Yy({typeName:s.ZodAny,...z4(e)});class Yv extends z7{constructor(){super(...arguments),this._unknown=!0}_parse(e){return z0(e.data)}}Yv.create=e=>new Yv({typeName:s.ZodUnknown,...z4(e)});class Yx extends z7{_parse(e){let t=this._getOrReturnCtx(e);return zJ(t,{code:zN.invalid_type,expected:zW.never,received:t.parsedType}),z$}}Yx.create=e=>new Yx({typeName:s.ZodNever,...z4(e)});class Yb extends z7{_parse(e){if(this._getType(e)!==zW.undefined){let t=this._getOrReturnCtx(e);return zJ(t,{code:zN.invalid_type,expected:zW.void,received:t.parsedType}),z$}return z0(e.data)}}Yb.create=e=>new Yb({typeName:s.ZodVoid,...z4(e)});class YC extends z7{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==zW.array)return zJ(t,{code:zN.invalid_type,expected:zW.array,received:t.parsedType}),z$;if(null!==r.exactLength){let i=t.data.length>r.exactLength.value,o=t.data.length<r.exactLength.value;(i||o)&&(zJ(t,{code:i?zN.too_big:zN.too_small,minimum:o?r.exactLength.value:void 0,maximum:i?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(zJ(t,{code:zN.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(zJ(t,{code:zN.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new z3(t,e,t.path,n)))).then(e=>zG.mergeArray(n,e));let a=[...t.data].map((e,n)=>r.type._parseSync(new z3(t,e,t.path,n)));return zG.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new YC({...this._def,minLength:{value:e,message:u.toString(t)}})}max(e,t){return new YC({...this._def,maxLength:{value:e,message:u.toString(t)}})}length(e,t){return new YC({...this._def,exactLength:{value:e,message:u.toString(t)}})}nonempty(e){return this.min(1,e)}}YC.create=(e,t)=>new YC({type:e,minLength:null,maxLength:null,exactLength:null,typeName:s.ZodArray,...z4(t)});class YS extends z7{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=o.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==zW.object){let t=this._getOrReturnCtx(e);return zJ(t,{code:zN.invalid_type,expected:zW.object,received:t.parsedType}),z$}let{status:n,ctx:r}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Yx&&"strip"===this._def.unknownKeys))for(let u in r.data)o.includes(u)||a.push(u);let s=[];for(let l of o){let c=i[l],d=r.data[l];s.push({key:{status:"valid",value:l},value:c._parse(new z3(r,d,r.path,l)),alwaysSet:l in r.data})}if(this._def.catchall instanceof Yx){let f=this._def.unknownKeys;if("passthrough"===f)for(let p of a)s.push({key:{status:"valid",value:p},value:{status:"valid",value:r.data[p]}});else if("strict"===f)a.length>0&&(zJ(r,{code:zN.unrecognized_keys,keys:a}),n.dirty());else if("strip"!==f)throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let A=this._def.catchall;for(let h of a){let m=r.data[h];s.push({key:{status:"valid",value:h},value:A._parse(new z3(r,m,r.path,h)),alwaysSet:h in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of s){let n=await t.key;e.push({key:n,value:await t.value,alwaysSet:t.alwaysSet})}return e}).then(e=>zG.mergeObjectSync(n,e)):zG.mergeObjectSync(n,s)}get shape(){return this._def.shape()}strict(e){return u.errToObj,new YS({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,i,o,a;let s=null!==(o=null===(i=(r=this._def).errorMap)||void 0===i?void 0:i.call(r,t,n).message)&&void 0!==o?o:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=u.errToObj(e).message)&&void 0!==a?a:s}:{message:s}}}:{}})}strip(){return new YS({...this._def,unknownKeys:"strip"})}passthrough(){return new YS({...this._def,unknownKeys:"passthrough"})}extend(e){return new YS({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new YS({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:s.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new YS({...this._def,catchall:e})}pick(e){let t={};return o.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new YS({...this._def,shape:()=>t})}omit(e){let t={};return o.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new YS({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(!(t instanceof YS))return t instanceof YC?new YC({...t._def,type:e(t.element)}):t instanceof YW?YW.create(e(t.unwrap())):t instanceof YD?YD.create(e(t.unwrap())):t instanceof YO?YO.create(t.items.map(t=>e(t))):t;{let n={};for(let r in t.shape){let i=t.shape[r];n[r]=YW.create(e(i))}return new YS({...t._def,shape:()=>n})}}(this)}partial(e){let t={};return o.objectKeys(this.shape).forEach(n=>{let r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}),new YS({...this._def,shape:()=>t})}required(e){let t={};return o.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let r=this.shape[n];for(;r instanceof YW;)r=r._def.innerType;t[n]=r}}),new YS({...this._def,shape:()=>t})}keyof(){return YU(o.objectKeys(this.shape))}}YS.create=(e,t)=>new YS({shape:()=>e,unknownKeys:"strip",catchall:Yx.create(),typeName:s.ZodObject,...z4(t)}),YS.strictCreate=(e,t)=>new YS({shape:()=>e,unknownKeys:"strict",catchall:Yx.create(),typeName:s.ZodObject,...z4(t)}),YS.lazycreate=(e,t)=>new YS({shape:e,unknownKeys:"strip",catchall:Yx.create(),typeName:s.ZodObject,...z4(t)});class Yw extends z7{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(function(e){for(let n of e)if("valid"===n.result.status)return n.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let i=e.map(e=>new zQ(e.ctx.common.issues));return zJ(t,{code:zN.invalid_union,unionErrors:i}),z$});{let r,i=[];for(let o of n){let a={...t,common:{...t.common,issues:[]},parent:null},u=o._parseSync({data:t.data,path:t.path,parent:a});if("valid"===u.status)return u;"dirty"!==u.status||r||(r={result:u,ctx:a}),a.common.issues.length&&i.push(a.common.issues)}if(r)return t.common.issues.push(...r.ctx.common.issues),r.result;let s=i.map(e=>new zQ(e));return zJ(t,{code:zN.invalid_union,unionErrors:s}),z$}}get options(){return this._def.options}}Yw.create=(e,t)=>new Yw({options:e,typeName:s.ZodUnion,...z4(t)});let YI=e=>e instanceof YF?YI(e.schema):e instanceof YP?YI(e.innerType()):e instanceof Yj?[e.value]:e instanceof YK?e.options:e instanceof YL?Object.keys(e.enum):e instanceof YN?YI(e._def.innerType):e instanceof Ym?[void 0]:e instanceof Yg?[null]:null;class Y_ extends z7{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==zW.object)return zJ(t,{code:zN.invalid_type,expected:zW.object,received:t.parsedType}),z$;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(zJ(t,{code:zN.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),z$)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let r=new Map;for(let i of t){let o=YI(i.shape[e]);if(!o)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of o){if(r.has(a))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);r.set(a,i)}}return new Y_({typeName:s.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...z4(n)})}}class YT extends z7{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(z1(e)||z1(r))return z$;let i=function e(t,n){let r=zD(t),i=zD(n);if(t===n)return{valid:!0,data:t};if(r===zW.object&&i===zW.object){let a=o.objectKeys(n),u=o.objectKeys(t).filter(e=>-1!==a.indexOf(e)),s={...t,...n};for(let l of u){let c=e(t[l],n[l]);if(!c.valid)return{valid:!1};s[l]=c.data}return{valid:!0,data:s}}if(r!==zW.array||i!==zW.array)return r===zW.date&&i===zW.date&&+t==+n?{valid:!0,data:t}:{valid:!1};{if(t.length!==n.length)return{valid:!1};let d=[];for(let f=0;f<t.length;f++){let p=t[f],A=n[f],h=e(p,A);if(!h.valid)return{valid:!1};d.push(h.data)}return{valid:!0,data:d}}}(e.value,r.value);return i.valid?((z2(e)||z2(r))&&t.dirty(),{status:t.value,value:i.data}):(zJ(n,{code:zN.invalid_intersection_types}),z$)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}YT.create=(e,t,n)=>new YT({left:e,right:t,typeName:s.ZodIntersection,...z4(n)});class YO extends z7{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==zW.array)return zJ(n,{code:zN.invalid_type,expected:zW.array,received:n.parsedType}),z$;if(n.data.length<this._def.items.length)return zJ(n,{code:zN.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),z$;!this._def.rest&&n.data.length>this._def.items.length&&(zJ(n,{code:zN.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new z3(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>zG.mergeArray(t,e)):zG.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new YO({...this._def,rest:e})}}YO.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new YO({items:e,typeName:s.ZodTuple,rest:null,...z4(t)})};class YR extends z7{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==zW.object)return zJ(n,{code:zN.invalid_type,expected:zW.object,received:n.parsedType}),z$;let r=[],i=this._def.keyType,o=this._def.valueType;for(let a in n.data)r.push({key:i._parse(new z3(n,a,n.path,a)),value:o._parse(new z3(n,n.data[a],n.path,a))});return n.common.async?zG.mergeObjectAsync(t,r):zG.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new YR(t instanceof z7?{keyType:e,valueType:t,typeName:s.ZodRecord,...z4(n)}:{keyType:Yl.create(),valueType:e,typeName:s.ZodRecord,...z4(t)})}}class Yk extends z7{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==zW.map)return zJ(n,{code:zN.invalid_type,expected:zW.map,received:n.parsedType}),z$;let r=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([e,t],o)=>({key:r._parse(new z3(n,e,n.path,[o,"key"])),value:i._parse(new z3(n,t,n.path,[o,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let e of o){let n=await e.key,r=await e.value;if("aborted"===n.status||"aborted"===r.status)return z$;("dirty"===n.status||"dirty"===r.status)&&t.dirty(),a.set(n.value,r.value)}return{status:t.value,value:a}})}{let u=new Map;for(let s of o){let l=s.key,c=s.value;if("aborted"===l.status||"aborted"===c.status)return z$;("dirty"===l.status||"dirty"===c.status)&&t.dirty(),u.set(l.value,c.value)}return{status:t.value,value:u}}}}Yk.create=(e,t,n)=>new Yk({valueType:t,keyType:e,typeName:s.ZodMap,...z4(n)});class YE extends z7{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==zW.set)return zJ(n,{code:zN.invalid_type,expected:zW.set,received:n.parsedType}),z$;let r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(zJ(n,{code:zN.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(zJ(n,{code:zN.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function o(e){let n=new Set;for(let r of e){if("aborted"===r.status)return z$;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let a=[...n.data.values()].map((e,t)=>i._parse(new z3(n,e,n.path,t)));return n.common.async?Promise.all(a).then(e=>o(e)):o(a)}min(e,t){return new YE({...this._def,minSize:{value:e,message:u.toString(t)}})}max(e,t){return new YE({...this._def,maxSize:{value:e,message:u.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}YE.create=(e,t)=>new YE({valueType:e,minSize:null,maxSize:null,typeName:s.ZodSet,...z4(t)});class YM extends z7{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==zW.function)return zJ(t,{code:zN.invalid_type,expected:zW.function,received:t.parsedType}),z$;function n(e,n){return zZ({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,zz,zV].filter(e=>!!e),issueData:{code:zN.invalid_arguments,argumentsError:n}})}function r(e,n){return zZ({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,zz,zV].filter(e=>!!e),issueData:{code:zN.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},o=t.data;return this._def.returns instanceof YB?z0(async(...e)=>{let t=new zQ([]),a=await this._def.args.parseAsync(e,i).catch(r=>{throw t.addIssue(n(e,r)),t}),u=await o(...a);return await this._def.returns._def.type.parseAsync(u,i).catch(e=>{throw t.addIssue(r(u,e)),t})}):z0((...e)=>{let t=this._def.args.safeParse(e,i);if(!t.success)throw new zQ([n(e,t.error)]);let a=o(...t.data),u=this._def.returns.safeParse(a,i);if(!u.success)throw new zQ([r(a,u.error)]);return u.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new YM({...this._def,args:YO.create(e).rest(Yv.create())})}returns(e){return new YM({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new YM({args:e||YO.create([]).rest(Yv.create()),returns:t||Yv.create(),typeName:s.ZodFunction,...z4(n)})}}class YF extends z7{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}YF.create=(e,t)=>new YF({getter:e,typeName:s.ZodLazy,...z4(t)});class Yj extends z7{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return zJ(t,{received:t.data,code:zN.invalid_literal,expected:this._def.value}),z$}return{status:"valid",value:e.data}}get value(){return this._def.value}}function YU(e,t){return new YK({values:e,typeName:s.ZodEnum,...z4(t)})}Yj.create=(e,t)=>new Yj({value:e,typeName:s.ZodLiteral,...z4(t)});class YK extends z7{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),n=this._def.values;return zJ(t,{expected:o.joinValues(n),received:t.parsedType,code:zN.invalid_type}),z$}if(-1===this._def.values.indexOf(e.data)){let r=this._getOrReturnCtx(e),i=this._def.values;return zJ(r,{received:r.data,code:zN.invalid_enum_value,options:i}),z$}return z0(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e){return YK.create(e)}exclude(e){return YK.create(this.options.filter(t=>!e.includes(t)))}}YK.create=YU;class YL extends z7{_parse(e){let t=o.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==zW.string&&n.parsedType!==zW.number){let r=o.objectValues(t);return zJ(n,{expected:o.joinValues(r),received:n.parsedType,code:zN.invalid_type}),z$}if(-1===t.indexOf(e.data)){let i=o.objectValues(t);return zJ(n,{received:n.data,code:zN.invalid_enum_value,options:i}),z$}return z0(e.data)}get enum(){return this._def.values}}YL.create=(e,t)=>new YL({values:e,typeName:s.ZodNativeEnum,...z4(t)});class YB extends z7{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==zW.promise&&!1===t.common.async)return zJ(t,{code:zN.invalid_type,expected:zW.promise,received:t.parsedType}),z$;let n=t.parsedType===zW.promise?t.data:Promise.resolve(t.data);return z0(n.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}YB.create=(e,t)=>new YB({type:e,typeName:s.ZodPromise,...z4(t)});class YP extends z7{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===s.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null;if("preprocess"===r.type){let i=r.transform(n.data);return n.common.async?Promise.resolve(i).then(e=>this._def.schema._parseAsync({data:e,path:n.path,parent:n})):this._def.schema._parseSync({data:i,path:n.path,parent:n})}let a={addIssue(e){zJ(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),"refinement"===r.type){let u=e=>{let t=r.refinement(e,a);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>"aborted"===e.status?z$:("dirty"===e.status&&t.dirty(),u(e.value).then(()=>({status:t.value,value:e.value}))));{let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===s.status?z$:("dirty"===s.status&&t.dirty(),u(s.value),{status:t.value,value:s.value})}}if("transform"===r.type){if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>z6(e)?Promise.resolve(r.transform(e.value,a)).then(e=>({status:t.value,value:e})):e);{let l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!z6(l))return l;let c=r.transform(l.value,a);if(c instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:c}}}o.assertNever(r)}}YP.create=(e,t,n)=>new YP({schema:e,typeName:s.ZodEffects,effect:t,...z4(n)}),YP.createWithPreprocess=(e,t,n)=>new YP({schema:t,effect:{type:"preprocess",transform:e},typeName:s.ZodEffects,...z4(n)});class YW extends z7{_parse(e){return this._getType(e)===zW.undefined?z0(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}YW.create=(e,t)=>new YW({innerType:e,typeName:s.ZodOptional,...z4(t)});class YD extends z7{_parse(e){return this._getType(e)===zW.null?z0(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}YD.create=(e,t)=>new YD({innerType:e,typeName:s.ZodNullable,...z4(t)});class YN extends z7{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===zW.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}YN.create=(e,t)=>new YN({innerType:e,typeName:s.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...z4(t)});class Yq extends z7{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return z5(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new zQ(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new zQ(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Yq.create=(e,t)=>new Yq({innerType:e,typeName:s.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...z4(t)});class YQ extends z7{_parse(e){if(this._getType(e)!==zW.nan){let t=this._getOrReturnCtx(e);return zJ(t,{code:zN.invalid_type,expected:zW.nan,received:t.parsedType}),z$}return{status:"valid",value:e.data}}}YQ.create=e=>new YQ({typeName:s.ZodNaN,...z4(e)});let YV=Symbol("zod_brand");class Yz extends z7{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class YY extends z7{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?z$:"dirty"===e.status?(t.dirty(),zX(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let r=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?z$:"dirty"===r.status?(t.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:n.path,parent:n})}}static create(e,t){return new YY({in:e,out:t,typeName:s.ZodPipeline})}}let YH=(e,t={},n)=>e?Yy.create().superRefine((r,i)=>{var o,a;if(!e(r)){let u="function"==typeof t?t(r):"string"==typeof t?{message:t}:t,s=null===(a=null!==(o=u.fatal)&&void 0!==o?o:n)||void 0===a||a;i.addIssue({code:"custom",..."string"==typeof u?{message:u}:u,fatal:s})}}):Yy.create(),YZ={object:YS.lazycreate};(eiE=s||(s={})).ZodString="ZodString",eiE.ZodNumber="ZodNumber",eiE.ZodNaN="ZodNaN",eiE.ZodBigInt="ZodBigInt",eiE.ZodBoolean="ZodBoolean",eiE.ZodDate="ZodDate",eiE.ZodSymbol="ZodSymbol",eiE.ZodUndefined="ZodUndefined",eiE.ZodNull="ZodNull",eiE.ZodAny="ZodAny",eiE.ZodUnknown="ZodUnknown",eiE.ZodNever="ZodNever",eiE.ZodVoid="ZodVoid",eiE.ZodArray="ZodArray",eiE.ZodObject="ZodObject",eiE.ZodUnion="ZodUnion",eiE.ZodDiscriminatedUnion="ZodDiscriminatedUnion",eiE.ZodIntersection="ZodIntersection",eiE.ZodTuple="ZodTuple",eiE.ZodRecord="ZodRecord",eiE.ZodMap="ZodMap",eiE.ZodSet="ZodSet",eiE.ZodFunction="ZodFunction",eiE.ZodLazy="ZodLazy",eiE.ZodLiteral="ZodLiteral",eiE.ZodEnum="ZodEnum",eiE.ZodEffects="ZodEffects",eiE.ZodNativeEnum="ZodNativeEnum",eiE.ZodOptional="ZodOptional",eiE.ZodNullable="ZodNullable",eiE.ZodDefault="ZodDefault",eiE.ZodCatch="ZodCatch",eiE.ZodPromise="ZodPromise",eiE.ZodBranded="ZodBranded",eiE.ZodPipeline="ZodPipeline";let YJ=(e,t={message:`Input not instance of ${e.name}`})=>YH(t=>t instanceof e,t),YG=Yl.create,Y$=Yd.create,YX=YQ.create,Y0=Yf.create,Y1=Yp.create,Y2=YA.create,Y6=Yh.create,Y5=Ym.create,Y3=Yg.create,Y9=Yy.create,Y4=Yv.create,Y7=Yx.create,Y8=Yb.create,He=YC.create,Ht=YS.create,Hn=YS.strictCreate,Hr=Yw.create,Hi=Y_.create,Ho=YT.create,Ha=YO.create,Hu=YR.create,Hs=Yk.create,Hl=YE.create,Hc=YM.create,Hd=YF.create,Hf=Yj.create,Hp=YK.create,HA=YL.create,Hh=YB.create,Hm=YP.create,Hg=YW.create,Hy=YD.create,Hv=YP.createWithPreprocess,Hx=YY.create,Hb=()=>YG().optional(),HC=()=>Y$().optional(),HS=()=>Y1().optional();var Hw=Object.freeze({__proto__:null,defaultErrorMap:zV,setErrorMap:zY,getErrorMap:zH,makeIssue:zZ,EMPTY_PATH:[],addIssueToContext:zJ,ParseStatus:zG,INVALID:z$,DIRTY:zX,OK:z0,isAborted:z1,isDirty:z2,isValid:z6,isAsync:z5,get util(){return o},get objectUtil(){return a},ZodParsedType:zW,getParsedType:zD,ZodType:z7,ZodString:Yl,ZodNumber:Yd,ZodBigInt:Yf,ZodBoolean:Yp,ZodDate:YA,ZodSymbol:Yh,ZodUndefined:Ym,ZodNull:Yg,ZodAny:Yy,ZodUnknown:Yv,ZodNever:Yx,ZodVoid:Yb,ZodArray:YC,ZodObject:YS,ZodUnion:Yw,ZodDiscriminatedUnion:Y_,ZodIntersection:YT,ZodTuple:YO,ZodRecord:YR,ZodMap:Yk,ZodSet:YE,ZodFunction:YM,ZodLazy:YF,ZodLiteral:Yj,ZodEnum:YK,ZodNativeEnum:YL,ZodPromise:YB,ZodEffects:YP,ZodTransformer:YP,ZodOptional:YW,ZodNullable:YD,ZodDefault:YN,ZodCatch:Yq,ZodNaN:YQ,BRAND:YV,ZodBranded:Yz,ZodPipeline:YY,custom:YH,Schema:z7,ZodSchema:z7,late:YZ,get ZodFirstPartyTypeKind(){return s},coerce:{string:e=>Yl.create({...e,coerce:!0}),number:e=>Yd.create({...e,coerce:!0}),boolean:e=>Yp.create({...e,coerce:!0}),bigint:e=>Yf.create({...e,coerce:!0}),date:e=>YA.create({...e,coerce:!0})},any:Y9,array:He,bigint:Y0,boolean:Y1,date:Y2,discriminatedUnion:Hi,effect:Hm,enum:Hp,function:Hc,instanceof:YJ,intersection:Ho,lazy:Hd,literal:Hf,map:Hs,nan:YX,nativeEnum:HA,never:Y7,null:Y3,nullable:Hy,number:Y$,object:Ht,oboolean:HS,onumber:HC,optional:Hg,ostring:Hb,pipeline:Hx,preprocess:Hv,promise:Hh,record:Hu,set:Hl,strictObject:Hn,string:YG,symbol:Y6,transformer:Hm,tuple:Ha,undefined:Y5,union:Hr,unknown:Y4,void:Y8,NEVER:z$,ZodIssueCode:zN,quotelessJson:zq,ZodError:zQ});let HI=Hw.object({id:Hw.string(),label:Hw.string(),repeatable:Hw.boolean(),status:Hw.boolean()}),H_=Hw.array(HI);function HT(e,t,n){return(0,y.WY)(new URL("customtypes",e),{headers:{repository:t},credentials:(0,y.xb)(n),okType:H_})}let HO=Hw.object({first_name:Hw.string().optional(),last_name:Hw.string().optional(),email:Hw.string().email().optional()}),HR=Hw.object({id:Hw.string(),name:Hw.string(),is_master:Hw.boolean().optional()}),Hk=Hw.discriminatedUnion("status",[Hw.object({status:Hw.literal("unclassified")}),Hw.object({status:Hw.literal("published")}),Hw.object({status:Hw.literal("release"),release_id:Hw.string()}),Hw.object({status:Hw.literal("archived")})]).and(Hw.object({version_id:Hw.string(),tags:Hw.array(Hw.string()),custom_type_label:Hw.string(),preview_summary:Hw.string().optional(),preview_image:Hw.string().optional(),last_modified_date:Hw.coerce.date(),author:HO,uid:Hw.string().optional()})),HE=Hw.object({id:Hw.string(),title:Hw.string().nullish().transform(e=>e??"Untitled"),custom_type_id:Hw.string(),group_lang_id:Hw.string(),language:HR,versions:Hw.array(Hk)}),HM=Hw.object({total:Hw.number(),cursor:Hw.string().optional(),results:Hw.array(HE)});function HF(e){return e.reduce((e,t)=>{if(t.values.every(e=>""===e))return e;let n=t.values.map(e=>[t.name,e]);return e.concat(n)},[])}function Hj(e,t,n){return(0,y.WY)(new URL(`documents/${n}`,e),{credentials:(0,y.xb)(t),okType:HE})}let HU=Hw.object({id:Hw.string(),firstname:Hw.string().optional(),lastname:Hw.string().optional(),email:Hw.string()}),HK=Hw.array(HU),HL=Hw.object({simulator_url:Hw.string().url().nullish(),languages:Hw.array(HR).transform(e=>(0,g.DY)(e,e=>e.name)),authors:HK.optional().default([])}).transform(({simulator_url:e,...t})=>{let n=e&&function(e){let t=(0,l.ju)(e);return!!t&&t.pathname.endsWith("/slice-simulator")}(e)?e:void 0;return{...t,simulatorUrl:n}});function HB(e,t){return(0,y.WY)(new URL("repository",e),{credentials:(0,y.xb)(t),okType:HL})}let HP=Hw.object({results:Hw.array(Hw.string())});function HW(e,t){return(0,y.WY)(new URL("repository/tags",e),{credentials:(0,y.xb)(t),okType:HP})}let HD=Hw.array(Hw.string()).optional().transform(e=>null==e?void 0:e[0]),HN=Hw.object({id:Hw.string(),kind:Hw.string(),extension:Hw.string().optional(),filename:Hw.string(),width:Hw.number().optional(),height:Hw.number().optional(),last_modified:Hw.number(),url:Hw.string(),alt:Hw.string().optional(),size:Hw.number(),notes:Hw.string().optional(),credits:Hw.string().optional(),search_highlight:Hw.object({filename:HD,alt:HD,notes:HD,credits:HD}).optional()}),Hq={"X-Prismic-Source":"Wroom"},HQ=Hw.object({total:Hw.number(),cursor:Hw.string().optional(),items:Hw.array(HN)});function HV(e,t,n,r,i,o,a,u){let s=e?new URL("assets",e):void 0,l=new URLSearchParams(HF([{name:"limit",values:["30"]},{name:"cursor",values:[u??""]},{name:"keyword",values:[i]},{name:"assetType",values:[r]},{name:"opensearch",values:o?["true"]:[]}])).toString(),c=HQ.transform(e=>({...e,assetType:r,keyword:i,page:a})),d=performance.now();return(0,y.WY)(`${(null==s?void 0:s.href)??""}?${l}`,{headers:{repository:t,...Hq},credentials:(0,y.xb)(n),okType:c}).then(e=>({...e,time:(performance.now()-d).toFixed(0)}))}function Hz(e){HJ(t=>t.flatMap(t=>{let n=e.find(e=>e.id===t.id);return n?void 0===n.response?[]:{...t,...n.response}:t}))}function HY(e){HJ(t=>t.filter(t=>t.id!==e))}function HH(e){(0,m.YC)(HV,t=>t.keyword===e?void 0:t)}function HZ(e,t,n){let r=e.filter(e=>e.assetType===t&&e.keyword===n),i=(0,g.DY)(r,e=>e.page).flatMap(e=>e.items);return n?(0,g.mN)(i,e=>e.id):i}function HJ(e){(0,m.YC)(HV,t=>{let{items:n,total:r}=t,i=e(n,t);if(i)return{...t,total:r+(i.length-n.length),items:i}})}function HG(e){let{config:t,assetType:n}=e;if(!t.mediaLibrary)throw Error("media library is not configured");let{assetsApiBaseUrl:r,authStrategy:i,repository:o}=t;(0,m.gw)(HV,HX({assetsApiBaseUrl:r,repository:o,authStrategy:i,assetType:n,keyword:"",useOpenSearch:!1,page:0}))}function H$(e){let{config:t,assetType:n}=e;if(!t.mediaLibrary)throw Error("media library is not configured");(0,m.YC)(HV,e=>0===e.page?e:void 0),HG({config:t,assetType:n})}function HX(e){return[e.assetsApiBaseUrl,e.repository,e.authStrategy,e.assetType,e.keyword,e.useOpenSearch,e.page,e.cursor]}m.Fs.registerFetcherConfig(HV,{revalidationStrategy:{type:"never"}});let H0,H1=new Uint8Array(16);function H2(){if(!H0&&!(H0="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return H0(H1)}let H6=[];for(let H5=0;H5<256;++H5)H6.push((H5+256).toString(16).slice(1));let H3="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),H9={randomUUID:H3},H4=(0,c.createContext)(void 0);function H7(e){let{children:t,assetType:n="all",onSelectedChange:r,actionContainerRef:i}=e,[o,a]=(0,c.useState)(new Set),[u,s]=(0,c.useTransition)(),[l,d]=(0,c.useTransition)(),p=zL(),{showAlert:A}=(0,f.VY)(),{keyword:h,setKeyword:g,media:b,fetchNextPage:C,hasNextPage:S,updateMedia:w,unshiftMedia:I,deleteMedia:_,mediaTotal:T,deleteSearchData:O,revalidateFirstPage:R}=function(e){let{assetType:t="all",mode:n}=e,r=zL(),[i,o]=(0,c.useState)({keyword:"",page:0});r.mediaLibrary||zP("mediaLibrary");let{assetsApiBaseUrl:a,authStrategy:u,repository:s,useOpenSearch:l}=r,{keyword:d,page:f,cursor:p}=i,A=(0,m.QT)(HV,HX({assetsApiBaseUrl:a,authStrategy:u,repository:s,assetType:t,keyword:d,useOpenSearch:l&&!!d,page:f,cursor:p}));!function(e){let{assetType:t,keyword:n,mode:r}=e,i=zL();i.mediaLibrary||zP("mediaLibrary");let{useOpenSearch:o,onAnalyticsEvent:a}=i,u=(0,m.q_)(HV),s=u[u.length-1],l=(0,c.useRef)(s);l.current=s,(0,c.useEffect)(()=>{if(!a||!n||!l.current||l.current.keyword!==n)return;let e=String(n.split(" ").length),i=String(l.current.total);a("Media Library Search",{searchQuery:n,numberOfWords:e,numberOfResults:i,timeToGetResults:l.current.time,useOpenSearch:o&&n?"1":"0",assetType:t,mode:r})},[n,o,t,r,a])}({assetType:t,keyword:d,mode:n});let h=function(e,t){let n=(0,m.q_)(HV);return HZ(n,e,t)}(t,d),g=A.total!==h.length;return{keyword:d,setKeyword:function(e){o({keyword:e,page:0,cursor:void 0})},media:h,mediaTotal:A.total,limit:30,hasNextPage:g,fetchNextPage:function(){void 0!==A.cursor&&o(e=>({...e,page:e.page+1,cursor:A.cursor}))},updateMedia:Hz,unshiftMedia:function(e){o(e=>({...e,page:0,cursor:void 0})),HJ((t,n)=>{if(0===n.page)return[...e,...t]})},deleteMedia:HY,deleteSearchData:HH,revalidateFirstPage:HG}}({assetType:n,mode:r?"select":"browse"}),{isMediaRevalidationInProgress:k,isMediaCacheInvalid:E,revalidateMedia:M}=function(e){let{revalidate:t,config:n,assetType:r}=e,{assetsApiBaseUrl:i,repository:o="",authStrategy:a="token"}=n.mediaLibrary?n:{},[u,s]=(0,c.useState)(!1),[l,d]=(0,c.useState)(!1);return(0,m.NN)({fetcher:HV,requestParams:HX({assetsApiBaseUrl:i,repository:o,authStrategy:a,assetType:r,keyword:"",useOpenSearch:!1,page:0}),validator(e,t){var n,r,i,o;let a=(null==(n=e.items[0])?void 0:n.id)??"",u=(null==(i=null==(r=t[0])?void 0:r.items[0])?void 0:i.id)??"";return a!==u||e.total!==(null==(o=t[0])?void 0:o.total)},onCacheInvalidated:()=>d(!0),every:6e4}),(0,c.useEffect)(()=>{u&&(d(!1),s(!1))},[u]),{isMediaRevalidationInProgress:u,isMediaCacheInvalid:l,revalidateMedia:function(){s(!0),t()}}}({assetType:n,config:p,revalidate:function(){g(""),H$({config:p,assetType:n})}}),{isUploading:F,onFilesSelected:j,uploadingFiles:U,onRetry:K}=function(e){let{onBeforeUpload:t,onComplete:n}=e,[r,i]=(0,c.useState)([]),o=r.some(e=>"idle"===e.status||"uploading"===e.status),a=zL(),u=(0,c.useCallback)(e=>{let n=[{...e,status:"idle"},...r.filter(t=>t.id!==e.id)];i(n),t(n)},[t,r]);return(0,c.useEffect)(function(){if(!r.length||r.some(e=>"uploading"===e.status)||r.every(e=>"error"===e.status))return;let e=r.find(e=>"idle"===e.status);if(!e)return;let t=r;function o(e){t=e(t),i(t),t.every(e=>"success"===e.status||"error"===e.status)&&setTimeout(()=>{i([]),null==n||n(t)},1500)}o(t=>t.map(t=>t.id===e.id?{...t,status:"uploading"}:t)),(function(e){let{file:t,config:n}=e;if(!n.mediaLibrary)throw Error("Media Library not configured.");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n,a=new FormData;return a.append(t.name,t),(0,y.WY)(new URL("assets",r),{headers:{repository:i,"Content-Type":"multipart/form-data",...Hq},method:"POST",body:a,credentials:(0,y.xb)(o),okType:HN})})({file:e.file,config:a}).then(t=>{o(n=>n.map(n=>n.id===e.id?{...n,status:"success",response:t}:n))}).catch(()=>{o(t=>t.map(t=>t.id===e.id?{...t,status:"error"}:t))})},[a,r,n]),{isUploading:o,uploadingFiles:r,onFilesSelected:function(e){let n=e.map(e=>({id:`temp-${function(e,t,n){if(H9.randomUUID&&!t&&!e)return H9.randomUUID();e=e||{};let r=e.random||(e.rng||H2)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return function(e,t=0){return H6[e[t+0]]+H6[e[t+1]]+H6[e[t+2]]+H6[e[t+3]]+"-"+H6[e[t+4]]+H6[e[t+5]]+"-"+H6[e[t+6]]+H6[e[t+7]]+"-"+H6[e[t+8]]+H6[e[t+9]]+"-"+H6[e[t+10]]+H6[e[t+11]]+H6[e[t+12]]+H6[e[t+13]]+H6[e[t+14]]+H6[e[t+15]]}(r)}()}`,file:e,status:"idle"}));i(n),t(n)},onRetry:u}}({onBeforeUpload(e){g("");let t=e.filter(e=>"idle"===e.status).map(e=>({id:e.id,url:URL.createObjectURL(e.file),filename:e.file.name,size:e.file.size,extension:e.file.type,kind:e.file.type,last_modified:e.file.lastModified}));I(t);let[n]=t??[];n&&a(new Set([n.id]))},onComplete(e){let t=e.flatMap(e=>"success"===e.status?e:(function(e){let t=(0,x.tx)(e.file.name,30);A({id:e.id,title:`The specified file "${t}" could not be uploaded.`,subtitle:zE.jsxs(f.xv,{color:"inherit",children:["Read more about our"," ",zE.jsx(f.xv,{color:"tomato11",href:"https://prismic.io/docs/guides/manage-images#supported-media",underline:!0,children:"supported media"}),"."]}),buttons:{action:{text:"Retry upload",icon:"cloudUpload",onClick:()=>K(e)}}})}(e),{id:e.id,response:void 0}));w(t),R({config:p,assetType:n});let i=t[0];i&&i.response&&o.has(i.id)&&(a(e=>(0,v.IH)((0,v.Od)(e,i.id),i.response.id)),null==r||r(new Set([i.response.id])))}});function L(e,t){let n=new Set(o),i=U.some(t=>t.id===e&&"success"!==t.status);if(P(!1),"replace"===t)return a(new Set([e])),i||null==r?void 0:r(new Set([e]));n[t](e),a(n),"add"===t&&i||null==r||r(n)}let[B,P]=(0,c.useState)(!1);return zE.jsx(H4.Provider,{value:{isFetchingMedia:u,media:b,mediaTotal:T,onScrollToBottom:function(){S&&s(C)},selectedMediaIds:o,actionContainerRef:i,onFilesUpload:function(e){F||j(e)},isUploading:F,uploadingFiles:U,addMediaItemSelection:function(e){L(e,"add")},removeMediaItemSelection:function(e){L(e,"delete")},replaceMediaItemSelection:function(e){L(e,"replace")},isMediaRevalidationInProgress:k,isMediaCacheInvalid:E,revalidateMedia:M,deleteMedia:_,updateMedia:function(e,t){w([{id:e,response:t}])},keyword:h,onKeywordChange:function(e){e&&O(e),d(()=>{g(e),null==r||r(new Set),a(new Set)})},isSearchingMedia:l,assetType:n,tagManagerOpen:B,setTagManagerOpen:P},children:t})}function H8(){let e=(0,c.useContext)(H4);if(!e)throw Error("useMediaLibrary must be used within a MediaLibraryProvider");return e}function Ze(){let{actionContainerRef:e,isUploading:t,onFilesUpload:n,assetType:r}=H8(),i=null==e?void 0:e.current;return zE.jsx(Zn,{actionContainerRef:e,children:zE.jsxs(f.xu,{width:"100%",gap:16,children:[zE.jsx(Zt,{}),zE.jsx(f.u,{title:zU.warning.uploadWhileUploading.title,content:zU.warning.uploadWhileUploading.description,visible:t,stableMount:!0,children:zE.jsx(f.KH,{disabled:t,onFilesSelected:n,startIcon:"cloudUpload",color:i?"purple":"grey",size:"large",assetType:r,children:"Upload media"})})]})})}function Zt(){let{keyword:e,onKeywordChange:t,isFetchingMedia:n}=H8(),[r,i]=(0,c.useState)(e);return(0,p.pQ)(e,()=>{""===e&&i("")}),(0,p.Nr)(r,300,(0,p.R9)(e=>t(e))),zE.jsx(f.xu,{width:"100%",flexDirection:"column",children:zE.jsx(f.CR,{value:r,placeholder:"Search",onValueChange:i,maxLength:200,isLoading:n&&e!==r})})}function Zn(e){let{children:t,actionContainerRef:n}=e,r=null==n?void 0:n.current,i=r?f.Uv:c.Fragment,o=r?{container:n.current,asChild:!0}:{};return zE.jsx(i,{...o,children:t})}function Zr(e){let{children:t}=e,{onFilesUpload:n,assetType:r}=H8();return zE.jsx(f.Zz,{overlay:zE.jsx(Zi,{}),onFilesSelected:n,assetType:r,children:t})}function Zi(){let{isUploading:e}=H8(),t=e?zU.warning.uploadWhileUploading.title:"Drop files here",n=e?zU.warning.uploadWhileUploading.description:"Drop your files to upload them instantly to the media library.";return zE.jsx(f.xu,{justifyContent:"center",flexDirection:"column",height:"100%",backgroundColor:"grey3",children:zE.jsxs(f.R$,{children:[zE.jsx(f.av,{name:e?"block":"cloudUpload",lineColor:e?"tomato11":"purple10",backgroundColor:e?"tomato2":"purple3",borderColor:e?"tomato6":"purple6",borderStyle:"dashed",size:"xlarge"}),zE.jsx(f._T,{size:"big",children:t}),zE.jsx(f.nf,{width:360,children:n})]})})}function Zo(){return zE.jsx(f.Iq,{title:"Oops! Something went wrong",description:"An error occurred while searching for your image.",errorImageSrc:f.Os,sx:{marginBlock:"auto",marginInline:"auto"}})}function Za(e){let{mediaList:t,mediaActions:n,mediaToolbar:r,sidePane:i}=e,o=(0,f.ac)({min:"medium"});return zE.jsxs(f.xu,{display:"grid",gridTemplateRows:"auto auto 1fr",gridTemplateColumns:o?"1fr 380px":"1fr",width:"100%",height:"100%",children:[zE.jsxs(f.xu,{position:"relative",display:"grid",gap:16,gridColumn:"1",gridRow:"1",padding:{right:16,bottom:16},children:[n,r]}),zE.jsx(f.xu,{position:"relative",display:"grid",gridColumn:"1",gridRow:"2 / -1",children:t}),o&&i]})}function Zu(e){let{count:t}=e;return zE.jsxs(f.xv,{variant:"bold",children:[t," items"]})}function Zs(){var e;let{onScrollToBottom:t,media:n,selectedMediaIds:r,removeMediaItemSelection:i,addMediaItemSelection:o,replaceMediaItemSelection:a,isUploading:u,uploadingFiles:s,isSearchingMedia:l,isMediaRevalidationInProgress:d}=H8(),p=(0,c.useRef)(null);return(u||l||d)&&(null==(e=p.current)||e.scrollTo({top:0,behavior:"instant"})),zE.jsx(Zl,{onScrollToBottom:t,scrollAreaRef:p,children:n.map(e=>{var t,n;return zE.jsx(f.PB,{"aria-label":"media item",...e,filenameHighlight:null==(t=e.search_highlight)?void 0:t.filename,loading:l,status:null==(n=s.find(t=>t.id===e.id))?void 0:n.status,selected:r.has(e.id),onCardClick:()=>(function(e){if(1===r.size&&r.has(e)){i(e);return}a(e)})(e.id),onCheckedChange:()=>(function(e){if(r.has(e)){i(e);return}o(e)})(e.id)},e.id)})})}function Zl(e){let{children:t,scrollAreaRef:n,onScrollToBottom:r}=e,i="calc((100% - 48px) / 4)";return zE.jsx(f.xr,{"aria-label":"Media list",ref:n,style:{display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(max(250px, ${i}), 1fr))`,gridTemplateRows:"1fr 1fr 1fr ",gap:16,paddingBottom:16,position:"relative"},onScrollToBottom:r,threshold:500,children:t})}function Zc(e){let{children:t,hasSelectedMedia:n}=e;return zE.jsx(f.xu,{overflow:"hidden",gridColumn:"2 / -1",gridRow:"1 / -1",children:zE.jsx(f.xr,{style:{display:"grid",height:"100%"},children:zE.jsx(f.xu,{flexGrow:1,borderRadius:{topRight:8,topLeft:8},borderStyle:n?"solid":"dashed",border:{top:!0,right:!0,left:!0,bottom:!1},minWidth:0,children:t})})})}function Zd(e){let{onFilesUpload:t,isUploading:n,isInitialLoad:r=!1}=e,i=r||n;return zE.jsxs(f.xu,{flexDirection:"column",justifyContent:"center",alignItems:"center",padding:16,gap:16,width:"100%",children:[zE.jsx(f.av,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),zE.jsx(f.xu,{flexDirection:"column",gap:4,children:zE.jsxs(f.xv,{align:"center",children:["Select or"," ",zE.jsx(f.KH,{disabled:i,onFilesSelected:t,renderButton:e=>zE.jsx(f.u,{title:zU.warning.uploadWhileUploading.title,content:zU.warning.uploadWhileUploading.description,visible:n,children:zE.jsx(f.xu,{display:"inline-flex",as:"span",children:zE.jsx(f.zx,{disabled:i,onClick:e,invisible:!0,children:"upload"})})})})," ","media."]})}),zE.jsx(f.KH,{disabled:i,onFilesSelected:t,color:"grey",children:"Upload media"})]})}function Zf(e){let{actionContainerRef:t}=e;return zE.jsx(Za,{sidePane:zE.jsx(Zh,{}),mediaActions:zE.jsx(ZA,{actionContainerRef:t}),mediaToolbar:zE.jsx(f.Od,{color:"grey5",borderRadius:12,children:zE.jsx(Zu,{count:888})}),mediaList:zE.jsx(Zp,{})})}function Zp(){return zE.jsx(Zl,{children:(0,g.w6)(1,24).map(e=>zE.jsx(Zm,{},e))})}function ZA(e){let{actionContainerRef:t}=e,n=(0,p.NW)();return(0,c.useLayoutEffect)(()=>{n()},[n]),zE.jsx(Zn,{actionContainerRef:t,children:zE.jsxs(f.xu,{width:"100%",gap:16,children:[zE.jsx(f.xu,{width:"100%",flexDirection:"column",children:zE.jsx(f.CR,{placeholder:"Search",maxLength:200,value:"",disabled:!0,onValueChange(){}})}),zE.jsx(f.KH,{disabled:!0,onFilesSelected(){},startIcon:"cloudUpload",color:t?"purple":"grey",size:"large",children:"Upload media"})]})})}function Zh(){return zE.jsx(Zc,{hasSelectedMedia:!1,children:zE.jsx(Zd,{onFilesUpload(){},isUploading:!1,isInitialLoad:!0})})}function Zm(){return zE.jsxs(f.xu,{height:302,width:"100%",flexDirection:"column",padding:16,backgroundColor:"grey1",border:!0,borderStyle:"solid",borderRadius:6,children:[zE.jsx(f.Od,{height:164,width:"100%"}),zE.jsx(f.Od,{height:16,width:"100%",sx:{marginTop:12}}),zE.jsx(f.Od,{height:10,width:100,sx:{marginTop:8}}),zE.jsx(f.Od,{height:1,width:"100%",sx:{marginTop:20,marginBottom:16}}),zE.jsxs(f.xu,{flexDirection:"row",gap:8,children:[zE.jsx(f.Od,{height:24,width:54}),zE.jsx(f.Od,{height:24,width:45}),zE.jsx(f.Od,{height:24,width:62})]})]})}let Zg=(0,c.createContext)({showToast(){}});function Zy(e){let{children:t}=e,{isFetchingMedia:n}=H8(),[r,i]=(0,c.useState)({title:"",seconds:5}),[o,a]=(0,c.useState)(!1),{title:u,action:s,seconds:l=1,icon:d="check"}=r,p=(0,c.useMemo)(()=>({showToast(e){i({seconds:l,...e}),a(!0)}}),[l]);return zE.jsxs(zE.Fragment,{children:[zE.jsx(Zv,{open:n}),zE.jsx(Zx,{}),zE.jsx(f.FN,{anchor:zE.jsx(f.xu,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:o,onOpenChange:a,title:u,action:s,seconds:l,icon:d}),zE.jsx(Zg.Provider,{value:p,children:t})]})}function Zv(e){let{open:t}=e;return zE.jsx(f.FN,{anchor:zE.jsx(f.xu,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),loadingIndicator:!0,open:t,title:"Loading more items ...",seconds:1})}function Zx(){let{revalidateMedia:e,isMediaCacheInvalid:t}=H8(),[n,r]=(0,c.useState)(t);return(0,p.pQ)(t,r),zE.jsx(f.FN,{anchor:zE.jsx(f.xu,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:n,title:"There has been changes to your media library",action:{title:"Update",onClick:e},cancel:{onClick:()=>r(!1)}})}let Zb=Array(20).fill(0).map((e,t)=>({value:String(t)}));function ZC(){let{media:e,mediaTotal:t,setTagManagerOpen:n}=H8(),r=zL(),[i,o]=(0,c.useState)(""),[a,u]=(0,c.useState)(!1),s=r.mediaLibrary&&r.mediaLibraryTagsEnabled;function l(e){u(e)}function d(){u(!1)}return zE.jsxs(f.xu,{alignItems:"center",gap:16,children:[0!==e.length&&zE.jsx(Zu,{count:t}),s&&zE.jsxs(f.xu,{gap:8,alignItems:"center",children:[zE.jsx(f.xv,{children:"Filter:"}),zE.jsxs(f.h_,{open:a,onOpenChange:l,children:[zE.jsx(f.$F,{children:zE.jsx(f.zx,{startIcon:"label",endIcon:"arrowDropDown",size:"small",color:"grey",children:"Tags"})}),zE.jsx(f.AW,{minWidth:256,align:"start",border:!1,childrenFocusScope:!0,children:zE.jsxs(f.BC,{variant:"attached",children:[zE.jsx(f.Ie,{value:i,onValueChange:o,placeholder:"Search for a tag",autoFocus:!0}),zE.jsx(f.KV,{children:Zb.map(e=>zE.jsx(f.c8,{onSelect:d,children:zE.jsx(f.Ct,{title:e.value,color:"purple",sx:{marginBlock:4,marginLeft:8},size:"medium"})},e.value))}),zE.jsx(f.De,{children:zE.jsx(f.zx,{invisible:!0,startIcon:"edit",textWeight:"normal",color:"dark",onClick:function(){u(!1),n(a)},children:"Manage tags"})})]})})]})]})]})}function ZS(){let{media:e,selectedMediaIds:t}=H8();return e.filter(({id:e})=>t.has(e))}function Zw(){let[e,t]=(0,c.useState)(!1),n=ZS(),{uploadingFiles:r}=H8(),[i]=n;if(!i)return null;if(n.length>1)return zE.jsxs(f.xu,{gap:8,alignItems:"center",children:[zE.jsxs(f.xv,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:[n.length," media selected"]}),zE.jsx(f.u,{content:"Open all selected media in new tabs",children:zE.jsx(f.hU,{icon:"openInFull",variant:"solid",size:"small",onClick:()=>n.forEach(e=>window.open(e.url,"_blank"))})})]});let o=r.some(e=>e.id===i.id&&"success"!==e.status);return zE.jsxs(f.xu,{gap:8,alignItems:"center",children:[zE.jsx(f.xv,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:i.filename}),zE.jsxs(f.xu,{gap:8,children:[zE.jsx(f.u,{content:"Open media in new tab",children:zE.jsx(f.hU,{icon:"openInFull",variant:"solid",size:"small",hiddenLabel:"Open media in new tab",onClick:()=>window.open(i.url,"_blank"),disabled:o})}),zE.jsx(f.u,{content:"Copy media URL",children:zE.jsx(f.hU,{icon:"link",variant:"solid",size:"small",hiddenLabel:"Copy media URL",onClick:()=>navigator.clipboard.writeText(i.url),disabled:o})}),zE.jsx(f.u,{content:"Remove media",children:zE.jsx(f.hU,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:o})}),zE.jsx(ZI,{open:e,onOpenChange:t,media:i})]})]})}function ZI(e){let{open:t,onOpenChange:n,media:r}=e,i=zL(),{showAlert:o}=(0,f.VY)(),{deleteMedia:a}=H8(),[u,s]=(0,c.useState)(!1);return zE.jsxs(f.Vq,{onOpenChange:n,open:t,size:"small",children:[zE.jsx(f.fK,{icon:"alert",title:"Remove this item from your media library?"}),zE.jsx(f.cZ,{children:zE.jsx(f.xu,{padding:16,children:zE.jsxs(f.xv,{children:["You are about to delete this item: ",zE.jsx("b",{children:r.filename})]})})}),zE.jsx(f.kX,{asFooter:!0,ok:{onClick(){var e;return e=r.id,void(s(!0),(function(e){let{id:t,config:n}=e;if(!n.mediaLibrary)throw Error("Media Library not configured.");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return(0,y.WY)(new URL(`assets/${t}`,r),{headers:{repository:i},method:"DELETE",credentials:(0,y.xb)(o),okType:Hw.unknown()})})({id:e,config:i}).then(()=>{n(!1),a(e)}).catch(()=>{n(!1),o({title:"Error",subtitle:"Something went wrong when removing the item."})}).finally(()=>{s(!1)}))},text:"Yes, I want to remove this item",color:"tomato",loading:u},cancel:{text:"Cancel"}})]})}function Z_(){var e;let t=ZS(),{uploadingFiles:n}=H8(),[r]=t;if(!r)return null;if(2===t.length)return zE.jsx(ZT,{children:t.map((e,t)=>zE.jsx("div",{style:{position:"absolute",transform:0===t?"translateX(25%) rotate(15deg) ":"translateX(-25%) rotate(-15deg) "},children:zE.jsx(ZO,{media:e})},e.id))});if(t.length>2)return zE.jsx(ZT,{children:t.slice(-4).map((e,t)=>zE.jsx("div",{style:{position:"absolute",paddingRight:16*t},children:zE.jsx(ZO,{media:e})},e.id))});let i=null==(e=n.find(e=>e.id===r.id))?void 0:e.status,o=r.kind.startsWith("image");return zE.jsx(f.xu,{flexDirection:"column",children:zE.jsx(f.hM,{children:zE.jsx(ZT,{uploadStatus:i,hasImage:o,children:o?zE.jsx(f.Ee,{src:r.url,alt:r.alt,sizing:"contain"}):zE.jsx(f.Sp,{extension:r.extension,filename:r.filename})})})})}function ZT(e){let{children:t,uploadStatus:n,hasImage:r}=e;return zE.jsxs(f.xu,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:200,width:"100%",backgroundColor:r?"transparent":"purple2",children:[t,n&&zE.jsx(f.xu,{position:"absolute",backgroundColor:"greyAlpha1",width:"100%",height:"100%",padding:{inline:16},justifyContent:"end",flexDirection:"column",children:zE.jsx(f.wI,{status:n})})]})}function ZO(e){let{media:t}=e;return zE.jsx(f.xu,{width:111,height:152,children:"image"===t.kind?zE.jsx(f.Ee,{borderRadius:8,src:t.url,alt:t.alt,sizing:"cover"}):zE.jsx(f.Sp,{extension:t.extension,filename:t.filename})})}let ZR="__MAIN_THUMBNAIL__";function Zk(e,t,n){let r=e.name===ZR?void 0:e.name,i;return[r,(i=t?(0,h.$)(n)?[n.width,n.height]:(0,h.$)(e.width)||(0,h.$)(e.height)?[e.width??void 0,e.height??void 0]:[t.origin.width,t.origin.height]:void 0)?`${i[0]??"auto"}x${i[1]??"auto"}px`:void 0]}function ZE(e){let t=new URL(e);return t.searchParams.delete("q"),t.searchParams.set("w","800"),t.searchParams.set("h","800"),t.searchParams.set("auto","compress,format"),t.searchParams.set("fit","max"),t.toString()}function ZM(e){return null!=e&&e.url?ZE(e.url):void 0}function ZF(e,t){var n;let{width:r,height:i,rect:o}=function(e,t){let[n,r]=function(e,t){let{width:n,height:r}=t??{};return n&&r?[n,r]:n?[n,Math.round(e.height*(n/e.width))]:r?[Math.round(e.width*(r/e.height)),r]:[e.width,e.height]}(e,t),i=Math.max(n/e.width,r/e.height),o=Math.round((e.width-n/i)/2),a=Math.round((e.height-r/i)/2);return{width:n,height:r,rect:{x:o,y:a,width:Math.round(n/i),height:Math.round(r/i)}}}({...e,width:(null==e?void 0:e.width)??2e3,height:(null==e?void 0:e.height)??2e3},t),a=!!(null!=t&&t.width||null!=t&&t.height);return{url:function(e,t,n,r,i){let o=new URL(e);if(i){let{x:a,y:u,width:s,height:l}=t;o.searchParams.set("rect",[a,u,s,l].join(",")),o.searchParams.set("w",n.toString()),o.searchParams.set("h",r.toString())}return o.toString()}(e.url,o,r,i,a),alt:e.alt,..."kind"in e&&"extension"in e?{credits:e.credits}:{},origin:{id:e.id,url:e.url,width:e.width??2e3,height:e.height??2e3},width:r,height:i,edit:{background:"transparent",zoom:1,crop:{x:o.x,y:o.y}}}}function Zj(e){if(!e)return"";let{filename:t,extension:n}=e;if(!n)return t;let r=RegExp(`\\.${n}$`);return t.replace(r,"")}function ZU(){let e=zL();e.mediaLibrary||zP("mediaLibrary");let{assetsApiBaseUrl:t,authStrategy:n,repository:r}=e;return(0,m.QT)(ZK,[t,r,n])}function ZK(e,t,n){return(0,y.WY)(new URL("tags",e),{credentials:(0,y.xb)(n),okType:ZB,headers:{repository:t}})}let ZL=Hw.object({id:Hw.string(),name:Hw.string(),uploader_id:Hw.string().optional(),created_at:Hw.number(),last_modified:Hw.number(),count:Hw.number().optional().default(0)}),ZB=Hw.object({items:Hw.array(ZL)});function ZP(e){(0,m.YC)(ZK,t=>{let{items:n}=t,r=e(n);if(r)return{items:r}})}function ZW(){let{setTagManagerOpen:e}=H8(),[t,n]=(0,c.useState)("");return zE.jsxs(f.xu,{flexDirection:"column",children:[zE.jsxs(f.xu,{justifyContent:"space-between",children:[zE.jsx(f.xv,{color:"grey12",variant:"bold",children:"Tags"}),zE.jsx(f.zx,{startIcon:"edit",invisible:!0,color:"dark",onClick:()=>e(!0),children:"Manage tags"})]}),zE.jsxs(f.BC,{sx:{marginTop:4,marginBottom:8},children:[zE.jsx(f.Ie,{value:t,onValueChange:n,placeholder:"Add or create a new tag"}),zE.jsx(f.KV,{side:"top",children:zE.jsx(f.SV,{children:zE.jsx(c.Suspense,{children:zE.jsx(ZD,{searchTerm:t,setSearchTerm:n})})})})]}),zE.jsx(f.xu,{flexDirection:"column",alignItems:"flex-start",gap:8,children:Zq.map(e=>zE.jsx(f.Ct,{title:e.name,size:"medium",color:"purple",onClose(){}},e.id))})]})}function ZD(e){let{searchTerm:t,setSearchTerm:n}=e,{items:r}=ZU(),i=r.filter(e=>e.name.toLowerCase().includes(t.toLowerCase()));return i.length?zE.jsx(zE.Fragment,{children:i.map(e=>zE.jsx(f.c8,{onSelect(){},children:zE.jsx(f.xu,{padding:6,children:zE.jsx(f.Ct,{title:e.name,color:"purple",size:"medium"})})},e.id))}):zE.jsx(ZN,{searchTerm:t,setSearchTerm:n})}function ZN(e){let{searchTerm:t,setSearchTerm:n}=e,r=zL(),{showAlert:i}=(0,f.VY)();return t?zE.jsxs(zE.Fragment,{children:[zE.jsx(f.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),zE.jsx(f.c8,{onSelect:function(){t&&(function(e){let{name:t,config:n}=e;n.mediaLibrary||zP("mediaLibrary");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return(0,y.WY)(new URL("tags",r),{headers:{repository:i},body:{name:t},method:"POST",credentials:(0,y.xb)(o),okType:ZL})})({name:t,config:r}).then(e=>{ZP(t=>[e,...t]),n("")}).catch(()=>{i({title:"Error",subtitle:`Something went wrong when creating the tag ${t}`})})},children:zE.jsxs(f.xu,{padding:8,flexDirection:"row",alignItems:"center",gap:4,children:[zE.jsx(f.I5,{name:"add",size:"small",color:"grey11"}),zE.jsxs(f.xv,{color:"grey12",children:['Create tag "',t,'"']})]})})]}):zE.jsx(f.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"})}let Zq=[{id:"1",name:"Workshop"},{id:"2",name:"Conference"},{id:"3",name:"Event"}];function ZQ(){let[e,t]=(0,c.useState)("description");if(1!==ZS().length)return null;let n="description"===e,r="more-info"===e;return zE.jsxs(zE.Fragment,{children:[zE.jsxs(f.xu,{border:!0,borderStyle:"solid",borderRadius:8,backgroundColor:"grey2",children:[zE.jsx(f.OK,{title:"Description",selected:n,onSelect:()=>t("description"),outline:n,background:n?void 0:"transparent",sx:{flexGrow:1,flexBasis:0}}),zE.jsx(f.OK,{title:"More info",selected:r,onSelect:()=>t("more-info"),outline:r,background:r?void 0:"transparent",sx:{flexGrow:1,flexBasis:0}})]}),zE.jsx(ZV,{tab:e})]})}function ZV(e){let{tab:t}=e;switch(t){case"description":return zE.jsx(Zz,{});case"more-info":return zE.jsx(ZY,{})}}function Zz(){let{title:e,alt:t,onBlur:n,isUploading:r,selectedMedia:i}=ZH(),o=zL(),a=o.mediaLibrary&&o.mediaLibraryTagsEnabled;if(!i)return null;let{extension:u}=i;return zE.jsxs(f.xu,{flexDirection:"column",gap:16,children:[zE.jsx(f.yt,{value:e.value,onValueChange:e.set,label:"Media title",placeholder:"Media title",onBlur:n,disabled:r,suffix:u?`.${u}`:void 0}),zE.jsx(f.Wi,{label:"Alternative text",children:zE.jsx(f.f$,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"A short description of the media for accessibility",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})}),a&&zE.jsx(ZW,{})]})}function ZY(){let{credits:e,notes:t,onBlur:n,isUploading:r,selectedMedia:i}=ZH();if(!i)return null;let o=function(e){let{width:t,height:n,last_modified:r,size:i,extension:o}=e,a=t&&n,u={label:"Date",value:(0,A._L)(new Date(r))},s={label:"File size",value:(0,x.td)(i)},l=a?{label:"Dimensions",value:`${t}x${n}`}:void 0,c=a?{label:"Ratio",value:((t??0)/(n??0)).toFixed(1)}:void 0,d=o?{label:"Extension",value:o.toUpperCase()}:void 0;return[u,s,l,c,d].filter(h.$)}(i);return zE.jsxs(f.xu,{gap:8,flexDirection:"column",children:[o.map(e=>zE.jsxs(f.xu,{gap:8,children:[zE.jsxs(f.xv,{color:"grey11",children:[e.label,":"]}),zE.jsx(f.xv,{children:e.value})]},e.label)),zE.jsx(f.Wi,{label:"Copyright",children:zE.jsx(f.f$,{content:e.displayValue,contentVersion:e.version,readOnly:r,placeholder:"Media copyrights or credits",multiline:!0,decorations:{em:"highlight"},onChange:e.onChange,onBlur:n})}),zE.jsx(f.Wi,{label:"Private notes",children:zE.jsx(f.f$,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"Private notes are never shared publicly",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})})]})}function ZH(){let[e]=ZS(),{updateMedia:t,uploadingFiles:n}=H8(),r=zL(),{showToast:i}=(0,c.useContext)(Zg),o=(null==e?void 0:e.id)??"",a=ZZ(e,"alt"),u=ZZ(e,"notes"),s=ZZ(e,"credits"),l=ZZ(e,"filename",Zj),d=n.some(t=>t.id===(null==e?void 0:e.id)&&"success"!==t.status);return{selectedMedia:e,onBlur:function(){if(!e||!l.changed&&!a.changed&&!s.changed&&!u.changed)return;let{extension:n,search_highlight:c}=e,d=n?`${l.value}.${n}`:l.value;t(o,{filename:d,alt:a.value,credits:s.value,notes:u.value,search_highlight:{alt:a.changed||null==c?void 0:c.alt,credits:s.changed||null==c?void 0:c.credits,filename:l.changed||null==c?void 0:c.filename,notes:u.changed||null==c?void 0:c.notes}}),(function(e){let{id:t,config:n,metadata:r}=e;if(!n.mediaLibrary)throw Error("Media Library not configured.");let{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return(0,y.WY)(new URL(`assets/${t}`,i),{headers:{repository:o},body:{...r},method:"PATCH",credentials:(0,y.xb)(a),okType:HN})})({id:o,config:r,metadata:{filename:d,alt:a.value,credits:s.value,notes:u.value}}).then(()=>{i({title:"Media metadata has been saved.",seconds:3})}).catch(e=>{console.error(e)})},isUploading:d,title:l,alt:a,credits:s,notes:u,extension:null==e?void 0:e.extension}}function ZZ(e,t,n=e=>null==e?void 0:e[t]){var r,i;let o=n(e)??"",[a,u]=(0,c.useState)(o);(0,p.pQ)(null==e?void 0:e.id,()=>u(o));let s=null==(r=null==e?void 0:e.search_highlight)?void 0:r[t];return{value:a,set:u,displayValue:(i=s??a,(null==i?void 0:i.replace(/\n/g,"<br>"))??""),onChange:function(e){let{from:t,to:n}=e.state.selection;e.commands.selectAll(),e.commands.unsetAllMarks(),e.commands.setTextSelection({from:t,to:n}),u(e.getText())},version:`${(null==e?void 0:e.id)??""}_${!!s}`,changed:a!==o}}function ZJ(){let{setTagManagerOpen:e}=H8(),[t,n]=(0,c.useState)("");return zE.jsxs(f.xu,{gap:20,flexDirection:"column",height:"100%",children:[zE.jsxs(f.xu,{alignItems:"center",gap:4,children:[zE.jsx(f.hU,{icon:"close",size:"small",hasPadding:!1,onClick:()=>e(!1)}),zE.jsx(f.xv,{variant:"bold",children:"Tags management"})]}),zE.jsx(f.CR,{value:t,onValueChange:n,placeholder:"Search for tags"}),zE.jsx(f.SV,{renderError:()=>zE.jsx(Z0,{}),children:zE.jsx(c.Suspense,{fallback:zE.jsx(Z1,{}),children:zE.jsx(ZG,{searchTerm:t})})})]})}function ZG(e){let{searchTerm:t}=e,{items:n}=ZU(),r=n.filter(e=>e.name.toLowerCase().includes(t.toLowerCase()));return 0===r.length?zE.jsx(f.xv,{color:"grey9",variant:"small",children:"No tags found"}):zE.jsx(f._M,{ariaLabel:"Tags list",getItemKey:e=>e.id,gap:16,items:r,children:e=>zE.jsx(Z$,{tag:e})})}function Z$(e){let{tag:t}=e,[n,r]=(0,c.useState)(!1),i=zL(),{showAlert:o}=(0,f.VY)(),{showToast:a}=(0,f.pm)();return zE.jsxs(zE.Fragment,{children:[zE.jsxs(f.xu,{justifyContent:"space-between",children:[zE.jsx(f.Ct,{title:t.name,color:"purple",size:"medium",onEdit:function(e){(function(e){let{id:t,name:n,config:r}=e;r.mediaLibrary||zP("mediaLibrary");let{assetsApiBaseUrl:i,repository:o,authStrategy:a}=r;return(0,y.WY)(new URL(`tags/${t}`,i),{headers:{repository:o},method:"PATCH",credentials:(0,y.xb)(a),body:{name:n},okType:Hw.unknown()})})({id:t.id,name:e,config:i}).then(()=>{ZP(n=>n.map(n=>n.id===t.id?{...n,name:e}:n)),a({title:`Tag "${e}" renamed`})}).catch(()=>{o({title:"Error",subtitle:"Something went wrong when renaming the tag."})})}}),zE.jsx(f.zx,{invisible:!0,color:"tomato",textWeight:"normal",onClick:()=>r(!0),children:"Delete"})]}),zE.jsx(ZX,{open:n,onOpenChange:r,tag:t})]})}function ZX(e){let{open:t,onOpenChange:n,tag:r}=e,{id:i,name:o,count:a}=r,u=zL(),{showAlert:s}=(0,f.VY)(),[l,d]=(0,c.useState)(!1);return zE.jsxs(f.Vq,{onOpenChange:n,open:t,size:"small",children:[zE.jsx(f.fK,{title:`This tag is being used on ${a} media item${1===a?"":"s"}`}),zE.jsx(f.cZ,{padding:16,children:zE.jsxs(f.xv,{children:["You are about to delete the tag name ",zE.jsx("b",{children:o}),"."," ",a>0&&`This tag is being
6
+ used on ${a} media item${1===a?"":"s"} and will be deleted
7
+ from ${1===a?"it":"them"}.`]})}),zE.jsx(f.kX,{asFooter:!0,ok:{onClick:function(){d(!0),(function(e){let{id:t,config:n}=e;n.mediaLibrary||zP("mediaLibrary");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return(0,y.WY)(new URL(`tags/${t}`,r),{headers:{repository:i},method:"DELETE",credentials:(0,y.xb)(o),okType:Hw.unknown()})})({id:i,config:u}).then(()=>{ZP(e=>e.filter(e=>e.id!==i))}).catch(()=>{s({title:"Error",subtitle:"Something went wrong when removing the tag."})}).finally(()=>{d(!1),n(!1)})},text:"Yes, I want to delete",color:"tomato",loading:l},cancel:{text:"Cancel"}})]})}function Z0(){let e=(0,c.useContext)(m.Nk);return zE.jsx(f.xu,{flexDirection:"column",children:zE.jsxs(f.R$,{children:[zE.jsx(f.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed"}),zE.jsx(f._T,{size:"big",children:"Oops!"}),zE.jsx(f.nf,{width:360,children:"We couldn't load your media tags."}),zE.jsx(f.Qj,{children:zE.jsx(f.zx,{onClick:null==e?void 0:e.reset,size:"medium",children:"Try again"})})]})})}function Z1(){return zE.jsx(f.xu,{flexDirection:"column",gap:16,children:(0,g.w6)(0,5).map(e=>zE.jsxs(f.xu,{justifyContent:"space-between",children:[zE.jsx(f.Od,{height:24,width:85}),zE.jsx(f.Od,{height:24,width:45})]},e))})}function Z2(){let e=ZS(),{onFilesUpload:t,isUploading:n,tagManagerOpen:r}=H8();return 0===e.length&&!1===r?zE.jsx(Zd,{onFilesUpload:t,isUploading:n}):zE.jsx(f.xu,{flexDirection:"column",backgroundColor:"grey1",width:"100%",padding:16,gap:16,borderRadius:{topLeft:8,topRight:8},children:r?zE.jsx(ZJ,{}):zE.jsxs(zE.Fragment,{children:[zE.jsx(Zw,{}),zE.jsx(Z_,{}),zE.jsx(ZQ,{})]})})}function Z6(){let{selectedMediaIds:e}=H8(),t=e.size>0;return zE.jsx(Zc,{hasSelectedMedia:t,children:zE.jsx(Z2,{})})}function Z5(e){let{assetType:t,onSelectedChange:n,actionContainerRef:r}=e;return zE.jsx(f.SV,{renderError:()=>zE.jsx(Zo,{}),children:zE.jsx(c.Suspense,{fallback:zE.jsx(Zf,{actionContainerRef:r}),children:zE.jsx(H7,{assetType:t,actionContainerRef:r,onSelectedChange:n,children:zE.jsx(Zr,{children:zE.jsx(Z3,{})})})})})}function Z3(){let{media:e}=H8();return zE.jsx(Zy,{children:zE.jsx(Za,{sidePane:zE.jsx(Z6,{}),mediaActions:zE.jsx(Ze,{}),mediaToolbar:zE.jsx(ZC,{}),mediaList:0===e.length?zE.jsx(zj,{}):zE.jsx(Zs,{})})})}(0,c.createContext)({editedUID:{current:!1},onEditUID(){}});let Z9=(0,c.createContext)({update(){}});function Z4(e){var t;return(null==(t=e.config)?void 0:t.label)??("Boolean"===e.type||"Separator"===e.type?void 0:e.fieldset)??e.type}function Z7(e,t){var n,r,i;return"Boolean"===e.type?(t?null==(n=e.config)?void 0:n.placeholder_true:null==(r=e.config)?void 0:r.placeholder_false)||"...":(null==(i=e.config)?void 0:i.placeholder)||"..."}function Z8(e){var t;let{content:n,field:r,id:i,readOnly:o,onContentChange:a}=e,u=(null==n?void 0:n.value)??(null==(t=r.config)?void 0:t.default_value)??!1;return zE.jsxs(f.gN,{children:[zE.jsx(f.fw,{name:"biToggle"}),zE.jsx(f.Qy,{htmlFor:i,children:Z4(r)}),zE.jsxs(f.JO,{children:[zE.jsx(f.xu,{padding:4,alignItems:"center",children:zE.jsx(f.xv,{children:Z7(r,u)})}),zE.jsx(f.rs,{id:i,sx:{alignSelf:"center",marginLeft:"auto",marginRight:12},checked:u,onCheckedChange(e){var t;o||a((t=e,{__TYPE__:"BooleanContent",value:t}))}})]})]})}function Je(e){let{id:t,field:n,content:r,onContentChange:i}=e;return zE.jsxs(f.gN,{children:[zE.jsx(f.fw,{name:"colorLens"}),zE.jsx(f.Qy,{id:t,children:Z4(n)}),zE.jsx(f.JO,{children:zE.jsx(f.xu,{padding:{left:4},alignItems:"center",children:zE.jsx(f.TC,{onValueChange(e){var t;return i((t=e,void 0===t?void 0:{__TYPE__:"FieldContent",type:"Color",value:t}))},value:null==r?void 0:r.value,"aria-labelledby":t,placeholder:Z7(n)})})})]})}function Jt(e){let{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=null!=i&&i.value?(0,A._O)(i.value):void 0;return zE.jsxs(f.gN,{children:[zE.jsx(f.fw,{name:"dateRange"}),zE.jsx(f.Qy,{id:t,children:Z4(r)}),zE.jsx(f.JO,{children:zE.jsx(f.xu,{padding:{left:4,right:12},width:"100%",flexDirection:"column",justifyContent:"center",children:zE.jsx(f.Wr,{mode:"date","aria-labelledby":t,disabled:n,value:a,onValueChange:e=>o(function(e){if(e)return{__TYPE__:"FieldContent",type:"Date",value:function(e){let t=`${e.getFullYear()}`.padStart(4,"0"),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0");return`${t}-${n}-${r}`}(e)}}(e))})})})]})}let Jn=(0,c.forwardRef)(function(e,t){return zE.jsx(f.oi,{...e,padding:Jr,ref:t,sx:{...e.sx,alignSelf:"stretch"}})}),Jr={input:{inline:4},adornment:{inline:12}},Ji=({provider:e})=>Jo[e.toLowerCase()]??zE.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zE.jsx("g",{clipPath:"url(#clip0_6524_22412)",children:zE.jsx("path",{d:"M7.99992 1.33333C4.31992 1.33333 1.33325 4.32 1.33325 8C1.33325 11.68 4.31992 14.6667 7.99992 14.6667C11.6799 14.6667 14.6666 11.68 14.6666 8C14.6666 4.32 11.6799 1.33333 7.99992 1.33333ZM2.66659 8C2.66659 7.59333 2.71992 7.19333 2.80659 6.81333L5.99325 10V10.6667C5.99325 11.4 6.59325 12 7.32658 12V13.2867C4.70658 12.9533 2.66659 10.7133 2.66659 8ZM11.9266 11.6C11.7533 11.06 11.2599 10.6667 10.6599 10.6667H9.99325V8.66667C9.99325 8.3 9.69325 8 9.32658 8H5.32658V6.66667H6.65992C7.02658 6.66667 7.32658 6.36667 7.32658 6V4.66667H8.65992C9.39325 4.66667 9.99325 4.06667 9.99325 3.33333V3.06C11.9466 3.84667 13.3333 5.76667 13.3333 8C13.3333 9.38667 12.7933 10.6533 11.9266 11.6Z",fill:"#6F6E77"})}),zE.jsx("defs",{children:zE.jsx("clipPath",{id:"clip0_6524_22412",children:zE.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),Jo={codepen:zE.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zE.jsx("g",{clipPath:"url(#clip0_6523_22409)",children:zE.jsx("path",{d:"M15.9879 5.44292C15.9843 5.42352 15.981 5.40413 15.9759 5.38517C15.9726 5.37375 15.9688 5.36298 15.9651 5.35177C15.9597 5.33497 15.9541 5.31816 15.9474 5.30179C15.9427 5.29037 15.9373 5.27938 15.9321 5.26839C15.9248 5.25288 15.9173 5.23758 15.9086 5.22271C15.9026 5.21172 15.8957 5.20138 15.889 5.19082C15.8798 5.1766 15.8703 5.1626 15.8599 5.14902C15.8524 5.13889 15.8446 5.1292 15.8365 5.1195C15.8257 5.10657 15.8141 5.09429 15.8024 5.08223C15.7934 5.07318 15.7843 5.06413 15.7748 5.05529C15.7623 5.04387 15.7494 5.0331 15.7358 5.02276C15.7255 5.01479 15.7154 5.0066 15.7046 4.99927C15.7007 4.99647 15.6973 4.99324 15.6932 4.99065L8.38116 0.115543C8.15039 -0.0385144 7.84939 -0.0385144 7.61863 0.115543L0.306176 4.99044C0.302082 4.99302 0.29885 4.99626 0.294756 4.99906C0.283983 5.0066 0.273856 5.01457 0.263514 5.02254C0.250155 5.0331 0.237011 5.04387 0.224515 5.05486C0.215034 5.06348 0.205985 5.07253 0.19715 5.0818C0.185084 5.09386 0.17388 5.10614 0.162892 5.11907C0.154704 5.12877 0.146947 5.13846 0.139406 5.14924C0.129064 5.16281 0.119583 5.1766 0.110318 5.19104C0.103639 5.20159 0.0969593 5.21194 0.0907108 5.22293C0.0820922 5.23779 0.0745509 5.25309 0.0674405 5.26817C0.0622694 5.27916 0.0566673 5.29037 0.0521425 5.30157C0.0454631 5.31795 0.0396456 5.33475 0.0342589 5.35156C0.030596 5.36276 0.0267177 5.37375 0.0237011 5.38388C0.0187455 5.40284 0.0150825 5.42201 0.0116351 5.44162C0.00969592 5.45153 0.00732581 5.46123 0.00603302 5.47136C0.00215465 5.50109 0 5.53082 0 5.56121V10.4372C0 10.4673 0.00215465 10.4975 0.00646395 10.527C0.00797221 10.5378 0.0107733 10.5464 0.0129279 10.5568C0.0163753 10.5762 0.0193919 10.5955 0.0258558 10.6149C0.0288723 10.6257 0.0323198 10.6365 0.0366291 10.6483C0.0420157 10.6656 0.0474023 10.6828 0.0538662 10.6985C0.058391 10.7093 0.0646395 10.7201 0.0689488 10.7309C0.0760591 10.7459 0.0840314 10.761 0.09265 10.7768C0.098683 10.7875 0.105578 10.7983 0.112042 10.8082C0.121307 10.8233 0.131434 10.8362 0.142207 10.8491C0.149748 10.8599 0.157289 10.8685 0.165908 10.8789C0.176897 10.8918 0.187455 10.9047 0.200382 10.9162C0.209217 10.9248 0.21762 10.9355 0.228393 10.942C0.24089 10.9528 0.254249 10.9636 0.267177 10.9748C0.277519 10.9834 0.288723 10.9898 0.297342 10.9982C0.301436 11.0004 0.303806 11.0047 0.308115 11.0067L7.61863 15.8841C7.73412 15.9617 7.86641 16.0005 8 15.9998C8.13359 15.9992 8.26588 15.9611 8.38137 15.8841L15.6938 11.0092C15.6979 11.0067 15.7014 11.0036 15.7052 11.0008C15.716 10.9933 15.7261 10.9853 15.7365 10.9773C15.7498 10.9668 15.763 10.9558 15.7755 10.9446C15.785 10.9362 15.794 10.9269 15.8031 10.9179C15.8149 10.9058 15.8263 10.8935 15.8371 10.8806C15.8453 10.8709 15.8531 10.8612 15.8606 10.8509C15.8709 10.8373 15.8804 10.8233 15.8897 10.8091C15.8964 10.7987 15.903 10.7882 15.9093 10.7776C15.9179 10.7625 15.9254 10.7472 15.9328 10.7317C15.9379 10.7207 15.9433 10.7097 15.9481 10.6985C15.9548 10.6819 15.9604 10.6651 15.9657 10.6483C15.9694 10.6371 15.9733 10.6261 15.9765 10.6149C15.9815 10.596 15.9849 10.5766 15.9886 10.5572C15.9903 10.5473 15.9929 10.5376 15.994 10.5275C15.9978 10.4977 16 10.468 16 10.4376V5.5625C16 5.53212 15.9976 5.50238 15.994 5.47265C15.9922 5.46209 15.989 5.45347 15.9869 5.44292H15.9879ZM7.99978 9.62638L5.56826 8.00005L7.99978 6.37351L10.4315 8.00005L7.99978 9.62638ZM7.31245 5.17919L4.33171 7.17288L1.92561 5.56336L7.31245 1.97221V5.17919ZM3.09515 7.99984L1.37531 9.15021V6.84947L3.09515 7.99984ZM4.33171 8.82765L7.31245 10.8211V14.0281L1.92561 10.4365L4.33171 8.82722V8.82765ZM8.68733 10.8207L11.6681 8.82722L14.0744 10.4365L8.68733 14.0277V10.8207ZM12.9046 8.00027L14.6247 6.84969V9.15064L12.9046 7.99984V8.00027ZM11.6681 7.17288L8.68733 5.1794V1.97221L14.0744 5.56336L11.6681 7.17288Z",fill:"black"})}),zE.jsx("defs",{children:zE.jsx("clipPath",{id:"clip0_6523_22409",children:zE.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),codesandbox:zE.jsxs("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zE.jsx("g",{clipPath:"url(#clip0_6523_22406)",children:zE.jsx("path",{d:"M6.24312 14.1129V8.35021L1.28724 5.49888V8.78388L3.55732 10.0999V12.5702L6.24312 14.1129ZM7.53036 14.1468L10.2658 12.571V10.0422L12.5506 8.71812V5.47426L7.53036 8.3727V14.1468ZM11.8904 4.36906L9.25164 2.83995L6.93472 4.18436L4.60022 2.8386L1.93795 4.38817L6.90626 7.24665L11.8904 4.36906ZM0 12.0115V4.02675L6.91821 0L13.8378 4.00984V11.9988L6.91805 15.985L0 12.0115Z",fill:"black"})}),zE.jsx("defs",{children:zE.jsx("clipPath",{id:"clip0_6523_22406",children:zE.jsx("rect",{width:"13.8378",height:"16",fill:"white"})})})]}),dailymotion:zE.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zE.jsxs("g",{clipPath:"url(#clip0_6523_22345)",children:[zE.jsx("path",{d:"M16 0H0V16H16V0Z",fill:"white"}),zE.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.73038 10.3003C8.40789 10.6268 8.00377 10.7901 7.51804 10.7901C7.04025 10.7901 6.64411 10.6308 6.32956 10.3122C6.01503 9.99367 5.85776 9.58351 5.85776 9.08176C5.85776 8.60389 6.01901 8.20766 6.3415 7.89306C6.66401 7.57847 7.06016 7.42118 7.52998 7.42118C7.84849 7.42118 8.13715 7.49484 8.39594 7.64219C8.65474 7.78953 8.8558 7.99063 8.99913 8.2455C9.14246 8.50034 9.21412 8.77908 9.21412 9.08176C9.21412 9.56757 9.05287 9.97376 8.73038 10.3003ZM9.10662 3.58632V6.35792C8.82791 6.07918 8.53131 5.87808 8.21678 5.75463C7.90223 5.63118 7.54988 5.56946 7.1597 5.56946C6.53062 5.56946 5.96527 5.72476 5.4636 6.03538C4.96193 6.34597 4.57176 6.77007 4.29305 7.30768C4.01435 7.84528 3.875 8.44062 3.875 9.09369C3.875 9.76269 4.01236 10.366 4.28708 10.9036C4.5618 11.4412 4.95197 11.8653 5.45763 12.1759C5.96328 12.4865 6.54258 12.6418 7.19553 12.6418C8.14312 12.6418 8.80403 12.3312 9.17831 11.71H9.20218V12.5595H11.0894V3.15625L9.10662 3.58632Z",fill:"#232323"})]}),zE.jsx("defs",{children:zE.jsx("clipPath",{id:"clip0_6523_22345",children:zE.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),flickr:zE.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zE.jsx("rect",{width:"16",height:"16",fill:"white"}),zE.jsxs("g",{clipPath:"url(#clip0_6523_22379)",children:[zE.jsx("path",{d:"M8.43286 7.78387C8.43286 9.321 9.67925 10.5674 11.2166 10.5674C12.7538 10.5674 13.9999 9.321 13.9999 7.78387C13.9999 6.24675 12.7538 5.00061 11.2166 5.00061C9.67925 5.00061 8.43286 6.24675 8.43286 7.78387Z",fill:"#FF0084"}),zE.jsx("path",{d:"M2 7.78408C2 9.32121 3.24614 10.5676 4.78352 10.5676C6.32089 10.5676 7.56703 9.32121 7.56703 7.78408C7.56703 6.24695 6.32089 5.00081 4.78352 5.00081C3.24614 5.00081 2 6.24695 2 7.78408Z",fill:"#0063DC"})]}),zE.jsx("defs",{children:zE.jsx("clipPath",{id:"clip0_6523_22379",children:zE.jsx("rect",{width:"12",height:"5.568",fill:"white",transform:"translate(2 5)"})})})]}),giphy:zE.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zE.jsx("rect",{width:"16",height:"16",fill:"#121212"}),zE.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3.38889V12.2778H5.11111V3.38889H4Z",fill:"#00FF99"}),zE.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6663 5.61111V12.2778H11.7774V5.61111H10.6663Z",fill:"#9933FF"}),zE.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.75 3H4V4.11111H8.83333V3H7.75Z",fill:"#FFF35C"}),zE.jsx("path",{d:"M9.00041 4.11111H7.33374H8.83374V3.77778L9.00041 4.11111Z",fill:"#999999"}),zE.jsx("path",{d:"M8.83374 4.11111H7.33374L8.44485 3L8.83374 3.77778V4.11111Z",fill:"#999237"}),zE.jsx("path",{d:"M10.6663 7.44444V5.77778L11.7774 6.33333L10.6663 7.44444Z",fill:"#5C1F99"}),zE.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6667 11.8889H4V13H11.7778V11.8889H10.6667Z",fill:"#00CCFF"}),zE.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6668 5.22222V4.11111H9.55569V3H8.44458V3.90739V5.0185V6.33333H9.55569H10.6668H11.7779V5.22222H10.6668Z",fill:"#FF6666"})]}),instagram:zE.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[zE.jsxs("g",{clipPath:"url(#clip0_6523_22356)",children:[zE.jsx("mask",{id:"mask0_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:zE.jsx("path",{d:"M4.70325 0.0949238C3.85627 0.1349 3.27778 0.270564 2.77227 0.468642C2.24897 0.672648 1.80537 0.946046 1.36408 1.38914C0.922279 1.83249 0.650958 2.27688 0.448504 2.8007C0.252489 3.3075 0.119662 3.88627 0.0822604 4.73377C0.045126 5.58283 0.0366102 5.85363 0.0407495 8.01522C0.0448729 10.1765 0.0544124 10.4479 0.0949012 11.2972C0.135388 12.1439 0.270546 12.7222 0.468623 13.2279C0.672886 13.7512 0.946004 14.1946 1.38935 14.6361C1.83245 15.0777 2.27708 15.3487 2.80115 15.5515C3.30744 15.7472 3.88644 15.8806 4.73369 15.9177C5.58273 15.9551 5.85379 15.9634 8.01483 15.9592C10.1769 15.9551 10.448 15.9456 11.297 15.9053C12.144 15.8648 12.722 15.7292 13.228 15.5316C13.7513 15.3268 14.1949 15.0542 14.6362 14.6109C15.0775 14.1678 15.3488 13.7231 15.5512 13.199C15.7473 12.6927 15.8806 12.1137 15.9175 11.267C15.9546 10.4174 15.9634 10.1461 15.9593 7.98478C15.9551 5.8232 15.9453 5.55239 15.9051 4.7036C15.8649 3.85609 15.7292 3.27811 15.5314 2.77208C15.3269 2.24877 15.054 1.80567 14.6109 1.36387C14.1678 0.922574 13.7232 0.650729 13.1991 0.448785C12.6926 0.252768 12.1138 0.119166 11.2666 0.0825425C10.4175 0.0448876 10.1465 0.0366393 7.98465 0.0407642C5.82336 0.0448892 5.5523 0.0541772 4.70325 0.0949238ZM4.79611 14.485C4.02004 14.4512 3.59863 14.3222 3.31776 14.2142C2.94585 14.0703 2.68046 13.8977 2.40114 13.6205C2.12234 13.3422 1.94928 13.0776 1.80408 12.7064C1.69497 12.4255 1.5637 12.0046 1.52734 11.2286C1.48788 10.3896 1.47886 10.1378 1.47498 8.01237C1.47086 5.88742 1.47859 5.63569 1.51522 4.79593C1.54848 4.02038 1.67822 3.59843 1.78602 3.31782C1.92993 2.94539 2.10196 2.68051 2.37973 2.4012C2.65801 2.12187 2.92263 1.94933 3.29402 1.80412C3.57463 1.69451 3.99555 1.56426 4.77134 1.52738C5.61084 1.48766 5.8623 1.47915 7.98723 1.47502C10.1127 1.47089 10.3644 1.47838 11.2042 1.51526C11.9797 1.54904 12.4016 1.67749 12.682 1.78607C13.0541 1.92998 13.3195 2.1015 13.5986 2.37979C13.8777 2.65808 14.0507 2.92218 14.1959 3.29435C14.3055 3.57418 14.4358 3.99562 14.4724 4.77117C14.5124 5.61068 14.5214 5.8624 14.5253 7.98736C14.5294 10.1128 14.5217 10.3646 14.4848 11.2038C14.451 11.9799 14.3223 12.4016 14.214 12.6827C14.0701 13.0543 13.898 13.3197 13.62 13.5991C13.342 13.8773 13.0774 14.0509 12.7057 14.1961C12.4256 14.3055 12.0042 14.436 11.2289 14.4729C10.3894 14.5123 10.1379 14.5214 8.01225 14.5252C5.88732 14.5294 5.63586 14.5214 4.79611 14.485ZM11.2854 3.74493C11.2864 4.27211 11.7151 4.69896 12.2422 4.69792C12.7697 4.69689 13.1965 4.2685 13.1957 3.74132C13.1947 3.21414 12.7661 2.78704 12.2386 2.78807C11.7112 2.7891 11.2844 3.21775 11.2854 3.74493ZM3.91277 8.00773C3.91714 10.2653 5.75063 12.0913 8.0076 12.0869C10.2648 12.0825 12.0919 10.2495 12.0875 7.99201C12.0831 5.73526 10.2494 3.90819 7.99188 3.91257C5.73489 3.91696 3.90837 5.75073 3.91277 8.00773ZM5.34648 8.0049C5.3439 6.53969 6.52978 5.34942 7.99471 5.34683C9.45991 5.344 10.6504 6.52937 10.6533 7.99484C10.6561 9.46031 9.47022 10.6503 8.00477 10.6532C6.53984 10.656 5.34932 9.47037 5.34648 8.0049Z",fill:"white"})}),zE.jsxs("g",{mask:"url(#mask0_6523_22356)",children:[zE.jsx("mask",{id:"mask1_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:zE.jsx("path",{d:"M16.5905 -0.583628H-0.603516V16.6106H16.5905V-0.583628Z",fill:"white"})}),zE.jsxs("g",{mask:"url(#mask1_6523_22356)",children:[zE.jsx("mask",{id:"mask2_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:zE.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),zE.jsxs("g",{mask:"url(#mask2_6523_22356)",children:[zE.jsx("mask",{id:"mask3_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:zE.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),zE.jsx("g",{mask:"url(#mask3_6523_22356)",children:zE.jsx("rect",{x:"-0.688721",y:"-0.665792",width:"17.3622",height:"17.3622",fill:"url(#pattern0)"})})]})]})]})]}),zE.jsxs("defs",{children:[zE.jsx("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:zE.jsx("use",{xlinkHref:"#image0_6523_22356",transform:"scale(0.000439947)"})}),zE.jsx("clipPath",{id:"clip0_6523_22356",children:zE.jsx("rect",{width:"16",height:"16",fill:"white"})}),zE.jsx("image",{id:"image0_6523_22356",width:"2273",height:"2275",xlinkHref:"data:image/jpeg;base64,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Hbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfw5h277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3XY/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26j+GHbqP4Yduo38MO3Ub+GHbqP4Yduo/hh26j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmNh25jYduY2HbmNh25jYduY2HbmNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh0+Nh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jhz+j7fweHn/AFd+fp9v6v8Ape79DDf1JLc930/LnmGfj9H0+v7/APAf6c32/wAQ/wCR+n/5f9383/iNaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca0415xrzjXnGvONeca8415xrzjXnGvONeca8415xrzjXnGvONeca8415xrzjXnGvONeYa8w15hrzDXmGvMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMNeYa8w15hrzDXnGvONeca8415xrzjXnGvONeca041pxrTjWnGtONaca041pxrTjWnGtONacas41ZxqzjVnGrONWcas41ZxqzjVnGrONScak41JxqTjUUGooNRQaig1FBqKDTUGmoNNQaag01BpqDTUGmoNNQaag0lBpKDSUGkoNJQaSg0lBpKDSUGioNFQaKg0VBoqDRVGiqNFUaKo0FRoKjQVGgqNBUaCo0FRoKjQVGgqPXqj16o9eqPXqj16o9eqPXqj16o9eqPXqj1yo9cqPXKj1yo9cqPXLD1yw9csPXLD1yw9csPWrD1qw9asPWrD1qw9asPWrD1qw9asPWrD1qw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrB34/8Ay/z/AH/53yHY/wDU/E/0v+P7/wCz/9k="})]})]}),pinterest:zE.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zE.jsxs("g",{clipPath:"url(#clip0_6570_25513)",children:[zE.jsx("rect",{width:"15.996",height:"16",rx:"2",fill:"#CC2127"}),zE.jsx("path",{d:"M7.999 2C4.68555 2 2 4.68555 2 7.999C2 10.5406 3.58174 12.7102 5.81336 13.5861C5.76137 13.1121 5.71338 12.3843 5.83336 11.8644C5.94134 11.3964 6.53724 8.88285 6.53724 8.88285C6.53724 8.88285 6.35727 8.52291 6.35727 7.993C6.35727 7.15914 6.84119 6.53524 7.44309 6.53524C7.95501 6.53524 8.20297 6.91918 8.20297 7.3811C8.20297 7.89502 7.87502 8.66489 7.70705 9.37877C7.56507 9.97667 8.007 10.4626 8.5949 10.4626C9.66072 10.4626 10.4806 9.33878 10.4806 7.71505C10.4806 6.27929 9.44876 5.27345 7.975 5.27345C6.26729 5.27345 5.26546 6.55324 5.26546 7.87702C5.26546 8.39293 5.46342 8.94484 5.71138 9.24679C5.75937 9.30678 5.76737 9.35877 5.75337 9.41876C5.70738 9.60873 5.6074 10.0167 5.5874 10.0987C5.56141 10.2086 5.50142 10.2326 5.38743 10.1786C4.63756 9.83069 4.16964 8.73488 4.16964 7.85502C4.16964 5.96334 5.54541 4.22563 8.13298 4.22563C10.2146 4.22563 11.8304 5.70938 11.8304 7.69105C11.8304 9.75871 10.5266 11.4224 8.71688 11.4224C8.10898 11.4224 7.53708 11.1065 7.34111 10.7345C7.34111 10.7345 7.04116 11.8804 6.96717 12.1603C6.83119 12.6822 6.46526 13.3341 6.2213 13.732C6.7832 13.906 7.3791 14 7.997 14C11.3104 14 13.996 11.3144 13.996 8.001C13.998 4.68555 11.3124 2 7.999 2Z",fill:"white"})]}),zE.jsx("defs",{children:zE.jsx("clipPath",{id:"clip0_6570_25513",children:zE.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),spotify:zE.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zE.jsx("g",{clipPath:"url(#clip0_6523_22402)",children:zE.jsx("path",{d:"M12.6609 7.10585C10.121 5.59751 5.93158 5.45882 3.50697 6.1947C3.11759 6.31287 2.70584 6.09298 2.5879 5.70373C2.46988 5.31411 2.68945 4.90265 3.07911 4.78429C5.86241 3.93945 10.4892 4.1026 13.4132 5.83828C13.7634 6.04622 13.8782 6.49851 13.6707 6.84813C13.4629 7.19833 13.0103 7.31376 12.6609 7.10585ZM12.5777 9.33993C12.3995 9.62908 12.0215 9.71979 11.7327 9.54223C9.61522 8.24063 6.38637 7.86357 3.88123 8.624C3.55636 8.72218 3.21323 8.53899 3.11455 8.21475C3.01666 7.88989 3.19992 7.54738 3.5242 7.44859C6.38597 6.58018 9.9436 7.00081 12.3756 8.49536C12.6644 8.67322 12.7553 9.05146 12.5777 9.33993ZM11.6136 11.4855C11.472 11.7177 11.1697 11.7904 10.9383 11.6489C9.08801 10.518 6.75909 10.2627 4.01637 10.8891C3.75207 10.9497 3.48866 10.7841 3.42838 10.5198C3.36785 10.2556 3.53284 9.99217 3.79772 9.93186C6.79916 9.2457 9.37381 9.54101 11.4506 10.8101C11.6822 10.9515 11.7551 11.254 11.6136 11.4855ZM8.00002 0.120623C3.64839 0.120623 0.120605 3.64834 0.120605 7.99989C0.120605 12.352 3.64839 15.8794 8.00002 15.8794C12.3517 15.8794 15.8794 12.352 15.8794 7.99989C15.8794 3.64834 12.3517 0.120623 8.00002 0.120623Z",fill:"#1ED760"})}),zE.jsx("defs",{children:zE.jsx("clipPath",{id:"clip0_6523_22402",children:zE.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),twitter:zE.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:zE.jsx("path",{d:"M14.3193 4.31285C14.329 4.45301 14.329 4.59317 14.329 4.73462C14.329 9.04475 11.0516 14.0156 5.05865 14.0156V14.0131C3.28832 14.0156 1.55478 13.508 0.0644531 12.5507C0.321873 12.5817 0.580582 12.5972 0.839937 12.5979C2.30703 12.5992 3.7322 12.1063 4.88639 11.1988C3.4922 11.1724 2.26961 10.2623 1.84252 8.93366C2.3309 9.02796 2.83413 9.00858 3.31349 8.87746C1.79349 8.57001 0.699937 7.23299 0.699937 5.68023C0.699937 5.66602 0.699937 5.65246 0.699937 5.63889C1.15284 5.89144 1.65994 6.0316 2.17865 6.0471C0.747034 5.08923 0.305743 3.18251 1.17026 1.69176C2.82445 3.7296 5.2651 4.96844 7.8851 5.09956C7.62252 3.96664 7.98123 2.77947 8.82768 1.98307C10.1399 0.748096 12.2038 0.811395 13.4374 2.12452C14.167 1.98048 14.8664 1.71243 15.5064 1.33264C15.2632 2.0877 14.7541 2.72909 14.0741 3.13665C14.7199 3.06044 15.3509 2.88734 15.9451 2.62316C15.5077 3.2794 14.9567 3.85103 14.3193 4.31285Z",fill:"#1D9BF0"})}),vimeo:zE.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zE.jsxs("g",{clipPath:"url(#clip0_6523_22340)",children:[zE.jsx("path",{d:"M16 14.4C16 15.28 15.28 16 14.4 16H1.6C0.72 16 0 15.28 0 14.4V1.6C0 0.72 0.72 0 1.6 0H14.4C15.28 0 16 0.72 16 1.6V14.4Z",fill:"#1AB7EA"}),zE.jsx("path",{d:"M13.9945 5.3084C13.9391 6.42815 13.1229 7.97447 11.5458 9.93402C9.91331 11.9736 8.52987 13 7.40928 13C6.70372 13 6.12267 12.3735 5.63846 11.1338C5.32027 9.98735 4.98824 8.85427 4.67005 7.70786C4.31036 6.46814 3.92299 5.84161 3.50796 5.84161C3.42495 5.84161 3.10676 6.02824 2.56721 6.38816L2 5.68165C2.59488 5.1751 3.17593 4.68187 3.75698 4.17532C4.54554 3.52214 5.14042 3.17555 5.54162 3.13556C6.46853 3.05557 7.04958 3.66877 7.27093 4.97514C7.50612 6.40149 7.67213 7.28129 7.75514 7.62788C8.01799 8.80095 8.32235 9.40081 8.64054 9.40081C8.88956 9.40081 9.26309 9.01423 9.77497 8.2544C10.273 7.49457 10.5497 6.90804 10.5774 6.50813C10.6465 5.85494 10.3837 5.52169 9.77497 5.52169C9.48444 5.52169 9.19392 5.58834 8.88956 5.70831C9.48444 3.84206 10.605 2.94893 12.2652 3.00225C13.4826 3.02891 14.0637 3.80207 13.9945 5.3084Z",fill:"white"})]}),zE.jsx("defs",{children:zE.jsx("clipPath",{id:"clip0_6523_22340",children:zE.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),youtube:zE.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zE.jsx("path",{d:"M15.6656 3.75817C15.4816 3.06609 14.9395 2.5211 14.2511 2.33614C13.0034 2 8 2 8 2C8 2 2.99666 2 1.7489 2.33614C1.06051 2.5211 0.518324 3.06609 0.334339 3.75817C0 5.01251 0 7.62963 0 7.62963C0 7.62963 0 10.2467 0.334339 11.5012C0.518324 12.1932 1.06051 12.7381 1.7489 12.9232C2.99666 13.2593 8 13.2593 8 13.2593C8 13.2593 13.0034 13.2593 14.2511 12.9232C14.9395 12.7381 15.4816 12.1932 15.6656 11.5012C16 10.2467 16 7.62963 16 7.62963C16 7.62963 16 5.01251 15.6656 3.75817Z",fill:"#ED1D24"}),zE.jsx("path",{d:"M6.36353 10.0058L10.5453 7.62974L6.36353 5.25349V10.0058Z",fill:"white"})]})};function Ja(e){let{debouncedUrl:t,content:n,onContentChange:r,selected:i}=e,o=(0,c.useRef)(null),[a,u]=(0,c.useState)(!1);return(0,p.pQ)(t,()=>{var e;a&&(u(!1),null==(e=o.current)||e.reset())}),(0,l.ju)(t)?t===(null==n?void 0:n.embed_url)?zE.jsx(Js,{content:n,selected:i}):zE.jsx(f.SV,{ref:o,renderError:Ju,onError:function(){u(!0),r(void 0)},children:zE.jsx(c.Suspense,{fallback:n&&zE.jsx(Js,{content:n,selected:i}),children:zE.jsx(Jl,{url:t,selected:i,onContentChange:r})})}):null}function Ju(){return zE.jsxs(f.xu,{backgroundColor:"grey2",borderRadius:6,padding:16,gap:4,children:[zE.jsx(f.I5,{name:"alert",size:"small",color:"grey11"}),zE.jsx(f.xv,{variant:"smallBold",color:"grey11",children:"There is no embed data available."})]})}function Js(e){let{content:t,selected:n}=e,{thumbnail:r,provider:i,author:o,url:a,subtitle:u}=function(e){let t="";switch(e.type){case"video":t=e.title??"";break;case"photo":t=`View this post${e.provider_name?` on ${e.provider_name}`:""}`;break;default:t=`Open${e.provider_name?` on ${e.provider_name}`:""}`}return{url:e.embed_url,thumbnail:{url:e.thumbnail_url??"",aspectRatio:"video"===e.type?"16:9":"1:1"},provider:e.provider_name??"",author:e.author_name??"",subtitle:t}}(t);return zE.jsxs(f.oU,{selected:n,children:[zE.jsx(f.Sy,{src:r.url,aspectRatio:r.aspectRatio}),zE.jsxs(f.Tw,{children:[zE.jsxs(f.xu,{display:"flex",alignItems:"center",gap:4,children:[zE.jsx(Ji,{provider:i}),zE.jsx(f.xv,{variant:"smallBold",color:"grey12",noWrap:!0,children:i}),o&&zE.jsx(f.xv,{variant:"small",color:"grey11",noWrap:!0,children:o})]}),zE.jsx(f.xv,{variant:"smallBold",href:a,children:u})]})]})}function Jl(e){let{url:t,onContentChange:n,selected:r}=e,i=function(e){let{url:t,onContentChange:n}=e,{embedApiEndpoint:r}=zL(),i=(0,m.QT)(Jc,[t,r]),o=(0,p.R9)(n);return(0,c.useEffect)(()=>{let e=(0,f.rI)(()=>o(i));return()=>{clearTimeout(e)}},[i,o]),i}({url:t,onContentChange:n});return zE.jsx(Js,{content:i,selected:r})}function Jc(e,t){var n;let r=new URL(t);return r.searchParams.set("url",e),(0,y.WY)(r,{okType:(n=e,Hw.object({type:Hw.string(),version:Hw.string().or(Hw.number()).nullish(),title:Hw.string().nullish(),author_name:Hw.string().nullish(),author_url:Hw.string().nullish(),provider_name:Hw.string().nullish(),provider_url:Hw.string().nullish(),cache_age:Hw.string().or(Hw.number()).nullish(),thumbnail_url:Hw.string().nullish(),thumbnail_width:Hw.number().nullish(),thumbnail_height:Hw.number().nullish(),html:Hw.string().nullish()}).passthrough().transform(e=>{let t={embed_url:n};return{...t,__TYPE__:"EmbedContent",type:e.type,version:e.version,title:e.title,author_name:e.author_name,author_url:e.author_url,provider_name:e.provider_name,provider_url:e.provider_url,cache_age:e.cache_age,thumbnail_url:e.thumbnail_url,thumbnail_width:e.thumbnail_width,thumbnail_height:e.thumbnail_height,html:e.html,all:{...t,...e}}}))})}function Jd(e){let{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=(0,p.$P)({initialState:(null==i?void 0:i.embed_url)??"",startTransition:c.startTransition});function u(e){a.set(e),(0,l.ju)(e)||o(void 0)}return zE.jsxs(f.gN,{footer:(0,l.ju)(a.value)&&zE.jsx(f.mS,{children:zE.jsx(Ja,{debouncedUrl:a.debouncedValue,content:i,onContentChange:o})}),children:[zE.jsx(f.fw,{name:"cloud"}),zE.jsx(f.Qy,{htmlFor:t,children:Z4(r)}),zE.jsx(f.JO,{children:zE.jsx(Jn,{id:t,readOnly:n,placeholder:Z7(r),value:a.value,onValueChange:u,variant:(0,l.ju)(a.value)?"link":"normal",endAdornment:zE.jsx(f.zx,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:()=>u("")})})})]})}function Jf(e){return!(e.lat>85||e.lat<-85||e.lng>180||e.lng<-180)}function Jp(e){let t=e.match(/^.*@(-?\d+.\d+),(-?\d+.\d+).*$/);if(!t)return;let n=parseFloat(t[1]??""),r=parseFloat(t[2]??"");if(isNaN(n)||isNaN(r))return;let i={lat:n,lng:r};if(Jf(i))return i}function JA(e){return e?`${e.lat}, ${e.lng}`:""}function Jh(e){let t=e.match(/\(?([\d|.|-]*)[\s+]*,[\s]*([\d|.|-]*)\)?/);if(!t)return Jp(e);let n=parseFloat(t[1]??""),r=parseFloat(t[2]??"");if(isNaN(n)||isNaN(r))return Jp(e);let i={lat:n,lng:r};return Jf(i)?i:Jp(e)}function Jm(e){let{field:t,id:n,readOnly:r,...i}=e,{onValueChange:o,displayedValue:a,onBlur:u,clearValue:s,isValidCoordinates:l}=function(e){let{content:t,onContentChange:n}=e,r=JA(null==t?void 0:t.position),[i,o]=(0,c.useState)(r),a=!!Jh(i);return{displayedValue:i,isValidCoordinates:a,onValueChange:o,onBlur:function(){let e=Jh(i);if(!e)return o(""),n(void 0);let{lat:t,lng:r}=e;o(JA({lat:t,lng:r})),n({__TYPE__:"GeoPointContent",position:{lat:t,lng:r}})},clearValue:function(){o(""),n(void 0)}}}(i);return zE.jsxs(f.gN,{children:[zE.jsx(f.fw,{name:"place"}),zE.jsx(f.Qy,{htmlFor:n,children:Z4(t)}),zE.jsx(f.JO,{children:zE.jsx(Jn,{id:n,onValueChange:o,placeholder:"...",readOnly:r,value:a,onBlur:u,variant:l?"link":"normal",endAdornment:zE.jsx(f.zx,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:s})})})]})}let Jg=Ht({id:YG(),width:Y$(),height:Y$(),urls:Ht({full:YG(),small:YG().transform(function(e){let t=new URL(e);return t.searchParams.delete("q"),t.searchParams.delete("fm"),t.searchParams.set("w","300"),t.searchParams.set("auto","compress,format"),t.toString()})}),alt_description:YG().optional(),description:YG().nullable()}),Jy=Ht({results:He(Jg)}).transform(e=>e.results);function Jv(e,t){let n=new URL("search/photos",e);return n.searchParams.set("page","1"),n.searchParams.set("per_page","28"),n.searchParams.set("query",t),(0,y.WY)(n,{okType:Jy})}function Jx(e){let{onSelectedChange:t}=e,[n,r]=(0,c.useTransition)(),i=(0,p.$P)({initialState:"",ms:300,startTransition:r});return zE.jsxs(f.xu,{flexDirection:"column",gap:16,width:"100%",position:"relative",children:[zE.jsx(f.CR,{value:i.value,placeholder:"Search on Unsplash.com",onValueChange:i.set}),zE.jsx(f.SV,{renderError:()=>zE.jsx(Zo,{}),children:zE.jsx(c.Suspense,{fallback:zE.jsx(JS,{}),children:zE.jsx(Jb,{term:i.debouncedValue,loading:n,onSelectedChange:t})})})]})}function Jb(e){let{term:t,onSelectedChange:n,loading:r}=e,{media:i,toggleSelected:o,selectedImageId:a}=function(e){var t;let{term:n,onSelectedChange:r}=e,{unsplashApiBaseUrl:i}=zL(),o=function(e,t){let n=(0,c.useRef)(),r=zL(),i=(0,m.QT)(Jv,[e,t]);return(0,p.Nr)(t,1e3,()=>{var e;n.current&&t!==n.current&&(null==(e=r.onAnalyticsEvent)||e.call(r,"Unsplash Image Searched")),n.current=t}),i}(i,n||"citrus fruit"),a=null==(t=null==o?void 0:o[0])?void 0:t.id,[u,s]=(0,c.useState)();return(0,c.useEffect)(()=>{null==r||r([]),s(void 0)},[a,r]),{media:o,toggleSelected:function(e){if(e.id===u)return s(void 0),null==r?void 0:r([]);s(e.id),null==r||r([{...e,url:e.urls.full,alt:e.alt_description}])},selectedImageId:u}}({term:t,onSelectedChange:n});return zE.jsxs(zE.Fragment,{children:[zE.jsx(JC,{children:null==i?void 0:i.map(e=>{let t=new URL(e.urls.full).searchParams.get("fm")??"jpg";return zE.jsx(f.PB,{url:e.urls.small,filename:e.description??"Unsplash Image",selected:a===e.id,onCardClick:()=>o(e),onCheckedChange:()=>o(e),extension:t,width:e.width,height:e.height,loading:r},e.id)})}),0===i.length&&zE.jsx(zj,{})]})}function JC(e){let{children:t}=e;return zE.jsx(f.xr,{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, 250px), 1fr))",gap:16,paddingBottom:16,position:"relative",width:"100%"},children:t})}function JS(){return zE.jsx(JC,{children:(0,g.w6)(1,24).map(e=>zE.jsx(Zm,{},e))})}function Jw(e){let{open:t,onOpenChange:n,onMediaSelected:r,assetType:i}=e,o=zL(),a=o.mediaLibrary,[u,s]=(0,c.useState)(()=>a?"media":"unsplash"),[l,d]=(0,c.useState)(new Set),[A,h]=(0,c.useState)([]),g=l.size+A.length,y=(0,m.q_)(HV);function v(e){e||d(new Set),n(e)}(0,c.useEffect)(()=>{t&&a&&H$({config:o,assetType:i})},[t,o,i,a]);let x=function(e){let{assetType:t,mediaDialogOpen:n}=e,r=zL(),i=(0,m.q_)(HV),o=(0,c.useRef)(0);return(0,c.useEffect)(()=>{n&&(o.current=performance.now())},[n]),function(e){if(!r.onAnalyticsEvent||!r.mediaLibrary)return;let n=i[i.length-1];if(!n)return;let{keyword:a}=n,u=HZ(i,t,a),s=r.useOpenSearch&&a?"1":"0",l=String(a.split(" ").length),c=String(n.total),d=u.findIndex(t=>t.id===e),f=String(d+1),p=[e].join(","),A=(performance.now()-o.current).toFixed(0);r.onAnalyticsEvent("Media Added To Page",{useOpenSearch:s,assetType:t,searchQuery:a,numberOfWords:l,numberOfResults:c,searchPosition:f,mediaIds:p,timeToAddMediaToPage:A})}}({assetType:i,mediaDialogOpen:t}),{containerRef:b}=(0,f.VY)();return zE.jsxs(f.Vq,{open:t,onOpenChange:v,size:{width:"min(calc(100% - 48px), 2000px)",height:"calc(100% - 30px)"},position:"center",onPointerDownOutside(e){b&&(0,p.DX)(b,e.target)&&e.preventDefault()},children:[zE.jsx(f.fK,{icon:"image",title:"Media library"}),zE.jsxs(f.Zp,{value:u,onValueChange:function(e){if("media"!==e&&"unsplash"!==e)throw Error(`Invalid option ${e}.`);s(e)},padding:"small",width:"auto",children:[a&&zE.jsx(f.T9,{value:"media",icon:"photo"}),zE.jsx(f.T9,{value:"unsplash",icon:"unsplash"})]}),zE.jsx(f.cZ,{children:zE.jsxs(f.xu,{flexDirection:"column",flexGrow:1,overflow:"hidden",children:[zE.jsx(zF,{}),zE.jsxs(f.xu,{overflow:"hidden",backgroundColor:"grey3",padding:{top:16,inline:16},flexGrow:1,children:["media"===u&&zE.jsx(Z5,{assetType:i,onSelectedChange:d}),"unsplash"===u&&zE.jsx(Jx,{onSelectedChange:h})]})]})}),zE.jsx(f.kX,{asFooter:!0,ok:{text:"Add to page",onClick:function(){var e;if("unsplash"===u){let t=A[0];if(!t)return;r(t),null==(e=o.onAnalyticsEvent)||e.call(o,"Unsplash Image Added")}else if("media"===u){let n=y.flatMap(e=>e.items).filter(e=>l.has(e.id))[0];if(!n)return;r(n),x(n.id)}v(!1)},disabled:1!==g,disabledTooltip:0===g?"Select a media item to add to the page":g>1?"Only one media item can be added to the page":void 0},cancel:{text:"Cancel"}})]})}function JI(e){let{onMediaSelected:t,readOnly:n,isUpdating:r}=e,[i,o]=(0,c.useState)(!1);return zE.jsxs(f.aY,{children:[zE.jsx(f.Zb,{color:"grey3",variant:"outlined",radius:4,children:zE.jsx(f.aY,{children:zE.jsx(f.xu,{padding:{block:48},flexDirection:"column",children:zE.jsxs(f.R$,{children:[zE.jsx(f.av,{name:"cloudUpload"}),zE.jsx(f._T,{children:r?"Preparing your image...":"You haven't selected an image"}),!n&&zE.jsx(f.Qj,{children:zE.jsx(f.zx,{disabled:r,onClick:()=>o(!0),children:"Select image"})})]})})})}),zE.jsx(Jw,{open:i,onOpenChange:o,onMediaSelected:t,assetType:"image"})]})}function J_(e){let{id:t,readOnly:n,altText:r,onValueChange:i,selected:o}=e;return zE.jsxs(f.gN,{labelPosition:"side",selected:o,children:[zE.jsx(f.Qy,{htmlFor:t,children:"Alt text"}),zE.jsx(f.JO,{children:zE.jsx(f.oi,{id:t,placeholder:"Short description for the visually impaired",readOnly:n,padding:{input:{inline:16}},value:r,onValueChange:i})})]})}function JT(e){let{contentView:t,croppedImage:n}=e,{width:r,height:i,x:o,y:a,zoom:u}=n,s=function(e){let{origin:t,croppedImage:n}=e,{x:r,y:i,width:o,height:a,cropHeight:u,cropWidth:s}=n,l=new URL(t.url),c=t.height!==a||t.width!==o;if(0!==r||0!==i||u!==t.height||s!==t.width){let d=[r,i,s,u].map(Math.round).join(",");l.searchParams.set("rect",d),l.searchParams.set("w",o.toString()),l.searchParams.set("h",a.toString())}return c&&(l.searchParams.set("w",o.toString()),l.searchParams.set("h",a.toString())),l.toString()}({origin:t.origin,croppedImage:n});return{...t,width:r,height:i,url:s,edit:{...t.edit,zoom:u,crop:{x:o,y:a}}}}function JO(e){var t,n,r;let{field:i,content:o,thumbnail:a,croppedImage:u}=e;if(a===ZR){let s=JT({contentView:o,croppedImage:u});return s.url===o.url?o:{...o,...s}}let l=null==(n=null==(t=null==i?void 0:i.config)?void 0:t.thumbnails)?void 0:n.find(e=>e.name===a),c=null==(r=o.thumbnails)?void 0:r[a];if(!l||!c)return o;let d=JT({contentView:c,croppedImage:u});return d.url===c.url?o:{...o,thumbnails:{...o.thumbnails,[a]:d}}}function JR(e){let{selectedImage:t,imageCrop:n,setImageCrop:r}=e,{width:i,height:o,zoom:a,cropHeight:u,cropWidth:s}=n,l=t.contentView,d={x:n.x,y:n.y,width:s,height:u},[p,A]=(0,c.useState)(),h=(null==l?void 0:l.origin.url)??"",m=!(null!=t&&t.thumbnail.height&&null!=t&&t.thumbnail.width);function g(e,t){let i=parseInt(t);isNaN(i)||i<=0||!m||r({...n,[e]:i})}function y(e){r({...n,zoom:e})}return zE.jsxs(f.xu,{padding:{inline:24,block:16},flexDirection:"column",gap:16,height:"100%",overflowY:"auto",alignItems:"center",children:[zE.jsxs(f.xu,{gap:8,height:32,alignItems:"flex-start",width:"100%",children:[zE.jsx(f.u,{content:"Center",children:zE.jsx(f.zx,{color:"grey",size:"medium",startIcon:"centerFocusWeak",onClick:function(){A(Jk),r({...n,...Jk})}})}),zE.jsx(f.u,{content:"Cover",children:zE.jsx(f.zx,{color:"grey",size:"medium",startIcon:"zoomOutMap",onClick:function(){l&&(A(Jk),r({...n,...Jk,zoom:1,cropWidth:l.width,cropHeight:l.height}))}})}),zE.jsx(f.Z0,{orientation:"vertical"}),zE.jsx(f.yt,{prefix:"W",prefixTooltip:"Width",placeholder:"width",type:"number",size:"medium",value:String(i),onValueChange:e=>g("width",e),sx:{width:100},disabled:!m}),zE.jsx(f.yt,{prefix:"H",prefixTooltip:"Height",placeholder:"height",type:"number",size:"medium",value:String(o),onValueChange:e=>g("height",e),sx:{width:100},disabled:!m})]}),zE.jsx(f.fl,{image:h,aspect:i/o,crop:p??{x:0,y:0},onCropChange:A,zoom:a,onZoomChange:y,onCropAreaChange(e,t){var i;r({...n,cropWidth:t.width,cropHeight:t.height,x:t.x,y:t.y})},initialCroppedAreaPixels:d}),zE.jsx(f.xu,{width:"100%",maxWidth:320,children:zE.jsx(f.iR,{min:1,max:3,step:.01,value:[a],onValueChange:([e])=>y(e??1)})})]})}m.Fs.registerFetcherConfig(Jv,{cacheCapacity:5,revalidationStrategy:{type:"never"}});let Jk={x:0,y:0};function JE(e){let{trigger:t,initialImages:n}=e,{open:r,onOpenChange:i,ready:o,option:a,selectedImage:u,croppedImage:s,setCroppedImage:l,setReady:d,setOption:p}=function(e){let{initialImages:t,initialOption:n,onClose:r}=e,[i,o]=(0,c.useState)(h),[a,u]=(0,c.useState)(!1),[s,l]=(0,c.useState)(!1),[d,f]=(0,c.useState)(n),p=t[d],A=i[(null==p?void 0:p.thumbnail.name)??""];function h(){return t.reduce((e,t)=>(t.contentView&&(e[t.thumbnail.name]=function(e){let{x:t,y:n}=e.edit.crop,r=e.edit.zoom,{width:i,height:o}=e,{width:a,height:u}=e.origin,s=i/o,l=Math.min(a,u*s/r);return{x:t,y:n,width:i,height:o,zoom:r,cropWidth:l,cropHeight:l/s}}(t.contentView)),e),{})}return{open:a,ready:s,option:d,selectedImage:p,croppedImage:A,setCroppedImage:function(e){if(!p)return;let t=p.thumbnail.name;o({...i,[t]:e})},setReady:l,setOption:f,onClose:r,onOpenChange:function(e){e?(f(n),o(h())):(l(!1),r({option:d,croppedImages:i})),u(e)}}}(e);return zE.jsxs(f.Vq,{trigger:t,onAnimationEnd:()=>d(!0),open:r,onOpenChange:i,children:[zE.jsx(f.fK,{icon:"photo",title:"Image editor"}),zE.jsx(f.Zp,{value:String(a),onValueChange:e=>p(Number(e)),children:n.map((e,t)=>zE.jsx(f.T9,{value:String(t),icon:"photo",title:e.labels[0]??"Main",subtitle:e.labels[1]??""},e.thumbnail.name))}),u&&zE.jsx(f.cZ,{children:o&&s&&zE.jsx(JR,{selectedImage:u,imageCrop:s,setImageCrop:l},u.thumbnail.name)})]})}function JM(e){var t,n;let{content:r,selected:i,fieldLabel:o,readOnly:a,imageLabel:u,onMediaSelected:s,initialImages:l,initialOption:d=0,onCropperDialogClose:p,onClear:A,children:h}=e,[m,g]=(0,c.useState)(!1),y=(null==(n=null==(t=null==r?void 0:r.url)?void 0:t.split("?")[0])?void 0:n.slice(-4))===".svg",v=null!=r&&r.url&&!a?"visible":"hidden";return zE.jsxs(f.Zb,{color:i?"indigo2":"grey2",variant:i?"selected":"dashed",radius:4,children:[zE.jsxs(f.Ol,{sx:{flexWrap:"wrap"},children:[zE.jsxs(f.wP,{children:[zE.jsx(f.xv,{noWrap:!0,children:(0,x.tx)(o,30)}),0!==u.length&&zE.jsx(f.xv,{color:"grey11",noSelect:!0,children:` • ${u.join(" • ")}`})]}),zE.jsxs(f.Pf,{sx:{visibility:v},children:[zE.jsx(JE,{trigger:zE.jsx(f.zx,{startIcon:"crop",disabled:y,children:"Crop & Resize"}),initialImages:l,initialOption:d,onClose:p}),zE.jsx(f.zx,{startIcon:"imageSearch",onClick:()=>g(!0),children:"Replace"}),zE.jsx(f.zx,{onClick:A,startIcon:"delete",children:"Clear"})]})]}),h,zE.jsx(Jw,{open:m,onOpenChange:g,onMediaSelected:s,assetType:"image"})]})}function JF(e){let{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e,a=t&&t.origin.url.length>0,{onCropperDialogClose:u,onPageChange:s,onMediaSelected:l,isUpdating:f,page:p,thumbnail:A,allThumbnails:m,allContentViews:g,contentView:y,onClear:v}=function(e){var t;let{content:n,onContentChange:r,field:i}=e,[o,a]=(0,c.useState)(0),[u,s]=(0,c.useTransition)(),l=(t=i,(0,c.useMemo)(()=>{var e,n,r;return[{...null==(n=t.config)?void 0:n.constraint,name:ZR}].concat((null==(r=t.config)?void 0:r.thumbnails)??[])},[t])),f=l[o],p=n?function(e,t){var n,r;let{__TYPE__:i,thumbnails:o,...a}=t,u=null==(r=null==(n=e.config)?void 0:n.thumbnails)?void 0:r.map(({name:e})=>null==o?void 0:o[e]);return[a,...u??[]]}(i,n):void 0,A=null==p?void 0:p[o];return{onCropperDialogClose:function({option:e,croppedImages:t}){if(a(e),!n)return;let o=Object.entries(t).reduce((e,[t,n])=>JO({field:i,content:e,thumbnail:t,croppedImage:n}),n);o!==n&&s(()=>r(o))},onPageChange:function(e){s(()=>a(e))},onMediaSelected:function(e){if(!f)return;let t=function(e,t,n,r){var i,o,a,u,s;if(!n||e===ZR){let l=null==(i=t.config)?void 0:i.thumbnails,c=l&&Object.fromEntries(l.map(e=>[e.name,ZF(r,e)]));return{__TYPE__:"ImageContent",...ZF(r,null==(o=t.config)?void 0:o.constraint),thumbnails:c}}let f=null==(u=null==(a=t.config)?void 0:a.thumbnails)?void 0:u.find(t=>t.name===e);if(!f)return n;let p=null==(s=n.thumbnails)?void 0:s[e],A=ZF(r,f);return A.url===(null==p?void 0:p.url)?n:{...n,thumbnails:(0,d.Q8)(n.thumbnails??{},(t,n)=>n===e?A:t)}}(f.name,i,n,e);t!==n&&s(()=>r(t))},isUpdating:u,page:o,thumbnail:f,allThumbnails:l,allContentViews:p,contentView:A,onClear:function(){null==a||a(0),r(void 0)}}}({field:n,content:t,onContentChange:i}),x=Z4(n),b=m.map((e,n)=>{let r=null==g?void 0:g[n];return{thumbnail:e,contentView:r,labels:Zk(e,t,r)}}),C=A&&a?Zk(A,t,y).filter(h.$):[];return zE.jsx(JM,{content:t,fieldLabel:x,imageLabel:C,initialOption:p,initialImages:b,readOnly:o,onMediaSelected:l,onCropperDialogClose:u,onClear:v,children:zE.jsx(c.Suspense,{fallback:zE.jsx("div",{style:{height:466}}),children:A&&t&&a&&g?zE.jsx(Jj,{allContentViews:g,content:t,contentView:y,id:r,onContentChange:i,onPageChange:s,page:p,readOnly:o,thumbnailName:A.name,isUpdating:f}):zE.jsx(JI,{onMediaSelected:l,readOnly:o,isUpdating:f})})})}function Jj(e){let{allContentViews:t,content:n,contentView:r,id:i,onContentChange:o,onPageChange:a,page:u,readOnly:s,thumbnailName:l,isUpdating:c}=e;return zE.jsxs(f.aY,{children:[zE.jsx(f.lr,{getItemSource:ZM,items:t,onPageChange:a,page:u,style:{height:400},children:e=>(null==e?void 0:e.url)&&zE.jsx(f.d$,{"aria-label":"Image Field Item",src:ZE(e.url),alt:e.alt??void 0,isUpdating:c},`${l}_${e.url}`)}),zE.jsx(J_,{id:i,readOnly:s||!r,altText:(null==r?void 0:r.alt)??"",onValueChange(e){r&&o(function(e,t,n,r){let i=0===r.length?void 0:r;return e===ZR?{...t,alt:i}:{...t,thumbnails:{...t.thumbnails,[e]:{...n,alt:i}}}}(l,n,r,e))}})]})}function JU(e,t,n,r,i,o=1,a=30){let u=new URL(`if/search/${r}`,e);return u.searchParams.set("searchTerm",i),u.searchParams.set("limit",a.toString()),u.searchParams.set("page",o.toString()),(0,y.WY)(u,{headers:{repository:n},credentials:(0,y.xb)(t),okType:JL})}let JK=Hw.object({id:Hw.string(),title:Hw.string(),imageURL:Hw.string().optional().nullable()}),JL=Hw.object({items:Hw.array(JK),totalPages:Hw.number(),page:Hw.number()});function JB(e){let{itemId:t,catalogId:n}=e,r=zL();r.integrationFields||zP("integrationFields");let{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,u=(0,m.QT)(JP,[i,a,o,n,t]).items[0];if(!u)throw Error("Item not found");return{item:u}}function JP(e,t,n,r,i){let o=new URL(`if/read/${r}`,e);return o.searchParams.set("ids",[i].toString()),(0,y.WY)(o,{headers:{repository:n},credentials:(0,y.xb)(t),okType:JW})}let JW=Hw.object({items:Hw.array(JK)});function JD(e){let{item:t,onClick:n,catalogId:r}=e;return zE.jsxs(f.oU,{variant:"large",onClick:n,children:[zE.jsx(JN,{src:t.imageURL??"",alt:t.title}),zE.jsxs(f.Tw,{children:[zE.jsx(f.Ct,{title:`Catalog: ${r}`,icon:"multipleStop",size:"medium"}),zE.jsx(f.xv,{variant:"bold",color:"grey12",sx:{marginTop:4},children:t.title}),zE.jsxs(f.xv,{variant:"small",color:"grey11",children:["Product code: ",t.id]})]})]})}function JN(e){let{src:t,alt:n}=e;return t?zE.jsx(f.Sy,{src:t,alt:n,width:76,height:76,framed:!0}):zE.jsxs(f.xu,{borderRadius:6,backgroundColor:"grey2",height:76,width:76,flexDirection:"column",alignItems:"center",justifyContent:"center",border:!0,padding:{inline:4,block:8},children:[zE.jsx(f.I5,{name:"hideImage",size:"large",color:"grey11"}),zE.jsx(f.xv,{color:"grey11",variant:"small",noSelect:!0,align:"center",children:"No preview image"})]})}function Jq(){return zE.jsxs(f.oU,{variant:"large",children:[zE.jsx(f.Od,{height:76,width:76}),zE.jsxs(f.Tw,{children:[zE.jsx(f.Od,{height:24,width:168}),zE.jsx(f.Od,{height:24,width:240,sx:{marginTop:4}}),zE.jsx(f.Od,{height:16,width:144})]})]})}function JQ(e){let{open:t,onOpenChange:n,catalogId:r,onSelectItem:i}=e,o=(0,p.$P)({initialState:""}),a=zL();return zE.jsx(f.Vq,{open:t,onOpenChange:n,hasClose:!1,size:{width:612,height:724},children:zE.jsx(f.cZ,{children:zE.jsxs(f.xu,{flexDirection:"column",height:"100%",children:[zE.jsxs(f.xu,{padding:{top:16,inline:16},flexDirection:"column",gap:8,children:[zE.jsx(f.CR,{value:o.value,onValueChange:o.set,placeholder:"Search in your catalog"}),zE.jsx(f.xv,{variant:"smallBold",color:"grey11",children:"Select an item"})]}),a.integrationFields?zE.jsx(f.SV,{renderError:()=>zE.jsx(JY,{message:"There was an error while fetching your catalog items."}),children:zE.jsx(c.Suspense,{fallback:zE.jsxs(f.xu,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:[zE.jsx(Jq,{}),zE.jsx(Jq,{}),zE.jsx(Jq,{}),zE.jsx(Jq,{}),zE.jsx(Jq,{})]}),children:zE.jsx(Jz,{searchTerm:o.debouncedValue,catalogId:r,onItemClick:i})})}):zE.jsx(JY,{message:"Slice Machine does not yet support mock data for integration field in the simulator."})]})})})}function JV(e){let{isLoading:t}=e;return zE.jsx(f.FN,{anchor:zE.jsx(f.xu,{position:"relative",width:"100%",justifyContent:"center",bottom:72}),loadingIndicator:!0,open:t,title:"Loading more results ...",seconds:1})}function Jz(e){let{catalogId:t,searchTerm:n,onItemClick:r}=e,[i,o]=(0,c.useTransition)(),{items:a,hasNextPage:u,fetchNextPage:s}=function(e){var t,n;let{searchTerm:r,catalogId:i}=e,o=zL();o.integrationFields||zP("integrationFields");let{integrationFieldsApiBaseUrl:a,repository:u,authStrategy:s}=o,[l,d]=(0,c.useState)(1),[f,p]=(0,c.useState)([]),[A,h]=(0,c.useState)(""),y=(0,m.QT)(JU,[a,s,u,i,r,r===A?l:1]);r!==A?(h(r),d(1),p(y.items)):y.items.length>0&&(null==(t=(0,g.Z$)(f))?void 0:t.id)!==(null==(n=(0,g.Z$)(y.items))?void 0:n.id)&&p(e=>e.concat(y.items));let v=l<y.totalPages;return{items:f,response:y,fetchNextPage:function(){v&&d(e=>e+1)},hasNextPage:v}}({catalogId:t,searchTerm:n});return zE.jsxs(zE.Fragment,{children:[zE.jsx(f.xr,{onScrollToBottom:()=>u&&o(s),style:{flexGrow:1,paddingTop:f.rS.space[10],paddingBottom:f.rS.space[16],paddingInline:f.rS.space[16],display:"flex",flexDirection:"column",gap:f.rS.space[12]},threshold:252,children:0===a.length?zE.jsx(JY,{}):a.map(e=>zE.jsx(JD,{item:e,catalogId:t,onClick:()=>r(e)},e.id))}),zE.jsx(JV,{isLoading:i})]})}function JY(e){let{message:t="We can't find any items matching your search"}=e;return zE.jsx(f.xu,{justifyContent:"center",flexDirection:"column",height:"100%",children:zE.jsxs(f.R$,{children:[zE.jsx(f.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),zE.jsx(f._T,{size:"big",children:"Oops!"}),zE.jsx(f.nf,{width:360,children:t})]})})}function JH(e){let{itemId:t,item:n}=e,r=zL();return t&&n&&n.id===t?zE.jsx(JG,{...e,value:n.title}):t&&r.integrationFields?zE.jsx(f.SV,{renderError:()=>zE.jsx(JG,{...e,value:t}),children:zE.jsx(c.Suspense,{fallback:zE.jsx(JG,{...e,value:t}),children:zE.jsx(J$,{...e,itemId:t})},t)},t):t&&!r.integrationFields?zE.jsx(JG,{...e,value:t}):zE.jsx(JG,{...e,value:""})}function JZ(e){let{catalogId:t,itemId:n,item:r}=e,i=zL();return n&&r&&r.id===n?zE.jsx(f.mS,{children:zE.jsx(JD,{catalogId:t,item:r})}):n&&i.integrationFields?zE.jsx(f.SV,{renderError:()=>null,children:zE.jsx(f.mS,{children:zE.jsx(c.Suspense,{fallback:zE.jsx(Jq,{}),children:zE.jsx(JJ,{catalogId:t,itemId:n})},n)})},n):null}function JJ(e){let{itemId:t,catalogId:n}=e,{item:r}=JB({catalogId:n,itemId:t});return zE.jsx(JD,{catalogId:n,item:r})}function JG(e){let{id:t,field:n,readOnly:r,value:i,onFocus:o,onClearItem:a}=e;return zE.jsx(Jn,{id:t,placeholder:Z7(n),readOnly:!0,variant:"link",value:i,...!r&&{cursor:"pointer",onFocus:o},endAdornment:zE.jsx(f.zx,{startIcon:"close",color:"grey",size:"small",disabled:!i,onClick:a})})}function J$(e){let{itemId:t,catalogId:n}=e,{item:r}=JB({catalogId:n,itemId:t});return zE.jsx(JG,{...e,value:r.title})}function JX(e){var t;let{id:n,field:r,content:i,readOnly:o,onContentChange:a}=e,[u,s]=(0,c.useState)(!1),[l,d]=(0,c.useState)(),p=null==(t=r.config)?void 0:t.catalog;return p?zE.jsxs(zE.Fragment,{children:[zE.jsxs(f.gN,{footer:zE.jsx(JZ,{catalogId:p,item:l,itemId:null==i?void 0:i.value}),children:[zE.jsx(f.fw,{name:"multipleStop"}),zE.jsx(f.Qy,{htmlFor:n,children:Z4(r)}),zE.jsx(f.JO,{children:zE.jsx(JH,{id:n,field:r,readOnly:o,catalogId:p,item:l,itemId:null==i?void 0:i.value,onFocus:()=>s(!0),onClearItem:function(){a(void 0),d(void 0)}})})]}),zE.jsx(JQ,{open:u,onOpenChange:s,catalogId:p,onSelectItem:function(e){a({value:e.id,__TYPE__:"IntegrationFieldsContent"}),d(e),s(!1)}})]}):null}function J0(e){let{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e;return zE.jsxs(f.gN,{children:[zE.jsx(f.fw,{name:"notes"}),zE.jsx(f.Qy,{htmlFor:r,children:Z4(n)}),zE.jsx(f.JO,{children:zE.jsx(f.Kx,{id:r,placeholder:Z7(n),readOnly:o,paddingLeft:4,paddingRight:12,sx:{flexGrow:1},value:(null==t?void 0:t.value)??"",onChange(e){var t;i((t=e,0===t.length?void 0:{__TYPE__:"FieldContent",type:"Text",value:t}))}})})]})}function J1(e){let{documentType:t,documentUrl:n,title:r,statusColor:i,description:o,tags:a,tagsFilter:u,previewImageUrl:s,onSelect:l}=e;return zE.jsxs(f.Zb,{paddingBlock:16,onSelect:function(e){return e.nativeEvent instanceof MouseEvent&&(e.metaKey||e.ctrlKey)?window.open(n,"_blank"):l()},children:[zE.jsx(f.aY,{children:zE.jsxs(f.xu,{justifyContent:"space-between",children:[zE.jsxs(f.xu,{flexDirection:"column",gap:4,alignItems:"flex-start",flexGrow:1,children:[zE.jsx(J2,{documentType:t}),zE.jsx(J6,{title:r,statusColor:i}),zE.jsx(J5,{description:o})]}),zE.jsx(J3,{previewImageUrl:s})]})}),a.length>0&&zE.jsx(J9,{tags:a,tagsFilter:u})]})}function J2(e){let{documentType:t}=e;return zE.jsx(f.Ct,{maxWidth:150,size:"medium",title:`Type: ${t}`,icon:"description"})}function J6(e){let{title:t,statusColor:n}=e;return zE.jsxs(f.xu,{gap:8,alignItems:"center",children:[zE.jsx(f.oT,{color:n}),zE.jsx(f.xv,{variant:"bold",children:t})]})}function J5(e){let{description:t}=e,n=null==t?void 0:t.substring(0,150);return n?zE.jsx(f.xv,{variant:"small",color:"grey11",children:`${n}${n!==t?"...":""}`}):zE.jsx(f.xv,{variant:"smallItalic",color:"grey11",children:"No description available"})}function J3(e){let{previewImageUrl:t}=e;return zE.jsx(f.xu,{width:142,height:90,backgroundColor:"grey2",border:!0,borderRadius:6,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,flexShrink:0,padding:8,children:t?zE.jsx(f.Ee,{src:t,sizing:"cover"}):zE.jsxs(zE.Fragment,{children:[zE.jsx(f.I5,{name:"hideImage",size:"large",color:"grey11"}),zE.jsx(f.xv,{color:"grey11",variant:"small",children:"No preview available"})]})})}function J9(e){let{tags:t}=e;return zE.jsxs(f.eW,{children:[zE.jsxs(f.xu,{gap:4,alignItems:"center",children:[zE.jsx(f.I5,{name:"label",size:"small",color:"grey11"}),zE.jsx(f.xv,{variant:"small",color:"grey11",children:"Tags:"})]}),zE.jsx(f.lG,{children:t.map(e=>zE.jsx(f.Ct,{size:"medium",title:e,sx:{marginRight:8}},e))})]})}function J4(e,t,n,r){return function(e,t,n,r,i){let o=new URL("documents",e);return r&&o.searchParams.set("limit",r.toString()),i&&o.searchParams.set("cursor",i),o.search+=`&${n}`,(0,y.WY)(o,{credentials:(0,y.xb)(t),okType:HM})}(e,n,r,30,t)}function J7(){let e=zL();e.searchDocuments||zP("searchDocuments");let{coreApiBaseUrl:t,authStrategy:n}=e,r=(0,m.QT)(HB,[t,n]);return new Set(r.languages.map(e=>({id:e.id,label:e.name})))}function J8(){let e=zL();e.searchDocuments||zP("searchDocuments");let{coreApiBaseUrl:t,authStrategy:n}=e,r=(0,m.QT)(HW,[t,n]);return new Set(r.results.map(e=>({id:e,label:e})))}function Ge(){let e=zL();e.searchDocuments||zP("searchDocuments");let{customTypesApiBaseUrl:t,repository:n,authStrategy:r}=e,i=(0,m.QT)(HT,[t,n,r]);return new Set(i)}function Gt(e){return e?(0,v.UI)(e,e=>({id:e,label:e})):new Set}function Gn(e){let{filteredLocales:t,setFilteredLocales:n,filteredTags:r,setFilteredTags:i,filteredCustomTypes:o,setFilteredCustomTypes:a,fixedTags:u,fixedCustomTypes:s}=e;return zE.jsxs(zE.Fragment,{children:[zE.jsx(Go,{selectedValues:t,onSelectedValuesChange:n}),zE.jsx(Gr,{selectedValues:r,fixedSelectedValues:Gt(u),onSelectedValuesChange:i,label:"Tags",icon:"label",fetchFilters:J8}),zE.jsx(Gr,{selectedValues:o,fixedSelectedValues:Gt(s),onSelectedValuesChange:a,label:"Type",icon:"description",fetchFilters:Ge})]})}function Gr(e){let[t,n]=(0,c.useState)(!1),r=(0,c.useRef)(null);return zE.jsx(f.SV,{ref:r,renderError(){var i;return zE.jsx(f.R0,{mode:"error",onErrorRetry:null==(i=r.current)?void 0:i.reset,open:t,setOpen:n,values:new Set,...e})},children:zE.jsx(c.Suspense,{fallback:zE.jsx(f.R0,{mode:"loading",open:t,setOpen:n,values:new Set,...e}),children:zE.jsx(Gi,{open:t,setOpen:n,...e})})})}function Gi(e){let{open:t,setOpen:n,onSelectedValuesChange:r,fixedSelectedValues:i,selectedValues:o,label:a,icon:u,fetchFilters:s,multiple:l}=e,c=s();return zE.jsx(f.R0,{open:t,setOpen:n,label:a,icon:u,selectedValues:o,values:new Set(c),fixedSelectedValues:i,onSelectedValuesChange:r,multiple:l})}function Go(e){let{selectedValues:t,onSelectedValuesChange:n}=e,[r,i]=(0,c.useState)((0,v.Ps)(t)),o=(0,v.sE)(J7(),e=>{var n;return e.id===(null==(n=(0,v.Ps)(t))?void 0:n.id)});return(null==o?void 0:o.label)!==(null==r?void 0:r.label)&&i(o),zE.jsx(Gr,{selectedValues:new Set(r?[r]:[]),onSelectedValuesChange:function(e){n(e),i((0,v.Ps)(e))},label:"Locale",icon:"public",fetchFilters:J7,multiple:!1})}function Ga(e){let{onSelectDocument:t,fixedCustomTypes:n,fixedTags:r,...i}=e,o=zL(),{searchTerm:a,filteredTags:u,setFilteredTags:s,filteredCustomTypes:l,setFilteredCustomTypes:d,filteredLocales:A,setFilteredLocales:h,typesFilter:m,tagsFilter:g}=function(e,t){let n=zL(),r=(0,p.$P)({initialState:""}),[i,o]=(0,c.useState)(new Set),[a,u]=(0,c.useState)(new Set),[s,l]=(0,c.useState)(function(){return n.searchDocuments&&n.localeId?new Set([{id:n.localeId,label:n.localeId}]):new Set}),d=(0,v.G0)(a,Gt(e)),f=(0,v.G0)(i,Gt(t));return{searchTerm:r,filteredTags:i,setFilteredTags:o,filteredCustomTypes:a,setFilteredCustomTypes:u,filteredLocales:s,setFilteredLocales:l,typesFilter:d,tagsFilter:f}}(n,r),[y,x]=(0,c.useTransition)();return zE.jsx(f.Vq,{size:{height:727,width:656},hasClose:!1,...i,children:zE.jsx(f.cZ,{children:zE.jsxs(f.xu,{flexDirection:"column",height:"100%",children:[zE.jsxs(f.xu,{padding:{top:16,inline:16,bottom:8},flexDirection:"column",gap:12,children:[zE.jsx(f.yt,{value:a.value,onValueChange:a.set,placeholder:"Search a page",icon:"search"}),o.searchDocuments&&zE.jsx(Gn,{filteredTags:u,setFilteredTags:s,filteredCustomTypes:l,setFilteredCustomTypes:d,filteredLocales:A,setFilteredLocales:h,fixedTags:r,fixedCustomTypes:n}),zE.jsx(f.xv,{variant:"smallBold",color:"grey11",children:"Link to a document"})]}),o.searchDocuments?zE.jsx(f.SV,{renderError:Gs,children:zE.jsx(c.Suspense,{fallback:zE.jsx(Gd,{}),children:zE.jsx(Gl,{searchTerm:a.debouncedValue,tagsFilter:g,typesFilter:m,localesFilter:A,startTransition:x,onSelectDocument:t})})}):zE.jsx(Gc,{message:"Slice Machine does not yet support mock data for linked documents in the simulator."}),zE.jsx(Gu,{isLoading:y})]})})})}function Gu(e){let{isLoading:t}=e;return zE.jsx(f.FN,{anchor:zE.jsx(f.xu,{position:"relative",width:"100%",justifyContent:"center",bottom:72}),loadingIndicator:!0,open:t,title:"Loading more results ...",seconds:1})}function Gs(){return zE.jsx(f.xu,{height:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center",children:zE.jsx(f.Iq,{title:"Request failed",description:"An error occurred while fetching documents.",errorImageSrc:f.Os})})}function Gl(e){let{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i,startTransition:o,onSelectDocument:a}=e,{documents:u,hasNextPage:s,fetchNextPage:l}=function(e){var t,n;let{searchTerm:r,tagsFilter:i,typesFilter:o,localesFilter:a}=e,u=zL();u.searchDocuments||zP("searchDocuments");let{coreApiBaseUrl:s,authStrategy:l,status:d}=u,[f,p]=(0,c.useState)(""),[A,h]=(0,c.useState)([]),[y,x]=(0,c.useState)(""),b=new URLSearchParams(HF([{name:"tags",values:[...(0,v.UI)(i,e=>e.id)]},{name:"customTypes",values:[...(0,v.UI)(o,e=>e.id)]},{name:"language",values:[...(0,v.UI)(a,e=>e.id)]},{name:"status",values:zT[d]},{name:"term",values:[r]}])).toString(),C=(0,m.QT)(J4,[s,b===y?f:"",l,b]);b!==y?(x(b),p(""),h(C.results)):C.results.length>0&&(null==(t=(0,g.Z$)(A))?void 0:t.id)!==(null==(n=(0,g.Z$)(C.results))?void 0:n.id)&&h(e=>e.concat(C.results));let S=C.total!==A.length;return{documents:A,hasNextPage:S,fetchNextPage:function(){void 0!==C.cursor&&p(C.cursor)},response:C}}({searchTerm:t,tagsFilter:n,localesFilter:i,typesFilter:r}),d=zL();return zE.jsxs(f.xr,{onScrollToBottom:()=>s&&o(l),style:{flexGrow:1,paddingTop:f.rS.space[10],paddingBottom:f.rS.space[16],paddingInline:f.rS.space[16],display:"flex",flexDirection:"column",gap:f.rS.space[12]},children:[0===u.length&&zE.jsx(Gc,{}),u.map(e=>{let t=e.versions[0];if(!t)return null;let r=zO({documentId:e.id,versionId:"archived"===t.status?t.version_id:void 0,releaseId:"release"===t.status?t.release_id:void 0,status:t.status,baseUrl:d.baseUrl}),i=function(e){let{tags:t,tagsFilter:n}=e,r=[...n].map(e=>e.label).reverse();return(0,g.DY)(t,e=>-r.indexOf(e))}({tags:t.tags,tagsFilter:n});return zE.jsx(J1,{documentType:t.custom_type_label,documentUrl:r,description:t.preview_summary,tags:i,title:e.title,previewImageUrl:t.preview_image,onSelect:()=>a(e.id),statusColor:z_[t.status].color},`${e.id}-${t.status}`)})]})}function Gc(e){let{message:t="We can't find any versions matching this request"}=e;return zE.jsx(f.xu,{justifyContent:"center",flexDirection:"column",height:"100%",children:zE.jsxs(f.R$,{children:[zE.jsx(f.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),zE.jsx(f._T,{size:"big",children:"Oops!"}),zE.jsx(f.nf,{width:360,children:t})]})})}function Gd(){return zE.jsx(f.xu,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:(0,g.w6)(1,5).map(e=>zE.jsx(f.Od,{height:150},e))})}function Gf(e){let{hasLink:t,onUnlink:n,selectEnabled:r,selectedType:i,onValueChange:o,openInNewTab:a=!0,setOpenInNewTab:u}=e;return zE.jsxs(zE.Fragment,{children:[u&&"web"===i&&zE.jsx(f.zx,{startIcon:a?"checkBox":"checkBoxOutlinedBlank",color:"grey",size:"small",onClick:()=>u(!a),children:"Open in new tab"}),zE.jsxs(f.Ph,{value:i,color:"grey",size:"small",boldTriggerText:!0,startIcon:function(e){if(e)switch(e){case"document":return"description";case"web":return"public";case"media":return"image"}}(i),disabled:!r,onValueChange:o,placeholder:"Choose link type",children:[zE.jsx(f.Ql,{value:"web",icon:"public",children:"Link to web page"}),zE.jsx(f.Ql,{value:"document",icon:"description",children:"Link to Prismic page"}),zE.jsx(f.Ql,{value:"media",icon:"image",children:"Link to media"})]}),zE.jsx(f.zx,{startIcon:"close",color:"grey",size:"small",disabled:!t,onClick:n})]})}m.Fs.registerFetcherConfig(J4,{cacheCapacity:500,revalidationStrategy:{type:"never"}});let Gp={DocumentLink:"document",ExternalLink:"web",FileLink:"media",ImageLink:"media"},GA={document:"DocumentLink",web:"ExternalLink",media:"FileLink"},Gh=Ht({id:YG(),title:YG()});function Gm(e,t,n){return(0,y.WY)(new URL(`documents/${n}`,e),{credentials:(0,y.xb)(t),okType:Gh})}function Gg(e){var t,n,r,i,o,a;let{media:u}=e,s="kind"in u;return s&&"image"===u.kind?{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:u.id,name:u.filename,url:u.url,kind:u.kind,size:u.size.toString(),height:(null==(t=u.height)?void 0:t.toString())??"2000",width:(null==(n=u.width)?void 0:n.toString())??"2000",date:(null==(r=u.last_modified)?void 0:r.toString())??""}}:s?{__TYPE__:"LinkContent",value:{__TYPE__:"FileLink",id:u.id,name:u.filename,kind:u.kind,url:u.url,size:u.size.toString(),date:(null==(i=u.last_modified)?void 0:i.toString())??""}}:{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:u.id,name:(null==u?void 0:u.alt)??u.url,kind:"image",url:u.url,size:"0",height:(null==(o=u.height)?void 0:o.toString())??"2000",width:(null==(a=u.width)?void 0:a.toString())??"2000"}}}function Gy(e){var t,n;let{content:r,field:i,id:o,onContentChange:a,readOnly:u}=e,[s,d]=(0,c.useState)(!1),[A,h]=(0,c.useState)(!1),[m,g]=(0,c.useState)(!1),[y,v]=(0,c.useState)(!1),{contentType:x,fieldValue:b,errorBoundaryRef:C,onDocumentSelected:S,onError:w,onMediaSelected:I,..._}=function(e){var t;let{field:n,content:r,onContentChange:i}=e,o=r?"DocumentLink"===r.value.__TYPE__?r.value.id:"ExternalLink"===r.value.__TYPE__?r.value.url:r.value.name:"",[a,u]=(0,c.useState)(function(){var e,t;return!(null!=(e=n.config)&&e.select)||null!=r&&r.value.__TYPE__?null==r?void 0:r.value.__TYPE__:GA[null==(t=n.config)?void 0:t.select]}),[s,l]=(0,c.useState)(()=>(null==r?void 0:r.value.__TYPE__)==="ExternalLink"?r.value.target:""),[d,f]=(0,c.useState)(!1),A=(0,c.useRef)(null);(0,p.pQ)(o,function(){var e;d&&(f(!1),null==(e=A.current)||e.reset())});let h=a?Gp[a]:void 0;function m(e){if(!e)return i(void 0);switch(a){case"ExternalLink":return i({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:e,target:s}});case"DocumentLink":return i({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",id:e}});case"FileLink":case"ImageLink":case void 0:return i(void 0)}}function g(e){m(e)}return{contentType:a,selectType:h,fieldValue:o,onValueChange:m,onTypeChange:function(e){u(GA[e]),m("")},placeholder:Z7(n),isTypeSelectEnabled:!(null!=(t=n.config)&&t.select),onDocumentSelected:g,onError:function(){f(!0)},errorBoundaryRef:A,isTargetNewTab:"_blank"===s,updateWebLinkTarget:function(e){let t=e?"_blank":null;l(t),i({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:o,target:t}})},onMediaSelected:function(e){i(Gg({media:e}))}}}({content:r,field:i,onContentChange:a}),T="ExternalLink"===x&&(0,l.ju)(b),O={id:o,contentType:x,onBlur:()=>d(!1),onFocus(){d(!0),"DocumentLink"===x&&g(!0),"FileLink"===x&&v(!0),"ImageLink"===x&&v(!0)},readOnly:u||!x,textType:T||"ImageLink"===x||"FileLink"===x?"link":"normal",value:b,..._},{searchDocuments:R}=zL();return zE.jsxs(zE.Fragment,{children:[zE.jsxs(f.J2,{onMouseOverChange:h,open:s||A,align:"start",sideOffset:-3,openDelay:100,closeDelay:200,focusOnEnter:!1,anchor:zE.jsxs(f.gN,{onMouseOverChange:d,children:[zE.jsx(f.fw,{name:"link"}),zE.jsx(f.Qy,{htmlFor:o,children:Z4(i)}),zE.jsx(f.JO,{children:"DocumentLink"===x&&""!==b&&R?zE.jsx(Gb,{errorBoundaryRef:C,onError:w,fallback:zE.jsx(Gv,{...O,value:"..."}),renderError(){var e;return e=O,zE.jsx(Gv,{...e,textType:"link"})},children:zE.jsx(Gx,{...O,documentId:b,openDocumentListModal:()=>g(!0)})}):zE.jsx(Gv,{...O})})]}),children:[T&&zE.jsx(f.oZ,{url:T,title:(0,l.S$)(T)??"",subTitle:T.toString()}),(null==r?void 0:r.value.__TYPE__)==="ImageLink"&&zE.jsx(f.Qi,{url:r.value.url,title:r.value.name,subTitle:`${r.value.width} x ${r.value.height} pixels`})]}),zE.jsx(Jw,{open:y,onOpenChange:v,onMediaSelected:I,assetType:"all"}),zE.jsx(Ga,{open:m,onOpenChange:g,onSelectDocument(e){g(!1),S(e)},fixedCustomTypes:new Set(null==(t=i.config)?void 0:t.customtypes),fixedTags:new Set(null==(n=i.config)?void 0:n.tags)})]})}function Gv(e){let{id:t,onValueChange:n,placeholder:r,readOnly:i,value:o,textType:a,onFocus:u,onBlur:s,contentType:l,isTypeSelectEnabled:c,selectType:d,onTypeChange:f,isTargetNewTab:p,updateWebLinkTarget:A}=e,h="DocumentLink"===l||"ImageLink"===l||"FileLink"===l;return zE.jsx(Jn,{id:t,onValueChange:n,placeholder:r,readOnly:i||h,value:o,variant:a,onFocus:u,onBlur:s,cursor:h?"pointer":"text",endAdornment:zE.jsx(Gf,{hasLink:!!o,onUnlink:()=>n(""),selectEnabled:c,selectedType:d,onValueChange:f,openInNewTab:p,setOpenInNewTab:A})})}function Gx(e){let{id:t,documentId:n,openDocumentListModal:r,onValueChange:i,isTypeSelectEnabled:o,selectType:a,onTypeChange:u}=e,s=function(e){let t=zL();t.searchDocuments||zP("searchDocuments");let{coreApiBaseUrl:n,authStrategy:r}=t;return(0,m.QT)(Gm,[n,r,e]).title}(n);return zE.jsx(Jn,{id:t,readOnly:!0,value:s,variant:"link",onFocus:r,cursor:"pointer",endAdornment:zE.jsx(Gf,{hasLink:!0,onUnlink:()=>i(""),selectEnabled:o,selectedType:a,onValueChange:u})})}function Gb(e){let{errorBoundaryRef:t,onError:n,children:r,fallback:i,renderError:o}=e;return zE.jsx(f.SV,{ref:t,onError:n,renderError:o,children:zE.jsx(c.Suspense,{fallback:i,children:r})})}m.Fs.registerFetcherConfig(Gm,{concurrency:2});let GC=({content:e,field:t,id:n,onContentChange:r,readOnly:i})=>{var o,a;let u=Number(null==e?void 0:e.value),s=Number.isFinite(u)?u:void 0;return zE.jsxs(f.gN,{children:[zE.jsx(f.fw,{name:"pin"}),zE.jsx(f.Qy,{htmlFor:n,children:Z4(t)}),zE.jsx(f.JO,{children:zE.jsx(f.Y2,{id:n,value:s,min:null==(o=t.config)?void 0:o.min,max:null==(a=t.config)?void 0:a.max,padding:Jr,placeholder:Z7(t),readOnly:i,onValueChange(e){var t;return r((t=e,void 0===t?void 0:{__TYPE__:"FieldContent",type:"Number",value:String(t)}))}})})]})};function GS(e){this.content=e}GS.prototype={constructor:GS,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return -1},get:function(e){var t=this.find(e);return -1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return -1==i?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new GS(o)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new GS(n)},addToStart:function(e,t){return new GS([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new GS(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(-1==o?i.length:o,0,t,n),new GS(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=GS.from(e)).size?new GS(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=GS.from(e)).size?new GS(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=GS.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},GS.from=function(e){if(e instanceof GS)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new GS(t)};class Gw{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,r=0,i){for(let o=0,a=0;a<t;o++){let u=this.content[o],s=a+u.nodeSize;if(s>e&&!1!==n(u,r+a,i||null,o)&&u.content.size){let l=a+1;u.nodesBetween(Math.max(0,e-l),Math.min(u.content.size,t-l),n,r+l)}a=s}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,(a,u)=>{a.isText?(i+=a.text.slice(Math.max(e,u)-u,t-u),o=!n):a.isLeaf?(r?i+="function"==typeof r?r(a):r:a.type.spec.leafText&&(i+=a.type.spec.leafText(a)),o=!n):!o&&a.isBlock&&(i+=n,o=!0)},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);i<e.content.length;i++)r.push(e.content[i]);return new Gw(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let i=0,o=0;o<t;i++){let a=this.content[i],u=o+a.nodeSize;u>e&&((o<e||u>t)&&(a=a.isText?a.cut(Math.max(0,e-o),Math.min(a.text.length,t-o)):a.cut(Math.max(0,e-o-1),Math.min(a.content.size,t-o-1))),n.push(a),r+=a.nodeSize),o=u}return new Gw(n,r)}cutByIndex(e,t){return e==t?Gw.empty:0==e&&t==this.content.length?this:new Gw(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new Gw(r,i)}addToStart(e){return new Gw([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Gw(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return function e(t,n,r){for(let i=0;;i++){if(i==t.childCount||i==n.childCount)return t.childCount==n.childCount?null:r;let o=t.child(i),a=n.child(i);if(o==a){r+=o.nodeSize;continue}if(!o.sameMarkup(a))return r;if(o.isText&&o.text!=a.text){for(let u=0;o.text[u]==a.text[u];u++)r++;return r}if(o.content.size||a.content.size){let s=e(o.content,a.content,r+1);if(null!=s)return s}r+=o.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return function e(t,n,r,i){for(let o=t.childCount,a=n.childCount;;){if(0==o||0==a)return o==a?null:{a:r,b:i};let u=t.child(--o),s=n.child(--a),l=u.nodeSize;if(u==s){r-=l,i-=l;continue}if(!u.sameMarkup(s))return{a:r,b:i};if(u.isText&&u.text!=s.text){let c=0,d=Math.min(u.text.length,s.text.length);for(;c<d&&u.text[u.text.length-c-1]==s.text[s.text.length-c-1];)c++,r--,i--;return{a:r,b:i}}if(u.content.size||s.content.size){let f=e(u.content,s.content,r-1,i-1);if(f)return f}r-=l,i-=l}}(this,e,t,n)}findIndex(e,t=-1){if(0==e)return G_(0,e);if(e==this.size)return G_(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=e)return i==e||t>0?G_(n+1,i):G_(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return Gw.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return new Gw(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Gw.empty;let t,n=0;for(let r=0;r<e.length;r++){let i=e[r];n+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(t||(t=e.slice(0,r)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new Gw(t||e,n)}static from(e){if(!e)return Gw.empty;if(e instanceof Gw)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Gw([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Gw.empty=new Gw([],0);let GI={index:0,offset:0};function G_(e,t){return GI.index=e,GI.offset=t,GI}function GT(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!GT(e[r],t[r]))return!1}else{for(let i in e)if(!(i in t)||!GT(e[i],t[i]))return!1;for(let o in t)if(!(o in e))return!1}return!0}let GO=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&GT(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};GO.none=[];class GR extends Error{}class Gk{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=function e(t,n,r,i){let{index:o,offset:a}=t.findIndex(n),u=t.maybeChild(o);if(a==n||u.isText)return i&&!i.canReplace(o,o,r)?null:t.cut(0,n).append(r).append(t.cut(n));let s=e(u.content,n-a-1,r);return s&&t.replaceChild(o,u.copy(s))}(this.content,e+this.openStart,t);return n&&new Gk(n,this.openStart,this.openEnd)}removeBetween(e,t){return new Gk(function e(t,n,r){let{index:i,offset:o}=t.findIndex(n),a=t.maybeChild(i),{index:u,offset:s}=t.findIndex(r);if(o==n||a.isText){if(s!=r&&!t.child(u).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=u)throw RangeError("Removing non-flat range");return t.replaceChild(i,a.copy(e(a.content,n-o-1,r-o-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return Gk.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new Gk(Gw.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)n++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)r++;return new Gk(e,n,r)}}function GE(e,t){if(!t.type.compatibleContent(e.type))throw new GR("Cannot join "+t.type.name+" onto "+e.type.name)}function GM(e,t,n){let r=e.node(n);return GE(r,t.node(n)),r}function GF(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Gj(e,t,n,r){let i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(GF(e.nodeAfter,r),o++));for(let u=o;u<a;u++)GF(i.child(u),r);t&&t.depth==n&&t.textOffset&&GF(t.nodeBefore,r)}function GU(e,t){return e.type.checkContent(t),e.copy(t)}function GK(e,t,n){let r=[];return Gj(null,e,n,r),e.depth>n&&GF(GU(GM(e,t,n+1),GK(e,t,n+1)),r),Gj(t,null,n,r),new Gw(r)}Gk.empty=new Gk(Gw.empty,0,0);class GL{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let i=0;i<e;i++)r+=n.child(i).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return GO.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let i=n;n=r,r=i}let o=n.marks;for(var a=0;a<o.length;a++)!1!==o[a].type.spec.inclusive||r&&o[a].isInSet(r.marks)||(o=o[a--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new GD(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let o=e;;){let{index:a,offset:u}=o.content.findIndex(i),s=i-u;if(n.push(o,a,r+u),!s||(o=o.child(a)).isText)break;i=s-1,r+=u+1}return new GL(t,n,i)}static resolveCached(e,t){for(let n=0;n<GB.length;n++){let r=GB[n];if(r.pos==t&&r.doc==e)return r}let i=GB[GP]=GL.resolve(e,t);return GP=(GP+1)%GW,i}}let GB=[],GP=0,GW=12;class GD{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}let GN=Object.create(null),Gq=class e{constructor(e,t,n,r=GO.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||Gw.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&GT(this.attrs,t||e.defaultAttrs||GN)&&GO.sameSet(this.marks,n||GO.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return Gk.empty;let r=this.resolve(e),i=this.resolve(t),o=n?0:r.sharedDepth(t),a=r.start(o),u=r.node(o).content.cut(r.pos-a,i.pos-a);return new Gk(u,r.depth-o,i.depth-o)}replace(e,t,n){return function(e,t,n){if(n.openStart>e.depth)throw new GR("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new GR("Inconsistent open depths");return function e(t,n,r,i){let o=t.index(i),a=t.node(i);if(o==n.index(i)&&i<t.depth-r.openStart){let u=e(t,n,r,i+1);return a.copy(a.content.replaceChild(o,u))}if(!r.content.size)return GU(a,GK(t,n,i));if(r.openStart||r.openEnd||t.depth!=i||n.depth!=i){let{start:s,end:l}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)r=t.node(i).copy(Gw.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t);return GU(a,function e(t,n,r,i,o){let a=t.depth>o&&GM(t,n,o+1),u=i.depth>o&&GM(r,i,o+1),s=[];return Gj(null,t,o,s),a&&u&&n.index(o)==r.index(o)?(GE(a,u),GF(GU(a,e(t,n,r,i,o+1)),s)):(a&&GF(GU(a,GK(t,n,o+1)),s),Gj(n,r,o,s),u&&GF(GU(u,GK(r,i,o+1)),s)),Gj(i,null,o,s),new Gw(s)}(t,s,l,n,i))}{let c=t.parent,d=c.content;return GU(c,d.cut(0,t.parentOffset).append(r.content).append(d.cut(n.parentOffset)))}}(e,t,n,0)}(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return GL.resolveCached(this,e)}resolveNoCache(e){return GL.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),GV(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=Gw.empty,r=0,i=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,i),a=o&&o.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let u=r;u<i;u++)if(!this.type.allowsMarks(n.child(u).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),o=i&&i.matchFragment(this.content,t);return!!o&&o.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=GO.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!GO.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=Gw.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}};Gq.prototype.text=void 0;class GQ extends Gq{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):GV(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new GQ(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new GQ(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function GV(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Gz{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var n;let r=new GY(e,t);if(null==r.next)return Gz.empty;let i=GH(r);r.next&&r.err("Unexpected trailing text");let o,a=(n=function(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function o(e,t){if("choice"==e.type)return e.exprs.reduce((e,n)=>e.concat(o(n,t)),[]);if("seq"==e.type)for(let a=0;;a++){let u=o(e.exprs[a],t);if(a==e.exprs.length-1)return u;i(u,t=n())}else if("star"==e.type){let s=n();return r(t,s),i(o(e.expr,s),s),[r(s)]}else if("plus"==e.type){let l=n();return i(o(e.expr,t),l),i(o(e.expr,l),l),[r(l)]}else{if("opt"==e.type)return[r(t)].concat(o(e.expr,t));if("range"==e.type){let c=t;for(let d=0;d<e.min;d++){let f=n();i(o(e.expr,c),f),c=f}if(-1==e.max)i(o(e.expr,c),c);else for(let p=e.min;p<e.max;p++){let A=n();r(c,A),i(o(e.expr,c),A),c=A}return[r(c)]}if("name"==e.type)return[r(t,void 0,e.value)];throw Error("Unknown expr type")}}}(i),o=Object.create(null),function e(t){let r=[];t.forEach(e=>{n[e].forEach(({term:e,to:t})=>{if(!e)return;let i;for(let o=0;o<r.length;o++)r[o][0]==e&&(i=r[o][1]);G1(n,t).forEach(t=>{i||r.push([e,i=[]]),-1==i.indexOf(t)&&i.push(t)})})});let i=o[t.join(",")]=new Gz(t.indexOf(n.length-1)>-1);for(let a=0;a<r.length;a++){let u=r[a][1].sort(G0);i.next.push({type:r[a][0],next:o[u.join(",")]||e(u)})}return i}(G1(n,0)));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],o=!i.validEnd,a=[];for(let u=0;u<i.next.length;u++){let{type:s,next:l}=i.next[u];a.push(s.name),o&&!(s.isText||s.hasRequiredAttrs())&&(o=!1),-1==r.indexOf(l)&&r.push(l)}o&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function i(o,a){let u=o.matchFragment(e,n);if(u&&(!t||u.validEnd))return Gw.from(a.map(e=>e.createAndFill()));for(let s=0;s<o.next.length;s++){let{type:l,next:c}=o.next[s];if(!(l.isText||l.hasRequiredAttrs())&&-1==r.indexOf(c)){r.push(c);let d=i(c,a.concat(l));if(d)return d}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let o=[];for(let a=r;a.type;a=a.via)o.push(a.type);return o.reverse()}for(let u=0;u<i.next.length;u++){let{type:s,next:l}=i.next[u];s.isLeaf||s.hasRequiredAttrs()||s.name in t||r.type&&!l.validEnd||(n.push({match:s.contentMatch,type:s,via:r}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let i=0;i<t.next.length;i++)r+=(i?", ":"")+t.next[i].type.name+"->"+e.indexOf(t.next[i].next);return r}).join(`
8
+ `)}}Gz.empty=new Gz(!0);class GY{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}}function GH(e){let t=[];do t.push(GZ(e));while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function GZ(e){let t=[];do t.push(GJ(e));while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function GJ(e){let t=GX(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=G$(e,t);else break;return t}function GG(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function G$(e,t){let n=GG(e),r=n;return e.eat(",")&&(r="}"!=e.next?GG(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function GX(e){if(e.eat("(")){let t=GH(e);return e.eat(")")||e.err("Missing closing paren"),t}if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let n=(function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let a=n[o];a.groups.indexOf(t)>-1&&i.push(a)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(e,e.next).map(t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}}function G0(e,t){return t-e}function G1(e,t){let n=[];return function t(r){let i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(let o=0;o<i.length;o++){let{term:a,to:u}=i[o];a||-1!=n.indexOf(u)||t(u)}}(t),n.sort(G0)}function G2(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function G6(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(void 0===i){let o=e[r];if(o.hasDefault)i=o.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function G5(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new G9(e[n]);return t}let G3=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=G5(n.attrs),this.defaultAttrs=G2(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Gz.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:G6(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new Gq(this,this.computeAttrs(e),Gw.from(t),GO.setFrom(n))}createChecked(e=null,t,n){return t=Gw.from(t),this.checkContent(t),new Gq(this,this.computeAttrs(e),t,GO.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=Gw.from(t)).size){let r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}let i=this.contentMatch.matchFragment(t),o=i&&i.fillBefore(Gw.empty,!0);return o?new Gq(this,e,t.append(o),GO.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(null==this.markSet)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:GO.none:e}static compile(t,n){let r=Object.create(null);t.forEach((t,i)=>r[t]=new e(t,n,i));let i=n.spec.topNode||"doc";if(!r[i])throw RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw RangeError("The text node type should not have attributes");return r}};class G9{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class G4{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=G5(r.attrs),this.excluded=null;let i=G2(this.attrs);this.instance=i?new GO(this,i):null}create(e=null){return!e&&this.instance?this.instance:new GO(this,G6(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,i)=>n[e]=new G4(e,r++,t,i)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class G7{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=GS.from(e.nodes),t.marks=GS.from(e.marks||{}),this.nodes=G3.compile(this.spec.nodes,this),this.marks=G4.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],a=o.spec.content||"",u=o.spec.marks;o.contentMatch=r[a]||(r[a]=Gz.parse(a,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==u?null:u?G8(this,u.split(" ")):""!=u&&o.inlineContent?null:[]}for(let s in this.marks){let l=this.marks[s],c=l.spec.excludes;l.excluded=null==c?[l]:""==c?[]:G8(this,c.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof G3){if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")")}else throw RangeError("Invalid node type: "+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new GQ(n,n.defaultAttrs,e,GO.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return Gq.fromJSON(this,e)}markFromJSON(e){return GO.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function G8(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],a=o;if(o)n.push(o);else for(let u in e.marks){let s=e.marks[u];("_"==i||s.spec.group&&s.spec.group.split(" ").indexOf(i)>-1)&&n.push(a=s)}if(!a)throw SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class $e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(e=>{e.tag?this.tags.push(e):e.style&&this.styles.push(e)}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new $a(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new $a(this,t,!0);return n.addAll(e,t.from,t.to),Gk.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let i=this.tags[r];if($u(e,i.tag)&&(void 0===i.namespace||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(!1===o)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let o=this.styles[i],a=o.style;if(!(0!=a.indexOf(e)||o.context&&!n.matchesContext(o.context)||a.length>e.length&&(61!=a.charCodeAt(e.length)||a.slice(e.length+1)!=t))){if(o.getAttrs){let u=o.getAttrs(t);if(!1===u)continue;o.attrs=u||void 0}return o}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let i=t[r];if((null==i.priority?50:i.priority)<n)break}t.splice(r,0,e)}for(let r in e.marks){let i=e.marks[r].spec.parseDOM;i&&i.forEach(e=>{n(e=$s(e)),e.mark||e.ignore||e.clearMark||(e.mark=r)})}for(let o in e.nodes){let a=e.nodes[o].spec.parseDOM;a&&a.forEach(e=>{n(e=$s(e)),e.node||e.ignore||e.mark||(e.node=o)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new $e(e,$e.schemaRules(e)))}}let $t={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},$n={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},$r={ol:!0,ul:!0};function $i(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class $o{constructor(e,t,n,r,i,o,a){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=i,this.options=a,this.content=[],this.activeMarks=GO.none,this.stashMarks=[],this.match=o||(4&a?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(Gw.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let n=this.type.contentMatch,r;return(r=n.findWrapping(e.type))?(this.match=n,r):null}}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let t=this.content[this.content.length-1],n;t&&t.isText&&(n=/[ \t\r\n\u000c]+$/.exec(t.text))&&(t.text.length==n[0].length?this.content.pop():this.content[this.content.length-1]=t.withText(t.text.slice(0,t.text.length-n[0].length)))}let r=Gw.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(Gw.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;t<n.length;t++){let r=n[t];(this.type?this.type.allowsMarkType(r.type):$l(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!$t.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class $a{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r=t.topNode,i,o=$i(null,t.preserveWhitespace,0)|(n?4:0);i=r?new $o(r.type,r.attrs,GO.none,GO.none,!0,t.topMatch||r.type.contentMatch,o):n?new $o(null,null,GO.none,GO.none,!0,null,o):new $o(e.schema.topNodeType,null,GO.none,GO.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){let t=e.getAttribute("style");if(t){let n=this.readStyles(function(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=t.exec(e);)r.push(n[1],n[2].trim());return r}(t));if(!n)return;let[r,i]=n,o=this.top;for(let a=0;a<i.length;a++)this.removePendingMark(i[a],o);for(let u=0;u<r.length;u++)this.addPendingMark(r[u]);this.addElement(e);for(let s=0;s<r.length;s++)this.removePendingMark(r[s],o);for(let l=0;l<i.length;l++)this.addPendingMark(i[l])}else this.addElement(e)}}addTextNode(e){let t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,`
9
+ `):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],i=e.previousSibling;(!r||i&&"BR"==i.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n=e.nodeName.toLowerCase(),r;$r.hasOwnProperty(n)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&$r.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);let i=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(r=this.parser.matchTag(e,this,t));if(i?i.ignore:$n.hasOwnProperty(n))this.findInside(e),this.ignoreFallback(e);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(e=i.skip);let o,a=this.top,u=this.needsBlock;if($t.hasOwnProperty(n))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),o=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e);return}this.addAll(e),o&&this.sync(a),this.needsBlock=u}else this.addElementByRule(e,i,!1===i.consuming?r:void 0)}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
10
+ `))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=GO.none,n=GO.none;e:for(let r=0;r<e.length;r+=2)for(let i;;){let o=this.parser.matchStyle(e[r],e[r+1],this,i);if(!o)continue e;if(o.ignore)return null;if(o.clearMark?this.top.pendingMarks.forEach(e=>{o.clearMark(e)&&(n=e.addToSet(n))}):t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1===o.consuming)i=o;else break}return[t,n]}addElementByRule(e,t,n){let r,i,o;t.node?(i=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(i.create(t.attrs))||this.leafFallback(e):r=this.enter(i,t.attrs||null,t.preserveWhitespace):(o=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(o));let a=this.top;if(i&&i.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e));else{let u=e;"string"==typeof t.contentElement?u=e.querySelector(t.contentElement):"function"==typeof t.contentElement?u=t.contentElement(e):t.contentElement&&(u=t.contentElement),this.findAround(e,u,!0),this.addAll(u)}r&&this.sync(a)&&this.open--,o&&this.removePendingMark(o,a)}addAll(e,t,n){let r=t||0;for(let i=t?e.childNodes[t]:e.firstChild,o=null==n?null:e.childNodes[n];i!=o;i=i.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(i);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let i=this.nodes[r],o=i.findWrapping(e);if(o&&(!t||t.length>o.length)&&(t=o,n=i,!o.length)||i.solid)break}if(!t)return!1;this.sync(n);for(let a=0;a<t.length;a++)this.enterInner(t[a],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();let n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));let r=n.activeMarks;for(let i=0;i<e.marks.length;i++)(!n.type||n.type.allowsMarkType(e.marks[i].type))&&(r=e.marks[i].addToSet(r));return n.content.push(e.mark(r)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let i=this.top;i.applyPending(e),i.match=i.match&&i.match.matchType(e);let o=$i(e,r,i.options);4&i.options&&0==i.content.length&&(o|=4),this.nodes.push(new $o(e,t,i.activeMarks,i.pendingMarks,n,null,o)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),o=(e,a)=>{for(;e>=0;e--){let u=t[e];if(""==u){if(e==t.length-1||0==e)continue;for(;a>=i;a--)if(o(e-1,a))return!0;return!1}{let s=a>0||0==a&&r?this.nodes[a].type:n&&a>=i?n.node(a-i).type:null;if(!s||s.name!=u&&-1==s.groups.indexOf(u))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let i=this.parser.schema.nodes[r];if(i.isTextblock&&i.defaultAttrs)return i}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let i=r.popFromStashMark(e);i&&r.type&&r.type.allowsMarkType(i.type)&&(r.activeMarks=i.addToSet(r.activeMarks))}if(r==t)break}}}function $u(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function $s(e){let t={};for(let n in e)t[n]=e[n];return t}function $l(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],a=e=>{o.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||0>o.indexOf(i)&&a(i))return!0}};if(a(i.contentMatch))return!0}}class $c{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=$f(t).createDocumentFragment());let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,o=0;for(;n<i.length&&o<e.marks.length;){let a=e.marks[o];if(!this.marks[a.type.name]){o++;continue}if(!a.eq(i[n][0])||!1===a.type.spec.spanning)break;n++,o++}for(;n<i.length;)r=i.pop()[1];for(;o<e.marks.length;){let u=e.marks[o++],s=this.serializeMark(u,e.isInline,t);s&&(i.push([u,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=$c.renderSpec($f(t),this.nodes[e.type.name](e));if(r){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&$c.renderSpec($f(n),r(e,t))}static renderSpec(e,t,n=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r=t[0],i=r.indexOf(" ");i>0&&(n=r.slice(0,i),r=r.slice(i+1));let o,a=n?e.createElementNS(n,r):e.createElement(r),u=t[1],s=1;if(u&&"object"==typeof u&&null==u.nodeType&&!Array.isArray(u)){for(let l in s=2,u)if(null!=u[l]){let c=l.indexOf(" ");c>0?a.setAttributeNS(l.slice(0,c),l.slice(c+1),u[l]):a.setAttribute(l,u[l])}}for(let d=s;d<t.length;d++){let f=t[d];if(0===f){if(d<t.length-1||d>s)throw RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:p,contentDOM:A}=$c.renderSpec(e,f,n);if(a.appendChild(p),A){if(o)throw RangeError("Multiple content holes");o=A}}}return{dom:a,contentDOM:o}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new $c(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=$d(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return $d(e.marks)}}function $d(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function $f(e){return e.document||window.document}function $p(e,t){return e+65536*t}function $A(e){return 65535&e}let $h=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}},$m=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){var t;let n=0,r=$A(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+n+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let u=this.ranges[a]-(this.inverted?r:0);if(u>e)break;let s=this.ranges[a+i],l=this.ranges[a+o],c=u+s;if(e<=c){let d=s?e==u?-1:e==c?1:t:t,f=u+r+(d<0?0:l);if(n)return f;let p=e==(t<0?u:c)?null:$p(a/3,e-u),A=e==u?2:e==c?1:4;return(t<0?e!=u:e!=c)&&(A|=8),new $h(f,A,p)}r+=l-s}return n?e+r:new $h(e+r,0,null)}touches(e,t){let n=0,r=$A(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let u=this.ranges[a]-(this.inverted?n:0);if(u>e)break;let s=this.ranges[a+i];if(e<=u+s&&a==3*r)return!0;n+=this.ranges[a+o]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],a=o-(this.inverted?i:0),u=o+(this.inverted?0:i),s=this.ranges[r+t],l=this.ranges[r+n];e(a,a+s,u,u+l),i+=l-s}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};$m.empty=new $m([]);class $g{constructor(e=[],t,n=0,r=e.length){this.maps=e,this.mirror=t,this.from=n,this.to=r}slice(e=0,t=this.maps.length){return new $g(this.maps,this.mirror,e,t)}copy(){return new $g(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,n=this.maps.length;t<e.maps.length;t++){let r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new $g;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let i=this.from;i<this.to;i++){let o=this.maps[i].mapResult(e,t);if(null!=o.recover){let a=this.getMirror(i);if(null!=a&&a>i&&a<this.to){i=a,e=this.maps[a].recover(o.recover);continue}}r|=o.delInfo,e=o.pos}return n?e:new $h(e,r,null)}}let $y=Object.create(null),$v=class{getMap(){return $m.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=$y[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in $y)throw RangeError("Duplicate use of step JSON ID "+e);return $y[e]=t,t.prototype.jsonID=e,t}},$x=class e{constructor(e,t){this.doc=e,this.failed=t}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,r,i){try{return e.ok(t.replace(n,r,i))}catch(o){if(o instanceof GR)return e.fail(o.message);throw o}}};function $b(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy($b(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return Gw.fromArray(r)}let $C=class e extends $v{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new Gk($b(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,r),t.openStart,t.openEnd);return $x.fromReplace(e,this.from,this.to,i)}invert(){return new $S(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};$v.jsonID("addMark",$C);let $S=class e extends $v{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new Gk($b(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return $x.fromReplace(e,this.from,this.to,n)}invert(){return new $C(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};$v.jsonID("removeMark",$S);let $w=class e extends $v{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $x.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return $x.fromReplace(e,this.pos,this.pos+1,new Gk(Gw.from(n),0,t.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new e(this.pos,n.marks[i]);return new e(this.pos,this.mark)}}return new $I(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if("number"!=typeof n.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new e(n.pos,t.markFromJSON(n.mark))}};$v.jsonID("addNodeMark",$w);let $I=class e extends $v{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $x.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return $x.fromReplace(e,this.pos,this.pos+1,new Gk(Gw.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new $w(this.pos,this.mark):this}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if("number"!=typeof n.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new e(n.pos,t.markFromJSON(n.mark))}};$v.jsonID("removeNodeMark",$I);let $_=class e extends $v{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&$O(e,this.from,this.to)?$x.fail("Structure replace would overwrite content"):$x.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new $m([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new e(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let n=this.slice.size+t.slice.size==0?Gk.empty:new Gk(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}}{let r=this.slice.size+t.slice.size==0?Gk.empty:new Gk(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),r,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,Gk.fromJSON(t,n.slice),!!n.structure)}};$v.jsonID("replace",$_);let $T=class e extends $v{constructor(e,t,n,r,i,o,a=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=a}apply(e){if(this.structure&&($O(e,this.from,this.gapFrom)||$O(e,this.gapTo,this.to)))return $x.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return $x.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?$x.fromReplace(e,this.from,this.to,n):$x.fail("Content does not fit in gap")}getMap(){return new $m([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new e(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,Gk.fromJSON(t,n.slice),n.insert,!!n.structure)}};function $O(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let a=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}}return!1}function $R(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function $k(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),i=e.$from.index(n),o=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(i,o,t))return n;if(0==n||r.type.spec.isolating||!$R(r,i,o))break}return null}function $E(e,t,n=null,r=e){let i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let a=o.length?o[0]:t;return n.canReplaceWith(r,i,a)?o:null}(e,t),o=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),a=t.contentMatch.findWrapping(o.type);if(!a)return null;let u=(a.length?a[a.length-1]:t).contentMatch;for(let s=r;u&&s<i;s++)u=u.matchType(n.child(s).type);return u&&u.validEnd?a:null}(r,t);return o?i.map($M).concat({type:t,attrs:n}).concat(o.map($M)):null}function $M(e){return{type:e,attrs:null}}function $F(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,a=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,s=n-2;u>o;u--,s--){let l=i.node(u),c=i.index(u);if(l.type.spec.isolating)return!1;let d=l.content.cutByIndex(c,l.childCount),f=r&&r[s+1];f&&(d=d.replaceChild(0,f.type.create(f.attrs)));let p=r&&r[s]||l;if(!l.canReplace(c+1,l.childCount)||!p.type.validContent(d))return!1}let A=i.indexAfter(o),h=r&&r[0];return i.node(o).canReplaceWith(A,A,h?h.type:i.node(o+1).type)}function $j(e,t){let n=e.resolve(t),r=n.index();return $U(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function $U(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function $K(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,a,u=r.index(i);if(i==r.depth?(o=r.nodeBefore,a=r.nodeAfter):n>0?(o=r.node(i+1),u++,a=r.node(i).maybeChild(u)):(o=r.node(i).maybeChild(u-1),a=r.node(i+1)),o&&!o.isTextblock&&$U(o,a)&&r.node(i).canReplace(u,u+1))return t;if(0==i)break;t=n<0?r.before(i):r.after(i)}}function $L(e,t,n=t,r=Gk.empty){var i,o,a;if(t==n&&!r.size)return null;let u=e.resolve(t),s=e.resolve(n);return(i=u,o=s,a=r,!a.openStart&&!a.openEnd&&i.start()==o.start()&&i.parent.canReplace(i.index(),o.index(),a.content))?new $_(t,n,r):new $B(u,s,r).fit()}$v.jsonID("replaceAround",$T);class $B{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=Gw.empty;for(let r=0;r<=e.depth;r++){let i=e.node(r);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(r))})}for(let o=e.depth;o>0;o--)this.placed=Gw.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,a=r.depth,u=i.depth;for(;a&&u&&1==o.childCount;)o=o.firstChild.content,a--,u--;let s=new Gk(o,a,u);return t>-1?new $T(r.pos,t,this.$to.pos,this.$to.end(),s,n):s.size||r.pos!=this.$to.pos?new $_(r.pos,i.pos,s):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let o=1;o<=2;o++)for(let a=1==o?e:this.unplaced.openStart;a>=0;a--){let u,s=null,l=(a?(s=$D(this.unplaced.content,a-1).firstChild).content:this.unplaced.content).firstChild;for(let c=this.depth;c>=0;c--){let{type:d,match:f}=this.frontier[c],p,A=null;if(1==o&&(l?f.matchType(l.type)||(A=f.fillBefore(Gw.from(l),!1)):s&&d.compatibleContent(s.type)))return{sliceDepth:a,frontierDepth:c,parent:s,inject:A};if(2==o&&l&&(p=f.findWrapping(l.type)))return{sliceDepth:a,frontierDepth:c,parent:s,wrap:p};if(s&&f.matchType(s.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=$D(e,t);return!!r.childCount&&!r.firstChild.isLeaf&&(this.unplaced=new Gk(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=$D(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new Gk($P(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new Gk($P(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let o=0;o<i.length;o++)this.openFrontierNode(i[o]);let a=this.unplaced,u=n?n.content:a.content,s=a.openStart-e,l=0,c=[],{match:d,type:f}=this.frontier[t];if(r){for(let p=0;p<r.childCount;p++)c.push(r.child(p));d=d.matchFragment(r)}let A=u.size+e-(a.content.size-a.openEnd);for(;l<u.childCount;){let h=u.child(l),m=d.matchType(h.type);if(!m)break;(++l>1||0==s||h.content.size)&&(d=m,c.push($N(h.mark(f.allowedMarks(h.marks)),1==l?s:0,l==u.childCount?A:-1)))}let g=l==u.childCount;g||(A=-1),this.placed=$W(this.placed,t,Gw.from(c)),this.frontier[t].match=d,g&&A<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let y=0,v=u;y<A;y++){let x=v.lastChild;this.frontier.push({type:x.type,match:x.contentMatchAt(x.childCount)}),v=x.content}this.unplaced=g?0==e?Gk.empty:new Gk($P(a.content,e-1,1),e-1,A<0?a.openEnd:e-1):new Gk($P(a.content,e,l),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!$q(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=$q(e,t,r,n,i);if(o){for(let a=t-1;a>=0;a--){let{match:u,type:s}=this.frontier[a],l=$q(e,a,s,u,!0);if(!l||l.childCount)continue e}return{depth:t,fit:o,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=$W(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let r=e.node(n),i=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,i)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=$W(this.placed,this.depth,Gw.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(Gw.empty,!0);e.childCount&&(this.placed=$W(this.placed,this.frontier.length,e))}}function $P(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy($P(e.firstChild.content,t-1,n)))}function $W(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy($W(e.lastChild.content,t-1,n)))}function $D(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function $N(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,$N(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Gw.empty,!0)))),e.copy(r)}function $q(e,t,n,r,i){let o=e.node(t),a=i?e.indexAfter(t):e.index(t);if(a==o.childCount&&!n.compatibleContent(o.type))return null;let u=r.fillBefore(o.content,!0,a);return u&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,o.content,a)?u:null}let $Q=class e extends $v{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return $x.fail("No node at attribute step's position");let n=Object.create(null);for(let r in t.attrs)n[r]=t.attrs[r];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return $x.fromReplace(e,this.pos,this.pos+1,new Gk(Gw.from(i),0,t.isLeaf?0:1))}getMap(){return $m.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if("number"!=typeof n.pos||"string"!=typeof n.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new e(n.pos,n.attr,n.value)}};$v.jsonID("attr",$Q);let $V=class extends Error{};($V=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),$V.prototype.constructor=$V,$V.prototype.name="TransformError";let $z=Object.create(null);class $Y{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new $H(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=Gk.empty){let n=t.content.lastChild,r=null;for(let i=0;i<t.openEnd;i++)r=n,n=n.lastChild;let o=e.steps.length,a=this.ranges;for(let u=0;u<a.length;u++){let{$from:s,$to:l}=a[u],c=e.mapping.slice(o);e.replaceRange(c.map(s.pos),c.map(l.pos),u?Gk.empty:t),0==u&&$5(e,o,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:a}=r[i],u=e.mapping.slice(n),s=u.map(o.pos),l=u.map(a.pos);i?e.deleteRange(s,l):(e.replaceRangeWith(s,l,t),$5(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new $G(e):$6(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let i=e.depth-1;i>=0;i--){let o=t<0?$6(e.node(0),e.node(i),e.before(i+1),e.index(i),t,n):$6(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new $1(e.node(0))}static atStart(e){return $6(e,e,0,0,1)||new $1(e)}static atEnd(e){return $6(e,e,e.content.size,e.childCount,-1)||new $1(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=$z[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in $z)throw RangeError("Duplicate use of selection JSON ID "+e);return $z[e]=t,t.prototype.jsonID=e,t}getBookmark(){return $G.between(this.$anchor,this.$head).getBookmark()}}$Y.prototype.visible=!0;class $H{constructor(e,t){this.$from=e,this.$to=t}}let $Z=!1;function $J(e){$Z||e.parent.inlineContent||($Z=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class $G extends $Y{constructor(e,t=e){$J(e),$J(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return $Y.near(n);let r=e.resolve(t.map(this.anchor));return new $G(r.parent.inlineContent?r:n,n)}replace(e,t=Gk.empty){if(super.replace(e,t),t==Gk.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof $G&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new $$(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new $G(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let i=$Y.findFrom(t,n,!0)||$Y.findFrom(t,-n,!0);if(!i)return $Y.near(t,n);t=i.$head}return e.parent.inlineContent||(0==r?e=t:(e=($Y.findFrom(e,-n,!0)||$Y.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0&&(e=t)),new $G(e,t)}}$Y.jsonID("text",$G);class $${constructor(e,t){this.anchor=e,this.head=t}map(e){return new $$(e.map(this.anchor),e.map(this.head))}resolve(e){return $G.between(e.resolve(this.anchor),e.resolve(this.head))}}class $X extends $Y{constructor(e){let t=e.nodeAfter;super(e,e.node(0).resolve(e.pos+t.nodeSize)),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?$Y.near(i):new $X(i)}content(){return new Gk(Gw.from(this.node),0,0)}eq(e){return e instanceof $X&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new $0(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new $X(e.resolve(t.anchor))}static create(e,t){return new $X(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}$X.prototype.visible=!1,$Y.jsonID("node",$X);class $0{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new $$(n,n):new $0(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&$X.isSelectable(n)?new $X(t):$Y.near(t)}}class $1 extends $Y{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=Gk.empty){if(t==Gk.empty){e.delete(0,e.doc.content.size);let n=$Y.atStart(e.doc);n.eq(e.selection)||e.setSelection(n)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new $1(e)}map(e){return new $1(e)}eq(e){return e instanceof $1}getBookmark(){return $2}}$Y.jsonID("all",$1);let $2={map(){return this},resolve:e=>new $1(e)};function $6(e,t,n,r,i,o=!1){if(t.inlineContent)return $G.create(e,n);for(let a=r-(i>0?0:1);i>0?a<t.childCount:a>=0;a+=i){let u=t.child(a);if(u.isAtom){if(!o&&$X.isSelectable(u))return $X.create(e,n-(i<0?u.nodeSize:0))}else{let s=$6(e,u,n+i,i<0?u.childCount:0,i,o);if(s)return s}n+=u.nodeSize*i}return null}function $5(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof $_||i instanceof $T))return;let o;e.mapping.maps[r].forEach((e,t,n,r)=>{null==o&&(o=r)}),e.setSelection($Y.near(e.doc.resolve(o),n))}function $3(e,t){return t&&e?e.bind(t):e}class $9{constructor(e,t,n){this.name=e,this.init=$3(t.init,n),this.apply=$3(t.apply,n)}}new $9("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new $9("selection",{init:(e,t)=>e.selection||$Y.atStart(t.doc),apply:e=>e.selection}),new $9("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new $9("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t});class $4{constructor(e){this.spec=e,this.props={},e.props&&function e(t,n,r){for(let i in t){let o=t[i];o instanceof Function?o=o.bind(n):"handleDOMEvents"==i&&(o=e(o,n,{})),r[i]=o}return r}(e.props,this,this.props),this.key=e.key?e.key.key:$8("plugin")}getState(e){return e[this.key]}}let $7=Object.create(null);function $8(e){return e in $7?e+"$"+ ++$7[e]:($7[e]=0,e+"$")}class Xe{constructor(e="key"){this.key=$8(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}let Xt=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Xn=function(e,t,n,r){return n&&(Xi(e,t,n,r,-1)||Xi(e,t,n,r,1))},Xr=/^(img|br|input|textarea|hr)$/i;function Xi(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Xo(e))){let o=e.parentNode;if(!o||1!=o.nodeType||Xa(e)||Xr.test(e.nodeName)||"false"==e.contentEditable)return!1;t=Xt(e)+(i<0?0:1),e=o}else{if(1!=e.nodeType||"false"==(e=e.childNodes[t+(i<0?-1:0)]).contentEditable)return!1;t=i<0?Xo(e):0}}}function Xo(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Xa(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}let Xu=function(e){return e.focusNode&&Xn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Xs(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}let Xl="u">typeof navigator?navigator:null,Xc="u">typeof document?document:null,Xd=Xl&&Xl.userAgent||"",Xf=/Edge\/(\d+)/.exec(Xd),Xp=/MSIE \d/.exec(Xd),XA=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Xd),Xh=!!(Xp||XA||Xf),Xm=Xp?document.documentMode:XA?+XA[1]:Xf?+Xf[1]:0,Xg=!Xh&&/gecko\/(\d+)/i.test(Xd);Xg&&(/Firefox\/(\d+)/.exec(Xd)||[0,0])[1];let Xy=!Xh&&/Chrome\/(\d+)/.exec(Xd),Xv=!!Xy,Xx=Xy?+Xy[1]:0,Xb=!Xh&&!!Xl&&/Apple Computer/.test(Xl.vendor),XC=Xb&&(/Mobile\/\w+/.test(Xd)||!!Xl&&Xl.maxTouchPoints>2),XS=XC||!!Xl&&/Mac/.test(Xl.platform),Xw=!!Xl&&/Win/.test(Xl.platform),XI=/Android \d/.test(Xd),X_=!!Xc&&"webkitFontSmoothing"in Xc.documentElement.style,XT=X_?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function XO(e){return e.editable?e.hasFocus():function(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch{return!1}}(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function XR(e,t=!1){let n=e.state.selection;if(function(e,t){if(t instanceof $X){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Xj(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Xj(e)}(e,n),XO(e)){var r,i;if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Xv){let o=e.domSelectionRange(),a=e.domObserver.currentSelection;if(o.anchorNode&&a.anchorNode&&Xn(o.anchorNode,o.anchorOffset,a.anchorNode,a.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper){let u,s,l,c;r=e,u=r.domSelection(),s=document.createRange(),l=r.cursorWrapper.dom,c="IMG"==l.nodeName,c?s.setEnd(l.parentNode,Xt(l)+1):s.setEnd(l,0),s.collapse(!1),u.removeAllRanges(),u.addRange(s),!c&&!r.state.selection.visible&&Xh&&Xm<=11&&(l.disabled=!0,l.disabled=!1)}else{let{anchor:d,head:f}=n,p,A,h,m,g,y;!Xk||n instanceof $G||(n.$from.parent.inlineContent||(p=XE(e,n.from)),n.empty||n.$from.parent.inlineContent||(A=XE(e,n.to))),e.docView.setSelection(d,f,e.root,t),Xk&&(p&&XF(p),A&&XF(A)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&(i=e,h=i.dom.ownerDocument,h.removeEventListener("selectionchange",i.input.hideSelectionGuard),m=i.domSelectionRange(),g=m.anchorNode,y=m.anchorOffset,h.addEventListener("selectionchange",i.input.hideSelectionGuard=()=>{(m.anchorNode!=g||m.anchorOffset!=y)&&(h.removeEventListener("selectionchange",i.input.hideSelectionGuard),setTimeout(()=>{(!XO(i)||i.state.selection.visible)&&i.dom.classList.remove("ProseMirror-hideselection")},20))})))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}let Xk=Xb||Xv&&Xx<63;function XE(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(Xb&&i&&"false"==i.contentEditable)return XM(i);if((!i||"false"==i.contentEditable)&&(!o||"false"==o.contentEditable)){if(i)return XM(i);if(o)return XM(o)}}function XM(e){return e.contentEditable="true",Xb&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function XF(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Xj(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function XU(e,t,n,r){return e.someProp("createSelectionBetween",r=>r(e,t,n))||$G.between(t,n,r)}function XK(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&$Y.findFrom(o,t)}function XL(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function XB(e,t,n){let r=e.state.selection;if(r instanceof $G){if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let a=e.state.doc.resolve(i.pos+o.nodeSize*(t<0?-1:1));return XL(e,new $G(r.$anchor,a))}if(!r.empty)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let u=XK(e.state,t);return!!u&&u instanceof $X&&XL(e,u)}if(!(XS&&n.indexOf("m")>-1)){let s=r.$head,l=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter,c;if(!l||l.isText)return!1;let d=t<0?s.pos-l.nodeSize:s.pos;return!!(l.isAtom||(c=e.docView.descAt(d))&&!c.contentDOM)&&($X.isSelectable(l)?XL(e,new $X(t<0?e.state.doc.resolve(s.pos-l.nodeSize):s)):!!X_&&XL(e,new $G(e.state.doc.resolve(t<0?d:d+l.nodeSize))))}}else{if(r instanceof $X&&r.node.isInline)return XL(e,new $G(t>0?r.$to:r.$from));{let f=XK(e.state,t);return!!f&&XL(e,f)}}}function XP(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function XW(e,t){let n=e.pmViewDesc;return n&&0==n.size&&(t<0||e.nextSibling||"BR"!=e.nodeName)}function XD(e,t){return t<0?function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,a=!1;for(Xg&&1==n.nodeType&&r<XP(n)&&XW(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;{let u=n.childNodes[r-1];if(XW(u,-1))i=n,o=--r;else if(3==u.nodeType)r=(n=u).nodeValue.length;else break}}else{if(XN(n))break;{let s=n.previousSibling;for(;s&&XW(s,-1);)i=n.parentNode,o=Xt(s),s=s.previousSibling;if(s)r=XP(n=s);else{if((n=n.parentNode)==e.dom)break;r=0}}}a?Xq(e,n,r):i&&Xq(e,i,o)}(e):function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=XP(n),o,a;for(;;)if(r<i){if(1!=n.nodeType)break;if(XW(n.childNodes[r],1))o=n,a=++r;else break}else{if(XN(n))break;{let u=n.nextSibling;for(;u&&XW(u,1);)o=u.parentNode,a=Xt(u)+1,u=u.nextSibling;if(u)r=0,i=XP(n=u);else{if((n=n.parentNode)==e.dom)break;r=i=0}}}o&&Xq(e,o,a)}(e)}function XN(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Xq(e,t,n){if(3!=t.nodeType){let r,i;(i=function(e,t){for(;e&&t==e.childNodes.length&&!Xa(e);)t=Xt(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=n,t=0}}(t,n))?(t=i,n=0):(r=function(e,t){for(;e&&!t&&!Xa(e);)t=Xt(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=(e=n).childNodes.length}}(t,n))&&(t=r,n=r.nodeValue.length)}let o=e.domSelection();if(Xu(o)){let a=document.createRange();a.setEnd(t,n),a.setStart(t,n),o.removeAllRanges(),o.addRange(a)}else o.extend&&o.extend(t,n);e.domObserver.setCurSelection();let{state:u}=e;setTimeout(()=>{e.state==u&&XR(e)},50)}function XQ(e,t){let n=e.state.doc.resolve(t);if(!(Xv||Xw)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),o=(i.top+i.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(i.left-r.left)>1)return i.left<r.left?"ltr":"rtl"}if(t<n.end()){let a=e.coordsAtPos(t+1),u=(a.top+a.bottom)/2;if(u>r.top&&u<r.bottom&&Math.abs(a.left-r.left)>1)return a.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function XV(e,t,n){let r=e.state.selection;if(r instanceof $G&&!r.empty||n.indexOf("s")>-1||XS&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let a=XK(e.state,t);if(a&&a instanceof $X)return XL(e,a)}if(!i.parent.inlineContent){let u=t<0?i:o,s=r instanceof $1?$Y.near(u,t):$Y.findFrom(u,t);return!!s&&XL(e,s)}return!1}function Xz(e,t){if(!(e.state.selection instanceof $G))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let a=e.state.tr;return t<0?a.delete(n.pos-o.nodeSize,n.pos):a.delete(n.pos,n.pos+o.nodeSize),e.dispatch(a),!0}return!1}function XY(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function XH(e,t){e.someProp("transformCopied",n=>{t=n(t,e)});let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;let a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}let u=e.someProp("clipboardSerializer")||$c.fromSchema(e.state.schema),s=X5(),l=s.createElement("div");l.appendChild(u.serializeFragment(r,{document:s}));let c=l.firstChild,d,f=0;for(;c&&1==c.nodeType&&(d=X2[c.nodeName.toLowerCase()]);){for(let p=d.length-1;p>=0;p--){let A=s.createElement(d[p]);for(;l.firstChild;)A.appendChild(l.firstChild);l.appendChild(A),f++}c=l.firstChild}return c&&1==c.nodeType&&c.setAttribute("data-pm-slice",`${i} ${o}${f?` -${f}`:""} ${JSON.stringify(n)}`),{dom:l,text:e.someProp("clipboardTextSerializer",n=>n(t,e))||t.content.textBetween(0,t.content.size,`
11
+
12
+ `)}}function XZ(e,t,n,r,i){let o=i.parent.type.spec.code,a,u;if(!n&&!t)return null;let s=t&&(r||o||!n);if(s){if(e.someProp("transformPastedText",n=>{t=n(t,o||r,e)}),o)return t?new Gk(Gw.from(e.state.schema.text(t.replace(/\r\n?/g,`
13
+ `))),0,0):Gk.empty;let l=e.someProp("clipboardTextParser",n=>n(t,i,r,e));if(l)u=l;else{let c=i.marks(),{schema:d}=e.state,f=$c.fromSchema(d);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=a.appendChild(document.createElement("p"));e&&t.appendChild(f.serializeNode(d.text(e,c)))})}}else e.someProp("transformPastedHTML",t=>{n=t(n,e)}),a=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=X5().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&X2[r[1].toLowerCase()])&&(e=i.map(e=>"<"+e+">").join("")+e+i.map(e=>"</"+e+">").reverse().join("")),n.innerHTML=e,i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}(n),X_&&function(e){let t=e.querySelectorAll(Xv?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&"\xa0"==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(a);let p=a&&a.querySelector("[data-pm-slice]"),A=p&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(p.getAttribute("data-pm-slice")||"");if(A&&A[3])for(let h=+A[3];h>0;h--){let m=a.firstChild;for(;m&&1!=m.nodeType;)m=m.nextSibling;if(!m)break;a=m}if(u||(u=(e.someProp("clipboardParser")||e.someProp("domParser")||$e.fromSchema(e.state.schema)).parseSlice(a,{preserveWhitespace:!!(s||A),context:i,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||XJ.test(e.parentNode.nodeName)?null:{ignore:!0}})),A)u=function(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:o,openEnd:a}=e;for(let u=r.length-2;u>=0;u-=2){let s=n.nodes[r[u]];if(!s||s.hasRequiredAttrs())break;i=Gw.from(s.create(r[u+1],i)),o++,a++}return new Gk(i,o,a)}(X1(u,+A[1],+A[2]),A[4]);else if((u=Gk.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),i,o=[];if(e.forEach(e=>{if(!o)return;let t=r.findWrapping(e.type),n;if(!t)return o=null;if(n=o.length&&i.length&&X$(t,i,e,o[o.length-1],0))o[o.length-1]=n;else{o.length&&(o[o.length-1]=XX(o[o.length-1],i.length));let a=XG(e,t);o.push(a),r=r.matchType(a.type),i=t}}),o)return Gw.from(o)}return e}(u.content,i),!0)).openStart||u.openEnd){let g=0,y=0;for(let v=u.content.firstChild;g<u.openStart&&!v.type.spec.isolating;g++,v=v.firstChild);for(let x=u.content.lastChild;y<u.openEnd&&!x.type.spec.isolating;y++,x=x.lastChild);u=X1(u,g,y)}return e.someProp("transformPasted",t=>{u=t(u,e)}),u}let XJ=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function XG(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Gw.from(e));return e}function X$(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=X$(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(Gw.from(XG(n,e,i+1))))}}function XX(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,XX(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Gw.empty,!0);return e.copy(n.append(r))}function X0(e,t,n,r,i,o){let a=t<0?e.firstChild:e.lastChild,u=a.content;return e.childCount>1&&(o=0),i<r-1&&(u=X0(u,t,n,r,i+1,o)),i>=n&&(u=t<0?a.contentMatchAt(0).fillBefore(u,o<=i).append(u):u.append(a.contentMatchAt(a.childCount).fillBefore(Gw.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(u))}function X1(e,t,n){return t<e.openStart&&(e=new Gk(X0(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Gk(X0(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}let X2={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},X6=null;function X5(){return X6||(X6=document.implementation.createHTMLDocument("title"))}let X3={},X9={};function X4(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function X7(e){return{left:e.clientX,top:e.clientY}}function X8(e,t,n,r,i){if(-1==r)return!1;let o=e.state.doc.resolve(r);for(let a=o.depth+1;a>0;a--)if(e.someProp(t,t=>a>o.depth?t(e,n,o.nodeAfter,o.before(a),i,!0):t(e,n,o.node(a),o.before(a),i,!1)))return!0;return!1}function eee(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function eet(e,t,n,r){return X8(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",n=>n(e,t,r))}function een(e,t,n,r){return X8(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",n=>n(e,t,r))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(eee(e,$G.create(r,0,r.content.size),"pointer"),!0);let i=r.resolve(t);for(let o=i.depth+1;o>0;o--){let a=o>i.depth?i.nodeAfter:i.node(o),u=i.before(o);if(a.inlineContent)eee(e,$G.create(r,u+1,u+1+a.content.size),"pointer");else{if(!$X.isSelectable(a))continue;eee(e,$X.create(r,u),"pointer")}return!0}}(e,n,r)}X9.keydown=(e,t)=>{if(e.input.shiftKey=16==t.keyCode||t.shiftKey,!eeo(e,t)&&(e.input.lastKeyCode=t.keyCode,e.input.lastKeyCodeTime=Date.now(),!(XI&&Xv&&13==t.keyCode))){if(229!=t.keyCode&&e.domObserver.forceFlush(),!XC||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",n=>n(e,t))||function(e,t){var n;let r,i=t.keyCode,o=(r="",t.ctrlKey&&(r+="c"),t.metaKey&&(r+="m"),t.altKey&&(r+="a"),t.shiftKey&&(r+="s"),r);if(8==i||XS&&72==i&&"c"==o)return Xz(e,-1)||XD(e,-1);if(46==i&&!t.shiftKey||XS&&68==i&&"c"==o)return Xz(e,1)||XD(e,1);if(13==i||27==i)return!0;if(37==i||XS&&66==i&&"c"==o){let a=37==i?"ltr"==XQ(e,e.state.selection.from)?-1:1:-1;return XB(e,a,o)||XD(e,a)}if(39==i||XS&&70==i&&"c"==o){let u=39==i?"ltr"==XQ(e,e.state.selection.from)?1:-1:1;return XB(e,u,o)||XD(e,u)}return 38==i||XS&&80==i&&"c"==o?XV(e,-1,o)||XD(e,-1):40==i||XS&&78==i&&"c"==o?function(e){if(!Xb||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let r=t.firstChild;XY(e,r,"true"),setTimeout(()=>XY(e,r,"false"),20)}return!1}(e)||XV(e,1,o)||XD(e,1):o==(XS?"m":"c")&&(66==i||73==i||89==i||90==i)}(e,t)?t.preventDefault():X4(e,"key");else{let n=Date.now();e.input.lastIOSEnter=n,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==n&&(e.someProp("handleKeyDown",t=>t(e,Xs(13,"Enter"))),e.input.lastIOSEnter=0)},200)}}},X9.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},X9.keypress=(e,t)=>{if(eeo(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||XS&&t.metaKey)return;if(e.someProp("handleKeyPress",n=>n(e,t))){t.preventDefault();return}let n=e.state.selection;if(!(n instanceof $G)||!n.$from.sameParent(n.$to)){let r=String.fromCharCode(t.charCode);/[\r\n]/.test(r)||e.someProp("handleTextInput",t=>t(e,n.$from.pos,n.$to.pos,r))||e.dispatch(e.state.tr.insertText(r).scrollIntoView()),t.preventDefault()}};let eer=XS?"metaKey":"ctrlKey";X3.mousedown=(e,t)=>{var n,r,i;e.input.shiftKey=t.shiftKey;let o=ees(e),a=Date.now(),u="singleClick",s,l;a-e.input.lastClick.time<500&&(s=(i=e.input.lastClick).x-t.clientX,s*s+(l=i.y-t.clientY)*l<100)&&!t[eer]&&("singleClick"==e.input.lastClick.type?u="doubleClick":"doubleClick"==e.input.lastClick.type&&(u="tripleClick")),e.input.lastClick={time:a,x:t.clientX,y:t.clientY,type:u};let c=e.posAtCoords(X7(t));c&&("singleClick"==u?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new eei(e,c,t,!!o)):("doubleClick"==u?eet:een)(e,c.pos,c.inside,t)?t.preventDefault():X4(e,"pointer"))};class eei{constructor(e,t,n,r){this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[eer],this.allowDefault=n.shiftKey;let i,o;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),o=t.inside;else{let a=e.state.doc.resolve(t.pos);i=a.parent,o=a.depth?a.before():0}let u=r?null:n.target,s=u?e.docView.nearestDesc(u,!0):null;this.target=s?s.dom:null;let{selection:l}=e.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||l instanceof $X&&l.from<=o&&l.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Xg&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),X4(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>XR(this.view)),this.view.input.mouseDown=null}up(e){var t,n,r,i,o;if(this.done(),!this.view.dom.contains(e.target))return;let a=this.pos;this.view.state.doc!=this.startDoc&&(a=this.view.posAtCoords(X7(e))),this.updateAllowDefault(e),this.allowDefault||!a?X4(this.view,"pointer"):(t=this.view,n=a.pos,r=a.inside,o=this.selectNode,X8(t,"handleClickOn",n,r,e)||t.someProp("handleClick",r=>r(t,n,e))||(o?function(e,t){if(-1==t)return!1;let n=e.state.selection,r,i;n instanceof $X&&(r=n.node);let o=e.state.doc.resolve(t);for(let a=o.depth+1;a>0;a--){let u=a>o.depth?o.nodeAfter:o.node(a);if($X.isSelectable(u)){i=r&&n.$from.depth>0&&a>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?o.before(n.$from.depth):o.before(a);break}}return null!=i&&(eee(e,$X.create(e.state.doc,i),"pointer"),!0)}(t,r):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&$X.isSelectable(r))&&(eee(e,new $X(n),"pointer"),!0)}(t,r)))?e.preventDefault():0==e.button&&(this.flushed||Xb&&this.mightDrag&&!this.mightDrag.node.isAtom||Xv&&!this.view.state.selection.visible&&2>=Math.min(Math.abs(a.pos-this.view.state.selection.from),Math.abs(a.pos-this.view.state.selection.to)))?(eee(this.view,$Y.near(this.view.state.doc.resolve(a.pos)),"pointer"),e.preventDefault()):X4(this.view,"pointer")}move(e){this.updateAllowDefault(e),X4(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function eeo(e,t){return!!e.composing||!!(Xb&&500>Math.abs(t.timeStamp-e.input.compositionEndedAt))&&(e.input.compositionEndedAt=-2e8,!0)}X3.touchstart=e=>{e.input.lastTouch=Date.now(),ees(e),X4(e,"pointer")},X3.touchmove=e=>{e.input.lastTouch=Date.now(),X4(e,"pointer")},X3.contextmenu=e=>{var t;return ees(e)};let eea=XI?5e3:-1;function eeu(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>ees(e),t))}function ees(e,t=!1){if(!(XI&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),function(e){let t;for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=(t=document.createEvent("Event"),t.initEvent("event",!0,!0),t.timeStamp));e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}(e),t||e.docView&&e.docView.dirty){let n=function(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&0==i.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let u=r.resolve(a),s,l;if(Xu(n)){for(s=u;i&&!i.node;)i=i.parent;let c=i.node;if(i&&c.isAtom&&$X.isSelectable(c)&&i.parent&&!(c.isInline&&function(e,t,n){for(let r=0==t,i=t==Xo(e);r||i;){if(e==n)return!0;let o=Xt(e);if(!(e=e.parentNode))return!1;r=r&&0==o,i=i&&o==Xo(e)}}(n.focusNode,n.focusOffset,i.dom))){let d=i.posBefore;l=new $X(a==d?u:r.resolve(d))}}else{let f=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(f<0)return null;s=r.resolve(f)}if(!l){let p="pointer"==t||e.state.selection.head<u.pos&&!o?1:-1;l=XU(e,s,u,p)}return l}(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}X9.compositionstart=X9.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>!1===e.type.spec.inclusive)))e.markCursor=e.state.storedMarks||n.marks(),ees(e,!0),e.markCursor=null;else if(ees(e),Xg&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&1==i.nodeType&&0!=o;){let a=o<0?i.lastChild:i.childNodes[o-1];if(!a)break;if(3==a.nodeType){e.domSelection().collapse(a,a.nodeValue.length);break}i=a,o=-1}}e.input.composing=!0}eeu(e,eea)},X9.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,eeu(e,20))};let eel=Xh&&Xm<15||XC&&XT<604;function eec(e,t,n,r,i){var o;let a=XZ(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",t=>t(e,i,a||Gk.empty)))return!0;if(!a)return!1;let u=0==a.openStart&&0==a.openEnd&&1==a.content.childCount?a.content.firstChild:null,s=u?e.state.tr.replaceSelectionWith(u,r):e.state.tr.replaceSelection(a);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function eed(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}X3.copy=X9.cut=(e,t)=>{let n=e.state.selection,r="cut"==t.type;if(n.empty)return;let i=eel?null:t.clipboardData,{dom:o,text:a}=XH(e,n.content());i?(t.preventDefault(),i.clearData(),i.setData("text/html",o.innerHTML),i.setData("text/plain",a)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}(e,o),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},X9.paste=(e,t)=>{if(e.composing&&!XI)return;let n=eel?null:t.clipboardData,r=e.input.shiftKey&&45!=e.input.lastKeyCode;n&&eec(e,eed(n),n.getData("text/html"),r,t)?t.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=e.input.shiftKey&&45!=e.input.lastKeyCode;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?eec(e,r.value,null,i,t):eec(e,r.textContent,r.innerHTML,i,t)},50)}(e,t)};class eef{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}let eep=XS?"altKey":"ctrlKey";for(let eeA in X3.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,o=i.empty?null:e.posAtCoords(X7(n)),a;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof $X?i.to-1:i.to))){if(r&&r.mightDrag)a=$X.create(e.state.doc,r.mightDrag.pos);else if(n.target&&1==n.target.nodeType){let u=e.docView.nearestDesc(n.target,!0);u&&u.node.type.spec.draggable&&u!=e.docView&&(a=$X.create(e.state.doc,u.posBefore))}}let s=(a||e.state.selection).content(),{dom:l,text:c}=XH(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(eel?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",eel||n.dataTransfer.setData("text/plain",c),e.dragging=new eef(s,!n[eep],a)},X3.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},X9.dragover=X9.dragenter=(e,t)=>t.preventDefault(),X9.drop=(e,t)=>{let n=e.dragging;if(e.dragging=null,!t.dataTransfer)return;let r=e.posAtCoords(X7(t));if(!r)return;let i=e.state.doc.resolve(r.pos),o=n&&n.slice;o?e.someProp("transformPasted",t=>{o=t(o,e)}):o=XZ(e,eed(t.dataTransfer),eel?null:t.dataTransfer.getData("text/html"),!1,i);let a=!!(n&&!t[eep]);if(e.someProp("handleDrop",n=>n(e,t,o||Gk.empty,a))){t.preventDefault();return}if(!o)return;t.preventDefault();let u=o?function(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(let u=r.depth;u>=0;u--){let s=u==r.depth?0:r.pos<=(r.start(u+1)+r.end(u+1))/2?-1:1,l=r.index(u)+(s>0?1:0),c=r.node(u),d=!1;if(1==a)d=c.canReplace(l,l,i);else{let f=c.contentMatchAt(l).findWrapping(i.firstChild.type);d=f&&c.canReplaceWith(l,l,f[0])}if(d)return 0==s?r.pos:s<0?r.before(u+1):r.after(u+1)}return null}(e.state.doc,i.pos,o):i.pos;null==u&&(u=i.pos);let s=e.state.tr;if(a){let{node:l}=n;l?l.replace(s):s.deleteSelection()}let c=s.mapping.map(u),d=0==o.openStart&&0==o.openEnd&&1==o.content.childCount,f=s.doc;if(d?s.replaceRangeWith(c,c,o.content.firstChild):s.replaceRange(c,c,o),s.doc.eq(f))return;let p=s.doc.resolve(c);if(d&&$X.isSelectable(o.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(o.content.firstChild))s.setSelection(new $X(p));else{let A=s.mapping.map(u);s.mapping.maps[s.mapping.maps.length-1].forEach((e,t,n,r)=>A=r),s.setSelection(XU(e,p,s.doc.resolve(A)))}e.focus(),e.dispatch(s.setMeta("uiEvent","drop"))},X3.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&XR(e)},20))},X3.blur=(e,t)=>{e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),t.relatedTarget&&e.dom.contains(t.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},X3.beforeinput=(e,t)=>{if(Xv&&XI&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:n}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=n||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",t=>t(e,Xs(8,"Backspace")))))return;let{$cursor:t}=e.state.selection;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())},50)}},X9)X3[eeA]=X9[eeA];function eeh(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let r in t)if(!(r in e))return!1;return!0}class eem{constructor(e,t){this.toDOM=e,this.spec=t||eeb,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:o}=e.mapResult(t.from+r,this.side<0?-1:1);return o?null:new eev(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof eem&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&eeh(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class eeg{constructor(e,t){this.attrs=e,this.spec=t||eeb}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new eev(i,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof eeg&&eeh(this.attrs,e.attrs)&&eeh(this.spec,e.spec)}static is(e){return e.type instanceof eeg}destroy(){}}let eey=class e{constructor(e,t){this.attrs=e,this.spec=t||eeb}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let o=e.mapResult(t.to+r,-1);return o.deleted||o.pos<=i.pos?null:new eev(i.pos-n,o.pos-n,this)}valid(e,t){let{index:n,offset:r}=e.content.findIndex(t.from),i;return r==t.from&&!(i=e.child(n)).isText&&r+i.nodeSize==t.to}eq(t){return this==t||t instanceof e&&eeh(this.attrs,t.attrs)&&eeh(this.spec,t.spec)}destroy(){}};class eev{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new eev(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new eev(e,e,new eem(t,n))}static inline(e,t,n,r){return new eev(e,t,new eeg(n,r))}static node(e,t,n,r){return new eev(e,t,new eey(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof eeg}get widget(){return this.type instanceof eem}}let eex=[],eeb={};class eeC{constructor(e,t){this.local=e.length?e:eex,this.children=t.length?t:eex}static create(e,t){return t.length?eeO(t,e,0,eeb):eeS}find(e,t,n){let r=[];return this.findInner(e??0,t??1e9,r,0,n),r}findInner(e,t,n,r,i){for(let o=0;o<this.local.length;o++){let a=this.local[o];a.from<=t&&a.to>=e&&(!i||i(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(let u=0;u<this.children.length;u+=3)if(this.children[u]<t&&this.children[u+1]>e){let s=this.children[u]+1;this.children[u+2].findInner(e-s,t-s,n,r+s,i)}}map(e,t,n){return this==eeS||0==e.maps.length?this:this.mapInner(e,t,0,0,n||eeb)}mapInner(e,t,n,r,i){let o;for(let a=0;a<this.local.length;a++){let u=this.local[a].map(e,n,r);u&&u.type.valid(t,u)?(o||(o=[])).push(u):i.onRemove&&i.onRemove(this.local[a].spec)}return this.children.length?function(e,t,n,r,i,o,a){let u=e.slice();for(let s=0,l=o;s<n.maps.length;s++){let c=0;n.maps[s].forEach((e,t,n,r)=>{let i=r-n-(t-e);for(let o=0;o<u.length;o+=3){let a=u[o+1];if(a<0||e>a+l-c)continue;let s=u[o]+l-c;t>=s?u[o+1]=e<=s?-2:-1:e>=l&&i&&(u[o]+=i,u[o+1]+=i)}c+=i}),l=n.maps[s].map(l,-1)}let d=!1;for(let f=0;f<u.length;f+=3)if(u[f+1]<0){if(-2==u[f+1]){d=!0,u[f+1]=-1;continue}let p=n.map(e[f]+o),A=p-i;if(A<0||A>=r.content.size){d=!0;continue}let h=n.map(e[f+1]+o,-1)-i,{index:m,offset:g}=r.content.findIndex(A),y=r.maybeChild(m);if(y&&g==A&&g+y.nodeSize==h){let v=u[f+2].mapInner(n,y,p+1,e[f]+o+1,a);v!=eeS?(u[f]=A,u[f+1]=h,u[f+2]=v):(u[f+1]=-2,d=!0)}else d=!0}if(d){let x=function(e,t,n,r,i,o,a){function u(e,t){for(let o=0;o<e.local.length;o++){let s=e.local[o].map(r,i,t);s?n.push(s):a.onRemove&&a.onRemove(e.local[o].spec)}for(let l=0;l<e.children.length;l+=3)u(e.children[l+2],e.children[l]+t+1)}for(let s=0;s<e.length;s+=3)-1==e[s+1]&&u(e[s+2],t[s]+o+1);return n}(u,e,t,n,i,o,a),b=eeO(x,r,0,a);t=b.local;for(let C=0;C<u.length;C+=3)u[C+1]<0&&(u.splice(C,3),C-=3);for(let S=0,w=0;S<b.children.length;S+=3){let I=b.children[S];for(;w<u.length&&u[w]<I;)w+=3;u.splice(w,0,b.children[S],b.children[S+1],b.children[S+2])}}return new eeC(t.sort(eeR),u)}(this.children,o||[],e,t,n,r,i):o?new eeC(o.sort(eeR),eex):eeS}add(e,t){return t.length?this==eeS?eeC.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,i=0;e.forEach((e,o)=>{let a=o+n,u;if(u=ee_(t,e,a)){for(r||(r=this.children.slice());i<r.length&&r[i]<o;)i+=3;r[i]==o?r[i+2]=r[i+2].addInner(e,u,a+1):r.splice(i,0,o,o+e.nodeSize,eeO(u,e,a+1,eeb)),i+=3}});let o=eeI(i?eeT(t):t,-n);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||o.splice(a--,1);return new eeC(o.length?this.local.concat(o).sort(eeR):this.local,r||this.children)}remove(e){return 0==e.length||this==eeS?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let i=0;i<n.length;i+=3){let o,a=n[i]+t,u=n[i+1]+t;for(let s=0,l;s<e.length;s++)(l=e[s])&&l.from>a&&l.to<u&&(e[s]=null,(o||(o=[])).push(l));if(!o)continue;n==this.children&&(n=this.children.slice());let c=n[i+2].removeInner(o,a+1);c!=eeS?n[i+2]=c:(n.splice(i,3),i-=3)}if(r.length){for(let d=0,f;d<e.length;d++)if(f=e[d])for(let p=0;p<r.length;p++)r[p].eq(f,t)&&(r==this.local&&(r=this.local.slice()),r.splice(p--,1))}return n==this.children&&r==this.local?this:r.length||n.length?new eeC(r,n):eeS}forChild(e,t){if(this==eeS)return this;if(t.isLeaf)return eeC.empty;let n,r;for(let i=0;i<this.children.length;i+=3)if(this.children[i]>=e){this.children[i]==e&&(n=this.children[i+2]);break}let o=e+1,a=o+t.content.size;for(let u=0;u<this.local.length;u++){let s=this.local[u];if(s.from<a&&s.to>o&&s.type instanceof eeg){let l=Math.max(o,s.from)-o,c=Math.min(a,s.to)-o;l<c&&(r||(r=[])).push(s.copy(l,c))}}if(r){let d=new eeC(r.sort(eeR),eex);return n?new eew([d,n]):d}return n||eeS}eq(e){if(this==e)return!0;if(!(e instanceof eeC)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return eek(this.localsInner(e))}localsInner(e){if(this==eeS)return eex;if(e.inlineContent||!this.local.some(eeg.is))return this.local;let t=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof eeg||t.push(this.local[n]);return t}}eeC.empty=new eeC([],[]),eeC.removeOverlap=eek;let eeS=eeC.empty;class eew{constructor(e){this.members=e}map(e,t){let n=this.members.map(n=>n.map(e,t,eeb));return eew.from(n)}forChild(e,t){if(t.isLeaf)return eeC.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(e,t);i!=eeS&&(i instanceof eew?n=n.concat(i.members):n.push(i))}return eew.from(n)}eq(e){if(!(e instanceof eew)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length){if(t){n&&(t=t.slice(),n=!1);for(let o=0;o<i.length;o++)t.push(i[o])}else t=i}}return t?eek(n?t:t.sort(eeR)):eex}static from(e){switch(e.length){case 0:return eeS;case 1:return e[0];default:return new eew(e.every(e=>e instanceof eeC)?e:e.reduce((e,t)=>e.concat(t instanceof eeC?t:t.members),[]))}}}function eeI(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new eev(i.from+t,i.to+t,i.type))}return n}function ee_(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let o=0,a;o<e.length;o++)(a=e[o])&&a.from>n&&a.to<r&&((i||(i=[])).push(a),e[o]=null);return i}function eeT(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function eeO(e,t,n,r){let i=[],o=!1;t.forEach((t,a)=>{let u=ee_(e,t,a+n);if(u){o=!0;let s=eeO(u,t,n+a+1,r);s!=eeS&&i.push(a,a+t.nodeSize,s)}});let a=eeI(o?eeT(e):e,-n).sort(eeR);for(let u=0;u<a.length;u++)a[u].type.valid(t,a[u])||(r.onRemove&&r.onRemove(a[u].spec),a.splice(u--,1));return a.length||i.length?new eeC(a,i):eeS}function eeR(e,t){return e.from-t.from||e.to-t.to}function eek(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from==r.from){o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),eeE(t,i+1,o.copy(r.to,o.to)));continue}o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),eeE(t,i,r.copy(o.from,r.to)));break}}return t}function eeE(e,t,n){for(;t<e.length&&eeR(n,e[t])>0;)t++;e.splice(t,0,n)}for(var eeM={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},eeF={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},eej="u">typeof navigator&&/Mac/.test(navigator.platform),eeU="u">typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),eeK=0;eeK<10;eeK++)eeM[48+eeK]=eeM[96+eeK]=String(eeK);for(var eeK=1;eeK<=24;eeK++)eeM[eeK+111]="F"+eeK;for(var eeK=65;eeK<=90;eeK++)eeM[eeK]=String.fromCharCode(eeK+32),eeF[eeK]=String.fromCharCode(eeK);for(var eeL in eeM)eeF.hasOwnProperty(eeL)||(eeF[eeL]=eeM[eeL]);let eeB="u">typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function eeP(e){let t=e.split(/-(?!$)/),n=t[t.length-1];"Space"==n&&(n=" ");let r,i,o,a;for(let u=0;u<t.length-1;u++){let s=t[u];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))i=!0;else if(/^s(hift)?$/i.test(s))o=!0;else if(/^mod$/i.test(s))eeB?a=!0:i=!0;else throw Error("Unrecognized modifier name: "+s)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),a&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function eeW(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function eeD(e,t){return e+65536*t}function eeN(e){return 65535&e}class eeq{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class eeQ{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&eeQ.empty)return eeQ.empty}recover(e){var t;let n=0,r=eeN(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+n+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let u=this.ranges[a]-(this.inverted?r:0);if(u>e)break;let s=this.ranges[a+i],l=this.ranges[a+o],c=u+s;if(e<=c){let d=s?e==u?-1:e==c?1:t:t,f=u+r+(d<0?0:l);if(n)return f;let p=e==(t<0?u:c)?null:eeD(a/3,e-u),A=e==u?2:e==c?1:4;return(t<0?e!=u:e!=c)&&(A|=8),new eeq(f,A,p)}r+=l-s}return n?e+r:new eeq(e+r,0,null)}touches(e,t){let n=0,r=eeN(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let u=this.ranges[a]-(this.inverted?n:0);if(u>e)break;let s=this.ranges[a+i];if(e<=u+s&&a==3*r)return!0;n+=this.ranges[a+o]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],a=o-(this.inverted?i:0),u=o+(this.inverted?0:i),s=this.ranges[r+t],l=this.ranges[r+n];e(a,a+s,u,u+l),i+=l-s}}invert(){return new eeQ(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?eeQ.empty:new eeQ(e<0?[0,-e,0]:[0,0,e])}}eeQ.empty=new eeQ([]);let eeV=Object.create(null);class eez{getMap(){return eeQ.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=eeV[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in eeV)throw RangeError("Duplicate use of step JSON ID "+e);return eeV[e]=t,t.prototype.jsonID=e,t}}class eeY{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new eeY(e,null)}static fail(e){return new eeY(null,e)}static fromReplace(e,t,n,r){try{return eeY.ok(e.replace(t,n,r))}catch(i){if(i instanceof GR)return eeY.fail(i.message);throw i}}}function eeH(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(eeH(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return Gw.fromArray(r)}class eeZ extends eez{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new Gk(eeH(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,r),t.openStart,t.openEnd);return eeY.fromReplace(e,this.from,this.to,i)}invert(){return new eeJ(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new eeZ(t.pos,n.pos,this.mark)}merge(e){return e instanceof eeZ&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new eeZ(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new eeZ(t.from,t.to,e.markFromJSON(t.mark))}}eez.jsonID("addMark",eeZ);class eeJ extends eez{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new Gk(eeH(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return eeY.fromReplace(e,this.from,this.to,n)}invert(){return new eeZ(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new eeJ(t.pos,n.pos,this.mark)}merge(e){return e instanceof eeJ&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new eeJ(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new eeJ(t.from,t.to,e.markFromJSON(t.mark))}}eez.jsonID("removeMark",eeJ);class eeG extends eez{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return eeY.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return eeY.fromReplace(e,this.pos,this.pos+1,new Gk(Gw.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let n=this.mark.addToSet(t.marks);if(n.length==t.marks.length){for(let r=0;r<t.marks.length;r++)if(!t.marks[r].isInSet(n))return new eeG(this.pos,t.marks[r]);return new eeG(this.pos,this.mark)}}return new ee$(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new eeG(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new eeG(t.pos,e.markFromJSON(t.mark))}}eez.jsonID("addNodeMark",eeG);class ee$ extends eez{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return eeY.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return eeY.fromReplace(e,this.pos,this.pos+1,new Gk(Gw.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new eeG(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ee$(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new ee$(t.pos,e.markFromJSON(t.mark))}}eez.jsonID("removeNodeMark",ee$);class eeX extends eez{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&ee1(e,this.from,this.to)?eeY.fail("Structure replace would overwrite content"):eeY.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new eeQ([this.from,this.to-this.from,this.slice.size])}invert(e){return new eeX(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new eeX(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof eeX)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?Gk.empty:new Gk(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new eeX(e.from,this.to,t,this.structure)}}{let n=this.slice.size+e.slice.size==0?Gk.empty:new Gk(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new eeX(this.from,this.to+(e.to-e.from),n,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new eeX(t.from,t.to,Gk.fromJSON(e,t.slice),!!t.structure)}}eez.jsonID("replace",eeX);class ee0 extends eez{constructor(e,t,n,r,i,o,a=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=a}apply(e){if(this.structure&&(ee1(e,this.from,this.gapFrom)||ee1(e,this.gapTo,this.to)))return eeY.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return eeY.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?eeY.fromReplace(e,this.from,this.to,n):eeY.fail("Content does not fit in gap")}getMap(){return new eeQ([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new ee0(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new ee0(t.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ee0(t.from,t.to,t.gapFrom,t.gapTo,Gk.fromJSON(e,t.slice),t.insert,!!t.structure)}}function ee1(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let a=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}}return!1}function ee2(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function ee6(e){return{type:e,attrs:null}}function ee5(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,a=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,s=n-2;u>o;u--,s--){let l=i.node(u),c=i.index(u);if(l.type.spec.isolating)return!1;let d=l.content.cutByIndex(c,l.childCount),f=r&&r[s+1];f&&(d=d.replaceChild(0,f.type.create(f.attrs)));let p=r&&r[s]||l;if(!l.canReplace(c+1,l.childCount)||!p.type.validContent(d))return!1}let A=i.indexAfter(o),h=r&&r[0];return i.node(o).canReplaceWith(A,A,h?h.type:i.node(o+1).type)}function ee3(e,t){let n=e.resolve(t),r=n.index();return ee9(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function ee9(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function ee4(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,a,u=r.index(i);if(i==r.depth?(o=r.nodeBefore,a=r.nodeAfter):n>0?(o=r.node(i+1),u++,a=r.node(i).maybeChild(u)):(o=r.node(i).maybeChild(u-1),a=r.node(i+1)),o&&!o.isTextblock&&ee9(o,a)&&r.node(i).canReplace(u,u+1))return t;if(0==i)break;t=n<0?r.before(i):r.after(i)}}eez.jsonID("replaceAround",ee0);class ee7 extends eez{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return eeY.fail("No node at attribute step's position");let n=Object.create(null);for(let r in t.attrs)n[r]=t.attrs[r];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return eeY.fromReplace(e,this.pos,this.pos+1,new Gk(Gw.from(i),0,t.isLeaf?0:1))}getMap(){return eeQ.empty}invert(e){return new ee7(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ee7(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new ee7(t.pos,t.attr,t.value)}}eez.jsonID("attr",ee7);class ee8 extends eez{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return eeY.ok(r)}getMap(){return eeQ.empty}invert(e){return new ee8(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new ee8(t.attr,t.value)}}eez.jsonID("docAttr",ee8);let ete=class extends Error{};(ete=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),ete.prototype.constructor=ete,ete.prototype.name="TransformError";let ett=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function etn(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let etr=(e,t,n)=>{let r=etn(e,n);if(!r)return!1;let i=etl(r);if(!i){let o=r.blockRange(),a=o&&$k(o);return null!=a&&(t&&t(e.tr.lift(o,a).scrollIntoView()),!0)}let u=i.nodeBefore;if(!u.type.spec.isolating&&etS(e,i,t))return!0;if(0==r.parent.content.size&&(etu(u,"end")||$X.isSelectable(u))){let s=$L(e.doc,r.before(),r.after(),Gk.empty);if(s&&s.slice.size<s.to-s.from){if(t){let l=e.tr.step(s);l.setSelection(etu(u,"end")?$Y.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):$X.create(l.doc,i.pos-u.nodeSize)),t(l.scrollIntoView())}return!0}}return!!u.isAtom&&i.depth==r.depth-1&&(t&&t(e.tr.delete(i.pos-u.nodeSize,i.pos).scrollIntoView()),!0)},eti=(e,t,n)=>{let r=etn(e,n);if(!r)return!1;let i=etl(r);return!!i&&eta(e,i,t)},eto=(e,t,n)=>{let r=etc(e,n);if(!r)return!1;let i=etp(r);return!!i&&eta(e,i,t)};function eta(e,t,n){let r=t.nodeBefore,i=t.pos-1;for(;!r.isTextblock;i--){if(r.type.spec.isolating)return!1;let o=r.lastChild;if(!o)return!1;r=o}let a=t.nodeAfter,u=t.pos+1;for(;!a.isTextblock;u++){if(a.type.spec.isolating)return!1;let s=a.firstChild;if(!s)return!1;a=s}let l=$L(e.doc,i,u,Gk.empty);if(!l||l.from!=i||l instanceof $_&&l.slice.size>=u-i)return!1;if(n){let c=e.tr.step(l);c.setSelection($G.create(c.doc,i)),n(c.scrollIntoView())}return!0}function etu(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)break}return!1}let ets=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=etl(r)}let a=o&&o.nodeBefore;return!!(a&&$X.isSelectable(a))&&(t&&t(e.tr.setSelection($X.create(e.doc,o.pos-a.nodeSize)).scrollIntoView()),!0)};function etl(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function etc(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}let etd=(e,t,n)=>{let r=etc(e,n);if(!r)return!1;let i=etp(r);if(!i)return!1;let o=i.nodeAfter;if(etS(e,i,t))return!0;if(0==r.parent.content.size&&(etu(o,"start")||$X.isSelectable(o))){let a=$L(e.doc,r.before(),r.after(),Gk.empty);if(a&&a.slice.size<a.to-a.from){if(t){let u=e.tr.step(a);u.setSelection(etu(o,"start")?$Y.findFrom(u.doc.resolve(u.mapping.map(i.pos)),1):$X.create(u.doc,u.mapping.map(i.pos))),t(u.scrollIntoView())}return!0}}return!!o.isAtom&&i.depth==r.depth-1&&(t&&t(e.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0)},etf=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=etp(r)}let a=o&&o.nodeAfter;return!!(a&&$X.isSelectable(a))&&(t&&t(e.tr.setSelection($X.create(e.doc,o.pos)).scrollIntoView()),!0)};function etp(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}let etA=(e,t)=>{let n=e.selection,r=n instanceof $X,i;if(r){if(n.node.isTextblock||!$j(e.doc,n.from))return!1;i=n.from}else if(null==(i=$K(e.doc,n.from,-1)))return!1;if(t){let o=e.tr.join(i);r&&o.setSelection($X.create(o.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(o.scrollIntoView())}return!0},eth=(e,t)=>{let n=e.selection,r;if(n instanceof $X){if(n.node.isTextblock||!$j(e.doc,n.to))return!1;r=n.to}else if(null==(r=$K(e.doc,n.to,1)))return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},etm=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),o=i&&$k(i);return null!=o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)},etg=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!!(n.parent.type.spec.code&&n.sameParent(r))&&(t&&t(e.tr.insertText(`
14
+ `).scrollIntoView()),!0)};function ety(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let etv=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),a=ety(i.contentMatchAt(o));if(!a||!i.canReplaceWith(o,o,a))return!1;if(t){let u=n.after(),s=e.tr.replaceWith(u,u,a.createAndFill());s.setSelection($Y.near(s.doc.resolve(u),1)),t(s.scrollIntoView())}return!0},etx=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof $1||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=ety(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let a=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,u=e.tr.insert(a,o.createAndFill());u.setSelection($G.create(u.doc,a+1)),t(u.scrollIntoView())}return!0},etb=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if($F(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let i=n.blockRange(),o=i&&$k(i);return null!=o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)},etC=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return 0!=o&&(i=n.before(o),t&&t(e.tr.setSelection($X.create(e.doc,i))),!0)};function etS(e,t,n){var r,i,o;let a=t.nodeBefore,u=t.nodeAfter,s,l;if(a.type.spec.isolating||u.type.spec.isolating)return!1;let c,d,f;if(c=t.nodeBefore,d=t.nodeAfter,f=t.index(),c&&d&&c.type.compatibleContent(d.type)&&(!c.content.size&&t.parent.canReplace(f-1,f)?(n&&n(e.tr.delete(t.pos-c.nodeSize,t.pos).scrollIntoView()),!0):!!(t.parent.canReplace(f,f+1)&&(d.isTextblock||$j(e.doc,t.pos)))&&(n&&n(e.tr.clearIncompatible(t.pos,c.type,c.contentMatchAt(c.childCount)).join(t.pos).scrollIntoView()),!0)))return!0;let p=t.parent.canReplace(t.index(),t.index()+1);if(p&&(s=(l=a.contentMatchAt(a.childCount)).findWrapping(u.type))&&l.matchType(s[0]||u.type).validEnd){if(n){let A=t.pos+u.nodeSize,h=Gw.empty;for(let m=s.length-1;m>=0;m--)h=Gw.from(s[m].create(null,h));h=Gw.from(a.copy(h));let g=e.tr.step(new $T(t.pos-1,A,t.pos,A,new Gk(h,1,0),s.length,!0)),y=A+2*s.length;$j(g.doc,y)&&g.join(y),n(g.scrollIntoView())}return!0}let v=$Y.findFrom(t,1),x=v&&v.$from.blockRange(v.$to),b=x&&$k(x);if(null!=b&&b>=t.depth)return n&&n(e.tr.lift(x,b).scrollIntoView()),!0;if(p&&etu(u,"start",!0)&&etu(a,"end")){let C=a,S=[];for(;S.push(C),!C.isTextblock;)C=C.lastChild;let w=u,I=1;for(;!w.isTextblock;w=w.firstChild)I++;if(C.canReplace(C.childCount,C.childCount,w.content)){if(n){let _=Gw.empty;for(let T=S.length-1;T>=0;T--)_=Gw.from(S[T].copy(_));let O=e.tr.step(new $T(t.pos-S.length,t.pos+u.nodeSize,t.pos+I,t.pos+u.nodeSize-I,new Gk(_,S.length,0),0,!0));n(O.scrollIntoView())}return!0}}return!1}function etw(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection($G.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}let etI=etw(-1),et_=etw(1);function etT(e,t=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:a},$to:{pos:u}}=n.selection.ranges[o];n.doc.nodesBetween(a,u,(r,o)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t))){if(r.type==e)i=!0;else{let a=n.doc.resolve(o),u=a.index();i=a.parent.canReplaceWith(u,u+1,e)}}})}if(!i)return!1;if(r){let s=n.tr;for(let l=0;l<n.selection.ranges.length;l++){let{$from:{pos:c},$to:{pos:d}}=n.selection.ranges[l];s.setBlockType(c,d,e,t)}r(s.scrollIntoView())}return!0}}function etO(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}}}"u">typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"u">typeof os&&os.platform&&os.platform();class etR{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,o=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(...e)=>{let n=t(...e)(o);return i.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(i),n}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:o}=r,a=[],u=!!e,s=e||i.tr,l=()=>(u||!t||s.getMeta("preventDispatch")||this.hasCustomState||o.dispatch(s),a.every(e=>!0===e)),c={...Object.fromEntries(Object.entries(n).map(([e,n])=>[e,(...e)=>{let r=this.buildProps(s,t),i=n(...e)(r);return a.push(i),c}])),run:l};return c}createCan(e){let{rawCommands:t,state:n}=this,r=e||n.tr,i=this.buildProps(r,!1);return{...Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(...e)=>t(...e)({...i,dispatch:void 0})])),chain:()=>this.createChain(r,!1)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:o}=r,a={tr:e,editor:r,view:o,state:etO({state:i,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(...e)=>t(...e)(a)]))}};return a}}function etk(e,t,n){return void 0===e.config[t]&&e.parent?etk(e.parent,t,n):"function"==typeof e.config[t]?e.config[t].bind({...n,parent:e.parent?etk(e.parent,t,n):null}):e.config[t]}function etE(e){let t=e.filter(e=>"extension"===e.type),n=e.filter(e=>"node"===e.type),r=e.filter(e=>"mark"===e.type);return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function etM(e){let t=[],{nodeExtensions:n,markExtensions:r}=etE(e),i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(e=>{let n={name:e.name,options:e.options,storage:e.storage},r=etk(e,"addGlobalAttributes",n);r&&r().forEach(e=>{e.types.forEach(n=>{Object.entries(e.attributes).forEach(([e,r])=>{t.push({type:n,name:e,attribute:{...i,...r}})})})})}),[...n,...r].forEach(e=>{let n={name:e.name,options:e.options,storage:e.storage},r=etk(e,"addAttributes",n);if(!r)return;let o=r();Object.entries(o).forEach(([n,r])=>{let o={...i,...r};"function"==typeof(null==o?void 0:o.default)&&(o.default=o.default()),null!=o&&o.isRequired&&(null==o?void 0:o.default)===void 0&&delete o.default,t.push({type:e.name,name:n,attribute:o})})}),t}function etF(e,t){if("string"==typeof e){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function etj(...e){return e.filter(e=>!!e).reduce((e,t)=>{let n={...e};return Object.entries(t).forEach(([e,t])=>{if(!n[e]){n[e]=t;return}if("class"===e){let r=t?t.split(" "):[],i=n[e]?n[e].split(" "):[],o=r.filter(e=>!i.includes(e));n[e]=[...i,...o].join(" ")}else"style"===e?n[e]=[n[e],t].join("; "):n[e]=t}),n},{})}function etU(e,t){return t.filter(e=>e.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]}).reduce((e,t)=>etj(e,t),{})}function etK(e,t,...n){var r;return"function"==typeof e?t?e.bind(t)(...n):e(...n):e}function etL(e,t){return e.style?e:{...e,getAttrs(n){let r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;let i=t.reduce((e,t)=>{var r;let i=t.attribute.parseHTML?t.attribute.parseHTML(n):"string"!=typeof(r=n.getAttribute(t.name))?r:r.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(r):"true"===r||"false"!==r&&r;return null==i?e:{...e,[t.name]:i}},{});return{...r,...i}}}}function etB(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>!("attrs"===e&&function(e={}){return 0===Object.keys(e).length&&e.constructor===Object}(t))&&null!=t))}function etP(e,t){var n;let r=etM(e),{nodeExtensions:i,markExtensions:o}=etE(e),a=null===(n=i.find(e=>etk(e,"topNode")))||void 0===n?void 0:n.name,u=Object.fromEntries(i.map(n=>{let i=r.filter(e=>e.type===n.name),o={name:n.name,options:n.options,storage:n.storage,editor:t},a=e.reduce((e,t)=>{let r=etk(t,"extendNodeSchema",o);return{...e,...r?r(n):{}}},{}),u=etB({...a,content:etK(etk(n,"content",o)),marks:etK(etk(n,"marks",o)),group:etK(etk(n,"group",o)),inline:etK(etk(n,"inline",o)),atom:etK(etk(n,"atom",o)),selectable:etK(etk(n,"selectable",o)),draggable:etK(etk(n,"draggable",o)),code:etK(etk(n,"code",o)),defining:etK(etk(n,"defining",o)),isolating:etK(etk(n,"isolating",o)),attrs:Object.fromEntries(i.map(e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]}))}),s=etK(etk(n,"parseHTML",o));s&&(u.parseDOM=s.map(e=>etL(e,i)));let l=etk(n,"renderHTML",o);l&&(u.toDOM=e=>l({node:e,HTMLAttributes:etU(e,i)}));let c=etk(n,"renderText",o);return c&&(u.toText=c),[n.name,u]})),s=Object.fromEntries(o.map(n=>{let i=r.filter(e=>e.type===n.name),o={name:n.name,options:n.options,storage:n.storage,editor:t},a=e.reduce((e,t)=>{let r=etk(t,"extendMarkSchema",o);return{...e,...r?r(n):{}}},{}),u=etB({...a,inclusive:etK(etk(n,"inclusive",o)),excludes:etK(etk(n,"excludes",o)),group:etK(etk(n,"group",o)),spanning:etK(etk(n,"spanning",o)),code:etK(etk(n,"code",o)),attrs:Object.fromEntries(i.map(e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]}))}),s=etK(etk(n,"parseHTML",o));s&&(u.parseDOM=s.map(e=>etL(e,i)));let l=etk(n,"renderHTML",o);return l&&(u.toDOM=e=>l({mark:e,HTMLAttributes:etU(e,i)})),[n.name,u]}));return new G7({topNode:a,nodes:u,marks:s})}function etW(e,t){return t.nodes[e]||t.marks[e]||null}function etD(e,t){return Array.isArray(t)?t.some(t=>("string"==typeof t?t:t.name)===e.name):t}let etN=(e,t=500)=>{let n="",r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(e,t,i,o)=>{var a,u;let s=(null===(u=(a=e.type.spec).toText)||void 0===u?void 0:u.call(a,{node:e,pos:t,parent:i,index:o}))||e.textContent||"%leaf%";n+=s.slice(0,Math.max(0,r-t))}),n};function etq(e){return"[object RegExp]"===Object.prototype.toString.call(e)}class etQ{constructor(e){this.find=e.find,this.handler=e.handler}}let etV=(e,t)=>{if(etq(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function etz(e){var t;let{editor:n,from:r,to:i,text:o,rules:a,plugin:u}=e,{view:s}=n;if(s.composing)return!1;let l=s.state.doc.resolve(r);if(l.parent.type.spec.code||!(null===(t=l.nodeBefore||l.nodeAfter)||void 0===t)&&t.marks.find(e=>e.type.spec.code))return!1;let c=!1,d=etN(l)+o;return a.forEach(e=>{if(c)return;let t=etV(d,e.find);if(!t)return;let a=s.state.tr,l=etO({state:s.state,transaction:a}),f={from:r-(t[0].length-o.length),to:i},{commands:p,chain:A,can:h}=new etR({editor:n,state:l});null!==e.handler({state:l,range:f,match:t,commands:p,chain:A,can:h})&&a.steps.length&&(a.setMeta(u,{transform:a,from:r,to:i,text:o}),s.dispatch(a),c=!0)}),c}class etY{constructor(e){this.find=e.find,this.handler=e.handler}}let etH=(e,t,n)=>{if(etq(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(t=>{let n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n}):[]},etZ=e=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return null===(t=n.clipboardData)||void 0===t||t.setData("text/html",e),n};class etJ{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=etJ.resolve(e),this.schema=etP(this.extensions,t),this.extensions.forEach(e=>{var t;this.editor.extensionStorage[e.name]=e.storage;let n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:etW(e.name,this.schema)};"mark"===e.type&&(!(null!==(t=etK(etk(e,"keepOnSplit",n)))&&void 0!==t)||t)&&this.splittableMarks.push(e.name);let r=etk(e,"onBeforeCreate",n);r&&this.editor.on("beforeCreate",r);let i=etk(e,"onCreate",n);i&&this.editor.on("create",i);let o=etk(e,"onUpdate",n);o&&this.editor.on("update",o);let a=etk(e,"onSelectionUpdate",n);a&&this.editor.on("selectionUpdate",a);let u=etk(e,"onTransaction",n);u&&this.editor.on("transaction",u);let s=etk(e,"onFocus",n);s&&this.editor.on("focus",s);let l=etk(e,"onBlur",n);l&&this.editor.on("blur",l);let c=etk(e,"onDestroy",n);c&&this.editor.on("destroy",c)})}static resolve(e){let t=etJ.sort(etJ.flatten(e)),n=function(e){let t=e.filter((t,n)=>e.indexOf(t)!==n);return[...new Set(t)]}(t.map(e=>e.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(e=>`'${e}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(e=>{let t={name:e.name,options:e.options,storage:e.storage},n=etk(e,"addExtensions",t);return n?[e,...this.flatten(n())]:e}).flat(10)}static sort(e){return e.sort((e,t)=>{let n=etk(e,"priority")||100,r=etk(t,"priority")||100;return n>r?-1:n<r?1:0})}get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:etW(t.name,this.schema)},r=etk(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){let{editor:e}=this,t=etJ.sort([...this.extensions].reverse()),n=[],r=[],i=t.map(t=>{var i,o;let a={name:t.name,options:t.options,storage:t.storage,editor:e,type:etW(t.name,this.schema)},u=[],s=etk(t,"addKeyboardShortcuts",a),l={};if("mark"===t.type&&t.config.exitable&&(l.ArrowRight=()=>erf.handleExit({editor:e,mark:t})),s){let c=Object.fromEntries(Object.entries(s()).map(([t,n])=>[t,()=>n({editor:e})]));l={...l,...c}}let d,f=(i=l,new $4({props:{handleKeyDown:(o=i,d=function(e){let t=Object.create(null);for(let n in e)t[eeP(n)]=e[n];return t}(o),function(e,t){var n,r;let i=("Esc"==(r=!(eej&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||eeU&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?eeF:eeM)[t.keyCode]||t.key||"Unidentified")&&(r="Escape"),"Del"==r&&(r="Delete"),"Left"==r&&(r="ArrowLeft"),"Up"==r&&(r="ArrowUp"),"Right"==r&&(r="ArrowRight"),"Down"==r&&(r="ArrowDown"),r),o,a=d[eeW(i,t)];if(a&&a(e.state,e.dispatch,e))return!0;if(1==i.length&&" "!=i){if(t.shiftKey){let u=d[eeW(i,t,!1)];if(u&&u(e.state,e.dispatch,e))return!0}if((t.shiftKey||t.altKey||t.metaKey||i.charCodeAt(0)>127)&&(o=eeM[t.keyCode])&&o!=i){let s=d[eeW(o,t)];if(s&&s(e.state,e.dispatch,e))return!0}}return!1})}}));u.push(f);let p=etk(t,"addInputRules",a);etD(t,e.options.enableInputRules)&&p&&n.push(...p());let A=etk(t,"addPasteRules",a);etD(t,e.options.enablePasteRules)&&A&&r.push(...A());let h=etk(t,"addProseMirrorPlugins",a);if(h){let m=h();u.push(...m)}return u}).flat();return[function(e){let{editor:t,rules:n}=e,r=new $4({state:{init:()=>null,apply(e,i){let o=e.getMeta(r);if(o)return o;let a=e.getMeta("applyInputRules");return a&&setTimeout(()=>{let{from:e,text:i}=a,o=e+i.length;etz({editor:t,from:e,to:o,text:i,rules:n,plugin:r})}),e.selectionSet||e.docChanged?null:i}},props:{handleTextInput:(e,i,o,a)=>etz({editor:t,from:i,to:o,text:a,rules:n,plugin:r}),handleDOMEvents:{compositionend:e=>(setTimeout(()=>{let{$cursor:i}=e.state.selection;i&&etz({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(e,i){if("Enter"!==i.key)return!1;let{$cursor:o}=e.state.selection;return!!o&&etz({editor:t,from:o.pos,to:o.pos,text:`
15
+ `,rules:n,plugin:r})}},isInputRules:!0});return r}({editor:e,rules:n}),...function(e){let{editor:t,rules:n}=e,r=null,i=!1,o=!1,a="u">typeof ClipboardEvent?new ClipboardEvent("paste"):null,u="u">typeof DragEvent?new DragEvent("drop"):null,s=({state:e,from:n,to:r,rule:i,pasteEvt:o})=>{let s=e.tr,l=etO({state:e,transaction:s});if(!(!function(e){let{editor:t,state:n,from:r,to:i,rule:o,pasteEvent:a,dropEvent:u}=e,{commands:s,chain:l,can:c}=new etR({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,i,(e,t)=>{if(!e.isTextblock||e.type.spec.code)return;let f=Math.max(r,t),p=Math.min(i,t+e.content.size),A=e.textBetween(f-t,p-t,void 0,"");etH(A,o.find,a).forEach(e=>{if(void 0===e.index)return;let t=f+e.index+1,r=t+e[0].length,i={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},p=o.handler({state:n,range:i,match:e,commands:s,chain:l,can:c,pasteEvent:a,dropEvent:u});d.push(p)})}),d.every(e=>null!==e)}({editor:t,state:l,from:Math.max(n-1,0),to:r.b-1,rule:i,pasteEvent:o,dropEvent:u})||!s.steps.length))return u="u">typeof DragEvent?new DragEvent("drop"):null,a="u">typeof ClipboardEvent?new ClipboardEvent("paste"):null,s};return n.map(e=>new $4({view(e){let t=t=>{var n;r=!(null===(n=e.dom.parentElement)||void 0===n)&&n.contains(t.target)?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:(e,t)=>(o=r===e.dom.parentElement,u=t,!1),paste(e,t){var n;let r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return a=t,i=!!(null!=r&&r.includes("data-pm-slice")),!1}}},appendTransaction(t,n,r){var u;let l=t[0],c="paste"===l.getMeta("uiEvent")&&!i,d="drop"===l.getMeta("uiEvent")&&!o,f=l.getMeta("applyPasteRules"),p=!!f;if(!c&&!d&&!p)return;if(p){let{from:A,text:h}=f,m=A+h.length,g=etZ(h);return s({rule:e,state:r,from:A,to:{b:m},pasteEvt:g})}let y=n.doc.content.findDiffStart(r.doc.content),v=n.doc.content.findDiffEnd(r.doc.content);if("number"==typeof y&&v&&y!==v.b)return s({rule:e,state:r,from:y,to:v,pasteEvt:a})}}))}({editor:e,rules:r}),...i]}get attributes(){return etM(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=etE(this.extensions);return Object.fromEntries(t.filter(e=>!!etk(e,"addNodeView")).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r={name:t.name,options:t.options,storage:t.storage,editor:e,type:etF(t.name,this.schema)},i=etk(t,"addNodeView",r);if(!i)return[];let o=(r,o,a,u)=>{let s=etU(r,n);return i()({editor:e,node:r,getPos:a,decorations:u,HTMLAttributes:s,extension:t})};return[t.name,o]}))}}function etG(e){var t;return"Object"===Object.prototype.toString.call(e).slice(8,-1)&&e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function et$(e,t){let n={...e};return etG(e)&&etG(t)&&Object.keys(t).forEach(r=>{etG(t[r])&&r in e?n[r]=et$(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}class etX{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=etK(etk(this,"addOptions",{name:this.name}))),this.storage=etK(etk(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new etX(e)}configure(e={}){let t=this.extend();return t.options=et$(this.options,e),t.storage=etK(etk(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){let t=new etX({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=etK(etk(t,"addOptions",{name:t.name})),t.storage=etK(etk(t,"addStorage",{name:t.name,options:t.options})),t}}etX.create({name:"clipboardTextSerializer",addOptions:()=>({blockSeparator:void 0}),addProseMirrorPlugins(){return[new $4({key:new Xe("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{var e;let{editor:t}=this,{state:n,schema:r}=t,{doc:i,selection:o}=n,{ranges:a}=o,u=Math.min(...a.map(e=>e.$from.pos)),s=Math.max(...a.map(e=>e.$to.pos)),l=Object.fromEntries(Object.entries(r.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]));return function(e,t,n){let{from:r,to:i}=t,{blockSeparator:o=`
16
+
17
+ `,textSerializers:a={}}=n||{},u="",s=!0;return e.nodesBetween(r,i,(e,n,l,c)=>{var d;let f=null==a?void 0:a[e.type.name];if(f)return e.isBlock&&!s&&(u+=o,s=!0),l&&(u+=f({node:e,pos:n,parent:l,index:c,range:t})),!1;e.isText?(u+=null===(d=null==e?void 0:e.text)||void 0===d?void 0:d.slice(Math.max(r,n)-n,i-n),s=!1):e.isBlock&&!s&&(u+=o,s=!0)}),u}(i,{from:u,to:s},{...void 0!==this.options.blockSeparator?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}});let et0=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),null===(n=null==window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())}),!0),et1=(e=!1)=>({commands:t})=>t.setContent("",e),et2=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,(e,n)=>{if(e.type.isText)return;let{doc:r,mapping:i}=t,o=r.resolve(i.map(n)),a=r.resolve(i.map(n+e.nodeSize)),u=o.blockRange(a);if(!u)return;let s=function(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),i=e.$from.index(n),o=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(i,o,t))return n;if(0==n||r.type.spec.isolating||!ee2(r,i,o))break}return null}(u);if(e.type.isTextblock){let{defaultType:l}=o.parent.contentMatchAt(o.index());t.setNodeMarkup(u.start,l)}(s||0===s)&&t.lift(u,s)})}),!0},et6=e=>t=>e(t),et5=()=>({state:e,dispatch:t})=>etx(e,t),et3=(e,t)=>({editor:n,tr:r})=>{let{state:i}=n,o=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let a=r.mapping.map(t);return r.insert(a,o.content),r.setSelection(new $G(r.doc.resolve(a-1))),!0},et9=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(t){let a=i.before(o),u=i.after(o);e.delete(a,u).scrollIntoView()}return!0}return!1},et4=e=>({tr:t,state:n,dispatch:r})=>{let i=etF(e,n.schema),o=t.selection.$anchor;for(let a=o.depth;a>0;a-=1)if(o.node(a).type===i){if(r){let u=o.before(a),s=o.after(a);t.delete(u,s).scrollIntoView()}return!0}return!1},et7=e=>({tr:t,dispatch:n})=>{let{from:r,to:i}=e;return n&&t.delete(r,i),!0},et8=()=>({state:e,dispatch:t})=>ett(e,t),ene=()=>({commands:e})=>e.keyboardShortcut("Enter"),ent=()=>({state:e,dispatch:t})=>etv(e,t);function enn(e,t,n={strict:!0}){let r=Object.keys(t);return!r.length||r.every(r=>n.strict?t[r]===e[r]:etq(t[r])?t[r].test(e[r]):t[r]===e[r])}function enr(e,t,n={}){return e.find(e=>e.type===t&&enn(e.attrs,n))}function eni(e,t,n={}){return!!enr(e,t,n)}function eno(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&0!==r.offset&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;let i=enr([...r.node.marks],t,n);if(!i)return;let o=r.index,a=e.start()+r.offset,u=o+1,s=a+r.node.nodeSize;for(enr([...r.node.marks],t,n);o>0&&i.isInSet(e.parent.child(o-1).marks);)o-=1,a-=e.parent.child(o).nodeSize;for(;u<e.parent.childCount&&eni([...e.parent.child(u).marks],t,n);)s+=e.parent.child(u).nodeSize,u+=1;return{from:a,to:s}}function ena(e,t){if("string"==typeof e){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}let enu=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let o=ena(e,r.schema),{doc:a,selection:u}=n,{$from:s,from:l,to:c}=u;if(i){let d=eno(s,o,t);if(d&&d.from<=l&&d.to>=c){let f=$G.create(a,d.from,d.to);n.setSelection(f)}}return!0},ens=e=>t=>{let n="function"==typeof e?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function enl(e){return e instanceof $G}function enc(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function end(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}let enf=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:o})=>{t={scrollIntoView:!0,...t};let a=()=>{end()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),null!=t&&t.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&null===e||!1===e)return!0;if(o&&null===e&&!enl(n.state.selection))return a(),!0;let u=function(e,t=null){if(!t)return null;let n=$Y.atStart(e),r=$Y.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;let i=n.from,o=r.to;return"all"===t?$G.create(e,enc(0,i,o),enc(e.content.size,i,o)):$G.create(e,enc(t,i,o),enc(t,i,o))}(i.doc,e)||n.state.selection,s=n.state.selection.eq(u);return o&&(s||i.setSelection(u),s&&i.storedMarks&&i.setStoredMarks(i.storedMarks),a()),!0},enp=(e,t)=>n=>e.every((e,r)=>t(e,{...n,index:r})),enA=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),enh=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let r=t[n];3===r.nodeType&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):1===r.nodeType&&enh(r)}return e};function enm(e){let t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return enh(n)}function eng(e,t,n){if(n={slice:!0,parseOptions:{},...n},"object"==typeof e&&null!==e)try{return Array.isArray(e)&&e.length>0?Gw.fromArray(e.map(e=>t.nodeFromJSON(e))):t.nodeFromJSON(e)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),eng("",t,n)}if("string"==typeof e){let i=$e.fromSchema(t);return n.slice?i.parseSlice(enm(e),n.parseOptions).content:i.parse(enm(e),n.parseOptions)}return eng("",t,n)}let eny=e=>e.toString().startsWith("<"),env=(e,t,n)=>({tr:r,dispatch:i,editor:o})=>{if(i){n={parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a=eng(t,o.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if("<>"===a.toString())return!0;let{from:u,to:s}="number"==typeof e?{from:e,to:e}:{from:e.from,to:e.to},l=!0,c=!0;if((eny(a)?a:[a]).forEach(e=>{e.check(),l=!!l&&e.isText&&0===e.marks.length,c=!!c&&e.isBlock}),u===s&&c){let{parent:d}=r.doc.resolve(u);!d.isTextblock||d.type.spec.code||d.childCount||(u-=1,s+=1)}let f;l?(f=Array.isArray(t)?t.map(e=>e.text||"").join(""):"object"==typeof t&&t&&t.text?t.text:t,r.insertText(f,u,s)):(f=a,r.replaceWith(u,s,f)),n.updateSelection&&function(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof eeX||i instanceof ee0))return;let o=e.mapping.maps[r],a=0;o.forEach((e,t,n,r)=>{0===a&&(a=r)}),e.setSelection($Y.near(e.doc.resolve(a),-1))}(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:f}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:f})}return!0},enx=()=>({state:e,dispatch:t})=>etA(e,t),enb=()=>({state:e,dispatch:t})=>eth(e,t),enC=()=>({state:e,dispatch:t})=>etr(e,t),enS=()=>({state:e,dispatch:t})=>etd(e,t),enw=()=>({tr:e,state:t,dispatch:n})=>{try{let r=ee4(t.doc,t.selection.$from.pos,-1);return null!=r&&(e.join(r,2),n&&n(e),!0)}catch{return!1}},enI=()=>({state:e,dispatch:t,tr:n})=>{try{let r=ee4(e.doc,e.selection.$from.pos,1);return null!=r&&(n.join(r,2),t&&t(n),!0)}catch{return!1}},en_=()=>({state:e,dispatch:t})=>eti(e,t),enT=()=>({state:e,dispatch:t})=>eto(e,t);function enO(){return"u">typeof navigator&&/Mac/.test(navigator.platform)}let enR=e=>({editor:t,view:n,tr:r,dispatch:i})=>{let o=(function(e){let t=e.split(/-(?!$)/),n=t[t.length-1];"Space"===n&&(n=" ");let r,i,o,a;for(let u=0;u<t.length-1;u+=1){let s=t[u];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))i=!0;else if(/^s(hift)?$/i.test(s))o=!0;else if(/^mod$/i.test(s))end()||enO()?a=!0:i=!0;else throw Error(`Unrecognized modifier name: ${s}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),a&&(n=`Meta-${n}`),o&&(n=`Shift-${n}`),n})(e).split(/-(?!$)/),a=o.find(e=>!["Alt","Ctrl","Meta","Shift"].includes(e)),u=new KeyboardEvent("keydown",{key:"Space"===a?" ":a,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),s=t.captureTransaction(()=>{n.someProp("handleKeyDown",e=>e(n,u))});return null==s||s.steps.forEach(e=>{let t=e.map(r.mapping);t&&i&&r.maybeStep(t)}),!0};function enk(e,t,n={}){let{from:r,to:i,empty:o}=e.selection,a=t?etF(t,e.schema):null,u=[];e.doc.nodesBetween(r,i,(e,t)=>{if(e.isText)return;let n=Math.min(i,t+e.nodeSize);u.push({node:e,from:Math.max(r,t),to:n})});let s=u.filter(e=>!a||a.name===e.node.type.name).filter(e=>enn(e.node.attrs,n,{strict:!1}));return o?!!s.length:s.reduce((e,t)=>e+t.to-t.from,0)>=i-r}let enE=(e,t={})=>({state:n,dispatch:r})=>{let i=etF(e,n.schema);return!!enk(n,i,t)&&etm(n,r)},enM=()=>({state:e,dispatch:t})=>etb(e,t),enF=e=>({state:t,dispatch:n})=>{var r;let i=etF(e,t.schema);return function(e,t){let{$from:n,$to:r}=e.selection,o=n.blockRange(r,e=>e.childCount>0&&e.firstChild.type==i);return!!o&&(!t||(n.node(o.depth-1).type==i?function(e,t,n,r){let i=e.tr,o=r.end,a=r.$to.end(r.depth);o<a&&(i.step(new $T(o-1,a,o,a,new Gk(Gw.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new GD(i.doc.resolve(r.$from.pos),i.doc.resolve(a),r.depth));let u=$k(r);if(null==u)return!1;i.lift(r,u);let s=i.mapping.map(o,-1)-1;return $j(i.doc,s)&&i.join(s),t(i.scrollIntoView()),!0}(e,t,i,o):function(e,t,n){let r=e.tr,i=n.parent;for(let o=n.end,a=n.endIndex-1,u=n.startIndex;a>u;a--)o-=i.child(a).nodeSize,r.delete(o-1,o+1);let s=r.doc.resolve(n.start),l=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let c=0==n.startIndex,d=n.endIndex==i.childCount,f=s.node(-1),p=s.index(-1);if(!f.canReplace(p+(c?0:1),p+1,l.content.append(d?Gw.empty:Gw.from(i))))return!1;let A=s.pos,h=A+l.nodeSize;return r.step(new $T(A-(c?1:0),h+(d?1:0),A+1,h-1,new Gk((c?Gw.empty:Gw.from(i.copy(Gw.empty))).append(d?Gw.empty:Gw.from(i.copy(Gw.empty))),c?0:1,d?0:1),c?0:1)),t(r.scrollIntoView()),!0}(e,t,o)))}(t,n)},enj=()=>({state:e,dispatch:t})=>etg(e,t);function enU(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function enK(e,t){let n="string"==typeof t?[t]:t;return Object.keys(e).reduce((t,r)=>(n.includes(r)||(t[r]=e[r]),t),{})}let enL=(e,t)=>({tr:n,state:r,dispatch:i})=>{let o=null,a=null,u=enU("string"==typeof e?e:e.name,r.schema);return!!u&&("node"===u&&(o=etF(e,r.schema)),"mark"===u&&(a=ena(e,r.schema)),i&&n.selection.ranges.forEach(e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,(e,r)=>{o&&o===e.type&&n.setNodeMarkup(r,void 0,enK(e.attrs,t)),a&&e.marks.length&&e.marks.forEach(i=>{a===i.type&&n.addMark(r,r+e.nodeSize,a.create(enK(i.attrs,t)))})})}),!0)},enB=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),enP=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),enW=()=>({state:e,dispatch:t})=>ets(e,t),enD=()=>({state:e,dispatch:t})=>etf(e,t),enN=()=>({state:e,dispatch:t})=>etC(e,t),enq=()=>({state:e,dispatch:t})=>et_(e,t),enQ=()=>({state:e,dispatch:t})=>etI(e,t),enV=(e,t=!1,n={})=>({tr:r,editor:i,dispatch:o})=>{let{doc:a}=r,u=function(e,t,n={}){return eng(e,t,{slice:!1,parseOptions:n})}(e,i.schema,n);return o&&r.replaceWith(0,a.content.size,u).setMeta("preventUpdate",!t),!0};function enz(e,t){let n=ena(t,e.schema),{from:r,to:i,empty:o}=e.selection,a=[];o?(e.storedMarks&&a.push(...e.storedMarks),a.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,e=>{a.push(...e.marks)});let u=a.find(e=>e.type.name===n.name);return u?{...u.attrs}:{}}function enY(e){return t=>(function(e,t){for(let n=e.depth;n>0;n-=1){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}})(t.$from,e)}function enH(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(t=>{let i=n.resolve(e-1),o=eno(i,t.type);o&&r.push({mark:t,...o})}):n.nodesBetween(e,t,(e,t)=>{e&&(null==e?void 0:e.nodeSize)!==void 0&&r.push(...e.marks.map(n=>({from:t,to:t+e.nodeSize,mark:n})))}),r}function enZ(e,t,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{let r=e.find(e=>e.type===t&&e.name===n);return!!r&&r.attribute.keepOnSplit}))}function enJ(e,t){let{nodeExtensions:n}=etE(t),r=n.find(t=>t.name===e);if(!r)return!1;let i={name:r.name,options:r.options,storage:r.storage},o=etK(etk(r,"group",i));return"string"==typeof o&&o.split(" ").includes("list")}let enG=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{selection:o}=n,{empty:a,ranges:u}=o,s=ena(e,r.schema);if(i){if(a){let l=enz(r,s);n.addStoredMark(s.create({...l,...t}))}else u.forEach(e=>{let i=e.$from.pos,o=e.$to.pos;r.doc.nodesBetween(i,o,(e,r)=>{let a=Math.max(r,i),u=Math.min(r+e.nodeSize,o);e.marks.find(e=>e.type===s)?e.marks.forEach(e=>{s===e.type&&n.addMark(a,u,s.create({...e.attrs,...t}))}):n.addMark(a,u,s.create(t))})})}return function(e,t,n){var r;let{selection:i}=t,o=null;if(enl(i)&&(o=i.$cursor),o){let a=null!==(r=e.storedMarks)&&void 0!==r?r:o.marks();return!!n.isInSet(a)||!a.some(e=>e.type.excludes(n))}let{ranges:u}=i;return u.some(({$from:t,$to:r})=>{let i=0===t.depth&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,(e,t,r)=>{if(i)return!1;if(e.isInline){let o=!r||r.type.allowsMarkType(n),a=!!n.isInSet(e.marks)||!e.marks.some(e=>e.type.excludes(n));i=o&&a}return!i}),i})}(r,n,s)},en$=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),enX=(e,t={})=>({state:n,dispatch:r,chain:i})=>{let o=etF(e,n.schema);return o.isTextblock?i().command(({commands:e})=>!!etT(o,t)(n)||e.clearNodes()).command(({state:e})=>etT(o,t)(e,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},en0=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,i=enc(e,0,r.content.size),o=$X.create(r,i);t.setSelection(o)}return!0},en1=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,{from:i,to:o}="number"==typeof e?{from:e,to:e}:e,a=$G.atStart(r).from,u=$G.atEnd(r).to,s=enc(i,a,u),l=enc(o,a,u),c=$G.create(r,s,l);t.setSelection(c)}return!0},en2=e=>({state:t,dispatch:n})=>{var r;let i=etF(e,t.schema);return function(e,t){let{$from:n,$to:r}=e.selection,o=n.blockRange(r,e=>e.childCount>0&&e.firstChild.type==i);if(!o)return!1;let a=o.startIndex;if(0==a)return!1;let u=o.parent,s=u.child(a-1);if(s.type!=i)return!1;if(t){let l=s.lastChild&&s.lastChild.type==u.type,c=Gw.from(l?i.create():null),d=new Gk(Gw.from(i.create(null,Gw.from(u.type.create(null,c)))),l?3:1,0),f=o.start,p=o.end;t(e.tr.step(new $T(f-(l?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}(t,n)};function en6(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(e=>null==t?void 0:t.includes(e.type.name));e.tr.ensureMarks(r)}}let en5=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{let{selection:o,doc:a}=t,{$from:u,$to:s}=o,l=i.extensionManager.attributes,c=enZ(l,u.node().type.name,u.node().attrs);if(o instanceof $X&&o.node.isBlock)return!!(u.parentOffset&&ee5(a,u.pos))&&(r&&(e&&en6(n,i.extensionManager.splittableMarks),t.split(u.pos).scrollIntoView()),!0);if(!u.parent.isBlock)return!1;if(r){let d=s.parentOffset===s.parent.content.size;o instanceof $G&&t.deleteSelection();let f=0===u.depth?void 0:function(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(u.node(-1).contentMatchAt(u.indexAfter(-1))),p=d&&f?[{type:f,attrs:c}]:void 0,A=ee5(t.doc,t.mapping.map(u.pos),1,p);if(!p&&!A&&ee5(t.doc,t.mapping.map(u.pos),1,f?[{type:f}]:void 0)&&(A=!0,p=f?[{type:f,attrs:c}]:void 0),A&&(t.split(t.mapping.map(u.pos),1,p),f&&!d&&!u.parentOffset&&u.parent.type!==f)){let h=t.mapping.map(u.before()),m=t.doc.resolve(h);u.node(-1).canReplaceWith(m.index(),m.index()+1,f)&&t.setNodeMarkup(t.mapping.map(u.before()),f)}e&&en6(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return!0},en3=e=>({tr:t,state:n,dispatch:r,editor:i})=>{var o;let a=etF(e,n.schema),{$from:u,$to:s}=n.selection,l=n.selection.node;if(l&&l.isBlock||u.depth<2||!u.sameParent(s))return!1;let c=u.node(-1);if(c.type!==a)return!1;let d=i.extensionManager.attributes;if(0===u.parent.content.size&&u.node(-1).childCount===u.indexAfter(-1)){if(2===u.depth||u.node(-3).type!==a||u.index(-2)!==u.node(-2).childCount-1)return!1;if(r){let f=Gw.empty,p=u.index(-1)?1:u.index(-2)?2:3;for(let A=u.depth-p;A>=u.depth-3;A-=1)f=Gw.from(u.node(A).copy(f));let h=u.indexAfter(-1)<u.node(-2).childCount?1:u.indexAfter(-2)<u.node(-3).childCount?2:3,m=enZ(d,u.node().type.name,u.node().attrs),g=(null===(o=a.contentMatch.defaultType)||void 0===o?void 0:o.createAndFill(m))||void 0;f=f.append(Gw.from(a.createAndFill(null,g)||void 0));let y=u.before(u.depth-(p-1));t.replace(y,u.after(-h),new Gk(f,4-p,0));let v=-1;t.doc.nodesBetween(y,t.doc.content.size,(e,t)=>{if(v>-1)return!1;e.isTextblock&&0===e.content.size&&(v=t+1)}),v>-1&&t.setSelection($G.near(t.doc.resolve(v))),t.scrollIntoView()}return!0}let x=s.pos===u.end()?c.contentMatchAt(0).defaultType:null,b=enZ(d,c.type.name,c.attrs),C=enZ(d,u.node().type.name,u.node().attrs);if(t.delete(u.pos,s.pos),!ee5(t.doc,u.pos,2))return!1;if(r){let{selection:S,storedMarks:w}=n,{splittableMarks:I}=i.extensionManager,_=w||S.$to.parentOffset&&S.$from.marks();if(t.split(u.pos,2,x?[{type:a,attrs:b},{type:x,attrs:C}]:[{type:a,attrs:b}]).scrollIntoView(),!_||!r)return!0;let T=_.filter(e=>I.includes(e.type.name));t.ensureMarks(T)}return!0},en9=(e,t)=>{let n=enY(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;let i=e.doc.nodeAt(r);return n.node.type===(null==i?void 0:i.type)&&ee3(e.doc,n.pos)&&e.join(n.pos),!0},en4=(e,t)=>{let n=enY(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;let i=e.doc.nodeAt(r);return n.node.type===(null==i?void 0:i.type)&&ee3(e.doc,r)&&e.join(r),!0},en7=(e,t,n,r={})=>({editor:i,tr:o,state:a,dispatch:u,chain:s,commands:l,can:c})=>{let{extensions:d,splittableMarks:f}=i.extensionManager,p=etF(e,a.schema),A=etF(t,a.schema),{selection:h,storedMarks:m}=a,{$from:g,$to:y}=h,v=g.blockRange(y),x=m||h.$to.parentOffset&&h.$from.marks();if(!v)return!1;let b=enY(e=>enJ(e.type.name,d))(h);if(v.depth>=1&&b&&v.depth-b.depth<=1){if(b.node.type===p)return l.liftListItem(A);if(enJ(b.node.type.name,d)&&p.validContent(b.node.content)&&u)return s().command(()=>(o.setNodeMarkup(b.pos,p),!0)).command(()=>en9(o,p)).command(()=>en4(o,p)).run()}return n&&x&&u?s().command(()=>{let e=c().wrapInList(p,r),t=x.filter(e=>f.includes(e.type.name));return o.ensureMarks(t),!!e||l.clearNodes()}).wrapInList(p,r).command(()=>en9(o,p)).command(()=>en4(o,p)).run():s().command(()=>!!c().wrapInList(p,r)||l.clearNodes()).wrapInList(p,r).command(()=>en9(o,p)).command(()=>en4(o,p)).run()},en8=(e,t={},n={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:o=!1}=n,a=ena(e,r.schema);return!function(e,t,n={}){let{empty:r,ranges:i}=e.selection,o=t?ena(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>!o||o.name===e.type.name).find(e=>enn(e.attrs,n,{strict:!1}));let a=0,u=[];if(i.forEach(({$from:t,$to:n})=>{let r=t.pos,i=n.pos;e.doc.nodesBetween(r,i,(e,t)=>{if(!e.isText&&!e.marks.length)return;let n=Math.max(r,t),o=Math.min(i,t+e.nodeSize);a+=o-n,u.push(...e.marks.map(e=>({mark:e,from:n,to:o})))})}),0===a)return!1;let s=u.filter(e=>!o||o.name===e.mark.type.name).filter(e=>enn(e.mark.attrs,n,{strict:!1})).reduce((e,t)=>e+t.to-t.from,0),l=u.filter(e=>!o||e.mark.type!==o&&e.mark.type.excludes(o)).reduce((e,t)=>e+t.to-t.from,0);return(s>0?s+l:s)>=a}(r,a,t)?i.setMark(a,t):i.unsetMark(a,{extendEmptyMarkRange:o})},ere=(e,t,n={})=>({state:r,commands:i})=>{let o=etF(e,r.schema),a=etF(t,r.schema);return enk(r,o,n)?i.setNode(a):i.setNode(o,n)},ert=(e,t={})=>({state:n,commands:r})=>{let i=etF(e,n.schema);return enk(n,i,t)?r.lift(i):r.wrapIn(i,t)},ern=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r<n.length;r+=1){let i=n[r],o;if(i.spec.isInputRules&&(o=i.getState(e))){if(t){let a=e.tr,u=o.transform;for(let s=u.steps.length-1;s>=0;s-=1)a.step(u.steps[s].invert(u.docs[s]));if(o.text){let l=a.doc.resolve(o.from).marks();a.replaceWith(o.from,o.to,e.schema.text(o.text,l))}else a.delete(o.from,o.to)}return!0}}return!1},err=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach(t=>{e.removeMark(t.$from.pos,t.$to.pos)}),!0},eri=(e,t={})=>({tr:n,state:r,dispatch:i})=>{var o;let{extendEmptyMarkRange:a=!1}=t,{selection:u}=n,s=ena(e,r.schema),{$from:l,empty:c,ranges:d}=u;if(!i)return!0;if(c&&a){let{from:f,to:p}=u,A=null===(o=l.marks().find(e=>e.type===s))||void 0===o?void 0:o.attrs,h=eno(l,s,A);h&&(f=h.from,p=h.to),n.removeMark(f,p,s)}else d.forEach(e=>{n.removeMark(e.$from.pos,e.$to.pos,s)});return n.removeStoredMark(s),!0},ero=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let o=null,a=null,u=enU("string"==typeof e?e:e.name,r.schema);return!!u&&("node"===u&&(o=etF(e,r.schema)),"mark"===u&&(a=ena(e,r.schema)),i&&n.selection.ranges.forEach(e=>{let i=e.$from.pos,u=e.$to.pos;r.doc.nodesBetween(i,u,(e,r)=>{o&&o===e.type&&n.setNodeMarkup(r,void 0,{...e.attrs,...t}),a&&e.marks.length&&e.marks.forEach(o=>{if(a===o.type){let s=Math.min(r+e.nodeSize,u);n.addMark(Math.max(r,i),s,a.create({...o.attrs,...t}))}})})}),!0)},era=(e,t={})=>({state:n,dispatch:r})=>{let i=etF(e,n.schema);return(function(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,a=i.blockRange(o),u=a&&$E(a,e,t);return!!u&&(r&&r(n.tr.wrap(a,u).scrollIntoView()),!0)}})(i,t)(n,r)},eru=(e,t={})=>({state:n,dispatch:r})=>{let i=etF(e,n.schema);return(function(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,a=i.blockRange(o),u=!1,s=a;if(!a)return!1;if(a.depth>=2&&i.node(a.depth-1).type.compatibleContent(e)&&0==a.startIndex){if(0==i.index(a.depth-1))return!1;let l=n.doc.resolve(a.start-2);s=new GD(l,l,a.depth),a.endIndex<a.parent.childCount&&(a=new GD(i,n.doc.resolve(o.end(a.depth)),a.depth)),u=!0}let c=$E(s,e,t,a);return!!c&&(r&&r((function(e,t,n,r,i){let o=Gw.empty;for(let a=n.length-1;a>=0;a--)o=Gw.from(n[a].type.create(n[a].attrs,o));e.step(new $T(t.start-(r?2:0),t.end,t.start,t.end,new Gk(o,0,0),n.length,!0));let u=0;for(let s=0;s<n.length;s++)n[s].type==i&&(u=s+1);let l=n.length-u,c=t.start+n.length-(r?2:0),d=t.parent;for(let f=t.startIndex,p=t.endIndex,A=!0;f<p;f++,A=!1)!A&&$F(e.doc,c,l)&&(e.split(c,l),c+=2*l),c+=d.child(f).nodeSize;return e})(n.tr,a,c,u,e).scrollIntoView()),!0)}})(i,t)(n,r)};var ers=Object.freeze({__proto__:null,blur:et0,clearContent:et1,clearNodes:et2,command:et6,createParagraphNear:et5,cut:et3,deleteCurrentNode:et9,deleteNode:et4,deleteRange:et7,deleteSelection:et8,enter:ene,exitCode:ent,extendMarkRange:enu,first:ens,focus:enf,forEach:enp,insertContent:enA,insertContentAt:env,joinUp:enx,joinDown:enb,joinBackward:enC,joinForward:enS,joinItemBackward:enw,joinItemForward:enI,joinTextblockBackward:en_,joinTextblockForward:enT,keyboardShortcut:enR,lift:enE,liftEmptyBlock:enM,liftListItem:enF,newlineInCode:enj,resetAttributes:enL,scrollIntoView:enB,selectAll:enP,selectNodeBackward:enW,selectNodeForward:enD,selectParentNode:enN,selectTextblockEnd:enq,selectTextblockStart:enQ,setContent:enV,setMark:enG,setMeta:en$,setNode:enX,setNodeSelection:en0,setTextSelection:en1,sinkListItem:en2,splitBlock:en5,splitListItem:en3,toggleList:en7,toggleMark:en8,toggleNode:ere,toggleWrap:ert,undoInputRule:ern,unsetAllMarks:err,unsetMark:eri,updateAttributes:ero,wrapIn:era,wrapInList:eru});function erl(e){return new etQ({find:e.find,handler({state:t,range:n,match:r}){let i=etK(e.getAttributes,void 0,r);if(!1===i||null===i)return null;let{tr:o}=t,a=r[r.length-1],u=r[0];if(a){let s=u.search(/\S/),l=n.from+u.indexOf(a),c=l+a.length;if(enH(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>l).length)return null;c<n.to&&o.delete(c,n.to),l>n.from&&o.delete(n.from+s,l);let d=n.from+s+a.length;o.addMark(n.from+s,d,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function erc(e){return new etQ({find:e.find,handler({state:t,range:n,match:r}){let i=t.doc.resolve(n.from),o=etK(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)}})}function erd(e){return new etQ({find:e.find,handler({state:t,range:n,match:r,chain:i}){let o=etK(e.getAttributes,void 0,r)||{},a=t.tr.delete(n.from,n.to),u=a.doc.resolve(n.from).blockRange(),s=u&&function(e,t,n=null,r=e){let i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let a=o.length?o[0]:t;return n.canReplaceWith(r,i,a)?o:null}(e,t),o=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),a=t.contentMatch.findWrapping(o.type);if(!a)return null;let u=(a.length?a[a.length-1]:t).contentMatch;for(let s=r;u&&s<i;s++)u=u.matchType(n.child(s).type);return u&&u.validEnd?a:null}(r,t);return o?i.map(ee6).concat({type:t,attrs:n}).concat(o.map(ee6)):null}(u,e.type,o);if(!s)return null;if(a.wrap(u,s),e.keepMarks&&e.editor){let{selection:l,storedMarks:c}=t,{splittableMarks:d}=e.editor.extensionManager,f=c||l.$to.parentOffset&&l.$from.marks();if(f){let p=f.filter(e=>d.includes(e.type.name));a.ensureMarks(p)}}if(e.keepAttributes){let A="bulletList"===e.type.name||"orderedList"===e.type.name?"listItem":"taskList";i().updateAttributes(A,o).run()}let h=a.doc.resolve(n.from-1).nodeBefore;h&&h.type===e.type&&ee3(a.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,h))&&a.join(n.from-1)}})}etX.create({name:"commands",addCommands:()=>({...ers})}),etX.create({name:"editable",addProseMirrorPlugins(){return[new $4({key:new Xe("editable"),props:{editable:()=>this.editor.options.editable}})]}}),etX.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new $4({key:new Xe("focusEvents"),props:{handleDOMEvents:{focus(t,n){e.isFocused=!0;let r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur(t,n){e.isFocused=!1;let r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),etX.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:e})=>[()=>e.undoInputRule(),()=>e.command(({tr:t})=>{let{selection:n,doc:r}=t,{empty:i,$anchor:o}=n,{pos:a,parent:u}=o,s=o.parent.isTextblock&&a>0?t.doc.resolve(a-1):o,l=s.parent.type.spec.isolating,c=o.pos-o.parentOffset,d=l&&1===s.parent.childCount?c===o.pos:$Y.atStart(r).from===a;return!!i&&!!d&&!!u.type.isTextblock&&!u.textContent.length&&e.clearNodes()}),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},i={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return end()||enO()?i:r},addProseMirrorPlugins(){return[new $4({key:new Xe("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some(e=>e.docChanged)&&!t.doc.eq(n.doc)))return;let{empty:r,from:i,to:o}=t.selection,a=$Y.atStart(t.doc).from,u=$Y.atEnd(t.doc).to;if(r||!(i===a&&o===u)||0!==n.doc.textBetween(0,n.doc.content.size," "," ").length)return;let s=n.tr,l=etO({state:n,transaction:s}),{commands:c}=new etR({editor:this.editor,state:l});if(c.clearNodes(),s.steps.length)return s}})]}}),etX.create({name:"tabindex",addProseMirrorPlugins(){return[new $4({key:new Xe("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});let erf=class e{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=etK(etk(this,"addOptions",{name:this.name}))),this.storage=etK(etk(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new e(t)}configure(e={}){let t=this.extend();return t.options=et$(this.options,e),t.storage=etK(etk(t,"addStorage",{name:t.name,options:t.options})),t}extend(t={}){let n=new e({...this.config,...t});return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=etK(etk(n,"addOptions",{name:n.name})),n.storage=etK(etk(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:e,mark:t}){let{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){let i=r.marks();if(!i.find(e=>(null==e?void 0:e.type.name)===t.name))return!1;let o=i.find(e=>(null==e?void 0:e.type.name)===t.name);return o&&n.removeStoredMark(o),n.insertText(" ",r.pos),e.view.dispatch(n),!0}return!1}};class erp{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=etK(etk(this,"addOptions",{name:this.name}))),this.storage=etK(etk(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new erp(e)}configure(e={}){let t=this.extend();return t.options=et$(this.options,e),t.storage=etK(etk(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){let t=new erp({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=etK(etk(t,"addOptions",{name:t.name})),t.storage=etK(etk(t,"addStorage",{name:t.name,options:t.options})),t}}class erA{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,i,o,a,u;let{view:s}=this.editor,l=e.target,c=3===l.nodeType?null===(t=l.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):l.closest("[data-drag-handle]");if(!this.dom||!(null===(n=this.contentDOM)||void 0===n)&&n.contains(l)||!c)return;let d=0,f=0;if(this.dom!==c){let p=this.dom.getBoundingClientRect(),A=c.getBoundingClientRect(),h=null!==(r=e.offsetX)&&void 0!==r?r:null===(i=e.nativeEvent)||void 0===i?void 0:i.offsetX,m=null!==(o=e.offsetY)&&void 0!==o?o:null===(a=e.nativeEvent)||void 0===a?void 0:a.offsetY;d=A.x-p.x+h,f=A.y-p.y+m}null===(u=e.dataTransfer)||void 0===u||u.setDragImage(this.dom,d,f);let g=$X.create(s.state.doc,this.getPos()),y=s.state.tr.setSelection(g);s.dispatch(y)}stopEvent(e){var t;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:e});let n=e.target;if(!(this.dom.contains(n)&&!(!(null===(t=this.contentDOM)||void 0===t)&&t.contains(n))))return!1;let r=e.type.startsWith("drag"),i="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!i&&!r)return!0;let{isEditable:o}=this.editor,{isDragging:a}=this,u=!!this.node.type.spec.draggable,s=$X.isSelectable(this.node),l="copy"===e.type,c="paste"===e.type,d="cut"===e.type,f="mousedown"===e.type;if(!u&&s&&r&&e.preventDefault(),u&&r&&!a)return e.preventDefault(),!1;if(u&&o&&!a&&f){let p=n.closest("[data-drag-handle]");p&&(this.dom===p||this.dom.contains(p))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(a||i||l||c||d||f&&s)}ignoreMutation(e){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:e}):!!this.node.isLeaf||!!this.node.isAtom||!("selection"===e.type||this.dom.contains(e.target)&&"childList"===e.type&&(end()||"Android"===navigator.platform||/android/i.test(navigator.userAgent))&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(e=>e.isContentEditable))&&(this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)))}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0})}deleteNode(){let e=this.getPos(),t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}}function erh(e){return new etY({find:e.find,handler({state:t,range:n,match:r,pasteEvent:i}){let o=etK(e.getAttributes,void 0,r,i);if(!1===o||null===o)return null;let{tr:a}=t,u=r[r.length-1],s=r[0],l=n.to;if(u){let c=s.search(/\S/),d=n.from+s.indexOf(u),f=d+u.length;if(enH(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>d).length)return null;f<n.to&&a.delete(f,n.to),d>n.from&&a.delete(n.from+c,d),l=n.from+c+u.length,a.addMark(n.from+c,l,e.type.create(o||{})),a.removeStoredMark(e.type)}}})}var erm=function(){};erm.prototype.append=function(e){return e.length?(e=erm.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},erm.prototype.prepend=function(e){return e.length?erm.from(e).append(this):this},erm.prototype.appendInner=function(e){return new ery(this,e)},erm.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?erm.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},erm.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},erm.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},erm.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},erm.from=function(e){return e instanceof erm?e:e&&e.length?new erg(e):erm.empty};var erg=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(erm);erm.empty=new erg([]);var ery=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(erm);class erv{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let r,i;t&&(i=(r=this.remapping(n,this.items.length)).maps.length);let o=e.tr,a,u,s=[],l=[];return this.items.forEach((e,t)=>{if(!e.step){r||(i=(r=this.remapping(n,t+1)).maps.length),i--,l.push(e);return}if(r){l.push(new erx(e.map));let c=e.step.map(r.slice(i)),d;c&&o.maybeStep(c).doc&&(d=o.mapping.maps[o.mapping.maps.length-1],s.push(new erx(d,void 0,void 0,s.length+l.length))),i--,d&&r.appendMap(d,i)}else o.maybeStep(e.step);if(e.selection)return a=r?e.selection.map(r.slice(i)):e.selection,u=new erv(this.items.slice(0,n).append(l.reverse().concat(s)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:o,selection:a}}addTransform(e,t,n,r){var i,o;let a=[],u=this.eventCount,s=this.items,l=!r&&s.length?s.get(s.length-1):null;for(let c=0;c<e.steps.length;c++){let d=e.steps[c].invert(e.docs[c]),f=new erx(e.mapping.maps[c],d,t),p;(p=l&&l.merge(f))&&(f=p,c?a.pop():s=s.slice(0,s.length-1)),a.push(f),t&&(u++,t=void 0),r||(l=f)}let A=u-n.depth,h;return A>erC&&(i=s,o=A,s=(i.forEach((e,t)=>{if(e.selection&&0==o--)return h=t,!1}),i.slice(h)),u-=A),new erv(s.append(a),u)}remapping(e,t){let n=new $g;return this.items.forEach((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(e){return 0==this.eventCount?this:new erv(this.items.append(e.map(e=>new erx(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(e=>{e.selection&&a--},r);let u=t;this.items.forEach(t=>{let r=i.getMirror(--u);if(null==r)return;o=Math.min(o,r);let s=i.maps[r];if(t.step){let l=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(i.slice(u+1,r));c&&a++,n.push(new erx(s,l,c))}else n.push(new erx(s))},r);let s=[];for(let l=t;l<o;l++)s.push(new erx(i.maps[l]));let c=this.items.slice(0,r).append(s).append(n),d=new erv(c,a);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-n.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach((o,a)=>{if(a>=e)r.push(o),o.selection&&i++;else if(o.step){let u=o.step.map(t.slice(n)),s=u&&u.getMap();if(n--,s&&t.appendMap(s,n),u){let l=o.selection&&o.selection.map(t.slice(n));l&&i++;let c=new erx(s.invert(),u,l),d,f=r.length-1;(d=r.length&&r[f].merge(c))?r[f]=d:r.push(c)}}else o.map&&n--},this.items.length,0),new erv(erm.from(r.reverse()),i)}}erv.empty=new erv(erm.empty,0);class erx{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new erx(t.getMap().invert(),t,this.selection)}}}class erb{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let erC=20;function erS(e){let t=[];return e.forEach((e,n,r,i)=>t.push(r,i)),t}function erw(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}function erI(e,t,n,r){let i=erO(t),o=erR.get(t).spec.config,a=(r?e.undone:e.done).popEvent(t,i);if(!a)return;let u=a.selection.resolve(a.transform.doc),s=(r?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),o,i),l=new erb(r?s:a.remaining,r?a.remaining:s,null,0,-1);n(a.transform.setSelection(u).setMeta(erR,{redo:r,historyState:l}).scrollIntoView())}let er_=!1,erT=null;function erO(e){let t=e.plugins;if(erT!=t){er_=!1,erT=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){er_=!0;break}}return er_}let erR=new Xe("history"),erk=new Xe("closeHistory"),erE=(e,t)=>{let n=erR.getState(e);return!!n&&0!=n.done.eventCount&&(t&&erI(n,e,t,!1),!0)},erM=(e,t)=>{let n=erR.getState(e);return!!n&&0!=n.undone.eventCount&&(t&&erI(n,e,t,!0),!0)},erF=etX.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>erE(e,t),redo:()=>({state:e,dispatch:t})=>erM(e,t)}),addProseMirrorPlugins(){return[function(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new $4({key:erR,state:{init:()=>new erb(erv.empty,erv.empty,null,0,-1),apply:(t,n,r)=>(function(e,t,n,r){let i=n.getMeta(erR),o;if(i)return i.historyState;n.getMeta(erk)&&(e=new erb(e.done,e.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(a&&a.getMeta(erR))return a.getMeta(erR).redo?new erb(e.done.addTransform(n,void 0,r,erO(t)),e.undone,erS(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new erb(e.done,e.undone.addTransform(n,void 0,r,erO(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new erb(e.done.rebased(n,o),e.undone.rebased(n,o),erw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new erb(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),erw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let u=n.getMeta("composition"),s=0==e.prevTime||!a&&e.prevComposition!=u&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}(n,e.prevRanges)),l=a?erw(e.prevRanges,n.mapping):erS(n.mapping.maps[n.steps.length-1]);return new erb(e.done.addTransform(n,s?t.selection.getBookmark():void 0,r,erO(t)),erv.empty,l,n.time,u??e.prevComposition)}})(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?erE:"historyRedo"==n?erM:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});var erj="bottom",erU="right",erK="left",erL="auto",erB=["top",erj,erU,erK],erP="start",erW="viewport",erD="popper",erN=erB.reduce(function(e,t){return e.concat([t+"-"+erP,t+"-end"])},[]),erq=[].concat(erB,[erL]).reduce(function(e,t){return e.concat([t,t+"-"+erP,t+"-end"])},[]),erQ=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function erV(e){return e?(e.nodeName||"").toLowerCase():null}function erz(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function erY(e){var t=erz(e).Element;return e instanceof t||e instanceof Element}function erH(e){var t=erz(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function erZ(e){if(typeof ShadowRoot>"u")return!1;var t=erz(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}let erJ={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];erH(i)&&erV(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});erH(r)&&erV(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};function erG(e){return e.split("-")[0]}var er$=Math.max,erX=Math.min,er0=Math.round;function er1(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function er2(){return!/^((?!chrome|android).)*safari/i.test(er1())}function er6(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&erH(e)&&(i=e.offsetWidth>0&&er0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&er0(r.height)/e.offsetHeight||1);var a=(erY(e)?erz(e):window).visualViewport,u=!er2()&&n,s=(r.left+(u&&a?a.offsetLeft:0))/i,l=(r.top+(u&&a?a.offsetTop:0))/o,c=r.width/i,d=r.height/o;return{width:c,height:d,top:l,right:s+c,bottom:l+d,left:s,x:s,y:l}}function er5(e){var t=er6(e),n=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function er3(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&erZ(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function er9(e){return erz(e).getComputedStyle(e)}function er4(e){return["table","td","th"].indexOf(erV(e))>=0}function er7(e){return((erY(e)?e.ownerDocument:e.document)||window.document).documentElement}function er8(e){return"html"===erV(e)?e:e.assignedSlot||e.parentNode||(erZ(e)?e.host:null)||er7(e)}function eie(e){return erH(e)&&"fixed"!==er9(e).position?e.offsetParent:null}function eit(e){for(var t=erz(e),n=eie(e);n&&er4(n)&&"static"===er9(n).position;)n=eie(n);return n&&("html"===erV(n)||"body"===erV(n)&&"static"===er9(n).position)?t:n||function(e){var t=/firefox/i.test(er1());if(/Trident/i.test(er1())&&erH(e)&&"fixed"===er9(e).position)return null;var n=er8(e);for(erZ(n)&&(n=n.host);erH(n)&&0>["html","body"].indexOf(erV(n));){var r=er9(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function ein(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function eir(e,t,n){return er$(e,erX(t,n))}function eii(){return{top:0,right:0,bottom:0,left:0}}function eio(e){return Object.assign({},eii(),e)}function eia(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function eiu(e){return e.split("-")[1]}var eis={top:"auto",right:"auto",bottom:"auto",left:"auto"};function eil(e){var t,n,r=e.popper,i=e.popperRect,o=e.placement,a=e.variation,u=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=u.x,A=void 0===p?0:p,h=u.y,m=void 0===h?0:h,g="function"==typeof d?d({x:A,y:m}):{x:A,y:m};A=g.x,m=g.y;var y=u.hasOwnProperty("x"),v=u.hasOwnProperty("y"),x=erK,b="top",C=window;if(c){var S=eit(r),w="clientHeight",I="clientWidth";S===erz(r)&&(S=er7(r),"static"!==er9(S).position&&"absolute"===s&&(w="scrollHeight",I="scrollWidth")),("top"===o||(o===erK||o===erU)&&"end"===a)&&(b=erj,m-=(f&&S===C&&C.visualViewport?C.visualViewport.height:S[w])-i.height,m*=l?1:-1),(o===erK||("top"===o||o===erj)&&"end"===a)&&(x=erU,A-=(f&&S===C&&C.visualViewport?C.visualViewport.width:S[I])-i.width,A*=l?1:-1)}var _,T,O,R,k,E=Object.assign({position:s},c&&eis),M=!0===d?(_={x:A,y:m},T=erz(r),O=_.x,R=_.y,{x:er0(O*(k=T.devicePixelRatio||1))/k||0,y:er0(R*k)/k||0}):{x:A,y:m};return(A=M.x,m=M.y,l)?Object.assign({},E,((t={})[b]=v?"0":"",t[x]=y?"0":"",t.transform=1>=(C.devicePixelRatio||1)?"translate("+A+"px, "+m+"px)":"translate3d("+A+"px, "+m+"px, 0)",t)):Object.assign({},E,((n={})[b]=v?m+"px":"",n[x]=y?A+"px":"",n.transform="",n))}var eic={passive:!0},eid={left:"right",right:"left",bottom:"top",top:"bottom"};function eif(e){return e.replace(/left|right|bottom|top/g,function(e){return eid[e]})}var eip={start:"end",end:"start"};function eiA(e){return e.replace(/start|end/g,function(e){return eip[e]})}function eih(e){var t,n=erz(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function eim(e){return er6(er7(e)).left+eih(e).scrollLeft}function eig(e){var t=er9(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function eiy(e,t){void 0===t&&(t=[]);var n,r=function e(t){return["html","body","#document"].indexOf(erV(t))>=0?t.ownerDocument.body:erH(t)&&eig(t)?t:e(er8(t))}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=erz(r),a=i?[o].concat(o.visualViewport||[],eig(r)?r:[]):r,u=t.concat(a);return i?u:u.concat(eiy(er8(a)))}function eiv(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function eix(e,t,n){var r,i,o,a,u,s,l,c,d,f,p,A;return t===erW?eiv(function(e,t){var n=erz(e),r=er7(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,u=0,s=0;if(i){o=i.width,a=i.height;var l=er2();(l||!l&&"fixed"===t)&&(u=i.offsetLeft,s=i.offsetTop)}return{width:o,height:a,x:u+eim(e),y:s}}(e,n)):erY(t)?((o=er6(t,!1,"fixed"===n)).top=o.top+t.clientTop,o.left=o.left+t.clientLeft,o.bottom=o.top+t.clientHeight,o.right=o.left+t.clientWidth,o.width=t.clientWidth,o.height=t.clientHeight,o.x=o.left,o.y=o.top,o):eiv((a=er7(e),s=er7(a),l=eih(a),c=null==(u=a.ownerDocument)?void 0:u.body,d=er$(s.scrollWidth,s.clientWidth,c?c.scrollWidth:0,c?c.clientWidth:0),f=er$(s.scrollHeight,s.clientHeight,c?c.scrollHeight:0,c?c.clientHeight:0),p=-l.scrollLeft+eim(a),A=-l.scrollTop,"rtl"===er9(c||s).direction&&(p+=er$(s.clientWidth,c?c.clientWidth:0)-d),{width:d,height:f,x:p,y:A}))}function eib(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?erG(i):null,a=i?eiu(i):null,u=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(o){case"top":t={x:u,y:n.y-r.height};break;case erj:t={x:u,y:n.y+n.height};break;case erU:t={x:n.x+n.width,y:s};break;case erK:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var l=o?ein(o):null;if(null!=l){var c="y"===l?"height":"width";switch(a){case erP:t[l]=t[l]-(n[c]/2-r[c]/2);break;case"end":t[l]=t[l]+(n[c]/2-r[c]/2)}}return t}function eiC(e,t){void 0===t&&(t={});var n,r,i,o,a,u,s,l,c,d,f=t,p=f.placement,A=void 0===p?e.placement:p,h=f.strategy,m=void 0===h?e.strategy:h,g=f.boundary,y=f.rootBoundary,v=f.elementContext,x=void 0===v?erD:v,b=f.altBoundary,C=f.padding,S=void 0===C?0:C,w=eio("number"!=typeof S?S:eia(S,erB)),I=e.rects.popper,_=e.elements[void 0!==b&&b?x===erD?"reference":erD:x],T=(n=erY(_)?_:_.contextElement||er7(e.elements.popper),c=(l=[].concat("clippingParents"===(r=void 0===g?"clippingParents":g)?(u=eiy(er8(n)),s=["absolute","fixed"].indexOf(er9(n).position)>=0&&erH(n)?eit(n):n,erY(s)?u.filter(function(e){return erY(e)&&er3(e,s)&&"body"!==erV(e)}):[]):[].concat(r),[void 0===y?erW:y]))[0],(d=l.reduce(function(e,t){var r=eix(n,t,m);return e.top=er$(r.top,e.top),e.right=erX(r.right,e.right),e.bottom=erX(r.bottom,e.bottom),e.left=er$(r.left,e.left),e},eix(n,c,m))).width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d),O=er6(e.elements.reference),R=eib({reference:O,element:I,strategy:"absolute",placement:A}),k=eiv(Object.assign({},I,R)),E=x===erD?k:O,M={top:T.top-E.top+w.top,bottom:E.bottom-T.bottom+w.bottom,left:T.left-E.left+w.left,right:E.right-T.right+w.right},F=e.modifiersData.offset;if(x===erD&&F){var j=F[A];Object.keys(M).forEach(function(e){var t=[erU,erj].indexOf(e)>=0?1:-1,n=["top",erj].indexOf(e)>=0?"y":"x";M[e]+=j[n]*t})}return M}function eiS(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function eiw(e){return["top",erU,erj,erK].some(function(t){return e[t]>=0})}var eiI={placement:"bottom",modifiers:[],strategy:"absolute"};function ei_(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}var eiT,eiO,eiR,eik,eiE,eiM,eiF,eij,eiU,eiK,eiL,eiB=(eiM={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,u=void 0===a||a,s=erz(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&l.forEach(function(e){e.addEventListener("scroll",n.update,eic)}),u&&s.addEventListener("resize",n.update,eic),function(){o&&l.forEach(function(e){e.removeEventListener("scroll",n.update,eic)}),u&&s.removeEventListener("resize",n.update,eic)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=eib({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=n.adaptive,o=n.roundOffsets,a=void 0===o||o,u={placement:erG(t.placement),variation:eiu(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,eil(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===i||i,roundOffsets:a})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,eil(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},erJ,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=erq.reduce(function(e,n){var r,i,a,u,s,l,c,d;return e[n]=(i=t.rects,s=[erK,"top"].indexOf(u=erG(n))>=0?-1:1,c=(l="function"==typeof o?o(Object.assign({},i,{placement:n})):o)[0],d=l[1],c=c||0,d=(d||0)*s,[erK,erU].indexOf(u)>=0?{x:d,y:c}:{x:c,y:d}),e},{}),u=a[t.placement],s=u.x,l=u.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,u=void 0===a||a,s=n.fallbackPlacements,l=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,A=void 0===p||p,h=n.allowedAutoPlacements,m=t.options.placement,g=erG(m),y=s||(g!==m&&A?function(e){if(erG(e)===erL)return[];var t=eif(e);return[eiA(e),t,eiA(t)]}(m):[eif(m)]),v=[m].concat(y).reduce(function(e,n){var r,i,o,a,u,s,f,p,m,g,y,v,x,b;return e.concat(erG(n)===erL?(i={placement:n,boundary:c,rootBoundary:d,padding:l,flipVariations:A,allowedAutoPlacements:h},a=(o=i).placement,u=o.boundary,s=o.rootBoundary,f=o.padding,p=o.flipVariations,g=void 0===(m=o.allowedAutoPlacements)?erq:m,0===(x=(v=(y=eiu(a))?p?erN:erN.filter(function(e){return eiu(e)===y}):erB).filter(function(e){return g.indexOf(e)>=0})).length&&(x=v),Object.keys(b=x.reduce(function(e,n){return e[n]=eiC(t,{placement:n,boundary:u,rootBoundary:s,padding:f})[erG(n)],e},{})).sort(function(e,t){return b[e]-b[t]})):n)},[]),x=t.rects.reference,b=t.rects.popper,C=new Map,S=!0,w=v[0],I=0;I<v.length;I++){var _=v[I],T=erG(_),O=eiu(_)===erP,R=["top",erj].indexOf(T)>=0,k=R?"width":"height",E=eiC(t,{placement:_,boundary:c,rootBoundary:d,altBoundary:f,padding:l}),M=R?O?erU:erK:O?erj:"top";x[k]>b[k]&&(M=eif(M));var F=eif(M),j=[];if(o&&j.push(E[T]<=0),u&&j.push(E[M]<=0,E[F]<=0),j.every(function(e){return e})){w=_,S=!1;break}C.set(_,j)}if(S)for(var U=A?3:1,K=function(e){var t=v.find(function(t){var n=C.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,"break"},L=U;L>0&&"break"!==K(L);L--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.options,i=e.name,o=r.mainAxis,a=r.altAxis,u=r.boundary,s=r.rootBoundary,l=r.altBoundary,c=r.padding,d=r.tether,f=void 0===d||d,p=r.tetherOffset,A=void 0===p?0:p,h=eiC(n,{boundary:u,rootBoundary:s,padding:c,altBoundary:l}),m=erG(n.placement),g=eiu(n.placement),y=!g,v=ein(m),x="x"===v?"y":"x",b=n.modifiersData.popperOffsets,C=n.rects.reference,S=n.rects.popper,w="function"==typeof A?A(Object.assign({},n.rects,{placement:n.placement})):A,I="number"==typeof w?{mainAxis:w,altAxis:w}:Object.assign({mainAxis:0,altAxis:0},w),_=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,T={x:0,y:0};if(b){if(void 0===o||o){var O,R="y"===v?"top":erK,k="y"===v?erj:erU,E="y"===v?"height":"width",M=b[v],F=M+h[R],j=M-h[k],U=f?-S[E]/2:0,K=g===erP?C[E]:S[E],L=g===erP?-S[E]:-C[E],B=n.elements.arrow,P=f&&B?er5(B):{width:0,height:0},W=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:eii(),D=W[R],N=W[k],q=eir(0,C[E],P[E]),Q=y?C[E]/2-U-q-D-I.mainAxis:K-q-D-I.mainAxis,V=y?-C[E]/2+U+q+N+I.mainAxis:L+q+N+I.mainAxis,z=n.elements.arrow&&eit(n.elements.arrow),Y=z?"y"===v?z.clientTop||0:z.clientLeft||0:0,H=null!=(O=null==_?void 0:_[v])?O:0,Z=eir(f?erX(F,M+Q-H-Y):F,M,f?er$(j,M+V-H):j);b[v]=Z,T[v]=Z-M}if(void 0!==a&&a){var J,G,$,X,ee,et=b[x],en="y"===x?"height":"width",er=et+h["x"===v?"top":erK],ei=et-h["x"===v?erj:erU],eo=-1!==["top",erK].indexOf(m),ea=null!=(ee=null==_?void 0:_[x])?ee:0,eu=eo?er:et-C[en]-S[en]-ea+I.altAxis,es=eo?et+C[en]+S[en]-ea-I.altAxis:ei,el=f&&eo?(X=eir(eu,et,es))>es?es:X:eir(f?eu:er,et,f?es:ei);b[x]=el,T[x]=el-et}n.modifiersData[i]=T}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,u=erG(n.placement),s=ein(u),l=[erK,erU].indexOf(u)>=0?"height":"width";if(!(!o||!a)){var c,d,f=eio("number"!=typeof(c="function"==typeof(c=i.padding)?c(Object.assign({},n.rects,{placement:n.placement})):c)?c:eia(c,erB)),p=er5(o),A=n.rects.reference[l]+n.rects.reference[s]-a[s]-n.rects.popper[l],h=a[s]-n.rects.reference[s],m=eit(o),g=m?"y"===s?m.clientHeight||0:m.clientWidth||0:0,y=f["y"===s?"top":erK],v=g-p[l]-f["y"===s?erj:erU],x=g/2-p[l]/2+(A/2-h/2),b=eir(y,x,v);n.modifiersData[r]=((t={})[s]=b,t.centerOffset=b-x,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null==r||("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&er3(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=eiC(t,{elementContext:"reference"}),u=eiC(t,{altBoundary:!0}),s=eiS(a,r),l=eiS(u,i,o),c=eiw(s),d=eiw(l);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]},eiU=void 0===(eij=(eiF=eiM).defaultModifiers)?[]:eij,eiL=void 0===(eiK=eiF.defaultOptions)?eiI:eiK,function(e,t,n){void 0===n&&(n=eiL);var r,i,o={placement:"bottom",orderedModifiers:[],options:Object.assign({},eiI,eiL),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],u=!1,s={state:o,setOptions:function(n){var r,i,u,c,d,f,p,A,h="function"==typeof n?n(o.options):n;l(),o.options=Object.assign({},eiL,o.options,h),o.scrollParents={reference:erY(e)?eiy(e):e.contextElement?eiy(e.contextElement):[],popper:eiy(t)};var m=(u=Object.keys(i=(r=[].concat(eiU,o.options.modifiers)).reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{})).map(function(e){return i[e]}),d=new Map,f=new Set,p=[],u.forEach(function(e){d.set(e.name,e)}),u.forEach(function(e){f.has(e.name)||function e(t){f.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!f.has(t)){var n=d.get(t);n&&e(n)}}),p.push(t)}(e)}),erQ.reduce(function(e,t){return e.concat(p.filter(function(e){return e.phase===t}))},[]));return o.orderedModifiers=m.filter(function(e){return e.enabled}),o.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=e.effect;if("function"==typeof r){var i=r({state:o,name:t,instance:s,options:void 0===n?{}:n}),u=function(){};a.push(i||u)}}),s.update()},forceUpdate:function(){if(!u){var e,t,n,r,i,a,l,c,d,f,p,A,h,m,g,y=o.elements,v=y.reference,x=y.popper;if(ei_(v,x)){o.rects={reference:(e=v,t=eit(x),n="fixed"===o.options.strategy,c=erH(t),d=erH(t)&&(a=er0((i=(r=t).getBoundingClientRect()).width)/r.offsetWidth||1,l=er0(i.height)/r.offsetHeight||1,1!==a||1!==l),f=er7(t),p=er6(e,d,n),A={scrollLeft:0,scrollTop:0},h={x:0,y:0},(c||!c&&!n)&&(("body"!==erV(t)||eig(f))&&(A=(m=t)!==erz(m)&&erH(m)?{scrollLeft:(g=m).scrollLeft,scrollTop:g.scrollTop}:eih(m)),erH(t)?(h=er6(t,!0),h.x+=t.clientLeft,h.y+=t.clientTop):f&&(h.x=eim(f))),{x:p.left+A.scrollLeft-h.x,y:p.top+A.scrollTop-h.y,width:p.width,height:p.height}),popper:er5(x)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach(function(e){return o.modifiersData[e.name]=Object.assign({},e.data)});for(var b=0;b<o.orderedModifiers.length;b++){if(!0===o.reset){o.reset=!1,b=-1;continue}var C=o.orderedModifiers[b],S=C.fn,w=C.options,I=void 0===w?{}:w,_=C.name;"function"==typeof S&&(o=S({state:o,options:I,name:_,instance:s})||o)}}}},update:function(){return i||(i=new Promise(function(e){Promise.resolve().then(function(){i=void 0,e(new Promise(function(e){s.forceUpdate(),e(o)}))})})),i},destroy:function(){l(),u=!0}};if(!ei_(e,t))return s;function l(){a.forEach(function(e){return e()}),a=[]}return s.setOptions(n).then(function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)}),s}),eiP="tippy-content",eiW="tippy-arrow",eiD="tippy-svg-arrow",eiN={passive:!0,capture:!0},eiq=function(){return document.body};function eiQ(e,t,n){return Array.isArray(e)?e[t]??(Array.isArray(n)?n[t]:n):e}function eiV(e,t){var n=({}).toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function eiz(e,t){return"function"==typeof e?e.apply(void 0,t):e}function eiY(e,t){var n;return 0===t?e:function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function eiH(e){return[].concat(e)}function eiZ(e,t){-1===e.indexOf(t)&&e.push(t)}function eiJ(e){return[].slice.call(e)}function eiG(e){return Object.keys(e).reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})}function ei$(){return document.createElement("div")}function eiX(e){return["Element","Fragment"].some(function(t){return eiV(e,t)})}function ei0(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function ei1(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function ei2(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[r](t,n)})}function ei6(e,t){for(var n,r=t;r;){if(e.contains(r))return!0;r=null==r.getRootNode||null==(n=r.getRootNode())?void 0:n.host}return!1}var ei5={isTouch:!1},ei3=0;function ei9(){ei5.isTouch||(ei5.isTouch=!0,window.performance&&document.addEventListener("mousemove",ei4))}function ei4(){var e=performance.now();e-ei3<20&&(ei5.isTouch=!1,document.removeEventListener("mousemove",ei4)),ei3=e}function ei7(){var e,t=document.activeElement;if(t&&t._tippy&&t._tippy.reference===t){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var ei8=!!("u">typeof window&&"u">typeof document)&&!!window.msCrypto,eoe=Object.assign({appendTo:eiq,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),eot=Object.keys(eoe),eon=function(e){Object.keys(e).forEach(function(t){eoe[t]=e[t]})};function eor(e){var t=(e.plugins||[]).reduce(function(t,n){var r,i=n.name,o=n.defaultValue;return i&&(t[i]=void 0!==e[i]?e[i]:null!=(r=eoe[i])?r:o),t},{});return Object.assign({},e,t)}function eoi(e,t){var n,r,i=Object.assign({},t,{content:eiz(t.content,[e])},t.ignoreAttributes?{}:((r=t.plugins)?Object.keys(eor(Object.assign({},eoe,{plugins:r}))):eot).reduce(function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch{t[n]=r}return t},{}));return i.aria=Object.assign({},eoe.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?t.interactive:i.aria.expanded,content:"auto"===i.aria.content?t.interactive?null:"describedby":i.aria.content},i}var eoo=function(){return"innerHTML"};function eoa(e,t){e[eoo()]=t}function eou(e){var t=ei$();return!0===e?t.className=eiW:(t.className=eiD,eiX(e)?t.appendChild(e):eoa(t,e)),t}function eos(e,t){eiX(t.content)?(eoa(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?eoa(e,t.content):e.textContent=t.content)}function eol(e){var t=e.firstElementChild,n=eiJ(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(eiP)}),arrow:n.find(function(e){return e.classList.contains(eiW)||e.classList.contains(eiD)}),backdrop:n.find(function(e){return e.classList.contains("tippy-backdrop")})}}function eoc(e){var t=ei$(),n=ei$();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=ei$();function i(n,r){var i=eol(t),o=i.box,a=i.content,u=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),(n.content!==r.content||n.allowHTML!==r.allowHTML)&&eos(a,e.props),r.arrow?u?n.arrow!==r.arrow&&(o.removeChild(u),o.appendChild(eou(r.arrow))):o.appendChild(eou(r.arrow)):u&&o.removeChild(u)}return r.className=eiP,r.setAttribute("data-state","hidden"),eos(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}eoc.$$tippy=!0;var eod=1,eof=[],eop=[];function eoA(e,t){void 0===t&&(t={});var n,r,i=eoe.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",ei9,eiN),window.addEventListener("blur",ei7);var o,a=Object.assign({},t,{plugins:i}),u=(eiX(e)?[e]:eiV(e,"NodeList")?eiJ(e):Array.isArray(e)?e:eiJ(document.querySelectorAll(e))).reduce(function(e,t){var n=t&&function(e,t){var n,r,i,o,a,u,s,l,c=eoi(e,Object.assign({},eoe,eor(eiG(t)))),d=!1,f=!1,p=!1,A=!1,h=[],m=eiY(Y,c.interactiveDebounce),g=eod++,y=(n=c.plugins).filter(function(e,t){return n.indexOf(e)===t}),v={id:g,reference:e,popper:ei$(),popperInstance:null,props:c,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)},setProps:function(t){if(!v.state.isDestroyed){F("onBeforeUpdate",[v,t]),V();var n=v.props,r=eoi(e,Object.assign({},n,eiG(t),{ignoreAttributes:!0}));v.props=r,Q(),n.interactiveDebounce!==r.interactiveDebounce&&(K(),m=eiY(Y,r.interactiveDebounce)),n.triggerTarget&&!r.triggerTarget?eiH(n.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):r.triggerTarget&&e.removeAttribute("aria-expanded"),U(),M(),C&&C(n,r),v.popperInstance&&(G(),X().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})),F("onAfterUpdate",[v,t])}},setContent:function(e){v.setProps({content:e})},show:function(){var e=v.state.isVisible,t=v.state.isDestroyed,n=!v.state.isEnabled,r=ei5.isTouch&&!v.props.touch,i=eiQ(v.props.duration,0,eoe.duration);if(!(e||t||n||r)&&!O().hasAttribute("disabled")&&(F("onShow",[v],!1),!1!==v.props.onShow(v))){if(v.state.isVisible=!0,T()&&(b.style.visibility="visible"),M(),W(),v.state.isMounted||(b.style.transition="none"),T()){var o,a,u,l,c=k();ei0([c.box,c.content],0)}s=function(){var e;if(!(!v.state.isVisible||A)){if(A=!0,b.offsetHeight,b.style.transition=v.props.moveTransition,T()&&v.props.animation){var t,n,r=k(),o=r.box,a=r.content;ei0([o,a],i),ei1([o,a],"visible")}j(),U(),eiZ(eop,v),null==(e=v.popperInstance)||e.forceUpdate(),F("onMount",[v]),v.props.animation&&T()&&N(i,n=function(){v.state.isShown=!0,F("onShown",[v])})}},a=v.props.appendTo,u=O(),(o=v.props.interactive&&a===eiq||"parent"===a?u.parentNode:eiz(a,[u])).contains(b)||o.appendChild(b),v.state.isMounted=!0,G()}},hide:function(){var e=!v.state.isVisible,t=v.state.isDestroyed,n=!v.state.isEnabled,r=eiQ(v.props.duration,1,eoe.duration);if(!(e||t||n)&&(F("onHide",[v],!1),!1!==v.props.onHide(v))){if(v.state.isVisible=!1,v.state.isShown=!1,A=!1,d=!1,T()&&(b.style.visibility="hidden"),K(),D(),M(!0),T()){var i,o,a=k(),u=a.box,s=a.content;v.props.animation&&(ei0([u,s],r),ei1([u,s],"hidden"))}j(),U(),v.props.animation?T()&&(o=v.unmount,N(r,function(){!v.state.isVisible&&b.parentNode&&b.parentNode.contains(b)&&o()})):v.unmount()}},hideWithInteractivity:function(e){R().addEventListener("mousemove",m),eiZ(eof,m),m(e)},enable:function(){v.state.isEnabled=!0},disable:function(){v.hide(),v.state.isEnabled=!1},unmount:function(){v.state.isVisible&&v.hide(),v.state.isMounted&&($(),X().forEach(function(e){e._tippy.unmount()}),b.parentNode&&b.parentNode.removeChild(b),eop=eop.filter(function(e){return e!==v}),v.state.isMounted=!1,F("onHidden",[v]))},destroy:function(){v.state.isDestroyed||(v.clearDelayTimeouts(),v.unmount(),V(),delete e._tippy,v.state.isDestroyed=!0,F("onDestroy",[v]))}};if(!c.render)return v;var x=c.render(v),b=x.popper,C=x.onUpdate;b.setAttribute("data-tippy-root",""),b.id="tippy-"+v.id,v.popper=b,e._tippy=v,b._tippy=v;var S=y.map(function(e){return e.fn(v)}),w=e.hasAttribute("aria-expanded");return Q(),U(),M(),F("onCreate",[v]),c.showOnCreate&&ee(),b.addEventListener("mouseenter",function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()}),b.addEventListener("mouseleave",function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&R().addEventListener("mousemove",m)}),v;function I(){var e=v.props.touch;return Array.isArray(e)?e:[e,0]}function _(){return"hold"===I()[0]}function T(){var e;return!!(null!=(e=v.props.render)&&e.$$tippy)}function O(){return l||e}function R(){var e,t,n,r=O().parentNode;return r&&null!=(n=eiH(r)[0])&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function k(){return eol(b)}function E(e){return v.state.isMounted&&!v.state.isVisible||ei5.isTouch||a&&"focus"===a.type?0:eiQ(v.props.delay,e?0:1,eoe.delay)}function M(e){void 0===e&&(e=!1),b.style.pointerEvents=v.props.interactive&&!e?"":"none",b.style.zIndex=""+v.props.zIndex}function F(e,t,n){if(void 0===n&&(n=!0),S.forEach(function(n){n[e]&&n[e].apply(n,t)}),n){var r;(r=v.props)[e].apply(r,t)}}function j(){var t=v.props.aria;if(t.content){var n="aria-"+t.content,r=b.id;eiH(v.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if(v.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}})}}function U(){!(w||!v.props.aria.expanded)&&eiH(v.props.triggerTarget||e).forEach(function(e){v.props.interactive?e.setAttribute("aria-expanded",v.state.isVisible&&e===O()?"true":"false"):e.removeAttribute("aria-expanded")})}function K(){R().removeEventListener("mousemove",m),eof=eof.filter(function(e){return e!==m})}function L(t){if(!(ei5.isTouch&&(p||"mousedown"===t.type))){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!(v.props.interactive&&ei6(b,n))){if(eiH(v.props.triggerTarget||e).some(function(e){return ei6(e,n)})){if(ei5.isTouch||v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[v,t]);!0===v.props.hideOnClick&&(v.clearDelayTimeouts(),v.hide(),f=!0,setTimeout(function(){f=!1}),v.state.isMounted||D())}}}function B(){p=!0}function P(){p=!1}function W(){var e=R();e.addEventListener("mousedown",L,!0),e.addEventListener("touchend",L,eiN),e.addEventListener("touchstart",P,eiN),e.addEventListener("touchmove",B,eiN)}function D(){var e=R();e.removeEventListener("mousedown",L,!0),e.removeEventListener("touchend",L,eiN),e.removeEventListener("touchstart",P,eiN),e.removeEventListener("touchmove",B,eiN)}function N(e,t){var n=k().box;function r(e){e.target===n&&(ei2(n,"remove",r),t())}if(0===e)return t();ei2(n,"remove",u),ei2(n,"add",r),u=r}function q(t,n,r){void 0===r&&(r=!1),eiH(v.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,r),h.push({node:e,eventType:t,handler:n,options:r})})}function Q(){var e;_()&&(q("touchstart",z,{passive:!0}),q("touchend",H,{passive:!0})),(e=v.props.trigger).split(/\s+/).filter(Boolean).forEach(function(e){if("manual"!==e)switch(q(e,z),e){case"mouseenter":q("mouseleave",H);break;case"focus":q(ei8?"focusout":"blur",Z);break;case"focusin":q("focusout",Z)}})}function V(){h.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)}),h=[]}function z(e){var t,n=!1;if(!(!v.state.isEnabled||J(e)||f)){var r,i=(null==(t=a)?void 0:t.type)==="focus";a=e,l=e.currentTarget,U(),!v.state.isVisible&&eiV(e,"MouseEvent")&&eof.forEach(function(t){return t(e)}),"click"===e.type&&(0>v.props.trigger.indexOf("mouseenter")||d)&&!1!==v.props.hideOnClick&&v.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!i&&et(e)}}function Y(e){var t,n,r,i,o=e.target,a=O().contains(o)||b.contains(o);!("mousemove"===e.type&&a)&&(t=X().concat(b).map(function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:c}:null}).filter(Boolean),r=(n=e).clientX,i=n.clientY,t.every(function(e){var t,n=e.popperRect,o=e.popperState,a=e.props.interactiveBorder,u=(t=o.placement).split("-")[0],s=o.modifiersData.offset;if(!s)return!0;var l="bottom"===u?s.top.y:0,c="top"===u?s.bottom.y:0,d="right"===u?s.left.x:0,f="left"===u?s.right.x:0,p=n.top-i+l>a,A=i-n.bottom-c>a,h=n.left-r+d>a,m=r-n.right-f>a;return p||A||h||m})&&(K(),et(e)))}function H(e){if(!(J(e)||v.props.trigger.indexOf("click")>=0&&d)){if(v.props.interactive){v.hideWithInteractivity(e);return}et(e)}}function Z(e){0>v.props.trigger.indexOf("focusin")&&e.target!==O()||v.props.interactive&&e.relatedTarget&&b.contains(e.relatedTarget)||et(e)}function J(e){return!!ei5.isTouch&&_()!==e.type.indexOf("touch")>=0}function G(){$();var t=v.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,u=T()?eol(b).arrow:null,l=o?{getBoundingClientRect:o,contextElement:o.contextElement||O()}:e,c=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(T()){var n=k().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)}),t.attributes.popper={}}}}];T()&&u&&c.push({name:"arrow",options:{element:u,padding:3}}),c.push.apply(c,(null==n?void 0:n.modifiers)||[]),v.popperInstance=eiB(l,b,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:c}))}function $(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function X(){return eiJ(b.querySelectorAll("[data-tippy-root]"))}function ee(e){v.clearDelayTimeouts(),e&&F("onTrigger",[v,e]),W();var t=E(!0),n=I(),i=n[0],o=n[1];ei5.isTouch&&"hold"===i&&o&&(t=o),t?r=setTimeout(function(){v.show()},t):v.show()}function et(e){if(v.clearDelayTimeouts(),F("onUntrigger",[v,e]),!v.state.isVisible){D();return}if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=E(!1);t?i=setTimeout(function(){v.state.isVisible&&v.hide()},t):o=requestAnimationFrame(function(){v.hide()})}}}(t,a);return n&&e.push(n),e},[]);return eiX(e)?u[0]:u}eoA.defaultProps=eoe,eoA.setDefaultProps=eon,eoA.currentInput=ei5,Object.assign({},erJ,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),eoA.setDefaultProps({render:eoc});class eoh{constructor({editor:e,element:t,view:n,tippyOptions:r={},updateDelay:i=250,shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:e,state:t,from:n,to:r})=>{let{doc:i,selection:o}=t,{empty:a}=o,u=!i.textBetween(n,r).length&&enl(t.selection),s=this.element.contains(document.activeElement);return!(!(e.hasFocus()||s)||a||u||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{var t;if(this.preventHide){this.preventHide=!1;return}null!=e&&e.relatedTarget&&!(null===(t=this.element.parentNode)||void 0===t)&&t.contains(e.relatedTarget)||this.hide()},this.tippyBlurHandler=e=>{this.blurHandler({event:e})},this.handleDebouncedUpdate=(e,t)=>{let n=!(null!=t&&t.selection.eq(e.state.selection)),r=!(null!=t&&t.doc.eq(e.state.doc));(n||r)&&(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(e,n,r,t)},this.updateDelay))},this.updateHandler=(e,t,n,r)=>{var i,o,a;let{state:u,composing:s}=e,{selection:l}=u;if(s||!t&&!n)return;this.createTooltip();let{ranges:c}=l,d=Math.min(...c.map(e=>e.$from.pos)),f=Math.max(...c.map(e=>e.$to.pos));if(!(null===(i=this.shouldShow)||void 0===i?void 0:i.call(this,{editor:this.editor,view:e,state:u,oldState:r,from:d,to:f}))){this.hide();return}null===(o=this.tippy)||void 0===o||o.setProps({getReferenceClientRect:(null===(a=this.tippyOptions)||void 0===a?void 0:a.getReferenceClientRect)||(()=>{var t;if((t=u.selection)instanceof $X){let n=e.nodeDOM(d),r=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");if(r&&(n=r.firstChild),n)return n.getBoundingClientRect()}return function(e,t,n){let r=e.state.doc.content.size,i=enc(t,0,r),o=enc(n,0,r),a=e.coordsAtPos(i),u=e.coordsAtPos(o,-1),s=Math.min(a.top,u.top),l=Math.max(a.bottom,u.bottom),c=Math.min(a.left,u.left),d=Math.max(a.right,u.right),f={top:s,bottom:l,left:c,right:d,width:d-c,height:l-s,x:c,y:s};return{...f,toJSON:()=>f}}(e,d,f)})}),this.show()},this.editor=e,this.element=t,this.view=n,this.updateDelay=i,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){let{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=eoA(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){let{state:n}=e,r=n.selection.$from.pos!==n.selection.$to.pos;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let i=!(null!=t&&t.selection.eq(e.state.selection)),o=!(null!=t&&t.doc.eq(e.state.doc));this.updateHandler(e,i,o,t)}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e,t;!(null===(e=this.tippy)||void 0===e)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}let eom=e=>new $4({key:"string"==typeof e.pluginKey?new Xe(e.pluginKey):e.pluginKey,view:t=>new eoh({view:t,...e})});etX.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[eom({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});let eog=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},eoy=({renderers:e})=>c.createElement(c.Fragment,null,Object.entries(e).map(([e,t])=>C.createPortal(t.reactElement,t.element,e)));class eov extends c.Component{constructor(e){super(e),this.editorContentRef=c.createRef(),this.initialized=!1,this.state={renderers:{}}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let{editor:e}=this.props;if(e&&e.options.element){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.options.element.childNodes),e.setOptions({element:t}),e.contentComponent=this,e.createNodeViews(),this.initialized=!0}}maybeFlushSync(e){this.initialized?(0,C.flushSync)(e):e()}setRenderer(e,t){this.maybeFlushSync(()=>{this.setState(({renderers:n})=>({renderers:{...n,[e]:t}}))})}removeRenderer(e){this.maybeFlushSync(()=>{this.setState(({renderers:t})=>{let n={...t};return delete n[e],{renderers:n}})})}componentWillUnmount(){let{editor:e}=this.props;if(!e||(this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null,!e.options.element.firstChild))return;let t=document.createElement("div");t.append(...e.options.element.childNodes),e.setOptions({element:t})}render(){let{editor:e,innerRef:t,...n}=this.props;return c.createElement(c.Fragment,null,c.createElement("div",{ref:eog(t,this.editorContentRef),...n}),c.createElement(eoy,{renderers:this.state.renderers}))}}let eox=(0,c.forwardRef)((e,t)=>{let n=c.useMemo(()=>Math.floor(4294967295*Math.random()).toString(),[e.editor]);return c.createElement(eov,{key:n,innerRef:t,...e})}),eob=c.memo(eox),eoC=(0,c.createContext)({editor:null});eoC.Consumer;let eoS=()=>(0,c.useContext)(eoC),eow=e=>{let[t,n]=(0,c.useState)(null),{editor:r}=eoS();return(0,c.useEffect)(()=>{var n;if(!t||!(null===(n=e.editor)||void 0===n)&&n.isDestroyed||null!=r&&r.isDestroyed)return;let{pluginKey:i="bubbleMenu",editor:o,tippyOptions:a={},updateDelay:u,shouldShow:s=null}=e,l=o||r;if(!l){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}let c=eom({updateDelay:u,editor:l,element:t,pluginKey:i,shouldShow:s,tippyOptions:a});return l.registerPlugin(c),()=>l.unregisterPlugin(i)},[e.editor,r,t]),c.createElement("div",{ref:n,className:e.className,style:{visibility:"hidden"}},e.children)},eoI=(0,c.createContext)({onDragStart:void 0}),eo_=()=>(0,c.useContext)(eoI),eoT=c.forwardRef((e,t)=>{let{onDragStart:n}=eo_(),r=e.as||"div";return c.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});class eoO{constructor(e,{editor:t,props:n={},as:r="div",className:i="",attrs:o}){this.ref=null,this.id=Math.floor(4294967295*Math.random()).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),o&&Object.keys(o).forEach(e=>{this.element.setAttribute(e,o[e])}),this.render()}render(){var e,t,n,r,i;let o=this.component,a=this.props;("function"==typeof o&&o.prototype&&o.prototype.isReactComponent||"object"==typeof o&&(null===(i=o.$$typeof)||void 0===i?void 0:i.toString())==="Symbol(react.forward_ref)")&&(a.ref=e=>{this.ref=e}),this.reactElement=c.createElement(o,{...a}),null===(t=null===(e=this.editor)||void 0===e?void 0:e.contentComponent)||void 0===t||t.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e,t;null===(t=null===(e=this.editor)||void 0===e?void 0:e.contentComponent)||void 0===t||t.removeRenderer(this.id)}}class eoR extends erA{mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){var t;this.component.displayName=(t=this.extension.name).charAt(0).toUpperCase()+t.substring(1)}let n=e=>{let t=this.component,n=this.onDragStart.bind(this),r=e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&e.appendChild(this.contentDOMElement)};return c.createElement(c.Fragment,null,c.createElement(eoI.Provider,{value:{onDragStart:n,nodeViewContentRef:r}},c.createElement(t,{...e})))};n.displayName="ReactNodeView",this.node.isLeaf?this.contentDOMElement=null:this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit");let r=this.node.isInline?"span":"div";this.options.as&&(r=this.options.as);let{className:i=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new eoO(n,{editor:this.editor,props:e,as:r,className:`node-${this.node.type.name} ${i}`.trim(),attrs:this.options.attrs})}get dom(){var e;if(this.renderer.element.firstElementChild&&!(!(null===(e=this.renderer.element.firstElementChild)||void 0===e)&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){let{from:e,to:t}=this.editor.state.selection;if(e<=this.getPos()&&t>=this.getPos()+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(e,t){let n=e=>{this.renderer.updateProps(e)};if(e.type!==this.node.type)return!1;if("function"==typeof this.options.update){let r=this.node,i=this.decorations;return this.node=e,this.decorations=t,this.options.update({oldNode:r,oldDecorations:i,newNode:e,newDecorations:t,updateProps:()=>n({node:e,decorations:t})})}return e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,n({node:e,decorations:t})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}}function eok(e,t){return n=>n.editor.contentComponent?new eoR(e,n,t):{}}let eoE=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,eoM=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,eoF=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,eoj=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,eoU=erf.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],renderHTML({HTMLAttributes:e}){return["strong",etj(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[erl({find:eoE,type:this.type}),erl({find:eoF,type:this.type})]},addPasteRules(){return[erh({find:eoM,type:this.type}),erh({find:eoj,type:this.type})]}});var eoK,eoL,eoB=((eoK=eoB||{}).Document="document",eoK.Mark="mark",eoK.Node="node",eoK),eoP=((eoL=eoP||{}).Text="text",eoL.Embed="embed",eoL.Image="image",eoL);class eoW{constructor(e,t,n,r,i,o=!1){_(this,"extType","node"),_(this,"nodeType","text"),this.richTextNodeTypes=e,this.name=t,this.component=n,this.converter=r,this.placeholder=i,this.lockedFormat=o}}function eoD(e){return e instanceof eoW}class eoN extends eoW{constructor(e,t,n,r,i){super(e,"heading",t,r,i),this.levels=n}}class eoq extends eoW{constructor(e,t,n,r){super(e,t,n,r)}}function eoQ(e){return e instanceof eoq}let eoV=erp.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",etj(this.options.HTMLAttributes,e)]},renderText:()=>`
18
+ `,addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:o}=this.options,{splittableMarks:a}=r.extensionManager,u=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&u&&o){let n=u.filter(e=>a.includes(e.type.name));e.ensureMarks(n)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),eoz={isHardBreak:e=>e.type.name===eoV.name,children:{reduce(e,t,n){let r=n;return e.forEach((e,n,i)=>{r=t(r,e,i)}),r},map(e,t){return this.reduce(e,(e,n)=>[...e,t(n)],[])},exists(e,t){return this.reduce(e,(e,n)=>e||t(n),!1)},filter(e,t){return this.reduce(e,(e,n)=>[...e,...t(n)?[n]:[]],[])}},marks:{reduce(e,t,n){let r=n;return e.marks.forEach((e,n)=>{r=t(r,e,n)}),r},map(e,t){return this.reduce(e,(e,n)=>[...e,t(n)],[])},filter(e,t){return this.reduce(e,(e,n)=>[...e,...t(n)?[n]:[]],[])}}};function eoY(){return{extensions:esq(),defaultTextConverter:void 0}}let eoH=eoU.extend({name:"bold"}),eoZ=new class{constructor(e,t,n){_(this,"extType",eoB.Mark),_(this,"richTextNodeTypes",NW.RichTextNodeType.strong),this.name=e,this.component=t,this.converter=n}}(eoH.name,eoH,{fromPrismic:e=>function(){var t;return null==(t=e.marks[eoH.name])?void 0:t.create()},toPrismic(){}}),eoJ=erp.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",etj(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),eoG=erf.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",etj(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{let n=enz(e,this.type);return!!Object.entries(n).some(([,e])=>!!e)||t.unsetMark(this.name)}}}}),eo$=/^\s*([-+*])\s$/,eoX=erp.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",etj(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(eoJ.name,this.editor.getAttributes(eoG.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=erd({find:eo$,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=erd({find:eo$,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(eoG.name),editor:this.editor})),[e]}}),eo0=erp.create({name:"doc",topNode:!0,content:"block+"}),eo1=erp.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",etj(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),eo2=eo1.extend({name:"listItem",content:"paragraph*",addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name)}}}),eo6={component:eo2,converter:{fromPrismic:e=>function(t){var n;let r=euX.converter.fromPrismic(e)(t);if(r)return null==(n=e.nodes[eo2.name])?void 0:n.create({},r)},toPrismic:(e,t)=>eoz.children.reduce(e,(e,n)=>{let r=euX.converter.toPrismic(n),i=r instanceof Array?r.map(e=>({...e,type:t})):r?[{...r,type:t}]:[];return[...e,...i]},[])},placeholder:"List"},eo5="document",eo3=e=>eo0.extend({name:eo5,content:e?"block+":"block"}),eo9=e=>({fromPrismic(t,n){function r(e,t){return!t&&n&&R.TextBlock.is(e)?n(e):t}return function(n){var i;let o=n.value.reduce((n,i)=>{let o=e.find(e=>e.richTextNodeTypes.includes(i.type)),a=function(e){let{extension:t,block:n,schema:r}=e;if(t)switch(t.nodeType){case eoP.Embed:return R.EmbedBlock.is(n)?t.converter.fromPrismic(r)(n):void 0;case eoP.Text:return R.TextBlock.is(n)?t.converter.fromPrismic(r)(n):void 0;case eoP.Image:return R.ImageBlock.is(n)?t.converter.fromPrismic(r)(n):void 0}}({extension:o,block:i,schema:t}),u=n.slice(0,n.length-1),s=(0,g.Z$)(n),l=function(e){var t,n;let{node:r,block:i,nodeWithDefault:o,previousNode:a}=e;return r&&a?r.type.name===a.type.name&&(r.type.name===eu7.name||r.type.name===esD.name)?{merged:!0,updatedNode:a.copy(a.content.append(r.content))}:{merged:!1,updatedNode:o(i,r)}:{merged:!1,updatedNode:r}}({node:a,block:i,nodeWithDefault:r,previousNode:s});return l.updatedNode?[...l.merged?u:n,l.updatedNode]:n},[]);return null==(i=t.nodes[eo5])?void 0:i.create({},o)}},toPrismic:t=>({__TYPE__:"StructuredTextContent",value:[...eoz.children.reduce(t,(t,n)=>{let r=Object.values(e).find(e=>n.type.name===e.name),i=null==r?void 0:r.converter.toPrismic(n);return i||console.warn(`Cannot convert node of type '${n.type.name}'.`),i?[...t,...i instanceof Array?i:[i]]:t},[])]})}),eo4=new class{constructor(e,t,n){_(this,"extType","document"),this.name=e,this.component=t,this.converter=n}}(eo5,eo3,eo9),eo7=eoV.extend({name:"hard_break"}),eo8=`
19
+ `,eae={fromPrismic:e=>function(t){var n;if(t===eo8)return null==(n=e.nodes[eo7.name])?void 0:n.create({})},toPrismic(e){if(e.type.name===eo7.name)return eo8}},eat={isEmptyLine:e=>0===e.length,isFirst:e=>0===e},ean={name:eo7.name,component:eo7,converter:eae,splitTextToNodes:function(e,t){return function(n){let r=eae.fromPrismic(e)(eo8);if(!r)return[n(t)];let i=t.split(eo8);return 1===i.length?t.length?[n(t)]:[r]:i.reduce((e,t,i)=>eat.isFirst(i)?eat.isEmptyLine(t)?e:[...e,n(t)]:eat.isEmptyLine(t)?[...e,r]:[...e,r,n(t)],[])}}},ear=etX.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,considerAnyAsEmpty:!1,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new $4({key:new Xe("placeholder"),props:{decorations:({doc:e,selection:t})=>{var n;let r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=t,o=[];if(!r)return null;let{firstChild:a}=e.content,u=a&&a.type.isLeaf,s=a&&a.isAtom,l=!!this.options.considerAnyAsEmpty||a&&a.type.name===(null===(n=e.type.contentMatch.defaultType)||void 0===n?void 0:n.name),c=e.content.childCount<=1&&a&&l&&a.nodeSize<=2&&(!u||!s);return e.descendants((e,t)=>{let n=i>=t&&i<=t+e.nodeSize,r=!e.isLeaf&&!e.childCount;if((n||!this.options.showOnlyCurrent)&&r){let a=[this.options.emptyNodeClass];c&&a.push(this.options.emptyEditorClass);let u=eev.node(t,t+e.nodeSize,{class:a.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:t,hasAnchor:n}):this.options.placeholder});o.push(u)}return this.options.includeChildren}),eeC.create(e,o)}}})]}}),eai=e=>ear.configure({includeChildren:!0,placeholder:t=>(function({props:e,params:t}){var n;let{editor:r,hasAnchor:i,node:o}=e,{placeholderByNodeType:a,unfocusedPlaceholder:u,nodeExtensions:s}=t,l=!eoz.children.exists(r.state.doc,e=>e===o),c=r.isEditable,d=r.isFocused&&i,f=o.type.name!==euX.name,p=d||f||l,A=s.length>1,h=function(){if(l)return eo6.placeholder;let e=a[o.type.name];return"string"==typeof e?e:null==e?void 0:e(o.attrs)}();return u&&!d&&r.isEmpty?u:("Type '/' for commands"===h?c&&p&&A:c&&p)&&h||""})({props:t,params:e}),showOnlyCurrent:!1,showOnlyWhenEditable:!1});function eao(e){return e.split("-")[1]}function eaa(e){return"y"===e?"height":"width"}function eau(e){return e.split("-")[0]}function eas(e){return["top","bottom"].includes(eau(e))?"x":"y"}function eal(e,t,n){let{reference:r,floating:i}=e,o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,u=eas(t),s=eaa(u),l=r[s]/2-i[s]/2,c="x"===u,d;switch(eau(t)){case"top":d={x:o,y:r.y-i.height};break;case"bottom":d={x:o,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-i.width,y:a};break;default:d={x:r.x,y:r.y}}switch(eao(t)){case"start":d[u]-=l*(n&&c?-1:1);break;case"end":d[u]+=l*(n&&c?-1:1)}return d}let eac=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=o.filter(Boolean),s=await (null==a.isRTL?void 0:a.isRTL(t)),l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=eal(l,r,s),f=r,p={},A=0;for(let h=0;h<u.length;h++){let{name:m,fn:g}=u[h],{x:y,y:v,data:x,reset:b}=await g({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});c=y??c,d=v??d,p={...p,[m]:{...p[m],...x}},b&&A<=50&&(A++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(l=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):b.rects),{x:c,y:d}=eal(l,f,s)),h=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}};function ead(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function eaf(e,t){var n,r,i;void 0===t&&(t={});let{x:o,y:a,platform:u,rects:s,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:A=!1,padding:h=0}=t,m="number"!=typeof h?{top:0,right:0,bottom:0,left:0,...h}:{top:h,right:h,bottom:h,left:h},g=l[A?"floating"===p?"reference":"floating":p],y=ead(await u.getClippingRect({element:null==(n=await (null==u.isElement?void 0:u.isElement(g)))||n?g:g.contextElement||await (null==u.getDocumentElement?void 0:u.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:c})),v="floating"===p?{...s.floating,x:o,y:a}:s.reference,x=await (null==u.getOffsetParent?void 0:u.getOffsetParent(l.floating)),b=await (null==u.isElement?void 0:u.isElement(x))&&await (null==u.getScale?void 0:u.getScale(x))||{x:1,y:1},C=ead(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:x,strategy:c}):v);return{top:(y.top-C.top+m.top)/b.y,bottom:(C.bottom-y.bottom+m.bottom)/b.y,left:(y.left-C.left+m.left)/b.x,right:(C.right-y.right+m.right)/b.x}}let eap=Math.min,eaA=Math.max;function eah(e,t,n){return eaA(e,eap(t,n))}["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);let eam={left:"right",right:"left",bottom:"top",top:"bottom"};function eag(e){return e.replace(/left|right|bottom|top/g,e=>eam[e])}let eay={start:"end",end:"start"};function eav(e){return e.replace(/start|end/g,e=>eay[e])}function eax(e){return"x"===e?"y":"x"}function eab(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function eaC(e){return eab(e).getComputedStyle(e)}let eaS=Math.min,eaw=Math.max,eaI=Math.round;function ea_(e){let t=eaC(e),n=parseFloat(t.width),r=parseFloat(t.height),i=e.offsetWidth,o=e.offsetHeight,a=eaI(n)!==i||eaI(r)!==o;return a&&(n=i,r=o),{width:n,height:r,fallback:a}}function eaT(e){return eaM(e)?(e.nodeName||"").toLowerCase():""}let eaO;function eaR(){if(eaO)return eaO;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?eaO=e.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function eak(e){return e instanceof eab(e).HTMLElement}function eaE(e){return e instanceof eab(e).Element}function eaM(e){return e instanceof eab(e).Node}function eaF(e){return!(typeof ShadowRoot>"u")&&(e instanceof eab(e).ShadowRoot||e instanceof ShadowRoot)}function eaj(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=eaC(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function eaU(e){return["table","td","th"].includes(eaT(e))}function eaK(e){let t=/firefox/i.test(eaR()),n=eaC(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some(e=>n.willChange.includes(e))||["paint","layout","strict","content"].some(e=>{let t=n.contain;return null!=t&&t.includes(e)})}function eaL(){return/^((?!chrome|android).)*safari/i.test(eaR())}function eaB(e){return["html","body","#document"].includes(eaT(e))}function eaP(e){return eaE(e)?e:e.contextElement}let eaW={x:1,y:1};function eaD(e){let t=eaP(e);if(!eak(t))return eaW;let n=t.getBoundingClientRect(),{width:r,height:i,fallback:o}=ea_(t),a=(o?eaI(n.width):n.width)/r,u=(o?eaI(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),u&&Number.isFinite(u)||(u=1),{x:a,y:u}}function eaN(e,t,n,r){var i,o;void 0===t&&(t=!1),void 0===n&&(n=!1);let a=e.getBoundingClientRect(),u=eaP(e),s=eaW;t&&(r?eaE(r)&&(s=eaD(r)):s=eaD(e));let l=u?eab(u):window,c=eaL()&&n,d=(a.left+(c&&(null==(i=l.visualViewport)?void 0:i.offsetLeft)||0))/s.x,f=(a.top+(c&&(null==(o=l.visualViewport)?void 0:o.offsetTop)||0))/s.y,p=a.width/s.x,A=a.height/s.y;if(u){let h=eab(u),m=r&&eaE(r)?eab(r):r,g=h.frameElement;for(;g&&r&&m!==h;){let y=eaD(g),v=g.getBoundingClientRect(),x=getComputedStyle(g);v.x+=(g.clientLeft+parseFloat(x.paddingLeft))*y.x,v.y+=(g.clientTop+parseFloat(x.paddingTop))*y.y,d*=y.x,f*=y.y,p*=y.x,A*=y.y,d+=v.x,f+=v.y,g=eab(g).frameElement}}return{width:p,height:A,top:f,right:d+p,bottom:f+A,left:d,x:d,y:f}}function eaq(e){return((eaM(e)?e.ownerDocument:e.document)||window.document).documentElement}function eaQ(e){return eaE(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function eaV(e){return eaN(eaq(e)).left+eaQ(e).scrollLeft}function eaz(e){if("html"===eaT(e))return e;let t=e.assignedSlot||e.parentNode||eaF(e)&&e.host||eaq(e);return eaF(t)?t.host:t}function eaY(e,t){var n;void 0===t&&(t=[]);let r=function e(t){let n=eaz(t);return eaB(n)?n.ownerDocument.body:eak(n)&&eaj(n)?n:e(n)}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=eab(r);return i?t.concat(o,o.visualViewport||[],eaj(r)?r:[]):t.concat(r,eaY(r))}function eaH(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=eab(e),r=eaq(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,u=0,s=0;if(i){o=i.width,a=i.height;let l=eaL();(!l||l&&"fixed"===t)&&(u=i.offsetLeft,s=i.offsetTop)}return{width:o,height:a,x:u,y:s}}(e,n);else if("document"===t)r=function(e){let t=eaq(e),n=eaQ(e),r=e.ownerDocument.body,i=eaw(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=eaw(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+eaV(e),u=-n.scrollTop;return"rtl"===eaC(r).direction&&(a+=eaw(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}(eaq(e));else if(eaE(t))r=function(e,t){let n=eaN(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=eak(e)?eaD(e):{x:1,y:1};return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{let i={...t};if(eaL()){var o,a;let u=eab(e);i.x-=(null==(o=u.visualViewport)?void 0:o.offsetLeft)||0,i.y-=(null==(a=u.visualViewport)?void 0:a.offsetTop)||0}r=i}return ead(r)}function eaZ(e,t){return eak(e)&&"fixed"!==eaC(e).position?t?t(e):e.offsetParent:null}function eaJ(e,t){let n=eab(e),r=eaZ(e,t);for(;r&&eaU(r)&&"static"===eaC(r).position;)r=eaZ(r,t);return r&&("html"===eaT(r)||"body"===eaT(r)&&"static"===eaC(r).position&&!eaK(r))?n:r||function(e){let t=eaz(e);for(;eak(t)&&!eaB(t);){if(eaK(t))return t;t=eaz(t)}return null}(e)||n}let eaG={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,o="clippingAncestors"===n?function(e,t){let n=t.get(e);if(n)return n;let r=eaY(e).filter(e=>eaE(e)&&"body"!==eaT(e)),i=null,o="fixed"===eaC(e).position,a=o?eaz(e):e;for(;eaE(a)&&!eaB(a);){let u=eaC(a),s=eaK(a);"fixed"===u.position?i=null:(o?s||i:s||"static"!==u.position||!i||!["absolute","fixed"].includes(i.position))?i=u:r=r.filter(e=>e!==a),a=eaz(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...o,r],u=a[0],s=a.reduce((e,n)=>{let r=eaH(t,n,i);return e.top=eaw(r.top,e.top),e.right=eaS(r.right,e.right),e.bottom=eaS(r.bottom,e.bottom),e.left=eaw(r.left,e.left),e},eaH(t,u,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=eak(n),o=eaq(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},u={x:1,y:1},s={x:0,y:0};if((i||!i&&"fixed"!==r)&&(("body"!==eaT(n)||eaj(o))&&(a=eaQ(n)),eak(n))){let l=eaN(n);u=eaD(n),s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-a.scrollLeft*u.x+s.x,y:t.y*u.y-a.scrollTop*u.y+s.y}},isElement:eaE,getDimensions:function(e){return eak(e)?ea_(e):e.getBoundingClientRect()},getOffsetParent:eaJ,getDocumentElement:eaq,getScale:eaD,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e,i=this.getOffsetParent||eaJ,o=this.getDimensions;return{reference:function(e,t,n){let r=eak(t),i=eaq(t),o=eaN(e,!0,"fixed"===n,t),a={scrollLeft:0,scrollTop:0},u={x:0,y:0};if(r||!r&&"fixed"!==n){if(("body"!==eaT(t)||eaj(i))&&(a=eaQ(t)),eak(t)){let s=eaN(t,!0);u.x=s.x+t.clientLeft,u.y=s.y+t.clientTop}else i&&(u.x=eaV(i))}return{x:o.left+a.scrollLeft-u.x,y:o.top+a.scrollTop-u.y,width:o.width,height:o.height}}(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===eaC(e).direction};function ea$(e,t,n,r){void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:u=!1}=r,s=i&&!u,l=s||o?[...eaE(e)?eaY(e):e.contextElement?eaY(e.contextElement):[],...eaY(t)]:[];l.forEach(e=>{s&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)});let c,d=null;if(a){let f=!0;d=new ResizeObserver(()=>{f||n(),f=!1}),eaE(e)&&!u&&d.observe(e),eaE(e)||!e.contextElement||u||d.observe(e.contextElement),d.observe(t)}let p=u?eaN(e):null;return u&&function t(){let r=eaN(e);p&&(r.x!==p.x||r.y!==p.y||r.width!==p.width||r.height!==p.height)&&n(),p=r,c=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach(e=>{s&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)}),null==(e=d)||e.disconnect(),d=null,u&&cancelAnimationFrame(c)}}let eaX=(e,t,n)=>{let r=new Map,i={platform:eaG,...n},o={...i.platform,_c:r};return eac(e,t,{...i,platform:o})};var ea0="u">typeof document?c.useLayoutEffect:c.useEffect;function ea1(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!ea1(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let o=i[r];if(!("_owner"===o&&e.$$typeof)&&!ea1(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function ea2(e){let t=c.useRef(e);return ea0(()=>{t.current=e}),t}var ea6="u">typeof document?c.useLayoutEffect:c.useEffect;let ea5=!1,ea3=0,ea9=()=>"floating-ui-"+ea3++,ea4=(QK||(QK=n.t(c,2)))["useId".toString()],ea7=ea4??function(){let[e,t]=c.useState(()=>ea5?ea9():void 0);return ea6(()=>{null==e&&t(ea9())},[]),c.useEffect(()=>{ea5||(ea5=!0)},[]),e},ea8=c.createContext(null),eue=c.createContext(null),eut=()=>{var e,t;return null!=(e=null==(t=c.useContext(ea8))?void 0:t.id)?e:null},eun=()=>c.useContext(eue);function eur(e){var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document}function eui(e){var t;return null!=(t=eur(e).defaultView)?t:window}function euo(e){return!!e&&e instanceof eui(e).Element}let eua=(QK||(QK=n.t(c,2)))["useInsertionEffect".toString()];function euu(e){let t=c.useRef(()=>{});return eua?eua(()=>{t.current=e}):t.current=e,c.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function eus(e,t,n){let r=new Map;return{..."floating"===n&&{tabIndex:-1},...e,...t.map(e=>e?e[n]:null).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,i]=t;if(0===n.indexOf("on")){if(r.has(n)||r.set(n,[]),"function"==typeof i){var o;null==(o=r.get(n))||o.push(i),e[n]=function(){for(var e,t=arguments.length,i=Array(t),o=0;o<t;o++)i[o]=arguments[o];null==(e=r.get(n))||e.forEach(e=>e(...i))}}}else e[n]=i}),e),{})}}function eul(e,t){var n,r;let i=null!=(n=e.filter(e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)}))?n:[],o=i;for(;o.length;)o=null!=(r=e.filter(e=>{var t;return null==(t=o)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})}))?r:[],i=i.concat(o);return i}function euc(e){let t=e.activeElement;for(;(null==(n=t)||null==(r=n.shadowRoot)?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function eud(e){e.preventDefault(),e.stopPropagation()}function euf(e){let t=(0,c.useRef)();return ea6(()=>{t.current=e},[e]),t.current}let eup=function(e,t){let{open:n}=e,{enabled:r=!0,role:i="dialog"}=void 0===t?{}:t,o=ea7(),a=ea7(),u={id:o,role:i};return r?"tooltip"===i?{reference:{"aria-describedby":n?o:void 0},floating:u}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":"alertdialog"===i?"dialog":i,"aria-controls":n?o:void 0,..."listbox"===i&&{role:"combobox"},..."menu"===i&&{id:a}},floating:{...u,..."menu"===i&&{"aria-labelledby":a}}}:{}};function euA(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}let euh=function(e,t){let{open:n,onOpenChange:r,refs:i,events:o,nodeId:a}=e,{enabled:u=!0,escapeKey:s=!0,outsidePointerDown:l=!0,referencePointerDown:d=!1,ancestorScroll:f=!1,bubbles:p=!0}=void 0===t?{}:t,A=eun(),h=null!=eut(),m=c.useRef(!1);return c.useEffect(()=>{if(!n||!u)return;function e(e){"Escape"!==e.key||!p&&A&&eul(A.nodesRef.current,a).length>0||(o.emit("dismiss",{preventScroll:!1}),r(!1))}function t(e){var t,n;let u=m.current;if(m.current=!1,u)return;let s="composedPath"in e?e.composedPath()[0]:e.target;if(euo(s)&&i.floating.current){let l=null!=(n=i.floating.current.ownerDocument.defaultView)?n:window,c=s.scrollWidth>s.clientWidth,d=s.scrollHeight>s.clientHeight,f=d&&e.offsetX>s.clientWidth;if(d&&"rtl"===l.getComputedStyle(s).direction&&(f=e.offsetX<=s.offsetWidth-s.clientWidth),f||c&&e.offsetY>s.clientHeight)return}let g=A&&eul(A.nodesRef.current,a).some(t=>{var n;return euA(e,null==(n=t.context)?void 0:n.refs.floating.current)});euA(e,i.floating.current)||euA(e,i.domReference.current)||g||!p&&A&&eul(A.nodesRef.current,a).length>0||(o.emit("dismiss",!!h&&{preventScroll:!0}),r(!1))}function c(){r(!1)}let d=eur(i.floating.current);s&&d.addEventListener("keydown",e),l&&d.addEventListener("pointerdown",t);let g=(f?[...euo(i.reference.current)?eaY(i.reference.current):[],...euo(i.floating.current)?eaY(i.floating.current):[]]:[]).filter(e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)});return g.forEach(e=>e.addEventListener("scroll",c,{passive:!0})),()=>{s&&d.removeEventListener("keydown",e),l&&d.removeEventListener("pointerdown",t),g.forEach(e=>e.removeEventListener("scroll",c))}},[s,l,o,A,a,n,r,f,u,p,i,h]),u?{reference:{onPointerDown(){d&&(o.emit("dismiss"),r(!1))}},floating:{onPointerDownCapture(){m.current=!0}}}:{}},eum="ArrowUp",eug="ArrowDown",euy="ArrowLeft",euv="ArrowRight";function eux(e,t,n){return Math.floor(e/t)!==n}function eub(e,t){return t<0||t>=e.current.length}function euC(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=void 0===t?{}:t,a=e.current,u=n;do{var s,l;u+=r?-o:o}while(u>=0&&u<=a.length-1&&(i?i.includes(u):null==a[u]||null!=(s=a[u])&&s.hasAttribute("disabled")||(null==(l=a[u])?void 0:l.getAttribute("aria-disabled"))==="true"));return u}function euS(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function euw(e,t){return euS(t,e===eum||e===eug,e===euy||e===euv)}function euI(e,t,n){return euS(t,e===eug,n?e===euy:e===euv)||"Enter"===e||" "==e||""===e}function eu_(e,t){return euC(e,{disabledIndices:t})}function euT(e,t){return euC(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}let euO=function(e,t){let{open:n,onOpenChange:r,refs:i}=e,{listRef:o,activeIndex:a,onNavigate:u=()=>{},enabled:s=!0,selectedIndex:l=null,allowEscape:d=!1,loop:f=!1,nested:p=!1,rtl:A=!1,virtual:h=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:y=!0,disabledIndices:v,orientation:x="vertical",cols:b=1}=void 0===t?{listRef:{current:[]},activeIndex:null,onNavigate(){}}:t,C=eut(),S=eun(),w=euf(n),I=euu(u),_=euu(euf(u)),T=c.useRef(m),O=c.useRef(l??-1),R=c.useRef(null),k=function(e){let t=(0,c.useRef)(e);return ea6(()=>{t.current=e}),t}(v),E=c.useRef(!1),M=c.useRef(-1),[F,j]=c.useState(),U=c.useCallback((e,t)=>{M.current=requestAnimationFrame(()=>{var n,r;h?j(null==(n=e.current[t.current])?void 0:n.id):null==(r=e.current[t.current])||r.focus({preventScroll:!0})})},[h]);function K(e){var t,a,u,s;if(E.current=!0,p&&(t=e.key,euS(x,A?t===euv:t===euy,t===eum))){eud(e),r(!1),(s=i.domReference.current)&&s instanceof eui(s).HTMLElement&&i.domReference.current.focus();return}let l=O.current,c=eu_(o,v),m=euT(o,v);if("Home"===e.key&&(O.current=c,I(O.current)),"End"===e.key&&(O.current=m,I(O.current)),b>1){let g=O.current;if(e.key===eum){if(eud(e),-1===g)O.current=m;else if(O.current=euC(o,{startingIndex:g,amount:b,decrement:!0,disabledIndices:v}),f&&(g-b<c||O.current<0)){let y=g%b,C=m%b,S=m-(C-y);C===y?O.current=m:O.current=C>y?S:S-b}eub(o,O.current)&&(O.current=g),I(O.current)}if(e.key===eug&&(eud(e),-1===g?O.current=c:(O.current=euC(o,{startingIndex:g,amount:b,disabledIndices:v}),f&&g+b>m&&(O.current=euC(o,{startingIndex:g%b-b,amount:b,disabledIndices:v}))),eub(o,O.current)&&(O.current=g),I(O.current)),"both"===x){let w=Math.floor(g/b);e.key===euv&&(eud(e),g%b!=b-1?(O.current=euC(o,{startingIndex:g,disabledIndices:v}),f&&eux(O.current,b,w)&&(O.current=euC(o,{startingIndex:g-g%b-1,disabledIndices:v}))):f&&(O.current=euC(o,{startingIndex:g-g%b-1,disabledIndices:v})),eux(O.current,b,w)&&(O.current=g)),e.key===euy&&(eud(e),g%b!=0?(O.current=euC(o,{startingIndex:g,disabledIndices:v,decrement:!0}),f&&eux(O.current,b,w)&&(O.current=euC(o,{startingIndex:g+(b-g%b),decrement:!0,disabledIndices:v}))):f&&(O.current=euC(o,{startingIndex:g+(b-g%b),decrement:!0,disabledIndices:v})),eux(O.current,b,w)&&(O.current=g)),eub(o,O.current)&&(f&&Math.floor(m/b)===w?O.current=e.key===euy?m:euC(o,{startingIndex:g-g%b-1,disabledIndices:v}):O.current=g),I(O.current);return}}if(euw(e.key,x)){if(eud(e),n&&!h&&euc(e.currentTarget.ownerDocument)===e.currentTarget){O.current=euI(e.key,x,A)?c:m,I(O.current);return}euI(e.key,x,A)?f?O.current=l>=m?d&&l!==o.current.length?-1:c:euC(o,{startingIndex:l,disabledIndices:v}):O.current=Math.min(m,euC(o,{startingIndex:l,disabledIndices:v})):f?O.current=l<=c?d&&-1!==l?o.current.length:m:euC(o,{startingIndex:l,decrement:!0,disabledIndices:v}):O.current=Math.max(c,euC(o,{startingIndex:l,decrement:!0,disabledIndices:v})),eub(o,O.current)?I(null):I(O.current)}}return ea6(()=>{s&&(!w&&n&&T.current&&null!=l&&I(l),w&&!n&&(cancelAnimationFrame(M.current),O.current=-1,_(null)))},[n,w,l,o,U,s,I,_]),ea6(()=>{s&&n&&(null==a?null==l&&(w&&(O.current=-1,U(o,O)),!w&&T.current&&(null!=R.current||!0===T.current&&null==R.current)&&(O.current=null==R.current||euI(R.current,x,A)||p?eu_(o,k.current):euT(o,k.current),I(O.current),U(o,O))):eub(o,a)||(O.current=a,U(o,O)))},[n,w,a,l,p,o,I,U,s,d,x,A,h,k]),ea6(()=>{if(s&&!n&&w){var e,t;let r=null==S||null==(e=S.nodesRef.current.find(e=>e.id===C))||null==(t=e.context)?void 0:t.refs.floating.current;r&&!r.contains(euc(eur(r)))&&r.focus({preventScroll:!0})}},[s,n,w,S,C]),ea6(()=>{R.current=null}),s?{reference:{...h&&n&&null!=a&&{"aria-activedescendant":F},onKeyDown(e){if(E.current=!0,h&&n)return K(e);if((0===e.key.indexOf("Arrow")||"Enter"===e.key||" "===e.key||""===e.key)&&(R.current=e.key),p){var t,i,a;t=e.key,euS(x,A?t===euy:t===euv,t===eug)&&(eud(e),n?(O.current=eu_(o,v),I(O.current)):r(!0));return}euw(e.key,x)&&(null!=l&&(O.current=l),eud(e),!n&&y?r(!0):K(e),n&&I(O.current))}},floating:{"aria-orientation":"both"===x?void 0:x,...h&&null!=a&&{"aria-activedescendant":F},onKeyDown:K,onPointerMove(){E.current=!1}},item:{onFocus(e){let{currentTarget:t}=e,n=o.current.indexOf(t);-1!==n&&I(n)},onClick(e){let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...g&&{onMouseMove(e){let{currentTarget:t}=e;if(t){let n=o.current.indexOf(t);-1!==n&&I(n)}},onPointerLeave(){if(!E.current&&(O.current=-1,U(o,O),I(null),!h)){var e;null==(e=i.floating.current)||e.focus({preventScroll:!0})}}}}}:{}};function euR(e){var t,n;let{char:r,allowSpaces:i,allowedPrefixes:o,startOfLine:a,$position:u}=e,s=r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),l=RegExp(`\\s${s}$`),c=a?"^":"",d=i?RegExp(`${c}${s}.*?(?=\\s${s}|$)`,"gm"):RegExp(`${c}(?:^)?${s}[^\\s${s}]*`,"gm"),f=(null===(t=u.nodeBefore)||void 0===t?void 0:t.isText)&&u.nodeBefore.text;if(!f)return null;let p=u.pos-f.length,A=Array.from(f.matchAll(d)).pop();if(!A||void 0===A.input||void 0===A.index)return null;let h=A.input.slice(Math.max(0,A.index-1),A.index),m=RegExp(`^[${null==o?void 0:o.join("")}\0]?$`).test(h);if(null!==o&&!m)return null;let g=p+A.index,y=g+A[0].length;return i&&l.test(f.slice(y-1,y+1))&&(A[0]+=" ",y+=1),g<u.pos&&y>=u.pos?{range:{from:g,to:y},query:A[0].slice(r.length),text:A[0]}:null}let euk=new Xe("suggestion"),euE=erp.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",etj(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),euM={heading1:"heading1",heading2:"heading2",heading3:"heading3",heading4:"heading4",heading5:"heading5",heading6:"heading6",paragraph:"paragraph",preformatted:"preformatted",strong:"strong",em:"em",listItem:"list-item",oListItem:"o-list-item",list:"group-list-item",oList:"group-o-list-item",image:"image",embed:"embed",hyperlink:"hyperlink",label:"label",span:"span"},euF=()=>(++euF.i).toString();euF.i=0;let euj=e=>{let t=euL(e),n=[];for(let r=0;r<t.length;r++)n.push(euB(t[r]));return{key:euF(),children:n}},euU=(e,t=[])=>({key:euF(),type:e.type,text:"text"in e?e.text:void 0,node:e,children:t}),euK=e=>euU({type:euM.span,text:e,spans:[]}),euL=e=>{let t=e.slice(0);for(let n=0;n<t.length;n++){let r=t[n];if(r.type===euM.listItem||r.type===euM.oListItem){let i=[r];for(;t[n+1]&&t[n+1].type===r.type;)i.push(t[n+1]),t.splice(n,1);r.type===euM.listItem?t[n]={type:euM.list,items:i}:t[n]={type:euM.oList,items:i}}}return t},euB=e=>{if("text"in e)return euU(e,euP(e.spans,e));if("items"in e){let t=[];for(let n=0;n<e.items.length;n++)t.push(euB(e.items[n]));return euU(e,t)}return euU(e)},euP=(e,t,n)=>{if(!e.length)return[euK(t.text)];let r=e.slice(0);r.sort((e,t)=>e.start-t.start||t.end-e.end);let i=[];for(let o=0;o<r.length;o++){let a=r[o],u=n&&n.start||0,s=a.start-u,l=a.end-u,c=t.text.slice(s,l),d=[];for(let f=o;f<r.length;f++){let p=r[f];p!==a&&p.start>=a.start&&p.end<=a.end&&(d.push(p),r.splice(f,1),f--)}0===o&&s>0&&i.push(euK(t.text.slice(0,s)));let A={...a,text:c};i.push(euU(A,euP(d,{...t,text:c},a))),l<t.text.length&&i.push(euK(t.text.slice(l,r[o+1]?r[o+1].start-u:void 0)))}return i},euW=(e,t)=>euD(euj(e).children,t),euD=(e,t)=>{let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t(i.type,i.node,i.text,euD(i.children,t),i.key);null!=o&&n.push(o)}return n},euN=erp.create({name:"text",group:"inline"});function euq(e){return e.sort((e,t)=>e.start-t.start)}let euQ={fromPrismic:e=>t=>{switch(t.type){case"hyperlink":return esM.converter.fromPrismic(e)(t);case"em":return esO.converter.fromPrismic(e)(t);case"strong":return eoZ.converter.fromPrismic(e)(t);case"label":return esk.converter.fromPrismic(e)(t);case"list-item":return}},toPrismic(e,t,n){let r=esN.find(t=>e.type.name===t.name);if(!r)throw Error(`Invalid mark extension '${e.type.name}'.`);switch(r.richTextNodeTypes){case"hyperlink":return{type:"hyperlink",start:t,end:n,data:esM.converter.toPrismic(e)};case"strong":return{type:"strong",start:t,end:n};case"em":return{type:"em",start:t,end:n};case"paragraph":return{type:"label",start:t,end:n,data:esk.converter.toPrismic(e)}}}},euV=euN.extend({name:"text"}),euz={name:euV.name,component:euV,converter:{fromPrismic:e=>function(t,n,r=!1){let i={type:t,text:n.content.text,spans:n.content.spans||[]};return euW([i],function(e,t=!1){return(n,r,i,o)=>{var a,u;if("span"===n&&i&&i.length)return t?[e.text(i)]:ean.splitTextToNodes(e,i)(t=>e.text(t));let s=euQ.fromPrismic(e)(r);return s?(a=s,u=o,u.flat().map(e=>{let t=[...e.marks,a].sort((e,t)=>e.type.name.localeCompare(t.type.name));return e.mark(t)})):o.flat()}}(e,r)).flatMap(e=>e)},toPrismic(e,t,n){let r=eoz.children.reduce(e,(e,t)=>{let n=t.type.name===ean.name?ean.converter.toPrismic(t):t.textContent,r=n?e.text+n:e.text,i=e.text.length,o=r.length,a=t.marks.length?eoz.marks.map(t,e=>euQ.toPrismic(e,i,o)):void 0;return{...e,text:r,spans:a?[...e.spans,...a]:e.spans}},{text:"",spans:[]});return{type:t,content:{text:r.text,spans:[...function(e){var t;let n=e.reduce((e,t)=>{let n=(e[t.type]||[]).concat(t);return{...e,[t.type]:n}},{}),r=Object.entries(n).map(([e,t])=>euq(t).reduce((e,t)=>{if(!e.length)return[t];let n=e.length-1,r=e[n];return r?r.end<t.start?[...e,t]:r.end>=t.end?e:[...e.slice(0,n),{...r,end:t.end}]:e},[])).flat();return euq(r)}(r.spans)].sort((e,t)=>e.type.localeCompare(t.type))},...n}}}},euY=NW.RichTextNodeType.rtl,euH=etX.create({name:"textDirection",addOptions:()=>({supportedExtensionNames:[]}),addGlobalAttributes(){return[{types:this.options.supportedExtensionNames,attributes:{dir:{default:"ltr",parseHTML:e=>e.getAttribute("dir"),renderHTML:e=>({dir:euJ(e.dir)})}}}]},addCommands(){return{setDirection:e=>({commands:t})=>{switch(e){case"ltr":return t.setLeftToRight();case"rtl":return t.setRightToLeft()}},toggleDirection:e=>({commands:t})=>t.setDirection("rtl"===e?"ltr":"rtl"),setRightToLeft:()=>({commands:e})=>this.options.supportedExtensionNames.every(t=>e.updateAttributes(t,{dir:"rtl"})),setLeftToRight:()=>({commands:e})=>this.options.supportedExtensionNames.every(t=>e.resetAttributes(t,"dir"))}},addKeyboardShortcuts(){return{"Mod-Shift-r":()=>this.editor.commands.setRightToLeft(),"Mod-Shift-l":()=>this.editor.commands.setLeftToRight()}}}),euZ={parseNodeAttrsDirection:e=>euJ(e.dir),fromPrismic:e=>({dir:euJ(e.direction)}),toPrismic(e){return{direction:this.parseNodeAttrsDirection(e.attrs)}}};function euJ(e){return"rtl"===e?"rtl":"ltr"}let euG=euE.extend({name:"paragraph",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",etj(this.options.HTMLAttributes,e),0]}}),eu$=new eoW([NW.RichTextNodeType.paragraph],euG.name,euG,{fromPrismic:e=>function(t){var n;let r=euz.converter.fromPrismic(e)(euG.name,t);return null==(n=e.nodes[euG.name])?void 0:n.create(euZ.fromPrismic(t),r)},toPrismic:e=>euz.converter.toPrismic(e,NW.RichTextNodeType.paragraph,euZ.toPrismic(e))},"Type '/' for commands"),euX=eu$,eu0=["ArrowDown","ArrowUp","End","Home"],eu1=["Enter"],eu2=["Escape",...eu0,...eu1],eu6=etX.create({name:"slash-commands",addOptions:()=>({nodeTypes:[]}),addProseMirrorPlugins(){let e=esZ(esQ,this.options.nodeTypes);return e.length>1?[function({pluginKey:e=euk,editor:t,char:n="@",allowSpaces:r=!1,allowedPrefixes:i=[" "],startOfLine:o=!1,decorationTag:a="span",decorationClass:u="suggestion",command:s=()=>null,items:l=()=>[],render:c=()=>({}),allow:d=()=>!0,findSuggestionMatch:f=euR}){let p,A=null==c?void 0:c(),h=new $4({key:e,view(){return{update:async(e,n)=>{var r,i,o,a,u,c,d;let f=null===(r=this.key)||void 0===r?void 0:r.getState(n),h=null===(i=this.key)||void 0===i?void 0:i.getState(e.state),m=f.active&&h.active&&f.range.from!==h.range.from,g=!f.active&&h.active,y=f.active&&!h.active,v=!g&&!y&&f.query!==h.query,x=g||m,b=v&&!m,C=y||m;if(!x&&!b&&!C)return;let S=C&&!x?f:h,w=e.dom.querySelector(`[data-decoration-id="${S.decorationId}"]`);p={editor:t,range:S.range,query:S.query,text:S.text,items:[],command:e=>s({editor:t,range:S.range,props:e}),decorationNode:w,clientRect:w?()=>{var n;let{decorationId:r}=null===(n=this.key)||void 0===n?void 0:n.getState(t.state),i=e.dom.querySelector(`[data-decoration-id="${r}"]`);return(null==i?void 0:i.getBoundingClientRect())||null}:null},x&&(null===(o=null==A?void 0:A.onBeforeStart)||void 0===o||o.call(A,p)),b&&(null===(a=null==A?void 0:A.onBeforeUpdate)||void 0===a||a.call(A,p)),(b||x)&&(p.items=await l({editor:t,query:S.query})),C&&(null===(u=null==A?void 0:A.onExit)||void 0===u||u.call(A,p)),b&&(null===(c=null==A?void 0:A.onUpdate)||void 0===c||c.call(A,p)),x&&(null===(d=null==A?void 0:A.onStart)||void 0===d||d.call(A,p))},destroy(){var e;p&&(null===(e=null==A?void 0:A.onExit)||void 0===e||e.call(A,p))}}},state:{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}),apply(e,a,u,s){let{isEditable:l}=t,{composing:c}=t.view,{selection:p}=e,{empty:A,from:h}=p,m={...a};if(m.composing=c,l&&(A||t.view.composing)){(h<a.range.from||h>a.range.to)&&!c&&!a.composing&&(m.active=!1);let g=f({char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:p.$from}),y=`id_${Math.floor(4294967295*Math.random())}`;g&&d({editor:t,state:s,range:g.range})?(m.active=!0,m.decorationId=a.decorationId?a.decorationId:y,m.range=g.range,m.query=g.query,m.text=g.text):m.active=!1}else m.active=!1;return m.active||(m.decorationId=null,m.range={from:0,to:0},m.query=null,m.text=null),m}},props:{handleKeyDown(e,t){var n;let{active:r,range:i}=h.getState(e.state);return r&&(null===(n=null==A?void 0:A.onKeyDown)||void 0===n?void 0:n.call(A,{view:e,event:t,range:i}))||!1},decorations(e){let{active:t,range:n,decorationId:r}=h.getState(e);return t?eeC.create(e.doc,[eev.inline(n.from,n.to,{nodeName:a,class:u,"data-decoration-id":r})]):null}}});return h}({allowSpaces:!0,char:"/",editor:this.editor,startOfLine:!0,allow({state:e}){let t=e.selection.$from;return t.parent.type.name===euX.name&&1===t.depth},command({editor:e,props:t,range:n}){t.runCommands(e,{deleteRange:n})},items({query:t}){let n=t.toLocaleLowerCase().trim();return e.filter(e=>{var t,r;return(null==(t=e.shortText)?void 0:t.toLocaleLowerCase().includes(n))||(null==(r=e.text)?void 0:r.toLocaleLowerCase().includes(n))})},render(){let e;return{onStart(t){e=new eoO(eu5,{editor:t.editor,props:t}),document.body.appendChild(e.element)},onUpdate(t){null==e||e.updateProps(t)},onKeyDown({event:t}){var n;return!!(eu2.includes(t.key)&&null!=(n=null==e?void 0:e.ref)&&n.handleKeyDown(t))},onExit(){null==e||e.destroy(),null==e||e.element.remove()}}}})]:[]}}),eu5=(0,c.forwardRef)(function(e,t){var n,r,i,o,a;let{command:u,decorationNode:s,editor:l,items:d}=e,[A,h]=(0,c.useState)(!0),m=parseFloat(f.TV.space[0]),{context:g,floating:y,reference:v,x:x,y:b}=function(e){let{open:t=!1,onOpenChange:n,whileElementsMounted:r,placement:i,middleware:o,strategy:a,nodeId:u}=void 0===e?{}:e,[s,l]=c.useState(null),d=eun(),f=c.useRef(null),p=c.useRef({}),A=c.useState(()=>(function(){let e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(e=>e!==n))}}})())[0],h=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,whileElementsMounted:o,open:a}=e,[u,s]=c.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[l,d]=c.useState(r);ea1(l,r)||d(r);let f=c.useRef(null),p=c.useRef(null),A=c.useRef(u),h=ea2(o),m=ea2(i),[g,y]=c.useState(null),[v,x]=c.useState(null),b=c.useCallback(e=>{f.current!==e&&(f.current=e,y(e))},[]),S=c.useCallback(e=>{p.current!==e&&(p.current=e,x(e))},[]),w=c.useCallback(()=>{if(!f.current||!p.current)return;let e={placement:t,strategy:n,middleware:l};m.current&&(e.platform=m.current),eaX(f.current,p.current,e).then(e=>{let t={...e,isPositioned:!0};I.current&&!ea1(A.current,t)&&(A.current=t,C.flushSync(()=>{s(t)}))})},[l,t,n,m]);ea0(()=>{!1===a&&A.current.isPositioned&&(A.current.isPositioned=!1,s(e=>({...e,isPositioned:!1})))},[a]);let I=c.useRef(!1);ea0(()=>(I.current=!0,()=>{I.current=!1}),[]),ea0(()=>{if(g&&v){if(h.current)return h.current(g,v,w);w()}},[g,v,w,h]);let _=c.useMemo(()=>({reference:f,floating:p,setReference:b,setFloating:S}),[b,S]),T=c.useMemo(()=>({reference:g,floating:v}),[g,v]);return c.useMemo(()=>({...u,update:w,refs:_,elements:T,reference:b,floating:S}),[u,w,_,T,b,S])}({placement:i,middleware:o,strategy:a,whileElementsMounted:r}),m=euu(n),g=c.useMemo(()=>({...h.refs,domReference:f}),[h.refs]),y=c.useMemo(()=>({...h,refs:g,dataRef:p,nodeId:u,events:A,open:t,onOpenChange:m,_:{domReference:s}}),[h,u,A,t,m,g,s]);ea6(()=>{let e=null==d?void 0:d.nodesRef.current.find(e=>e.id===u);e&&(e.context=y)});let{reference:v}=h,x=c.useCallback(e=>{(euo(e)||null===e)&&(y.refs.domReference.current=e,l(e)),v(e)},[v,y.refs]);return c.useMemo(()=>({...h,context:y,refs:g,reference:x}),[h,g,y,x])}({middleware:[(void 0===(n=m)&&(n=0),{name:"offset",options:n,async fn(e){let{x:t,y:r}=e,i=await async function(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),a=eau(n),u=eao(n),s="x"===eas(n),l=["left","top"].includes(a)?-1:1,c=o&&s?-1:1,d="function"==typeof t?t(e):t,{mainAxis:f,crossAxis:p,alignmentAxis:A}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return u&&"number"==typeof A&&(p="end"===u?-1*A:A),s?{x:p*c,y:f*l}:{x:f*l,y:p*c}}(e,n);return{x:t+i.x,y:r+i.y,data:i}}}),(void 0===r&&(r={}),{name:"flip",options:r,async fn(e){var t,n,i,o;let{placement:a,middlewareData:u,rects:s,initialPlacement:l,platform:c,elements:d}=e,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:A,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=r,v=eau(a),x=eau(l)===l,b=await (null==c.isRTL?void 0:c.isRTL(d.floating)),C=A||(x||!g?[eag(l)]:function(e){let t=eag(e);return[eav(e),t,eav(t)]}(l));A||"none"===m||C.push(...function(e,t,n,r){let i=eao(e),o=function(e,t,n){let r=["left","right"],i=["right","left"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(eau(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(eav)))),o}(l,g,m,b));let S=await eaf(e,y),w=[],I=(null==(t=u.flip)?void 0:t.overflows)||[];if(f&&w.push(S[v]),p){let{main:_,cross:T}=function(e,t,n){void 0===n&&(n=!1);let r=eao(e),i=eas(e),o=eaa(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=eag(a)),{main:a,cross:eag(a)}}(a,s,b);w.push(S[_],S[T])}if(I=[...I,{placement:a,overflows:w}],!w.every(e=>e<=0)){let O=((null==(n=u.flip)?void 0:n.index)||0)+1,R=[l,...C][O];if(R)return{data:{index:O,overflows:I},reset:{placement:R}};let k=null==(i=I.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!k)switch(h){case"bestFit":{let E=null==(o=I.map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0];E&&(k=E);break}case"initialPlacement":k=l}if(a!==k)return{reset:{placement:k}}}return{}}}),(o={limiter:(void 0===i&&(i={}),{options:i,fn(e){let{x:t,y:n,placement:r,rects:o,middlewareData:a}=e,{offset:u=0,mainAxis:s=!0,crossAxis:l=!0}=i,c={x:t,y:n},d=eas(r),f=eax(d),p=c[d],A=c[f],h="function"==typeof u?u(e):u,m="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){let g="y"===d?"height":"width",y=o.reference[d]-o.floating[g]+m.mainAxis,v=o.reference[d]+o.reference[g]-m.mainAxis;p<y?p=y:p>v&&(p=v)}if(l){var x,b;let C="y"===d?"width":"height",S=["top","left"].includes(eau(r)),w=o.reference[f]-o.floating[C]+(S&&(null==(x=a.offset)?void 0:x[f])||0)+(S?0:m.crossAxis),I=o.reference[f]+o.reference[C]+(S?0:(null==(b=a.offset)?void 0:b[f])||0)-(S?m.crossAxis:0);A<w?A=w:A>I&&(A=I)}return{[d]:p,[f]:A}}})},{name:"shift",options:o,async fn(e){let{x:t,y:n,placement:r}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:u={fn(e){let{x:t,y:n}=e;return{x:t,y:n}}},...s}=o,l={x:t,y:n},c=await eaf(e,s),d=eas(eau(r)),f=eax(d),p=l[d],A=l[f];i&&(p=eah(p+c["y"===d?"top":"left"],p,p-c["y"===d?"bottom":"right"])),a&&(A=eah(A+c["y"===f?"top":"left"],A,A-c["y"===f?"bottom":"right"]));let h=u.fn({...e,[d]:p,[f]:A});return{...h,data:{x:h.x-t,y:h.y-n}}}})],onOpenChange:h,open:A,placement:"top-start",strategy:"fixed",whileElementsMounted:ea$});(0,c.useLayoutEffect)(()=>{v(s)},[v,s]),(0,c.useEffect)(()=>{let e,t=()=>{e=window.setTimeout(()=>{h(!0)})},n=()=>{h(!1)};return l.on("focus",t).on("blur",n),()=>{l.off("focus",t).off("blur",n),clearTimeout(e)}},[l]);let[S,w]=(0,c.useState)(0),I=(0,c.useRef)([]);(0,p.pQ)(d,()=>{w(0),I.current=[]});let{getFloatingProps:_,getItemProps:T,getReferenceProps:O}=(a=[euh(g,{outsidePointerDown:!1}),euO(g,{activeIndex:S,listRef:I,onNavigate(e){w(t=>e??t)},openOnArrowKeyDown:!1,virtual:!0}),eup(g,{role:"menu"})],{getReferenceProps:e=>eus(e,a,"reference"),getFloatingProps:e=>eus(e,a,"floating"),getItemProps:e=>eus(e,a,"item")}),R=O().onKeyDown;return(0,c.useImperativeHandle)(t,()=>({handleKeyDown(e){if(!A)return!1;if(eu0.includes(e.key)&&R(e),eu1.includes(e.key)){let t=d[S];void 0!==t&&u(t)}return!0}}),[S,u,d,R,A]),A?zE.jsx(f.xu,{..._(),minWidth:256,backgroundColor:"grey1",border:!0,borderStyle:"solid",borderRadius:6,flexDirection:"column",ref:y,top:parseFloat(f.TV.space[0]),left:parseFloat(f.TV.space[0]),position:"fixed",transform:null!==x&&null!==b?`translate3d(${Math.round(x)}px, ${Math.round(b)}px, 0)`:"translate3d(0, -200%, 0)",overflow:"hidden",children:zE.jsxs("div",{style:{boxShadow:"0px 2px 10px 0px hsla(0, 0%, 0%, 0.1)"},children:[d.map((e,t)=>{let n=T({onClick(){u(e)},onPointerDown(e){e.preventDefault()}});return(0,c.createElement)(eu3,{...n,key:e.nodeType,ref(e){I.current[t]=e},active:t===S,isFirstItem:0===t,isLastItem:t===d.length-1,shortcut:`/${e.shortText??""}`},e.text)}),0===d.length&&zE.jsx(eu3,{...T({onPointerDown(e){e.preventDefault()}}),disabled:!0,ref(e){I.current[0]=e},children:"No results"})]})}):null}),eu3=(0,c.forwardRef)(function(e,t){let{children:n,disabled:r=!1,shortcut:i,active:o=!1,isFirstItem:a=!1,isLastItem:u=!1,...s}=e;return zE.jsx("div",{...s,role:"button",style:{cursor:r?"default":"pointer"},ref:t,children:zE.jsxs(f.xu,{alignItems:"center",height:32,flexDirection:"row",gap:8,padding:8,backgroundColor:o?"grey4":"inherit",justifyContent:"space-between",opacity:r?.5:1,children:[zE.jsx(f.xv,{color:"grey12",component:"span",children:n}),i&&zE.jsx(f.xv,{color:"inherit",component:"span",variant:"small",children:i})]})})}),eu9=eoX.extend({name:"bulletList",parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",etj(this.options.HTMLAttributes,e),0]}}).configure({itemTypeName:"listItem"}),eu4=new eoq([NW.RichTextNodeType.list],eu9.name,eu9,{fromPrismic:e=>function(t){var n;let r=eo6.converter.fromPrismic(e)(t);if(r)return null==(n=e.nodes[eu9.name])?void 0:n.create(euZ.fromPrismic(t),r)},toPrismic:e=>eoz.children.map(e,e=>eo6.converter.toPrismic(e,NW.RichTextNodeType.list).filter(h.$)).flat()}),eu7=eu4,eu8=/^```([a-z]+)?[\s\n]$/,ese=/^~~~([a-z]+)?[\s\n]$/,est=erp.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options,r=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter(e=>e.startsWith(n)).map(e=>e.replace(n,""))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",etj(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!!e&&t.parent.type.name===this.name&&(!!n||!t.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let o=r.parentOffset===r.parent.nodeSize-2,a=r.parent.textContent.endsWith(`
20
+
21
+ `);return!!o&&!!a&&e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let a=i.after();return!(void 0===a||r.nodeAt(a))&&e.commands.exitCode()}}},addInputRules(){return[erc({find:eu8,type:this.type,getAttributes:e=>({language:e[1]})}),erc({find:ese,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new $4({key:new Xe("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=null==i?void 0:i.mode;if(!n||!o)return!1;let{tr:a}=e.state;return a.replaceSelectionWith(this.type.create({language:o})),a.setSelection($G.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.insertText(n.replace(/\r\n?/g,`
22
+ `)),a.setMeta("paste",!0),e.dispatch(a),!0}}})]}}),esn=est.extend({name:"preformatted",addAttributes(){return{language:{default:null,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options,r=[...(null==(t=e.firstElementChild)?void 0:t.classList)||[]].filter(e=>e.startsWith(n)).map(e=>e.replace(n,""))[0];return r||null},renderHTML:e=>e.language?{class:this.options.languageClassPrefix+e.language}:null}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({HTMLAttributes:e}){return["pre",etj(this.options.HTMLAttributes),["code",e,0]]}}).configure({exitOnTripleEnter:!1}),esr=new eoW([NW.RichTextNodeType.preformatted],esn.name,esn,{fromPrismic:e=>function(t){var n;let r=euz.converter.fromPrismic(e)(esn.name,t,!0);return null==(n=e.nodes[esn.name])?void 0:n.create(euZ.fromPrismic(t),r)},toPrismic:e=>euz.converter.toPrismic(e,NW.RichTextNodeType.preformatted,euZ.toPrismic(e))},"",!0);function esi(e){let{editor:t,getPos:n,node:r}=e,[i,o]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{function e(){let{from:e,to:i}=t.state.selection,a=n(),u=n()+r.nodeSize;o(e<=a&&i>=u)}function i(){o(!1)}return t.on("blur",i),t.on("selectionUpdate",e),()=>{t.off("blur",i),t.off("selectionUpdate",e)}},[t,n,r.nodeSize]),{selected:i}}function eso(e){let t=(0,c.useRef)(null),n=(0,c.useRef)(null),{onKeyDown:r,url:i,urlChanged:o,onContentChange:a,debouncedUrl:u,content:s}=function(e,t,n){let{node:r}=e,i=r.attrs.content,o=(0,p.R9)(e.updateAttributes),a=(0,p.$P)({initialState:(null==i?void 0:i.embed_url)??"",startTransition:c.startTransition});function u(e){o({content:e})}let{onKeyDown:s}=function(e,t,n,r){let{editor:i,getPos:o,node:a}=e,[u,s]=(0,c.useState)(!0);return(0,c.useEffect)(()=>{u&&e.editor.isFocused&&(0,f.rI)(()=>{var e;return null==(e=n.current)?void 0:e.focus()})},[n,u,e.editor.isFocused]),{containerRef:r,inputRef:n,onKeyDown:function(e){let n=o(),r=o()+a.nodeSize;"Enter"===e.code&&(s(!1),i.chain().insertContentAt(r,{type:"paragraph"}).focus(r+1).run()),"Backspace"===e.code&&""===t&&i.chain().deleteRange({from:n,to:r}).focus(r+1).run(),"ArrowUp"===e.code&&(s(!1),i.chain().focus(n-1).run()),"ArrowDown"===e.code&&(s(!1),i.chain().focus(r+1).run())}}}(e,a.value,t,n);return{inputRef:t,containerRef:n,onKeyDown:s,url:a.value,urlChanged:function(e){a.set(e),(0,l.ju)(e)||u(void 0)},onContentChange:u,debouncedUrl:a.debouncedValue,content:e.node.attrs.content}}(e,t,n),{selected:d}=esi(e);return zE.jsx(eoT,{className:"custom-embed",children:zE.jsxs("div",{contentEditable:"false",suppressContentEditableWarning:!0,children:[zE.jsxs(f.xu,{flexGrow:1,alignItems:"center",children:[zE.jsx(f.I5,{size:"small",name:"cloud",color:"grey11"}),zE.jsx(f.xu,{flexGrow:1,height:40,ref:n,children:zE.jsx(Jn,{id:"id",ref:t,value:i,variant:(0,l.ju)(i)?"link":"normal",placeholder:"Paste your link here",onValueChange:o,onKeyDown:r})})]}),(0,l.ju)(i)&&zE.jsx(Ja,{selected:d,debouncedUrl:u,onContentChange:a,content:s})]})})}let esa=erp.create({name:"embed",group:"block",atom:!0,content:"block*",marks:"",addAttributes:()=>({content:{default:void 0}}),addCommands(){return{setEmbed:()=>({tr:e,dispatch:t})=>{let n=this.type.create();return t&&e.replaceSelectionWith(n),!0}}},parseHTML:()=>[{tag:"embed"}],renderHTML:()=>["embed"],addNodeView:()=>eok(eso)}),esu=new class{constructor(e,t,n,r){_(this,"extType","node"),_(this,"nodeType","embed"),this.richTextNodeTypes=e,this.name=t,this.component=n,this.converter=r}}([NW.RichTextNodeType.embed],esa.name,esa,{fromPrismic:e=>function(t){var n;return null==(n=e.nodes[esa.name])?void 0:n.create({content:t.data})},toPrismic:e=>void 0===e.attrs.content?{type:"embed",data:{type:"embed",embed_url:"",__TYPE__:"EmbedContent",all:[]}}:{type:"embed",data:{...e.attrs.content}}}),ess=erp.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,etj(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>erc({find:RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),esl="heading";function esc(e){switch(e){case 1:return NW.RichTextNodeType.heading1;case 2:return NW.RichTextNodeType.heading2;case 3:return NW.RichTextNodeType.heading3;case 4:return NW.RichTextNodeType.heading4;case 5:return NW.RichTextNodeType.heading5;case 6:return NW.RichTextNodeType.heading6}}function esd(e){return{fullName:esc(e),level:e}}let esf=[1,2,3,4,5,6];function esp(e,t=esf){let n=RegExp(`^heading([${t.join(",")}]){1}$`),r=e.match(n);if(!r||!r[1])return;let i=parseInt(r[1]);return{fullName:esc(i),level:i}}function esA(e,t){let n=e.level;if(t.includes(n))return{fullName:esc(n),level:n}}let esh=e=>{let t=e[0]??1;return{fromPrismic:n=>function(r){var i;let o=euz.converter.fromPrismic(n)(esl,r),a=esp(r.type,e)||esd(t);return null==(i=n.nodes[esl])?void 0:i.create({level:a.level,...euZ.fromPrismic(r)},o)},toPrismic(n){let{fullName:r}=esA(n.attrs,e)||esd(t);return euz.converter.toPrismic(n,r,euZ.toPrismic(n))}}},esm={name:esl,build(e){var t,n;let r=e?e.size?Array.from(e.values()).reduce((e,t)=>{let n=esp(t);return n?[...e,n.level]:e},[]).sort((e,t)=>e-t):[]:esf;if(!r)return;let i=r.map(e=>esc(e));return new eoN(i,ess.extend({name:"heading"}).configure({levels:r}),r,esh(r),e=>{let t=esA(e,r);return t&&`Heading ${t.level}`})}};function esg(e){let{node:t}=e,n=t.attrs.content,{selected:r}=esi(e),i={width:void 0,height:void 0,name:ZR},{onMediaSelected:o,onCropperDialogClose:a,isUpdating:u,updateContent:s,onClear:l}=function(e){let{content:t,thumbnail:n,imageViewProps:{getPos:r,updateAttributes:i,editor:o,node:a}}=e,[u,s]=(0,c.useTransition)();function l(e){s(()=>i({content:e}))}return{onMediaSelected:function(e){let n=ZF(e),i=r()+a.nodeSize;l({__TYPE__:"ImageContent",...t,...n}),o.chain().focus(i+1).run()},onCropperDialogClose:function({croppedImages:e}){if(!t)return;let r=e[n.name];if(!r)return;let i=JO({content:t,thumbnail:n.name,croppedImage:r});i!==t&&l(i)},isUpdating:u,updateContent:l,onClear:function(){let e=r(),t=r()+a.nodeSize;o.chain().deleteRange({from:e,to:t}).focus(t).run()}}}({content:n,thumbnail:i,imageViewProps:e}),d=(null==n?void 0:n.width)===0&&(null==n?void 0:n.height)===0,p=n&&!d?[`${n.width}x${n.height}px`]:[],A=(null==n?void 0:n.alt)??"",h={thumbnail:i,contentView:n,labels:Zk(i,n,n)};return zE.jsx(eoT,{className:"custom-image",children:zE.jsx("div",{contentEditable:"false",suppressContentEditableWarning:!0,children:zE.jsx(JM,{content:n,selected:r,fieldLabel:"Feature image",imageLabel:p,initialImages:[h],readOnly:!1,onMediaSelected:o,onCropperDialogClose:a,onClear:l,children:zE.jsx(c.Suspense,{fallback:esy,children:null!=n&&n.url?zE.jsxs(f.aY,{children:[zE.jsx(f.hM,{children:zE.jsx(f.xu,{flexDirection:"column",alignItems:"center",position:"relative",height:400,children:zE.jsx(f.xu,{justifyContent:"center",flexGrow:1,maxHeight:"100%",maxWidth:"100%",children:zE.jsx(f.kg,{src:ZE(n.url),alt:A,sizing:"contain"})})})}),zE.jsx(J_,{onValueChange(e){s({...n,alt:e})},altText:A,readOnly:!n,selected:r})]}):zE.jsx(JI,{isUpdating:u,readOnly:!1,onMediaSelected:o})})})})})}let esy=zE.jsx("div",{style:{height:468}}),esv=erp.create({name:"image",group:"block",atom:!0,addAttributes:()=>({content:{default:void 0}}),addCommands(){return{setImage:()=>e=>{let{dispatch:t,tr:n}=e,r=this.type.create();return t&&n.replaceSelectionWith(r),!0}}},parseHTML:()=>[{tag:"image"}],renderHTML:({HTMLAttributes:e})=>["image",etj(e)],addNodeView:()=>eok(esg)}),esx=new class{constructor(e,t,n,r){_(this,"extType","node"),_(this,"nodeType","image"),this.richTextNodeTypes=e,this.name=t,this.component=n,this.converter=r}}([NW.RichTextNodeType.image],esv.name,esv,{fromPrismic:e=>function(t){var n;return null==(n=e.nodes[esv.name])?void 0:n.create({content:t.data})},toPrismic(e){if(void 0!==e.attrs.content)return{type:"image",data:{...e.attrs.content}}}}),esb=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,esC=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,esS=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,esw=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,esI=erf.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:e}){return["em",etj(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[erl({find:esb,type:this.type}),erl({find:esS,type:this.type})]},addPasteRules(){return[erh({find:esC,type:this.type}),erh({find:esw,type:this.type})]}}),es_=esI.extend({name:"em"}),esT=new class{constructor(e,t,n){_(this,"extType",eoB.Mark),_(this,"richTextNodeTypes",NW.RichTextNodeType.em),this.name=e,this.component=t,this.converter=n}}(es_.name,es_,{fromPrismic:e=>function(){var t;return null==(t=e.marks[es_.name])?void 0:t.create()},toPrismic(){}}),esO=esT,esR=erf.create({name:"label",priority:1e3,keepOnSplit:!1,inclusive:!1,addOptions:()=>({htmlAttributes:{style:"background-color: hsl(251, 89%, 96%); border: 1px dashed rgba(68, 53, 146, 0.4); border-radius: 0px 2px 2px 2px"}}),addAttributes:()=>({label:{default:""}}),addCommands(){return{setLabel:e=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMark(this.name,e).run(),unsetLabel:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},renderHTML({HTMLAttributes:e}){return["span",etj(this.options.htmlAttributes,e),0]}}),esk=new class{constructor(e,t,n){_(this,"extType",eoB.Mark),_(this,"richTextNodeTypes",NW.RichTextNodeType.paragraph),this.name=e,this.component=t,this.converter=n}}(esR.name,esR,{fromPrismic:e=>function(t){var n;let r=t.data,i={type:esR.name,label:r};return null==(n=e.marks[esR.name])?void 0:n.create(i)},toPrismic:e=>e.attrs.label}),esE=erf.create({name:"hyperlink",priority:1e3,keepOnSplit:!1,inclusive:!1,addOptions:()=>({openOnClick:!1,linkOnPaste:!0,autolink:!0,protocols:[],htmlAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null,id:""},validate:void 0}),addAttributes:()=>({href:{default:""},id:{default:""},target:{default:"_blank"},rel:{default:"noopener noreferrer nofollow"},class:{default:null},media:{default:null}}),parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:e}){return["a",etj(this.options.htmlAttributes,e),0]},addCommands(){return{setWebLink:e=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMark(this.name,e).setMeta("preventAutolink",!0).run(),setDocumentLink:e=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMark(this.name,e).setMeta("preventAutolink",!0).run(),setMediaLink:e=>({chain:t})=>{let n=esF(Gg({media:e.media}).value);return t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMark(this.name,{media:n}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}}}),esM=new class{constructor(e,t,n){_(this,"extType",eoB.Mark),_(this,"richTextNodeTypes",NW.RichTextNodeType.hyperlink),this.name=e,this.component=t,this.converter=n}}(esE.name,esE,{fromPrismic:e=>function(t){var n,r,i,o;let a=t.data;if("DocumentLink"===a.__TYPE__){let u={type:esE.name,id:a.id};return null==(n=e.marks[esE.name])?void 0:n.create(u)}if("ImageLink"===a.__TYPE__){let s={type:esE.name,media:esF(a)};return null==(r=e.marks[esE.name])?void 0:r.create(s)}if("FileLink"===a.__TYPE__){let l={type:esE.name,media:esF(a)};return null==(i=e.marks[esE.name])?void 0:i.create(l)}if("ExternalLink"===a.__TYPE__){let c={type:esE.name,url:a.url,href:a.url,target:a.target};return null==(o=e.marks[esE.name])?void 0:o.create(c)}},toPrismic:e=>e.attrs.media?esj(e.attrs.media):e.attrs.id?{__TYPE__:"DocumentLink",id:e.attrs.id}:{__TYPE__:"ExternalLink",url:e.attrs.href,target:e.attrs.target}});function esF(e){return JSON.stringify(e)}function esj(e){return JSON.parse(e)}let esU=erp.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",etj(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),esK=erf.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",etj(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{let n=enz(e,this.type);return!!Object.entries(n).some(([,e])=>!!e)||t.unsetMark(this.name)}}}}),esL=/^(\d+)\.\s$/,esB=erp.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return 1===t?["ol",etj(this.options.HTMLAttributes,n),0]:["ol",etj(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(esU.name,this.editor.getAttributes(esK.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=erd({find:esL,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=erd({find:esL,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(esK.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),esP=esB.extend({name:"orderedList",addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}),renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return 1===t?["ol",etj(this.options.HTMLAttributes,n),0]:["ol",etj(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}}}).configure({itemTypeName:"listItem"}),esW=new eoq([NW.RichTextNodeType.orderedList],esP.name,esP,{fromPrismic:e=>function(t){var n;let r=eo6.converter.fromPrismic(e)(t);if(r)return null==(n=e.nodes[esP.name])?void 0:n.create(euZ.fromPrismic(t),r)},toPrismic:e=>eoz.children.map(e,e=>eo6.converter.toPrismic(e,NW.RichTextNodeType.orderedList).filter(h.$)).flat()}),esD=esW,esN=[eoZ,esO,esM,esk];function esq(e){return[euX,eu7,esD,esm.build(e),esr,esu,esx,...esN].filter(h.$)}let esQ=[{nodeType:NW.RichTextNodeType.paragraph,icon:"textFields",isActive:e=>e.isActive(euX.name)&&!e.isActive(eu7.name)&&!e.isActive(esD.name),runCommands:esY((e,t)=>e.clearNodes().setDirection(esH(t))),shortText:"par",text:"Paragraph"},{nodeType:NW.RichTextNodeType.heading1,icon:"looks1",isActive:e=>e.isActive(esm.name,{level:1}),runCommands:esY((e,t)=>e.setHeading({level:1}).setDirection(esH(t))),shortText:"h1",text:"Heading 1"},{nodeType:NW.RichTextNodeType.heading2,icon:"looks2",isActive:e=>e.isActive(esm.name,{level:2}),runCommands:esY((e,t)=>e.setHeading({level:2}).setDirection(esH(t))),shortText:"h2",text:"Heading 2"},{nodeType:NW.RichTextNodeType.heading3,icon:"looks3",isActive:e=>e.isActive(esm.name,{level:3}),runCommands:esY((e,t)=>e.setHeading({level:3}).setDirection(esH(t))),shortText:"h3",text:"Heading 3"},{nodeType:NW.RichTextNodeType.heading4,icon:"looks4",isActive:e=>e.isActive(esm.name,{level:4}),runCommands:esY((e,t)=>e.setHeading({level:4}).setDirection(esH(t))),shortText:"h4",text:"Heading 4"},{nodeType:NW.RichTextNodeType.heading5,icon:"looks5",isActive:e=>e.isActive(esm.name,{level:5}),runCommands:esY((e,t)=>e.setHeading({level:5}).setDirection(esH(t))),shortText:"h5",text:"Heading 5"},{nodeType:NW.RichTextNodeType.heading6,icon:"looks6",isActive:e=>e.isActive(esm.name,{level:6}),runCommands:esY((e,t)=>e.setHeading({level:6}).setDirection(esH(t))),shortText:"h6",text:"Heading 6"},{nodeType:NW.RichTextNodeType.list,icon:"formatListBulleted",isActive:e=>e.isActive(eu7.name),runCommands:esY((e,t)=>e.toggleBulletList().setDirection(esH(t))),shortText:"bull",text:"Bulleted list"},{nodeType:NW.RichTextNodeType.orderedList,icon:"formatListNumbered",isActive:e=>e.isActive(esD.name),runCommands:esY((e,t)=>e.toggleOrderedList().setDirection(esH(t))),shortText:"num",text:"Numbered list"},{nodeType:NW.RichTextNodeType.preformatted,icon:"dataObject",isActive:e=>e.isActive(esr.name),runCommands:esY((e,t)=>e.setCodeBlock().setDirection(esH(t))),shortText:"code",text:"Code"},{nodeType:NW.RichTextNodeType.embed,icon:"cloud",isActive:e=>e.isActive(esu.name),runCommands:esY(e=>e.setEmbed()),shortText:"emb",text:"Embed"},{nodeType:NW.RichTextNodeType.image,icon:"image",isActive:e=>e.isActive(esx.name),runCommands:esY(e=>e.setImage()),shortText:"img",text:"Image"}],esV=[{nodeType:NW.RichTextNodeType.strong,icon:"formatBold",isActive:e=>e.isActive(eoZ.name),runCommands:esY(e=>e.toggleBold())},{nodeType:NW.RichTextNodeType.em,icon:"formatItalic",isActive:e=>e.isActive(esO.name),runCommands:esY(e=>e.toggleItalic())}],esz=[{nodeType:NW.RichTextNodeType.rtl,icon:"formatTextDirectionRToL",isActive:e=>e.isActive({dir:"rtl"}),runCommands:esY((e,t)=>e.toggleDirection(esH(t)))}];function esY(e){return(t,n={})=>{let r=!0===n.can?t.can().chain():t.chain().focus();return void 0!==n.deleteRange&&(r=r.deleteRange(n.deleteRange)),n.can?function(e,t,n){try{return n(t,e).run()}catch{return!1}}(t,r,e):e(r,t).run()}}function esH(e){let t=e.state.selection.$from.parent.attrs;return euZ.parseNodeAttrsDirection(t)}function esZ(e,t){return e.filter(e=>t.includes(e.nodeType))}function esJ(e){let{items:t,editor:n}=e;return 0===t.length?null:zE.jsxs(zE.Fragment,{children:[zE.jsx(f.Jf,{}),t.map(e=>zE.jsx(f.r8,{disabled:!e.runCommands(n,{can:!0}),onPressedChange(){e.runCommands(n)},pressed:e.isActive(n),startIcon:e.icon},e.nodeType))]})}function esG(e){let{labels:t,editor:n}=e,r=n.getAttributes("label").label;return zE.jsxs(zE.Fragment,{children:[zE.jsx(f.Jf,{}),zE.jsxs(f.h_,{children:[zE.jsx(f.$F,{disabled:0===t.length,children:zE.jsx(f.zx,{endIcon:"arrowDropDown",size:"small",color:"grey",children:es$(r??"Labels")})}),zE.jsx(f.AW,{align:"start",asPortal:!1,maxHeight:256,avoidCollisions:!1,children:t.map((e,t)=>{let i=r===e;return zE.jsx(f.Xi,{onSelect:()=>i?n.commands.unsetLabel():function(e,t){esY(e=>e.setLabel({label:t}))(e)}(n,e),endIcon:i&&zE.jsx(f.I5,{name:"check",size:"extraSmall"}),children:es$(e)},`${e}-${t}`)})})]})]})}function es$(e){return(0,x.tx)(e,20)}function esX(e){let{editor:t}=e,n=t.getAttributes("label");if(!n.label)return null;let r=n.label;return zE.jsx(f.xu,{backgroundColor:"purple9",padding:{block:2,inline:4},alignItems:"center",borderRadius:{topLeft:2,topRight:2,bottomRight:2},maxWidth:125,children:zE.jsx(f.xv,{color:"white",variant:"small",noWrap:!0,children:r})})}function es0(e){let{disabled:t,showWebLinkModal:n,showDocumentsLinkModal:r,showMediaLinkModal:i}=function(e){let{editor:t,setModal:n}=e;return{disabled:!esY(e=>e.setWebLink({href:""}))(t,{can:!0}),showWebLinkModal:function(){n("webLink")},showDocumentsLinkModal:function(){n("documentLink")},showMediaLinkModal:function(){n("mediaLink")}}}(e);return zE.jsxs(zE.Fragment,{children:[zE.jsx(f.Jf,{}),zE.jsxs(f.yM,{density:"compact",children:[zE.jsx(f.hA,{disabled:t,startIcon:"link",onClick:n},NW.RichTextNodeType.hyperlink),zE.jsxs(f.h_,{children:[zE.jsx(f.$F,{children:zE.jsx(f.hA,{startIcon:"arrowDropDown"})}),zE.jsxs(f.AW,{align:"end",asPortal:!1,children:[zE.jsx(f.Xi,{startIcon:zE.jsx(f.I5,{name:"public"}),onSelect:n,children:"Link to web page"}),zE.jsx(f.Xi,{startIcon:zE.jsx(f.I5,{name:"description"}),onSelect:r,children:"Link to document"}),zE.jsx(f.Xi,{startIcon:zE.jsx(f.I5,{name:"image"}),onSelect:i,children:"Link to media"})]})]})]})]})}function es1(e){let{docId:t,onEdit:n,onUnlink:r}=e,i=function(e){let t=zL();t.searchDocuments||zP("searchDocuments");let{coreApiBaseUrl:n,authStrategy:r}=t;return(0,m.QT)(Hj,[n,r,e])}(t),o=zL();if(!i)return null;let a=i.versions[0],u=zO({status:null==a?void 0:a.status,releaseId:(null==a?void 0:a.status)==="release"?a.release_id:void 0,documentId:i.id,versionId:null==a?void 0:a.version_id,baseUrl:o.baseUrl}),s=(null==a?void 0:a.preview_summary)??"",l=(null==a?void 0:a.custom_type_label)??"";return zE.jsx(f.oZ,{url:u,title:i.title,subTitle:l,description:s,onEdit:n,onUnlink:r,largeIconName:"description"})}function es2(e){let{editor:t}=e,{searchDocuments:n}=zL(),r=t.getAttributes(NW.RichTextNodeType.hyperlink);if(r.id&&n){let i=r.id;return zE.jsx(es6,{docId:i,...e})}if(r.href){let o=r.href;return zE.jsx(es5,{url:o,...e})}if(r.media){let a=esj(r.media);return zE.jsx(es3,{media:a,...e})}return null}function es6(e){let{editor:t,onEditDocumentLink:n,docId:r}=e;return zE.jsx(f.SV,{renderError:()=>zE.jsx(f.oZ,{url:"",title:"Failed to Load Linked Document Data",subTitle:"",error:!0,onEdit:n,onUnlink:()=>es9(t)}),children:zE.jsx(c.Suspense,{fallback:zE.jsx(f.oZ,{url:"",title:"",subTitle:"",loading:!0,onEdit:n,onUnlink:()=>es9(t)}),children:zE.jsx(es1,{docId:r,onEdit:n,onUnlink:()=>es9(t)})})})}function es5(e){let{url:t,editor:n,onEditWebLink:r}=e,i=(0,l.ju)(t);return i?zE.jsx(f.oZ,{url:t,title:(0,l.S$)(i),subTitle:t,onEdit:r,onUnlink:()=>es9(n)}):zE.jsx(f.oZ,{url:t,title:"",subTitle:t,onEdit:r,onUnlink:()=>es9(n)})}function es3(e){let{media:t,editor:n,onEditMediaLink:r}=e;return"ImageLink"===t.__TYPE__?zE.jsx(f.Qi,{url:t.url,title:t.name,subTitle:`${t.width} x ${t.height} pixels`,onEdit:r,onUnlink:()=>es9(n)}):"FileLink"===t.__TYPE__?zE.jsx(f.oZ,{url:t.url,title:t.name,subTitle:function(e){let{filename:t}=e,n=t.split(".").pop();return n?n.toLowerCase():""}({filename:t.name}),onEdit:r,onUnlink:()=>es9(n),largeIconName:"insertDriveFile"}):null}function es9(e){esY(e=>e.unsetLink())(e)}function es4(e){let{open:t}=e,{onOpenChange:n,onSelectDocument:r}=function(e){let{editor:t,setOpen:n}=e;function r(e){n(e)}return{onSelectDocument:function(e){esY(t=>t.extendMarkRange(NW.RichTextNodeType.hyperlink).setDocumentLink({id:e}))(t),n(!1)},onOpenChange:r}}(e);return zE.jsx(Ga,{open:t,onOpenChange:n,onSelectDocument:r})}function es7(e){let{open:t}=e,{onOpenChange:n,onMediaSelected:r}=function(e){let{editor:t,setOpen:n}=e;return{onMediaSelected:function(e){esY(t=>t.extendMarkRange(NW.RichTextNodeType.hyperlink).setMediaLink({media:e}))(t),n(!1)},onOpenChange:n}}(e);return zE.jsx(Jw,{open:t,onOpenChange:n,onMediaSelected:r,assetType:"all"})}function es8(e){let{open:t}=e,{url:n,setUrl:r,onOpenChange:i,onKeyDown:o,openInNewTab:a,setOpenInNewTab:u,onSetUrl:s,selectionUrl:d,selectionUrlTitle:p}=function(e){var t;let{editor:n,setOpen:r}=e,[i,o]=(0,c.useState)(""),[a,u]=(0,c.useState)(!1),s=function(e){let t=e.getAttributes(NW.RichTextNodeType.hyperlink);return t.href?t.href:void 0}(n),d=(t=n,"_blank"===t.getAttributes(NW.RichTextNodeType.hyperlink).target);(0,c.useEffect)(()=>{o(s??"")},[s]),(0,c.useEffect)(()=>{u(d??!1)},[d]);let f=s?(0,l.ju)(s):void 0,p=f?(0,l.S$)(f):"";function A(e){let t=a?"_blank":"_self";esY(n=>n.extendMarkRange(NW.RichTextNodeType.hyperlink).setWebLink({href:e,target:t}))(n),r(!1)}return{url:i,setUrl:o,onSetUrl:A,selectionUrl:s,selectionUrlTitle:p,openInNewTab:a,selectionOpenInNewTab:d,setOpenInNewTab:u,onKeyDown:function(e){"Enter"===e.key&&A(i)},onOpenChange:function(e){o(""),u(!1),r(e)}}}(e);return zE.jsx(f.Vq,{open:t,onOpenChange:i,hasClose:!1,size:"small",children:zE.jsx(f.cZ,{children:zE.jsxs(f.xu,{flexDirection:"column",children:[zE.jsxs(f.xu,{flexDirection:"column",height:"100%",padding:16,gap:4,children:[zE.jsx(f.yt,{value:n,onValueChange:r,placeholder:"Paste URL",icon:"public",onKeyDown:o}),d&&zE.jsxs(f.xu,{flexDirection:"column",padding:{top:8},gap:4,children:[zE.jsx(f.xv,{variant:"smallBold",color:"grey11",children:"Linked to"}),zE.jsxs(f.xu,{backgroundColor:"grey4",borderRadius:6,padding:8,alignItems:"center",gap:8,children:[zE.jsx(f.pI,{largeIconName:"public",smallIconName:"link"}),zE.jsxs(f.xu,{flexDirection:"column",children:[zE.jsx(f.xv,{variant:"bold",color:"grey12",children:p}),zE.jsx(f.xv,{color:"grey11",variant:"small",children:"Web page"})]})]})]})]}),n&&zE.jsxs(f.xu,{flexDirection:"column",padding:{block:8},border:{top:!0},children:[zE.jsx(f.UN,{onSelect:()=>u(!a),icon:a?"checkBox":"checkBoxOutlinedBlank",textContent:"Open in new tab"}),zE.jsx(f.UN,{onSelect:()=>s(n),icon:"link",textContent:"Link to URL"})]})]})})})}function ele(e){let{items:t,editor:n}=e;return 0===t.length?null:zE.jsxs(zE.Fragment,{children:[zE.jsx(f.Jf,{}),zE.jsx(f.dV,{onValueChange(e){t.forEach(t=>{(t.isActive(n)&&!e.includes(t.nodeType)||!t.isActive(n)&&e.includes(t.nodeType))&&t.runCommands(n)})},type:"multiple",value:t.filter(e=>e.isActive(n)).map(e=>e.nodeType),children:t.map(e=>zE.jsx(f.nG,{disabled:!e.runCommands(n,{can:!0}),startIcon:e.icon,value:e.nodeType},e.nodeType))},"mark")]})}function elt(e){var t;let{items:n,editor:r}=e;return 0===n.length?null:zE.jsxs(f.h_,{children:[zE.jsx(f.$F,{disabled:1===n.length,children:zE.jsx(f.zx,{endIcon:"arrowDropDown",size:"small",color:"grey",children:(null==(t=n.find(e=>e.isActive(r)))?void 0:t.text)??""})}),zE.jsx(f.AW,{align:"start",asPortal:!1,maxHeight:256,avoidCollisions:!1,children:n.map(e=>zE.jsx(f.Xi,{onSelect(){e.runCommands(r)},children:e.text},e.nodeType))})]})}function eln(e){return{duration:100,hideOnClick:!0,offset:e,placement:"top-start",zIndex:30}}function elr(e){let{editor:t,nodeTypes:n,labels:r}=e,[i,o]=(0,c.useState)(),a=n.includes(NW.RichTextNodeType.hyperlink),u=!i,{shouldShowBubbleMenu:s,shouldshowPopover:l}=function(e){let{editor:t}=e;return{shouldShowBubbleMenu:function(e){let{view:n,state:r,from:i,to:o}=e;if(!n.hasFocus())return!1;let{doc:a,selection:u}=r;return!(t.isActive(NW.RichTextNodeType.preformatted)||u.empty||0===a.textBetween(i,o).length)},shouldshowPopover:function(e,t){let{view:n,state:r,from:i,to:o}=e,a=n.state.doc.nodeAt(i),{doc:u,selection:s}=r;return!!s.empty&&!(u.textBetween(i,o).length>0)&&!!(null!=a&&a.marks.some(e=>e.type.name===t))}}}({editor:t}),[d,f]=(0,c.useState)(!0);return(0,c.useEffect)(()=>{f(!1)},[]),d?null:zE.jsxs(zE.Fragment,{children:[zE.jsx(eow,{editor:t,tippyOptions:eln([-48,0]),shouldShow:s,children:u&&zE.jsx(eli,{editor:t,nodeTypes:n,labels:r,setModal:o})}),zE.jsx(eow,{editor:t,tippyOptions:eln([-48,0]),shouldShow:e=>l(e,"hyperlink"),children:u&&zE.jsx(es2,{editor:t,onEditWebLink:()=>o("webLink"),onEditDocumentLink:()=>o("documentLink"),onEditMediaLink:()=>o("mediaLink")})}),zE.jsx(eow,{editor:t,tippyOptions:eln([0,0]),shouldShow:e=>l(e,"label"),children:zE.jsx(esX,{editor:t})}),a&&zE.jsxs(zE.Fragment,{children:[zE.jsx(es8,{open:"webLink"===i,setOpen:function(e){o(e?"webLink":void 0)},editor:t}),zE.jsx(es4,{open:"documentLink"===i,setOpen:function(e){o(e?"documentLink":void 0)},editor:t}),zE.jsx(es7,{open:"mediaLink"===i,setOpen:function(e){o(e?"mediaLink":void 0)},editor:t})]})]})}function eli(e){let{editor:t,nodeTypes:n,labels:r,setModal:i}=e,o=n.includes("hyperlink"),a=r.length>0,u=esZ(esQ,n),s=esZ(esV,n),l=esZ(esz,n),c=u.length+s.length+l.length+Number(o);return 0===c?null:zE.jsxs(f.o8,{children:[zE.jsx(elt,{items:u,editor:t}),a&&zE.jsx(esG,{labels:r,editor:t}),zE.jsx(ele,{items:s,editor:t}),o&&zE.jsx(es0,{editor:t,setModal:i}),zE.jsx(esJ,{items:l,editor:t}),c>1&&zE.jsxs(zE.Fragment,{children:[zE.jsx(f.Jf,{}),zE.jsx(f.hA,{onClick(){t.chain().focus().clearNodes().unsetAllMarks().run()},startIcon:"formatClear"},"clear")]})]})}function elo(e){var t;let{content:n,field:r,id:i,readOnly:o}=e,a=function(e){var t,n;let r=`${(null==(t=e.config)?void 0:t.multi)??""}-${(null==(n=e.config)?void 0:n.single)??""}`;return(0,c.useMemo)(()=>{var t,n;let{extensions:r,defaultTextConverter:i}=function(e){var t;if(!e||!(null!=e&&e.single)&&!(null!=e&&e.multi))return eoY();let n=function(e){let t=(e.single||e.multi||"").split(/\s*,\s*/).map(e=>{let t=NW.RichTextNodeTypeCodec.decode(e);return"Right"===t._tag?t.right:void 0}).filter(h.$);return new Set(t)}(e);if(!(null!=n&&n.size))return eoY();let r=(t=n,esq(t).filter(e=>(0,v.G)(t,t=>e.richTextNodeTypes.includes(t)))),i=function(e){let t=new Set(e);return(0,v.G)(t,eoQ)&&t.add(euX),(0,v.G)(t,eoD)||t.add(euX),[...t]}(r);return{extensions:i,defaultTextConverter:function(e){let t=e.find(eoD)??euX;return function(e){return n=>t.converter.fromPrismic(e)({...n,type:t.richTextNodeTypes[0]??"heading1"})}}(i)}}(e.config),o=r.filter(ela),a=r.flatMap(e=>e.richTextNodeTypes),u=r.map(e=>e.component),s=r.filter(elu).map(e=>e.name),l=[...u,...function(e,t){var n,r,i;let o=t.map(e=>e.richTextNodeTypes).flat(),a={placeholderByNodeType:(i=t,i.reduce((e,t)=>(t.nodeType===eoP.Text&&(e[t.name]=t.placeholder),e),{})),unfocusedPlaceholder:null==(n=e.config)?void 0:n.placeholder,nodeExtensions:t},u=o.includes(NW.RichTextNodeType.orderedList)||o.includes(NW.RichTextNodeType.list);return[eo4.component((null==(r=e.config)?void 0:r.single)===void 0),euz.component,ean.component,eai(a),u?eo6.component:void 0,eu6.configure({nodeTypes:o})].filter(h.$)}(e,o),euH.configure({supportedExtensionNames:s}),erF],c=l.map(e=>e.name),d=function(e,t){let n=etJ.resolve(e);return etP(n,void 0)}(l),f=(n=null==(t=e.config)?void 0:t.labels,Array.from(n??[]));return{allComponents:l,extensionNames:c,defaultTextConverter:i,nodeExtensions:o,names:a,schema:d,labels:f}},[r])}(r),u=n&&eo4.converter(a.nodeExtensions).fromPrismic(a.schema,null==(t=a.defaultTextConverter)?void 0:t.call(a,a.schema))(n),s=(0,p.R9)(e.onContentChange),l=(0,f.jE)({content:null==u?void 0:u.toJSON(),editable:!o,editorProps:{attributes:{class:`${f.rk} ${f.bN}`,id:i,tabIndex:"0"}},extensions:a.allComponents,injectCSS:!1,onUpdate({editor:e}){if(e.isEmpty)return s(void 0);let t=eo4.converter(a.nodeExtensions).toPrismic(e.state.doc);s(t)}},[a,o]);return zE.jsxs(f.gN,{children:[zE.jsx(f.Qy,{htmlFor:i,children:Z4(r)}),zE.jsxs(f.JO,{children:[l.isEditable&&zE.jsx(elr,{editor:l,nodeTypes:a.names.concat(euY),labels:a.labels}),zE.jsx(eob,{editor:l,style:{flexGrow:1}})]})]})}function ela(e){return e.extType===eoB.Node}function elu(e){return!(e.extType!==eoB.Node||e.nodeType!==eoP.Text||e.lockedFormat)}function els(e){var t,n,r,i,o;let{content:a,field:u,id:s,onContentChange:l,readOnly:c}=e,d=Z7(u),p=(r=u,(null==(i=r.config)?void 0:i.default_value)===void 0||null==(o=r.config.options)?void 0:o[0]),A=(null==a?void 0:a.value)??p;return zE.jsxs(f.gN,{children:[zE.jsx(f.fw,{name:"arrowDropDownCircle"}),zE.jsx(f.Qy,{htmlFor:s,children:Z4(u)}),zE.jsx(f.JO,{children:zE.jsx(f.Ph,{id:s,size:"large",color:"grey",value:A,renderTrigger:()=>zE.jsx(f.JF,{id:s,placeholder:d}),onValueChange(e){var t;c||l((t=e,0===t.length?void 0:{__TYPE__:"FieldContent",type:"Select",value:t}))},children:null==(n=null==(t=u.config)?void 0:t.options)?void 0:n.map(e=>zE.jsx(f.Ql,{value:e,children:e},e))})})]})}function ell(e){let{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=null!=i&&i.value?(0,A._O)(i.value):void 0;return zE.jsxs(f.gN,{children:[zE.jsx(f.fw,{name:"event"}),zE.jsx(f.Qy,{id:t,children:Z4(r)}),zE.jsx(f.JO,{children:zE.jsx(f.xu,{padding:{left:4,right:12},width:"100%",flexDirection:"column",justifyContent:"center",children:zE.jsx(f.Wr,{mode:"date-time","aria-labelledby":t,disabled:n,value:a,onValueChange:e=>o(function(e){if(e)return{__TYPE__:"FieldContent",type:"Timestamp",value:function(e){let t=`${e.getUTCFullYear()}`.padStart(4,"0"),n=`${e.getUTCMonth()+1}`.padStart(2,"0"),r=`${e.getUTCDate()}`.padStart(2,"0"),i=`${e.getUTCHours()}`.padStart(2,"0"),o=`${e.getUTCMinutes()}`.padStart(2,"0");return`${t}-${n}-${r}T${i}:${o}:00+00:00`}(e)}}(e))})})})]})}function elc(e){let{id:t,readOnly:n,content:r,nestableWidget:i}=e,o=(0,p.R9)(e.onContentChange);return(0,c.useMemo)(()=>{let e={id:t,readOnly:n,onContentChange:o};return"Boolean"===i.type?zE.jsx(Z8,{...e,field:i,content:R.isBooleanContent(r)?r:void 0}):"Date"===i.type?zE.jsx(Jt,{...e,field:i,content:R.isDateContent(r)?r:void 0}):"Timestamp"===i.type?zE.jsx(ell,{...e,field:i,content:R.isTimestampContent(r)?r:void 0}):"Image"===i.type?zE.jsx(JF,{...e,field:i,content:R.isImageContent(r)?r:void 0}):"Link"===i.type?zE.jsx(Gy,{...e,field:i,content:R.isLinkContent(r)?r:void 0}):"Number"===i.type?zE.jsx(GC,{...e,field:i,content:R.isNumberContent(r)?r:void 0}):"StructuredText"===i.type?zE.jsx(elo,{...e,field:i,content:R.isRichTextContent(r)?r:void 0}):"Select"===i.type?zE.jsx(els,{...e,field:i,content:R.isSelectContent(r)?r:void 0}):"Text"===i.type?zE.jsx(J0,{...e,field:i,content:R.isTextContent(r)?r:void 0}):"Embed"===i.type?zE.jsx(Jd,{...e,field:i,content:R.isEmbedContent(r)?r:void 0}):"Color"===i.type?zE.jsx(Je,{...e,field:i,content:R.isColorContent(r)?r:void 0}):"GeoPoint"===i.type?zE.jsx(Jm,{...e,field:i,content:R.isGeoPointContent(r)?r:void 0}):"IntegrationFields"===i.type?zE.jsx(JX,{...e,field:i,content:R.isIntegrationFieldContent(r)?r:void 0}):null},[r,t,i,o,n])}function eld(e){let{id:t,title:n,addItemButtonTitle:r,content:i,onContentChange:o,readOnly:a,repeatable:u=!0,repeatableZone:s}=e,l=Object.entries(s),d=i??[elp];!u&&d.length>1&&(d=d.slice(0,1));let p=(0,c.useRef)(new WeakMap),{registerItemKey:A}=function(e,t){let n=(0,c.useRef)(t);if(n.current&&t.every(t=>!e.has(t)))for(let r=0;r<t.length;r++){let i=n.current[r],o=t[r];i&&o&&elf(e,i,o)}function a(t){e.has(t)||e.set(t,(0,S.d)().toString())}return n.current=t,t.forEach(a),{registerItemKey:a}}(p.current,d),{expand:h,accordionProps:m}=(0,f.As)({type:"single",defaultExpanded:d[0]?[y(d[0])]:[]});function y(e){return p.current.get(e)??"!bugged!"}function v(e){let{index:t,offset:n}=e;o((0,g.pB)(d,t,t+n))}function x(e){let{index:t}=e;o((0,g.$E)(d,t))}return 0===Object.keys(s).length?null:zE.jsx(f.ZA,{title:n??"Repeatable zone",addItemButtonTitle:r??"Add item in repeatable zone",items:d,maxItems:u?void 0:1,getItemKey:y,onAddItem:function(){let e=elA();A(e),h(y(e)),o(d.concat(e))},accordionType:m.type,expanded:m.expanded,onExpandedChange:m.onExpandedChange,children(e,n){let r=new Map(e.value),i=y(e);return zE.jsx(f.En,{keepLoaded:!0,children:zE.jsx(f.MN,{index:n,title:`${n+1} • Item`,accordionValue:i,onMove:v,onDelete:x,children:l.map(([u,s])=>{let l=r.get(u),c=R.isNestableContent(l)?l:void 0;return zE.jsx(elc,{id:`${t}[${i}].${u}`,content:c,nestableWidget:s,onContentChange:t=>(function(e,t,n,r){let i=function(e,t){let[n,r]=t;if(!r){let i=e.value.filter(([e])=>e!==n);return elA(i)}let o=Array.from(new Map(e.value).set(n,r));return elA(o)}(e,[n,r]),a=function(e,t){let[n,r]=t;return r?e.map((e,t)=>t===n?r:e):e.filter((e,t)=>t!==n)}(d,[t,i]);elf(p.current,e,i),o(a)})(e,n,u,t),readOnly:a},u)})})})}})}function elf(e,t,n){let r=e.get(t);void 0!==r&&e.set(n,r)}let elp={__TYPE__:"GroupItemContent",value:[]};function elA(e=[]){return{__TYPE__:"GroupItemContent",value:e}}function elh(e){var t,n;let{group:r,content:i,onContentChange:o,...a}=e;return zE.jsx(eld,{...a,title:elm(r),addItemButtonTitle:`Add item in "${elm(r)}"`,repeatable:(null==(t=r.config)?void 0:t.repeat)!==!1,repeatableZone:(null==(n=r.config)?void 0:n.fields)??{},content:null==i?void 0:i.value,onContentChange(e){o({__TYPE__:"GroupContentType",value:e})}})}function elm(e){var t;return(null==(t=e.config)?void 0:t.label)??e.fieldset??e.type}function elg(e){let{id:t,readOnly:n,content:r,slicePrimaryWidget:i}=e,o=(0,p.R9)(e.onContentChange);return(0,c.useMemo)(()=>{let e={id:t,readOnly:n,onContentChange:o};return"Group"===i.type?zE.jsx(elh,{...e,group:i,content:R.isGroupContent(r)?r:void 0}):zE.jsx(elc,{...e,nestableWidget:i,content:R.isNestableContent(r)?r:void 0})},[r,t,i,o,n])}function ely(e){let{content:t,id:n,slicePrimaryZone:r,onContentChange:i,readOnly:o}=e,a=(0,c.useMemo)(()=>Object.entries(r),[r]);return zE.jsx(zE.Fragment,{children:a.map(([e,r])=>{let a=t[e];return zE.jsx(elg,{id:`${n}.${e}`,readOnly:o,slicePrimaryWidget:r,content:R.isSlicePrimaryContent(a)?a:void 0,onContentChange(n){var r,o,a;i((r=t,o=e,a=n,a?{...r,[o]:a}:(0,d.ud)(r,o)))}},e)})})}function elv(e){var t,n,r,i;let{config:o,content:a,sliceKey:u,readOnly:s=!1,sharedSlice:l,onContentChange:d,...p}=e,A=(t=l,n=a.variation,(0,c.useMemo)(()=>t.variations.find(e=>e.id===n),[t,n])),h=(0,c.useId)(),m={id:p.id??h,readOnly:s},{selected:g,selectionId:y,selection:v}=function(e){let{sliceKey:t}=e||{},n=(0,c.useContext)(Z9),r=function(e,t){if(t)return`${e}___${t}`}("sliceFieldSet",t),i=t===(null==n?void 0:n.id);return{selectionId:r,selected:i,selection:n}}({sliceKey:u});return void 0===A?null:zE.jsx(zK.Provider,{value:o,children:zE.jsx(f.C3,{id:y,selected:g,onFocus:function(){u&&v.update("sliceFieldSet",u)},legend:(r=l,i=A,[r.name,i.name].join(" • ")),children:zE.jsxs(f.En,{heightEstimate:400,gap:16,keepLoaded:!0,children:[zE.jsx(ely,{...m,slicePrimaryZone:A.primary??{},content:a.primary,onContentChange(e){d({...a,primary:e})}}),zE.jsx(eld,{...m,repeatableZone:A.items??{},content:a.items,onContentChange(e){d({...a,items:e})}})]})})})}}}]);