@innovaccer/rich-text-editor 2.0.0 → 2.0.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.
package/dist/rich-text-editor.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
module.exports=function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=102)}([function(e,t){e.exports=React},function(e,t,n){e.exports=n(199)()},function(e,l,t){"use strict";var n=t(103),r=t(25),o=t(12),i=t(119),a=t(18),s=t(40),c=t(42),u=t(59),f=t(120),p=t(75),d=t(30),h=t(9),y=t(57),g=t(8),m=t(48),v=t(187),b=t(86),_=t(31),w=t(188),S=t(191),E=t(14),C=t(87),O=t(197),t=t(84);e.exports={Editor:f,EditorBlock:p,EditorState:g,CompositeDecorator:i,Entity:d,EntityInstance:y,BlockMapBuilder:r,CharacterMetadata:o,ContentBlock:a,ContentState:s,RawDraftContentState:v,SelectionState:_,AtomicBlockUtils:n,KeyBindingUtil:m,Modifier:h,RichUtils:b,DefaultDraftBlockRenderMap:c,DefaultDraftInlineStyle:u,convertFromHTML:t,convertFromRaw:S,convertToRaw:w,genKey:E,getDefaultKeyBinding:C,getVisibleSelectionRect:O}},function(e,Ka,Ha){"use strict";!function(n){Ha.d(Ka,"a",function(){return xe}),Ha.d(Ka,"b",function(){return Ce}),Ha.d(Ka,"c",function(){return et}),Ha.d(Ka,"d",function(){return ae}),Ha.d(Ka,"e",function(){return at}),Ha.d(Ka,"f",function(){return Q}),Ha.d(Ka,"g",function(){return ut}),Ha.d(Ka,"h",function(){return vt}),Ha.d(Ka,"i",function(){return Ot}),Ha.d(Ka,"j",function(){return re}),Ha.d(Ka,"k",function(){return ne}),Ha.d(Ka,"l",function(){return Ci}),Ha.d(Ka,"m",function(){return ye}),Ha.d(Ka,"n",function(){return ki});var fe=Ha(0),g=Ha.n(fe),m=Ha(22);function r(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach(function(e){pe(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function s(s){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=s.apply(e,a);function o(e){c(r,t,n,o,i,"next",e)}function i(e){c(r,t,n,o,i,"throw",e)}o(void 0)})}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function de(){return(de=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};for(var n,r={},o=Object.keys(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function V(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=u(n),t=(e=r?(e=u(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return V(t)}}function ge(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){var n,r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=f(e))||t&&e&&"number"==typeof e.length)return r&&(e=r),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}function b(e,t){function n(e,t,n){var r=[31,28,31,30,31,30,31,31,30,31,30,31];return(n%400==0||n%100!=0&&n%4==0)&&(r[1]=29),t<=12&&e<=r[t-1]}switch(t){case"dd/mm/yyyy":var r=e.split("/");return n(+r[0]||1,+r[1]||1,+r[2]||1900);case"mm/dd/yyyy":r=e.split("/");return n(+r[1]||1,+r[0]||1,+r[2]||1900);case"yyyy/mm/dd":r=e.split("/");return n(+r[2]||1,+r[1]||1,+r[0]||1900);case"dd-mm-yyyy":r=e.split("-");return n(+r[0]||1,+r[1]||1,+r[2]||1900);case"mm-dd-yyyy":r=e.split("-");return n(+r[1]||1,+r[0]||1,+r[2]||1900);case"yyyy-mm-dd":r=e.split("-");return n(+r[2]||1,+r[1]||1,+r[0]||1900);default:return!1}}pe(Xe={},"hh:mm","--:--"),pe(Xe,"hh:mm AM","--:-- AM");var L=function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return(Array.isArray(e)?e:[e]).every(function(e){return e.apply(void 0,n)})},C={"dd/mm/yyyy":[/[0123]/,/\d/,"/",/\[01]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"mm/dd/yyyy":[/[01]/,/\d/,"/",/[0123]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"yyyy/mm/dd":[/\d/,/\d/,/\d/,/\d/,"/",/[01]/,/\d/,"/",/[0123]/,/\d/],"dd-mm-yyyy":[/[0123]/,/\d/,"-",/[01]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"mm-dd-yyyy":[/[01]/,/\d/,"-",/[0123]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"yyyy-mm-dd":[/\d/,/\d/,/\d/,/\d/,"-",/[01]/,/\d/,"-",/[0123]/,/\d/]},_={"dd/mm/yyyy":[/[0123]/,/\d/,"/",/\[01]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[0123]/,/\d/,"/",/\[01]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"mm/dd/yyyy":[/[01]/,/\d/,"/",/[0123]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[01]/,/\d/,"/",/[0123]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"yyyy/mm/dd":[/\d/,/\d/,/\d/,/\d/,"/",/[01]/,/\d/,"/",/[0123]/,/\d/," ","-"," ",/\d/,/\d/,/\d/,/\d/,"/",/[01]/,/\d/,"/",/[0123]/,/\d/],"dd-mm-yyyy":[/[0123]/,/\d/,"-",/[01]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[0123]/,/\d/,"-",/[01]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"mm-dd-yyyy":[/[01]/,/\d/,"-",/[0123]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[01]/,/\d/,"-",/[0123]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"yyyy-mm-dd":[/\d/,/\d/,/\d/,/\d/,"-",/[01]/,/\d/,"-",/[0123]/,/\d/," ","-"," ",/\d/,/\d/,/\d/,/\d/,"-",/[01]/,/\d/,"-",/[0123]/,/\d/]},w=(pe(Xe={},"hh:mm",[/[0-1-2]/,/\d/,":",/[0-5]/,/\d/]),pe(Xe,"hh:mm AM",[/[0-1]/,/\d/,":",/[0-5]/,/\d/," ",/[APap]/,"M"]),"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n?n:"undefined"!=typeof self?self:{});function S(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function E(e,t){return e(t={exports:{}},t.exports),t.exports}function O(e,t,n){return Object.entries(e).filter(function(e){return n?t.includes(e[0]):!t.includes(e[0])}).reduce(function(e,t){return e[t[0]]=t[1],e},{})}function x(e){function t(){document.body.style.overflow=o||"",i(null)}var n=e.className,r=me(e),o=(u=ge(T(null),2))[0],i=u[1],l=(u=ge(fe.useState(e.open),2))[0],a=u[1],s=(u=ge(fe.useState(e.open),2))[0],c=u[1],u=he({Backdrop:!0,"Backdrop--open":l,"Backdrop-animation--open":s,"Backdrop-animation--close":!s},n);return D(function(){return e.open&&(i(document.body.style.overflow),document.body.style.setProperty("overflow","hidden","important"),a(!0),c(!0)),e.open||(window.setTimeout(function(){a(!1)},120),c(!1),t()),function(){t()}},[e.open]),m.createPortal(fe.createElement("div",de({"data-test":"DesignSystem-Backdrop","data-layer":!0},r,{className:u,style:{zIndex:e.zIndex}})),document.body)}var he=E(function(e){function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r,o=typeof n;if("string"==o||"number"==o)e.push(n);else if(Array.isArray(n))!n.length||(r=a.apply(null,n))&&e.push(r);else if("object"==o)if(n.toString===Object.prototype.toString)for(var i in n)s.call(n,i)&&n[i]&&e.push(i);else e.push(n.toString())}}return e.join(" ")}
|
|
1
|
+
module.exports=function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=102)}([function(e,t){e.exports=React},function(e,t,n){e.exports=n(199)()},function(e,t,n){"use strict";var r=n(103),o=n(25),i=n(12),a=n(119),s=n(18),c=n(40),u=n(42),l=n(59),f=n(120),p=n(75),d=n(30),h=n(9),y=n(57),g=n(8),m=n(48),v=n(187),b=n(86),_=n(31),w=n(188),S=n(191),E=n(14),C=n(87),O=n(197),n=n(84);e.exports={Editor:f,EditorBlock:p,EditorState:g,CompositeDecorator:a,Entity:d,EntityInstance:y,BlockMapBuilder:o,CharacterMetadata:i,ContentBlock:s,ContentState:c,RawDraftContentState:v,SelectionState:_,AtomicBlockUtils:r,KeyBindingUtil:m,Modifier:h,RichUtils:b,DefaultDraftBlockRenderMap:u,DefaultDraftInlineStyle:l,convertFromHTML:n,convertFromRaw:S,convertToRaw:w,genKey:E,getDefaultKeyBinding:C,getVisibleSelectionRect:O}},function(e,Ka,Ha){"use strict";!function(p){Ha.d(Ka,"a",function(){return ve}),Ha.d(Ka,"b",function(){return Te}),Ha.d(Ka,"c",function(){return st}),Ha.d(Ka,"d",function(){return Ae}),Ha.d(Ka,"e",function(){return pt}),Ha.d(Ka,"f",function(){return T}),Ha.d(Ka,"g",function(){return yt}),Ha.d(Ka,"h",function(){return Ct}),Ha.d(Ka,"i",function(){return It}),Ha.d(Ka,"j",function(){return I}),Ha.d(Ka,"k",function(){return j}),Ha.d(Ka,"l",function(){return Oi}),Ha.d(Ka,"m",function(){return me}),Ha.d(Ka,"n",function(){return Di});var fe=Ha(0),v=Ha.n(fe),b=Ha(22);function _(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach(function(e){pe(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function S(s){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=s.apply(e,a);function o(e){w(r,t,n,o,i,"next",e)}function i(e){w(r,t,n,o,i,"throw",e)}o(void 0)})}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){t&&E(e.prototype,t),n&&E(e,n)}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function de(){return(de=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function e(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};for(var n,r={},o=Object.keys(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function V(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=x(n),t=(e=r?(e=x(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return V(t)}}function he(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||D(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||D(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function N(e,t){var n,r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=D(e))||t&&e&&"number"==typeof e.length)return r&&(e=r),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}function A(e,t){function n(e,t,n){var r=[31,28,31,30,31,30,31,31,30,31,30,31];return(n%400==0||n%100!=0&&n%4==0)&&(r[1]=29),t<=12&&e<=r[t-1]}switch(t){case"dd/mm/yyyy":var r=e.split("/");return n(+r[0]||1,+r[1]||1,+r[2]||1900);case"mm/dd/yyyy":r=e.split("/");return n(+r[1]||1,+r[0]||1,+r[2]||1900);case"yyyy/mm/dd":r=e.split("/");return n(+r[2]||1,+r[1]||1,+r[0]||1900);case"dd-mm-yyyy":r=e.split("-");return n(+r[0]||1,+r[1]||1,+r[2]||1900);case"mm-dd-yyyy":r=e.split("-");return n(+r[1]||1,+r[0]||1,+r[2]||1900);case"yyyy-mm-dd":r=e.split("-");return n(+r[2]||1,+r[1]||1,+r[0]||1900);default:return!1}}pe(n={},"hh:mm","--:--"),pe(n,"hh:mm AM","--:-- AM");var L=function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return(Array.isArray(e)?e:[e]).every(function(e){return e.apply(void 0,n)})},P={"dd/mm/yyyy":[/[0123]/,/\d/,"/",/\[01]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"mm/dd/yyyy":[/[01]/,/\d/,"/",/[0123]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"yyyy/mm/dd":[/\d/,/\d/,/\d/,/\d/,"/",/[01]/,/\d/,"/",/[0123]/,/\d/],"dd-mm-yyyy":[/[0123]/,/\d/,"-",/[01]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"mm-dd-yyyy":[/[01]/,/\d/,"-",/[0123]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"yyyy-mm-dd":[/\d/,/\d/,/\d/,/\d/,"-",/[01]/,/\d/,"-",/[0123]/,/\d/]},R={"dd/mm/yyyy":[/[0123]/,/\d/,"/",/\[01]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[0123]/,/\d/,"/",/\[01]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"mm/dd/yyyy":[/[01]/,/\d/,"/",/[0123]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[01]/,/\d/,"/",/[0123]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"yyyy/mm/dd":[/\d/,/\d/,/\d/,/\d/,"/",/[01]/,/\d/,"/",/[0123]/,/\d/," ","-"," ",/\d/,/\d/,/\d/,/\d/,"/",/[01]/,/\d/,"/",/[0123]/,/\d/],"dd-mm-yyyy":[/[0123]/,/\d/,"-",/[01]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[0123]/,/\d/,"-",/[01]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"mm-dd-yyyy":[/[01]/,/\d/,"-",/[0123]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[01]/,/\d/,"-",/[0123]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"yyyy-mm-dd":[/\d/,/\d/,/\d/,/\d/,"-",/[01]/,/\d/,"-",/[0123]/,/\d/," ","-"," ",/\d/,/\d/,/\d/,/\d/,"-",/[01]/,/\d/,"-",/[0123]/,/\d/]},F=(pe(n={},"hh:mm",[/[0-1-2]/,/\d/,":",/[0-5]/,/\d/]),pe(n,"hh:mm AM",[/[0-1]/,/\d/,":",/[0-5]/,/\d/," ",/[APap]/,"M"]),"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==p?p:"undefined"!=typeof self?self:{});function B(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e,t){return e(t={exports:{}},t.exports),t.exports}function U(e,t,n){return Object.entries(e).filter(function(e){return n?t.includes(e[0]):!t.includes(e[0])}).reduce(function(e,t){return e[t[0]]=t[1],e},{})}function q(e){function t(){document.body.style.overflow=o||"",i(null)}var n=e.className,r=ge(e),o=(l=he(J(null),2))[0],i=l[1],a=(l=he(fe.useState(e.open),2))[0],s=l[1],c=(l=he(fe.useState(e.open),2))[0],u=l[1],l=ye({Backdrop:!0,"Backdrop--open":a,"Backdrop-animation--open":c,"Backdrop-animation--close":!c},n);return Z(function(){return e.open&&(i(document.body.style.overflow),document.body.style.setProperty("overflow","hidden","important"),s(!0),u(!0)),e.open||(window.setTimeout(function(){s(!1)},120),u(!1),t()),function(){t()}},[e.open]),b.createPortal(fe.createElement("div",de({"data-test":"DesignSystem-Backdrop","data-layer":!0},r,{className:l,style:{zIndex:e.zIndex}})),document.body)}var ye=t(function(e){function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r,o=typeof n;if("string"==o||"number"==o)e.push(n);else if(Array.isArray(n))!n.length||(r=a.apply(null,n))&&e.push(r);else if("object"==o)if(n.toString===Object.prototype.toString)for(var i in n)s.call(n,i)&&n[i]&&e.push(i);else e.push(n.toString())}}return e.join(" ")}
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
6
|
-
*/var s;s={}.hasOwnProperty,e.exports?e.exports=a.default=a:window.classNames=a}),me=function(n){return["className","data-test"].reduce(function(e,t){return n[t]?z(z({},e),{},pe({},t,n[t])):z({},e)},{})},k=function(e){function t(){return fe.createElement("span",de({"data-test":"DesignSystem-Avatar"},f,{className:p}),u&&fe.createElement(ye,{weight:"medium",appearance:"white",className:d},u),!u&&fe.createElement(Q,{"data-test":"DesignSystem-Avatar--Icon",name:"person",size:"regular"===o?16:12,appearance:"white",className:h}))}var n=e.withTooltip,r=e.tooltipPosition,o=e.size,i=e.children,a=e.firstName,s=e.lastName,c=e.className,l=e.appearance,f=me(e),u=i?i.trim().slice(0,2):"".concat(a?a.trim()[0]:"").concat(s?s.trim()[0]:""),e=i||"".concat(a||""," ").concat(s||"")||"",i=l||["accent4","primary","accent3","alert","accent2","warning","accent1","success"][(u.charCodeAt(0)+(u.charCodeAt(1)||0))%8]||"secondary",p=he((pe(a={Avatar:!0},"Avatar--".concat(o),o),pe(a,"Avatar--".concat(i),i),pe(a,"Avatar--disabled",!u||!n),a),c),d=he((pe(s={},"Avatar-content--".concat(o),o),pe(s,"Avatar-content--".concat(i),i),s)),h=he(pe({},"Avatar-content--".concat(i),i));return n&&u?fe.createElement(ki,{tooltip:e,position:r,triggerClass:"flex-grow-0"},t()):t()},D=(k.displayName="Avatar",k.defaultProps={tooltipPosition:"bottom",withTooltip:!0,size:"regular"},fe.useEffect),T=fe.useState;x.displayName="Backdrop";function j(a,s,c,u){var l,f=!1,p=0;function d(){l&&clearTimeout(l)}function e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this,o=Date.now()-p;function i(){p=Date.now(),c.apply(r,t)}f||(u&&!l&&i(),d(),void 0===u&&a<o?i():!0!==s&&(l=setTimeout(u?function(){l=void 0}:i,void 0===u?a-o:a)))}return"boolean"!=typeof s&&(u=c,c=s,s=void 0),e.cancel=function(){d(),f=!0},e}function I(e,t,n){return void 0===n?j(e,t,!1):j(e,n,!1!==t)}function ve(e,n){return e.length===n.length&&e.every(function(e,t){return e.value===n[t].value||e.label===n[t].label})}function M(e){return void 0!==e}function N(e){return void 0!==e}function A(e,t,n){return e&&n&&""===t}function be(e,t,n,r){return r&&n&&0===t&&""===e}function P(e,t,n){if(e.length){if(0<e.length&&0<n&&e.length===t-n)return{indeterminate:!0,checked:!0};n=0<e.length&&e.length!==t;return{checked:0<e.length&&e.length===t,indeterminate:n}}return{indeterminate:!1,checked:!1}}function R(e){var t=e.children,n=void 0===(n=e.componentType)?"span":n,r=e.className,e=K(e,Y);return fe.createElement(n,z(z({},e),{},{className:r}),t)}function F(e){var n=e.onClick,r=e.onKeyDown,o=void 0===(t=e.role)?"button":t,t=K(e,Z);return z({},n?{onClick:n,role:o,tabIndex:0,"aria-label":t["aria-label"],onKeyDown:function(e){var t;r?r(e):(t=e.key,X(o,t)&&n&&(e.preventDefault(),n(e)))}}:{role:o,"aria-label":t["aria-label"]})}function B(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===e?t:3&t|8).toString(16)})}function _e(e){function l(){i||f&&f(d)}var t=e.optionData,o=e.selected,n=e.onClick,f=e.updateActiveOption,r=e.onChange,p=e.active,d=e.index,h=e.checkboxes,y=e.menu,g=void 0===(g=(t.optionType?t:e).optionType)?"DEFAULT":g,i=t.disabled,a=he((pe(a={},"Option",!0),pe(a,"Option--active",p),pe(a,"Option--selected",o&&!y),pe(a,"Option--disabled",i),pe(a,"OptionWrapper",!0),a)),s=he((pe(s={},"Option-checkbox",!0),pe(s,"Option-checkbox--active",p),pe(s,"OptionWrapper",!0),s)),c=he((pe(c={},"Option-text",!0),pe(c,"Option-text--wrap",!e.truncateOption),c)),u=he((pe(u={},"OptionWrapper",!0),pe(u,"OptionWrapper--disabled",i),u));return e.optionRenderer?fe.createElement("div",de({"data-test":"DesignSystem-DropdownOption--Custom",className:u,"data-disabled":i,onMouseEnter:l},!h&&{onClick:n}),e.optionRenderer({optionData:t,selected:o,onChange:r,active:p,index:d})):(0,te[u=h?"WITH_CHECKBOX":g])({selected:o,index:d,renderSubInfo:function(e){var t=i?"disabled":o?"white":"subtle",n=o?"white":"disabled";if("string"==typeof e)return fe.createElement(ye,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",appearance:t,size:"small",weight:"medium"},e);var r=e.list,e=e.seperator;return fe.createElement(bt,{list:void 0===r?[]:r,seperator:e,iconAppearance:n,labelAppearance:t,seperatorAppearance:n,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})},optionData:t,textClassName:c,appearance:i?"disabled":o&&!y?"white":"default",onClickHandler:function(e){e.stopPropagation(),i||n&&n()},onChangeHandler:function(e){e.stopPropagation(),i||r&&r(e)},onUpdateActiveOption:l,dataTest:"DesignSystem-DropdownOption--".concat(u),className:h?s:a})}function U(e){var t,n=void 0===(n=e.size)?"small":n,r=e.round,o=e.className,e=me(e),r=he((pe(t={PlaceholderImage:!0,"Placeholder--animation":!0},"PlaceholderImage--round",r),pe(t,"PlaceholderImage--".concat(n),n),t),o);return fe.createElement("span",de({},e,{className:r}))}function we(e){switch(e.loadingType){case"DEFAULT":return fe.createElement(ne,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"});case"WITH_ICON":return fe.createElement(re,{withImage:!0,round:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},fe.createElement(ne,{length:"large"}));case"WITH_META":return fe.createElement(re,{withImage:!1,"data-test":"DesignSystem-Dropdown--Placeholder"},fe.createElement(ne,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),fe.createElement(ne,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}));case"WITH_CHECKBOX":return fe.createElement(re,{withImage:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},fe.createElement(ne,{length:"large"}));case"ICON_WITH_META":return fe.createElement(re,{withImage:!0,round:!0,imageSize:"medium","data-test":"DesignSystem-Dropdown--Placeholder"},fe.createElement(ne,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),fe.createElement(ne,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}))}return null}function q(o){function u(e,t){U(e,t),ne||null!==(e=s.current)&&void 0!==e&&e.focus(),X(n)}function l(){var e;H(),null!==(e=s.current)&&void 0!==e&&e.focus()}function p(){var e;K(),null!==(e=s.current)&&void 0!==e&&e.focus()}function d(){X(n),B&&P&&B("")}function h(e){X(n),B&&B(e.target.value)}function y(e,t){var n=o.onClearOptions,r=j.every(function(e){return e.disabled});return fe.createElement("div",{className:ce(t),style:se(++Q)},fe.createElement(ye,{size:"small",appearance:"subtle"},e),t&&fe.createElement(xe,{onClick:n,disabled:r,appearance:"transparent",size:"tiny",type:"button"},"Clear"))}function g(t,e){var n=be(P,N,D,a)?e+1===f:e===f,r=-1!==I.findIndex(function(e){return e.value===t.value});return fe.createElement("div",{style:se(++Q),className:ae},fe.createElement(_e,{optionData:t,truncateOption:k,selected:r,index:e,updateActiveOption:le,optionRenderer:z,active:n,checkboxes:a,menu:A,onClick:function(){return ue(t)},onChange:function(e){return o.onSelect(t,e.target.checked)},optionType:o.optionType}))}function m(e,t){for(var n,r,o,i,a,s=document.querySelectorAll(t),c="down"===e?f+1:f-1,l="down"===e?s.length:-1;c!==l;){if("true"!==s[c].getAttribute("data-disabled")){var u=s[c];u&&(n=V.current,r=u,a=i=o=void 0,o=null==n?void 0:n.getBoundingClientRect(),i=r.getBoundingClientRect(),a=r.offsetHeight,i.bottom>o.bottom&&n?Se(n,r.offsetTop-o.height+a):i.top<o.top&&n&&Se(n,r.offsetTop-a)),void 0!==u&&X(c);break}"down"===e?c++:c--}}var v,b,_,w=void 0===(E=o.listOptions)?[]:E,S=o.inputRef,E=void 0===(E=o.align)?"right":E,C=void 0===(C=o.optionType)?"DEFAULT":C,O=void 0===(O=o.applyButtonLabel)?"Apply":O,x=void 0===(x=o.cancelButtonLabel)?"Cancel":x,k=void 0===(e=o.truncateOption)||e,D=void 0===(e=o.withSelectAll)||e,e=void 0===(e=o.maxHeight)?200:e,T=o.customTrigger,j=o.selected,I=o.tempSelected,M=o.previousSelected,N=o.remainingOptions,n=o.firstEnabledOption,i=o.dropdownOpen,A=o.menu,P=o.searchTerm,R=o.showApplyButton,a=o.withCheckbox,L=o.withSearch,F=o.popoverOptions,B=o.onSearchChange,z=o.optionRenderer,K=o.applyOptions,H=o.cancelOptions,U=o.toggleDropdown,t=o.className,q=void 0===(q=o.searchPlaceholder)?"Search..":q,W=me(o),V=fe.createRef(),G=fe.createRef(),s=fe.createRef(),Y=fe.createRef(),$=fe.createRef(),Z=(r=ge(fe.useState(),2))[0],J=r[1],f=(r=ge(fe.useState(n),2))[0],X=r[1],Q=0;fe.useEffect(function(){var e,t,n,r;i&&(e=o.width,t=o.minWidth,n=o.maxWidth,r=null===(r=G.current)||void 0===r?void 0:r.clientWidth,J({width:e||r,minWidth:t||(R?176:A?128:r),maxWidth:n||"100%"}))},[i]),fe.useEffect(function(){n!==f&&X(n)},[n]);var r=void 0===(r=o.triggerSize)?"regular":r,c=void 0===(c=o.placeholder)?"Select":c,ee=o.icon,te=o.error,ne=o.disabled,re=o.inlineLabel,oe=o.triggerLabel,ie=T?T(oe||c):fe.createElement(fe.Fragment,null),T=T?fe.cloneElement(ie,{tabIndex:0,ref:s}):fe.createElement(Ee,{placeholder:c,triggerSize:r,open:i,icon:ee,disabled:ne,inlineLabel:re,menu:A,error:te,ref:s},oe),ie={maxHeight:e,overflowY:"auto",overflowX:"hidden"},ae=he((pe(c={},"fade-in",i),pe(c,"opacity-0",!0),pe(c,"Dropdown-items",!0),pe(c,"fade-out",!i),c)),se=function(e){return{animationDelay:80*(i?e:-1*e)+"ms"}},ce=function(e){var t;return he((pe(t={},"Dropdown-section",!0),pe(t,"Dropdown-section--withClear",e),t),ae)},r=he(pe({},"Dropdown",!0),t),re=he((pe(ee={},"Dropdown-wrapper",!0),pe(ee,"Dropdown-wrapper--wrap",!k),ee)),oe=he((pe(te={},"Option-checkbox",!0),pe(te,"Option-checkbox--active",0===f),pe(te,"OptionWrapper",!0),te),ae),ue=function(e){o.onOptionSelect(e),null!==(e=s.current)&&void 0!==e&&e.focus()},le=function(e,t){t=a&&D&&!o.async&&!t?e+1:e;X(t)};return fe.createElement("div",de({},W,{className:r,ref:G,onKeyDown:function(e){var t=".OptionWrapper";switch(e.key){case"ArrowDown":e.preventDefault(),i?m("down",t):u(!i);break;case"ArrowUp":e.preventDefault(),i?m("up",t):u(!i);break;case"Enter":var n=document.activeElement;!i||S.current!==n&&s.current!==n||(e.preventDefault(),n=a?"".concat(t," .Checkbox-input"):t,(n=document.querySelectorAll(n)[f])&&n.click()),i||u(!i);break;case"Tab":if(!R&&i)return e.preventDefault(),void u(!1,"onClick");var n=document.activeElement,r=null===(r=$.current)||void 0===r?void 0:r.disabled;if((n===Y.current&&r||n===$.current)&&i)return e.preventDefault(),void u(!1,"onClick");R&&i&&(e.preventDefault(),n===Y.current?null!==(r=$.current)&&void 0!==r&&r.focus():null!==(n=Y.current)&&void 0!==n&&n.focus())}}}),fe.createElement(Ci,de({onToggle:u,trigger:T,triggerClass:A?"":"w-100",open:i,customStyle:Z,position:Oe[E]},F,{"data-test":"DesignSystem-Dropdown--Popover"}),(L||o.async)&&fe.createElement("div",{className:"Dropdown-inputWrapper ".concat(ae),style:se(++Q)},fe.createElement(ut,{name:"Dropdown-search",icon:"search",value:P,placeholder:q,autoFocus:!0,onChange:h,onClear:d,ref:S,autoComplete:"off",className:"Dropdown-input"})),(e=o.selectedSectionLabel,_=void 0===e?"Selected Items":e,e=void 0===(e=o.loadersCount)?10:e,c=o.loadingOptions,t=be(P,N,D,a),e&&c?fe.createElement("div",{className:"Dropdown-loading"},fe.createElement("div",{className:"Dropdown-wrapper",style:ie},(b=e,b=Array(e).fill("Loading"),v=a?"WITH_CHECKBOX":C,b.map(function(e,t){return fe.createElement("div",{className:"Option-loading",key:"".concat(e,"-").concat(t)},fe.createElement(we,{loadingType:v}))})))):0!==w.length||c?fe.createElement("div",{className:re,style:ie,ref:V},t&&(e=void 0===(e=o.selectAllLabel)?"Select All":e,b=o.selectAll,c=o.onSelectAll,e=e.trim()?e.trim():"Select All",fe.createElement("div",{style:se(++Q),className:oe,onMouseEnter:function(){return le(0,!0)}},fe.createElement(Ce,{label:e,onChange:c,checked:b.checked,indeterminate:b.indeterminate,tabIndex:-1,className:"OptionCheckbox"}))),0<j.length&&y(_,!0),j.map(g),w.map(function(e,t){var n,r=0<t?w[t-1].group:j.length?_:void 0,o=e.group,r=r!==o,i=t+j.length;return fe.createElement("div",{className:(n=i,he(pe({},"Dropdown--border",r&&0!==n))),key:t},r&&o&&y(o),g(e,i))}),o.async&&0<N&&(t=void 0===(t=o.footerLabel)?"Search for more options":t,fe.createElement("div",{className:"Dropdown-footer ".concat(ae),style:se(++Q)},fe.createElement(ye,{size:"small",appearance:"subtle"},t)))):(e=o.noResultMessage,fe.createElement("div",{className:"Dropdown-errorWrapper","data-test":"DesignSystem-Dropdown--errorWrapper"},fe.createElement("div",{className:"Option"},fe.createElement("div",{className:"Option-subinfo"},void 0===e?"No result found":e))))),R&&a&&(ee=ve(M,I),fe.createElement("div",{className:"Dropdown-buttonWrapper ".concat(ae),style:se(++Q)},fe.createElement(xe,{ref:Y,className:"mr-4",appearance:"basic",onClick:l,size:"tiny",tabIndex:-1,type:"button"},x),fe.createElement(xe,{ref:$,appearance:"primary",disabled:ee,size:"tiny",onClick:p,type:"button"},O)))))}var Se=function(e,t){e.scrollTo(0,t)},W=["triggerSize","placeholder","menu","children","icon","disabled","open","inlineLabel","error"],Ee=fe.forwardRef(function(e,l){var t,n=e.triggerSize,n=void 0===n?"regular":n,r=e.placeholder,r=void 0===r?"Select":r,o=e.menu,o=void 0!==o&&o,i=e.children,a=e.icon,s=e.disabled,c=e.open,u=e.inlineLabel,f=e.error,e=K(e,W),p=s?"disabled":"default",r=r.trim(),r=i||r,d=o?a||"more_horiz":"keyboard_arrow_down",n=he((pe(t={},"Button",!0),pe(t,"DropdownButton",!0),pe(t,"DropdownButton--".concat(n),n),pe(t,"DropdownButton--".concat(n,"Square"),o),pe(t,"DropdownButton--placeholder",!i&&!o),pe(t,"DropdownButton--icon",a),pe(t,"DropdownButton--open",c),pe(t,"DropdownButton--error",f),t)),f=he((pe(c={},"Text",!0),pe(c,"Text--regular",!0),pe(c,"DropdownButton-text",!0),c));return fe.createElement("button",de({ref:l,type:"button",value:i,className:n,disabled:s,tabIndex:0,"data-test":"DesignSystem-DropdownTrigger"},e),!o&&fe.createElement("div",{className:"DropdownButton-wrapper"},u&&fe.createElement(ye,{appearance:"subtle",className:"mr-4 white-space-nowrap"},"".concat(u.trim().charAt(0).toUpperCase()).concat(u.trim().slice(1))),a&&!u&&fe.createElement(Q,{appearance:p,className:"d-flex align-items-center mr-4",name:a}),r&&fe.createElement("span",{className:f},r)),fe.createElement(Q,{appearance:p,name:d}))}),Y=(Ee.displayName="DropdownButton",["children","componentType","className"]),$=["appearance","size","children","weight","small","className"],ye=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.weight,a=e.small,s=e.className,e=K(e,$),n=he((pe(t={Text:!0},"Text--".concat(n),n),pe(t,"Text--".concat(i),i),pe(t,"Text--".concat(r),r),pe(t,"Text--small","small"===r||a),t),s);return fe.createElement(R,de({"data-test":"DesignSystem-Text"},e,{className:n,componentType:"span"}),o)},Z=(ye.displayName="Text",ye.defaultProps={appearance:"default",size:"regular"},["onClick","onKeyDown","role"]),J={button:new Set(["Enter","Space","Spacebar"," "]),link:new Set(["Enter"]),checkbox:new Set([]),radio:new Set([])},X=function(e,t){return!!J[e]&&J[e].has(t)},Q=function(e){function t(e){return"outline"===e?"outlined":"rounded"===e?"round":e}var n,r=e.appearance,o=e.className,i=e.name,a=e.size,s=e.children,l=F(e),c=me(e),e=t(e.type),u=r&&r.includes("_")?(n=(u=r).indexOf("_"),u.slice(0,n)+u.charAt(n+1).toUpperCase()+u.slice(n+2)):r,r=he((pe(n={},"material-icons",!0),pe(n,"material-icons-".concat(t(e)),e&&"filled"!==e),pe(n,"Icon",!0),pe(n,"Icon--".concat(u),r),pe(n,"".concat(o),o),n)),a={fontSize:"".concat(a,"px"),width:"".concat(a,"px")};return s&&fe.isValidElement(s)?fe.createElement("span",de({},c,{className:o}),s):fe.createElement("i",de({},c,{className:r,style:a},l),e?"".concat(i,"_").concat(e):i)},ee=(Q.displayName="Icon",Q.defaultProps={size:16,type:"round"},["size","tabIndex","defaultChecked","indeterminate","label","disabled","onChange","name","value","className","checked","helpText"]),Ce=fe.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.tabIndex,r=void 0===r?0:r,l=e.defaultChecked,o=e.indeterminate,i=e.label,a=e.disabled,f=e.onChange,p=e.name,d=e.value,s=e.className,c=e.checked,h=e.helpText,y=K(e,ee),g=fe.useRef(null);fe.useImperativeHandle(t,function(){return g.current});var t=ge(fe.useState(void 0===c?l:c),2),m=t[0],v=t[1],t=(fe.useEffect(function(){_(o)},[o]),fe.useEffect(function(){void 0!==c&&v(c)},[c]),he((pe(t={},"Checkbox",!0),pe(t,"Checkbox--disabled",a),t),s)),s=he((pe(s={},"Checkbox-outerWrapper",!0),pe(s,"Checkbox-outerWrapper--".concat(n),n),s)),e=he((pe(u={},"Checkbox-input",!0),pe(u,"Checkbox-input--checked",m),pe(u,"Checkbox-input--indeterminate",e.indeterminate),u)),u=he(pe({},"Checkbox-wrapper",!0)),b=he(pe({},"Checkbox-label",!0)),_=function(e){g.current.indeterminate=e},w="".concat(p,"-").concat(i,"-").concat(B()),S=o?"remove":m?"check":"",E="tiny"===n?12:16;return fe.createElement(fe.Fragment,null,fe.createElement("div",{"data-test":"DesignSystem-Checkbox",className:t},fe.createElement("div",{"data-test":"DesignSystem-Checkbox-OuterWrapper",className:s},fe.createElement("input",de({},y,{type:"checkbox",defaultChecked:l,onChange:function(e){void 0===c&&(v(e.target.checked),_(e.target.indeterminate)),f&&f(e)},checked:m,disabled:a,ref:g,name:p,value:d,className:e,tabIndex:r,id:w,"data-test":"DesignSystem-Checkbox-InputBox"})),fe.createElement("span",{className:u,"data-test":"DesignSystem-Checkbox-Icon"},S&&fe.createElement(Q,{name:S,size:E,appearance:"white"}))),fe.createElement("div",{className:"Checkbox-labelWrapper"},i&&i.trim()&&fe.createElement("label",{htmlFor:w,className:b,"data-test":"DesignSystem-Checkbox-Label"},fe.createElement(ye,{size:"tiny"===n?"small":"regular",appearance:a?"disabled":"default"},i.trim())),h&&fe.createElement(ye,{"data-test":"DesignSystem-Checkbox-HelpText",size:"small",appearance:a?"disabled":"subtle"},h.trim()))))}),te=(Ce.displayName="Checkbox",pe(Xe={},"DEFAULT",function(e){var t=e.className,n=e.textClassName,r=e.onClickHandler,o=e.optionData,i=e.appearance,a=e.onUpdateActiveOption,e=e.dataTest,s=o.label,o=o.disabled;return fe.createElement("div",{className:t,onClick:r,onMouseEnter:a,"data-test":e,"data-disabled":o},fe.createElement("div",{className:"Option-label"},fe.createElement(ye,{className:n,appearance:i},s)))}),pe(Xe,"WITH_ICON",function(e){var t,n=e.className,r=e.textClassName,o=e.onClickHandler,i=e.optionData,a=e.onUpdateActiveOption,s=e.appearance,e=e.dataTest,c=i.label,u=i.icon,i=i.disabled,n=he((pe(t={},"".concat(n),!0),pe(t,"Option--icon",u),t));return fe.createElement("div",{className:n,onClick:o,onMouseEnter:a,"data-test":e,"data-disabled":i},u&&fe.createElement(Q,{className:"Option-icon mr-4","data-test":"".concat(e,"--Icon"),name:u,appearance:s}),fe.createElement("div",{className:"Option-label"},fe.createElement(ye,{className:r,appearance:s},c)))}),pe(Xe,"WITH_META",function(e){var t=e.className,n=e.textClassName,r=e.onClickHandler,o=e.optionData,i=e.onUpdateActiveOption,a=e.renderSubInfo,s=e.appearance,e=e.dataTest,c=o.subInfo,u=o.label,o=o.disabled;return fe.createElement("div",{className:t,onClick:r,onMouseEnter:i,"data-test":e,"data-disabled":o},fe.createElement("div",{className:"Option-label"},fe.createElement(ye,{className:n,appearance:s},u),c&&a(c)))}),pe(Xe,"WITH_CHECKBOX",function(e){var t=e.className,o=e.selected,n=e.optionData,r=e.onChangeHandler,i=e.onUpdateActiveOption,e=e.dataTest,a=n.subInfo,s=n.label,c=n.disabled;return fe.createElement("div",{className:t,onMouseEnter:i,"data-test":e,"data-disabled":c},fe.createElement(Ce,{label:s,disabled:c,checked:o,onChange:r,tabIndex:-1,className:"OptionCheckbox ".concat(a?"pb-0":""),"data-test":"".concat(e,"--Checkbox")}),a&&fe.createElement("div",{className:"pl-8 ml-3"},function(e){var t=c?"disabled":"subtle",n=o?"white":"disabled";if("string"==typeof e)return fe.createElement(ye,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",appearance:t,size:"small",weight:"medium"},e);var r=e.list,e=e.seperator;return fe.createElement(bt,{list:void 0===r?[]:r,seperator:e,iconAppearance:n,labelAppearance:t,seperatorAppearance:n,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})}(a)))}),pe(Xe,"ICON_WITH_META",function(e){var t,n=e.className,r=e.textClassName,o=e.renderSubInfo,i=e.onClickHandler,a=e.optionData,l=e.onUpdateActiveOption,s=e.appearance,e=e.dataTest,c=a.subInfo,f=a.label,u=a.icon,a=a.disabled,n=he((pe(t={},"".concat(n),!0),pe(t,"Option--icon",u),t));return fe.createElement("div",{className:n,onClick:i,onMouseEnter:l,"data-test":e,"data-disabled":a},u&&fe.createElement(Q,{"data-test":"".concat(e,"--Icon"),className:"Option-icon mr-4",name:u,appearance:s}),fe.createElement("div",{className:"Option-label"},fe.createElement(ye,{className:r,appearance:s},f),c&&o(c)))}),Xe),ne=function(e){var t,n=e.length,r=e.size,o=e.className,e=me(e),i=he(pe({"Placeholder--animation":!0,PlaceholderParagraph:!0},"PlaceholderParagraph--".concat(r),r)),n=he((pe(t={"PlaceholderParagraph-wrapper":!0},"PlaceholderParagraph-wrapper--length-".concat(n),n),pe(t,"PlaceholderParagraph-wrapper--size-".concat(r),r),t),o);return fe.createElement("div",de({},e,{className:n}),fe.createElement("span",{className:i}))},re=(ne.displayName="PlaceholderParagraph",ne.defaultProps={length:"medium"},U.displayName="PlaceholderImage",U.defaultProps={size:"small"},function(e){var t=e.imageSize,n=e.withImage,r=e.round,o=e.children,i=e.className,e=me(e),a=he(pe({"Placeholder-paragraph":!0},"Placeholder-paragraph--withImage",n)),i=he(pe({},"Placeholder",!0),i);return fe.createElement("div",de({"data-test":"DesignSystem-Placeholder"},e,{className:i}),n&&fe.createElement(U,{round:r,size:t,"data-test":"DesignSystem-Placeholder--Image"}),o&&fe.createElement("div",{className:a,"data-test":"DesignSystem-Placeholder--Paragraph"},o))}),Oe=(re.displayName="Placeholder",re.defaultProps={withImage:!0,imageSize:"small"},{right:"bottom-start",left:"bottom-end"}),oe=(q.displayName="DropdownList",["triggerOptions","selected"]),ie=fe.createRef(),ae=function(){h(l,fe["Component"]);var u=y(l);function l(e){d(this,l),pe(V(m=u.call(this,e)),"staticLimit",void 0),pe(V(m),"getDisabledOptions",function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).filter(function(e){return e.disabled})}),pe(V(m),"fetchOptionsFunction",function(t){var n,e=m.props.options,r=t?(n=t,e.filter(function(e){return e.label.toLowerCase().includes(n.toLowerCase())})):e;return new Promise(function(e){e({searchTerm:t,options:r,count:r.length})})}),pe(V(m),"getUnSelectedOptions",function(e,t){if(e.length){if(!t)return e.filter(function(t){return-1===m.state.tempSelected.findIndex(function(e){return e.value===t.value})});var t=m.props.selected,n=void 0===t?[]:t;return e.filter(function(t){return M(m.props.selected)?-1===n.findIndex(function(e){return e.value===t.value}):!t.selected})}return e}),pe(V(m),"getSelectedOptions",function(e,t){var n=m.props.selected;return e.length?t?M(m.props.selected)?void 0===n?[]:n:e.filter(function(e){return e.selected}):m.state.tempSelected:[]}),pe(V(m),"updateOptions",function(a,e){var t=m.state,s=t.searchTerm,c=t.selectAll,u=t.tempSelected,l=t.previousSelected,f=void 0===e?m.state.async:e,t=m.props,e=t.fetchOptions,p=t.withCheckbox,d=t.withSearch;(e||m.fetchOptionsFunction)(s).then(function(e){var t,n,r,o=e.options,i=e.count;(!e.searchTerm||e.searchTerm&&e.searchTerm===m.state.searchTerm)&&(f=""===s?i>m.staticLimit:f,e=A(f,s,p)?m.getUnSelectedOptions(o,a):o,o=""===s?m.getSelectedOptions(o,a):[],n=""===s?i:m.state.optionsLength,r=m.getDisabledOptions(e.slice(0,m.staticLimit)),m.setState(z(z({},m.state),{},{optionsLength:n,loading:!1,async:f,searchedOptionsLength:i,options:e.slice(0,m.staticLimit),tempSelected:a?o:u,previousSelected:a?o:l,selected:A(f,s,p)?o:[],triggerLabel:m.updateTriggerLabel(a?o:u),selectAll:!f&&a?P(o,n,r.length):c})),(f||d)&&null!==(t=ie.current)&&void 0!==t&&t.focus())})}),pe(V(m),"updateSearchTerm",function(e){m.setState(z(z({},m.state),{},{loading:!0,searchInit:!0,searchTerm:e}))}),pe(V(m),"updateOnPopperToggle",function(){var e,t=m.props,n=t.withCheckbox,r=t.showApplyButton,o=t.onClose,l=t.name,t=t.selected,t=void 0===t?[]:t,i=m.state,a=i.previousSelected,f=i.tempSelected,s=i.optionsLength,p=i.async,d=i.loading,c=i.searchTerm,i=i.options,u=(N(m.props.open)?m.props:m.state).open,i=m.getDisabledOptions(i).length;n&&r&&(e=M(m.props.selected)?t:a,m.setState({tempSelected:e,selectAll:P(e,s,i),triggerLabel:m.updateTriggerLabel(e)})),N(m.props.open)&&m.setState({open:u}),u&&(s=A(p,c,n)&&!ve(m.state.selected,f),m.setState({loading:s||d||""!==c,searchInit:""!==c,searchTerm:""}),s&&m.updateOptions(!1)),o&&!u&&o((n&&r?M(m.props.selected)?t:a:m.state.tempSelected).map(function(e){return e.value}),l)}),pe(V(m),"updateTriggerLabel",function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=e.length;if(0===t)return"";var n=m.props,r=n.triggerOptions,r=void 0===r?{}:r,n=n.getLabel,o=r.customLabel,r=r.labelLimit,i=m.state?m.state.optionsLength:1<arguments.length?arguments[1]:void 0,a="",a=t<=(void 0===r?2:r)?e.map(function(e){return e.label}).join(", "):o?o(t,i,e):"".concat(t," selected");return n&&n(a),a}),pe(V(m),"updateSelectedOptions",function(e,l,t){var n=m.state,r=n.optionsLength,f=n.previousSelected,o=n.selected,p=n.loading,n=n.open,i=m.props,a=i.onChange,s=i.withCheckbox,c=i.showApplyButton,d=i.closeOnSelect,h=i.name,i=i.onPopperToggle,y=s&&c&&t,g=m.getDisabledOptions(m.state.options),u=0===e.length&&0<o.length||e.every(function(e){return e.disabled})&&!o.every(function(e){return e.disabled});m.setState(z(z({},m.state),{},{tempSelected:e,triggerLabel:m.updateTriggerLabel(e),selectAll:P(e,r,g.length),open:N(m.props.open)||s?n:!d,previousSelected:y?e:f,selected:u?e:o,loading:!!u||p})),u&&m.debounceClear(),!a||c&&!t||(r=e.map(function(e){return e.value}),a(l?r[0]:r,h)),!s&&d&&i&&N(m.props.open)&&i(!1,"optionClick")}),pe(V(m),"onOptionSelect",function(e){var t=m.props,n=t.onUpdate,t=t.selected;M(t)?n&&n("select-option",e):m.updateSelectedOptions([e],!0)}),pe(V(m),"onSelect",function(t,e){var n=m.props,r=n.onUpdate,o=n.selected,n=n.showApplyButton;!M(o)||n?(o=m.state.tempSelected.slice(),e||(n=o.findIndex(function(e){return e.value===t.value}),o.splice(n,1)),o=e?o.concat(t):o,m.updateSelectedOptions(o,!1)):r&&r(e?"select-option":"deselect-option",t)}),pe(V(m),"onSelectAll",function(e){var t=m.props,n=t.onUpdate,r=t.selected,t=t.showApplyButton,o=m.state,i=o.tempSelected,o=o.options;!M(r)||t?(r=i.slice().filter(function(e){return e.disabled}),t=e.target.checked?[].concat(H(o.filter(function(e){return!e.disabled})),H(r)):r,m.updateSelectedOptions(t,!1)):n&&n(e.target.checked?"select-all":"deselect-all")}),pe(V(m),"debounceSearch",I(m.props.searchDebounceDuration,function(){m.setState({searchInit:!1},function(){m.updateOptions(!1)})})),pe(V(m),"debounceClear",I(250,function(){return m.updateOptions(!1)})),pe(V(m),"onClearOptions",function(){var e=m.props,t=e.selected,n=e.name,r=e.onUpdate,o=e.showApplyButton,e=e.onChange,i=m.state.tempSelected.filter(function(e){return e.disabled});!M(t)||o?(m.setState({selected:i,tempSelected:i,triggerLabel:"",loading:!0}),m.debounceClear(),e&&!o&&e(i,n)):r&&r("clear-all")}),pe(V(m),"onTogglePopper",function(e){var t=m.props.onPopperToggle;t&&N(m.props.open)&&t(!1,e)}),pe(V(m),"onCancelOptions",function(){var e=m.state,t=e.previousSelected,n=e.tempSelected,e=e.optionsLength,r=m.props,o=r.selected,i=r.onUpdate,a=r.onClose,r=r.name,s=!!N(m.props.open)&&m.state.open,c=t.map(function(e){return e.value});if(M(o))return i&&i("cancel-selected",t,n),void m.onTogglePopper("cancelClick");o=m.updateTriggerLabel(t),i=m.getDisabledOptions(m.state.options);m.setState(z(z({},m.state),{},{tempSelected:t,selectAll:P(t,e,i.length),triggerLabel:o,open:s})),a&&!s&&a(c,r),m.onTogglePopper("cancelClick")}),pe(V(m),"onApplyOptions",function(){var e=m.state,t=e.tempSelected,e=e.previousSelected,n=m.props,r=n.onChange,o=n.selected,i=n.onUpdate,a=n.onClose,n=n.name,s=!!N(m.props.open)&&m.state.open,c=t.map(function(e){return e.value});if(M(o))return i&&i("apply-selected",e,t),void m.onTogglePopper("applyClick");m.setState(z(z({},m.state),{},{previousSelected:t,optionsApplied:!0,open:s})),r&&r(c,n),a&&!s&&a(c,n),m.onTogglePopper("applyClick")}),pe(V(m),"onToggleDropdown",function(e,t){var n;m.props.disabled||((n=m.props.onPopperToggle)&&N(m.props.open)?n(e,t):m.setState({open:e}))});var m,t=e.selected,t=void 0===t?[]:t,n=e.totalOptions,r=e.withCheckbox,o=e.loading,i=e.open,a=e.options,e=(m.staticLimit=Math.min(100,e.staticLimit),n||a.length),n="fetchOptions"in m.props||e>m.staticLimit,s=n?[]:m.getSelectedOptions(a,!0),c=m.getDisabledOptions(a);return m.state={async:n,optionsLength:e,open:i,searchInit:!1,searchedOptionsLength:e,optionsApplied:!1,options:a||[],loading:n||o,searchTerm:"",tempSelected:s,previousSelected:s,selected:A(n,"",r)?t:[],triggerLabel:m.updateTriggerLabel(s,e),selectAll:P(s,e,c.length)},m}return a(l,[{key:"componentDidMount",value:function(){this.state.async&&this.updateOptions(!0)}},{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a,s;this.state.async||(s=(r=this.props).loading,a=r.fetchOptions,n=r.options,r=r.withSearch,o=this.getDisabledOptions(n=void 0===n?[]:n).length,e.loading===s||a||(n.length>this.staticLimit?this.updateOptions(!0,!0):(a=this.getSelectedOptions(n,!0),this.setState(z(z({},this.state),{},{options:n,loading:s,tempSelected:a,previousSelected:a,optionsLength:n.length,searchedOptionsLength:n.length,triggerLabel:this.updateTriggerLabel(a),selectAll:P(a,this.state.optionsLength,o)})),r&&null!==(i=ie.current)&&void 0!==i&&i.focus()))),void 0!==this.props.selected&&e.selected!==this.props.selected&&e.loading===this.props.loading&&(s=!this.props.withCheckbox,this.updateSelectedOptions(this.props.selected,s,!0)),t.searchTerm!==this.state.searchTerm&&this.debounceSearch(),e.open===this.props.open&&t.open===this.state.open||N(this.props.open)&&this.props.open===this.state.open||this.updateOnPopperToggle()}},{key:"render",value:function(){var e=this.state,t=e.options,n=e.async,r=e.open,o=e.searchTerm,l=e.searchInit,f=e.loading,i=e.searchedOptionsLength,p=e.tempSelected,d=e.selectAll,h=e.triggerLabel,e=e.previousSelected,a=this.props,s=a.withSelectAll,s=void 0===s||s,a=a.withCheckbox,c=this.props,u=c.triggerOptions,u=void 0===u?{}:u,c=(c.selected,K(c,oe)),i=i-t.length,s=be(o,i,s,a)?0:t.findIndex(function(e){return!e.disabled});return fe.createElement(q,de({listOptions:t,inputRef:ie,remainingOptions:i,firstEnabledOption:s,loadingOptions:f,async:n,searchInit:l,dropdownOpen:r,searchTerm:o,triggerLabel:h,tempSelected:p,previousSelected:e,selected:this.state.selected,applyOptions:this.onApplyOptions,cancelOptions:this.onCancelOptions,toggleDropdown:this.onToggleDropdown,onClearOptions:this.onClearOptions,onSelect:this.onSelect,selectAll:d,onSearchChange:this.updateSearchTerm,onOptionSelect:this.onOptionSelect,onSelectAll:this.onSelectAll,customTrigger:u.customTrigger},c))}}]),l}(),se=(pe(ae,"defaultProps",{triggerOptions:{},options:[],closeOnSelect:!0,staticLimit:50,searchDebounceDuration:300}),["size","appearance","iconAlign","tabIndex","largeIcon","type","children","icon","expanded","selected","loading","disabled","className","tooltip"]),ce={tiny:12,regular:16,large:20},ue=fe.forwardRef(function(e,l){var t=e.size,t=void 0===t?"regular":t,n=e.appearance,n=void 0===n?"basic":n,r=e.iconAlign,r=void 0===r?"left":r,o=e.tabIndex,o=void 0===o?0:o,f=e.largeIcon,p=e.type,i=e.children,a=e.icon,s=e.expanded,d=e.selected,h=e.loading,y=e.disabled,c=e.className,e=(e.tooltip,K(e,se)),s=he((pe(u={},"Button",!0),pe(u,"Button--expanded",s),pe(u,"Button--".concat(t),t),pe(u,"Button--".concat(t,"Square"),!i),pe(u,"Button--".concat(n),n),pe(u,"Button--selected",d&&("basic"===n||"transparent"===n)),pe(u,"Button--iconAlign-".concat(r),i&&r),pe(u,"".concat(c),c),u)),u=he((pe(c={},"Button-icon",!0),pe(c,"Button-icon--".concat(r),i&&r),c));return fe.createElement("button",de({"data-test":"DesignSystem-Button",ref:l,type:p,className:s,disabled:y||h,tabIndex:o},e),h?fe.createElement(fe.Fragment,null,fe.createElement(Mt,{size:"small",appearance:"basic"===n||"transparent"===n?"secondary":"white","data-test":"DesignSystem-Button--Spinner",className:"Button-spinner"}),fe.createElement(ye,{className:"Button-text Button-text--hidden"},i||"")):fe.createElement(fe.Fragment,null,a&&fe.createElement("div",{className:u},fe.createElement(Q,{"data-test":"DesignSystem-Button--Icon",name:a,appearance:y?"disabled":"basic"===n||"transparent"===n?d?"info":"default":"white",size:f&&!i?ce[t]+4:ce[t]})),i))}),xe=(ue.displayName="ButtonElement",fe.forwardRef(function(e,t){var n=e.icon,r=e.tooltip,o=e.children;return n&&r&&!o?fe.createElement(ki,{tooltip:r},fe.createElement(ue,de({},e,{ref:t}))):fe.createElement(ue,de({},e,{ref:t}))}));xe.displayName="Button";function le(e){return["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].indexOf(e)}function ke(e,t){return new Date(e,t+1,0).getDate()}function De(e,t,n){if(e){var r=Ye(e).decadeYear;switch(t){case"less":if(r<n)return!0;break;case"more":if(n<r)return!0;break;case"equal":if(r===n)return!0}}return!1}function Te(e,t,n,r,o){if(e){var e=Ye(e),i=e.year,a=e.month,s=e.date;switch(t){case"less":if(i<n)return!0;if(n<i)return!1;if(void 0!==r){if(a<r)return!0;if(r<a)return!1}if(void 0!==o&&s<o)return!0;break;case"more":if(n<i)return!0;if(i<n)return!1;if(void 0!==r){if(r<a)return!0;if(a<r)return!1}if(void 0!==o&&o<s)return!0;break;case"equal":if(void 0!==o){if(i===n&&a===r&&s===o)return!0}else if(void 0!==r){if(i===n&&a===r)return!0}else if(i===n)return!0}}return!1}function je(e,t){var r,o,i,a,s;return e&&t?(t=Ye(t),r=t.year,o=t.month,i=t.date,a=e.includes("/")?"/":"-",(s=e.split(a)).reduce(function(e,t,n){switch(t){case"mm":e+=(o<9&&"0")+(o+1);break;case"yyyy":e+=r;break;case"dd":e+=(i<10&&"0")+i}return n!==s.length-1&&(e+=a),e},"")):""}function Ie(e,t){var n,r,o,i,a;if(L(2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],t,e))return n=e.includes("/")?"/":"-",i=o=r=-1,a=t.split(n),e.split(n).forEach(function(e,t){switch(e){case"mm":o=+a[t]-1;break;case"yyyy":r=+a[t];break;case"dd":i=+a[t]}}),$e({year:r,month:o,date:i})}function Me(e){function t(e){var t;return he((pe(t={},"Chip-icon",!0),pe(t,"Chip-icon--".concat(e),e),pe(t,"cursor-pointer","right"===e&&!i),t))}var n,l=e.label,r=e.icon,o=e.clearButton,i=e.disabled,f=e.className,a=e.selected,s=e.onClose,c=e.onClick,e=me(e),u=he((pe(u={},"disabled",i&&!a),pe(u,"info",a),pe(u,"subtle",!(i||a||o||r)),pe(u,"default",!i&&!a&&!o&&r),u)),a=he((pe(n={},"disabled",i&&!a),pe(n,"link",a),pe(n,"default",!i&&!a),n));return fe.createElement("div",de({"data-test":"DesignSystem-GenericChip--GenericChipWrapper"},e,{className:"Chip-wrapper ".concat(f),onClick:function(){c&&c()}}),r&&fe.createElement(Q,{"data-test":"DesignSystem-GenericChip--Icon",name:r,appearance:u,className:t("left")}),fe.createElement(ye,{"data-test":"DesignSystem-GenericChip--Text",appearance:a},l),o&&fe.createElement(Q,{"data-test":"DesignSystem-GenericChip--clearButton",name:"clear",appearance:u,className:t("right"),onClick:function(e){e.stopPropagation(),s&&s()}}))}function Ne(e){var n=e.inputFormat,t=e.inputOptions,r=e.validators,o=e.state,i=e.setState,e=o.init,a=o.date,o=o.error,s=void 0===(c=t.placeholderChar)?"_":c,c=t.error||t.required&&o&&e,o=void 0===t.caption?"Invalid value":t.caption,u=C[n];return fe.createElement(ht,de({icon:"events",placeholder:n},t,{error:c,mask:u,value:a?je(n,a):e?ht.utils.getDefaultValue(u,s):"",onChange:function(e,t){i({open:!0}),t&&!t.includes(s)&&(t=Ie(n,t,r),i({date:t}))},onBlur:function(e,t){i({init:!0}),t&&!t.includes(s)||i({date:void 0})},onClear:function(){i({init:!0,date:void 0})},caption:c?o:"",validators:[function(e){return L(r,e,n)}],clearOnEmptyBlur:!1}))}function Ae(e,t){for(var n="",r=0;r<e.length;r++)n+="object"===G(e[r])?t:e[r];return n}function Pe(e){var t=e.required,n=e.optional,r=e.withInput,o=e.disabled,i=e.children,a=e.className,s=K(e,yt),e=me(e),r=he((pe(c={Label:!0},"Label--withInput",r),pe(c,"Label--optional",n),c),a),c=he({"Label-text":!0,"Label--disabled":o});return fe.createElement("div",de({"data-test":"DesignSystem-Label"},e,{className:r}),fe.createElement(R,de({"data-test":"DesignSystem-Label--Text",className:c,componentType:"label"},s),i),function(){return 0<arguments.length&&void 0!==arguments[0]&&arguments[0]?fe.createElement("span",{className:"Label-requiredIndicator","data-test":"DesignSystem-Label--RequiredIndicator"}):(1<arguments.length?arguments[1]:void 0)?fe.createElement(ye,{"data-test":"DesignSystem-Label--OptionalText",appearance:"subtle",className:"Label-optionalText"},"(optional)"):null}(t,n))}function Re(e){var t=e.label,n=e.icon,r=e.iconAppearance,e=e.labelAppearance;return fe.createElement("span",{"data-test":"DesignSystem-MetaList--Meta",className:"Meta"},n&&fe.createElement(Q,{"data-test":"DesignSystem-MetaList--MetaIcon",name:n,appearance:r,className:"Meta-icon"}),fe.createElement(ye,{"data-test":"DesignSystem-MetaList--MetaLabel",appearance:e},t))}function Le(e){return"".concat((100*e).toFixed(2),"%")}function Fe(e,t,n){return null==e?e:Math.min(Math.max(e,t),n)}var Be=12,ze=3,Ke=12,He=3,Ue=7,qe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],We={small:["Su","Mo","Tu","We","Th","Fr","Sa"],large:["Su","Mo","Tu","We","Th","Fr","Sa"]},Ve=Be,Ge=function(e){return e-e%Ve},Ye=function(e){var t,n,r;return(e=e&&$e(e))?(t=e.getFullYear(),n=e.getMonth(),r=e.getDay(),e=e.getDate(),{decadeYear:Ge(t),year:t,month:n,day:r,date:e}):{}},$e=function(e,t,n){var r;if(e)if("number"==typeof e)r=new Date(e);else{if("string"==typeof e)return t?Ie(t,e,n):void 0;r=e instanceof Date?e:(t=e.year,n=e.month,e=e.date,new Date(t,n,e,0,0,0))}return r},Ze=function(){h(p,fe["Component"]);var f=y(p);function p(e){d(this,p),pe(V(W=f.call(this,e)),"updateState",function(e,t,n){W.setState({year:e,month:t,date:n})}),pe(V(W),"getDateValue",function(e,t,n){return new Date(e,t,n)}),pe(V(W),"getNavDateInfo",function(e){var t=W.state,n=t.yearBlockNav,r=t.yearNav,t=t.monthNav,o=(t+e)%Ke==-1?11:(t+e)%Ke,r=0<=e?r+(0!==e&&o<t?1:0):r-(0!==e&&t<o?1:0);return{yearBlock:n,year:r,month:o}}),pe(V(W),"getInRangeError",function(){var e=W.props,t=e.rangePicker,e=e.rangeLimit,n=W.state,r=n.startDate,o=n.endDate,n=n.hoverDate;if(t&&e){var i,t=Ye(r),a=t.year,l=t.month,t=t.date,s=Ye(o),f=s.year,p=s.month,s=s.date,n=Ye(n),c=n.year,u=n.month,n=n.date;if(r)return(i=new Date(r)).setDate(t+e),Te(i,"less",c,u,n+1)||Te(i,"less",f,p,s+1);if(o)return(i=new Date(o)).setDate(s-e),Te(i,"more",c,u,n-1)||Te(i,"more",a,l,t-1)}return!1}),pe(V(W),"selectYear",function(e){return function(){W.updateState(e),W.setState({view:"month"})}}),pe(V(W),"yearMouseOverHandler",function(e,t,n,r){var o=W.props.onYearHover;o&&o({value:e,year:e,isCurrentYear:t,isDisabled:n},r)}),pe(V(W),"selectMonth",function(e){return function(){W.updateState(W.state.yearNav,e),W.setState({view:"date"})}}),pe(V(W),"monthMouseOverHandler",function(e,t,n,r){var o=qe,i=W.props.onMonthHover,o={value:o[e],month:o[e],year:W.state.year,isCurrentMonth:t,isDisabled:n};i&&i(o,r)}),pe(V(W),"selectDate",function(e,t,n,r){e=W.calculateDate(e,t,n,r,!1);W.setState({currDate:e})}),pe(V(W),"calculateDate",function(e,t,n,r,o){var i,a,s="",n=(t<=0?(i=e-1,a=n+t,s="prev"):r<t?(i=e+1,a=t-r,s="next"):(i=e,a=t),W.getNavDateInfo(i)),r=n.year,e=n.month;return!1===o&&(W.updateState(r,e,a),W.onNavIconClickHandler(s)()),W.getDateValue(r,e,a)}),pe(V(W),"onNavIconClickHandler",function(s){return function(){var e=W.state,t=e.view,n=e.yearBlockNav,r=e.yearNav,o=e.monthNav,i=Be,a=Ke;switch(t){case"year":"prev"===s&&W.setState({yearBlockNav:n-i}),"next"===s&&W.setState({yearBlockNav:n+i});break;case"month":"prev"===s&&W.setState({yearNav:r-1}),"next"===s&&W.setState({yearNav:r+1});break;case"date":"prev"===s&&(0===o&&W.setState({yearNav:r-1}),W.setState({monthNav:(a+o-1)%a})),"next"===s&&(o===a-1&&W.setState({yearNav:r+1}),W.setState({monthNav:(o+1)%a}))}}}),pe(V(W),"renderJumpButton",function(e){var t=W.props,n=t.disabledBefore,r=t.disabledAfter,t=t.size,o=W.state,i=o.view,a=o.yearBlockNav,s=o.yearNav,c=o.monthNav,u=!1;switch(i){case"year":"prev"===e&&(u=De(n,"more",a)||De(n,"equal",a)),"next"===e&&(u=De(r,"less",a)||De(r,"equal",a));break;case"month":"prev"===e&&(u=Te(n,"more",s-1)),"next"===e&&(u=Te(r,"less",s+1));break;case"date":"prev"===e&&(u=Te(n,"more",s,c-1)),"next"===e&&(u=Te(r,"less",s,c+1))}o=he(pe({"Calendar-headerIcon":!0},"Calendar-headerIcon--".concat(e),e));return fe.createElement(xe,{type:"button",className:o,appearance:"basic",icon:"arrow_".concat("next"===e?"forward":"back"),disabled:u,size:"small"===t?"tiny":"regular",onClick:W.onNavIconClickHandler(e)})}),pe(V(W),"onNavHeadingClickHandler",function(n){return function(){var e=W.props.monthsInView,t=W.props.jumpView;(t=t&&1<e?!1:t)&&("year"===n&&W.setState({view:"date"}),"month"===n&&W.setState({view:"year"}),"date"===n&&W.setState({view:"month"}))}}),pe(V(W),"renderHeaderContent",function(e){function t(e){return"small"===r?fe.createElement(fe.Fragment,null,fe.createElement(ye,{weight:"strong"},e),"year"!==i&&fe.createElement(Q,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"})):fe.createElement(fe.Fragment,null,fe.createElement(at,{size:"s"},e),"year"!==i&&fe.createElement(Q,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"}))}var n=W.props,r=n.size,n=n.monthsInView,o=W.state,i=o.view,o=o.yearBlockNav,a=Be,s=qe,c=W.getNavDateInfo(e),u=c.year,c=c.month,n=he({"Calendar-headerContent":!0,"Calendar-headerContent--noIcon-left":e===n-1,"Calendar-headerContent--noIcon-right":0===e}),e="";"year"===i&&(e="".concat(o," - ").concat(o+(a-1))),"month"===i&&(e="".concat(u));return fe.createElement("div",{className:n},"date"!==i&&fe.createElement("div",{className:"d-flex justify-content-center align-items-center",onClick:W.onNavHeadingClickHandler(i)},t(e)),"date"===i&&fe.createElement(fe.Fragment,null,fe.createElement("div",{onClick:W.onNavHeadingClickHandler(i),className:"d-flex justify-content-center align-items-center"},t(s[c])),fe.createElement("div",{className:"ml-4 d-flex justify-content-center align-items-center",onClick:W.onNavHeadingClickHandler("month")},t(u))))}),pe(V(W),"renderBodyYear",function(){var e=Be,c=ze,t=W.props,u=t.size,l=t.rangePicker,f=t.disabledBefore,p=t.disabledAfter,t=W.state,d=t.yearBlockNav,h=t.currYear,t=Math.ceil(e/c);return Array.from({length:t},function(e,s){return fe.createElement("div",{key:s,className:"Calendar-valueRow"},Array.from({length:c},function(e,t){var n,r,o,i,a=c*s+t;if(a!==d)return n=d+a,a=Te(f,"more",n)||Te(p,"less",n),r=!a&&!l&&n===W.state.year,o=function(){return n===h},i=he((pe(i={"Calendar-value":!0,"Calendar-value--active":r,"Calendar-value--disabled":a,"Calendar-yearValue":!0},"Calendar-yearValue--".concat(u),u),pe(i,"Calendar-value--currDateMonthYear",o()),i)),fe.createElement("div",{key:"".concat(s,"-").concat(t),"data-test":"DesignSystem-Calendar--yearValue",className:i,onClick:W.selectYear(n),onMouseOver:W.yearMouseOverHandler.bind(V(W),n,o(),a)},fe.createElement(ye,{size:"small"===u?"small":"regular",appearance:r?"white":a?"disabled":o()?"link":"default"},n))}))})}),pe(V(W),"renderBodyMonth",function(){var e=Ke,c=He,u=qe,t=W.props,l=t.size,f=t.disabledBefore,p=t.disabledAfter,t=W.state,d=t.yearNav,h=t.year,y=t.currYear,g=t.currMonth,t=Math.ceil(e/c);return Array.from({length:t},function(e,s){return fe.createElement("div",{key:s,className:"Calendar-valueRow"},Array.from({length:c},function(e,t){function n(){return y===d&&g===r}var r=c*s+t,o=Te(f,"more",d,r)||Te(p,"less",d,r),i=!o&&h===d&&r===W.state.month,a=he((pe(a={"Calendar-value":!0,"Calendar-value--active":i,"Calendar-value--dummy":o,"Calendar-monthValue":!0},"Calendar-monthValue--".concat(l),l),pe(a,"Calendar-value--currDateMonthYear",n()),a));return fe.createElement("div",{key:"".concat(s,"-").concat(t),"data-test":"DesignSystem-Calendar--monthValue",className:a,onClick:W.selectMonth(r),onMouseOver:W.monthMouseOverHandler.bind(V(W),r,n(),o)},fe.createElement(ye,{size:"small"===l?"small":"regular",appearance:i?"white":o?"disabled":n()?"link":"default"},u[r]))}))})}),pe(V(W),"onDateRowMouseLeaveHandler",function(){W.props.rangePicker&&W.setState({hoverDate:void 0})}),pe(V(W),"renderBodyDate",function(e){var o=Ue,i=We,t=W.props,a=t.size,s=t.firstDayOfWeek,c="large"===a?"regular":"small";return fe.createElement(fe.Fragment,null,fe.createElement("div",{className:"Calendar-dayValues"},Array.from({length:7},function(e,t){var n=he({"Calendar-valueWrapper":!0}),r=(t+o+le(s))%o;return fe.createElement(ye,{key:t,className:n,appearance:"default",weight:"strong",size:c},i[a][r])})),fe.createElement("div",{className:"Calendar-dateValues",onMouseLeave:W.onDateRowMouseLeaveHandler},W.renderDateValues(e)))}),pe(V(W),"renderDateValues",function(v){function k(e){return function(){(!M||_&&w||!U)&&W.selectDate(v,e,O,x)}}function D(t){return function(){var e;M&&(e=W.getDateValue(E,C,t),_&&w||W.setState({hoverDate:e}))}}function T(e,t,n,r){var e=W.calculateDate(v,e,O,x,!0)||new Date,o=qe,i=We.large[e.getDay()],t={value:e.getDate(),isToday:t,isDisabled:n,todayDate:W.state.currDate,fullDate:e,date:e.getDate(),month:o[e.getMonth()],year:e.getFullYear(),dayName:i};a&&a(t,r)}var j=Ue,I=Ke,e=W.props,b=e.size,M=e.rangePicker,t=e.firstDayOfWeek,N=e.disabledBefore,A=e.disabledAfter,P=e.monthsInView,a=e.onDateHover,e=W.state,_=e.startDate,w=e.endDate,S=e.hoverDate,R=e.year,L=e.month,F=e.date,B=e.currMonth,z=e.currYear,K=e.todayDate,e=W.getNavDateInfo(v),E=e.year,C=e.month,O=ke(E,C-1),x=ke(E,C),e=new Date(E,C).getDay()-le(t),H=Math.abs(e),t=Math.ceil((x+H)/j),U=(6===t||1<P||(t+=1),W.getInRangeError()),q=W.props.events;return Array.from({length:t},function(e,m){return fe.createElement("div",{key:m,className:"Calendar-valueRow"},Array.from({length:j},function(l,f){function e(){var e=t<=0?z===E&&B===C-1&&K===O+t:x<t?z===E&&B===C+1&&K===t-x:z===E&&B===C&&K===t;return e}var t=j*m+f-H+1,p=t<=0||x<t,n=Te(N,"more",E,C,t)||Te(A,"less",E,C,t),r=!n&&R===E&&L===C&&F===t,o=!1,i=!1,d=!1,a=!1,h=(M&&(o=Te(_,"equal",E,C,t),i=Te(w,"equal",E,C,t),a=Te(S,"equal",E,C,t),r=!n&&(o||i),_&&w?d=!n&&(Te(_,"less",E,C,t)||o)&&(Te(w,"more",E,C,t)||i):_?d=!n&&(Te(S,"more",E,C,t)||a)&&Te(_,"less",E,C,t):w&&(d=!n&&(Te(S,"less",E,C,t)||a)&&Te(w,"more",E,C,t))),Ye(_)),y=h.year,g=h.month,h=h.date,s=Ye(w),c=s.year,u=s.month,s=s.date,o=o||w&&a&&Te(S,"less",c,u,s),c=i||_&&a&&Te(S,"more",y,g,h),u=d&&U,s="".concat(t<=0?O+t:x<t?t-x:t),i="".concat(t<=0?0===C?C+I:(C-1)%I+1:x<t?(C+1)%I+1:C+1),a="".concat(t<=0&&C+1===1?E-1:x<t&&C+1===12?E+1:E),y="".concat(2===i.length?i:"0".concat(i),"/").concat(2===s.length?s:"0".concat(s),"/").concat(a),g=q&&"object"===G(q)&&q.hasOwnProperty(y),h=he({"Calendar-valueWrapper":!0,"Calendar-valueWrapper--inRange":d||M&&r,"Calendar-valueWrapper--inRangeError":u,"Calendar-valueWrapper--start":o&&!c,"Calendar-valueWrapper--end":c&&!o,"Calendar-valueWrapper--startEnd":o&&c,"Calendar-valueWrapper--startError":o&&u,"Calendar-valueWrapper--endError":c&&u,"Calendar-valueWrapper--dummy":p}),s=he((pe(i={"Calendar-value":!0,"Calendar-value--start":o&&!c,"Calendar-value--end":c&&!o,"Calendar-value--startError":o&&u,"Calendar-value--endError":c&&u,"Calendar-value--active":r,"Calendar-value--disabled":n,"Calendar-dateValue":!0},"Calendar-dateValue--".concat(b),b),pe(i,"Calendar-value--currDateMonthYear",e()),i));return fe.createElement("div",{key:"".concat(m,"-").concat(f),className:h,"data-test":"designSystem-Calendar-WrapperClass"},!p&&fe.createElement(fe.Fragment,null,fe.createElement(ye,{appearance:r?"white":n?"disabled":e()?"link":"default",size:"small"===b?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:s,onClick:k(t),onMouseOver:D(t),onMouseEnter:T.bind(V(W),t,e(),n)},t),g&&W.renderEventsIndicator(b,r)),(p&&0<t&&v===P-1||p&&t<=0&&0===v)&&fe.createElement(fe.Fragment,null,fe.createElement(ye,{appearance:r?"white":n?"disabled":e()?"link":"default",size:"small"===b?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:s,onClick:k(t),onMouseOver:D(t),onMouseEnter:T.bind(V(W),t,e(),n)},t<=0?O+t:t-x),g&&W.renderEventsIndicator(b,r)))}))})}),pe(V(W),"renderCalendar",function(e){var t=W.props,n=t.size,t=t.monthsInView,r=W.state.view,o=he((pe(o={},"Calendar",!0),pe(o,"Calendar--".concat(r,"--").concat(n),r),pe(o,"Calendar--".concat(n),n),o)),n=he(pe({},"Calendar-header--".concat(n),n)),i=he({"Calendar-body":!0});return fe.createElement("div",{key:e,"data-test":"DesignSystem-Calendar",className:o},fe.createElement("div",{className:n},0===e&&W.renderJumpButton("prev"),W.renderHeaderContent(e),e===t-1&&W.renderJumpButton("next")),fe.createElement("div",{className:i},"year"===r&&W.renderBodyYear(),"month"===r&&W.renderBodyMonth(),"date"===r&&W.renderBodyDate(e)))});var W,t=W.props,n=t.rangePicker,r=t.startDate,o=t.endDate,i=t.monthsInView,t=t.view,n=n?o||r:e.date,a=void 0!==e.yearNav?e.yearNav:Ye(n||Date.now()).year,e=void 0!==e.monthNav?e.monthNav:Ye(n||Date.now()).month,s=Ye(n),u=s.year,l=s.month,s=s.date,c=Ye(new Date);return W.state={currDate:n,startDate:r,endDate:o,yearNav:a,monthNav:e,year:u,month:l,date:s,todayDate:c.date,currMonth:c.month,currYear:c.year,view:1<i?"date":t,yearBlockNav:Ge(a)},W}return a(p,[{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a,s=this.props.monthsInView;e.date!==this.props.date&&(o=(a=Ye(this.props.date)).year,r=a.month,a=a.date,this.updateState(o,r,a),o=$e(this.props.date),this.setState({currDate:o})),e.startDate!==this.props.startDate&&(r=$e(this.props.startDate),this.setState({startDate:r})),e.endDate!==this.props.endDate&&(a=$e(this.props.endDate),this.setState({endDate:a})),e.view!==this.props.view&&1===this.props.monthsInView&&this.setState({view:this.props.view}),e.yearNav===this.props.yearNav||(o=this.props.yearNav)&&this.setState({yearNav:o,yearBlockNav:Ge(o)}),e.monthNav===this.props.monthNav||(r=this.props.monthNav)&&this.setState({monthNav:r}),t.currDate!==this.state.currDate&&(o=(a=this.props).rangePicker,e=a.onDateChange,a=(r=this.state).currDate,n=r.startDate,r=r.endDate,a&&(e&&e(a),o?(this.setState({hoverDate:void 0}),n&&r?this.setState({startDate:a,endDate:void 0}):(o=(e=Ye(a)).year,i=e.month,e=e.date,n?Te(n,"more",o,i,e)?this.setState({startDate:a}):this.setState({endDate:a}):r&&Te(r,"less",o,i,e)?this.setState({endDate:a}):this.setState({startDate:a}))):this.setState({startDate:a}))),t.startDate===this.state.startDate&&t.endDate===this.state.endDate||(n=this.props.onRangeChange,o=(r=this.state).startDate,i=r.endDate,n&&n(o,i)),t.year===this.state.year||void 0!==(e=this.state.year)&&1===s&&this.setState({year:e,yearBlockNav:Ge(e),yearNav:e}),t.month===this.state.month||void 0!==(a=this.state.month)&&1===s&&this.setState({monthNav:a})}},{key:"renderEventsIndicator",value:function(e,t){var n,e=he((pe(n={"Calendar-eventsIndicator":!0},"Calendar-eventsIndicator--".concat(e),!0),pe(n,"Calendar-eventsIndicator--active",t),n));return fe.createElement("span",{"data-test":"DesignSystem-Calendar-Event-Indicator",className:e})}},{key:"render",value:function(){var n=this,e=this.props,t=e.monthsInView,e=e.className,r=me(this.props),e=he({"Calendar-wrapper":!0},e);return fe.createElement("div",de({},r,{className:e,"data-test":"DesignSystem-Calendar-Wrapper"}),Array.from({length:t},function(e,t){return n.renderCalendar(t)}))}}]),p}(),Je=(pe(Ze,"defaultProps",{size:"large",monthsInView:1,view:"date",firstDayOfWeek:"sunday",jumpView:!0}),["shadow","children","className"]),Xe=fe.forwardRef(function(e,t){var n,r=e.shadow,r=void 0===r?"default":r,o=e.children,i=e.className,e=K(e,Je),r=he((pe(n={Card:!0},"Card--shadow-".concat(r),r),pe(n,"".concat(i),i),n));return fe.createElement("div",de({ref:t},e,{className:r}),o)}),Qe=(Xe.displayName="Card",["border","children","className"]),et=(fe.forwardRef(function(e,t){var n=e.border,r=e.children,o=e.className,e=K(e,Qe),n=he(pe({CardSubdued:!0},"CardSubdued--".concat(n),n),o);return fe.createElement("div",de({"data-test":"DesignSystem-CardSubdued",ref:t},e,{className:n}),r)}).displayName="CardSubdued",Me.displayName="GenericChip",function(e){var t=e.label,n=e.icon,l=e.clearButton,r=e.type,o=e.disabled,i=e.selected,a=e.onClose,s=e.onClick,c=e.name,f=e.className,e=me(e),u=he((pe(u={Chip:!0},"Chip-".concat(r,"--disabled"),o),pe(u,"Chip--".concat(r),r&&!o),pe(u,"Chip-".concat(r,"--selected"),i&&!o),pe(u,"Chip-selection--selectedDisabled","selection"===r&&i&&o),u),f);return fe.createElement(Me,de({"data-test":"DesignSystem-Chip--GenericChip"},e,{label:t,selected:!("selection"!==r||!i),icon:n,clearButton:"action"!==r&&l,disabled:o,className:u,onClose:function(){!o&&a&&a(c)},onClick:function(){!o&&s&&s(c)},name:c}))}),tt=(et.displayName="Chip",et.defaultProps={type:"input"},["size","sizeXS","sizeS","sizeM","sizeL","sizeXL","className","children"]),nt=fe.forwardRef(function(e,t){var n,r=e.size,o=e.sizeXS,i=e.sizeS,a=e.sizeM,s=e.sizeL,c=e.sizeXL,u=e.className,l=e.children,e=K(e,tt),r=he((pe(n={},"Col",!0),pe(n,"Col--".concat(r),r),pe(n,"Col--xs-".concat(o),o),pe(n,"Col--s-".concat(i),i),pe(n,"Col--m-".concat(a),a),pe(n,"Col--l-".concat(s),s),pe(n,"Col--xl-".concat(c),c),pe(n,"".concat(u),u),n));return fe.createElement("div",de({ref:t,"data-test":"DesignSystem-Column"},e,{className:r}),l)}),rt=(nt.displayName="Column",["date","open","position","inputFormat","outputFormat","inputOptions","validators","withInput","disabledBefore","disabledAfter","onDateChange","closeOnSelect","size","showTodayDate","children"]),Xe=function(){h(o,fe["Component"]);var r=y(o);function o(e){d(this,o),pe(V(s=r.call(this,e)),"getError",function(e){var t=s.props,n=t.disabledBefore,t=t.disabledAfter,n=Ye(n),r=n.year,o=n.month,n=n.date,t=Ye(t),i=t.year,a=t.month,t=t.date;return!e||(Te(e,"less",r,o,n)||Te(e,"more",i,a,t))}),pe(V(s),"onDateChangeHandler",function(e){s.setState({init:!0,date:e}),s.props.closeOnSelect&&s.setState({open:!1})}),pe(V(s),"onToggleHandler",function(e,t){if(!s.props.inputOptions.disabled)switch(t){case"outsideClick":s.setState({open:e});break;case"onClick":s.setState({open:!0})}});var s,t=e.inputFormat,n=e.validators,t=$e(e.date,t,n),n=s.getError(t);return s.state={date:t,error:n,init:!1,open:e.open||!1},s}return a(o,[{key:"componentDidUpdate",value:function(e,t){var n,r;e.date!==this.props.date&&(n=(r=this.props).inputFormat,r=r.validators,n=$e(this.props.date,n,r),this.setState({date:n})),e.open!==this.props.open&&this.setState({open:this.props.open||!1}),t.date!==this.state.date&&(n=(r=this.props).onDateChange,e=r.outputFormat,t=this.state.date,r=this.getError(t),this.setState({error:r}),n&&(r?n(void 0,""):n(t,je(e,t))))}},{key:"renderCalendar",value:function(){var l=this,e=this.props,t=(e.date,e.open,e.position,e.inputFormat),n=(e.outputFormat,e.inputOptions,e.validators),r=(e.withInput,e.disabledBefore),o=e.disabledAfter,f=(e.onDateChange,e.closeOnSelect,e.size),i=e.showTodayDate,i=void 0===i||i,a=e.children,a=void 0===a?fe.createElement(fe.Fragment,null):a,e=K(e,rt),s=this.state.date,c=qe,u=new Date(Date.now()),c="".concat(c[u.getMonth()]," ").concat(u.getDate()),u=$e(s,t,n),s=$e(r,t,n),r=$e(o,t,n);return fe.createElement("div",null,fe.createElement("div",{className:"d-flex"},a,fe.createElement(Ze,de({},e,{size:f,date:u,disabledBefore:s,disabledAfter:r,onDateChange:this.onDateChangeHandler}))),i&&fe.createElement("div",{className:"d-flex justify-content-center pb-6","data-test":"DesignSystem-Select--TodaysDate-wrapper"},fe.createElement(et,{label:"Today, ".concat(c),name:"chip",type:"action",disabled:(o=!0,u&&s&&r?o=s<u&&u<r:u&&s?o=u<s:u&&r&&(o=r<u),!o),onClick:function(){return l.onDateChangeHandler(new Date)}})))}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.withInput,r=e.inputFormat,o=e.inputOptions,e=e.validators,i=this.state.open;return n?fe.createElement(Ci,{trigger:fe.createElement(Ne,{inputFormat:r,inputOptions:o,validators:e,state:this.state,setState:this.setState.bind(this)}),triggerClass:"w-100",position:t,appendToBody:!0,open:i,onToggle:this.onToggleHandler},this.renderCalendar()):this.renderCalendar()}}]),o}(),ot=(pe(Xe,"defaultProps",z(z({},Ze.defaultProps),{},{position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[b],inputOptions:{},closeOnSelect:!0})),["appearance","size","children","className"]),it={s:"h5",m:"h4",l:"h3",xl:"h2",xxl:"h1"},at=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.className,e=K(e,ot),n=he((pe(t={Heading:!0},"Heading--".concat(r),r),pe(t,"Heading--".concat(n),n),t),i);return fe.createElement(R,de({"data-test":"DesignSystem-Heading"},e,{className:n,componentType:it[r]}),o)},st=(at.displayName="Heading",at.defaultProps={appearance:"default",size:"m"},["size","type","minWidth","defaultValue","name","placeholder","value","icon","inlineLabel","required","error","info","onChange","onClick","onClear","onBlur","onFocus","actionIcon","className","autoFocus","disabled","readOnly"]),ct={tiny:12,regular:16,large:20},ut=fe.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.type,r=void 0===r?"text":r,o=e.minWidth,o=void 0===o?"number"!==r?256:void 0:o,i=e.defaultValue,l=e.name,f=e.placeholder,a=e.value,p=e.icon,d=e.inlineLabel,h=e.required,y=e.error,g=e.info,m=e.onChange,v=e.onClick,b=e.onClear,_=e.onBlur,w=e.onFocus,S=e.actionIcon,E=e.className,C=e.autoFocus,s=e.disabled,O=e.readOnly,x=K(e,st),c=fe.useRef(null),t=(fe.useImperativeHandle(t,function(){return c.current}),fe.useEffect(function(){var e;C&&null!==(e=c.current)&&void 0!==e&&e.focus({preventScroll:!0})},[]),me(e)),y=he((pe(e={},"Input",!0),pe(e,"Input--".concat(n),n),pe(e,"Input--disabled",s||O),pe(e,"Input--error",y),e),E),E=he((pe(e={},"Input-input",!0),pe(e,"Input-input--".concat(n),n),e)),e=he((pe(e={},"Input-icon",!0),pe(e,"Input-icon--left",!0),pe(e,"Input-icon--disabled",!a),e)),u=he((pe(u={},"Input-icon",!0),pe(u,"Input-icon--right",!0),u)),k=fe.createElement("div",{className:u},fe.createElement(Q,{name:"info",size:ct[n]}));return fe.createElement("div",{"data-test":"DesignSystem-InputWrapper",className:y,style:{minWidth:o},onClick:function(){var e;return null===(e=c.current)||void 0===e?void 0:e.focus()},role:"presentation"},d&&fe.createElement("div",{className:"Input-inlineLabel"},fe.createElement(ye,{appearance:"subtle"},d)),"tiny"!==n&&p&&fe.createElement("div",{className:e},fe.createElement(Q,{name:p,size:ct[n]})),fe.createElement("input",de({"data-test":"DesignSystem-Input"},t,x,{ref:c,name:l,type:r,defaultValue:i,placeholder:f,className:E,value:a,required:h,disabled:s,readOnly:O,onChange:m,onBlur:_,onClick:v,onFocus:w})),s?"":g?fe.createElement(ki,{position:"top",tooltip:g},k):S&&(a||i)?S:b&&(a||i)&&fe.createElement("div",{className:u},fe.createElement(Q,{"data-test":"DesignSystem-Input--closeIcon",onClick:function(e){var t;null!==(t=c.current)&&void 0!==t&&t.focus({preventScroll:!0}),b(e)},name:"close",size:ct[n]})))}),lt=(ut.displayName="Input",["size","defaultValue","name","placeholder","icon","prefix","suffix","error","min","max","onChange","onClick","onBlur","onFocus","className","autoFocus","disabled","readOnly","value"]),ft={regular:16,large:20},pt=fe.forwardRef(function(e,t){function l(e){var t;return he((pe(t={},"MetricInput-arrowIcon",!0),pe(t,"MetricInput-arrowIcon--".concat(o),o),pe(t,"MetricInput-arrowIcon--".concat(e),e),t))}function n(e,t){var n=Number(k||0);S||E||!("down"===t?void 0!==a&&a<n||void 0===a:void 0!==g&&n<g||void 0===g)||(n=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1/0,t=1<arguments.length?arguments[1]:void 0;return isNaN(e)||!e&&0!==e||isNaN(t)||!t&&0!==t?t:Math.min(e,t)}(g,function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:-1/0,t=1<arguments.length?arguments[1]:void 0;return isNaN(e)||!e&&0!==e||isNaN(t)||!t&&0!==t?t:Math.max(e,t)}(a,n="down"===t?n-1:n+1)),O&&D(n),m&&(t=Object.create(e,{target:{value:{value:n}}}),m(t)))}var r=e.size,o=void 0===r?"regular":r,r=e.defaultValue,f=e.name,p=e.placeholder,d=e.icon,h=e.prefix,y=e.suffix,i=e.error,a=e.min,g=e.max,m=e.onChange,v=e.onClick,b=e.onBlur,_=e.onFocus,s=e.className,w=e.autoFocus,S=e.disabled,E=e.readOnly,c=e.value,C=K(e,lt),u=fe.useRef(null),O=void 0===c,x=ge(fe.useState(c||r),2),k=x[0],D=x[1],x=(fe.useImperativeHandle(t,function(){return u.current}),fe.useEffect(function(){var e;w&&null!==(e=u.current)&&void 0!==e&&e.focus({preventScroll:!0})},[]),fe.useEffect(function(){void 0!==c&&D(c)},[c]),me(e)),e=he((pe(t={},"MetricInput",!0),pe(t,"MetricInput--".concat(o),o),pe(t,"MetricInput--disabled",S||E),pe(t,"MetricInput--error",i),t),s),t=he((pe(i={},"MetricInput-input",!0),pe(i,"MetricInput-input--".concat(o),o),i)),i=he((pe(s={},"MetricInput-icon",!0),pe(s,"MetricInput-icon--".concat(o),o),s)),s="regular"===o?12:16;return fe.createElement("div",{"data-test":"DesignSystem-MetricInputWrapper",className:e,onClick:function(){var e;return null===(e=u.current)||void 0===e?void 0:e.focus()},onFocus:function(){var e;return null===(e=u.current)||void 0===e?void 0:e.focus()},onKeyDown:function(){},role:"presentation"},d&&fe.createElement(Q,{"data-test":"DesignSystem-MetricInput--icon",name:d,size:ft[o],appearance:k?"subtle":"disabled",className:i}),h&&fe.createElement(ye,{"data-test":"DesignSystem-MetricInput--prefix",className:"regular"===o?"mr-4":"mr-5",size:o,appearance:"subtle"},h),fe.createElement("input",de({"data-test":"DesignSystem-MetricInput"},x,C,{type:"number",ref:u,name:f,defaultValue:r,placeholder:p,className:t,value:k,disabled:S,readOnly:E,onChange:function(e){O&&D(e.target.value),m&&m(e)},onBlur:b,onClick:v,onFocus:_,onKeyDown:function(e){switch(e.key){case"e":case"E":return void e.preventDefault();case"ArrowDown":return e.preventDefault(),void n(e,"down");case"ArrowUp":return e.preventDefault(),void n(e,"up")}}})),y&&fe.createElement(ye,{"data-test":"DesignSystem-MetricInput--suffix",className:"regular"===o?"ml-4":"ml-5",size:o,appearance:"subtle"},y),fe.createElement("div",{className:"MetricInput-arrowIcons"},fe.createElement(Q,{tabIndex:-1,className:l("up"),size:s,name:"keyboard_arrow_up",onClick:function(e){return n(e,"up")},"data-test":"DesignSystem-MetricInput--upIcon"}),fe.createElement(Q,{tabIndex:-1,className:l("down"),size:s,name:"keyboard_arrow_down",onClick:function(e){return n(e,"down")},"data-test":"DesignSystem-MetricInput--downIcon"})))}),dt=(pt.displayName="MetricInput",["mask","value","placeholderChar","validators","clearOnEmptyBlur","defaultValue","mask","error","caption","required","onChange","onBlur","onFocus","onClear","className"]),Xe=fe.forwardRef(function(e,o){e.mask;var i=e.value,t=e.placeholderChar,b=void 0===t?"_":t,t=e.validators,_=void 0===t?[]:t,t=e.clearOnEmptyBlur,a=void 0===t||t,t=e.defaultValue,d=e.mask,s=e.error,c=e.caption,u=e.required,w=e.onChange,l=e.onBlur,f=e.onFocus,p=e.onClear,S=e.className,e=K(e,dt),h=fe.useCallback(function(e){return"object"===G(d[e])},[d]),E=fe.useCallback(function(e,t){if("right"===e){for(var n=t;n<d.length;n++)if(h(n))return n;return d.length}if("left"!==e)return t;for(var r=t;0<=r;r--)if(h(r-1))return r;return 0},[d,h]),C=fe.useCallback(function(){var e=E("right",0);return{start:e,end:e}},[E]),y=fe.useCallback(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:d.length-1;return Ae(d,b).slice(e,t+1)},[d,b]),O=fe.useMemo(function(){return y()},[y]),x=fe.useMemo(function(){return C()},[C]),r=fe.useRef(null),n=fe.useRef(),g=fe.useRef(x),k=fe.useRef(0),t=ge(fe.useState(t||i||""),2),m=t[0],v=t[1],D=(fe.useImperativeHandle(o,function(){return r.current}),fe.useEffect(function(){v(i||"")},[i]),fe.useEffect(function(){I(k.current)},[m]),fe.useCallback(function(e){return Math.abs(e.end-e.start)},[])),T=fe.useCallback(function(){var e;return{start:(null===(e=r.current)||void 0===e?void 0:e.selectionStart)||0,end:(null===(e=r.current)||void 0===e?void 0:e.selectionEnd)||0}},[r.current]),j=fe.useCallback(function(e){var t,n;r.current&&(t=r.current,n=Math.min(e.start,e.end),e=Math.max(e.start,e.end),t.setSelectionRange(n,e))},[r.current]),I=fe.useCallback(function(e){return j({start:e,end:e})},[j]),M=fe.useCallback(function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r="",o=t+1,i=n;if(t>=d.length)return r;if(n>=e.length)return g.current={start:t,end:t},r;var a=d[t];return h(t)?(e[n].match(a)?r+=e[n]:r+=b,i++):r+=a,r+=M(e,o,i)},[d,b,h]),N=fe.useCallback(function(){g.current=T(),n.current=window.requestAnimationFrame(N)},[g.current,T]),t=fe.useCallback(function(l){var e,t=l.currentTarget.value,n=T(),r=Math.min(g.current.start,n.start),o=n.end,i=r,a=0,o=t.slice(r,o),s=(e=M(o,r)).length;n.end>g.current.end?a=s?D(g.current):0:t.length<m.length&&(a=m.length-t.length),i+=s;for(var c=m.split(""),u=0;u<s;u++)c[r+u]=e[u];for(var f=0;f<a;f++){var p=r+s+f;c[p]=y(p,p)}o=E(a?"left":"right",i),1===a&&!e.length&&!h(i)&&0<o?(i=o,c[--i]=b):1!==a&&(i=o),n=c.slice(0,d.length).join("");k.current=i,n!==m&&L(_,n)?(v(n),null!=w&&w(l,n)):window.requestAnimationFrame(function(){return I(k.current)})},[g.current,_,T,M,D,y,E,h,I,v,w]),o=fe.useCallback(function(e){var t=e.currentTarget.value;a&&t===O&&(v(""),t=""),null!=l&&l(e,t),n.current&&window.cancelAnimationFrame(n.current)},[a,n.current,y,v,l]),A=fe.useCallback(function(e){k.current=x.start,v(O),null!=p&&p(e)},[v,y,I,C,p]),P=fe.useCallback(function(e){n.current=window.requestAnimationFrame(N),m||(k.current=x.start,v(y())),null!=f&&f(e)},[n.current,m,N,v,j,f]),R=fe.useMemo(function(){return he({"d-flex flex-column flex-grow-1":!0},S)},[S]);return fe.createElement("div",{className:R,"data-test":"DesignSystem-InputMask--Wrapper"},fe.createElement(ut,de({},e,{value:m,error:s,required:u,onFocus:P,onChange:t,onClear:A,onBlur:o,autoComplete:"off",ref:r})),fe.createElement(gt,{error:s,withInput:!0,hide:!c},c))}),ht=(Xe.displayName="InputMask",Xe.utils={getDefaultValue:Ae},Xe),yt=["required","optional","withInput","disabled","children","className"],gt=(Pe.displayName="Label",function(e){var t,n=e.error,r=e.hide,o=e.withInput,i=e.children,a=e.className,e=me(e),r=he((pe(t={Caption:!0},"Caption--hidden",r),pe(t,"Caption--withInput",o),t),a),o=he(pe({},"Caption-icon",!0));return fe.createElement("div",de({},e,{className:r,"data-test":"DesignSystem-Caption"}),n&&fe.createElement("div",{className:o},fe.createElement(Q,{size:14,name:"error",appearance:"alert"})),fe.createElement(ye,{appearance:n?"destructive":"subtle",size:"small",weight:"medium"},"".concat(i)))}),mt=(gt.displayName="Caption",["children","className","appearance","size","disabled"]),vt=function(e){var t,n=e.children,r=e.className,o=e.appearance,i=e.size,a=e.disabled,e=K(e,mt),a=he((pe(t={Link:!0},"Link--disabled",a),pe(t,"Link--".concat(i),i),pe(t,"Link--".concat(o),o),t),r);return fe.createElement(R,de({"data-test":"DesignSystem-Link",className:a,componentType:"a"},e),n)},bt=(vt.displayName="Link",vt.defaultProps={appearance:"default",size:"regular",disabled:!1},Re.displayName="Meta",function(e){var o=e.list,t=e.seperator,i=e.seperatorAppearance,a=e.iconAppearance,s=e.labelAppearance,n=e.className,e=me(e),n=he(pe({},"MetaList",!0),n),c=he(pe({},"MetaList-seperator",!0)),r=he((pe(r={},"MetaList-seperator",!0),pe(r,"MetaList-seperator--left",!0),r));return fe.createElement("div",de({"data-test":"DesignSystem-MetaList"},e,{className:n}),t&&fe.createElement(Q,{"data-test":"DesignSystem-MetaList--Seperator",name:"fiber_manual_record",size:8,className:r,appearance:i}),o.map(function(e,t){var n=e.label,e=e.icon,r=t!==o.length-1;return fe.createElement("span",{key:t,className:"MetaList-item"},fe.createElement(Re,{label:void 0===n?"":n,icon:e,iconAppearance:a,labelAppearance:s}),r&&fe.createElement(Q,{"data-test":"DesignSystem-MetaList--rightSeperator",name:"fiber_manual_record",size:8,className:c,appearance:i}))}))});bt.displayName="MetaList",bt.defaultProps={seperatorAppearance:"disabled",iconAppearance:"disabled",labelAppearance:"subtle"};function _t(e,t,n,r){for(var o=t<n?1:-1,i=t;i!==n+o;i+=o)e[i]=r}var wt=function(){h(o,fe["Component"]);var r=y(o);function o(){var i;d(this,o);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return pe(V(i=r.call.apply(r,[this].concat(t))),"state",{isHandleMoving:!1,isHandleHovered:!1}),pe(V(i),"handleElement",null),pe(V(i),"refHandlers",{handle:function(e){return i.handleElement=e}}),pe(V(i),"mouseEventClientOffset",function(e){return e.clientX}),pe(V(i),"clientToValue",function(e){var t=i.props,n=t.stepSize,r=t.tickSize,t=t.value;if(null==i.handleElement)return t;var o=i.getHandleMidpointAndOffset(i.handleElement),e=e-(o.handleMidpoint+o.handleOffset);return isNaN(e)?t:t+Math.round(e/(r*n))*n}),pe(V(i),"changeValue",function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:i.props.onChange,e=Fe(e,i.props.min,i.props.max);return isNaN(e)||i.props.value===e||t&&t(e),e}),pe(V(i),"endHandleMovement",function(e){var e=i.mouseEventClientOffset(e),t=i.props.onRelease,e=(i.removeDocumentEventListeners(),i.setState({isHandleMoving:!1}),i.changeValue(i.clientToValue(e)));t&&t(e)}),pe(V(i),"continueHandleMovement",function(e){var e=i.mouseEventClientOffset(e);i.state.isHandleMoving&&!i.props.disabled&&(e=i.clientToValue(e),i.changeValue(e))}),pe(V(i),"beginHandleMovement",function(e){i.props.disabled||(document.addEventListener("mousemove",i.continueHandleMovement),document.addEventListener("mouseup",i.endHandleMovement),i.setState({isHandleMoving:!0}),e=i.clientToValue(e.clientX),i.changeValue(e))}),pe(V(i),"handleKeyDown",function(e){var t,n,r;i.props.disabled||(t=(n=i.props).stepSize,n=n.value,37===(r=e.keyCode)?(i.changeValue(n-t),e.preventDefault()):39===r&&(i.changeValue(n+t),e.preventDefault()))}),pe(V(i),"handleKeyUp",function(e){i.props.disabled||0<=[37,39].indexOf(e.keyCode)&&((e=i.props.onRelease)&&e(i.props.value))}),pe(V(i),"getHandleMidpointAndOffset",function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(null==e)return{handleMidpoint:0,handleOffset:0};e=e.getBoundingClientRect();return{handleOffset:e.left,handleMidpoint:e[t?"height":"width"]/2}}),pe(V(i),"handleMouseOver",function(){i.setState({isHandleHovered:!0})}),pe(V(i),"handleMouseLeave",function(){i.setState({isHandleHovered:!1})}),pe(V(i),"removeDocumentEventListeners",function(){document.removeEventListener("mousemove",i.continueHandleMovement),document.removeEventListener("mouseup",i.endHandleMovement)}),i}return a(o,[{key:"componentWillUnmount",value:function(){this.removeDocumentEventListeners()}},{key:"componentDidUpdate",value:function(e,t){t.isHandleMoving!==this.state.isHandleMoving&&this.handleElement&&this.handleElement.focus()}},{key:"render",value:function(){var e=this.props,t=e.min,n=e.tickSizeRatio,r=e.value,o=e.disabled,i=e.label,e=e.isCurrentLabelHovered,a=this.state,s=a.isHandleMoving,a=a.isHandleHovered,a=s||a||e,e=this.getHandleMidpointAndOffset(this.handleElement,!0).handleMidpoint,r={left:"calc(".concat(Le((r-t)*n)," - ").concat(e,"px)")},n=he((pe(t={},"Slider-handle",!0),pe(t,"Slider-handle--disabled",o),pe(t,"Slider-handle--active",s),t)),o=he((pe(e={},"Slider-tooltip",!0),pe(e,"Tooltip",!0),pe(e,"d-none",!a),e));return fe.createElement(fe.Fragment,null,fe.createElement("div",{className:n,onMouseOver:this.handleMouseOver,onMouseLeave:this.handleMouseLeave,onMouseDown:this.beginHandleMovement,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,ref:this.refHandlers.handle,style:r,tabIndex:1,"data-test":"DesignSystem-MultiSlider-Handle"}),fe.createElement("div",{className:o,style:r},i))}}]),o}(),Xe=function(){h(n,fe["Component"]);var t=y(n);function n(e){var p;return d(this,n),pe(V(p=t.call(this,e)),"handleElements",[]),pe(V(p),"trackElement",null),pe(V(p),"getLabelPrecision",function(e){var t=e.labelPrecision,e=e.stepSize;return null==t?(e=e,isFinite(e)&&Math.floor(e)!==e&&e.toString().split(".")[1].length||0):t}),pe(V(p),"getOffsetRatio",function(e){return Fe((e-p.props.min)*p.state.tickSizeRatio,0,1)}),pe(V(p),"addHandleRef",function(e){null!=e&&p.handleElements.push(e)}),pe(V(p),"getHandleValues",function(e){e=fe.Children.map(e.children,function(e){return null!=(t=e)&&null!=t.type?e.props:null;var t}),e=null!=e?e:[];return(e=e.filter(function(e){return null!==e})).sort(function(e,t){return e.value-t.value}),e}),pe(V(p),"updateTickSize",function(){var e,t;null!=p.trackElement&&(e=p.trackElement.clientWidth,t=1/(p.props.max-p.props.min),p.setState({tickSize:e*t,tickSizeRatio:t}))}),pe(V(p),"getTrackFill",function(e,t){return void 0!==e.fillAfter?e.fillAfter:void 0!==t&&void 0!==t.fillBefore&&t.fillBefore}),pe(V(p),"maybeHandleTrackClick",function(t){var e=t.target;!p.props.disabled&&null==e.closest(".Slider-handle")&&((e=p.nearestHandleForValue(p.handleElements,function(e){return e.mouseEventClientOffset(t)}))&&e.beginHandleMovement(t))}),pe(V(p),"getLockedHandleIndex",function(e,t){var n=e<t?1:-1,e=e+n;return e!==t+n?e:-1}),pe(V(p),"getNewHandleValues",function(e,t){var n=p.getHandleValues(p.props).map(function(e){return e.value}),r=n.slice(),o=(r[t]=e,1<r.length&&r.sort(function(e,t){return e-t}),r.indexOf(e)),i=p.getLockedHandleIndex(t,o);return-1!==i?(_t(n,t,i,n[i]),n):(_t(r,t,o,e),r)}),pe(V(p),"onReleaseHandler",function(e,t){var n=p.props.onRangeRelease,r=p.getHandleValues(p.props),o=p.getNewHandleValues(e,t);n&&n(o),r.forEach(function(e,t){e.onRelease&&e.onRelease(o[t])})}),pe(V(p),"onChangeHandler",function(e,t){var n=p.props.onRangeChange,r=p.getHandleValues(p.props),o=r.map(function(e){return e.value}),i=p.getNewHandleValues(e,t);!function(n,e){if(n.length==n.length)return e.every(function(e,t){return e===n[t]})}(i,o)&&(n&&n(i),r.forEach(function(e,t){e.onChange&&e.onChange(i[t])}))}),pe(V(p),"formatLabel",function(e){var t=p.props.labelRenderer;return"function"==typeof t?t(e):e.toFixed(p.state.labelPrecision)}),pe(V(p),"renderHandles",function(){var e=p.props,r=e.disabled,o=e.max,i=e.min,a=e.stepSize,s=p.getHandleValues(p.props);return 0===s.length?null:s.map(function(e,t){var e=e.value,n=p.state.hoveredLabelValue===Number(e.toFixed(p.state.labelPrecision));return fe.createElement(wt,{disabled:r,key:"".concat(t,"-").concat(s.length),max:o,min:i,onRelease:function(e){return p.onReleaseHandler(e,t)},onChange:function(e){return p.onChangeHandler(e,t)},label:p.formatLabel(e),ref:p.addHandleRef,stepSize:a,tickSize:p.state.tickSize,tickSizeRatio:p.state.tickSizeRatio,value:e,isCurrentLabelHovered:n})})}),pe(V(p),"renderLabels",function(){for(var e,t=p.props,n=t.labelStepSize,r=t.max,o=t.min,i=t.labelRenderer,a=t.disabled,s=[],l=p.state.tickSizeRatio*n,f=p.getHandleValues(p.props).map(function(e){return e.value.toFixed(p.state.labelPrecision)}),c=o,u=0;c<r||(e=c,Math.abs(e-r)<=1e-5);c+=n,u+=l)!function(n,e){var e={left:Le(e)},t=!a&&-1!==f.indexOf(n.toFixed(p.state.labelPrecision));s.push(fe.createElement("div",{onClick:function(t){var e;p.props.disabled||(e=p.nearestHandleForValue(p.handleElements,function(e){return e.mouseEventClientOffset(t)}))&&e.changeValue(n)},className:"Slider-label",key:n,style:e,onMouseOver:function(){return p.handleLabelMouseOver(n)},onMouseLeave:p.handleLabelMouseLeave,"data-test":"DesignSystem-MultiSlider-Label"},fe.createElement("span",{className:"Slider-ticks"}),!1!==i&&fe.createElement(ye,{size:"small",appearance:t?"default":"disabled"},p.formatLabel(n))))}(c,u);return s}),pe(V(p),"renderTrackFill",function(e,t,n){var r=ge([p.getOffsetRatio(t.value),p.getOffsetRatio(n.value)].sort(function(e,t){return e-t}),2),o=r[0],r=r[1],o=Number((100*o).toFixed(2)),r=Number((100*(1-r)).toFixed(2)),r=z({},{width:"".concat(100-r-o,"%")}),o=p.getTrackFill(t,n),n=he((pe(t={},"Slider-progress",!0),pe(t,"Slider-progress--disabled",p.props.disabled),pe(t,"Slider-progress--inRange",o),pe(t,"Slider-progress--inRangeDisabled",o&&p.props.disabled),t));return fe.createElement("div",{key:"track-".concat(e),className:n,style:r})}),pe(V(p),"renderTracks",function(){var e=p.getHandleValues(p.props),n=(e.push({value:p.props.max}),{value:p.props.min||0}),r=[];return e.forEach(function(e,t){r.push(p.renderTrackFill(t,n,e)),n=e}),r}),pe(V(p),"handleLabelMouseOver",function(e){p.setState({hoveredLabelValue:e})}),pe(V(p),"handleLabelMouseLeave",function(){p.setState({hoveredLabelValue:void 0})}),p.state={labelPrecision:p.getLabelPrecision(p.props),tickSize:0,tickSizeRatio:0},p}return a(n,[{key:"getDerivedStateFromProps",value:function(e){return{labelPrecision:this.getLabelPrecision(e)}}},{key:"getSnapshotBeforeUpdate",value:function(e){e=this.getHandleValues(e);return this.getHandleValues(this.props).length!==e.length&&(this.handleElements=[]),null}},{key:"componentDidMount",value:function(){this.updateTickSize()}},{key:"nearestHandleForValue",value:function(e,n){var t=e,r=function(e){var t=n(e),t=e.clientToValue(t),e=e.props.value;return Math.abs(t-e)};if(0!==t.length){for(var o=t[0],i=r(o),a=1;a<t.length;a++){var s=t[a],c=r(s);c<i&&(o=s,i=c)}return o}}},{key:"render",value:function(){var t=this,e=this.props,n=e.label,e=e.className,r=me(this.props),e=he(pe({},"Slider",!0),e),o=he((pe(o={},"Slider-wrapper",!0),pe(o,"Slider-wrapper--disabled",this.props.disabled),o));return fe.createElement("div",de({},r,{className:e,"data-test":"DesignSystem-MultiSlider"}),n&&fe.createElement(Pe,{withInput:!0},n),fe.createElement("div",{className:o},fe.createElement("div",{className:"Slider-track",ref:function(e){return t.trackElement=e},onMouseDown:this.maybeHandleTrackClick,"data-test":"DesignSystem-MultiSlider-Slider-Track"},this.renderTracks()),fe.createElement("div",{className:"Slider-axis"},this.renderLabels()),this.renderHandles()))}}]),n}(),St=(pe(Xe,"defaultProps",{labelStepSize:1,max:10,min:0,stepSize:1,labelRenderer:!0}),pe(Xe,"Handle",function(){return null}),["children","className","onOutsideClick"]),Et=fe.forwardRef(function(e,t){var n=e.children,r=e.className,o=e.onOutsideClick,e=K(e,St),i=fe.useRef(null),a=(fe.useImperativeHandle(t,function(){return i.current},[i]),fe.useEffect(function(){return document.addEventListener("click",a,!0),function(){document.removeEventListener("click",a)}},[]),fe.useCallback(function(e){var t=i;e.target&&t.current&&(t.current.contains(e.target)||o(e))},[])),t=he(pe({},"OutsideClick",!0),r);return fe.createElement("div",de({ref:i},e,{className:t}),n)}),Ct=(Et.displayName="OutsideClick",["appearance","children","className"]),Ot=function(e){var t=e.appearance,n=e.children,r=e.className,e=K(e,Ct),t=he(pe({Text:!0},"Text--".concat(t),t),r);return fe.createElement(R,de({"data-test":"DesignSystem-Paragraph"},e,{className:t,componentType:"p"}),n)},xt=(Ot.displayName="Paragraph",Ot.defaultProps={appearance:"default"},["size","label","disabled","onChange","name","value","checked","defaultChecked","className","helpText"]),kt=fe.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.label,o=e.disabled,l=e.onChange,i=e.name,f=e.value,p=e.checked,d=e.defaultChecked,a=e.className,s=e.helpText,e=K(e,xt),c=fe.useRef(null),t=(fe.useImperativeHandle(t,function(){return c.current}),he((pe(t={},"Radio",!0),pe(t,"Radio--disabled",o),t),a)),a=he((pe(a={},"Radio-wrapper",!0),pe(a,"Radio-wrapper--".concat(n),n),a)),u=he((pe(u={},"Radio-outerWrapper",!0),pe(u,"Radio-outerWrapper--".concat(n),n),u)),h=he(pe({},"Radio-Label",!0)),y="".concat(i,"-").concat(r,"-").concat(B());return fe.createElement("div",{className:t,"data-test":"DesignSystem-Radio"},fe.createElement("div",{className:u,"data-test":"DesignSystem-Radio-OuterWrapper"},fe.createElement("input",de({},e,{type:"radio",disabled:o,checked:p,defaultChecked:d,ref:c,name:i,value:f,onChange:l,className:"Radio-input",id:y,"data-test":"DesignSystem-Radio-Input"})),fe.createElement("span",{className:a})),fe.createElement("div",{className:"Radio-labelWrapper"},r&&fe.createElement("label",{className:h,htmlFor:y,"data-test":"DesignSystem-Radio-Label"},fe.createElement(ye,{size:"tiny"===n?"small":"regular",appearance:o?"disabled":"default"},r)),s&&fe.createElement(ye,{"data-test":"DesignSystem-Radio-HelpText",size:"small",appearance:o?"disabled":"subtle"},s.trim())))}),Dt=(kt.displayName="Radio",["className","children"]),Tt=fe.forwardRef(function(e,t){var n=e.className,r=e.children,e=K(e,Dt),n=he(pe({Row:!0},"".concat(n),n));return fe.createElement("div",de({"data-test":"DesignSystem-Row",ref:t},e,{className:n}),r)}),jt=(Tt.displayName="Row",function(e){var t,n=e.appearance,r=e.children,o=e.onMouseEnter,i=e.onMouseLeave,a=e.onClick,s=e.className,e=me(e),s=he(pe({},"StatusHint",!0),s),n=he((pe(t={},"StatusHint-icon",!0),pe(t,"StatusHint--".concat(n),n),t));return fe.createElement("div",de({"data-test":"DesignSystem-StatusHint"},e,{className:s,onClick:function(e){return a&&a(e)},onMouseEnter:function(e){return o&&o(e)},onMouseLeave:function(e){return i&&i(e)}}),fe.createElement("span",{"data-test":"DesignSystem-StatusHint--Icon",className:n}),fe.createElement(ye,{"data-test":"DesignSystem-StatusHint--Text",weight:"medium"},r))}),It=(jt.displayName="StatusHint",jt.defaultProps={appearance:"default"},function(e){var t,n=e.appearance,r=e.children,o=e.subtle,i=e.className,e=me(e),n=he((pe(t={Pills:!0},"Badge--".concat(n),n&&!o),pe(t,"Badge--subtle-".concat(n),o),t),i);return fe.createElement("span",de({"data-test":"DesignSystem-Pills"},e,{className:n}),r)}),Mt=(It.displayName="Pills",It.defaultProps={appearance:"secondary"},function(e){var t=e.appearance,n=e.size,r=e.className,e=me(e),n=he(pe({Spinner:!0},"Spinner--".concat(n),n),r),r=he(pe({Circle:!0},"Circle--".concat(t),t));return fe.createElement("svg",de({},e,{className:n},{viewBox:"0 0 50 50"}),fe.createElement("circle",de({className:r},{cx:25,cy:25,r:20,fill:"none",strokeMiterlimit:"10",strokeWidth:"4"})))}),Nt=(Mt.displayName="Spinner",Mt.defaultProps={appearance:"primary",size:"medium"},z(z({},Xe.defaultProps),{},{defaultValue:0}),(kt=e=e||{})[kt.START=0]="START",kt[kt.END=1]="END",z(z({},Xe.defaultProps),{},{defaultValue:[0,10]}),["size","defaultChecked","disabled","onChange","name","value","className","appearance","checked"]),At=(fe.forwardRef(function(e,l){function t(e){"change"!=e.type&&"Space"!==e.key||(void 0===s&&d(!u),i&&i(e,!u))}var n=e.size,n=void 0===n?"regular":n,r=e.defaultChecked,o=e.disabled,i=e.onChange,f=e.name,p=e.value,a=e.className,s=(e.appearance,e.checked),e=K(e,Nt),c=ge(fe.useState(void 0===s?r:s),2),u=c[0],d=c[1],c=(fe.useEffect(function(){void 0!==s&&d(s)},[s]),he((pe(c={},"Switch",!0),pe(c,"Switch--disabled",o),pe(c,"Switch--".concat(n),n),c),a)),n=he((pe(a={},"Switch-wrapper",!0),pe(a,"Switch-wrapper--disabled",o),pe(a,"Switch-wrapper--".concat(n),n),pe(a,"Switch-wrapper--checked",u),pe(a,"Switch-wrapper--checkedDisabled",u&&o),a));return fe.createElement("div",{className:c},fe.createElement("input",de({},e,{type:"checkbox",defaultChecked:r,disabled:o,onChange:t,checked:u,ref:l,name:f,value:p,className:"Switch-input",onKeyUp:t})),fe.createElement("span",{className:n}))}).displayName="Switch",["rows","resize","disabled","name","placeholder","value","defaultValue","required","error","onChange","onClick","onBlur","onFocus","className"]);fe.forwardRef(function(e,t){var n,r=e.rows,r=void 0===r?3:r,o=e.resize,o=void 0===o||o,i=e.disabled,a=e.name,s=e.placeholder,c=e.value,u=e.defaultValue,l=e.required,f=e.error,p=e.onChange,d=e.onClick,h=e.onBlur,y=e.onFocus,g=e.className,e=K(e,At),o=he((pe(n={},"Textarea",!0),pe(n,"Textarea--resize",o),pe(n,"Textarea--error",f),n),g);return fe.createElement("textarea",de({"data-test":"DesignSystem-Textarea"},e,{ref:t,name:a,rows:r,placeholder:s,className:o,value:c,defaultValue:u,required:l,disabled:i,onChange:p,onBlur:h,onClick:d,onFocus:y}))}).displayName="Textarea";function Pt(e){var t=Qt.call(e);return"[object Arguments]"===t||"[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Function]"===Qt.call(e.callee)}function Rt(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;if(1!==(n=Object.getOwnPropertySymbols(e)).length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){n=Object.getOwnPropertyDescriptor(e,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}function Lt(){return Rt()&&!!Symbol.toStringTag}function Ft(e){try{return fn('"use strict"; return ('+e+").constructor;")()}catch(e){}}var Bt,zt,Kt,Ht,Ut,qt,Wt,Vt,Gt,Yt=S(E(function(e){e.exports=function(e,t){if(null==e)return{};for(var n,r={},o=Object.keys(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||(r[n]=e[n]);return r},e.exports.default=e.exports,e.exports.__esModule=!0})),$t=S(E(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,t.apply(this,arguments)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),Zt=E(function(n){function r(e,t){return n.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n.exports.default=n.exports,n.exports.__esModule=!0,r(e,t)}n.exports=r,n.exports.default=n.exports,n.exports.__esModule=!0}),e=(S(Zt),E(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Zt(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),Jt=S(e),i=S(E(function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0})),Xt=S(E(function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0})),Qt=Object.prototype.toString,Xe=(Object.keys||(Bt=Object.prototype.hasOwnProperty,zt=Object.prototype.toString,Kt=Pt,kt=Object.prototype.propertyIsEnumerable,Ht=!kt.call({toString:null},"toString"),Ut=kt.call(function(){},"prototype"),qt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Wt=function(e){var t=e.constructor;return t&&t.prototype===e},Vt={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Gt=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!Vt["$"+e]&&Bt.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{Wt(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),Dn=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===zt.call(e),r=Kt(e),o=t&&"[object String]"===zt.call(e),i=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var l=Ut&&n;if(o&&0<e.length&&!Bt.call(e,0))for(var a=0;a<e.length;++a)i.push(String(a));if(r&&0<e.length)for(var s=0;s<e.length;++s)i.push(String(s));else for(var c in e)l&&"prototype"===c||!Bt.call(e,c)||i.push(String(c));if(Ht)for(var f=function(e){if("undefined"==typeof window||!Gt)return Wt(e);try{return Wt(e)}catch(e){return!1}}(e),u=0;u<qt.length;++u)f&&"constructor"===qt[u]||!Bt.call(e,qt[u])||i.push(qt[u]);return i}),Dn),en=Array.prototype.slice,tn=Object.keys,nn=tn?function(e){return tn(e)}:Xe,rn=Object.keys,on=(nn.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return Pt(e)?rn(en.call(e)):rn(e)}):Object.keys=nn,Object.keys||nn},nn),e="undefined"!=typeof Symbol&&Symbol,an=Array.prototype.slice,sn=Object.prototype.toString,cn=Function.prototype.bind||function(t){var n=this;if("function"!=typeof n||"[object Function]"!==sn.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,e,o=an.call(arguments,1),i=Math.max(0,n.length-o.length),a=[],s=0;s<i;s++)a.push("$"+s);return r=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(function(){var e;return this instanceof r?(e=n.apply(this,o.concat(an.call(arguments))),Object(e)===e?e:this):n.apply(t,o.concat(an.call(arguments)))}),n.prototype&&((e=function(){}).prototype=n.prototype,r.prototype=new e,e.prototype=null),r},un=cn.call(Function.call,Object.prototype.hasOwnProperty),ln=SyntaxError,fn=Function,pn=TypeError,dn=Object.getOwnPropertyDescriptor;if(dn)try{dn({},"")}catch(Co){dn=null}function hn(){throw new pn}function yn(e,t){if("string"!=typeof e||0===e.length)throw new pn("intrinsic name must be a non-empty string");if(1<arguments.length&&"boolean"!=typeof t)throw new pn('"allowMissing" argument must be a boolean');var n=function(e){var t=Ln(e,0,1),n=Ln(e,-1);if("%"===t&&"%"!==n)throw new ln("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new ln("invalid intrinsic syntax, expected opening `%`");var o=[];return Rn(e,Fn,function(e,t,n,r){o[o.length]=n?Rn(r,Bn,"$1"):t||e}),o}(e),l=0<n.length?n[0]:"",r=function(e,t){var n,r=e;if(un(Nn,r)&&(r="%"+(n=Nn[r])[0]+"%"),un(In,r)){var o=In[r];if(void 0===(o=o===jn?Mn(r):o)&&!t)throw new pn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new ln("intrinsic "+e+" does not exist!")}("%"+l+"%",t),o=(r.name,r.value),f=!1;(r=r.alias)&&(l=r[0],Pn(n,An([0,1],r)));for(var i=1,a=!0;i<n.length;i+=1){var s=n[i],c=Ln(s,0,1),u=Ln(s,-1);if(('"'===c||"'"===c||"`"===c||'"'===u||"'"===u||"`"===u)&&c!==u)throw new ln("property names with quotes must have matching quotes");if("constructor"!==s&&a||(f=!0),un(In,c="%"+(l+="."+s)+"%"))o=In[c];else if(null!=o){if(!(s in o)){if(!t)throw new pn("base intrinsic for "+e+" exists, but the property is not available.");return}o=dn&&i+1>=n.length?(a=!!(u=dn(o,s)))&&"get"in u&&!("originalValue"in u.get)?u.get:o[s]:(a=un(o,s),o[s]),a&&!f&&(In[c]=o)}}return o}function gn(e,t){return"function"==typeof(t=yn(e,!!t))&&-1<Kn(e,".prototype.")?zn(t):t}function mn(e){return!(Hn&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===Un(e)}function vn(e){return!!mn(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Array]"!==Un(e)&&"[object Function]"===Un(e.callee)}function bn(e,t){var n=2<arguments.length?arguments[2]:{},r=on(t);Wn&&(r=Gn.call(r,Object.getOwnPropertySymbols(t)));for(var o,i,a,s,c=0;c<r.length;c+=1)o=e,i=r[c],a=t[r[c]],s=n[r[c]],i in o&&(!$n(s)||!s())||(Zn?Yn(o,i,{configurable:!0,enumerable:!1,value:a,writable:!0}):o[i]=a)}function _n(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!Xn(e)||!Xn(t))}function wn(){return"function"==typeof Object.is?Object.is:_n}function Sn(){if(null!=this&&this!==rr(this))throw new or("RegExp.prototype.flags getter called on non-object");var e="";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e}function En(){if(!ir)throw new sr("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=ar(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return Sn}var Cn,On,xn,kn,kt=dn?function(){try{return hn}catch(e){try{return dn(arguments,"callee").get}catch(e){return hn}}}():hn,Dn="function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&Rt()))),Tn=Object.getPrototypeOf||function(e){return e.__proto__},jn={},Xe="undefined"==typeof Uint8Array?t:Tn(Uint8Array),In={"%AggregateError%":"undefined"==typeof AggregateError?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?t:ArrayBuffer,"%ArrayIteratorPrototype%":Dn?Tn([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":jn,"%AsyncGenerator%":jn,"%AsyncGeneratorFunction%":jn,"%AsyncIteratorPrototype%":jn,"%Atomics%":"undefined"==typeof Atomics?t:Atomics,"%BigInt%":"undefined"==typeof BigInt?t:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?t:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?t:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?t:FinalizationRegistry,"%Function%":fn,"%GeneratorFunction%":jn,"%Int8Array%":"undefined"==typeof Int8Array?t:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?t:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Dn?Tn(Tn([][Symbol.iterator]())):t,"%JSON%":"object"==typeof JSON?JSON:t,"%Map%":"undefined"==typeof Map?t:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&Dn?Tn((new Map)[Symbol.iterator]()):t,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?t:Promise,"%Proxy%":"undefined"==typeof Proxy?t:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?t:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?t:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&Dn?Tn((new Set)[Symbol.iterator]()):t,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Dn?Tn(""[Symbol.iterator]()):t,"%Symbol%":Dn?Symbol:t,"%SyntaxError%":ln,"%ThrowTypeError%":kt,"%TypedArray%":Xe,"%TypeError%":pn,"%Uint8Array%":"undefined"==typeof Uint8Array?t:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?t:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?t:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?t:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?t:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?t:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?t:WeakSet},Mn=function e(t){var n,r;return"%AsyncFunction%"===t?n=Ft("async function () {}"):"%GeneratorFunction%"===t?n=Ft("function* () {}"):"%AsyncGeneratorFunction%"===t?n=Ft("async function* () {}"):"%AsyncGenerator%"===t?(r=e("%AsyncGeneratorFunction%"))&&(n=r.prototype):"%AsyncIteratorPrototype%"!==t||(r=e("%AsyncGenerator%"))&&(n=Tn(r.prototype)),In[t]=n},Nn={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},An=cn.call(Function.call,Array.prototype.concat),Pn=cn.call(Function.apply,Array.prototype.splice),Rn=cn.call(Function.call,String.prototype.replace),Ln=cn.call(Function.call,String.prototype.slice),Fn=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Bn=/\\(\\)?/g,zn=E(function(e){var t=yn("%Function.prototype.apply%"),n=yn("%Function.prototype.call%"),r=yn("%Reflect.apply%",!0)||cn.call(n,t),o=yn("%Object.getOwnPropertyDescriptor%",!0),i=yn("%Object.defineProperty%",!0),a=yn("%Math.max%");if(i)try{i({},"a",{value:1})}catch(e){i=null}e.exports=function(e){var t=r(cn,n,arguments);return o&&i&&o(t,"length").configurable&&i(t,"length",{value:1+a(0,e.length-(arguments.length-1))}),t};function s(){return r(cn,t,arguments)}i?i(e.exports,"apply",{value:s}):e.exports.apply=s}),Kn=(zn.apply,zn(yn("String.prototype.indexOf"))),Hn=Lt(),Un=gn("Object.prototype.toString"),e=function(){return mn(arguments)}(),qn=(mn.isLegacyArguments=vn,e?mn:vn),Wn="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),Vn=Object.prototype.toString,Gn=Array.prototype.concat,Yn=Object.defineProperty,$n=function(e){return"function"==typeof e&&"[object Function]"===Vn.call(e)},Zn=Yn&&function(){var e={};try{for(var t in Yn(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),Jn=(bn.supportsDescriptors=!!Zn,bn),Xn=function(e){return e!=e},Dn=zn(wn(),Object),Qn=(Jn(Dn,{getPolyfill:wn,implementation:_n,shim:function(){var e=wn();return Jn(Object,{is:e},{is:function(){return Object.is!==e}}),e}}),Dn),kt=Lt(),er=(kt&&(Cn=gn("Object.prototype.hasOwnProperty"),On=gn("RegExp.prototype.exec"),xn={},kn={toString:Xe=function(){throw xn},valueOf:Xe},"symbol"==typeof Symbol.toPrimitive&&(kn[Symbol.toPrimitive]=Xe)),gn("Object.prototype.toString")),tr=Object.getOwnPropertyDescriptor,nr=kt?function(e){if(!e||"object"!=typeof e)return!1;var t=tr(e,"lastIndex");if(!(t&&Cn(t,"value")))return!1;try{On(e,kn)}catch(e){return e===xn}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===er(e)},rr=Object,or=TypeError,ir=Jn.supportsDescriptors,ar=Object.getOwnPropertyDescriptor,sr=TypeError,cr=Jn.supportsDescriptors,ur=Object.getOwnPropertyDescriptor,lr=Object.defineProperty,fr=TypeError,pr=Object.getPrototypeOf,dr=/a/,t=zn(Sn),hr=(Jn(t,{getPolyfill:En,implementation:Sn,shim:function(){if(!cr||!pr)throw new fr("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=En(),t=pr(dr),n=ur(t,"flags");return n&&n.get===e||lr(t,"flags",{configurable:!0,enumerable:!1,get:e}),e}}),t),yr=Date.prototype.getDay,gr=Object.prototype.toString,mr=Lt(),vr=function(e){{if("object"!=typeof e||null===e)return!1;if(!mr)return"[object Date]"===gr.call(e);var t=e;try{return yr.call(t),!0}catch(e){return!1}}},br=Date.prototype.getTime;function _r(e,t,n){var r,o,n=n||{};{if(n.strict?Qn(e,t):e===t)return!0;if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return n.strict?Qn(e,t):e==t;var i=e,a=t,s=n;if(typeof i!=typeof a)return!1;if(wr(i)||wr(a))return!1;if(i.prototype!==a.prototype)return!1;if(qn(i)!==qn(a))return!1;if(e=nr(i),t=nr(a),e!==t)return!1;if(e||t)return i.source===a.source&&hr(i)===hr(a);if(vr(i)&&vr(a))return br.call(i)===br.call(a);if(e=Sr(i),t=Sr(a),e!==t)return!1;if(e||t){if(i.length!==a.length)return!1;for(r=0;r<i.length;r++)if(i[r]!==a[r])return!1;return!0}if(typeof i!=typeof a)return!1;try{var c=on(i),u=on(a)}catch(e){return!1}if(c.length!==u.length)return!1;for(c.sort(),u.sort(),r=c.length-1;0<=r;r--)if(c[r]!=u[r])return!1;for(r=c.length-1;0<=r;r--)if(o=c[r],!_r(i[o],a[o],s))return!1;return!0}}function wr(e){return null==e}function Sr(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(0<e.length&&"number"!=typeof e[0]))}var Er=_r,Cr="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,Or=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(Cr&&0<=navigator.userAgent.indexOf(e[t]))return 1;return 0}();
|
|
6
|
+
*/var s;s={}.hasOwnProperty,e.exports?e.exports=a.default=a:window.classNames=a}),ge=function(n){return["className","data-test"].reduce(function(e,t){return n[t]?z(z({},e),{},pe({},t,n[t])):z({},e)},{})},W=function(e){function t(){return fe.createElement("span",de({"data-test":"DesignSystem-Avatar"},l,{className:p}),f&&fe.createElement(me,{weight:"medium",appearance:"white",className:d},f),!f&&fe.createElement(T,{"data-test":"DesignSystem-Avatar--Icon",name:"person",size:"regular"===o?16:12,appearance:"white",className:h}))}var n=e.withTooltip,r=e.tooltipPosition,o=e.size,i=e.children,a=e.firstName,s=e.lastName,c=e.className,u=e.appearance,l=ge(e),f=i?i.trim().slice(0,2):"".concat(a?a.trim()[0]:"").concat(s?s.trim()[0]:""),e=i||"".concat(a||""," ").concat(s||"")||"",i=u||["accent4","primary","accent3","alert","accent2","warning","accent1","success"][(f.charCodeAt(0)+(f.charCodeAt(1)||0))%8]||"secondary",p=ye((pe(a={Avatar:!0},"Avatar--".concat(o),o),pe(a,"Avatar--".concat(i),i),pe(a,"Avatar--disabled",!f||!n),a),c),d=ye((pe(s={},"Avatar-content--".concat(o),o),pe(s,"Avatar-content--".concat(i),i),s)),h=ye(pe({},"Avatar-content--".concat(i),i));return n&&f?fe.createElement(Di,{tooltip:e,position:r,triggerClass:"flex-grow-0"},t()):t()},Z=(W.displayName="Avatar",W.defaultProps={tooltipPosition:"bottom",withTooltip:!0,size:"regular"},fe.useEffect),J=fe.useState;q.displayName="Backdrop";function X(a,s,c,u){var l,f=!1,p=0;function d(){l&&clearTimeout(l)}function e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this,o=Date.now()-p;function i(){p=Date.now(),c.apply(r,t)}f||(u&&!l&&i(),d(),void 0===u&&a<o?i():!0!==s&&(l=setTimeout(u?function(){l=void 0}:i,void 0===u?a-o:a)))}return"boolean"!=typeof s&&(u=c,c=s,s=void 0),e.cancel=function(){d(),f=!0},e}function Q(e,t,n){return void 0===n?X(e,t,!1):X(e,n,!1!==t)}function be(e,n){return e.length===n.length&&e.every(function(e,t){return e.value===n[t].value||e.label===n[t].label})}function y(e){return void 0!==e}function ee(e){return void 0!==e}function te(e,t,n){return e&&n&&""===t}function _e(e,t,n,r){return r&&n&&0===t&&""===e}function ne(e,t,n){if(e.length){if(0<e.length&&0<n&&e.length===t-n)return{indeterminate:!0,checked:!0};n=0<e.length&&e.length!==t;return{checked:0<e.length&&e.length===t,indeterminate:n}}return{indeterminate:!1,checked:!1}}function re(e){var t=e.children,n=void 0===(n=e.componentType)?"span":n,r=e.className,e=K(e,ue);return fe.createElement(n,z(z({},e),{},{className:r}),t)}function oe(e){var n=e.onClick,r=e.onKeyDown,o=void 0===(t=e.role)?"button":t,t=K(e,Oe);return z({},n?{onClick:n,role:o,tabIndex:0,"aria-label":t["aria-label"],onKeyDown:function(e){var t;r?r(e):(t=e.key,ke(o,t)&&n&&(e.preventDefault(),n(e)))}}:{role:o,"aria-label":t["aria-label"]})}function ie(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===e?t:3&t|8).toString(16)})}function we(e){function t(){p||i&&i(c)}var n=e.optionData,o=e.selected,r=e.onClick,i=e.updateActiveOption,a=e.onChange,s=e.active,c=e.index,u=e.checkboxes,l=e.menu,f=void 0===(f=(n.optionType?n:e).optionType)?"DEFAULT":f,p=n.disabled,d=ye((pe(d={},"Option",!0),pe(d,"Option--active",s),pe(d,"Option--selected",o&&!l),pe(d,"Option--disabled",p),pe(d,"OptionWrapper",!0),d)),h=ye((pe(h={},"Option-checkbox",!0),pe(h,"Option-checkbox--active",s),pe(h,"OptionWrapper",!0),h)),y=ye((pe(y={},"Option-text",!0),pe(y,"Option-text--wrap",!e.truncateOption),y)),g=ye((pe(g={},"OptionWrapper",!0),pe(g,"OptionWrapper--disabled",p),g));return e.optionRenderer?fe.createElement("div",de({"data-test":"DesignSystem-DropdownOption--Custom",className:g,"data-disabled":p,onMouseEnter:t},!u&&{onClick:r}),e.optionRenderer({optionData:n,selected:o,onChange:a,active:s,index:c})):(0,je[g=u?"WITH_CHECKBOX":f])({selected:o,index:c,renderSubInfo:function(e){var t=p?"disabled":o?"white":"subtle",n=o?"white":"disabled";if("string"==typeof e)return fe.createElement(me,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",appearance:t,size:"small",weight:"medium"},e);var r=e.list,e=e.seperator;return fe.createElement(Ot,{list:void 0===r?[]:r,seperator:e,iconAppearance:n,labelAppearance:t,seperatorAppearance:n,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})},optionData:n,textClassName:y,appearance:p?"disabled":o&&!l?"white":"default",onClickHandler:function(e){e.stopPropagation(),p||r&&r()},onChangeHandler:function(e){e.stopPropagation(),p||a&&a(e)},onUpdateActiveOption:t,dataTest:"DesignSystem-DropdownOption--".concat(g),className:u?h:d})}function ae(e){var t,n=void 0===(n=e.size)?"small":n,r=e.round,o=e.className,e=ge(e),r=ye((pe(t={PlaceholderImage:!0,"Placeholder--animation":!0},"PlaceholderImage--round",r),pe(t,"PlaceholderImage--".concat(n),n),t),o);return fe.createElement("span",de({},e,{className:r}))}function Se(e){switch(e.loadingType){case"DEFAULT":return fe.createElement(j,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"});case"WITH_ICON":return fe.createElement(I,{withImage:!0,round:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},fe.createElement(j,{length:"large"}));case"WITH_META":return fe.createElement(I,{withImage:!1,"data-test":"DesignSystem-Dropdown--Placeholder"},fe.createElement(j,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),fe.createElement(j,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}));case"WITH_CHECKBOX":return fe.createElement(I,{withImage:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},fe.createElement(j,{length:"large"}));case"ICON_WITH_META":return fe.createElement(I,{withImage:!0,round:!0,imageSize:"medium","data-test":"DesignSystem-Dropdown--Placeholder"},fe.createElement(j,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),fe.createElement(j,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}))}return null}function se(o){function i(e,t){Q(e,t),ie||null!=(e=E.current)&&e.focus(),k(h)}function R(){var e;X(),null!=(e=E.current)&&e.focus()}function L(){var e;J(),null!=(e=E.current)&&e.focus()}function F(){k(h),_&&m&&_("")}function B(e){k(h),_&&_(e.target.value)}function z(e,t){var n=o.onClearOptions,r=p.every(function(e){return e.disabled});return fe.createElement("div",{className:ce(t),style:P(++D)},fe.createElement(me,{size:"small",appearance:"subtle"},e),t&&fe.createElement(ve,{onClick:n,disabled:r,appearance:"transparent",size:"tiny",type:"button"},"Clear"))}function K(t,e){var n=_e(m,d,u,b)?e+1===x:e===x,r=-1!==V.findIndex(function(e){return e.value===t.value});return fe.createElement("div",{style:P(++D),className:A},fe.createElement(we,{optionData:t,truncateOption:W,selected:r,index:e,updateActiveOption:le,optionRenderer:Z,active:n,checkboxes:b,menu:g,onClick:function(){return ue(t)},onChange:function(e){return o.onSelect(t,e.target.checked)},optionType:o.optionType}))}function H(e,t){for(var n,r,o,i,a,s=document.querySelectorAll(t),c="down"===e?x+1:x-1,u="down"===e?s.length:-1;c!==u;){if("true"!==s[c].getAttribute("data-disabled")){var l=s[c];l&&(n=te.current,r=l,a=i=o=void 0,o=null==n?void 0:n.getBoundingClientRect(),i=r.getBoundingClientRect(),a=r.offsetHeight,i.bottom>o.bottom&&n?Ee(n,r.offsetTop-o.height+a):i.top<o.top&&n&&Ee(n,r.offsetTop-a)),void 0!==l&&k(c);break}"down"===e?c++:c--}}var U,e,a,s=void 0===(t=o.listOptions)?[]:t,q=o.inputRef,t=void 0===(t=o.align)?"right":t,n=void 0===(n=o.optionType)?"DEFAULT":n,r=void 0===(r=o.applyButtonLabel)?"Apply":r,c=void 0===(c=o.cancelButtonLabel)?"Cancel":c,W=void 0===(l=o.truncateOption)||l,u=void 0===(l=o.withSelectAll)||l,l=void 0===(l=o.maxHeight)?200:l,f=o.customTrigger,p=o.selected,V=o.tempSelected,G=o.previousSelected,d=o.remainingOptions,h=o.firstEnabledOption,y=o.dropdownOpen,g=o.menu,m=o.searchTerm,v=o.showApplyButton,b=o.withCheckbox,Y=o.withSearch,$=o.popoverOptions,_=o.onSearchChange,Z=o.optionRenderer,J=o.applyOptions,X=o.cancelOptions,Q=o.toggleDropdown,w=o.className,S=void 0===(S=o.searchPlaceholder)?"Search..":S,ee=ge(o),te=fe.createRef(),ne=fe.createRef(),E=fe.createRef(),C=fe.createRef(),O=fe.createRef(),re=(T=he(fe.useState(),2))[0],oe=T[1],x=(T=he(fe.useState(h),2))[0],k=T[1],D=0;fe.useEffect(function(){var e,t,n,r;y&&(e=o.width,t=o.minWidth,n=o.maxWidth,r=null==(r=ne.current)?void 0:r.clientWidth,oe({width:e||r,minWidth:t||(v?176:g?128:r),maxWidth:n||"100%"}))},[y]),fe.useEffect(function(){h!==x&&k(h)},[h]);var T=void 0===(T=o.triggerSize)?"regular":T,j=void 0===(j=o.placeholder)?"Select":j,I=o.icon,M=o.error,ie=o.disabled,ae=o.inlineLabel,N=o.triggerLabel,se=f?f(N||j):fe.createElement(fe.Fragment,null),f=f?fe.cloneElement(se,{tabIndex:0,ref:E}):fe.createElement(Ce,{placeholder:j,triggerSize:T,open:y,icon:I,disabled:ie,inlineLabel:ae,menu:g,error:M,ref:E},N),se={maxHeight:l,overflowY:"auto",overflowX:"hidden"},A=ye((pe(j={},"fade-in",y),pe(j,"opacity-0",y),pe(j,"Dropdown-items",!0),j)),P=function(e){return{animationDelay:y?20*e+"ms":""}},ce=function(e){var t;return ye((pe(t={},"Dropdown-section",!0),pe(t,"Dropdown-section--withClear",e),t),A)},T=ye(pe({},"Dropdown",!0),w),ae=ye((pe(I={},"Dropdown-wrapper",!0),pe(I,"Dropdown-wrapper--wrap",!W),I)),N=ye((pe(M={},"Option-checkbox",!0),pe(M,"Option-checkbox--active",0===x),pe(M,"OptionWrapper",!0),M),A),ue=function(e){o.onOptionSelect(e),null!=(e=E.current)&&e.focus()},le=function(e,t){t=b&&u&&!o.async&&!t?e+1:e;k(t)};return fe.createElement("div",de({},ee,{className:T,ref:ne,onKeyDown:function(e){var t=".OptionWrapper";switch(e.key){case"ArrowDown":e.preventDefault(),y?H("down",t):i(!y);break;case"ArrowUp":e.preventDefault(),y?H("up",t):i(!y);break;case"Enter":var n=document.activeElement;!y||q.current!==n&&E.current!==n||(e.preventDefault(),n=b?"".concat(t," .Checkbox-input"):t,(n=document.querySelectorAll(n)[x])&&n.click()),y||i(!y);break;case"Tab":if(!v&&y)return e.preventDefault(),void i(!1,"onClick");var n=document.activeElement,r=null==(r=O.current)?void 0:r.disabled;if((n===C.current&&r||n===O.current)&&y)return e.preventDefault(),void i(!1,"onClick");v&&y&&(e.preventDefault(),n===C.current?null!=(r=O.current)&&r.focus():null!=(n=C.current)&&n.focus())}}}),fe.createElement(Oi,de({onToggle:i,trigger:f,triggerClass:g?"":"w-100",open:y,customStyle:re,position:Ie[t]},$,{"data-test":"DesignSystem-Dropdown--Popover"}),(Y||o.async)&&fe.createElement("div",{className:"Dropdown-inputWrapper ".concat(A),style:P(++D)},fe.createElement(yt,{name:"Dropdown-search",icon:"search",value:m,placeholder:S,autoFocus:!0,onChange:B,onClear:F,ref:q,autoComplete:"off",className:"Dropdown-input"})),(l=o.selectedSectionLabel,a=void 0===l?"Selected Items":l,l=void 0===(l=o.loadersCount)?10:l,j=o.loadingOptions,w=_e(m,d,u,b),l&&j?fe.createElement("div",{className:"Dropdown-loading"},fe.createElement("div",{className:"Dropdown-wrapper",style:se},(e=l,e=Array(l).fill("Loading"),U=b?"WITH_CHECKBOX":n,e.map(function(e,t){return fe.createElement("div",{className:"Option-loading",key:"".concat(e,"-").concat(t)},fe.createElement(Se,{loadingType:U}))})))):0!==s.length||j?fe.createElement("div",{className:ae,style:se,ref:te},w&&(l=void 0===(l=o.selectAllLabel)?"Select All":l,e=o.selectAll,j=o.onSelectAll,l=l.trim()?l.trim():"Select All",fe.createElement("div",{style:P(++D),className:N,onMouseEnter:function(){return le(0,!0)}},fe.createElement(Te,{label:l,onChange:j,checked:e.checked,indeterminate:e.indeterminate,tabIndex:-1,className:"OptionCheckbox"}))),0<p.length&&z(a,!0),p.map(K),s.map(function(e,t){var n,r=0<t?s[t-1].group:p.length?a:void 0,o=e.group,r=r!==o,i=t+p.length;return fe.createElement("div",{className:(n=i,ye(pe({},"Dropdown--border",r&&0!==n))),key:t},r&&o&&z(o),K(e,i))}),o.async&&0<d&&(w=void 0===(w=o.footerLabel)?"Search for more options":w,fe.createElement("div",{className:"Dropdown-footer ".concat(A),style:P(++D)},fe.createElement(me,{size:"small",appearance:"subtle"},w)))):(l=o.noResultMessage,fe.createElement("div",{className:"Dropdown-errorWrapper","data-test":"DesignSystem-Dropdown--errorWrapper"},fe.createElement("div",{className:"Option"},fe.createElement("div",{className:"Option-subinfo"},void 0===l?"No result found":l))))),v&&b&&(I=be(G,V),fe.createElement("div",{className:"Dropdown-buttonWrapper ".concat(A),style:P(++D)},fe.createElement(ve,{ref:C,className:"mr-4",appearance:"basic",onClick:R,size:"tiny",tabIndex:-1,type:"button"},c),fe.createElement(ve,{ref:O,appearance:"primary",disabled:I,size:"tiny",onClick:L,type:"button"},r)))))}var Ee=function(e,t){e.scrollTo(0,t)},ce=["triggerSize","placeholder","menu","children","icon","disabled","open","inlineLabel","error"],Ce=fe.forwardRef(function(e,t){var n,r=e.triggerSize,r=void 0===r?"regular":r,o=e.placeholder,o=void 0===o?"Select":o,i=e.menu,i=void 0!==i&&i,a=e.children,s=e.icon,c=e.disabled,u=e.open,l=e.inlineLabel,f=e.error,e=K(e,ce),p=c?"disabled":"default",o=o.trim(),o=a||o,d=i?s||"more_horiz":"keyboard_arrow_down",r=ye((pe(n={},"Button",!0),pe(n,"DropdownButton",!0),pe(n,"DropdownButton--".concat(r),r),pe(n,"DropdownButton--".concat(r,"Square"),i),pe(n,"DropdownButton--placeholder",!a&&!i),pe(n,"DropdownButton--icon",s),pe(n,"DropdownButton--open",u),pe(n,"DropdownButton--error",f),n)),f=ye((pe(u={},"Text",!0),pe(u,"Text--regular",!0),pe(u,"DropdownButton-text",!0),u));return fe.createElement("button",de({ref:t,type:"button",value:a,className:r,disabled:c,tabIndex:0,"data-test":"DesignSystem-DropdownTrigger"},e),!i&&fe.createElement("div",{className:"DropdownButton-wrapper"},l&&fe.createElement(me,{appearance:"subtle",className:"mr-4 white-space-nowrap"},"".concat(l.trim().charAt(0).toUpperCase()).concat(l.trim().slice(1))),s&&!l&&fe.createElement(T,{appearance:p,className:"d-flex align-items-center mr-4",name:s}),o&&fe.createElement("span",{className:f},o)),fe.createElement(T,{appearance:p,name:d}))}),ue=(Ce.displayName="DropdownButton",["children","componentType","className"]),le=["appearance","size","children","weight","small","className"],me=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.weight,a=e.small,s=e.className,e=K(e,le),n=ye((pe(t={Text:!0},"Text--".concat(n),n),pe(t,"Text--".concat(i),i),pe(t,"Text--".concat(r),r),pe(t,"Text--small","small"===r||a),t),s);return fe.createElement(re,de({"data-test":"DesignSystem-Text"},e,{className:n,componentType:"span"}),o)},Oe=(me.displayName="Text",me.defaultProps={appearance:"default",size:"regular"},["onClick","onKeyDown","role"]),xe={button:new Set(["Enter","Space","Spacebar"," "]),link:new Set(["Enter"]),checkbox:new Set([]),radio:new Set([])},ke=function(e,t){return!!xe[e]&&xe[e].has(t)},T=function(e){function t(e){return"outline"===e?"outlined":"rounded"===e?"round":e}var n,r=e.appearance,o=e.className,i=e.name,a=e.size,s=e.children,c=oe(e),u=ge(e),e=t(e.type),l=r&&r.includes("_")?(n=(l=r).indexOf("_"),l.slice(0,n)+l.charAt(n+1).toUpperCase()+l.slice(n+2)):r,r=ye((pe(n={},"material-icons",!0),pe(n,"material-icons-".concat(t(e)),e&&"filled"!==e),pe(n,"Icon",!0),pe(n,"Icon--".concat(l),r),pe(n,"".concat(o),o),n)),a={fontSize:"".concat(a,"px"),width:"".concat(a,"px")};return s&&fe.isValidElement(s)?fe.createElement("span",de({},u,{className:o}),s):fe.createElement("i",de({},u,{className:r,style:a},c),e?"".concat(i,"_").concat(e):i)},De=(T.displayName="Icon",T.defaultProps={size:16,type:"round"},["size","tabIndex","defaultChecked","indeterminate","label","disabled","onChange","name","value","className","checked","helpText"]),Te=fe.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.tabIndex,r=void 0===r?0:r,o=e.defaultChecked,i=e.indeterminate,a=e.label,s=e.disabled,c=e.onChange,u=e.name,l=e.value,f=e.className,p=e.checked,d=e.helpText,h=K(e,De),y=fe.useRef(null);fe.useImperativeHandle(t,function(){return y.current});var t=he(fe.useState(void 0===p?o:p),2),g=t[0],m=t[1],t=(fe.useEffect(function(){_(i)},[i]),fe.useEffect(function(){void 0!==p&&m(p)},[p]),ye((pe(t={},"Checkbox",!0),pe(t,"Checkbox--disabled",s),t),f)),f=ye((pe(f={},"Checkbox-outerWrapper",!0),pe(f,"Checkbox-outerWrapper--".concat(n),n),f)),e=ye((pe(v={},"Checkbox-input",!0),pe(v,"Checkbox-input--checked",g),pe(v,"Checkbox-input--indeterminate",e.indeterminate),v)),v=ye(pe({},"Checkbox-wrapper",!0)),b=ye(pe({},"Checkbox-label",!0)),_=function(e){y.current.indeterminate=e},w="".concat(u,"-").concat(a,"-").concat(ie()),S=i?"remove":g?"check":"",E="tiny"===n?12:16;return fe.createElement(fe.Fragment,null,fe.createElement("div",{"data-test":"DesignSystem-Checkbox",className:t},fe.createElement("div",{"data-test":"DesignSystem-Checkbox-OuterWrapper",className:f},fe.createElement("input",de({},h,{type:"checkbox",defaultChecked:o,onChange:function(e){void 0===p&&(m(e.target.checked),_(e.target.indeterminate)),c&&c(e)},checked:g,disabled:s,ref:y,name:u,value:l,className:e,tabIndex:r,id:w,"data-test":"DesignSystem-Checkbox-InputBox"})),fe.createElement("span",{className:v,"data-test":"DesignSystem-Checkbox-Icon"},S&&fe.createElement(T,{name:S,size:E,appearance:"white"}))),fe.createElement("div",{className:"Checkbox-labelWrapper"},a&&a.trim()&&fe.createElement("label",{htmlFor:w,className:b,"data-test":"DesignSystem-Checkbox-Label"},fe.createElement(me,{size:"tiny"===n?"small":"regular",appearance:s?"disabled":"default"},a.trim())),d&&fe.createElement(me,{"data-test":"DesignSystem-Checkbox-HelpText",size:"small",appearance:s?"disabled":"subtle"},d.trim()))))}),je=(Te.displayName="Checkbox",pe(n={},"DEFAULT",function(e){var t=e.className,n=e.textClassName,r=e.onClickHandler,o=e.optionData,i=e.appearance,a=e.onUpdateActiveOption,e=e.dataTest,s=o.label,o=o.disabled;return fe.createElement("div",{className:t,onClick:r,onMouseEnter:a,"data-test":e,"data-disabled":o},fe.createElement("div",{className:"Option-label"},fe.createElement(me,{className:n,appearance:i},s)))}),pe(n,"WITH_ICON",function(e){var t,n=e.className,r=e.textClassName,o=e.onClickHandler,i=e.optionData,a=e.onUpdateActiveOption,s=e.appearance,e=e.dataTest,c=i.label,u=i.icon,i=i.disabled,n=ye((pe(t={},"".concat(n),!0),pe(t,"Option--icon",u),t));return fe.createElement("div",{className:n,onClick:o,onMouseEnter:a,"data-test":e,"data-disabled":i},u&&fe.createElement(T,{className:"Option-icon mr-4","data-test":"".concat(e,"--Icon"),name:u,appearance:s}),fe.createElement("div",{className:"Option-label"},fe.createElement(me,{className:r,appearance:s},c)))}),pe(n,"WITH_META",function(e){var t=e.className,n=e.textClassName,r=e.onClickHandler,o=e.optionData,i=e.onUpdateActiveOption,a=e.renderSubInfo,s=e.appearance,e=e.dataTest,c=o.subInfo,u=o.label,o=o.disabled;return fe.createElement("div",{className:t,onClick:r,onMouseEnter:i,"data-test":e,"data-disabled":o},fe.createElement("div",{className:"Option-label"},fe.createElement(me,{className:n,appearance:s},u),c&&a(c)))}),pe(n,"WITH_CHECKBOX",function(e){var t=e.className,o=e.selected,n=e.optionData,r=e.onChangeHandler,i=e.onUpdateActiveOption,e=e.dataTest,a=n.subInfo,s=n.label,c=n.disabled;return fe.createElement("div",{className:t,onMouseEnter:i,"data-test":e,"data-disabled":c},fe.createElement(Te,{label:s,disabled:c,checked:o,onChange:r,tabIndex:-1,className:"OptionCheckbox ".concat(a?"pb-0":""),"data-test":"".concat(e,"--Checkbox")}),a&&fe.createElement("div",{className:"pl-8 ml-3"},function(e){var t=c?"disabled":"subtle",n=o?"white":"disabled";if("string"==typeof e)return fe.createElement(me,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",appearance:t,size:"small",weight:"medium"},e);var r=e.list,e=e.seperator;return fe.createElement(Ot,{list:void 0===r?[]:r,seperator:e,iconAppearance:n,labelAppearance:t,seperatorAppearance:n,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})}(a)))}),pe(n,"ICON_WITH_META",function(e){var t,n=e.className,r=e.textClassName,o=e.renderSubInfo,i=e.onClickHandler,a=e.optionData,s=e.onUpdateActiveOption,c=e.appearance,e=e.dataTest,u=a.subInfo,l=a.label,f=a.icon,a=a.disabled,n=ye((pe(t={},"".concat(n),!0),pe(t,"Option--icon",f),t));return fe.createElement("div",{className:n,onClick:i,onMouseEnter:s,"data-test":e,"data-disabled":a},f&&fe.createElement(T,{"data-test":"".concat(e,"--Icon"),className:"Option-icon mr-4",name:f,appearance:c}),fe.createElement("div",{className:"Option-label"},fe.createElement(me,{className:r,appearance:c},l),u&&o(u)))}),n),j=function(e){var t,n=e.length,r=e.size,o=e.className,e=ge(e),i=ye(pe({"Placeholder--animation":!0,PlaceholderParagraph:!0},"PlaceholderParagraph--".concat(r),r)),n=ye((pe(t={"PlaceholderParagraph-wrapper":!0},"PlaceholderParagraph-wrapper--length-".concat(n),n),pe(t,"PlaceholderParagraph-wrapper--size-".concat(r),r),t),o);return fe.createElement("div",de({},e,{className:n}),fe.createElement("span",{className:i}))},I=(j.displayName="PlaceholderParagraph",j.defaultProps={length:"medium"},ae.displayName="PlaceholderImage",ae.defaultProps={size:"small"},function(e){var t=e.imageSize,n=e.withImage,r=e.round,o=e.children,i=e.className,e=ge(e),a=ye(pe({"Placeholder-paragraph":!0},"Placeholder-paragraph--withImage",n)),i=ye(pe({},"Placeholder",!0),i);return fe.createElement("div",de({"data-test":"DesignSystem-Placeholder"},e,{className:i}),n&&fe.createElement(ae,{round:r,size:t,"data-test":"DesignSystem-Placeholder--Image"}),o&&fe.createElement("div",{className:a,"data-test":"DesignSystem-Placeholder--Paragraph"},o))}),Ie=(I.displayName="Placeholder",I.defaultProps={withImage:!0,imageSize:"small"},{right:"bottom-start",left:"bottom-end"}),Me=(se.displayName="DropdownList",["triggerOptions","selected"]),Ne=fe.createRef(),Ae=function(){e(l,fe["Component"]);var u=h(l);function l(e){d(this,l),pe(V(m=u.call(this,e)),"staticLimit",void 0),pe(V(m),"getDisabledOptions",function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).filter(function(e){return e.disabled})}),pe(V(m),"fetchOptionsFunction",function(t){var n,e=m.props.options,r=t?(n=t,e.filter(function(e){return e.label.toLowerCase().includes(n.toLowerCase())})):e;return new Promise(function(e){e({searchTerm:t,options:r,count:r.length})})}),pe(V(m),"getUnSelectedOptions",function(e,t){if(e.length){if(!t)return e.filter(function(t){return-1===m.state.tempSelected.findIndex(function(e){return e.value===t.value})});var t=m.props.selected,n=void 0===t?[]:t;return e.filter(function(t){return y(m.props.selected)?-1===n.findIndex(function(e){return e.value===t.value}):!t.selected})}return e}),pe(V(m),"getSelectedOptions",function(e,t){var n=m.props.selected;return e.length?t?y(m.props.selected)?void 0===n?[]:n:e.filter(function(e){return e.selected}):m.state.tempSelected:[]}),pe(V(m),"updateOptions",function(i,e){var t=m.state,a=t.searchTerm,s=t.selectAll,c=t.tempSelected,u=t.previousSelected,l=void 0===e?m.state.async:e,t=m.props,e=t.fetchOptions,f=t.withCheckbox,p=t.withSearch;(e||m.fetchOptionsFunction)(a).then(function(e){var t,n,r=e.options,o=e.count;(!e.searchTerm||e.searchTerm&&e.searchTerm===m.state.searchTerm)&&(l=""===a?o>m.staticLimit:l,e=te(l,a,f)?m.getUnSelectedOptions(r,i):r,r=""===a?m.getSelectedOptions(r,i):[],t=""===a?o:m.state.optionsLength,n=m.getDisabledOptions(e.slice(0,m.staticLimit)),m.setState(z(z({},m.state),{},{optionsLength:t,loading:!1,async:l,searchedOptionsLength:o,options:e.slice(0,m.staticLimit),tempSelected:i?r:c,previousSelected:i?r:u,selected:te(l,a,f)?r:[],triggerLabel:m.updateTriggerLabel(i?r:c),selectAll:!l&&i?ne(r,t,n.length):s})),(l||p)&&null!=(o=Ne.current)&&o.focus())})}),pe(V(m),"updateSearchTerm",function(e){m.setState(z(z({},m.state),{},{loading:!0,searchInit:!0,searchTerm:e}))}),pe(V(m),"updateOnPopperToggle",function(){var e,t=m.props,n=t.withCheckbox,r=t.showApplyButton,o=t.onClose,i=t.name,t=t.selected,t=void 0===t?[]:t,a=m.state,s=a.previousSelected,c=a.tempSelected,u=a.optionsLength,l=a.async,f=a.loading,p=a.searchTerm,a=a.options,d=(ee(m.props.open)?m.props:m.state).open,a=m.getDisabledOptions(a).length;n&&r&&(e=y(m.props.selected)?t:s,m.setState({tempSelected:e,selectAll:ne(e,u,a),triggerLabel:m.updateTriggerLabel(e)})),ee(m.props.open)&&m.setState({open:d}),d&&(u=te(l,p,n)&&!be(m.state.selected,c),m.setState({loading:u||f||""!==p,searchInit:""!==p,searchTerm:""}),u&&m.updateOptions(!1)),o&&!d&&o((n&&r?y(m.props.selected)?t:s:m.state.tempSelected).map(function(e){return e.value}),i)}),pe(V(m),"updateTriggerLabel",function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=e.length;if(0===t)return"";var n=m.props,r=n.triggerOptions,r=void 0===r?{}:r,n=n.getLabel,o=r.customLabel,r=r.labelLimit,i=m.state?m.state.optionsLength:1<arguments.length?arguments[1]:void 0,a="",a=t<=(void 0===r?2:r)?e.map(function(e){return e.label}).join(", "):o?o(t,i,e):"".concat(t," selected");return n&&n(a),a}),pe(V(m),"updateSelectedOptions",function(e,t,n){var r=m.state,o=r.optionsLength,i=r.previousSelected,a=r.selected,s=r.loading,r=r.open,c=m.props,u=c.onChange,l=c.withCheckbox,f=c.showApplyButton,p=c.closeOnSelect,d=c.name,c=c.onPopperToggle,h=l&&f&&n,y=m.getDisabledOptions(m.state.options),g=0===e.length&&0<a.length||e.every(function(e){return e.disabled})&&!a.every(function(e){return e.disabled});m.setState(z(z({},m.state),{},{tempSelected:e,triggerLabel:m.updateTriggerLabel(e),selectAll:ne(e,o,y.length),open:ee(m.props.open)||l?r:!p,previousSelected:h?e:i,selected:g?e:a,loading:!!g||s})),g&&m.debounceClear(),!u||f&&!n||(o=e.map(function(e){return e.value}),u(t?o[0]:o,d)),!l&&p&&c&&ee(m.props.open)&&c(!1,"optionClick")}),pe(V(m),"onOptionSelect",function(e){var t=m.props,n=t.onUpdate,t=t.selected;y(t)?n&&n("select-option",e):m.updateSelectedOptions([e],!0)}),pe(V(m),"onSelect",function(t,e){var n=m.props,r=n.onUpdate,o=n.selected,n=n.showApplyButton;y(o)&&!n?r&&r(e?"select-option":"deselect-option",t):(o=m.state.tempSelected.slice(),e||(n=o.findIndex(function(e){return e.value===t.value}),o.splice(n,1)),o=e?o.concat(t):o,m.updateSelectedOptions(o,!1))}),pe(V(m),"onSelectAll",function(e){var t=m.props,n=t.onUpdate,r=t.selected,t=t.showApplyButton,o=m.state,i=o.tempSelected,o=o.options;y(r)&&!t?n&&n(e.target.checked?"select-all":"deselect-all"):(r=i.slice().filter(function(e){return e.disabled}),t=e.target.checked?[].concat(H(o.filter(function(e){return!e.disabled})),H(r)):r,m.updateSelectedOptions(t,!1))}),pe(V(m),"debounceSearch",Q(m.props.searchDebounceDuration,function(){m.setState({searchInit:!1},function(){m.updateOptions(!1)})})),pe(V(m),"debounceClear",Q(250,function(){return m.updateOptions(!1)})),pe(V(m),"onClearOptions",function(){var e=m.props,t=e.selected,n=e.name,r=e.onUpdate,o=e.showApplyButton,e=e.onChange,i=m.state.tempSelected.filter(function(e){return e.disabled});y(t)&&!o?r&&r("clear-all"):(m.setState({selected:i,tempSelected:i,triggerLabel:"",loading:!0}),m.debounceClear(),e&&!o&&e(i,n))}),pe(V(m),"onTogglePopper",function(e){var t=m.props.onPopperToggle;t&&ee(m.props.open)&&t(!1,e)}),pe(V(m),"onCancelOptions",function(){var e=m.state,t=e.previousSelected,n=e.tempSelected,e=e.optionsLength,r=m.props,o=r.selected,i=r.onUpdate,a=r.onClose,r=r.name,s=!!ee(m.props.open)&&m.state.open,c=t.map(function(e){return e.value});if(y(o))return i&&i("cancel-selected",t,n),void m.onTogglePopper("cancelClick");o=m.updateTriggerLabel(t),i=m.getDisabledOptions(m.state.options);m.setState(z(z({},m.state),{},{tempSelected:t,selectAll:ne(t,e,i.length),triggerLabel:o,open:s})),a&&!s&&a(c,r),m.onTogglePopper("cancelClick")}),pe(V(m),"onApplyOptions",function(){var e=m.state,t=e.tempSelected,e=e.previousSelected,n=m.props,r=n.onChange,o=n.selected,i=n.onUpdate,a=n.onClose,n=n.name,s=!!ee(m.props.open)&&m.state.open,c=t.map(function(e){return e.value});if(y(o))return i&&i("apply-selected",e,t),void m.onTogglePopper("applyClick");m.setState(z(z({},m.state),{},{previousSelected:t,optionsApplied:!0,open:s})),r&&r(c,n),a&&!s&&a(c,n),m.onTogglePopper("applyClick")}),pe(V(m),"onToggleDropdown",function(e,t){var n;m.props.disabled||((n=m.props.onPopperToggle)&&ee(m.props.open)?n(e,t):m.setState({open:e}))});var m,t=e.selected,t=void 0===t?[]:t,n=e.totalOptions,r=e.withCheckbox,o=e.loading,i=e.open,a=e.options,e=(m.staticLimit=Math.min(100,e.staticLimit),n||a.length),n="fetchOptions"in m.props||e>m.staticLimit,s=n?[]:m.getSelectedOptions(a,!0),c=m.getDisabledOptions(a);return m.state={async:n,optionsLength:e,open:i,searchInit:!1,searchedOptionsLength:e,optionsApplied:!1,options:a||[],loading:n||o,searchTerm:"",tempSelected:s,previousSelected:s,selected:te(n,"",r)?t:[],triggerLabel:m.updateTriggerLabel(s,e),selectAll:ne(s,e,c.length)},m}return a(l,[{key:"componentDidMount",value:function(){this.state.async&&this.updateOptions(!0)}},{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a;this.state.async||(o=(n=this.props).loading,i=n.fetchOptions,a=n.options,n=n.withSearch,r=this.getDisabledOptions(a=void 0===a?[]:a).length,e.loading===o||i||(a.length>this.staticLimit?this.updateOptions(!0,!0):(i=this.getSelectedOptions(a,!0),this.setState(z(z({},this.state),{},{options:a,loading:o,tempSelected:i,previousSelected:i,optionsLength:a.length,searchedOptionsLength:a.length,triggerLabel:this.updateTriggerLabel(i),selectAll:ne(i,this.state.optionsLength,r)})),n&&null!=(o=Ne.current)&&o.focus()))),void 0!==this.props.selected&&e.selected!==this.props.selected&&e.loading===this.props.loading&&(a=!this.props.withCheckbox,this.updateSelectedOptions(this.props.selected,a,!0)),t.searchTerm!==this.state.searchTerm&&this.debounceSearch(),e.open===this.props.open&&t.open===this.state.open||ee(this.props.open)&&this.props.open===this.state.open||this.updateOnPopperToggle()}},{key:"render",value:function(){var e=this.state,t=e.options,n=e.async,r=e.open,o=e.searchTerm,i=e.searchInit,a=e.loading,s=e.searchedOptionsLength,c=e.tempSelected,u=e.selectAll,l=e.triggerLabel,e=e.previousSelected,f=this.props,p=f.withSelectAll,p=void 0===p||p,f=f.withCheckbox,d=this.props,h=d.triggerOptions,h=void 0===h?{}:h,d=(d.selected,K(d,Me)),s=s-t.length,p=_e(o,s,p,f)?0:t.findIndex(function(e){return!e.disabled});return fe.createElement(se,de({listOptions:t,inputRef:Ne,remainingOptions:s,firstEnabledOption:p,loadingOptions:a,async:n,searchInit:i,dropdownOpen:r,searchTerm:o,triggerLabel:l,tempSelected:c,previousSelected:e,selected:this.state.selected,applyOptions:this.onApplyOptions,cancelOptions:this.onCancelOptions,toggleDropdown:this.onToggleDropdown,onClearOptions:this.onClearOptions,onSelect:this.onSelect,selectAll:u,onSearchChange:this.updateSearchTerm,onOptionSelect:this.onOptionSelect,onSelectAll:this.onSelectAll,customTrigger:h.customTrigger},d))}}]),l}(),Pe=(pe(Ae,"defaultProps",{triggerOptions:{},options:[],closeOnSelect:!0,staticLimit:50,searchDebounceDuration:300}),["size","appearance","iconAlign","tabIndex","largeIcon","type","children","icon","expanded","selected","loading","disabled","className","tooltip"]),Re={tiny:12,regular:16,large:20},Le=fe.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.appearance,r=void 0===r?"basic":r,o=e.iconAlign,o=void 0===o?"left":o,i=e.tabIndex,i=void 0===i?0:i,a=e.largeIcon,s=e.type,c=e.children,u=e.icon,l=e.expanded,f=e.selected,p=e.loading,d=e.disabled,h=e.className,e=(e.tooltip,K(e,Pe)),l=ye((pe(y={},"Button",!0),pe(y,"Button--expanded",l),pe(y,"Button--".concat(n),n),pe(y,"Button--".concat(n,"Square"),!c),pe(y,"Button--".concat(r),r),pe(y,"Button--selected",f&&("basic"===r||"transparent"===r)),pe(y,"Button--iconAlign-".concat(o),c&&o),pe(y,"".concat(h),h),y)),y=ye((pe(h={},"Button-icon",!0),pe(h,"Button-icon--".concat(o),c&&o),h));return fe.createElement("button",de({"data-test":"DesignSystem-Button",ref:t,type:s,className:l,disabled:d||p,tabIndex:i},e),p?fe.createElement(fe.Fragment,null,fe.createElement(Lt,{size:"small",appearance:"basic"===r||"transparent"===r?"secondary":"white","data-test":"DesignSystem-Button--Spinner",className:"Button-spinner"}),fe.createElement(me,{className:"Button-text Button-text--hidden"},c||"")):fe.createElement(fe.Fragment,null,u&&fe.createElement("div",{className:y},fe.createElement(T,{"data-test":"DesignSystem-Button--Icon",name:u,appearance:d?"disabled":"basic"===r||"transparent"===r?f?"info":"default":"white",size:a&&!c?Re[n]+4:Re[n]})),c))}),ve=fe.forwardRef(function(e,t){var n=e.icon,r=e.tooltip,o=e.children;return n&&r&&!o?fe.createElement(Di,{tooltip:r},fe.createElement(Le,de({},e,{ref:t}))):fe.createElement(Le,de({},e,{ref:t}))});ve.displayName="Button";function Fe(e){return["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].indexOf(e)}function Be(e,t){return new Date(e,t+1,0).getDate()}function ze(e,t,n){if(e){var r=Y(e).decadeYear;switch(t){case"less":if(r<n)return!0;break;case"more":if(n<r)return!0;break;case"equal":if(r===n)return!0}}return!1}function G(e,t,n,r,o){if(e){var e=Y(e),i=e.year,a=e.month,s=e.date;switch(t){case"less":if(i<n)return!0;if(n<i)return!1;if(void 0!==r){if(a<r)return!0;if(r<a)return!1}if(void 0!==o&&s<o)return!0;break;case"more":if(n<i)return!0;if(i<n)return!1;if(void 0!==r){if(r<a)return!0;if(a<r)return!1}if(void 0!==o&&o<s)return!0;break;case"equal":if(void 0!==o){if(i===n&&a===r&&s===o)return!0}else if(void 0!==r){if(i===n&&a===r)return!0}else if(i===n)return!0}}return!1}function C(e,t){var r,o,i,a,s;return e&&t?(t=Y(t),r=t.year,o=t.month,i=t.date,a=e.includes("/")?"/":"-",(s=e.split(a)).reduce(function(e,t,n){switch(t){case"mm":e+=(o<9&&"0")+(o+1);break;case"yyyy":e+=r;break;case"dd":e+=(i<10&&"0")+i}return n!==s.length-1&&(e+=a),e},"")):""}function Ke(e,t){var n,r,o,i,a;if(L(2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],t,e))return n=e.includes("/")?"/":"-",i=o=r=-1,a=t.split(n),e.split(n).forEach(function(e,t){switch(e){case"mm":o=+a[t]-1;break;case"yyyy":r=+a[t];break;case"dd":i=+a[t]}}),g({year:r,month:o,date:i})}function He(e){function t(e){var t;return ye((pe(t={},"Chip-icon",!0),pe(t,"Chip-icon--".concat(e),e),pe(t,"cursor-pointer","right"===e&&!a),t))}var n,r=e.label,o=e.icon,i=e.clearButton,a=e.disabled,s=e.className,c=e.selected,u=e.onClose,l=e.onClick,e=ge(e),f=ye((pe(f={},"disabled",a&&!c),pe(f,"info",c),pe(f,"subtle",!(a||c||i||o)),pe(f,"default",!a&&!c&&!i&&o),f)),c=ye((pe(n={},"disabled",a&&!c),pe(n,"link",c),pe(n,"default",!a&&!c),n));return fe.createElement("div",de({"data-test":"DesignSystem-GenericChip--GenericChipWrapper"},e,{className:"Chip-wrapper ".concat(s),onClick:function(){l&&l()}}),o&&fe.createElement(T,{"data-test":"DesignSystem-GenericChip--Icon",name:o,appearance:f,className:t("left")}),fe.createElement(me,{"data-test":"DesignSystem-GenericChip--Text",appearance:c},r),i&&fe.createElement(T,{"data-test":"DesignSystem-GenericChip--clearButton",name:"clear",appearance:f,className:t("right"),onClick:function(e){e.stopPropagation(),u&&u()}}))}function Ue(e){var n=e.inputFormat,t=e.inputOptions,r=e.validators,o=e.state,i=e.setState,e=o.init,a=o.date,o=o.error,s=void 0===(c=t.placeholderChar)?"_":c,c=t.error||t.required&&o&&e,o=void 0===t.caption?"Invalid value":t.caption,u=P[n];return fe.createElement(_t,de({icon:"events",placeholder:n},t,{error:c,mask:u,value:a?C(n,a):e?_t.utils.getDefaultValue(u,s):"",onChange:function(e,t){i({open:!0}),t&&!t.includes(s)&&(t=Ke(n,t,r),i({date:t}))},onBlur:function(e,t){i({init:!0}),t&&!t.includes(s)||i({date:void 0})},onClear:function(){i({init:!0,date:void 0})},caption:c?o:"",validators:[function(e){return L(r,e,n)}],clearOnEmptyBlur:!1}))}function qe(e,t){for(var n="",r=0;r<e.length;r++)n+="object"===$(e[r])?t:e[r];return n}function We(e){var t=e.required,n=e.optional,r=e.withInput,o=e.disabled,i=e.children,a=e.className,s=K(e,wt),e=ge(e),r=ye((pe(c={Label:!0},"Label--withInput",r),pe(c,"Label--optional",n),c),a),c=ye({"Label-text":!0,"Label--disabled":o});return fe.createElement("div",de({"data-test":"DesignSystem-Label"},e,{className:r}),fe.createElement(re,de({"data-test":"DesignSystem-Label--Text",className:c,componentType:"label"},s),i),function(){return 0<arguments.length&&void 0!==arguments[0]&&arguments[0]?fe.createElement("span",{className:"Label-requiredIndicator","data-test":"DesignSystem-Label--RequiredIndicator"}):(1<arguments.length?arguments[1]:void 0)?fe.createElement(me,{"data-test":"DesignSystem-Label--OptionalText",appearance:"subtle",className:"Label-optionalText"},"(optional)"):null}(t,n))}function Ve(e){var t=e.label,n=e.icon,r=e.iconAppearance,e=e.labelAppearance;return fe.createElement("span",{"data-test":"DesignSystem-MetaList--Meta",className:"Meta"},n&&fe.createElement(T,{"data-test":"DesignSystem-MetaList--MetaIcon",name:n,appearance:r,className:"Meta-icon"}),fe.createElement(me,{"data-test":"DesignSystem-MetaList--MetaLabel",appearance:e},t))}function Ge(e){return"".concat((100*e).toFixed(2),"%")}function Ye(e,t,n){return null==e?e:Math.min(Math.max(e,t),n)}var $e=12,Ze=3,Je=12,Xe=3,Qe=7,et=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tt={small:["Su","Mo","Tu","We","Th","Fr","Sa"],large:["Su","Mo","Tu","We","Th","Fr","Sa"]},nt=$e,rt=function(e){return e-e%nt},Y=function(e){var t,n,r;return(e=e&&g(e))?(t=e.getFullYear(),n=e.getMonth(),r=e.getDay(),e=e.getDate(),{decadeYear:rt(t),year:t,month:n,day:r,date:e}):{}},g=function(e,t,n){var r;if(e)if("number"==typeof e)r=new Date(e);else{if("string"==typeof e)return t?Ke(t,e,n):void 0;r=e instanceof Date?e:(t=e.year,n=e.month,e=e.date,new Date(t,n,e,0,0,0))}return r},ot=function(){e(p,fe["Component"]);var f=h(p);function p(e){d(this,p),pe(V(W=f.call(this,e)),"updateState",function(e,t,n){W.setState({year:e,month:t,date:n})}),pe(V(W),"getDateValue",function(e,t,n){return new Date(e,t,n)}),pe(V(W),"getNavDateInfo",function(e){var t=W.state,n=t.yearBlockNav,r=t.yearNav,t=t.monthNav,o=(t+e)%Je==-1?11:(t+e)%Je,r=0<=e?r+(0!==e&&o<t?1:0):r-(0!==e&&t<o?1:0);return{yearBlock:n,year:r,month:o}}),pe(V(W),"getInRangeError",function(){var e=W.props,t=e.rangePicker,e=e.rangeLimit,n=W.state,r=n.startDate,o=n.endDate,n=n.hoverDate;if(t&&e){var i,t=Y(r),a=t.year,s=t.month,t=t.date,c=Y(o),u=c.year,l=c.month,c=c.date,n=Y(n),f=n.year,p=n.month,n=n.date;if(r)return(i=new Date(r)).setDate(t+e),G(i,"less",f,p,n+1)||G(i,"less",u,l,c+1);if(o)return(i=new Date(o)).setDate(c-e),G(i,"more",f,p,n-1)||G(i,"more",a,s,t-1)}return!1}),pe(V(W),"selectYear",function(e){return function(){W.updateState(e),W.setState({view:"month"})}}),pe(V(W),"yearMouseOverHandler",function(e,t,n,r){var o=W.props.onYearHover;o&&o({value:e,year:e,isCurrentYear:t,isDisabled:n},r)}),pe(V(W),"selectMonth",function(e){return function(){W.updateState(W.state.yearNav,e),W.setState({view:"date"})}}),pe(V(W),"monthMouseOverHandler",function(e,t,n,r){var o=et,i=W.props.onMonthHover,o={value:o[e],month:o[e],year:W.state.year,isCurrentMonth:t,isDisabled:n};i&&i(o,r)}),pe(V(W),"selectDate",function(e,t,n,r){e=W.calculateDate(e,t,n,r,!1);W.setState({currDate:e})}),pe(V(W),"calculateDate",function(e,t,n,r,o){var i,a,s="",n=(t<=0?(i=e-1,a=n+t,s="prev"):r<t?(i=e+1,a=t-r,s="next"):(i=e,a=t),W.getNavDateInfo(i)),r=n.year,e=n.month;return!1===o&&(W.updateState(r,e,a),W.onNavIconClickHandler(s)()),W.getDateValue(r,e,a)}),pe(V(W),"onNavIconClickHandler",function(s){return function(){var e=W.state,t=e.view,n=e.yearBlockNav,r=e.yearNav,o=e.monthNav,i=$e,a=Je;switch(t){case"year":"prev"===s&&W.setState({yearBlockNav:n-i}),"next"===s&&W.setState({yearBlockNav:n+i});break;case"month":"prev"===s&&W.setState({yearNav:r-1}),"next"===s&&W.setState({yearNav:r+1});break;case"date":"prev"===s&&(0===o&&W.setState({yearNav:r-1}),W.setState({monthNav:(a+o-1)%a})),"next"===s&&(o===a-1&&W.setState({yearNav:r+1}),W.setState({monthNav:(o+1)%a}))}}}),pe(V(W),"renderJumpButton",function(e){var t=W.props,n=t.disabledBefore,r=t.disabledAfter,t=t.size,o=W.state,i=o.view,a=o.yearBlockNav,s=o.yearNav,c=o.monthNav,u=!1;switch(i){case"year":"prev"===e&&(u=ze(n,"more",a)||ze(n,"equal",a)),"next"===e&&(u=ze(r,"less",a)||ze(r,"equal",a));break;case"month":"prev"===e&&(u=G(n,"more",s-1)),"next"===e&&(u=G(r,"less",s+1));break;case"date":"prev"===e&&(u=G(n,"more",s,c-1)),"next"===e&&(u=G(r,"less",s,c+1))}o=ye(pe({"Calendar-headerIcon":!0},"Calendar-headerIcon--".concat(e),e));return fe.createElement(ve,{type:"button",className:o,appearance:"basic",icon:"arrow_".concat("next"===e?"forward":"back"),disabled:u,size:"small"===t?"tiny":"regular",onClick:W.onNavIconClickHandler(e)})}),pe(V(W),"onNavHeadingClickHandler",function(n){return function(){var e=W.props.monthsInView,t=W.props.jumpView;(t=t&&1<e?!1:t)&&("year"===n&&W.setState({view:"date"}),"month"===n&&W.setState({view:"year"}),"date"===n&&W.setState({view:"month"}))}}),pe(V(W),"renderHeaderContent",function(e){function t(e){return"small"===r?fe.createElement(fe.Fragment,null,fe.createElement(me,{weight:"strong"},e),"year"!==i&&fe.createElement(T,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"})):fe.createElement(fe.Fragment,null,fe.createElement(pt,{size:"s"},e),"year"!==i&&fe.createElement(T,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"}))}var n=W.props,r=n.size,n=n.monthsInView,o=W.state,i=o.view,o=o.yearBlockNav,a=$e,s=et,c=W.getNavDateInfo(e),u=c.year,c=c.month,n=ye({"Calendar-headerContent":!0,"Calendar-headerContent--noIcon-left":e===n-1,"Calendar-headerContent--noIcon-right":0===e}),e="";"year"===i&&(e="".concat(o," - ").concat(o+(a-1))),"month"===i&&(e="".concat(u));return fe.createElement("div",{className:n},"date"!==i&&fe.createElement("div",{className:"d-flex justify-content-center align-items-center",onClick:W.onNavHeadingClickHandler(i)},t(e)),"date"===i&&fe.createElement(fe.Fragment,null,fe.createElement("div",{onClick:W.onNavHeadingClickHandler(i),className:"d-flex justify-content-center align-items-center"},t(s[c])),fe.createElement("div",{className:"ml-4 d-flex justify-content-center align-items-center",onClick:W.onNavHeadingClickHandler("month")},t(u))))}),pe(V(W),"renderBodyYear",function(){var e=$e,c=Ze,t=W.props,u=t.size,l=t.rangePicker,f=t.disabledBefore,p=t.disabledAfter,t=W.state,d=t.yearBlockNav,h=t.currYear,t=Math.ceil(e/c);return Array.from({length:t},function(e,s){return fe.createElement("div",{key:s,className:"Calendar-valueRow"},Array.from({length:c},function(e,t){var n,r,o,i,a=c*s+t;if(a!==d)return n=d+a,a=G(f,"more",n)||G(p,"less",n),r=!a&&!l&&n===W.state.year,o=function(){return n===h},i=ye((pe(i={"Calendar-value":!0,"Calendar-value--active":r,"Calendar-value--disabled":a,"Calendar-yearValue":!0},"Calendar-yearValue--".concat(u),u),pe(i,"Calendar-value--currDateMonthYear",o()),i)),fe.createElement("div",{key:"".concat(s,"-").concat(t),"data-test":"DesignSystem-Calendar--yearValue",className:i,onClick:W.selectYear(n),onMouseOver:W.yearMouseOverHandler.bind(V(W),n,o(),a)},fe.createElement(me,{size:"small"===u?"small":"regular",appearance:r?"white":a?"disabled":o()?"link":"default"},n))}))})}),pe(V(W),"renderBodyMonth",function(){var e=Je,c=Xe,u=et,t=W.props,l=t.size,f=t.disabledBefore,p=t.disabledAfter,t=W.state,d=t.yearNav,h=t.year,y=t.currYear,g=t.currMonth,t=Math.ceil(e/c);return Array.from({length:t},function(e,s){return fe.createElement("div",{key:s,className:"Calendar-valueRow"},Array.from({length:c},function(e,t){function n(){return y===d&&g===r}var r=c*s+t,o=G(f,"more",d,r)||G(p,"less",d,r),i=!o&&h===d&&r===W.state.month,a=ye((pe(a={"Calendar-value":!0,"Calendar-value--active":i,"Calendar-value--dummy":o,"Calendar-monthValue":!0},"Calendar-monthValue--".concat(l),l),pe(a,"Calendar-value--currDateMonthYear",n()),a));return fe.createElement("div",{key:"".concat(s,"-").concat(t),"data-test":"DesignSystem-Calendar--monthValue",className:a,onClick:W.selectMonth(r),onMouseOver:W.monthMouseOverHandler.bind(V(W),r,n(),o)},fe.createElement(me,{size:"small"===l?"small":"regular",appearance:i?"white":o?"disabled":n()?"link":"default"},u[r]))}))})}),pe(V(W),"onDateRowMouseLeaveHandler",function(){W.props.rangePicker&&W.setState({hoverDate:void 0})}),pe(V(W),"renderBodyDate",function(e){var o=Qe,i=tt,t=W.props,a=t.size,s=t.firstDayOfWeek,c="large"===a?"regular":"small";return fe.createElement(fe.Fragment,null,fe.createElement("div",{className:"Calendar-dayValues"},Array.from({length:7},function(e,t){var n=ye({"Calendar-valueWrapper":!0}),r=(t+o+Fe(s))%o;return fe.createElement(me,{key:t,className:n,appearance:"default",weight:"strong",size:c},i[a][r])})),fe.createElement("div",{className:"Calendar-dateValues",onMouseLeave:W.onDateRowMouseLeaveHandler},W.renderDateValues(e)))}),pe(V(W),"renderDateValues",function(v){function b(e){return function(){(!O||T&&j||!U)&&W.selectDate(v,e,z,K)}}function _(t){return function(){var e;O&&(e=W.getDateValue(F,B,t),T&&j||W.setState({hoverDate:e}))}}function w(e,t,n,r){var e=W.calculateDate(v,e,z,K,!0)||new Date,o=et,i=tt.large[e.getDay()],t={value:e.getDate(),isToday:t,isDisabled:n,todayDate:W.state.currDate,fullDate:e,date:e.getDate(),month:o[e.getMonth()],year:e.getFullYear(),dayName:i};a&&a(t,r)}var S=Qe,E=Je,e=W.props,C=e.size,O=e.rangePicker,t=e.firstDayOfWeek,x=e.disabledBefore,k=e.disabledAfter,D=e.monthsInView,a=e.onDateHover,e=W.state,T=e.startDate,j=e.endDate,I=e.hoverDate,M=e.year,N=e.month,A=e.date,P=e.currMonth,R=e.currYear,L=e.todayDate,e=W.getNavDateInfo(v),F=e.year,B=e.month,z=Be(F,B-1),K=Be(F,B),e=new Date(F,B).getDay()-Fe(t),H=Math.abs(e),t=Math.ceil((K+H)/S),U=(6===t||1<D||(t+=1),W.getInRangeError()),q=W.props.events;return Array.from({length:t},function(e,m){return fe.createElement("div",{key:m,className:"Calendar-valueRow"},Array.from({length:S},function(e,t){function n(){var e=r<=0?R===F&&P===B-1&&L===z+r:K<r?R===F&&P===B+1&&L===r-K:R===F&&P===B&&L===r;return e}var r=S*m+t-H+1,o=r<=0||K<r,i=G(x,"more",F,B,r)||G(k,"less",F,B,r),a=!i&&M===F&&N===B&&A===r,s=!1,c=!1,u=!1,l=!1,f=(O&&(s=G(T,"equal",F,B,r),c=G(j,"equal",F,B,r),l=G(I,"equal",F,B,r),a=!i&&(s||c),T&&j?u=!i&&(G(T,"less",F,B,r)||s)&&(G(j,"more",F,B,r)||c):T?u=!i&&(G(I,"more",F,B,r)||l)&&G(T,"less",F,B,r):j&&(u=!i&&(G(I,"less",F,B,r)||l)&&G(j,"more",F,B,r))),Y(T)),p=f.year,d=f.month,f=f.date,h=Y(j),y=h.year,g=h.month,h=h.date,s=s||j&&l&&G(I,"less",y,g,h),y=c||T&&l&&G(I,"more",p,d,f),g=u&&U,h="".concat(r<=0?z+r:K<r?r-K:r),c="".concat(r<=0?0===B?B+E:(B-1)%E+1:K<r?(B+1)%E+1:B+1),l="".concat(r<=0&&B+1===1?F-1:K<r&&B+1===12?F+1:F),p="".concat(2===c.length?c:"0".concat(c),"/").concat(2===h.length?h:"0".concat(h),"/").concat(l),d=q&&"object"===$(q)&&q.hasOwnProperty(p),f=ye({"Calendar-valueWrapper":!0,"Calendar-valueWrapper--inRange":u||O&&a,"Calendar-valueWrapper--inRangeError":g,"Calendar-valueWrapper--start":s&&!y,"Calendar-valueWrapper--end":y&&!s,"Calendar-valueWrapper--startEnd":s&&y,"Calendar-valueWrapper--startError":s&&g,"Calendar-valueWrapper--endError":y&&g,"Calendar-valueWrapper--dummy":o}),h=ye((pe(c={"Calendar-value":!0,"Calendar-value--start":s&&!y,"Calendar-value--end":y&&!s,"Calendar-value--startError":s&&g,"Calendar-value--endError":y&&g,"Calendar-value--active":a,"Calendar-value--disabled":i,"Calendar-dateValue":!0},"Calendar-dateValue--".concat(C),C),pe(c,"Calendar-value--currDateMonthYear",n()),c));return fe.createElement("div",{key:"".concat(m,"-").concat(t),className:f,"data-test":"designSystem-Calendar-WrapperClass"},!o&&fe.createElement(fe.Fragment,null,fe.createElement(me,{appearance:a?"white":i?"disabled":n()?"link":"default",size:"small"===C?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:h,onClick:b(r),onMouseOver:_(r),onMouseEnter:w.bind(V(W),r,n(),i)},r),d&&W.renderEventsIndicator(C,a)),(o&&0<r&&v===D-1||o&&r<=0&&0===v)&&fe.createElement(fe.Fragment,null,fe.createElement(me,{appearance:a?"white":i?"disabled":n()?"link":"default",size:"small"===C?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:h,onClick:b(r),onMouseOver:_(r),onMouseEnter:w.bind(V(W),r,n(),i)},r<=0?z+r:r-K),d&&W.renderEventsIndicator(C,a)))}))})}),pe(V(W),"renderCalendar",function(e){var t=W.props,n=t.size,t=t.monthsInView,r=W.state.view,o=ye((pe(o={},"Calendar",!0),pe(o,"Calendar--".concat(r,"--").concat(n),r),pe(o,"Calendar--".concat(n),n),o)),n=ye(pe({},"Calendar-header--".concat(n),n)),i=ye({"Calendar-body":!0});return fe.createElement("div",{key:e,"data-test":"DesignSystem-Calendar",className:o},fe.createElement("div",{className:n},0===e&&W.renderJumpButton("prev"),W.renderHeaderContent(e),e===t-1&&W.renderJumpButton("next")),fe.createElement("div",{className:i},"year"===r&&W.renderBodyYear(),"month"===r&&W.renderBodyMonth(),"date"===r&&W.renderBodyDate(e)))});var W,t=W.props,n=t.rangePicker,r=t.startDate,o=t.endDate,i=t.monthsInView,t=t.view,n=n?o||r:e.date,a=void 0!==e.yearNav?e.yearNav:Y(n||Date.now()).year,e=void 0!==e.monthNav?e.monthNav:Y(n||Date.now()).month,s=Y(n),c=s.year,u=s.month,s=s.date,l=Y(new Date);return W.state={currDate:n,startDate:r,endDate:o,yearNav:a,monthNav:e,year:c,month:u,date:s,todayDate:l.date,currMonth:l.month,currYear:l.year,view:1<i?"date":t,yearBlockNav:rt(a)},W}return a(p,[{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a,s=this.props.monthsInView;e.date!==this.props.date&&(o=(a=Y(this.props.date)).year,r=a.month,a=a.date,this.updateState(o,r,a),o=g(this.props.date),this.setState({currDate:o})),e.startDate!==this.props.startDate&&(r=g(this.props.startDate),this.setState({startDate:r})),e.endDate!==this.props.endDate&&(a=g(this.props.endDate),this.setState({endDate:a})),e.view!==this.props.view&&1===this.props.monthsInView&&this.setState({view:this.props.view}),e.yearNav!==this.props.yearNav&&(o=this.props.yearNav)&&this.setState({yearNav:o,yearBlockNav:rt(o)}),e.monthNav!==this.props.monthNav&&(r=this.props.monthNav)&&this.setState({monthNav:r}),t.currDate!==this.state.currDate&&(o=(a=this.props).rangePicker,e=a.onDateChange,a=(r=this.state).currDate,n=r.startDate,r=r.endDate,a&&(e&&e(a),o?(this.setState({hoverDate:void 0}),n&&r?this.setState({startDate:a,endDate:void 0}):(o=(e=Y(a)).year,i=e.month,e=e.date,n?G(n,"more",o,i,e)?this.setState({startDate:a}):this.setState({endDate:a}):r&&G(r,"less",o,i,e)?this.setState({endDate:a}):this.setState({startDate:a}))):this.setState({startDate:a}))),t.startDate===this.state.startDate&&t.endDate===this.state.endDate||(n=this.props.onRangeChange,o=(r=this.state).startDate,i=r.endDate,n&&n(o,i)),t.year!==this.state.year&&void 0!==(e=this.state.year)&&1===s&&this.setState({year:e,yearBlockNav:rt(e),yearNav:e}),t.month!==this.state.month&&void 0!==(a=this.state.month)&&1===s&&this.setState({monthNav:a})}},{key:"renderEventsIndicator",value:function(e,t){var n,e=ye((pe(n={"Calendar-eventsIndicator":!0},"Calendar-eventsIndicator--".concat(e),!0),pe(n,"Calendar-eventsIndicator--active",t),n));return fe.createElement("span",{"data-test":"DesignSystem-Calendar-Event-Indicator",className:e})}},{key:"render",value:function(){var n=this,e=this.props,t=e.monthsInView,e=e.className,r=ge(this.props),e=ye({"Calendar-wrapper":!0},e);return fe.createElement("div",de({},r,{className:e,"data-test":"DesignSystem-Calendar-Wrapper"}),Array.from({length:t},function(e,t){return n.renderCalendar(t)}))}}]),p}(),it=(pe(ot,"defaultProps",{size:"large",monthsInView:1,view:"date",firstDayOfWeek:"sunday",jumpView:!0}),["shadow","children","className"]),n=fe.forwardRef(function(e,t){var n,r=e.shadow,r=void 0===r?"default":r,o=e.children,i=e.className,e=K(e,it),r=ye((pe(n={Card:!0},"Card--shadow-".concat(r),r),pe(n,"".concat(i),i),n));return fe.createElement("div",de({ref:t},e,{className:r}),o)}),at=(n.displayName="Card",["border","children","className"]),st=(fe.forwardRef(function(e,t){var n=e.border,r=e.children,o=e.className,e=K(e,at),n=ye(pe({CardSubdued:!0},"CardSubdued--".concat(n),n),o);return fe.createElement("div",de({"data-test":"DesignSystem-CardSubdued",ref:t},e,{className:n}),r)}).displayName="CardSubdued",He.displayName="GenericChip",function(e){var t=e.label,n=e.icon,r=e.clearButton,o=e.type,i=e.disabled,a=e.selected,s=e.onClose,c=e.onClick,u=e.name,l=e.className,e=ge(e),f=ye((pe(f={Chip:!0},"Chip-".concat(o,"--disabled"),i),pe(f,"Chip--".concat(o),o&&!i),pe(f,"Chip-".concat(o,"--selected"),a&&!i),pe(f,"Chip-selection--selectedDisabled","selection"===o&&a&&i),f),l);return fe.createElement(He,de({"data-test":"DesignSystem-Chip--GenericChip"},e,{label:t,selected:!("selection"!==o||!a),icon:n,clearButton:"action"!==o&&r,disabled:i,className:f,onClose:function(){!i&&s&&s(u)},onClick:function(){!i&&c&&c(u)},name:u}))}),ct=(st.displayName="Chip",st.defaultProps={type:"input"},["size","sizeXS","sizeS","sizeM","sizeL","sizeXL","className","children"]),O=fe.forwardRef(function(e,t){var n,r=e.size,o=e.sizeXS,i=e.sizeS,a=e.sizeM,s=e.sizeL,c=e.sizeXL,u=e.className,l=e.children,e=K(e,ct),r=ye((pe(n={},"Col",!0),pe(n,"Col--".concat(r),r),pe(n,"Col--xs-".concat(o),o),pe(n,"Col--s-".concat(i),i),pe(n,"Col--m-".concat(a),a),pe(n,"Col--l-".concat(s),s),pe(n,"Col--xl-".concat(c),c),pe(n,"".concat(u),u),n));return fe.createElement("div",de({ref:t,"data-test":"DesignSystem-Column"},e,{className:r}),l)}),ut=(O.displayName="Column",["date","open","position","inputFormat","outputFormat","inputOptions","validators","withInput","disabledBefore","disabledAfter","onDateChange","closeOnSelect","size","showTodayDate","children"]),n=function(){e(o,fe["Component"]);var r=h(o);function o(e){d(this,o),pe(V(s=r.call(this,e)),"getError",function(e){var t=s.props,n=t.disabledBefore,t=t.disabledAfter,n=Y(n),r=n.year,o=n.month,n=n.date,t=Y(t),i=t.year,a=t.month,t=t.date;return!e||(G(e,"less",r,o,n)||G(e,"more",i,a,t))}),pe(V(s),"onDateChangeHandler",function(e){s.setState({init:!0,date:e}),s.props.closeOnSelect&&s.setState({open:!1})}),pe(V(s),"onToggleHandler",function(e,t){var n=s.props.inputOptions.disabled;if(!n)switch(t){case"outsideClick":s.setState({open:e});break;case"onClick":s.setState({open:!0})}});var s,t=e.inputFormat,n=e.validators,t=g(e.date,t,n),n=s.getError(t);return s.state={date:t,error:n,init:!1,open:e.open||!1},s}return a(o,[{key:"componentDidUpdate",value:function(e,t){var n,r;e.date!==this.props.date&&(n=(r=this.props).inputFormat,r=r.validators,n=g(this.props.date,n,r),this.setState({date:n})),e.open!==this.props.open&&this.setState({open:this.props.open||!1}),t.date!==this.state.date&&(n=(r=this.props).onDateChange,e=r.outputFormat,t=this.state.date,r=this.getError(t),this.setState({error:r}),n&&(r?n(void 0,""):n(t,C(e,t))))}},{key:"renderCalendar",value:function(){var e=this,t=this.props,n=(t.date,t.open,t.position,t.inputFormat),r=(t.outputFormat,t.inputOptions,t.validators),o=(t.withInput,t.disabledBefore),i=t.disabledAfter,a=(t.onDateChange,t.closeOnSelect,t.size),s=t.showTodayDate,s=void 0===s||s,c=t.children,c=void 0===c?fe.createElement(fe.Fragment,null):c,t=K(t,ut),u=this.state.date,l=et,f=new Date(Date.now()),l="".concat(l[f.getMonth()]," ").concat(f.getDate()),f=g(u,n,r),u=g(o,n,r),o=g(i,n,r);return fe.createElement("div",null,fe.createElement("div",{className:"d-flex"},c,fe.createElement(ot,de({},t,{size:a,date:f,disabledBefore:u,disabledAfter:o,onDateChange:this.onDateChangeHandler}))),s&&fe.createElement("div",{className:"d-flex justify-content-center pb-6","data-test":"DesignSystem-Select--TodaysDate-wrapper"},fe.createElement(st,{label:"Today, ".concat(l),name:"chip",type:"action",disabled:(i=!0,f&&u&&o?i=u<f&&f<o:f&&u?i=f<u:f&&o&&(i=o<f),!i),onClick:function(){return e.onDateChangeHandler(new Date)}})))}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.withInput,r=e.inputFormat,o=e.inputOptions,e=e.validators,i=this.state.open;return n?fe.createElement(Oi,{trigger:fe.createElement(Ue,{inputFormat:r,inputOptions:o,validators:e,state:this.state,setState:this.setState.bind(this)}),triggerClass:"w-100",position:t,appendToBody:!0,open:i,onToggle:this.onToggleHandler},this.renderCalendar()):this.renderCalendar()}}]),o}(),lt=(pe(n,"defaultProps",z(z({},ot.defaultProps),{},{position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[A],inputOptions:{},closeOnSelect:!0})),["appearance","size","children","className"]),ft={s:"h5",m:"h4",l:"h3",xl:"h2",xxl:"h1"},pt=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.className,e=K(e,lt),n=ye((pe(t={Heading:!0},"Heading--".concat(r),r),pe(t,"Heading--".concat(n),n),t),i);return fe.createElement(re,de({"data-test":"DesignSystem-Heading"},e,{className:n,componentType:ft[r]}),o)},dt=(pt.displayName="Heading",pt.defaultProps={appearance:"default",size:"m"},["size","type","minWidth","defaultValue","name","placeholder","value","icon","inlineLabel","required","error","info","onChange","onClick","onClear","onBlur","onFocus","actionIcon","className","autoFocus","disabled","readOnly"]),ht={tiny:12,regular:16,large:20},yt=fe.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.type,r=void 0===r?"text":r,o=e.minWidth,o=void 0===o?"number"!==r?256:void 0:o,i=e.defaultValue,a=e.name,s=e.placeholder,c=e.value,u=e.icon,l=e.inlineLabel,f=e.required,p=e.error,d=e.info,h=e.onChange,y=e.onClick,g=e.onClear,m=e.onBlur,v=e.onFocus,b=e.actionIcon,_=e.className,w=e.autoFocus,S=e.disabled,E=e.readOnly,C=K(e,dt),O=fe.useRef(null),t=(fe.useImperativeHandle(t,function(){return O.current}),fe.useEffect(function(){var e;w&&null!=(e=O.current)&&e.focus({preventScroll:!0})},[]),ge(e)),p=ye((pe(e={},"Input",!0),pe(e,"Input--".concat(n),n),pe(e,"Input--disabled",S||E),pe(e,"Input--error",p),e),_),_=ye((pe(e={},"Input-input",!0),pe(e,"Input-input--".concat(n),n),e)),e=ye((pe(e={},"Input-icon",!0),pe(e,"Input-icon--left",!0),pe(e,"Input-icon--disabled",!c),e)),x=ye((pe(x={},"Input-icon",!0),pe(x,"Input-icon--right",!0),x)),k=fe.createElement("div",{className:x},fe.createElement(T,{name:"info",size:ht[n]}));return fe.createElement("div",{"data-test":"DesignSystem-InputWrapper",className:p,style:{minWidth:o},onClick:function(){var e;return null==(e=O.current)?void 0:e.focus()},role:"presentation"},l&&fe.createElement("div",{className:"Input-inlineLabel"},fe.createElement(me,{appearance:"subtle"},l)),"tiny"!==n&&u&&fe.createElement("div",{className:e},fe.createElement(T,{name:u,size:ht[n]})),fe.createElement("input",de({"data-test":"DesignSystem-Input"},t,C,{ref:O,name:a,type:r,defaultValue:i,placeholder:s,className:_,value:c,required:f,disabled:S,readOnly:E,onChange:h,onBlur:m,onClick:y,onFocus:v})),S?"":d?fe.createElement(Di,{position:"top",tooltip:d},k):b&&(c||i)?b:g&&(c||i)&&fe.createElement("div",{className:x},fe.createElement(T,{"data-test":"DesignSystem-Input--closeIcon",onClick:function(e){var t;null!=(t=O.current)&&t.focus({preventScroll:!0}),g(e)},name:"close",size:ht[n]})))}),gt=(yt.displayName="Input",["size","defaultValue","name","placeholder","icon","prefix","suffix","error","min","max","onChange","onClick","onBlur","onFocus","className","autoFocus","disabled","readOnly","value"]),mt={regular:16,large:20},vt=fe.forwardRef(function(e,t){function n(e){var t;return ye((pe(t={},"MetricInput-arrowIcon",!0),pe(t,"MetricInput-arrowIcon--".concat(i),i),pe(t,"MetricInput-arrowIcon--".concat(e),e),t))}function r(e,t){var n=Number(k||0);_||w||!("down"===t?void 0!==p&&p<n||void 0===p:void 0!==d&&n<d||void 0===d)||(n=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1/0,t=1<arguments.length?arguments[1]:void 0;return isNaN(e)||!e&&0!==e||isNaN(t)||!t&&0!==t?t:Math.min(e,t)}(d,function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:-1/0,t=1<arguments.length?arguments[1]:void 0;return isNaN(e)||!e&&0!==e||isNaN(t)||!t&&0!==t?t:Math.max(e,t)}(p,n="down"===t?n-1:n+1)),O&&D(n),h&&(t=Object.create(e,{target:{value:{value:n}}}),h(t)))}var o=e.size,i=void 0===o?"regular":o,o=e.defaultValue,a=e.name,s=e.placeholder,c=e.icon,u=e.prefix,l=e.suffix,f=e.error,p=e.min,d=e.max,h=e.onChange,y=e.onClick,g=e.onBlur,m=e.onFocus,v=e.className,b=e.autoFocus,_=e.disabled,w=e.readOnly,S=e.value,E=K(e,gt),C=fe.useRef(null),O=void 0===S,x=he(fe.useState(S||o),2),k=x[0],D=x[1],x=(fe.useImperativeHandle(t,function(){return C.current}),fe.useEffect(function(){var e;b&&null!=(e=C.current)&&e.focus({preventScroll:!0})},[]),fe.useEffect(function(){void 0!==S&&D(S)},[S]),ge(e)),e=ye((pe(t={},"MetricInput",!0),pe(t,"MetricInput--".concat(i),i),pe(t,"MetricInput--disabled",_||w),pe(t,"MetricInput--error",f),t),v),t=ye((pe(f={},"MetricInput-input",!0),pe(f,"MetricInput-input--".concat(i),i),f)),f=ye((pe(v={},"MetricInput-icon",!0),pe(v,"MetricInput-icon--".concat(i),i),v)),v="regular"===i?12:16;return fe.createElement("div",{"data-test":"DesignSystem-MetricInputWrapper",className:e,onClick:function(){var e;return null==(e=C.current)?void 0:e.focus()},onFocus:function(){var e;return null==(e=C.current)?void 0:e.focus()},onKeyDown:function(){},role:"presentation"},c&&fe.createElement(T,{"data-test":"DesignSystem-MetricInput--icon",name:c,size:mt[i],appearance:k?"subtle":"disabled",className:f}),u&&fe.createElement(me,{"data-test":"DesignSystem-MetricInput--prefix",className:"regular"===i?"mr-4":"mr-5",size:i,appearance:"subtle"},u),fe.createElement("input",de({"data-test":"DesignSystem-MetricInput"},x,E,{type:"number",ref:C,name:a,defaultValue:o,placeholder:s,className:t,value:k,disabled:_,readOnly:w,onChange:function(e){O&&D(e.target.value),h&&h(e)},onBlur:g,onClick:y,onFocus:m,onKeyDown:function(e){switch(e.key){case"e":case"E":return void e.preventDefault();case"ArrowDown":return e.preventDefault(),void r(e,"down");case"ArrowUp":return e.preventDefault(),void r(e,"up")}}})),l&&fe.createElement(me,{"data-test":"DesignSystem-MetricInput--suffix",className:"regular"===i?"ml-4":"ml-5",size:i,appearance:"subtle"},l),fe.createElement("div",{className:"MetricInput-arrowIcons"},fe.createElement(T,{tabIndex:-1,className:n("up"),size:v,name:"keyboard_arrow_up",onClick:function(e){return r(e,"up")},"data-test":"DesignSystem-MetricInput--upIcon"}),fe.createElement(T,{tabIndex:-1,className:n("down"),size:v,name:"keyboard_arrow_down",onClick:function(e){return r(e,"down")},"data-test":"DesignSystem-MetricInput--downIcon"})))}),bt=(vt.displayName="MetricInput",["mask","value","placeholderChar","validators","clearOnEmptyBlur","defaultValue","mask","error","caption","required","onChange","onBlur","onFocus","onClear","className"]),n=fe.forwardRef(function(e,t){e.mask;var n=e.value,r=e.placeholderChar,d=void 0===r?"_":r,r=e.validators,h=void 0===r?[]:r,r=e.clearOnEmptyBlur,o=void 0===r||r,r=e.defaultValue,y=e.mask,i=e.error,a=e.caption,s=e.required,g=e.onChange,c=e.onBlur,u=e.onFocus,l=e.onClear,f=e.className,e=K(e,bt),m=fe.useCallback(function(e){return"object"===$(y[e])},[y]),v=fe.useCallback(function(e,t){if("right"===e){for(var n=t;n<y.length;n++)if(m(n))return n;return y.length}if("left"!==e)return t;for(var r=t;0<=r;r--)if(m(r-1))return r;return 0},[y,m]),p=fe.useCallback(function(){var e=v("right",0);return{start:e,end:e}},[v]),b=fe.useCallback(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:y.length-1;return qe(y,d).slice(e,t+1)},[y,d]),_=fe.useMemo(function(){return b()},[b]),w=fe.useMemo(function(){return p()},[p]),S=fe.useRef(null),E=fe.useRef(),C=fe.useRef(w),O=fe.useRef(0),r=he(fe.useState(r||n||""),2),x=r[0],k=r[1],D=(fe.useImperativeHandle(t,function(){return S.current}),fe.useEffect(function(){k(n||"")},[n]),fe.useEffect(function(){I(O.current)},[x]),fe.useCallback(function(e){return Math.abs(e.end-e.start)},[])),T=fe.useCallback(function(){var e;return{start:(null==(e=S.current)?void 0:e.selectionStart)||0,end:(null==(e=S.current)?void 0:e.selectionEnd)||0}},[S.current]),j=fe.useCallback(function(e){var t,n;S.current&&(t=S.current,n=Math.min(e.start,e.end),e=Math.max(e.start,e.end),t.setSelectionRange(n,e))},[S.current]),I=fe.useCallback(function(e){return j({start:e,end:e})},[j]),M=fe.useCallback(function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r="",o=t+1,i=n;if(t>=y.length)return r;if(n>=e.length)return C.current={start:t,end:t},r;var a=y[t];return m(t)?(e[n].match(a)?r+=e[n]:r+=d,i++):r+=a,r+=M(e,o,i)},[y,d,m]),N=fe.useCallback(function(){C.current=T(),E.current=window.requestAnimationFrame(N)},[C.current,T]),r=fe.useCallback(function(e){var t,n=e.currentTarget.value,r=T(),o=Math.min(C.current.start,r.start),i=r.end,a=o,s=0,i=n.slice(o,i),c=(t=M(i,o)).length;r.end>C.current.end?s=c?D(C.current):0:n.length<x.length&&(s=x.length-n.length),a+=c;for(var u=x.split(""),l=0;l<c;l++)u[o+l]=t[l];for(var f=0;f<s;f++){var p=o+c+f;u[p]=b(p,p)}i=v(s?"left":"right",a),1===s&&!t.length&&!m(a)&&0<i?(a=i,u[--a]=d):1!==s&&(a=i),r=u.slice(0,y.length).join("");O.current=a,r!==x&&L(h,r)?(k(r),null!=g&&g(e,r)):window.requestAnimationFrame(function(){return I(O.current)})},[C.current,h,T,M,D,b,v,m,I,k,g]),t=fe.useCallback(function(e){var t=e.currentTarget.value;o&&t===_&&(k(""),t=""),null!=c&&c(e,t),E.current&&window.cancelAnimationFrame(E.current)},[o,E.current,b,k,c]),A=fe.useCallback(function(e){O.current=w.start,k(_),null!=l&&l(e)},[k,b,I,p,l]),P=fe.useCallback(function(e){E.current=window.requestAnimationFrame(N),x||(O.current=w.start,k(b())),null!=u&&u(e)},[E.current,x,N,k,j,u]),R=fe.useMemo(function(){return ye({"d-flex flex-column flex-grow-1":!0},f)},[f]);return fe.createElement("div",{className:R,"data-test":"DesignSystem-InputMask--Wrapper"},fe.createElement(yt,de({},e,{value:x,error:i,required:s,onFocus:P,onChange:r,onClear:A,onBlur:t,autoComplete:"off",ref:S})),fe.createElement(St,{error:i,withInput:!0,hide:!a},a))}),_t=(n.displayName="InputMask",n.utils={getDefaultValue:qe},n),wt=["required","optional","withInput","disabled","children","className"],St=(We.displayName="Label",function(e){var t,n=e.error,r=e.hide,o=e.withInput,i=e.children,a=e.className,e=ge(e),r=ye((pe(t={Caption:!0},"Caption--hidden",r),pe(t,"Caption--withInput",o),t),a),o=ye(pe({},"Caption-icon",!0));return fe.createElement("div",de({},e,{className:r,"data-test":"DesignSystem-Caption"}),n&&fe.createElement("div",{className:o},fe.createElement(T,{size:14,name:"error",appearance:"alert"})),fe.createElement(me,{appearance:n?"destructive":"subtle",size:"small",weight:"medium"},"".concat(i)))}),Et=(St.displayName="Caption",["children","className","appearance","size","disabled"]),Ct=function(e){var t,n=e.children,r=e.className,o=e.appearance,i=e.size,a=e.disabled,e=K(e,Et),a=ye((pe(t={Link:!0},"Link--disabled",a),pe(t,"Link--".concat(i),i),pe(t,"Link--".concat(o),o),t),r);return fe.createElement(re,de({"data-test":"DesignSystem-Link",className:a,componentType:"a"},e),n)},Ot=(Ct.displayName="Link",Ct.defaultProps={appearance:"default",size:"regular",disabled:!1},Ve.displayName="Meta",function(e){var o=e.list,t=e.seperator,i=e.seperatorAppearance,a=e.iconAppearance,s=e.labelAppearance,n=e.className,e=ge(e),n=ye(pe({},"MetaList",!0),n),c=ye(pe({},"MetaList-seperator",!0)),r=ye((pe(r={},"MetaList-seperator",!0),pe(r,"MetaList-seperator--left",!0),r));return fe.createElement("div",de({"data-test":"DesignSystem-MetaList"},e,{className:n}),t&&fe.createElement(T,{"data-test":"DesignSystem-MetaList--Seperator",name:"fiber_manual_record",size:8,className:r,appearance:i}),o.map(function(e,t){var n=e.label,e=e.icon,r=t!==o.length-1;return fe.createElement("span",{key:t,className:"MetaList-item"},fe.createElement(Ve,{label:void 0===n?"":n,icon:e,iconAppearance:a,labelAppearance:s}),r&&fe.createElement(T,{"data-test":"DesignSystem-MetaList--rightSeperator",name:"fiber_manual_record",size:8,className:c,appearance:i}))}))});Ot.displayName="MetaList",Ot.defaultProps={seperatorAppearance:"disabled",iconAppearance:"disabled",labelAppearance:"subtle"};function xt(e,t,n,r){for(var o=t<n?1:-1,i=t;i!==n+o;i+=o)e[i]=r}var kt=function(){e(o,fe["Component"]);var r=h(o);function o(){var i;d(this,o);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return pe(V(i=r.call.apply(r,[this].concat(t))),"state",{isHandleMoving:!1,isHandleHovered:!1}),pe(V(i),"handleElement",null),pe(V(i),"refHandlers",{handle:function(e){return i.handleElement=e}}),pe(V(i),"mouseEventClientOffset",function(e){return e.clientX}),pe(V(i),"clientToValue",function(e){var t=i.props,n=t.stepSize,r=t.tickSize,t=t.value;if(null==i.handleElement)return t;var o=i.getHandleMidpointAndOffset(i.handleElement),e=e-(o.handleMidpoint+o.handleOffset);return isNaN(e)?t:t+Math.round(e/(r*n))*n}),pe(V(i),"changeValue",function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:i.props.onChange,e=Ye(e,i.props.min,i.props.max);return isNaN(e)||i.props.value===e||t&&t(e),e}),pe(V(i),"endHandleMovement",function(e){var e=i.mouseEventClientOffset(e),t=i.props.onRelease,e=(i.removeDocumentEventListeners(),i.setState({isHandleMoving:!1}),i.changeValue(i.clientToValue(e)));t&&t(e)}),pe(V(i),"continueHandleMovement",function(e){var e=i.mouseEventClientOffset(e);i.state.isHandleMoving&&!i.props.disabled&&(e=i.clientToValue(e),i.changeValue(e))}),pe(V(i),"beginHandleMovement",function(e){i.props.disabled||(document.addEventListener("mousemove",i.continueHandleMovement),document.addEventListener("mouseup",i.endHandleMovement),i.setState({isHandleMoving:!0}),e=i.clientToValue(e.clientX),i.changeValue(e))}),pe(V(i),"handleKeyDown",function(e){var t,n,r;i.props.disabled||(t=(n=i.props).stepSize,n=n.value,37===(r=e.keyCode)?(i.changeValue(n-t),e.preventDefault()):39===r&&(i.changeValue(n+t),e.preventDefault()))}),pe(V(i),"handleKeyUp",function(e){i.props.disabled||0<=[37,39].indexOf(e.keyCode)&&((e=i.props.onRelease)&&e(i.props.value))}),pe(V(i),"getHandleMidpointAndOffset",function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(null==e)return{handleMidpoint:0,handleOffset:0};e=e.getBoundingClientRect();return{handleOffset:e.left,handleMidpoint:e[t?"height":"width"]/2}}),pe(V(i),"handleMouseOver",function(){i.setState({isHandleHovered:!0})}),pe(V(i),"handleMouseLeave",function(){i.setState({isHandleHovered:!1})}),pe(V(i),"removeDocumentEventListeners",function(){document.removeEventListener("mousemove",i.continueHandleMovement),document.removeEventListener("mouseup",i.endHandleMovement)}),i}return a(o,[{key:"componentWillUnmount",value:function(){this.removeDocumentEventListeners()}},{key:"componentDidUpdate",value:function(e,t){t.isHandleMoving!==this.state.isHandleMoving&&this.handleElement&&this.handleElement.focus()}},{key:"render",value:function(){var e=this.props,t=e.min,n=e.tickSizeRatio,r=e.value,o=e.disabled,i=e.label,e=e.isCurrentLabelHovered,a=this.state,s=a.isHandleMoving,a=a.isHandleHovered,a=s||a||e,e=this.getHandleMidpointAndOffset(this.handleElement,!0).handleMidpoint,r={left:"calc(".concat(Ge((r-t)*n)," - ").concat(e,"px)")},n=ye((pe(t={},"Slider-handle",!0),pe(t,"Slider-handle--disabled",o),pe(t,"Slider-handle--active",s),t)),o=ye((pe(e={},"Slider-tooltip",!0),pe(e,"Tooltip",!0),pe(e,"d-none",!a),e));return fe.createElement(fe.Fragment,null,fe.createElement("div",{className:n,onMouseOver:this.handleMouseOver,onMouseLeave:this.handleMouseLeave,onMouseDown:this.beginHandleMovement,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,ref:this.refHandlers.handle,style:r,tabIndex:1,"data-test":"DesignSystem-MultiSlider-Handle"}),fe.createElement("div",{className:o,style:r},i))}}]),o}(),n=function(){e(n,fe["Component"]);var t=h(n);function n(e){var p;return d(this,n),pe(V(p=t.call(this,e)),"handleElements",[]),pe(V(p),"trackElement",null),pe(V(p),"getLabelPrecision",function(e){var t=e.labelPrecision,e=e.stepSize;return null==t?(e=e,isFinite(e)&&Math.floor(e)!==e&&e.toString().split(".")[1].length||0):t}),pe(V(p),"getOffsetRatio",function(e){return Ye((e-p.props.min)*p.state.tickSizeRatio,0,1)}),pe(V(p),"addHandleRef",function(e){null!=e&&p.handleElements.push(e)}),pe(V(p),"getHandleValues",function(e){e=fe.Children.map(e.children,function(e){return null!=(t=e)&&null!=t.type?e.props:null;var t}),e=null!=e?e:[];return(e=e.filter(function(e){return null!==e})).sort(function(e,t){return e.value-t.value}),e}),pe(V(p),"updateTickSize",function(){var e,t;null!=p.trackElement&&(e=p.trackElement.clientWidth,t=1/(p.props.max-p.props.min),p.setState({tickSize:e*t,tickSizeRatio:t}))}),pe(V(p),"getTrackFill",function(e,t){return void 0!==e.fillAfter?e.fillAfter:void 0!==t&&void 0!==t.fillBefore&&t.fillBefore}),pe(V(p),"maybeHandleTrackClick",function(t){var e=t.target;!p.props.disabled&&null==e.closest(".Slider-handle")&&(e=p.nearestHandleForValue(p.handleElements,function(e){return e.mouseEventClientOffset(t)}))&&e.beginHandleMovement(t)}),pe(V(p),"getLockedHandleIndex",function(e,t){var n=e<t?1:-1,e=e+n;return e!==t+n?e:-1}),pe(V(p),"getNewHandleValues",function(e,t){var n=p.getHandleValues(p.props).map(function(e){return e.value}),r=n.slice(),o=(r[t]=e,1<r.length&&r.sort(function(e,t){return e-t}),r.indexOf(e)),i=p.getLockedHandleIndex(t,o);return-1!==i?(xt(n,t,i,n[i]),n):(xt(r,t,o,e),r)}),pe(V(p),"onReleaseHandler",function(e,t){var n=p.props.onRangeRelease,r=p.getHandleValues(p.props),o=p.getNewHandleValues(e,t);n&&n(o),r.forEach(function(e,t){e.onRelease&&e.onRelease(o[t])})}),pe(V(p),"onChangeHandler",function(e,t){var n=p.props.onRangeChange,r=p.getHandleValues(p.props),o=r.map(function(e){return e.value}),i=p.getNewHandleValues(e,t);!function(n,e){if(n.length==n.length)return e.every(function(e,t){return e===n[t]})}(i,o)&&(n&&n(i),r.forEach(function(e,t){e.onChange&&e.onChange(i[t])}))}),pe(V(p),"formatLabel",function(e){var t=p.props.labelRenderer;return"function"==typeof t?t(e):e.toFixed(p.state.labelPrecision)}),pe(V(p),"renderHandles",function(){var e=p.props,r=e.disabled,o=e.max,i=e.min,a=e.stepSize,s=p.getHandleValues(p.props);return 0===s.length?null:s.map(function(e,t){var e=e.value,n=p.state.hoveredLabelValue===Number(e.toFixed(p.state.labelPrecision));return fe.createElement(kt,{disabled:r,key:"".concat(t,"-").concat(s.length),max:o,min:i,onRelease:function(e){return p.onReleaseHandler(e,t)},onChange:function(e){return p.onChangeHandler(e,t)},label:p.formatLabel(e),ref:p.addHandleRef,stepSize:a,tickSize:p.state.tickSize,tickSizeRatio:p.state.tickSizeRatio,value:e,isCurrentLabelHovered:n})})}),pe(V(p),"renderLabels",function(){for(var e,t=p.props,n=t.labelStepSize,r=t.max,o=t.min,i=t.labelRenderer,a=t.disabled,s=[],c=p.state.tickSizeRatio*n,u=p.getHandleValues(p.props).map(function(e){return e.value.toFixed(p.state.labelPrecision)}),l=o,f=0;l<r||(e=l,Math.abs(e-r)<=1e-5);l+=n,f+=c)!function(n,e){var e={left:Ge(e)},t=!a&&-1!==u.indexOf(n.toFixed(p.state.labelPrecision));s.push(fe.createElement("div",{onClick:function(t){var e;p.props.disabled||(e=p.nearestHandleForValue(p.handleElements,function(e){return e.mouseEventClientOffset(t)}))&&e.changeValue(n)},className:"Slider-label",key:n,style:e,onMouseOver:function(){return p.handleLabelMouseOver(n)},onMouseLeave:p.handleLabelMouseLeave,"data-test":"DesignSystem-MultiSlider-Label"},fe.createElement("span",{className:"Slider-ticks"}),!1!==i&&fe.createElement(me,{size:"small",appearance:t?"default":"disabled"},p.formatLabel(n))))}(l,f);return s}),pe(V(p),"renderTrackFill",function(e,t,n){var r=he([p.getOffsetRatio(t.value),p.getOffsetRatio(n.value)].sort(function(e,t){return e-t}),2),o=r[0],r=r[1],o=Number((100*o).toFixed(2)),r=Number((100*(1-r)).toFixed(2)),r=z({},{width:"".concat(100-r-o,"%")}),o=p.getTrackFill(t,n),n=ye((pe(t={},"Slider-progress",!0),pe(t,"Slider-progress--disabled",p.props.disabled),pe(t,"Slider-progress--inRange",o),pe(t,"Slider-progress--inRangeDisabled",o&&p.props.disabled),t));return fe.createElement("div",{key:"track-".concat(e),className:n,style:r})}),pe(V(p),"renderTracks",function(){var e=p.getHandleValues(p.props),n=(e.push({value:p.props.max}),{value:p.props.min||0}),r=[];return e.forEach(function(e,t){r.push(p.renderTrackFill(t,n,e)),n=e}),r}),pe(V(p),"handleLabelMouseOver",function(e){p.setState({hoveredLabelValue:e})}),pe(V(p),"handleLabelMouseLeave",function(){p.setState({hoveredLabelValue:void 0})}),p.state={labelPrecision:p.getLabelPrecision(p.props),tickSize:0,tickSizeRatio:0},p}return a(n,[{key:"getDerivedStateFromProps",value:function(e){return{labelPrecision:this.getLabelPrecision(e)}}},{key:"getSnapshotBeforeUpdate",value:function(e){e=this.getHandleValues(e);return this.getHandleValues(this.props).length!==e.length&&(this.handleElements=[]),null}},{key:"componentDidMount",value:function(){this.updateTickSize()}},{key:"nearestHandleForValue",value:function(e,n){var t=e,r=function(e){var t=n(e),t=e.clientToValue(t),e=e.props.value;return Math.abs(t-e)};if(0!==t.length){for(var o=t[0],i=r(o),a=1;a<t.length;a++){var s=t[a],c=r(s);c<i&&(o=s,i=c)}return o}}},{key:"render",value:function(){var t=this,e=this.props,n=e.label,e=e.className,r=ge(this.props),e=ye(pe({},"Slider",!0),e),o=ye((pe(o={},"Slider-wrapper",!0),pe(o,"Slider-wrapper--disabled",this.props.disabled),o));return fe.createElement("div",de({},r,{className:e,"data-test":"DesignSystem-MultiSlider"}),n&&fe.createElement(We,{withInput:!0},n),fe.createElement("div",{className:o},fe.createElement("div",{className:"Slider-track",ref:function(e){return t.trackElement=e},onMouseDown:this.maybeHandleTrackClick,"data-test":"DesignSystem-MultiSlider-Slider-Track"},this.renderTracks()),fe.createElement("div",{className:"Slider-axis"},this.renderLabels()),this.renderHandles()))}}]),n}(),Dt=(pe(n,"defaultProps",{labelStepSize:1,max:10,min:0,stepSize:1,labelRenderer:!0}),pe(n,"Handle",function(){return null}),["children","className","onOutsideClick"]),Tt=fe.forwardRef(function(e,t){var n=e.children,r=e.className,o=e.onOutsideClick,e=K(e,Dt),i=fe.useRef(null),a=(fe.useImperativeHandle(t,function(){return i.current},[i]),fe.useEffect(function(){return document.addEventListener("click",a,!0),function(){document.removeEventListener("click",a)}},[]),fe.useCallback(function(e){var t=i;e.target&&t.current&&(t.current.contains(e.target)||o(e))},[])),t=ye(pe({},"OutsideClick",!0),r);return fe.createElement("div",de({ref:i},e,{className:t}),n)}),jt=(Tt.displayName="OutsideClick",["appearance","children","className"]),It=function(e){var t=e.appearance,n=e.children,r=e.className,e=K(e,jt),t=ye(pe({Text:!0},"Text--".concat(t),t),r);return fe.createElement(re,de({"data-test":"DesignSystem-Paragraph"},e,{className:t,componentType:"p"}),n)},Mt=(It.displayName="Paragraph",It.defaultProps={appearance:"default"},["size","label","disabled","onChange","name","value","checked","defaultChecked","className","helpText"]),r=fe.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.label,o=e.disabled,i=e.onChange,a=e.name,s=e.value,c=e.checked,u=e.defaultChecked,l=e.className,f=e.helpText,e=K(e,Mt),p=fe.useRef(null),t=(fe.useImperativeHandle(t,function(){return p.current}),ye((pe(t={},"Radio",!0),pe(t,"Radio--disabled",o),t),l)),l=ye((pe(l={},"Radio-wrapper",!0),pe(l,"Radio-wrapper--".concat(n),n),l)),d=ye((pe(d={},"Radio-outerWrapper",!0),pe(d,"Radio-outerWrapper--".concat(n),n),d)),h=ye(pe({},"Radio-Label",!0)),y="".concat(a,"-").concat(r,"-").concat(ie());return fe.createElement("div",{className:t,"data-test":"DesignSystem-Radio"},fe.createElement("div",{className:d,"data-test":"DesignSystem-Radio-OuterWrapper"},fe.createElement("input",de({},e,{type:"radio",disabled:o,checked:c,defaultChecked:u,ref:p,name:a,value:s,onChange:i,className:"Radio-input",id:y,"data-test":"DesignSystem-Radio-Input"})),fe.createElement("span",{className:l})),fe.createElement("div",{className:"Radio-labelWrapper"},r&&fe.createElement("label",{className:h,htmlFor:y,"data-test":"DesignSystem-Radio-Label"},fe.createElement(me,{size:"tiny"===n?"small":"regular",appearance:o?"disabled":"default"},r)),f&&fe.createElement(me,{"data-test":"DesignSystem-Radio-HelpText",size:"small",appearance:o?"disabled":"subtle"},f.trim())))}),Nt=(r.displayName="Radio",["className","children"]),At=fe.forwardRef(function(e,t){var n=e.className,r=e.children,e=K(e,Nt),n=ye(pe({Row:!0},"".concat(n),n));return fe.createElement("div",de({"data-test":"DesignSystem-Row",ref:t},e,{className:n}),r)}),Pt=(At.displayName="Row",function(e){var t,n=e.appearance,r=e.children,o=e.onMouseEnter,i=e.onMouseLeave,a=e.onClick,s=e.className,e=ge(e),s=ye(pe({},"StatusHint",!0),s),n=ye((pe(t={},"StatusHint-icon",!0),pe(t,"StatusHint--".concat(n),n),t));return fe.createElement("div",de({"data-test":"DesignSystem-StatusHint"},e,{className:s,onClick:function(e){return a&&a(e)},onMouseEnter:function(e){return o&&o(e)},onMouseLeave:function(e){return i&&i(e)}}),fe.createElement("span",{"data-test":"DesignSystem-StatusHint--Icon",className:n}),fe.createElement(me,{"data-test":"DesignSystem-StatusHint--Text",weight:"medium"},r))}),Rt=(Pt.displayName="StatusHint",Pt.defaultProps={appearance:"default"},function(e){var t,n=e.appearance,r=e.children,o=e.subtle,i=e.className,e=ge(e),n=ye((pe(t={Pills:!0},"Badge--".concat(n),n&&!o),pe(t,"Badge--subtle-".concat(n),o),t),i);return fe.createElement("span",de({"data-test":"DesignSystem-Pills"},e,{className:n}),r)}),Lt=(Rt.displayName="Pills",Rt.defaultProps={appearance:"secondary"},function(e){var t=e.appearance,n=e.size,r=e.className,e=ge(e),n=ye(pe({Spinner:!0},"Spinner--".concat(n),n),r),r=ye(pe({Circle:!0},"Circle--".concat(t),t));return fe.createElement("svg",de({},e,{className:n},{viewBox:"0 0 50 50"}),fe.createElement("circle",de({className:r},{cx:25,cy:25,r:20,fill:"none",strokeMiterlimit:"10",strokeWidth:"4"})))}),Ft=(Lt.displayName="Spinner",Lt.defaultProps={appearance:"primary",size:"medium"},z(z({},n.defaultProps),{},{defaultValue:0}),(r=o=o||{})[r.START=0]="START",r[r.END=1]="END",z(z({},n.defaultProps),{},{defaultValue:[0,10]}),["size","defaultChecked","disabled","onChange","name","value","className","appearance","checked"]),Bt=(fe.forwardRef(function(e,t){function n(e){"change"!=e.type&&"Space"!==e.key||(void 0===l&&d(!p),a&&a(e,!p))}var r=e.size,r=void 0===r?"regular":r,o=e.defaultChecked,i=e.disabled,a=e.onChange,s=e.name,c=e.value,u=e.className,l=(e.appearance,e.checked),e=K(e,Ft),f=he(fe.useState(void 0===l?o:l),2),p=f[0],d=f[1],f=(fe.useEffect(function(){void 0!==l&&d(l)},[l]),ye((pe(f={},"Switch",!0),pe(f,"Switch--disabled",i),pe(f,"Switch--".concat(r),r),f),u)),r=ye((pe(u={},"Switch-wrapper",!0),pe(u,"Switch-wrapper--disabled",i),pe(u,"Switch-wrapper--".concat(r),r),pe(u,"Switch-wrapper--checked",p),pe(u,"Switch-wrapper--checkedDisabled",p&&i),u));return fe.createElement("div",{className:f},fe.createElement("input",de({},e,{type:"checkbox",defaultChecked:o,disabled:i,onChange:n,checked:p,ref:t,name:s,value:c,className:"Switch-input",onKeyUp:n})),fe.createElement("span",{className:r}))}).displayName="Switch",["rows","resize","disabled","name","placeholder","value","defaultValue","required","error","onChange","onClick","onBlur","onFocus","className"]);fe.forwardRef(function(e,t){var n,r=e.rows,r=void 0===r?3:r,o=e.resize,o=void 0===o||o,i=e.disabled,a=e.name,s=e.placeholder,c=e.value,u=e.defaultValue,l=e.required,f=e.error,p=e.onChange,d=e.onClick,h=e.onBlur,y=e.onFocus,g=e.className,e=K(e,Bt),o=ye((pe(n={},"Textarea",!0),pe(n,"Textarea--resize",o),pe(n,"Textarea--error",f),n),g);return fe.createElement("textarea",de({"data-test":"DesignSystem-Textarea"},e,{ref:t,name:a,rows:r,placeholder:s,className:o,value:c,defaultValue:u,required:l,disabled:i,onChange:p,onBlur:h,onClick:d,onFocus:y}))}).displayName="Textarea";function zt(e){var t=rn.call(e);return"[object Arguments]"===t||"[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Function]"===rn.call(e.callee)}function Kt(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;if(1!==(n=Object.getOwnPropertySymbols(e)).length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){n=Object.getOwnPropertyDescriptor(e,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}function Ht(){return Kt()&&!!Symbol.toStringTag}function Ut(e){try{return yn('"use strict"; return ('+e+").constructor;")()}catch(e){}}var qt,Wt,Vt,Gt,Yt,$t,Zt,Jt,Xt,Qt=B(t(function(e){e.exports=function(e,t){if(null==e)return{};for(var n,r={},o=Object.keys(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||(r[n]=e[n]);return r},e.exports.default=e.exports,e.exports.__esModule=!0})),en=B(t(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,t.apply(this,arguments)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),tn=t(function(n){function r(e,t){return n.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n.exports.default=n.exports,n.exports.__esModule=!0,r(e,t)}n.exports=r,n.exports.default=n.exports,n.exports.__esModule=!0}),o=(B(tn),t(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,tn(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),nn=B(o),i=B(t(function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0})),s=B(t(function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0})),rn=Object.prototype.toString,n=(Object.keys||(qt=Object.prototype.hasOwnProperty,Wt=Object.prototype.toString,Vt=zt,r=Object.prototype.propertyIsEnumerable,Gt=!r.call({toString:null},"toString"),Yt=r.call(function(){},"prototype"),$t=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Zt=function(e){var t=e.constructor;return t&&t.prototype===e},Jt={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Xt=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!Jt["$"+e]&&qt.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{Zt(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),c=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===Wt.call(e),r=Vt(e),o=t&&"[object String]"===Wt.call(e),i=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=Yt&&n;if(o&&0<e.length&&!qt.call(e,0))for(var s=0;s<e.length;++s)i.push(String(s));if(r&&0<e.length)for(var c=0;c<e.length;++c)i.push(String(c));else for(var u in e)a&&"prototype"===u||!qt.call(e,u)||i.push(String(u));if(Gt)for(var l=function(e){if("undefined"==typeof window||!Xt)return Zt(e);try{return Zt(e)}catch(e){return!1}}(e),f=0;f<$t.length;++f)l&&"constructor"===$t[f]||!qt.call(e,$t[f])||i.push($t[f]);return i}),c),on=Array.prototype.slice,an=Object.keys,sn=an?function(e){return an(e)}:n,cn=Object.keys,un=(sn.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return zt(e)?cn(on.call(e)):cn(e)}):Object.keys=sn,Object.keys||sn},sn),o="undefined"!=typeof Symbol&&Symbol,ln=Array.prototype.slice,fn=Object.prototype.toString,pn=Function.prototype.bind||function(t){var n=this;if("function"!=typeof n||"[object Function]"!==fn.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,e,o=ln.call(arguments,1),i=Math.max(0,n.length-o.length),a=[],s=0;s<i;s++)a.push("$"+s);return r=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(function(){var e;return this instanceof r?(e=n.apply(this,o.concat(ln.call(arguments))),Object(e)===e?e:this):n.apply(t,o.concat(ln.call(arguments)))}),n.prototype&&((e=function(){}).prototype=n.prototype,r.prototype=new e,e.prototype=null),r},dn=pn.call(Function.call,Object.prototype.hasOwnProperty),hn=SyntaxError,yn=Function,gn=TypeError,mn=Object.getOwnPropertyDescriptor;if(mn)try{mn({},"")}catch(xo){mn=null}function vn(){throw new gn}function bn(e,t){if("string"!=typeof e||0===e.length)throw new gn("intrinsic name must be a non-empty string");if(1<arguments.length&&"boolean"!=typeof t)throw new gn('"allowMissing" argument must be a boolean');var n=function(e){var t=zn(e,0,1),n=zn(e,-1);if("%"===t&&"%"!==n)throw new hn("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new hn("invalid intrinsic syntax, expected opening `%`");var o=[];return Bn(e,Kn,function(e,t,n,r){o[o.length]=n?Bn(r,Hn,"$1"):t||e}),o}(e),r=0<n.length?n[0]:"",o=function(e,t){var n,r=e;if(dn(Rn,r)&&(r="%"+(n=Rn[r])[0]+"%"),dn(An,r)){var o=An[r];if(void 0!==(o=o===Nn?Pn(r):o)||t)return{alias:n,name:r,value:o};throw new gn("intrinsic "+e+" exists, but is not available. Please file an issue!")}throw new hn("intrinsic "+e+" does not exist!")}("%"+r+"%",t),i=(o.name,o.value),a=!1;(o=o.alias)&&(r=o[0],Fn(n,Ln([0,1],o)));for(var s=1,c=!0;s<n.length;s+=1){var u=n[s],l=zn(u,0,1),f=zn(u,-1);if(('"'===l||"'"===l||"`"===l||'"'===f||"'"===f||"`"===f)&&l!==f)throw new hn("property names with quotes must have matching quotes");if("constructor"!==u&&c||(a=!0),dn(An,l="%"+(r+="."+u)+"%"))i=An[l];else if(null!=i){if(!(u in i)){if(t)return;throw new gn("base intrinsic for "+e+" exists, but the property is not available.")}i=mn&&s+1>=n.length?(c=!!(f=mn(i,u)))&&"get"in f&&!("originalValue"in f.get)?f.get:i[u]:(c=dn(i,u),i[u]),c&&!a&&(An[l]=i)}}return i}function _n(e,t){return"function"==typeof(t=bn(e,!!t))&&-1<qn(e,".prototype.")?Un(t):t}function wn(e){return!(Wn&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===Vn(e)}function Sn(e){return!!wn(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Array]"!==Vn(e)&&"[object Function]"===Vn(e.callee)}function En(e,t){var n=2<arguments.length?arguments[2]:{},r=un(t);Yn&&(r=Zn.call(r,Object.getOwnPropertySymbols(t)));for(var o,i,a,s,c=0;c<r.length;c+=1)o=e,i=r[c],a=t[r[c]],s=n[r[c]],i in o&&(!Xn(s)||!s())||(Qn?Jn(o,i,{configurable:!0,enumerable:!1,value:a,writable:!0}):o[i]=a)}function Cn(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!tr(e)||!tr(t))}function On(){return"function"==typeof Object.is?Object.is:Cn}function xn(){if(null!=this&&this!==ar(this))throw new sr("RegExp.prototype.flags getter called on non-object");var e="";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e}function kn(){if(!cr)throw new lr("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=ur(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return xn}var Dn,Tn,jn,In,r=mn?function(){try{return vn}catch(e){try{return mn(arguments,"callee").get}catch(e){return vn}}}():vn,c="function"==typeof o&&("function"==typeof Symbol&&("symbol"==typeof o("foo")&&("symbol"==typeof Symbol("bar")&&Kt()))),Mn=Object.getPrototypeOf||function(e){return e.__proto__},Nn={},n="undefined"==typeof Uint8Array?u:Mn(Uint8Array),An={"%AggregateError%":"undefined"==typeof AggregateError?u:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?u:ArrayBuffer,"%ArrayIteratorPrototype%":c?Mn([][Symbol.iterator]()):u,"%AsyncFromSyncIteratorPrototype%":u,"%AsyncFunction%":Nn,"%AsyncGenerator%":Nn,"%AsyncGeneratorFunction%":Nn,"%AsyncIteratorPrototype%":Nn,"%Atomics%":"undefined"==typeof Atomics?u:Atomics,"%BigInt%":"undefined"==typeof BigInt?u:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?u:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?u:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?u:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?u:FinalizationRegistry,"%Function%":yn,"%GeneratorFunction%":Nn,"%Int8Array%":"undefined"==typeof Int8Array?u:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?u:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?u:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c?Mn(Mn([][Symbol.iterator]())):u,"%JSON%":"object"==typeof JSON?JSON:u,"%Map%":"undefined"==typeof Map?u:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c?Mn((new Map)[Symbol.iterator]()):u,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?u:Promise,"%Proxy%":"undefined"==typeof Proxy?u:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?u:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?u:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&c?Mn((new Set)[Symbol.iterator]()):u,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?u:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c?Mn(""[Symbol.iterator]()):u,"%Symbol%":c?Symbol:u,"%SyntaxError%":hn,"%ThrowTypeError%":r,"%TypedArray%":n,"%TypeError%":gn,"%Uint8Array%":"undefined"==typeof Uint8Array?u:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?u:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?u:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?u:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?u:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?u:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?u:WeakSet},Pn=function e(t){var n,r;return"%AsyncFunction%"===t?n=Ut("async function () {}"):"%GeneratorFunction%"===t?n=Ut("function* () {}"):"%AsyncGeneratorFunction%"===t?n=Ut("async function* () {}"):"%AsyncGenerator%"===t?(r=e("%AsyncGeneratorFunction%"))&&(n=r.prototype):"%AsyncIteratorPrototype%"===t&&(r=e("%AsyncGenerator%"))&&(n=Mn(r.prototype)),An[t]=n},Rn={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Ln=pn.call(Function.call,Array.prototype.concat),Fn=pn.call(Function.apply,Array.prototype.splice),Bn=pn.call(Function.call,String.prototype.replace),zn=pn.call(Function.call,String.prototype.slice),Kn=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Hn=/\\(\\)?/g,Un=t(function(e){var t=bn("%Function.prototype.apply%"),n=bn("%Function.prototype.call%"),r=bn("%Reflect.apply%",!0)||pn.call(n,t),o=bn("%Object.getOwnPropertyDescriptor%",!0),i=bn("%Object.defineProperty%",!0),a=bn("%Math.max%");if(i)try{i({},"a",{value:1})}catch(e){i=null}e.exports=function(e){var t=r(pn,n,arguments);return o&&i&&o(t,"length").configurable&&i(t,"length",{value:1+a(0,e.length-(arguments.length-1))}),t};function s(){return r(pn,t,arguments)}i?i(e.exports,"apply",{value:s}):e.exports.apply=s}),qn=(Un.apply,Un(bn("String.prototype.indexOf"))),Wn=Ht(),Vn=_n("Object.prototype.toString"),o=function(){return wn(arguments)}(),Gn=(wn.isLegacyArguments=Sn,o?wn:Sn),Yn="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),$n=Object.prototype.toString,Zn=Array.prototype.concat,Jn=Object.defineProperty,Xn=function(e){return"function"==typeof e&&"[object Function]"===$n.call(e)},Qn=Jn&&function(){var e={};try{for(var t in Jn(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),er=(En.supportsDescriptors=!!Qn,En),tr=function(e){return e!=e},c=Un(On(),Object),nr=(er(c,{getPolyfill:On,implementation:Cn,shim:function(){var e=On();return er(Object,{is:e},{is:function(){return Object.is!==e}}),e}}),c),r=Ht(),rr=(r&&(Dn=_n("Object.prototype.hasOwnProperty"),Tn=_n("RegExp.prototype.exec"),jn={},In={toString:n=function(){throw jn},valueOf:n},"symbol"==typeof Symbol.toPrimitive&&(In[Symbol.toPrimitive]=n)),_n("Object.prototype.toString")),or=Object.getOwnPropertyDescriptor,ir=r?function(e){if(!e||"object"!=typeof e)return!1;var t=or(e,"lastIndex");if(!(t&&Dn(t,"value")))return!1;try{Tn(e,In)}catch(e){return e===jn}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===rr(e)},ar=Object,sr=TypeError,cr=er.supportsDescriptors,ur=Object.getOwnPropertyDescriptor,lr=TypeError,fr=er.supportsDescriptors,pr=Object.getOwnPropertyDescriptor,dr=Object.defineProperty,hr=TypeError,yr=Object.getPrototypeOf,gr=/a/,u=Un(xn),mr=(er(u,{getPolyfill:kn,implementation:xn,shim:function(){if(!fr||!yr)throw new hr("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=kn(),t=yr(gr),n=pr(t,"flags");return n&&n.get===e||dr(t,"flags",{configurable:!0,enumerable:!1,get:e}),e}}),u),vr=Date.prototype.getDay,br=Object.prototype.toString,_r=Ht(),wr=function(e){{if("object"!=typeof e||null===e)return!1;if(!_r)return"[object Date]"===br.call(e);var t=e;try{return vr.call(t),!0}catch(e){return!1}}},Sr=Date.prototype.getTime;function Er(e,t,n){var r,o,n=n||{};{if(n.strict?nr(e,t):e===t)return!0;if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return n.strict?nr(e,t):e==t;var i=e,a=t,s=n;if(typeof i!=typeof a)return!1;if(Cr(i)||Cr(a))return!1;if(i.prototype!==a.prototype)return!1;if(Gn(i)!==Gn(a))return!1;if(e=ir(i),t=ir(a),e!==t)return!1;if(e||t)return i.source===a.source&&mr(i)===mr(a);if(wr(i)&&wr(a))return Sr.call(i)===Sr.call(a);if(e=Or(i),t=Or(a),e!==t)return!1;if(e||t){if(i.length!==a.length)return!1;for(r=0;r<i.length;r++)if(i[r]!==a[r])return!1;return!0}if(typeof i!=typeof a)return!1;try{var c=un(i),u=un(a)}catch(e){return!1}if(c.length!==u.length)return!1;for(c.sort(),u.sort(),r=c.length-1;0<=r;r--)if(c[r]!=u[r])return!1;for(r=c.length-1;0<=r;r--)if(o=c[r],!Er(i[o],a[o],s))return!1;return!0}}function Cr(e){return null==e}function Or(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(0<e.length&&"number"!=typeof e[0]))}var xr=Er,kr="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,Dr=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(kr&&0<=navigator.userAgent.indexOf(e[t]))return 1;return 0}();
|
|
7
7
|
/**!
|
|
8
8
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
9
9
|
* @version 1.16.1
|
|
@@ -27,7 +27,7 @@ module.exports=function(n){var r={};function o(e){if(r[e])return r[e].exports;va
|
|
|
27
27
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
28
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
29
|
* SOFTWARE.
|
|
30
|
-
*/var xr=Cr&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},Or))}};function kr(e){return e&&"[object Function]"==={}.toString.call(e)}function Dr(e,t){if(1!==e.nodeType)return[];e=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?e[t]:e}function Tr(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function jr(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=Dr(e),n=t.overflow,r=t.overflowX,t=t.overflowY;return/(auto|scroll|overlay)/.test(n+t+r)?e:jr(Tr(e))}function Ir(e){return e&&e.referenceNode?e.referenceNode:e}var Mr=Cr&&!(!window.MSInputMethodContext||!document.documentMode),Nr=Cr&&/MSIE 10/.test(navigator.userAgent);function Ar(e){return 11===e?Mr:10!==e&&Mr||Nr}function Pr(e){if(!e)return document.documentElement;for(var t=Ar(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===Dr(n,"position")?Pr(n):n:(e?e.ownerDocument:document).documentElement}function Rr(e){return null!==e.parentNode?Rr(e.parentNode):e}function Lr(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,n=n?t:e,o=document.createRange(),o=(o.setStart(r,0),o.setEnd(n,0),o.commonAncestorContainer);if(e!==o&&t!==o||r.contains(n))return"BODY"===(n=(r=o).nodeName)||"HTML"!==n&&Pr(r.firstElementChild)!==r?Pr(o):o;n=Rr(e);return n.host?Lr(n.host,t):Lr(e,Rr(t).host)}function Fr(e,t){var t="top"===(1<arguments.length&&void 0!==t?t:"top")?"scrollTop":"scrollLeft",n=e.nodeName;return"BODY"===n||"HTML"===n?(n=e.ownerDocument.documentElement,(e.ownerDocument.scrollingElement||n)[t]):e[t]}function Br(e,t){var t="x"===t?"Left":"Top",n="Left"==t?"Right":"Bottom";return parseFloat(e["border"+t+"Width"])+parseFloat(e["border"+n+"Width"])}function zr(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],Ar(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function Kr(e){var t=e.body,e=e.documentElement,n=Ar(10)&&getComputedStyle(e);return{height:zr("Height",t,e,n),width:zr("Width",t,e,n)}}e=function(e,t,n){return t&&Hr(e.prototype,t),n&&Hr(e,n),e};function Hr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ur(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Wr(e){return qr({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Vr(e){var t={};try{Ar(10)?(t=e.getBoundingClientRect(),n=Fr(e,"top"),r=Fr(e,"left"),t.top+=n,t.left+=r,t.bottom+=n,t.right+=r):t=e.getBoundingClientRect()}catch(e){}var n={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},r="HTML"===e.nodeName?Kr(e.ownerDocument):{},t=r.width||e.clientWidth||n.width,r=r.height||e.clientHeight||n.height,t=e.offsetWidth-t,r=e.offsetHeight-r;return(t||r)&&(t-=Br(e=Dr(e),"x"),r-=Br(e,"y"),n.width-=t,n.height-=r),Wr(n)}function Gr(e,t,n){var n=2<arguments.length&&void 0!==n&&n,r=Ar(10),o="HTML"===t.nodeName,i=Vr(e),a=Vr(t),e=jr(e),s=Dr(t),c=parseFloat(s.borderTopWidth),u=parseFloat(s.borderLeftWidth),a=(n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0)),Wr({top:i.top-a.top-c,left:i.left-a.left-u,width:i.width,height:i.height}));return a.marginTop=0,a.marginLeft=0,!r&&o&&(i=parseFloat(s.marginTop),o=parseFloat(s.marginLeft),a.top-=c-i,a.bottom-=c-i,a.left-=u-o,a.right-=u-o,a.marginTop=i,a.marginLeft=o),a=(r&&!n?t.contains(e):t===e&&"BODY"!==e.nodeName)?function(e,t,n){var n=2<arguments.length&&void 0!==n&&n,r=Fr(t,"top"),t=Fr(t,"left"),n=n?-1:1;return e.top+=r*n,e.bottom+=r*n,e.left+=t*n,e.right+=t*n,e}(a,t):a}function Yr(e){if(!e||!e.parentElement||Ar())return document.documentElement;for(var t=e.parentElement;t&&"none"===Dr(t,"transform");)t=t.parentElement;return t||document.documentElement}function $r(e,t,n,r,o){var i,o=4<arguments.length&&void 0!==o&&o,a={top:0,left:0},s=o?Yr(e):Lr(e,Ir(t)),s=("viewport"===r?a=function(e,t){var t=1<arguments.length&&void 0!==t&&t,n=e.ownerDocument.documentElement,e=Gr(e,n),r=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),i=t?0:Fr(n),t=t?0:Fr(n,"left");return Wr({top:i-e.top+e.marginTop,left:t-e.left+e.marginLeft,width:r,height:o})}(s,o):(i=void 0,"scrollParent"===r?"BODY"===(i=jr(Tr(t))).nodeName&&(i=e.ownerDocument.documentElement):i="window"===r?e.ownerDocument.documentElement:r,t=Gr(i,s,o),"HTML"!==i.nodeName||function e(t){var n=t.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===Dr(t,"position"))return!0;n=Tr(t);return!!n&&e(n)}(s)?a=t:(o=(r=Kr(e.ownerDocument)).height,i=r.width,a.top+=t.top-t.marginTop,a.bottom=o+t.top,a.left+=t.left-t.marginLeft,a.right=i+t.left)),"number"==typeof(n=n||0));return a.left+=s?n:n.left||0,a.top+=s?n:n.top||0,a.right-=s?n:n.right||0,a.bottom-=s?n:n.bottom||0,a}function Zr(e,t,n,r,o,i){i=5<arguments.length&&void 0!==i?i:0;if(-1===e.indexOf("auto"))return e;var r=$r(n,r,i,o),a={top:{width:r.width,height:t.top-r.top},right:{width:r.right-t.right,height:r.height},bottom:{width:r.width,height:r.bottom-t.bottom},left:{width:t.left-r.left,height:r.height}},i=Object.keys(a).map(function(e){return qr({key:e},a[e],{area:(e=a[e]).width*e.height})}).sort(function(e,t){return t.area-e.area}),o=i.filter(function(e){var t=e.width,e=e.height;return t>=n.clientWidth&&e>=n.clientHeight}),t=(0<o.length?o:i)[0].key,r=e.split("-")[1];return t+(r?"-"+r:"")}function Jr(e,t,n,r){r=3<arguments.length&&void 0!==r?r:null;return Gr(n,r?Yr(t):Lr(t,Ir(n)),r)}function Xr(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),t=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+t,height:e.offsetHeight+n}}function Qr(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function eo(e,t,n){n=n.split("-")[0];var e=Xr(e),r={width:e.width,height:e.height},o=-1!==["right","left"].indexOf(n),i=o?"top":"left",a=o?"left":"top",s=o?"height":"width",o=o?"width":"height";return r[i]=t[i]+t[s]/2-e[s]/2,r[a]=n===a?t[a]-e[o]:t[Qr(a)],r}function to(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function no(e,n,t){return(void 0===t?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=to(e,function(e){return e[t]===n});return e.indexOf(r)}(e,"name",t))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var t=e.function||e.fn;e.enabled&&kr(t)&&(n.offsets.popper=Wr(n.offsets.popper),n.offsets.reference=Wr(n.offsets.reference),n=t(n,e))}),n}function ro(e,n){return e.some(function(e){var t=e.name;return e.enabled&&t===n})}function oo(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var o=t[r],o=o?""+o+n:e;if(void 0!==document.body.style[o])return o}return null}function io(e){e=e.ownerDocument;return e?e.defaultView:window}function ao(e,t,n,r){n.updateBound=r,io(e).addEventListener("resize",n.updateBound,{passive:!0});r=jr(e);return function e(t,n,r,o){var i="BODY"===t.nodeName,t=i?t.ownerDocument.defaultView:t;t.addEventListener(n,r,{passive:!0}),i||e(jr(t.parentNode),n,r,o),o.push(t)}(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function so(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,io(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function co(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function uo(n,r){Object.keys(r).forEach(function(e){var t="";-1!==["width","height","top","right","bottom","left"].indexOf(e)&&co(r[e])&&(t="px"),n.style[e]=r[e]+t})}function lo(e,t){function n(e){return e}var r=e.offsets,o=r.popper,r=r.reference,i=Math.round,a=Math.floor,r=i(r.width),s=i(o.width),c=-1!==["left","right"].indexOf(e.placement),e=-1!==e.placement.indexOf("-"),c=t?c||e||r%2==s%2?i:a:n,a=t?i:n;return{left:c(r%2==1&&s%2==1&&!e&&t?o.left-1:o.left),top:a(o.top),bottom:a(o.bottom),right:c(o.right)}}var fo=Cr&&/Firefox/i.test(navigator.userAgent);function po(e,t,n){var r,o=to(e,function(e){return e.name===t}),e=!!o&&e.some(function(e){return e.name===n&&e.enabled&&e.order<o.order});return e||(r="`"+t+"`",console.warn("`"+n+"`"+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")),e}var Dn=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],ho=Dn.slice(3);function yo(e,t){t=1<arguments.length&&void 0!==t&&t,e=ho.indexOf(e),e=ho.slice(e+1).concat(ho.slice(0,e));return t?e.reverse():e}var go="flip",mo="clockwise",vo="counterclockwise";function bo(e,s,c,t){var o=[0,0],r=-1!==["right","left"].indexOf(t),t=e.split(/(\+|\-)/).map(function(e){return e.trim()}),e=t.indexOf(to(t,function(e){return-1!==e.search(/,|\s/)})),n=(t[e]&&-1===t[e].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead."),/\s*,\s*|\s+/);return(-1!==e?[t.slice(0,e).concat([t[e].split(n)[0]]),[t[e].split(n)[1]].concat(t.slice(e+1))]:[t]).map(function(e,t){var a=(1===t?!r:r)?"height":"width",n=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,n=!0,e):n?(e[e.length-1]+=t,n=!1,e):e.concat(t)},[]).map(function(e){return t=a,n=s,r=c,o=+(i=(e=e).match(/((?:\-|\+)?\d*\.?\d*)(.*)/))[1],i=i[2],o?0===i.indexOf("%")?Wr("%p"===i?n:r)[t]/100*o:"vh"===i||"vw"===i?("vh"===i?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o:o:e;var t,n,r,o,i})}).forEach(function(n,r){n.forEach(function(e,t){co(e)&&(o[r]+=e*("-"===n[t-1]?-1:1))})}),o}Xe={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t,n,r,o=e.placement,i=o.split("-")[0];return(o=o.split("-")[1])&&(t=(n=e.offsets).reference,n=n.popper,r=(i=-1!==["bottom","top"].indexOf(i))?"width":"height",i={start:Ur({},i=i?"left":"top",t[i]),end:Ur({},i,t[i]+t[r]-n[r])},e.offsets.popper=qr({},n,i[o])),e}},offset:{order:200,enabled:!0,fn:function(e,t){var t=t.offset,n=e.placement,r=(o=e.offsets).popper,o=o.reference,n=n.split("-")[0],i=void 0,i=co(+t)?[+t,0]:bo(t,r,o,n);return"left"===n?(r.top+=i[0],r.left-=i[1]):"right"===n?(r.top+=i[0],r.left+=i[1]):"top"===n?(r.left+=i[0],r.top-=i[1]):"bottom"===n&&(r.left+=i[0],r.top+=i[1]),e.popper=r,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,r){var t=r.boundariesElement||Pr(e.instance.popper),n=(e.instance.reference===t&&(t=Pr(t)),oo("transform")),o=e.instance.popper.style,i=o.top,a=o.left,s=o[n],c=(o.top="",o.left="",o[n]="",$r(e.instance.popper,e.instance.reference,r.padding,t,e.positionFixed)),t=(o.top=i,o.left=a,o[n]=s,r.boundaries=c,r.priority),u=e.offsets.popper,l={primary:function(e){var t=u[e];return u[e]<c[e]&&!r.escapeWithReference&&(t=Math.max(u[e],c[e])),Ur({},e,t)},secondary:function(e){var t="right"===e?"left":"top",n=u[t];return u[e]>c[e]&&!r.escapeWithReference&&(n=Math.min(u[t],c[e]-("right"===e?u.width:u.height))),Ur({},t,n)}};return t.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=qr({},u,l[t](e))}),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=(n=e.offsets).popper,n=n.reference,r=e.placement.split("-")[0],o=Math.floor,i=(r=-1!==["top","bottom"].indexOf(r))?"right":"bottom",a=r?"left":"top",r=r?"width":"height";return t[i]<o(n[a])&&(e.offsets.popper[a]=o(n[a])-t[r]),t[a]>o(n[i])&&(e.offsets.popper[a]=o(n[i])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){if(!po(e.instance.modifiers,"arrow","keepTogether"))return e;if("string"==typeof(t=t.element)){if(!(t=e.instance.popper.querySelector(t)))return e}else if(!e.instance.popper.contains(t))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var n=e.placement.split("-")[0],r=(o=e.offsets).popper,o=o.reference,i=(n=-1!==["left","right"].indexOf(n))?"height":"width",a=(u=n?"Top":"Left").toLowerCase(),s=n?"left":"top",n=n?"bottom":"right",c=Xr(t)[i],n=(o[n]-c<r[a]&&(e.offsets.popper[a]-=r[a]-(o[n]-c)),o[a]+c>r[n]&&(e.offsets.popper[a]+=o[a]+c-r[n]),e.offsets.popper=Wr(e.offsets.popper),o[a]+o[i]/2-c/2),o=Dr(e.instance.popper),l=parseFloat(o["margin"+u]),o=parseFloat(o["border"+u+"Width"]),u=n-e.offsets.popper[a]-l-o,u=Math.max(Math.min(r[i]-c,u),0);return e.arrowElement=t,e.offsets.arrow=(Ur(n={},a,Math.round(u)),Ur(n,s,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(u,l){if(ro(u.instance.modifiers,"inner"))return u;if(u.flipped&&u.placement===u.originalPlacement)return u;var f=$r(u.instance.popper,u.instance.reference,l.padding,l.boundariesElement,u.positionFixed),p=u.placement.split("-")[0],d=Qr(p),h=u.placement.split("-")[1]||"",y=[];switch(l.behavior){case go:y=[p,d];break;case mo:y=yo(p);break;case vo:y=yo(p,!0);break;default:y=l.behavior}return y.forEach(function(e,t){if(p!==e||y.length===t+1)return u;p=u.placement.split("-")[0],d=Qr(p);var e=u.offsets.popper,n=u.offsets.reference,r=Math.floor,n="left"===p&&r(e.right)>r(n.left)||"right"===p&&r(e.left)<r(n.right)||"top"===p&&r(e.bottom)>r(n.top)||"bottom"===p&&r(e.top)<r(n.bottom),o=r(e.left)<r(f.left),i=r(e.right)>r(f.right),a=r(e.top)<r(f.top),e=r(e.bottom)>r(f.bottom),r="left"===p&&o||"right"===p&&i||"top"===p&&a||"bottom"===p&&e,s=-1!==["top","bottom"].indexOf(p),c=!!l.flipVariations&&(s&&"start"===h&&o||s&&"end"===h&&i||!s&&"start"===h&&a||!s&&"end"===h&&e),i=!!l.flipVariationsByContent&&(s&&"start"===h&&i||s&&"end"===h&&o||!s&&"start"===h&&e||!s&&"end"===h&&a),o=c||i;(n||r||o)&&(u.flipped=!0,(n||r)&&(p=y[t+1]),o&&(h="end"===(e=h)?"start":"start"===e?"end":e),u.placement=p+(h?"-"+h:""),u.offsets.popper=qr({},u.offsets.popper,eo(u.instance.popper,u.offsets.reference,u.placement)),u=no(u.instance.modifiers,u,"flip"))}),u},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=(o=e.offsets).popper,o=o.reference,i=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return r[i?"left":"top"]=o[n]-(a?r[i?"width":"height"]:0),e.placement=Qr(t),e.offsets.popper=Wr(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!po(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=to(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,o=e.offsets.popper,i=(void 0!==(i=to(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration)&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!"),void 0!==i?i:t.gpuAcceleration),a=Vr(t=Pr(e.instance.popper)),o={position:o.position},s=lo(e,window.devicePixelRatio<2||!fo),n="bottom"===n?"top":"bottom",r="right"===r?"left":"right",c=oo("transform"),u=void 0,l=void 0,l="bottom"==n?"HTML"===t.nodeName?-t.clientHeight+s.bottom:-a.height+s.bottom:s.top,u="right"==r?"HTML"===t.nodeName?-t.clientWidth+s.right:-a.width+s.right:s.left,a=(i&&c?(o[c]="translate3d("+u+"px, "+l+"px, 0)",o[n]=0,o[r]=0,o.willChange="transform"):(t="right"==r?-1:1,o[n]=l*("bottom"==n?-1:1),o[r]=u*t,o.willChange=n+", "+r),{"x-placement":e.placement});return e.attributes=qr({},a,e.attributes),e.styles=qr({},o,e.styles),e.arrowStyles=qr({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return uo(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach(function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)}),e.arrowElement&&Object.keys(e.arrowStyles).length&&uo(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){return o=Jr(o,t,e,n.positionFixed),o=Zr(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding),t.setAttribute("x-placement",o),uo(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},e(_o,[{key:"update",value:function(){return function(){var e;this.state.isDestroyed||((e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}}).offsets.reference=Jr(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=Zr(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=eo(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=no(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e)))}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,ro(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[oo("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=ao(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return so.call(this)}}]),kt=_o;function _o(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=this,i=_o;if(!(o instanceof i))throw new TypeError("Cannot call a class as a function");this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=xr(this.update.bind(this)),this.options=qr({},_o.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=t&&t.jquery?t[0]:t,this.options.modifiers={},Object.keys(qr({},_o.Defaults.modifiers,r.modifiers)).forEach(function(e){n.options.modifiers[e]=qr({},_o.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return qr({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&kr(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)}),this.update();o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}kt.Utils=("undefined"!=typeof window?window:n).PopperUtils,kt.placements=Dn,kt.Defaults=Xe;var wo=kt,t="function"==typeof Symbol&&Symbol.for,So=t?Symbol.for("react.element"):60103,Eo=t?Symbol.for("react.portal"):60106,Co=t?Symbol.for("react.fragment"):60107,Oo=t?Symbol.for("react.strict_mode"):60108,xo=t?Symbol.for("react.profiler"):60114,ko=t?Symbol.for("react.provider"):60109,Do=t?Symbol.for("react.context"):60110,To=t?Symbol.for("react.async_mode"):60111,jo=t?Symbol.for("react.concurrent_mode"):60111,Io=t?Symbol.for("react.forward_ref"):60112,Mo=t?Symbol.for("react.suspense"):60113,No=t?Symbol.for("react.suspense_list"):60120,Ao=t?Symbol.for("react.memo"):60115,Po=t?Symbol.for("react.lazy"):60116,Ro=t?Symbol.for("react.block"):60121,Lo=t?Symbol.for("react.fundamental"):60117,Fo=t?Symbol.for("react.responder"):60118,Bo=t?Symbol.for("react.scope"):60119;
|
|
30
|
+
*/var Tr=kr&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},Dr))}};function jr(e){return e&&"[object Function]"==={}.toString.call(e)}function Ir(e,t){if(1!==e.nodeType)return[];e=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?e[t]:e}function Mr(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function Nr(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=Ir(e),n=t.overflow,r=t.overflowX,t=t.overflowY;return/(auto|scroll|overlay)/.test(n+t+r)?e:Nr(Mr(e))}function Ar(e){return e&&e.referenceNode?e.referenceNode:e}var Pr=kr&&!(!window.MSInputMethodContext||!document.documentMode),Rr=kr&&/MSIE 10/.test(navigator.userAgent);function Lr(e){return 11===e?Pr:10!==e&&Pr||Rr}function Fr(e){if(!e)return document.documentElement;for(var t=Lr(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===Ir(n,"position")?Fr(n):n:(e?e.ownerDocument:document).documentElement}function Br(e){return null!==e.parentNode?Br(e.parentNode):e}function zr(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,n=n?t:e,o=document.createRange(),o=(o.setStart(r,0),o.setEnd(n,0),o.commonAncestorContainer);if(e!==o&&t!==o||r.contains(n))return"BODY"===(n=(r=o).nodeName)||"HTML"!==n&&Fr(r.firstElementChild)!==r?Fr(o):o;n=Br(e);return n.host?zr(n.host,t):zr(e,Br(t).host)}function Kr(e,t){var t="top"===(1<arguments.length&&void 0!==t?t:"top")?"scrollTop":"scrollLeft",n=e.nodeName;return"BODY"===n||"HTML"===n?(n=e.ownerDocument.documentElement,(e.ownerDocument.scrollingElement||n)[t]):e[t]}function Hr(e,t){var t="x"===t?"Left":"Top",n="Left"==t?"Right":"Bottom";return parseFloat(e["border"+t+"Width"])+parseFloat(e["border"+n+"Width"])}function Ur(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],Lr(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function qr(e){var t=e.body,e=e.documentElement,n=Lr(10)&&getComputedStyle(e);return{height:Ur("Height",t,e,n),width:Ur("Width",t,e,n)}}o=function(e,t,n){return t&&Wr(e.prototype,t),n&&Wr(e,n),e};function Wr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Gr(e){return m({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Yr(e){var t={};try{Lr(10)?(t=e.getBoundingClientRect(),n=Kr(e,"top"),r=Kr(e,"left"),t.top+=n,t.left+=r,t.bottom+=n,t.right+=r):t=e.getBoundingClientRect()}catch(e){}var n={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},r="HTML"===e.nodeName?qr(e.ownerDocument):{},t=r.width||e.clientWidth||n.width,r=r.height||e.clientHeight||n.height,t=e.offsetWidth-t,r=e.offsetHeight-r;return(t||r)&&(t-=Hr(e=Ir(e),"x"),r-=Hr(e,"y"),n.width-=t,n.height-=r),Gr(n)}function $r(e,t,n){var n=2<arguments.length&&void 0!==n&&n,r=Lr(10),o="HTML"===t.nodeName,i=Yr(e),a=Yr(t),e=Nr(e),s=Ir(t),c=parseFloat(s.borderTopWidth),u=parseFloat(s.borderLeftWidth),a=(n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0)),Gr({top:i.top-a.top-c,left:i.left-a.left-u,width:i.width,height:i.height}));return a.marginTop=0,a.marginLeft=0,!r&&o&&(i=parseFloat(s.marginTop),o=parseFloat(s.marginLeft),a.top-=c-i,a.bottom-=c-i,a.left-=u-o,a.right-=u-o,a.marginTop=i,a.marginLeft=o),a=(r&&!n?t.contains(e):t===e&&"BODY"!==e.nodeName)?function(e,t,n){var n=2<arguments.length&&void 0!==n&&n,r=Kr(t,"top"),t=Kr(t,"left"),n=n?-1:1;return e.top+=r*n,e.bottom+=r*n,e.left+=t*n,e.right+=t*n,e}(a,t):a}function Zr(e){if(!e||!e.parentElement||Lr())return document.documentElement;for(var t=e.parentElement;t&&"none"===Ir(t,"transform");)t=t.parentElement;return t||document.documentElement}function Jr(e,t,n,r,o){var i,o=4<arguments.length&&void 0!==o&&o,a={top:0,left:0},s=o?Zr(e):zr(e,Ar(t)),s=("viewport"===r?a=function(e,t){var t=1<arguments.length&&void 0!==t&&t,n=e.ownerDocument.documentElement,e=$r(e,n),r=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),i=t?0:Kr(n),t=t?0:Kr(n,"left");return Gr({top:i-e.top+e.marginTop,left:t-e.left+e.marginLeft,width:r,height:o})}(s,o):(i=void 0,"scrollParent"===r?"BODY"===(i=Nr(Mr(t))).nodeName&&(i=e.ownerDocument.documentElement):i="window"===r?e.ownerDocument.documentElement:r,t=$r(i,s,o),"HTML"!==i.nodeName||function e(t){var n=t.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===Ir(t,"position"))return!0;n=Mr(t);return!!n&&e(n)}(s)?a=t:(o=(r=qr(e.ownerDocument)).height,i=r.width,a.top+=t.top-t.marginTop,a.bottom=o+t.top,a.left+=t.left-t.marginLeft,a.right=i+t.left)),"number"==typeof(n=n||0));return a.left+=s?n:n.left||0,a.top+=s?n:n.top||0,a.right-=s?n:n.right||0,a.bottom-=s?n:n.bottom||0,a}function Xr(e,t,n,r,o,i){i=5<arguments.length&&void 0!==i?i:0;if(-1===e.indexOf("auto"))return e;var r=Jr(n,r,i,o),a={top:{width:r.width,height:t.top-r.top},right:{width:r.right-t.right,height:r.height},bottom:{width:r.width,height:r.bottom-t.bottom},left:{width:t.left-r.left,height:r.height}},i=Object.keys(a).map(function(e){return m({key:e},a[e],{area:(e=a[e]).width*e.height})}).sort(function(e,t){return t.area-e.area}),o=i.filter(function(e){var t=e.width,e=e.height;return t>=n.clientWidth&&e>=n.clientHeight}),t=(0<o.length?o:i)[0].key,r=e.split("-")[1];return t+(r?"-"+r:"")}function Qr(e,t,n,r){r=3<arguments.length&&void 0!==r?r:null;return $r(n,r?Zr(t):zr(t,Ar(n)),r)}function eo(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),t=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+t,height:e.offsetHeight+n}}function to(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function no(e,t,n){n=n.split("-")[0];var e=eo(e),r={width:e.width,height:e.height},o=-1!==["right","left"].indexOf(n),i=o?"top":"left",a=o?"left":"top",s=o?"height":"width",o=o?"width":"height";return r[i]=t[i]+t[s]/2-e[s]/2,r[a]=n===a?t[a]-e[o]:t[to(a)],r}function ro(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function oo(e,n,t){return(void 0===t?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=ro(e,function(e){return e[t]===n});return e.indexOf(r)}(e,"name",t))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var t=e.function||e.fn;e.enabled&&jr(t)&&(n.offsets.popper=Gr(n.offsets.popper),n.offsets.reference=Gr(n.offsets.reference),n=t(n,e))}),n}function io(e,n){return e.some(function(e){var t=e.name;return e.enabled&&t===n})}function ao(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var o=t[r],o=o?""+o+n:e;if(void 0!==document.body.style[o])return o}return null}function so(e){e=e.ownerDocument;return e?e.defaultView:window}function co(e,t,n,r){n.updateBound=r,so(e).addEventListener("resize",n.updateBound,{passive:!0});r=Nr(e);return function e(t,n,r,o){var i="BODY"===t.nodeName,t=i?t.ownerDocument.defaultView:t;t.addEventListener(n,r,{passive:!0}),i||e(Nr(t.parentNode),n,r,o),o.push(t)}(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function uo(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,so(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function lo(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function fo(n,r){Object.keys(r).forEach(function(e){var t="";-1!==["width","height","top","right","bottom","left"].indexOf(e)&&lo(r[e])&&(t="px"),n.style[e]=r[e]+t})}function po(e,t){function n(e){return e}var r=e.offsets,o=r.popper,r=r.reference,i=Math.round,a=Math.floor,r=i(r.width),s=i(o.width),c=-1!==["left","right"].indexOf(e.placement),e=-1!==e.placement.indexOf("-"),c=t?c||e||r%2==s%2?i:a:n,a=t?i:n;return{left:c(r%2==1&&s%2==1&&!e&&t?o.left-1:o.left),top:a(o.top),bottom:a(o.bottom),right:c(o.right)}}var ho=kr&&/Firefox/i.test(navigator.userAgent);function yo(e,t,n){var r,o=ro(e,function(e){return e.name===t}),e=!!o&&e.some(function(e){return e.name===n&&e.enabled&&e.order<o.order});return e||(r="`"+t+"`",console.warn("`"+n+"`"+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")),e}var c=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],go=c.slice(3);function mo(e,t){t=1<arguments.length&&void 0!==t&&t,e=go.indexOf(e),e=go.slice(e+1).concat(go.slice(0,e));return t?e.reverse():e}var vo="flip",bo="clockwise",_o="counterclockwise";function wo(e,s,c,t){var o=[0,0],r=-1!==["right","left"].indexOf(t),t=e.split(/(\+|\-)/).map(function(e){return e.trim()}),e=t.indexOf(ro(t,function(e){return-1!==e.search(/,|\s/)})),n=(t[e]&&-1===t[e].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead."),/\s*,\s*|\s+/);return(-1!==e?[t.slice(0,e).concat([t[e].split(n)[0]]),[t[e].split(n)[1]].concat(t.slice(e+1))]:[t]).map(function(e,t){var a=(1===t?!r:r)?"height":"width",n=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,n=!0,e):n?(e[e.length-1]+=t,n=!1,e):e.concat(t)},[]).map(function(e){return t=a,n=s,r=c,o=+(i=(e=e).match(/((?:\-|\+)?\d*\.?\d*)(.*)/))[1],i=i[2],o?0===i.indexOf("%")?Gr("%p"===i?n:r)[t]/100*o:"vh"===i||"vw"===i?("vh"===i?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o:o:e;var t,n,r,o,i})}).forEach(function(n,r){n.forEach(function(e,t){lo(e)&&(o[r]+=e*("-"===n[t-1]?-1:1))})}),o}n={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t,n,r,o=e.placement,i=o.split("-")[0];return(o=o.split("-")[1])&&(t=(n=e.offsets).reference,n=n.popper,r=(i=-1!==["bottom","top"].indexOf(i))?"width":"height",i={start:Vr({},i=i?"left":"top",t[i]),end:Vr({},i,t[i]+t[r]-n[r])},e.offsets.popper=m({},n,i[o])),e}},offset:{order:200,enabled:!0,fn:function(e,t){var t=t.offset,n=e.placement,r=(o=e.offsets).popper,o=o.reference,n=n.split("-")[0],i=void 0,i=lo(+t)?[+t,0]:wo(t,r,o,n);return"left"===n?(r.top+=i[0],r.left-=i[1]):"right"===n?(r.top+=i[0],r.left+=i[1]):"top"===n?(r.left+=i[0],r.top-=i[1]):"bottom"===n&&(r.left+=i[0],r.top+=i[1]),e.popper=r,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,r){var t=r.boundariesElement||Fr(e.instance.popper),n=(e.instance.reference===t&&(t=Fr(t)),ao("transform")),o=e.instance.popper.style,i=o.top,a=o.left,s=o[n],c=(o.top="",o.left="",o[n]="",Jr(e.instance.popper,e.instance.reference,r.padding,t,e.positionFixed)),t=(o.top=i,o.left=a,o[n]=s,r.boundaries=c,r.priority),u=e.offsets.popper,l={primary:function(e){var t=u[e];return u[e]<c[e]&&!r.escapeWithReference&&(t=Math.max(u[e],c[e])),Vr({},e,t)},secondary:function(e){var t="right"===e?"left":"top",n=u[t];return u[e]>c[e]&&!r.escapeWithReference&&(n=Math.min(u[t],c[e]-("right"===e?u.width:u.height))),Vr({},t,n)}};return t.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=m({},u,l[t](e))}),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=(n=e.offsets).popper,n=n.reference,r=e.placement.split("-")[0],o=Math.floor,i=(r=-1!==["top","bottom"].indexOf(r))?"right":"bottom",a=r?"left":"top",r=r?"width":"height";return t[i]<o(n[a])&&(e.offsets.popper[a]=o(n[a])-t[r]),t[a]>o(n[i])&&(e.offsets.popper[a]=o(n[i])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){if(!yo(e.instance.modifiers,"arrow","keepTogether"))return e;if("string"==typeof(t=t.element)){if(!(t=e.instance.popper.querySelector(t)))return e}else if(!e.instance.popper.contains(t))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var n=e.placement.split("-")[0],r=(o=e.offsets).popper,o=o.reference,i=(n=-1!==["left","right"].indexOf(n))?"height":"width",a=(l=n?"Top":"Left").toLowerCase(),s=n?"left":"top",n=n?"bottom":"right",c=eo(t)[i],n=(o[n]-c<r[a]&&(e.offsets.popper[a]-=r[a]-(o[n]-c)),o[a]+c>r[n]&&(e.offsets.popper[a]+=o[a]+c-r[n]),e.offsets.popper=Gr(e.offsets.popper),o[a]+o[i]/2-c/2),o=Ir(e.instance.popper),u=parseFloat(o["margin"+l]),o=parseFloat(o["border"+l+"Width"]),l=n-e.offsets.popper[a]-u-o,l=Math.max(Math.min(r[i]-c,l),0);return e.arrowElement=t,e.offsets.arrow=(Vr(n={},a,Math.round(l)),Vr(n,s,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(u,l){if(io(u.instance.modifiers,"inner"))return u;if(u.flipped&&u.placement===u.originalPlacement)return u;var f=Jr(u.instance.popper,u.instance.reference,l.padding,l.boundariesElement,u.positionFixed),p=u.placement.split("-")[0],d=to(p),h=u.placement.split("-")[1]||"",y=[];switch(l.behavior){case vo:y=[p,d];break;case bo:y=mo(p);break;case _o:y=mo(p,!0);break;default:y=l.behavior}return y.forEach(function(e,t){if(p!==e||y.length===t+1)return u;p=u.placement.split("-")[0],d=to(p);var e=u.offsets.popper,n=u.offsets.reference,r=Math.floor,n="left"===p&&r(e.right)>r(n.left)||"right"===p&&r(e.left)<r(n.right)||"top"===p&&r(e.bottom)>r(n.top)||"bottom"===p&&r(e.top)<r(n.bottom),o=r(e.left)<r(f.left),i=r(e.right)>r(f.right),a=r(e.top)<r(f.top),e=r(e.bottom)>r(f.bottom),r="left"===p&&o||"right"===p&&i||"top"===p&&a||"bottom"===p&&e,s=-1!==["top","bottom"].indexOf(p),c=!!l.flipVariations&&(s&&"start"===h&&o||s&&"end"===h&&i||!s&&"start"===h&&a||!s&&"end"===h&&e),i=!!l.flipVariationsByContent&&(s&&"start"===h&&i||s&&"end"===h&&o||!s&&"start"===h&&e||!s&&"end"===h&&a),o=c||i;(n||r||o)&&(u.flipped=!0,(n||r)&&(p=y[t+1]),o&&(h="end"===(e=h)?"start":"start"===e?"end":e),u.placement=p+(h?"-"+h:""),u.offsets.popper=m({},u.offsets.popper,no(u.instance.popper,u.offsets.reference,u.placement)),u=oo(u.instance.modifiers,u,"flip"))}),u},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=(o=e.offsets).popper,o=o.reference,i=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return r[i?"left":"top"]=o[n]-(a?r[i?"width":"height"]:0),e.placement=to(t),e.offsets.popper=Gr(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!yo(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=ro(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,o=e.offsets.popper,i=(void 0!==(i=ro(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration)&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!"),void 0!==i?i:t.gpuAcceleration),a=Yr(t=Fr(e.instance.popper)),o={position:o.position},s=po(e,window.devicePixelRatio<2||!ho),n="bottom"===n?"top":"bottom",r="right"===r?"left":"right",c=ao("transform"),u=void 0,l=void 0,l="bottom"==n?"HTML"===t.nodeName?-t.clientHeight+s.bottom:-a.height+s.bottom:s.top,u="right"==r?"HTML"===t.nodeName?-t.clientWidth+s.right:-a.width+s.right:s.left,a=(i&&c?(o[c]="translate3d("+u+"px, "+l+"px, 0)",o[n]=0,o[r]=0,o.willChange="transform"):(t="right"==r?-1:1,o[n]=l*("bottom"==n?-1:1),o[r]=u*t,o.willChange=n+", "+r),{"x-placement":e.placement});return e.attributes=m({},a,e.attributes),e.styles=m({},o,e.styles),e.arrowStyles=m({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return fo(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach(function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)}),e.arrowElement&&Object.keys(e.arrowStyles).length&&fo(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){return o=Qr(o,t,e,n.positionFixed),o=Xr(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding),t.setAttribute("x-placement",o),fo(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},o(So,[{key:"update",value:function(){return function(){var e;this.state.isDestroyed||((e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}}).offsets.reference=Qr(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=Xr(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=no(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=oo(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e)))}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,io(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[ao("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=co(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return uo.call(this)}}]),r=So;function So(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=this,i=So;if(!(o instanceof i))throw new TypeError("Cannot call a class as a function");this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=Tr(this.update.bind(this)),this.options=m({},So.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=t&&t.jquery?t[0]:t,this.options.modifiers={},Object.keys(m({},So.Defaults.modifiers,r.modifiers)).forEach(function(e){n.options.modifiers[e]=m({},So.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return m({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&jr(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)}),this.update();o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}r.Utils=("undefined"!=typeof window?window:p).PopperUtils,r.placements=c,r.Defaults=n;var Eo=r,u="function"==typeof Symbol&&Symbol.for,Co=u?Symbol.for("react.element"):60103,Oo=u?Symbol.for("react.portal"):60106,xo=u?Symbol.for("react.fragment"):60107,ko=u?Symbol.for("react.strict_mode"):60108,Do=u?Symbol.for("react.profiler"):60114,To=u?Symbol.for("react.provider"):60109,jo=u?Symbol.for("react.context"):60110,Io=u?Symbol.for("react.async_mode"):60111,Mo=u?Symbol.for("react.concurrent_mode"):60111,No=u?Symbol.for("react.forward_ref"):60112,Ao=u?Symbol.for("react.suspense"):60113,Po=u?Symbol.for("react.suspense_list"):60120,Ro=u?Symbol.for("react.memo"):60115,Lo=u?Symbol.for("react.lazy"):60116,Fo=u?Symbol.for("react.block"):60121,Bo=u?Symbol.for("react.fundamental"):60117,zo=u?Symbol.for("react.responder"):60118,Ko=u?Symbol.for("react.scope"):60119;
|
|
31
31
|
/** @license React v16.13.1
|
|
32
32
|
* react-is.production.min.js
|
|
33
33
|
*
|
|
@@ -35,18 +35,18 @@ module.exports=function(n){var r={};function o(e){if(r[e])return r[e].exports;va
|
|
|
35
35
|
*
|
|
36
36
|
* This source code is licensed under the MIT license found in the
|
|
37
37
|
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/function zo(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case So:switch(e=e.type){case To:case jo:case Co:case xo:case Oo:case Mo:return e;default:switch(e=e&&e.$$typeof){case Do:case Io:case Po:case Ao:case ko:return e;default:return t}}case Eo:return t}}}function Ko(e){return zo(e)===jo}var Ho={AsyncMode:To,ConcurrentMode:jo,ContextConsumer:Do,ContextProvider:ko,Element:So,ForwardRef:Io,Fragment:Co,Lazy:Po,Memo:Ao,Portal:Eo,Profiler:xo,StrictMode:Oo,Suspense:Mo,isAsyncMode:function(e){return Ko(e)||zo(e)===To},isConcurrentMode:Ko,isContextConsumer:function(e){return zo(e)===Do},isContextProvider:function(e){return zo(e)===ko},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===So},isForwardRef:function(e){return zo(e)===Io},isFragment:function(e){return zo(e)===Co},isLazy:function(e){return zo(e)===Po},isMemo:function(e){return zo(e)===Ao},isPortal:function(e){return zo(e)===Eo},isProfiler:function(e){return zo(e)===xo},isStrictMode:function(e){return zo(e)===Oo},isSuspense:function(e){return zo(e)===Mo},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===Co||e===jo||e===xo||e===Oo||e===Mo||e===No||"object"==typeof e&&null!==e&&(e.$$typeof===Po||e.$$typeof===Ao||e.$$typeof===ko||e.$$typeof===Do||e.$$typeof===Io||e.$$typeof===Lo||e.$$typeof===Fo||e.$$typeof===Bo||e.$$typeof===Ro)},typeOf:zo},e=E(function(e,t){});e.AsyncMode,e.ConcurrentMode,e.ContextConsumer,e.ContextProvider,e.Element,e.ForwardRef,e.Fragment,e.Lazy,e.Memo,e.Portal,e.Profiler,e.StrictMode,e.Suspense,e.isAsyncMode,e.isConcurrentMode,e.isContextConsumer,e.isContextProvider,e.isElement,e.isForwardRef,e.isFragment,e.isLazy,e.isMemo,e.isPortal,e.isProfiler,e.isStrictMode,e.isSuspense,e.isValidElementType,e.typeOf,E(function(e){e.exports=Ho}),Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;!function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},r)).join("")?void 0:1}catch(e){return}}()||Object.assign;function Uo(){}function qo(){}Function.call.bind(Object.prototype.hasOwnProperty),qo.resetWarningCache=Uo;function Wo(){return w[$o]=(w[$o]||0)+1}function Vo(e){return Array.isArray(e)?e[0]:e}function Go(e,t){if("function"==typeof e)return ti(e,t);null!=e&&(e.current=t)}var Yo=E(function(e){function t(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i)throw i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"),i.name="Invariant Violation",i}function n(){return t}e.exports=(e={array:t.isRequired=t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:qo,resetWarningCache:Uo}).PropTypes=e}),$o="__global_unique_id__",Zo=function(){},Jo=E(function(e,t){t.__esModule=!0,n(g.a);var l=n(Yo),f=n(Wo);function n(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}n(Zo);var y=1073741823;t.default=function(e,a){var t,s,n="__create-react-context-"+(0,f.default)()+"__",r=(h(c,s=g.a.Component),c.prototype.getChildContext=function(){var e={};return e[n]=this.emitter,e},c.prototype.componentWillReceiveProps=function(e){var t,n,r,o,i;this.props.value!==e.value&&(t=this.props.value,n=e.value,r=void 0,((o=t)===(i=n)?0!==o||1/o==1/i:o!=o&&i!=i)||(r="function"==typeof a?a(t,n):y,0!==(r|=0)&&this.emitter.set(e.value,r)))},c.prototype.render=function(){return this.props.children},c);function c(){var e,t;p(this,c);for(var n,r,o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return(e=t=d(this,s.call.apply(s,[this].concat(i)))).emitter=(n=t.props.value,r=[],{on:function(e){r.push(e)},off:function(t){r=r.filter(function(e){return e!==t})},get:function(){return n},set:function(e,t){n=e,r.forEach(function(e){return e(n,t)})}}),d(t,e)}r.childContextTypes=((o={})[n]=l.default.object.isRequired,o),h(u,i=g.a.Component),u.prototype.componentWillReceiveProps=function(e){e=e.observedBits;this.observedBits=null==e?y:e},u.prototype.componentDidMount=function(){this.context[n]&&this.context[n].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?y:e},u.prototype.componentWillUnmount=function(){this.context[n]&&this.context[n].off(this.onUpdate)},u.prototype.getValue=function(){return this.context[n]?this.context[n].get():e},u.prototype.render=function(){return e=this.props.children,(Array.isArray(e)?e[0]:e)(this.state.value);var e};var i,o=u;function u(){var e,n;p(this,u);for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n=d(this,i.call.apply(i,[this].concat(r)))).state={value:n.getValue()},n.onUpdate=function(e,t){0!=((0|n.observedBits)&t)&&n.setState({value:n.getValue()})},d(n,e)}return o.contextTypes=((t={})[n]=l.default.object,t),{Provider:r,Consumer:o}},e.exports=t.default}),n=(S(Jo),E(function(e,t){t.__esModule=!0;var n=o(g.a),r=o(Jo);function o(e){return e&&e.__esModule?e:{default:e}}t.default=n.default.createContext||r.default,e.exports=t.default})),Dn=S(n),Xo=Dn(),Qo=Dn(),ei=function(o){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t=o.call.apply(o,[this].concat(n))||this,Xt(i(i(t)),"referenceNode",void 0),Xt(i(i(t)),"setReferenceNode",function(e){e&&t.referenceNode!==e&&(t.referenceNode=e,t.forceUpdate())}),t}Jt(e,o);var t=e.prototype;return t.componentWillUnmount=function(){this.referenceNode=null},t.render=function(){return fe.createElement(Xo.Provider,{value:this.referenceNode},fe.createElement(Qo.Provider,{value:this.setReferenceNode},this.props.children))},e}(fe.Component),ti=function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}},ni={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},ri={},oi=function(o){function e(){for(var n,e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n=o.call.apply(o,[this].concat(t))||this,Xt(i(i(n)),"state",{data:void 0,placement:void 0}),Xt(i(i(n)),"popperInstance",void 0),Xt(i(i(n)),"popperNode",null),Xt(i(i(n)),"arrowNode",null),Xt(i(i(n)),"setPopperNode",function(e){e&&n.popperNode!==e&&(Go(n.props.innerRef,e),n.popperNode=e,n.updatePopperInstance())}),Xt(i(i(n)),"setArrowNode",function(e){n.arrowNode=e}),Xt(i(i(n)),"updateStateModifier",{enabled:!0,order:900,fn:function(e){var t=e.placement;return n.setState({data:e,placement:t}),e}}),Xt(i(i(n)),"getOptions",function(){return{placement:n.props.placement,eventsEnabled:n.props.eventsEnabled,positionFixed:n.props.positionFixed,modifiers:$t({},n.props.modifiers,{arrow:$t({},n.props.modifiers&&n.props.modifiers.arrow,{enabled:!!n.arrowNode,element:n.arrowNode}),applyStyle:{enabled:!1},updateStateModifier:n.updateStateModifier})}}),Xt(i(i(n)),"getPopperStyle",function(){return n.popperNode&&n.state.data?$t({position:n.state.data.offsets.popper.position},n.state.data.styles):ni}),Xt(i(i(n)),"getPopperPlacement",function(){return n.state.data?n.state.placement:void 0}),Xt(i(i(n)),"getArrowStyle",function(){return n.arrowNode&&n.state.data?n.state.data.arrowStyles:ri}),Xt(i(i(n)),"getOutOfBoundariesState",function(){return n.state.data?n.state.data.hide:void 0}),Xt(i(i(n)),"destroyPopperInstance",function(){n.popperInstance&&(n.popperInstance.destroy(),n.popperInstance=null)}),Xt(i(i(n)),"updatePopperInstance",function(){n.destroyPopperInstance();var e=i(i(n)).popperNode,t=n.props.referenceElement;t&&e&&(n.popperInstance=new wo(t,e,n.getOptions()))}),Xt(i(i(n)),"scheduleUpdate",function(){n.popperInstance&&n.popperInstance.scheduleUpdate()}),n}Jt(e,o);var t=e.prototype;return t.componentDidUpdate=function(e,t){this.props.placement===e.placement&&this.props.referenceElement===e.referenceElement&&this.props.positionFixed===e.positionFixed&&Er(this.props.modifiers,e.modifiers,{strict:!0})?this.props.eventsEnabled!==e.eventsEnabled&&this.popperInstance&&(this.props.eventsEnabled?this.popperInstance.enableEventListeners():this.popperInstance.disableEventListeners()):this.updatePopperInstance(),t.placement!==this.state.placement&&this.scheduleUpdate()},t.componentWillUnmount=function(){Go(this.props.innerRef,null),this.destroyPopperInstance()},t.render=function(){return Vo(this.props.children)({ref:this.setPopperNode,style:this.getPopperStyle(),placement:this.getPopperPlacement(),outOfBoundaries:this.getOutOfBoundariesState(),scheduleUpdate:this.scheduleUpdate,arrowProps:{ref:this.setArrowNode,style:this.getArrowStyle()}})},e}(fe.Component);function ii(e){var t=e.referenceElement,n=Yt(e,["referenceElement"]);return fe.createElement(Xo.Consumer,null,function(e){return fe.createElement(oi,$t({referenceElement:void 0!==t?t:e},n))})}Xt(oi,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1}),wo.placements;var ai=function(o){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t=o.call.apply(o,[this].concat(n))||this,Xt(i(i(t)),"refHandler",function(e){Go(t.props.innerRef,e),ti(t.props.setReferenceNode,e)}),t}Jt(e,o);var t=e.prototype;return t.componentWillUnmount=function(){Go(this.props.innerRef,null)},t.render=function(){return Zo(Boolean(this.props.setReferenceNode)),Vo(this.props.children)({ref:this.refHandler})},e}(fe.Component);function si(t){return fe.createElement(Qo.Consumer,null,function(e){return fe.createElement(ai,$t({setReferenceNode:e},t))})}function ci(e){var n=e.open,t=e.className,r=e.children,o=e.actions,e=me(e),t=he({OverlayFooter:!0},t),i=fe.createRef();return fe.useEffect(function(){var e,t;n&&i.current&&(e=null===(e=i.current)||void 0===e?void 0:e.querySelectorAll(".Button--basic"),(t=e[e.length-1])&&window.requestAnimationFrame(function(){return t.focus({preventScroll:!0})}))},[n]),o?fe.createElement("div",de({ref:i},e,{className:t}),o.map(function(e,t){e.label;e=K(e,Di);return fe.createElement(xe,de({type:"button"},e,{key:t}))})):fe.createElement("div",de({"data-test":"DesignSystem-OverlayFooter",ref:i},e,{className:t}),r)}function ui(e){var t=e.className,n=e.heading,r=e.subHeading,o=e.backButton,i=e.backIcon,a=e.backIconCallback,s=e.backButtonCallback,c=e.headingClass,e=me(e),t=he(pe({OverlayHeader:!0},"OverlayHeader--withBackButton",o||i),t),u=he((pe(u={},"OverlayHeader-subheading",!0),pe(u,"OverlayHeader-subheading--withBackButton",o||i),u));return fe.createElement("div",de({"data-test":"DesignSystem-OverlayHeader"},e,{className:t}),fe.createElement("div",{className:"OverlayHeader-headerWrapper"},(o||i)&&fe.createElement(xe,{"data-test":"DesignSystem-OverlayHeader--Button",appearance:"transparent",className:"mr-5",icon:"keyboard_backspace",onClick:s||a}),n&&fe.createElement(at,{className:c,"data-test":"DesignSystem-OverlayHeader--heading"},n)),r&&fe.createElement(ye,{"data-test":"DesignSystem-OverlayHeader--Subheading",appearance:"subtle",className:u},r))}function li(e){var t=e.children,n=e.className,e=me(e),n=he({OverlayBody:!0},n);return fe.createElement("div",de({"data-test":"DesignSystem-OverlayBody"},e,{className:n}),t)}function fi(){var e=document.querySelector(".Overlay-wrapper");return null===e&&((e=document.createElement("div")).classList.add("Overlay-wrapper"),document.body.appendChild(e)),e}function pi(e){var t=e.containerClassName,n=e.elementRef;if(null!==(e=e.element)){var r,e=e.querySelectorAll(t);if(!(e.length<1))return t=Array.from(e).filter(function(e){return e!==n.current}),r=-1,t.forEach(function(e){e=parseInt(window.getComputedStyle(e).zIndex||"0",10);r=Math.max(r,e+10)}),0<r?r:void 0}}function di(e,t,n){"Escape"===e.key&&t&&(n(e),e.preventDefault())}function hi(e){function t(e){switch(p(!0),e){case"first":a(1);break;case"last":a(r);break;case"prev":1<i&&a(i-1);break;case"next":i<r&&a(i+1)}}var n=e.type,r=e.totalPages,l=e.onPageChange,o=e.className,f=me(e),i=(c=ge(fe.useState(e.page),2))[0],a=c[1],s=(c=ge(fe.useState(!1),2))[0],p=c[1],c=(fe.useEffect(function(){a(e.page)},[e.page]),he((pe(c={},"Pagination",!0),pe(c,"Pagination--".concat(n),n),c),o)),o=he((pe(o={},"Pagination-buttonWrapper",!0),pe(o,"Pagination-buttonWrapper--next",!0),o)),u=he((pe(u={},"Pagination-buttonWrapper",!0),pe(u,"Pagination-buttonWrapper--previous",!0),u));return fe.useEffect(function(){s&&1<=i&&i<=r&&l(i)},[i]),fe.createElement("div",de({"data-test":"DesignSystem-Pagination"},f,{className:c}),fe.createElement("div",{className:u},fe.createElement(xe,{onClick:function(){return t("first")},disabled:i<=1,appearance:"transparent",icon:"first_page","data-test":"DesignSystem-Pagination--FirstButton"}),fe.createElement(xe,{onClick:function(){return t("prev")},disabled:i<=1,icon:"navigate_before","data-test":"DesignSystem-Pagination--PrevButton",className:"ml-4 mr-3"})),"jump"===n&&fe.createElement("div",{className:"Pagination-pageIndex"},fe.createElement(pt,{name:"page",className:"Pagination-MetricInput",onChange:function(e){e.preventDefault();e=+e.target.value.trim();0<=e&&e<=r&&(s||p(!0),a(e))},value:"".concat(0===i?"":i),"data-test":"DesignSystem-Pagination--Input"}),fe.createElement(ye,null," of ".concat(r," pages"))),fe.createElement("div",{className:o},fe.createElement(xe,{onClick:function(){return t("next")},disabled:r<=i,icon:"navigate_next","data-test":"DesignSystem-Pagination--NextButton",className:"mr-4 ml-3"}),fe.createElement(xe,{onClick:function(){return t("last")},disabled:r<=i,appearance:"transparent",icon:"last_page","data-test":"DesignSystem-Pagination--LastButton"})))}function yi(e){function t(e){var t,n;"start"===e&&(t=(n=Ye(l)).year,n=n.month,u({yearNav:t,monthNav:n})),"end"===e&&(n=(t=Ye(f)).year,e=t.month,u({yearNav:n,monthNav:e}))}function o(e,t,n){var r,o,i;u({open:!0}),"start"===n&&(r=s.placeholderChar||"_",!t||t.includes(r)||(r=Ie(a,t,y))&&(u({startDate:r}),f&&(o=(r=Ye(f)).year,i=r.month,r=r.date,Te(l,"more",o,i,r)&&u({endDate:void 0})))),"end"===n&&(o=c.placeholderChar||"_",!t||t.includes(o)||(i=Ie(a,t,y))&&u({endDate:i}))}function i(e,t,n){var r;u({init:!0}),"start"===n&&(r=s.placeholderChar,t&&!t.includes(void 0===r?"_":r)||u({startDate:void 0})),"end"===n&&(r=c.placeholderChar,t&&!t.includes(void 0===r?"_":r)||u({endDate:void 0}))}function p(e){u({init:!0}),"start"===e&&(u({startDate:void 0}),t("end")),"end"===e&&(u({endDate:void 0}),t("start"))}function d(e){n.open||t(e)}function h(e){return L(y,e,a)}var a=e.inputFormat,s=e.startInputOptions,c=e.endInputOptions,y=e.validators,n=e.state,u=e.setState,e=n.init,l=n.startDate,f=n.endDate,g=n.startError,m=n.endError,r=C[a],v=s.placeholderChar||"_",b=c.placeholderChar||"_",g=s.error||s.required&&g&&e,m=c.error||c.required&&m&&e,_=void 0===s.caption?"Invalid value":s.caption,w=void 0===c.caption?"Invalid value":c.caption,S=s.label,E=c.label;return fe.createElement(Tt,{"data-test":"DesignSystem-DateRangePicker-InputTrigger"},fe.createElement(nt,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--startDate"},S&&fe.createElement(Pe,{required:s.required,withInput:!0},S),fe.createElement(ht,de({icon:"events",placeholder:a},s,{mask:r,value:l?je(a,l):e?ht.utils.getDefaultValue(r,v):"",onChange:function(e,t){o(0,t||"","start")},onBlur:function(e,t){i(0,t||"","start")},onClear:function(){return p("start")},onClick:function(){return d("start")},error:g,caption:g?_:"",validators:[h],clearOnEmptyBlur:!1}))),fe.createElement(nt,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--endDate"},E&&fe.createElement(Pe,{required:c.required,withInput:!0},E),fe.createElement(ht,de({icon:"events",placeholder:a},c,{mask:r,value:f?je(a,f):e?ht.utils.getDefaultValue(r,b):"",onChange:function(e,t){o(0,t||"","end")},onBlur:function(e,t){i(0,t||"","end")},onClear:function(){return p("end")},onClick:function(){return d("end")},error:m,caption:m?w:"",validators:[h],clearOnEmptyBlur:!1}))))}function gi(e){var a=e.inputFormat,t=e.inputOptions,s=e.validators,n=e.state,c=e.setState,e=n.init,p=n.startDate,u=n.endDate,l=n.startValue,d=n.endValue,o=n.startError,n=n.endError,i=_[a],o=t.error||t.required&&(o||n)&&e,n=void 0===t.caption?"Invalid value":t.caption,h=t.label,f=void 0===(r=t.placeholderChar)?"_":r,r=ht.utils.getDefaultValue(i,f).split(" - "),y=l||r[0],r=d||r[1];return fe.createElement(Tt,{"data-test":"DesignSystem-DateRangePicker-SingleInputTrigger"},fe.createElement(nt,null,h&&fe.createElement(Pe,{required:t.required,withInput:!0},h),fe.createElement(ht,de({icon:"events",placeholder:"".concat(a," - ").concat(a)},t,{mask:i,value:p||u||e?"".concat(y," - ").concat(r):void 0,onChange:function(e,t){var n,r,o,i;t=(t=t||"").split(" - "),i=t[0],t=t[1],l===i||!i||i.includes(f)||(n=Ie(a,i,s))&&(r=d&&!d.includes(f),c({startDate:n,endDate:r?u:void 0}),u&&(r=(n=Ye(u)).year,o=n.month,n=n.date,Te(p,"more",r,o,n)&&c({endDate:void 0}))),d!==t&&t&&!t.includes(f)&&(r=Ie(a,t,s),o=l&&!l.includes(f),r&&c({endDate:r,startDate:o?p:void 0})),c({startValue:i,endValue:t})},onBlur:function(e,t){var n;t=t||"",c({init:!0}),t=t.split(" - "),n=t[0],t=t[1],n&&!n.includes(f)||c({startDate:void 0}),t&&!t.includes(f)||c({endDate:void 0})},onClear:function(){c({init:!0,startDate:void 0,endDate:void 0,yearNav:void 0,monthNav:void 0})},error:o,caption:o?n:"",validators:[function(e){var e=ge(e.split(" - "),2),t=e[0],e=e[1];return L(s,t,a)&&L(s,e,a)}],clearOnEmptyBlur:!1}))))}function mi(e){var t=new Date;return new Date(t.setDate(e))}function vi(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(e){return"Files"===e||"application/x-moz-file"===e}):!!e.target&&!!e.target.files}function bi(e){e.preventDefault()}function _i(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return function(t){for(var e=arguments.length,n=new Array(1<e?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return o.some(function(e){return!Ni(t)&&e&&e.apply(void 0,[t].concat(n)),Ni(t)})}}function wi(e,t){switch(t.type){case"focus":return z(z({},e),{},{isFocused:!0});case"blur":return z(z({},e),{},{isFocused:!1});case"openDialog":return z(z({},e),{},{isFileDialogActive:!0});case"closeDialog":return z(z({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return z(z({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return z(z({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return z(z({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}var Si=function(){h(n,fe["Component"]);var t=y(n);function n(e){var o;return d(this,n),pe(V(o=t.call(this,e)),"triggerRef",void 0),pe(V(o),"popupRef",void 0),pe(V(o),"hoverableDelay",void 0),pe(V(o),"_timer",void 0),pe(V(o),"_throttleWait",void 0),pe(V(o),"offsetMapping",void 0),pe(V(o),"togglePopper",function(e,t){var n=o.props,r=n.open;(0,n.onToggle)(void 0===t?!r:t,e)}),pe(V(o),"doesEventContainsElement",function(e,t){t=t.current;return t&&t.contains(e.target)}),pe(V(o),"getUpdatedStyle",function(e,t,n){var r=z(z({},o.props.style),e);switch(t&&t.split("-")[0]){case"top":r.marginBottom=o.offsetMapping[n];break;case"bottom":r.marginTop=o.offsetMapping[n];break;case"left":r.marginRight=o.offsetMapping[n];break;case"right":r.marginLeft=o.offsetMapping[n]}return r}),o.state={animationKeyframe:"",isOpen:o.props.open||!1,uniqueKey:""},o.hoverableDelay=100,o.offsetMapping={small:"2px",medium:"4px",large:"8px"},o.triggerRef=fe.createRef(),o.popupRef=fe.createRef(),o.getPopperChildren=o.getPopperChildren.bind(V(o)),o.mouseMoveHandler=o.mouseMoveHandler.bind(V(o)),o.handleMouseEnter=o.handleMouseEnter.bind(V(o)),o.handleMouseLeave=o.handleMouseLeave.bind(V(o)),o.boundaryScrollHandler=o.boundaryScrollHandler.bind(V(o)),o}return a(n,[{key:"componentDidMount",value:function(){this.addBoundaryScrollHandler()}},{key:"componentDidUpdate",value:function(e){!e.boundaryElement&&this.props.boundaryElement&&(this.removeBoundaryScrollHandler(),this.addBoundaryScrollHandler()),e.open!==this.props.open&&(this._throttleWait=!1,this.setState({animationKeyframe:""}),this.props.open&&(e=this.triggerRef.current,e=this.getZIndexForLayer(e),this.setState({zIndex:void 0===e?e:e+1,isOpen:!0})))}},{key:"componentWillUnmount",value:function(){this.removeBoundaryScrollHandler()}},{key:"boundaryScrollHandler",value:function(){var e=this.props,t=e.open,n=e.on,e=e.closeOnScroll;"click"===n&&e&&t&&(this._throttleWait||(this.togglePopper("onScroll",!1),this._throttleWait=!0))}},{key:"addBoundaryScrollHandler",value:function(){this.props.boundaryElement&&this.props.boundaryElement.addEventListener("scroll",this.boundaryScrollHandler)}},{key:"removeBoundaryScrollHandler",value:function(){this.props.boundaryElement&&this.props.boundaryElement.removeEventListener("scroll",this.boundaryScrollHandler)}},{key:"mouseMoveHandler",value:function(){var e=this;this._timer&&clearTimeout(this._timer),this._timer=window.setTimeout(function(){(0,e.props.onToggle)(!1,"mouseLeave")},this.hoverableDelay)}},{key:"handleMouseEnter",value:function(){"hover"===this.props.on&&(this._timer&&clearTimeout(this._timer),(0,this.props.onToggle)(!0,"mouseEnter"))}},{key:"handleMouseLeave",value:function(){var e,t;"hover"===this.props.on&&(e=(t=this.props).hoverable,t=t.onToggle,e?this.mouseMoveHandler():t(!1,"mouseLeave"))}},{key:"getZIndexForLayer",value:function(e){if(null!==e)return e=e.closest("[data-layer]")||document.body,e=e===document.body?"auto":parseInt(window.getComputedStyle(e).zIndex||"0",10),"auto"===e||isNaN(e)?void 0:e}},{key:"getTriggerElement",value:function(e){var r=this,t=this.props,n=t.trigger,o=t.on,t=t.triggerClass,o="hover"===o?{ref:e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave}:{ref:e,onClick:function(e){e.stopPropagation(),r.togglePopper("onClick")}},e=he("PopperWrapper-trigger",t);return fe.createElement(Et,de({className:e,onOutsideClick:function(e){var t=r.props,n=t.open,t=t.closeOnBackdropClick;n&&t&&(r.doesEventContainsElement(e,r.popupRef)||r.togglePopper("outsideClick"))}},o),n)}},{key:"getPopperChildren",value:function(e){var t,l=this,f=e.ref,n=e.style,r=e.placement,e=e.outOfBoundaries,o=this.props,i=o.offset,p=o.children,a=o.open,o=o.animationClass,s=this.state,c=s.zIndex,u=s.animationKeyframe,s=s.uniqueKey,i=z(z({},i?this.getUpdatedStyle(n,r,i):n),{},{zIndex:c}),n="",u=(o?n=he((pe(c={},"".concat(o.open),a),pe(c,"".concat(o.close),!a),c),p.props.className):(c=null===(c=this.popupRef.current)||void 0===c?void 0:c.offsetHeight,(null===(t=this.popupRef.current)||void 0===t?void 0:t.style.getPropertyValue("transform"))&&c&&r&&!u&&(t=Math.random().toString(36).substring(2,6),u=r.includes("top"),u="\n @keyframes popper-open-".concat(t," {\n from { \n max-height: 0;\n ").concat(u?"margin-top: ".concat(c,"px"):"",";\n }\n to {\n max-height: ").concat(c,"px;\n ").concat(u?"margin-top: 0px":"",";\n }\n }\n @keyframes popper-close-").concat(t," {\n from {\n max-height: ").concat(c,"px;\n ").concat(u?"margin-top: 0px":"",";\n }\n to {\n max-height: 0;\n ").concat(u?"margin-top: ".concat(c,"px"):"",";\n }\n }\n "),this.setState({animationKeyframe:u,uniqueKey:t})),c={animation:a?"popper-open-".concat(s," 120ms cubic-bezier(0, 0, 0.38, 0.9), popper-fade-in 120ms"):"popper-close-".concat(s," 120ms cubic-bezier(0.2, 0, 1, 0.9) 120ms, fadeOut 120ms 120ms")},i=z(z(z({},i),c),{},{overflow:"hidden"})),{ref:f,style:i,"data-placement":r,"data-hide":e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onAnimationEnd:function(){a||l.setState({isOpen:!1})}});return fe.cloneElement(p,o?z(z({},u),{},{className:n}):z({},u))}},{key:"render",value:function(){var t=this,e=this.props,n=e.placement,r=e.appendToBody,o=e.hide,e=e.boundaryElement,i=this.state,a=i.animationKeyframe,i=i.isOpen;return fe.createElement(ei,null,fe.createElement("style",null,a),fe.createElement(si,{innerRef:this.triggerRef},function(e){e=e.ref;return t.getTriggerElement(e)}),i&&r&&m.createPortal(fe.createElement(ii,{placement:n,innerRef:this.popupRef,modifiers:{preventOverflow:{boundariesElement:e||document.body},hide:{enabled:o}}},this.getPopperChildren),document.body),i&&!r&&fe.createElement(ii,{placement:n,innerRef:this.popupRef},this.getPopperChildren))}}]),n}(),Ei=(pe(Si,"defaultProps",{on:"click",offset:"medium",closeOnBackdropClick:!0,hoverable:!0,appendToBody:!0,style:{}}),["position","customStyle","dark","children","onToggle","className","hideOnReferenceEscape","boundaryElement"]),Ci=function(e){var t=e.position,n=e.customStyle,r=e.dark,l=e.children,f=e.onToggle,o=e.className,p=e.hideOnReferenceEscape,i=e.boundaryElement,a=void 0===i?document.body:i,i=K(e,Ei),s=ge(fe.useState(!!e.open),2),d=s[0],c=s[1],s=ge(fe.useState(!1),2),u=s[0],h=s[1],s=(fe.useEffect(function(){void 0!==e.open&&c(e.open)},[e.open]),fe.useCallback(function(e){c(e)},[])),r=(fe.useEffect(function(){u||"current"in a&&a.current&&h(!0)},[a]),he(pe({Popover:!0},"Popover--dark",r),o)),o=fe.createElement("div",{"data-test":"DesignSystem-Popover",className:r,"data-layer":!0},l);return fe.createElement(Si,de({},i,{init:u,boundaryElement:"current"in a?a.current:a,open:d,hide:p,style:n,onToggle:f||s,placement:t}),o)},Oi=(Ci.displayName="Popover",Ci.defaultProps=Object.assign({},O(Si.defaultProps,["appendToBody","trigger","hoverable","on","open","closeOnBackdropClick","offset","closeOnScroll"],!0),{offset:"large",position:"bottom",hideOnReferenceEscape:!0,customStyle:{}}),["children","tooltip"]),xi={bottom:"bottom",top:"top","top-start":"top","top-end":"top","bottom-start":"bottom","bottom-end":"bottom",left:"left",right:"right"},ki=function(e){var t=e.children,n=e.tooltip,r=K(e,Oi),n=fe.createElement("div",{className:"Tooltip"},fe.createElement(ye,{className:"Tooltip-text",appearance:"white"},n));return fe.createElement(Ci,de({trigger:t,on:"hover",offset:"medium"},r,{animationClass:{open:"Tooltip-animation-open-".concat(xi[e.position]),close:"Tooltip-animation-close-".concat(xi[e.position])}}),n)},Di=(ki.defaultProps=Object.assign({},O(Ci.defaultProps,["trigger","on","open","offset","onToggle","dark","customStyle","closeOnBackdropClick","hideOnReferenceEscape","closeOnScroll"]),{hoverable:!1}),["label"]),Ti=(ci.displayName="OverlayFooter",ui.displayName="OverlayHeader",li.defaultProps={stickFooter:!0,withFooter:!0},li.displayName="OverlayBody",new(function(){function e(){d(this,e),pe(this,"overlays",void 0),this.overlays=[]}return a(e,[{key:"add",value:function(e){var t;if(null!==e)return t=this.overlays.indexOf(e),-1!==t||(t=this.overlays.length,this.overlays.push(e)),t}},{key:"remove",value:function(e){null===e||-1!==(e=this.overlays.indexOf(e))&&this.overlays.splice(e,1)}},{key:"isTopOverlay",value:function(e){if(null!==e)return!!this.overlays.length&&this.overlays[this.overlays.length-1]===e}}]),e}())),Xe=(Object.freeze(Ti),function(){h(r,fe["Component"]);var t=y(r);function r(e){var n;return d(this,r),pe(V(n=t.call(this,e)),"modalRef",fe.createRef()),pe(V(n),"element",void 0),pe(V(n),"onCloseHandler",function(e){var t=Ti.isTopOverlay(n.modalRef.current);di(e,t,n.onOutsideClickHandler)}),n.element=fi(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(V(n)),n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&Ti.add(this.modalRef.current),document.addEventListener("keydown",this.onCloseHandler))}},{key:"componentWillUnmount",value:function(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}},{key:"componentDidUpdate",value:function(e){var t=this;e.open!==this.props.open&&(this.props.open?(e=pi({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef}),this.setState({zIndex:e,open:!0,animate:!0}),this.props.closeOnEscape&&Ti.add(this.modalRef.current)):(this.setState({animate:!1},function(){window.setTimeout(function(){t.setState({open:!1})},120)}),this.props.closeOnEscape&&Ti.remove(this.modalRef.current)))}},{key:"onOutsideClickHandler",value:function(e){var t=this.props,n=t.backdropClose,t=t.onClose;this.state.open&&(this.props.closeOnEscape&&Ti.remove(this.modalRef.current),t?t(e,"OutsideClick"):"function"==typeof n&&n(e,"OutsideClick"))}},{key:"render",value:function(){var e=this.state,t=e.animate,l=e.open,e=e.zIndex,n=this.props,r=n.className,f=n.backdropClose,p=n.dimension,d=n.children,o=n.headerOptions,i=n.header,a=n.footerOptions,h=n.seperator,s=n.footer,y=n.onClose,n=e?e-1:1e3,t=he({Modal:!0,"Modal--open":l,"Modal-animation--open":t,"Modal-animation--close":!t},r),r=he((pe(r={},"Modal-header",!0),pe(r,"Modal-header--withSeperator",h),r)),h=he((pe(c={},"Modal-footer",!0),pe(c,"Modal-footer--withSeperator",h),c)),c=he((pe(c={},"Row",!0),pe(c,"Overlay-container",!0),pe(c,"Overlay-container--open",l),c)),g=o||a||s||i,g=he((pe(u={},"Modal-body",!0),pe(u,"Modal-body--withMargin",!g||!!s),pe(u,"Modal-body--withPadding",!g||!s),u)),u=me(this.props),c=fe.createElement(Tt,{"data-test":"DesignSystem-ModalContainer",className:c,"data-layer":!0,style:{zIndex:e}},fe.createElement(nt,de({"data-test":"DesignSystem-Modal"},u,{className:t},{small:{size:"3",sizeL:"4",sizeM:"4",sizeXS:"10"},medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"10"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"10"}}[p],{ref:this.modalRef}),(o||i)&&fe.createElement("div",{className:r},fe.createElement(nt,null,!i&&fe.createElement(ui,de({"data-test":"DesignSystem-Modal--header"},o)),!!i&&i),fe.createElement(nt,{className:"flex-grow-0"},fe.createElement(ki,{tooltip:"Close",position:"top"},fe.createElement(xe,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Modal--CloseButton",onClick:function(e){y&&y(e,"IconClick")}})))),d&&fe.createElement(fe.Fragment,null,o||a||s||i?fe.createElement(li,{className:g},this.props.children):d),(!!s||!!a)&&fe.createElement(ci,de({"data-test":"DesignSystem-Modal--footer"},a,{open:l,className:h}),s))),e=f?fe.createElement(Et,{"data-test":"DesignSystem-Modal--OutsideClick",onOutsideClick:this.onOutsideClickHandler},c):c,u=m.createPortal(e,this.element);return fe.createElement(fe.Fragment,null,u,fe.createElement(x,{open:this.state.animate,zIndex:n}))}}]),r}()),kt=(pe(Xe,"defaultProps",{dimension:"medium"}),function(){h(r,fe["Component"]);var t=y(r);function r(e){var n;return d(this,r),pe(V(n=t.call(this,e)),"modalRef",fe.createRef()),pe(V(n),"element",void 0),pe(V(n),"onOutsideClickHandler",function(e){Ti.remove(n.modalRef.current),n.props.onClose?n.props.onClose(e,"EscapePress"):n.setState({animate:!1},function(){window.setTimeout(function(){n.setState({open:!1})},120)})}),pe(V(n),"onCloseHandler",function(e){var t=Ti.isTopOverlay(n.modalRef.current);di(e,t,n.onOutsideClickHandler)}),n.element=fi(),n.state={open:e.open,animate:e.open},n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&Ti.add(this.modalRef.current),document.addEventListener("keydown",this.onCloseHandler))}},{key:"componentWillUnmount",value:function(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}},{key:"componentDidUpdate",value:function(e){var t=this;e.open!==this.props.open&&(this.props.open?(e=pi({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef}),this.setState({zIndex:e,open:!0,animate:!0}),this.props.closeOnEscape&&Ti.add(this.modalRef.current)):(this.setState({animate:!1},function(){window.setTimeout(function(){t.setState({open:!1})},120)}),this.props.closeOnEscape&&Ti.remove(this.modalRef.current)))}},{key:"render",value:function(){var e=this.state,t=e.animate,n=e.open,e=e.zIndex,r=this.props,o=r.className,i=r.dimension,l=r.children,a=r.header,f=r.headerOptions,s=r.footer,c=r.footerOptions,u=r.onClose,r=he({FullscreenModal:!0,"FullscreenModal-animation--open":t,"FullscreenModal-animation--close":!t},o),o=he((pe(t={},"Overlay-container",!0),pe(t,"Overlay-container--open",n),t)),t=me(this.props),o=n?fe.createElement("div",{"data-test":"DesignSystem-FullscreenModalContainer",className:o,"data-layer":!0,style:{zIndex:e}},fe.createElement("div",de({"data-test":"DesignSystem-FullscreenModal"},t,{className:r,ref:this.modalRef}),fe.createElement(Tt,{className:"justify-content-center"},fe.createElement(nt,{medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"12"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"12"}}[i],fe.createElement(Tt,{className:"FullscreenModal-header"},fe.createElement(nt,null,!a&&fe.createElement(ui,de({"data-test":"DesignSystem-FullscreenModal--header"},f)),!!a&&a),fe.createElement(nt,{className:"flex-grow-0"},fe.createElement(ki,{tooltip:"Close"},fe.createElement(xe,{icon:"close",appearance:"transparent","data-test":"DesignSystem-FullscreenModal--CloseButton",onClick:function(e){u&&u(e,"IconClick")}})))),fe.createElement(li,{"data-test":"DesignSystem-FullscreenModal--Body",className:"FullscreenModal-body"},l),(!!s||!!c)&&fe.createElement(ci,de({"data-test":"DesignSystem-FullscreenModal--footer"},c,{open:n,className:"FullscreenModal-footer"}),s))))):null,e=m.createPortal(o,this.element);return fe.createElement(fe.Fragment,null,e)}}]),r}()),ji=(pe(kt,"defaultProps",{dimension:"medium"}),{regular:"6",large:"10"}),t=function(){h(r,fe["Component"]);var t=y(r);function r(e){var n;return d(this,r),pe(V(n=t.call(this,e)),"sidesheetRef",fe.createRef()),pe(V(n),"element",void 0),pe(V(n),"onCloseHandler",function(e){var t=Ti.isTopOverlay(n.sidesheetRef.current);di(e,t,n.onOutsideClickHandler)}),n.element=fi(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(V(n)),n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&Ti.add(this.sidesheetRef.current),document.addEventListener("keydown",this.onCloseHandler))}},{key:"componentWillUnmount",value:function(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}},{key:"componentDidUpdate",value:function(e){e.open!==this.props.open&&(this.props.open?(e=pi({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.sidesheetRef}),this.setState({zIndex:e,open:!0,animate:!0}),this.props.closeOnEscape&&Ti.add(this.sidesheetRef.current)):(this.setState({animate:!1}),this.props.closeOnEscape&&Ti.remove(this.sidesheetRef.current)))}},{key:"onOutsideClickHandler",value:function(e){var t=this.props.onClose;this.state.open&&(this.props.closeOnEscape&&Ti.remove(this.sidesheetRef.current),t&&t(e,"OutsideClick"))}},{key:"handleAnimationEnd",value:function(){this.state.animate||this.setState({open:!1})}},{key:"render",value:function(){var e=this.state,t=e.animate,l=e.open,e=e.zIndex,n=this.props,f=n.className,p=n.backdropClose,d=n.dimension,r=n.footer,o=n.seperator,i=n.stickFooter,a=n.headerOptions,h=n.footerOptions,s=n.header,y=n.onClose,n=e?e-1:1e3,f=he({Sidesheet:!0,"Sidesheet--open":l,"Sidesheet-animation--open":t,"Sidesheet-animation--close":!t},f),t=he((pe(c={},"Overlay-container",!0),pe(c,"fade-in",t),pe(c,"Overlay-container--open",t),pe(c,"Overlay-container--close",!t),c)),c=he((pe(c={},"Sidesheet-header",!0),pe(c,"Sidesheet-header--withSeperator",o),c)),o=he((pe(u={},"Sidesheet-footer",!0),pe(u,"Sidesheet-footer--withSeperator",o),pe(u,"Sidesheet-footer--stickToBottom",i),u)),i=he((pe(u={},"Sidesheet-body",!0),pe(u,"Sidesheet-body--withMargin",!!r&&i),u)),u=he((pe(u={},"Sidesheet-header--shiftRight",(null==a?void 0:a.backButton)||(null==a?void 0:a.backIcon)),pe(u,"Sidesheet-header--shiftLeft",!(null!=a&&a.backButton||null!=a&&a.backIcon)),u)),g=me(this.props),t=fe.createElement(Tt,{"data-test":"DesignSystem-SidesheetContainer",className:t,"data-layer":!0,style:{zIndex:e},ref:this.sidesheetRef,onAnimationEnd:this.handleAnimationEnd},fe.createElement(nt,de({"data-test":"DesignSystem-Sidesheet"},g,{className:f,size:ji[d]}),fe.createElement("div",{className:c},fe.createElement(nt,{"data-test":"DesignSystem-Sidesheet--Header"},!s&&fe.createElement(ui,de({headingClass:u},a)),!!s&&s),fe.createElement(nt,{className:"flex-grow-0"},fe.createElement(ki,{tooltip:"Close"},fe.createElement(xe,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Sidesheet--CloseButton",onClick:function(e){y&&y(e,"IconClick")}})))),fe.createElement(li,{"data-test":"DesignSystem-Sidesheet--OverlayBody",className:i},this.props.children),(!!r||!!h)&&fe.createElement(ci,de({"data-test":"DesignSystem-Sidesheet--Footer"},h,{open:l,className:o}),r))),e=p?fe.createElement(Et,{"data-test":"DesignSystem-Sidesheet--OutsideClick",onOutsideClick:this.onOutsideClickHandler},t):t,g=m.createPortal(e,this.element);return fe.createElement(fe.Fragment,null,g,fe.createElement(x,{open:this.state.animate,zIndex:n}))}}]),r}(),e=(pe(t,"defaultProps",{dimension:"regular",stickFooter:!1,headerOptions:{}}),function(e){var t=e.title,n=e.description,r=e.className,e=me(e),r=he({"Modal-description":!0},r);return fe.createElement("div",de({"data-test":"DesignSystem-ModalDescription"},e,{className:r}),t&&fe.createElement(ye,{weight:"strong","data-test":"DesignSystem-ModalDescription--Title"},t),t&&n&&fe.createElement("br",null),n&&fe.createElement(ye,{"data-test":"DesignSystem-ModalDescription--Description"},n))}),Ii=(e.displayName="ModalDescription",hi.displayName="Pagination",hi.defaultProps={type:"basic",page:1,totalPages:1},["startDate","endDate","yearNav","monthNav","open","inputFormat","outputFormat","startInputOptions","endInputOptions","validators","withInput","position","disabledBefore","disabledAfter","onRangeChange","rangeLimit"]),n=function(){h(c,fe["Component"]);var s=y(c);function c(e){d(this,c),pe(V(l=s.call(this,e)),"monthsInView",void 0),pe(V(l),"getDate",function(e,t){var n=l.props.inputFormat;return{startValue:e?je(n,e):"",endValue:t?je(n,t):""}}),pe(V(l),"getErrors",function(e,t){function n(e){var t=(n=l.props).disabledBefore,n=n.disabledAfter,r=(t=Ye(t)).year,o=t.month,t=t.date,i=(n=Ye(n)).year,a=n.month,n=n.date;return!e||(Te(e,"less",r,o,t)||Te(e,"more",i,a,n))}var r=n(e),o=n(t),t=Ye(t),i=t.year,a=t.month,t=t.date;return Te(e,"more",i,a,t)&&(o=r=!0),{startError:r,endError:o}}),pe(V(l),"getInRangeError",function(){var e=l.props.rangeLimit;if(e){var t,n=l.state,r=n.startDate,n=n.endDate,o=Ye(r),i=o.year,a=o.month,o=o.date,s=Ye(n),c=s.year,u=s.month,s=s.date;if(r)return(t=new Date(r)).setDate(o+e),Te(t,"less",c,u,s+1);if(n)return(t=new Date(n)).setDate(s-e),Te(t,"more",i,a,o-1)}return!1}),pe(V(l),"onRangeChangeHandler",function(e,t){l.setState({init:!0,startDate:e,endDate:t,startValue:e?je(l.props.inputFormat,e):"",endValue:t?je(l.props.inputFormat,t):""})}),pe(V(l),"onToggleHandler",function(e,t){var n=l.props,r=n.singleInput,o=n.inputOptions,i=n.startInputOptions,n=n.endInputOptions;if(!(r?o.disabled:i.disabled||n.disabled))switch(t){case"outsideClick":l.setState({open:e});break;case"onClick":l.setState({open:!0})}});var l,t=e.inputFormat,n=e.validators,r=$e(e.startDate,t,n),t=$e(e.endDate,t,n),n=l.getDate(r,t),o=n.startValue,n=n.endValue,i=l.getErrors(r,t),a=i.startError,i=i.endError;return l.state={startDate:r,endDate:t,startValue:o,endValue:n,startError:a,endError:i,init:!1,open:e.open||!1,yearNav:e.yearNav,monthNav:e.monthNav},l.monthsInView=e.monthsInView||(e.withInput?2:1),l}return a(c,[{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a,s;e.startDate!==this.props.startDate&&(n=(r=this.props).inputFormat,r=r.validators,r=$e(this.props.startDate,n,r),n=je(n,r),this.setState({startDate:r,startValue:n})),e.endDate!==this.props.endDate&&(n=(r=this.props).inputFormat,r=r.validators,r=$e(this.props.endDate,n,r),n=je(n,r),this.setState({endDate:r,endValue:n})),e.open!==this.props.open&&this.setState({open:this.props.open||!1}),e.yearNav!==this.props.yearNav&&this.setState({yearNav:this.props.yearNav}),e.monthNav!==this.props.monthNav&&this.setState({monthNav:this.props.monthNav}),t.startDate===this.state.startDate&&t.endDate===this.state.endDate||(n=(r=this.props).onRangeChange,e=r.outputFormat,r=(t=this.state).startDate,t=t.endDate,o=(i=this.getErrors(r,t)).startError,i=i.endError,this.setState({startError:o,endError:i}),n&&(a=this.getInRangeError(),s=je(e,r),e=je(e,t),a||o||i?o?n(void 0,i?void 0:t,s,e):n(r,void 0,s,e):n(r,t,s,e)),this.state.startDate&&this.state.endDate&&this.setState({open:!this.state.open}))}},{key:"renderCalendar",value:function(){var e=this.props,t=(e.startDate,e.endDate,e.yearNav,e.monthNav,e.open,e.inputFormat),n=(e.outputFormat,e.startInputOptions,e.endInputOptions,e.validators),r=(e.withInput,e.position,e.disabledBefore),o=e.disabledAfter,i=(e.onRangeChange,e.rangeLimit),e=K(e,Ii),a=this.state,s=a.startDate,c=a.endDate,u=a.yearNav,a=a.monthNav;return fe.createElement(Ze,de({},e,{monthsInView:this.monthsInView,rangePicker:!0,startDate:$e(s,t,n),endDate:$e(c,t,n),disabledBefore:$e(r,t,n),disabledAfter:$e(o,t,n),onRangeChange:this.onRangeChangeHandler,yearNav:u,monthNav:a,rangeLimit:i}))}},{key:"render",value:function(){var e,t=this.props,n=t.withInput,r=t.startInputOptions,o=t.endInputOptions,i=t.inputOptions,a=t.inputFormat,s=t.position,c=t.validators,l=t.singleInput,u=t.contentAlign,t=t.children,f=this.state.open,u=he((pe(e={},"DateRangePicker",!0),pe(e,"DateRangePicker--".concat(u),u),e));return n?(e=l?fe.createElement(gi,{inputFormat:a,inputOptions:i,validators:c,state:this.state,setState:this.setState.bind(this)}):fe.createElement(yi,{inputFormat:a,startInputOptions:r,endInputOptions:o,validators:c,state:this.state,setState:this.setState.bind(this)}),fe.createElement(Ci,{trigger:e,triggerClass:"w-100",className:u,position:s,appendToBody:!0,open:f,onToggle:this.onToggleHandler},t,this.renderCalendar())):this.renderCalendar()}}]),c}(),Dn=(pe(n,"utils",{getCurrentWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:mi(t-e+1),endDate:mi(t-e+7)}},getPreviousWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:mi(t-e-6),endDate:mi(t-e)}},getPreviousMonth:function(){var e=new Date,t=e.getFullYear(),e=e.getMonth();return{endDate:new Date(t,e,0),startDate:new Date(t-(e<0),(e+11)%12,1)}},getPrevious90Days:function(){var e=(new Date).getDate();return{startDate:mi(e-90),endDate:mi(e)}},getCustomDates:function(){return{startDate:"",endDate:""}},getCurrentYear:function(){return(new Date).getFullYear()},getCurrentMonth:function(){return(new Date).getMonth()}}),pe(n,"defaultProps",z(z({},Ze.defaultProps),{},{children:fe.createElement(fe.Fragment,null),contentAlign:"left",monthsInView:void 0,position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[b],inputOptions:{label:"Date"},startInputOptions:{label:"Start Date"},endInputOptions:{label:"End Date"}})),function(e){e=e.children;return fe.createElement(fe.Fragment,null,e)}),Mi=(Dn.displayName="Tab",function(e,t){var n,r,o;return!e||!t||(t=Array.isArray(t)?t:t.split(","),n=e.name||"",r=(e.type||"").toLowerCase(),o=r.replace(/\/.*$/,""),t.some(function(e){e=e.trim().toLowerCase();return"."===e.charAt(0)?n.toLowerCase().endsWith(e):e.endsWith("/*")?o===e.replace(/\/.*$/,""):r===e}))}),Ni=function(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble},Ai=function(e){return null!=e},Pi=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e,e=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{type:"FILE_INVALID_TYPE",message:"File type must be ".concat(e)}},Ri=function(e){return{type:"FILE_TOO_LARGE",message:"File is larger than ".concat(e," bytes")}},Li=function(e){return{type:"FILE_TOO_SMALL",message:"File is smaller than ".concat(e," bytes")}},Fi=function(e,t){e="application/x-moz-file"===e.type||Mi(e,t);return[e,e?null:Pi(t)]},Bi=function(e,t,n){if(Ai(e.size))if(Ai(t)&&Ai(n)){if(e.size>n)return[!1,Ri(n)];if(e.size<t)return[!1,Li(t)]}else{if(Ai(t)&&e.size<t)return[!1,Li(t)];if(Ai(n)&&e.size>n)return[!1,Ri(n)]}return[!0,null]},zi=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]),Ki=[".DS_Store","Thumbs.db"];function Hi(){return(Hi=s(regeneratorRuntime.mark(function e(n){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.dataTransfer&&n.dataTransfer?function(){return qi.apply(this,arguments)}(n.dataTransfer,n.type):(null!==(t=n).target&&t.target.files?Vi(t.target.files):[]).map(function(e){return Ui(e)}));case 1:case"end":return e.stop()}var t},e)}))).apply(this,arguments)}function Ui(e,t){var n,r=function(e){var t=e.name;t&&-1!==t.lastIndexOf(".")&&!e.type&&(t=t.split(".").pop().toLowerCase(),(t=zi.get(t))&&Object.defineProperty(e,"type",{value:t,writable:!1,configurable:!1,enumerable:!0}));return e}(e);return"string"!=typeof r.path&&(n=e.webkitRelativePath,Object.defineProperty(r,"path",{value:"string"==typeof t?t:"string"==typeof n&&0<n.length?n:e.name,writable:!1,configurable:!1,enumerable:!0})),r}function qi(){return(qi=s(regeneratorRuntime.mark(function e(t,n){var r,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.items){e.next=8;break}if(r=Vi(t.items).filter(function(e){return"file"===e.kind}),"drop"!==n)return e.abrupt("return",r);e.next=4;break;case 4:return e.next=6,Promise.all(r.map(Gi));case 6:return o=e.sent,e.abrupt("return",Wi(function n(e){return e.reduce(function(e,t){return[].concat(H(e),H(Array.isArray(t)?n(t):[t]))},[])}(o)));case 8:return e.abrupt("return",Wi(Vi(t.files).map(function(e){return Ui(e)})));case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Wi(e){return e.filter(function(e){return-1===Ki.indexOf(e.name)})}function Vi(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function Gi(e){if("function"!=typeof e.webkitGetAsEntry)return Yi(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Ji(t):Yi(e)}function Yi(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));e=Ui(t);return Promise.resolve(e)}function $i(e){return Zi.apply(this,arguments)}function Zi(){return(Zi=s(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(t.isDirectory?Ji:function(e){return Xi.apply(this,arguments)})(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ji(e){var t=e.createReader();return new Promise(function(o,i){var a=[];!function r(){t.readEntries(function(){var t=s(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=13;break}return e.prev=1,e.next=4,Promise.all(a);case 4:n=e.sent,o(n),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),i(e.t0);case 11:e.next=16;break;case 13:n=Promise.all(t.map($i)),a.push(n),r();case 16:case"end":return e.stop()}},e,null,[[1,8]])}));return function(e){return t.apply(this,arguments)}}(),function(e){i(e)})}()})}function Xi(){return(Xi=s(regeneratorRuntime.mark(function e(r){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(t,n){r.file(function(e){e=Ui(e,r.fullPath);t(e)},function(e){n(e)})}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Qi(e){function l(){T&&setTimeout(function(){var e;i.current&&((e=i.current.files)&&e.length||(r({type:"closeDialog"}),"function"==typeof C&&C()))},300)}function f(e){e.target instanceof HTMLDivElement&&s.current&&s.current.contains(e.target)||(e.preventDefault(),u.current=[])}function a(e){return y?null:e}var p,d,h,c=e.accept,y=e.disabled,g=e.maxSize,m=e.minSize,o=e.multiple,v=e.onDragEnter,b=e.onDragLeave,_=e.onDragOver,w=e.onDrop,S=e.onDropAccepted,E=e.onDropRejected,C=e.onFileDialogCancel,O=e.getFilesFromEvent,x=e.preventDropOnDocument,k=e.validator,s=Object(fe.useRef)(null),i=Object(fe.useRef)(null),D=(e=ge(Object(fe.useReducer)(wi,ia),2))[0],r=e[1],e=D.isFocused,T=D.isFileDialogActive,j=D.draggedFiles,I=Object(fe.useCallback)(function(){i.current&&(r({type:"openDialog"}),i.current.value="",i.current.click())},[r]),M=(Object(fe.useEffect)(function(){return window.addEventListener("focus",l,!1),function(){window.removeEventListener("focus",l,!1)}},[i,T,C]),Object(fe.useCallback)(function(e){s.current&&s.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),I()))},[s,i])),N=Object(fe.useCallback)(function(){r({type:"focus"})},[]),A=Object(fe.useCallback)(function(){r({type:"blur"})},[]),u=Object(fe.useRef)([]),P=(Object(fe.useEffect)(function(){return x&&(document.addEventListener("dragover",bi,!1),document.addEventListener("drop",f,!1)),function(){x&&(document.removeEventListener("dragover",bi),document.removeEventListener("drop",f))}},[s,x]),Object(fe.useCallback)(function(t){t.preventDefault(),t.persist(),u.current=[].concat(H(u.current),[t.target]),vi(t)&&Promise.resolve(O(t)).then(function(e){Ni(t)||(r({draggedFiles:e,isDragActive:!0,type:"setDraggedFiles"}),v&&v(t))})},[O,v])),R=Object(fe.useCallback)(function(e){if(e.preventDefault(),e.persist(),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return vi(e)&&_&&_(e),!1},[_]),L=Object(fe.useCallback)(function(e){e.preventDefault(),e.persist();var t=u.current.filter(function(e){return s.current&&s.current.contains(e)}),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),0<(u.current=t).length||(r({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),vi(e)&&b&&b(e))},[s,b]),F=Object(fe.useCallback)(function(t){t.preventDefault(),t.persist(),u.current=[],vi(t)&&Promise.resolve(O(t)).then(function(e){var a,s;Ni(t)||(a=[],s=[],e.forEach(function(e){var t=ge(Fi(e,c),2),n=t[0],t=t[1],r=ge(Bi(e,m,g),2),o=r[0],r=r[1],i=k?k(e):null;n&&o&&!i?a.push(e):(n=[t,r],o=(n=i?n.concat(i):n).filter(function(e){return e}),s.push({file:e,errors:o}))}),r({acceptedFiles:a,fileRejections:s,type:"setFiles"}),w&&w(t,a,s),0<s.length&&E&&E(t,s),0<a.length&&S&&S(t,a))}),r({type:"reset"})},[o,c,m,g,O,w,S,E]),M=Object(fe.useMemo)(function(){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,t=void 0===t?"ref":t,n=(e.onKeyDown,e.onFocus,e.onBlur,e.onClick,e.onDragEnterCallback),r=e.onDragOverCallback,o=e.onDragLeaveCallback,i=e.onDropCallback,e=K(e,ra);return z(pe({onDragEnter:a(_i(n,P)),onDragOver:a(_i(r,R)),onDragLeave:a(_i(o,L)),onDrop:a(_i(i,F))},t,s),e)}},[s,M,N,A,P,R,L,F,y]),B=Object(fe.useCallback)(function(e){e.stopPropagation()},[]),N=Object(fe.useMemo)(function(){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,t=void 0===t?"ref":t,n=e.onChange,r=e.onClick,e=K(e,oa);return z(z({},pe({accept:c,multiple:o,type:"file",style:{display:"none"},onChange:a(_i(n,F)),onClick:a(_i(r,B)),autoComplete:"off",tabIndex:-1},t,i)),e)}},[i,c,o,F,y]),t=0<(A=j.length)&&(n=(t={accept:c,minSize:m,maxSize:g,multiple:o,files:j}).files,p=t.accept,d=t.minSize,h=t.maxSize,!(!t.multiple&&1<n.length)&&n.every(function(e){var t=ge(Fi(e,p),1)[0],e=ge(Bi(e,d,h),1)[0];return t&&e})),n=0<A&&!t,A=n?function(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize;if(!e.multiple&&1<t.length)return"TOO_MANY_FILES";e=t.every(function(e){return!ge(Fi(e,n),1)[0]}),t=t.every(function(e){return!ge(Bi(e,r,o),1)[0]});return e?"FILE_INVALID_TYPE":t?"FILE_TOO_LARGE":""}({accept:c,minSize:m,maxSize:g,multiple:o,files:j}):"";return z(z({},D),{},{isDragAccept:t,isDragReject:n,getRootProps:M,getInputProps:N,rootRef:s,inputRef:i,draggedFiles:j,fileError:A,isFocused:e&&!y,open:a(I)})}function ea(e){var t=e.accept,n=e.multiple,r=e.uploadButtonLabel,o=e.disabled,i=e.name,a=e.className,s=e.id,c=e.onChange,e=me(e),a=he(pe({},"FileUploaderButton",!0),a);return fe.createElement("div",de({},e,{className:a}),fe.createElement(xe,{type:"button",disabled:o,icon:"backup"},r),fe.createElement("input",{name:i,id:s,"data-test":"DesignSystem-FileUploaderButton--Input",accept:t&&t.join(", "),multiple:n,disabled:o,type:"file",tabIndex:-1,className:"FileUploaderButton-input",onChange:function(e){var t=e.target.files?Array.from(e.target.files):[];c&&c(t,e)}}))}function ta(e,t,n){var r=e.sortingList,e=e.updateSortingList,o=(r=H(r)).findIndex(function(e){return e.name===t});-1!==o&&(r=[].concat(H(r.slice(0,o)),H(r.slice(o+1)))),"unsort"!==n&&r.push({name:t,type:n}),e(r)}function na(e,t,n){(0,e.updateColumnSchema)(t,{pinned:"unpin"!==n?n:void 0})}var ra=["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnterCallback","onDragOverCallback","onDragLeaveCallback","onDropCallback"],oa=["refKey","onChange","onClick"],ia={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};Qi.displayName="DropzoneBase",Qi.defaultProps={disabled:!1,getFilesFromEvent:function(e){return Hi.apply(this,arguments)},maxSize:1/0,minSize:0,multiple:!0,preventDropOnDocument:!0,validator:function(){return null}},z(z({},Qi.defaultProps),{},{type:"standard"}),ea.defaultProps={uploadButtonLabel:"Upload files",disabled:!"FileUploaderFormat",multiple:!1},ea.displayName="FileUploaderButton",Object.assign({},ea.defaultProps,{title:"Upload files",sizeLabel:"Maximum size: 25 MB"});function aa(e,t){var n,r=e.ref,e=e.withCheckbox;return"string"==typeof t&&"%"===t.slice(-1)?(n=r.querySelector(".Grid-cell--checkbox"),e=e?(null==n?void 0:n.clientWidth)||28:0,(r.clientWidth-e)*(+t.slice(0,-1)/100)):t}function sa(e,t,n){var r,o=H(e),i=v(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;o[a]=z(z({},o[a]),n)}}catch(e){i.e(e)}finally{i.f()}return o}function ca(e,t){var n=z({},t);return e.translate&&(t=e.translate(t),n[e.name]=null!==t&&"object"===G(t)?z(z({},n[e.name]),t):t),null!==n[e.name]&&"object"===G(n[e.name])||(n[e.name]={title:n[e.name]}),n}function ua(e,t){return Math.ceil(e/t)}function la(e){var t,n;return e.length?(t=e.some(function(e){return!e._selected}),n=e.every(function(e){return!e._selected}),{indeterminate:e=0<=e.length&&t&&!n,checked:!e&&!n}):{indeterminate:!1,checked:!1}}function fa(e){return e&&!!e.length}function pa(e){var t=(r=fe.useContext(ma)).schema,n=r.loading,r=r.nestedRowRenderer,o=e.data,e=e.rowIndex;return r?r({data:o,schema:t,loading:n,rowIndex:e}):null}function da(e){var t=fe.useContext(ma),n=e.isHead,l=e.firstCell,r=e.schema,f=e.data,p=e.rowIndex,o=e.colIndex,d=e.expandedState,h=e.onSelectAll,y=e.onMenuChange,g=e.onFilterChange,m=e.updateColumnSchema,i=e.reorderColumn,a=t.draggable,e=t.separator,v=t.nestedRows,s=t.ref,t=t.withCheckbox,b=r.name,_=r.hidden,c=r.pinned,w=(u={AVATAR:{minWidth:48},AVATAR_WITH_TEXT:{width:256},AVATAR_WITH_META_LIST:{width:256},ICON:{minWdth:48},STATUS_HINT:{width:96},WITH_META_LIST:{width:176},DEFAULT:{width:176}}[void 0===(u=r.cellType)?"DEFAULT":u]).width,S=void 0===(S=u.minWidth)?96:S,u=void 0===(u=u.maxWidth)?800:u,l=he({"Grid-cell":!0,"Grid-cell--head":n,"Grid-cell--body":!n,"Grid-cell--separator":!l&&(void 0!==r.separator?r.separator:e),"Grid-cell--nestedRow":!n&&0===o&&v});return _?null:fe.createElement("div",{key:"".concat(p,"-").concat(o),className:l,draggable:n&&a,onDragStart:function(e){a&&(e.dataTransfer.setData("name",b),c&&e.dataTransfer.setData("type",c))},onDragOver:function(e){return e.preventDefault()},onDrop:function(e){var t;!a||(e={name:e.dataTransfer.getData("name"),type:e.dataTransfer.getData("type")}).type===(t={name:b,type:c||""}).type&&i&&i(e.name,t.name)},style:{width:aa({ref:s,withCheckbox:t},r.width||w),minWidth:aa({ref:s,withCheckbox:t},r.minWidth||S),maxWidth:aa({ref:s,withCheckbox:t},r.maxWidth||u)}},n?fe.createElement(ba,{colIndex:o,schema:r,onSelectAll:h,onMenuChange:y,onFilterChange:g,updateColumnSchema:m,reorderColumn:i}):fe.createElement(_a,{rowIndex:p,colIndex:o,data:f,schema:r,expandedState:d}))}function ha(e){function t(e,t,r){var n;return e.length?(n=he((pe(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),pe(n,"Grid-cellGroup--main",!r),n)),fe.createElement("div",{className:n},t&&f?fe.createElement("div",{className:"Grid-cell Grid-cell--head Grid-cell--checkbox"},p?fe.createElement(re,null):fe.createElement(Ce,de({},d,{onChange:o}))):null,e.map(function(e,t){var n="left"===r?t:c.length+t;return"right"===r&&(n+=u.length),fe.createElement(da,{key:"".concat(n),firstCell:!t,colIndex:n,isHead:!0,schema:e,onSelectAll:o,onMenuChange:i,onFilterChange:a,updateColumnSchema:s,reorderColumn:l})}))):null}var n=fe.useContext(ma),r=e.schema,o=e.onSelectAll,i=e.onMenuChange,a=e.onFilterChange,s=e.updateColumnSchema,l=e.reorderColumn,f=n.withCheckbox,p=n.loading,d=n.selectAll,c=(e=r.filter(function(e){return!e.hidden&&e.pinned})).filter(function(e){return!e.hidden&&"left"===e.pinned}),n=e.filter(function(e){return!e.hidden&&"right"===e.pinned}),u=r.filter(function(e){return!e.hidden&&!e.pinned});return fe.createElement("div",{className:"Grid-head","data-test":"DesignSystem-GridHead-wrapper"},fe.createElement("div",{className:"Grid-row Grid-row--head"},t(c,!!c.length,"left"),t(u,!c.length&&!!u.length),t(n,!1,"right")))}var ya=function(e,t,n){if(t===n)return e;return t<n?[].concat(H(e.slice(0,t)),H(e.slice(t+1,n+1)),[e[t]],H(e.slice(n+1))):[].concat(H(e.slice(0,n)),[e[t]],H(e.slice(n,t)),H(e.slice(t+1)))},ga=function(e){return 1<e?"s":""},Xe={showHead:!0,loaderSchema:[],schema:[],data:[],totalRecords:0,type:"data",size:"standard",page:1,pageSize:15,loading:!"FileUploaderList",error:!1,sortingList:[],filterList:{},showFilters:!0},ma=fe.createContext(z(z({},Xe),{},{ref:null})),va=ma.Provider,ba=function(e){function l(){return fe.createElement(fe.Fragment,null,fe.createElement(ye,{weight:"strong",className:"ellipsis--noWrap"},n.displayName),v&&fe.createElement("div",{className:"Grid-sortingIcons"},c?"asc"===c?fe.createElement(Q,{name:"arrow_upward"}):fe.createElement(Q,{name:"arrow_downward"}):fe.createElement(Q,{name:"unfold_more"})))}var t=fe.useContext(ma),n=e.schema,r=e.onMenuChange,f=e.onFilterChange,p=e.updateColumnSchema,d=t.loading,e=t.draggable,h=t.showMenu,o=t.sortingList,y=t.filterList,g=t.headCellTooltip,m=t.showFilters,t=t.schema,i=n.sorting,v=void 0===i||i,a=n.name,i=n.filters,b=n.pinned,t=fa(t),s=o.findIndex(function(e){return e.name===a}),c=-1!==s?o[s].type:null,_=fe.createRef(),o=[{label:"Sort Ascending",value:"sortAsc",icon:"arrow_upward"},{label:"Sort Descending",value:"sortDesc",icon:"arrow_downward"}],s=[{label:"Pin Left",value:"pinLeft",icon:"skip_previous"},{label:"Pin Right",value:"pinRight",icon:"skip_next"}],u={label:"Unpin",value:"unpin",icon:"replay"},u=("left"===b&&(s[0]=u),"right"===b&&(s[1]=u),{label:"Unsort",value:"unsort",icon:"unfold_more"}),u=("asc"===c&&(o[0]=u),"desc"===c&&(o[1]=u),[].concat(s,[{label:"Hide Column",value:"hide",icon:"cancel"}])),s=(v&&(u=[].concat(o,H(u))),he({"Grid-headCell":!0,"Grid-headCell--draggable":e})),o=i?i.map(function(t){return z(z({},t),{},{selected:y[a]&&-1!==y[a].findIndex(function(e){return e===t.value})})}):[];return fe.createElement("div",{key:a,className:s,ref:_},fe.createElement("div",{className:"Grid-cellContent","data-test":"DesignSystem-Grid-cellContent",onClick:function(){!d&&v&&("asc"===c&&r(a,"sortDesc"),"desc"===c&&r(a,"unsort"),c||r(a,"sortAsc"))}},d&&!t?fe.createElement(re,{withImage:!1},fe.createElement(ne,{length:"medium"})):fe.createElement(fe.Fragment,null,g?fe.createElement(ki,{position:"top-start",triggerClass:"w-100 overflow-hidden",tooltip:n.displayName},l()):l())),m&&i&&fe.createElement(fe.Fragment,null,d&&!t?fe.createElement("span",null,fe.createElement(re,null)):fe.createElement("div",null,fe.createElement(ae,{menu:!0,showApplyButton:!0,withCheckbox:!0,triggerOptions:{customTrigger:function(){return fe.createElement(xe,{icon:"filter_list",appearance:"transparent"})}},options:o,align:"left",onChange:function(e){return f(a,e)},minWidth:176}))),h&&fe.createElement(fe.Fragment,null,d&&!t?fe.createElement("span",{className:"ml-4"},fe.createElement(re,null)):fe.createElement("div",null,fe.createElement(ae,{key:"".concat(a,"-").concat(c,"-").concat(b),menu:!0,optionType:"WITH_ICON",triggerOptions:{customTrigger:function(){return fe.createElement(xe,{icon:"more_vert_filled",appearance:"transparent"})}},options:u,align:"left",onChange:function(e){return r(a,e)},minWidth:176}))),n.resizable&&fe.createElement("span",{className:"Grid-cellResize",onMouseDown:function(){function e(e){e.preventDefault(),i&&o(n,{width:e.pageX-i})}var t,n,r,o,i;t={updateColumnSchema:p},n=a,r=_.current,o=t.updateColumnSchema,i=null==r?void 0:r.getBoundingClientRect().x,window.addEventListener("mousemove",e),window.addEventListener("mouseup",function(){window.removeEventListener("mousemove",e)})}}))},_a=function(e){var t=fe.useContext(ma),n=e.data,r=e.schema,o=e.expandedState,i=e.rowIndex,e=e.colIndex,a=t.size,s=t.loading,t=t.nestedRows,o=ge(o,2),c=o[0],l=o[1],o={rowIndex:i,colIndex:e,size:a,schema:r,data:n,loading:s,expanded:c},u=!pa({data:n,rowIndex:i});return fe.createElement("div",{className:"Grid-cellContent"},0===e&&t&&fe.createElement(fe.Fragment,null,u?fe.createElement("span",{className:"Grid-nestedRowPlaceholder"}):fe.createElement(Q,{className:"Grid-nestedRowTrigger",name:c?"keyboard_arrow_up":"keyboard_arrow_down",size:20,appearance:"default",onClick:function(e){u||(e.stopPropagation(),l(!c))}})),r.cellRenderer?r.cellRenderer(o):fe.createElement(Aa,de({key:"".concat(i,"-").concat(e)},o)))};function wa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sa(){return(Sa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Ea(e){return(Ea=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ca(e,t){return(Ca=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oa(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};for(var n,r={},o=Object.keys(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function xa(e,t){if(!t||"object"!=typeof t&&"function"!=typeof t){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}return t}function ka(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Ea(n);return xa(this,r?(e=Ea(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function Da(e,t){var e=e.offsetTop,n=(t=t.getBoundingClientRect()).top;return 0<t.height-(e-n)}function Ta(e){function t(e,t,r){var n;return e.length?(n=he((pe(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),pe(n,"Grid-cellGroup--main",!r),n)),fe.createElement("div",{className:n,"data-test":"DesignSystem-Grid-cellGroup"},t&&d?fe.createElement("div",{className:"Grid-cell Grid-cell--body Grid-cell--checkbox",onClick:function(e){return e.stopPropagation()}},p?fe.createElement(re,null):fe.createElement(Ce,{checked:!!o._selected,onChange:function(e){h(i,e.target.checked)}})):null,e.map(function(e,t){var n="left"===r?t:s.length+t;return"right"===r&&(n+=u.length),fe.createElement(da,{key:"".concat(i,"-").concat(n),rowIndex:i,colIndex:n,firstCell:!t,schema:e,data:o,expandedState:[g,m]})}))):null}var l=(n=fe.useContext(ma)).type,f=n.onRowClick,p=n.loading,d=n.withCheckbox,n=n.nestedRows,r=e.schema,o=e.data,i=e.rowIndex,h=e.onSelect,e=e.className,y=fe.useRef(null),g=(a=ge(fe.useState(!1),2))[0],m=a[1],a=he("Grid-row","Grid-row--body",{"Grid-row--selected":o._selected}),v=fe.useCallback(function(){"resource"!==l||p||f&&f(o,i)},[o,i]),s=(c=r.filter(function(e){return!e.hidden&&e.pinned})).filter(function(e){return!e.hidden&&"left"===e.pinned}),c=c.filter(function(e){return!e.hidden&&"right"===e.pinned}),u=r.filter(function(e){return!e.hidden&&!e.pinned}),r=he(e,{"Grid-rowWrapper":!0});return fe.createElement("div",{className:r},fe.createElement("div",{className:a,onClick:v,ref:y},t(s,!!s.length,"left"),t(u,!s.length&&!!u.length),t(c,!1,"right")),n&&g&&fe.createElement("div",{className:"Grid-nestedRow"},fe.createElement(pa,{data:o,rowIndex:i})))}function ja(e){var n=(c=fe.useContext(ma)).data,l=c.ref,f=c.size,t=c.loading,r=c.error,o=c.withPagination,p=c.nestedRows,i=c.page,a=c.pageSize,s=c.totalRecords,c=c.errorTemplate;if(!t&&r)return c?"function"==typeof c?c({}):c:null;function u(e,t){return fe.createElement(Ta,{key:e,rowIndex:e,data:t||n[e],schema:d,onSelect:g})}var d=e.schema,h=e.prevPageInfo,y=e.updatePrevPageInfo,g=e.onSelect,r=(fe.useEffect(function(){var e=l.querySelector(".Grid-body");return e&&window.requestAnimationFrame(function(){h.page===i&&(e.scrollTop=h.scrollTop)}),function(){e&&y({page:i,scrollTop:e.scrollTop})}},[]),Math.ceil(s/a)),c=o&&i===r?s-(i-1)*a:t?a:o?Math.min(s,a):s;return p&&!t?fe.createElement("div",{className:"Grid-body"},n.map(function(e,t){return u(t,e)})):fe.createElement(fe.Fragment,null,fe.createElement(Fa,{className:"Grid-body",minItemHeight:{comfortable:40,standard:40,compressed:32,tight:24}[f],totalLength:c,length:20,buffer:7,renderItem:u}))}function Ia(e){var t=e.tooltip;return null!=(e=e.cellData.title)?t?fe.createElement(ki,{tooltip:e,position:"top-start",triggerClass:"w-100 overflow-hidden"},fe.createElement(ye,{className:"w-100 ellipsis"},e)):fe.createElement(ye,{className:"w-100 ellipsis"},e):null}function Ma(e){return(e=e.cellData.metaList)?fe.createElement("div",{className:"GridCell-metaList","data-test":"DesignSystem-GridCell-metaList"},e.map(function(e,t){return fe.createElement(ye,{key:t,className:"ellipsis",appearance:"subtle",size:"small"},e)})):null}function Na(e){var t=(e=e.cellData).firstName,n=e.lastName,e=e.title;return t||n?fe.createElement(k,{className:"mr-5",firstName:t,lastName:n}):e?fe.createElement(k,{className:"mr-5"},e):null}function Aa(e){var t,n,r=e.size,o=e.schema,i=e.loading,e=i?{}:ca(o,e.data),l=o.name,f=void 0===(f=o.cellType)?"DEFAULT":f,p=o.align,a=void 0===p?"left":p,s=o.tooltip,c=e[l],u=he(pe({},"GridCell",!0));switch(f){case"DEFAULT":return fe.createElement("div",{className:"".concat(u," GridCell--align-").concat(a," GridCell--default")},i?fe.createElement(ne,{length:"medium","data-test":"DesignSystem-GridCell-placeHolder"}):Ia({tooltip:s,cellData:c}));case"WITH_META_LIST":return fe.createElement("div",{className:"".concat(u," GridCell--metaList")},i?fe.createElement(fe.Fragment,null,fe.createElement(ne,{length:"medium","data-test":"DesignSystem-GridCell-withMetaList"}),fe.createElement(ne,{length:"large",size:"xxs"})):fe.createElement(fe.Fragment,null,Ia({tooltip:s,cellData:c}),Ma({cellData:c})));case"AVATAR":return i?fe.createElement(re,{className:"GridCell--align-".concat(a),imageSize:"medium",round:!0}):fe.createElement("div",{className:"".concat(u," GridCell--align-").concat(a," GridCell--avatar"),"data-test":"DesignSystem-GridCell-avatar"},"tight"!==r&&Na({cellData:c}));case"AVATAR_WITH_TEXT":return i?fe.createElement(re,{imageSize:"medium",round:!0},fe.createElement(ne,{className:"ml-3",length:"medium"})):fe.createElement("div",{className:"".concat(u," "),"data-test":"DesignSystem-GridCell-avatarWithText"},"tight"!==r&&Na({cellData:c}),Ia({tooltip:s,cellData:c}));case"AVATAR_WITH_META_LIST":return i?fe.createElement(re,{imageSize:"medium",round:!0},fe.createElement(ne,{className:"ml-3",length:"medium"}),fe.createElement(ne,{className:"ml-3",length:"large"})):fe.createElement("div",{className:"".concat(u," GridCell--avatarWithText"),"data-test":"DesignSystem-GridCell-avatarWithMetaList"},"tight"!==r&&Na({cellData:c}),fe.createElement("div",{className:"GridCell-metaListWrapper"},Ia({tooltip:s,cellData:c}),Ma({cellData:c})));case"ICON":return i?fe.createElement(re,{className:"GridCell--align-".concat(a),imageSize:"small",round:!0}):fe.createElement("div",{className:"".concat(u," GridCell--align-").concat(a," GridCell--icon"),"data-test":"DesignSystem-GridCell-icon"},(t=(t={cellData:c}).cellData,n=t.title,(t=t.icon||n)?fe.createElement(Q,{name:t}):null));case"STATUS_HINT":return fe.createElement("div",{className:"".concat(u," GridCell--align-").concat(a," GridCell--statusHint")},i?fe.createElement(re,{className:"w-75 flex-grow-0",imageSize:"small",round:!0},fe.createElement(ne,{length:"large"})):(n=(n={cellData:c}).cellData,t=n.statusAppearance,(n=n.title)?fe.createElement(jt,{appearance:t},n):null))}return null}function Pa(e){var t=e.options,n=e.onChange,r=(e=ge(fe.useState(!1),2))[0],o=e[1],i=(e=ge(fe.useState(t),2))[0],a=e[1],s=(e=ge(fe.useState("var(--spacing-8)"),2))[0],c=e[1];return fe.useEffect(function(){a(t)},[r]),fe.createElement("div",{className:"Dropdown"},fe.createElement(Ci,{open:r,onToggle:function(e){o(e)},trigger:fe.createElement(xe,{type:"button",ref:function(e){c("".concat(null==e?void 0:e.clientWidth,"px"))},size:"tiny",appearance:"transparent",icon:"keyboard_arrow_down_filled",iconAlign:"right"},"Showing ".concat(t.filter(function(e){return e.selected}).length," of ").concat(t.length," column").concat(ga(t.length))),triggerClass:"w-100",customStyle:{width:s},className:"Header-draggableDropdown"},fe.createElement("div",{className:"Dropdown-wrapper"},fe.createElement("div",{className:"OptionWrapper"},fe.createElement(Ce,{className:"OptionCheckbox",label:"Select All",checked:i.every(function(e){return e.selected}),indeterminate:i.some(function(e){return e.selected})&&i.some(function(e){return!e.selected}),onChange:function(t){a(i.map(function(e){return z(z({},e),{},{selected:t.target.checked})}))}})),i.map(function(e,r){return fe.createElement("div",{"data-test":"DesignSystem-Table-Header--draggableDropdownOption",key:e.value,className:"OptionWrapper d-flex flex-space-between align-items-center cursor-pointer",draggable:!0,onDragStart:function(e){e.dataTransfer.setData("index","".concat(r))},onDragOver:function(e){return e.preventDefault()},onDrop:function(e){e=+e.dataTransfer.getData("index");e!==r&&a(ya(i,e,r))}},fe.createElement(Ce,{className:"OptionCheckbox",name:e.value,label:e.label,checked:i[r].selected,onChange:function(e){return e=e,t=r,(n=H(i))[t]=z(z({},n[t]),{},{selected:e.target.checked}),void a(n);var t,n}}),fe.createElement(Q,{name:"drag_handle",className:"mr-4"}))})),fe.createElement("div",{className:"Dropdown-buttonWrapper"},fe.createElement(xe,{type:"button",className:"mr-4",size:"tiny",onClick:function(){o(!1)}},"Cancel"),fe.createElement(xe,{type:"button",appearance:"primary",size:"tiny",onClick:function(){o(!1),n&&n(i)}},"Apply"))))}function Ra(e){var t=e.loading,l=e.error,n=e.data,r=e.schema,f=e.withSearch,p=e.showHead,d=e.withPagination,h=e.page,y=e.pageSize,g=e.withCheckbox,m=e.children,v=e.updateSchema,b=void 0===(o=e.filterList)?{}:o,_=e.updateFilterList,o=void 0===(o=e.totalRecords)?0:o,i=e.onSelectAll,w=e.searchPlaceholder,a=e.selectAll,S=e.searchTerm,s=e.updateSearchTerm,E=e.dynamicColumn,C=e.allowSelectAll,e=e.showFilters,c=(u=ge(fe.useState(!1),2))[0],O=u[1],x=(u=ge(fe.useState(!0),2))[0],k=u[1],u=(fe.useEffect(function(){k(!x)},[r]),fe.useEffect(function(){a&&a.checked&&i&&i(!0,c)},[c]),fe.useEffect(function(){a&&!a.checked&&O(!1)},[a]),r.filter(function(e){return e.filters})),D=r.map(function(e){return{label:e.displayName,value:e.name,selected:!e.hidden}}),n=n.filter(function(e){return e._selected}).length,T=(h-1)*y+1,h=Math.min(h*y,o),y=l?"Showing 0 items":g&&n?c?"Selected all ".concat(o," item").concat(ga(o)):"Selected ".concat(n," item").concat(ga(o)," on this page"):(d?"Showing ".concat(T,"-").concat(h," of "):"Showing ").concat(o," item").concat(ga(o));return fe.createElement("div",{className:"Header"},fe.createElement("div",{className:"Header-content Header-content--top"},f&&fe.createElement("div",{className:"Header-search"},fe.createElement(ut,{"data-test":"DesignSystem-Table-Header--withSearch",name:"GridHeader-search",icon:"search",placeholder:w,onChange:function(e){e=e.target.value;s&&s(e)},value:S,onClear:function(){return s&&s("")},disabled:t&&!fa(r)})),e&&0<u.length&&fe.createElement("div",{className:"Header-dropdown"},fe.createElement("div",{className:"Header-filters"},u.map(function(e){var n=e.name,t=e.displayName,e=e.filters,e=e?e.map(function(t){return z(z({},t),{},{selected:b[n]&&-1!==b[n].findIndex(function(e){return e===t.value})})}):[];return fe.createElement(ae,{key:n,withCheckbox:!0,showApplyButton:!0,inlineLabel:t,icon:"filter_list",options:e,onChange:function(e){var t=n;t=z(z({},b),{},pe({},t,e)),_&&_(t)}})}))),m&&fe.createElement("div",{className:"Header-actions"},m)),fe.createElement("div",{className:"Header-content Header-content--bottom"},fe.createElement("div",{className:"Header-label"},!p&&g&&!t&&fe.createElement(Ce,de({},a,{onChange:function(e){i&&i(e.target.checked)}})),t?fe.createElement(re,{withImage:!p&&g},fe.createElement(ne,{length:"small",size:"s"})):fe.createElement(fe.Fragment,null,fe.createElement(Pe,null,y),d&&(null==a?void 0:a.checked)&&C&&fe.createElement("div",{className:"ml-4"},c?fe.createElement(xe,{"data-test":"DesignSystem-Table-Header--clearSelectionItemsButton",size:"tiny",onClick:function(){return O(!1)}},"Clear Selection"):fe.createElement(xe,{"data-test":"DesignSystem-Table-Header--selectAllItemsButton",size:"tiny",onClick:function(){return O(!0)}},"Select all ".concat(o," items"))))),E&&fe.createElement("div",{className:"Header-hideColumns"},fe.createElement(Pa,{options:D,onChange:function(e){e=e.map(function(t){return z(z({},r.find(function(e){return e.name===t.value})),{},{hidden:!t.selected})});v&&v(e)}}))))}var La=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ca(t,e);var n,r=ka(o);function o(e){var t;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");return(t=r.call(this,e)).state={offset:e.offset},t.lastScrollTop=0,t.avgRowHeight=e.minItemHeight,t}return t=o,(e=[{key:"componentDidMount",value:function(){var e=this;window.requestAnimationFrame(function(){e.listRef&&(e.listRef.scrollTop=e.state.offset*e.avgRowHeight)})}},{key:"componentDidUpdate",value:function(e,t){t.offset>this.state.offset&&this.updateOffset(t)}},{key:"updateOffset",value:function(e){var t=e.offset-this.state.offset;if(this.listRef){for(var n=this.listRef,r=n.querySelectorAll(".VS-item"),o=0,i=e.offset,a=Math.min(this.state.offset,this.props.buffer),t=a+t,s=Math.min(r.length,t)-1;a<=s;s--){if(!Da(n,r[s]))break;i--,o+=r[s].clientHeight}r.length<t&&(o+=(t=t-r.length)*this.props.minItemHeight,i-=t);t=0===i?this.props.minItemHeight:(this.avgRowHeight*e.offset-o)/i;this.setState({offset:i}),this.avgRowHeight=Math.max(this.props.minItemHeight,t)}}},{key:"onScrollHandler",value:function(l){if(this.listRef){var e=this.props,t=e.totalLength,f=e.length,e=e.buffer,n=this.state.offset,r=this.avgRowHeight,o=this.listRef,p=o.scrollTop,i=Math.floor(p-this.lastScrollTop);if(0===i)return;var a=o.querySelectorAll(".VS-item"),s=n,d=Math.min(n,e);if(0<i){if(n<t-f){for(var c=0,u=d;u<a.length;u++){var h=Da(o,a[u]),y=a[u].clientHeight;if(h)break;c+=y,s++}c<i&&(s+=i=Math.floor((i-c)/this.props.minItemHeight),c+=i*this.props.minItemHeight),i=0<s?(n*r+c)/s:this.props.minItemHeight,this.setState({offset:Math.min(s,t-f)}),this.avgRowHeight=Math.max(this.props.minItemHeight,i)}}else{r=a[d].getBoundingClientRect().y-o.getBoundingClientRect().y;0<r&&((i=n-(Math.floor(r/this.props.minItemHeight)||1))<t-(f+e)&&this.setState({offset:Math.max(0,i)}))}this.lastScrollTop=p}this.props.onScroll&&this.props.onScroll(l)}},{key:"renderItems",value:function(r,e){var o=this.props.renderItem;return Array.from({length:e-r+1},function(e,t){var t=r+t,n=o(t);return fe.cloneElement(n,{key:t,className:["VS-item",n.props.className].join(" ").trim()})})}},{key:"render",value:function(){var t=this,e=this.props,n=e.totalLength,r=e.length,o=e.buffer,i=(e.offset,e.renderItems,e.minItemHeight,e.forwardRef),e=Oa(e,["totalLength","length","buffer","offset","renderItems","minItemHeight","forwardRef"]),a=this.state,s=a.init,a=a.offset,c=this.avgRowHeight,u=Math.max(0,a-o),a=Math.min(a+(r+o)-1,n-1),r=Math.max(0,u*c),o=Math.max(0,(n-a-1)*c);return fe.createElement("div",Sa({},e,{ref:function(e){t.listRef=e,i&&(i.current=e),s||t.setState({init:!0})},onScroll:this.onScrollHandler.bind(this)}),s&&fe.createElement(fe.Fragment,null,fe.createElement("div",{style:{flexShrink:0,height:r}}),this.renderItems(u,a),fe.createElement("div",{style:{flexShrink:0,height:o}})))}}])&&wa(t.prototype,e),n&&wa(t,n),o}(fe.Component),Fa=(kt={buffer:10,length:30,offset:0},(t="defaultProps")in(e=La)?Object.defineProperty(e,t,{value:kt,enumerable:!0,configurable:!0,writable:!0}):e[t]=kt,fe.forwardRef(function(e,t){return fe.createElement(La,Sa({key:e.totalLength,forwardRef:t},e))})),Ba=(Ta.defaultProps={data:{}},function(){h(n,fe["Component"]);var t=y(n);function n(e){var i;d(this,n),pe(V(i=t.call(this,e)),"gridRef",null),pe(V(i),"isHeadSyncing",!1),pe(V(i),"isBodySyncing",!1),pe(V(i),"syncScroll",function(n){return function(){var e=i.gridRef.querySelector(".Grid-head"),t=i.gridRef.querySelector(".Grid-body");"head"===n&&(i.isHeadSyncing||(i.isBodySyncing=!0,t.scrollLeft=e.scrollLeft),i.isHeadSyncing=!1),"body"===n&&(i.isBodySyncing||(i.isHeadSyncing=!0,e.scrollLeft=t.scrollLeft),i.isBodySyncing=!1)}}),pe(V(i),"updateRenderedSchema",function(e){var t=i.props.updateSchema;t&&t(e)}),pe(V(i),"updateColumnSchema",function(t,e){var n=H(i.props.schema),r=n.findIndex(function(e){return e.name===t});n[r]=z(z({},n[r]),e),i.updateRenderedSchema(n)}),pe(V(i),"reorderColumn",function(t,n){var e=i.props.schema,r=e.findIndex(function(e){return e.name===t}),o=e.findIndex(function(e){return e.name===n}),e=ya(e,r,o);i.updateRenderedSchema(e)}),pe(V(i),"updateSortingList",function(e){var t=i.props.updateSortingList;t&&t(e)}),pe(V(i),"updateFilterList",function(e){var t=i.props.updateFilterList;t&&t(e)}),pe(V(i),"onMenuChange",function(e,t){var n,r,o=i.props.sortingList;switch(t){case"sortAsc":ta({sortingList:o,updateSortingList:i.updateSortingList},e,"asc");break;case"sortDesc":ta({sortingList:o,updateSortingList:i.updateSortingList},e,"desc");break;case"unsort":ta({sortingList:o,updateSortingList:i.updateSortingList},e,"unsort");break;case"pinLeft":na({updateColumnSchema:i.updateColumnSchema},e,"left");break;case"pinRight":na({updateColumnSchema:i.updateColumnSchema},e,"right");break;case"unpin":na({updateColumnSchema:i.updateColumnSchema},e,"unpin");break;case"hide":n={updateColumnSchema:i.updateColumnSchema},r=!0,(0,n.updateColumnSchema)(e,{hidden:r})}}),pe(V(i),"onFilterChange",function(e,t){e=z(z({},i.props.filterList),{},pe({},e,t));i.updateFilterList(e)}),pe(V(i),"onSelect",function(e,t){var n=i.props.onSelect;n&&n(e,t)}),pe(V(i),"onSelectAll",function(e){var t=i.props.onSelectAll;t&&t(e.target.checked)}),pe(V(i),"updatePrevPageInfo",function(e){i.setState({prevPageInfo:e})});return i.state={init:!1,prevPageInfo:{page:1,scrollTop:0}},i}return a(n,[{key:"componentDidMount",value:function(){this.setState({init:!0}),window.addEventListener("resize",this.forceRerender.bind(this))}},{key:"forceRerender",value:function(){this.forceUpdate()}},{key:"componentWillUnmount",value:function(){this.removeScrollListeners(),window.removeEventListener("resize",this.forceRerender.bind(this))}},{key:"componentDidUpdate",value:function(e,t){t.init!==this.state.init&&this.addScrollListeners(),e.page===this.props.page&&e.error===this.props.error||(this.removeScrollListeners(),this.addScrollListeners())}},{key:"addScrollListeners",value:function(){var e=this.gridRef.querySelector(".Grid-head"),t=this.gridRef.querySelector(".Grid-body");e&&t&&(e.addEventListener("scroll",this.syncScroll("head")),t.addEventListener("scroll",this.syncScroll("body")))}},{key:"removeScrollListeners",value:function(){var e=this.gridRef.querySelector(".Grid-head"),t=this.gridRef.querySelector(".Grid-body");e&&t&&(e.removeEventListener("scroll",this.syncScroll("head")),t.removeEventListener("scroll",this.syncScroll("body")))}},{key:"render",value:function(){var t=this,e=me(this.props),n=this.state,r=n.init,n=n.prevPageInfo,o=this.props,i=o.type,a=o.size,s=o.showHead,l=o.className,f=o.page,c=o.loading,o=o.loaderSchema,c=(u=this.props.schema,c=c,o=o,u=!fa(u=u)&&c?o:u),u=he((pe(o={Grid:"true"},"Grid--".concat(i),i),pe(o,"Grid--".concat(a),a),o),l);return fe.createElement("div",de({className:u},e,{ref:function(e){t.gridRef=e}}),r&&fe.createElement(va,{value:z(z({},this.props),{},{ref:this.gridRef})},s&&fe.createElement(ha,{schema:c,onSelectAll:null===(i=this.onSelectAll)||void 0===i?void 0:i.bind(this),onMenuChange:this.onMenuChange.bind(this),onFilterChange:this.onFilterChange.bind(this),updateColumnSchema:this.updateColumnSchema.bind(this),reorderColumn:this.reorderColumn.bind(this)}),fe.createElement(ja,{key:"".concat(f),schema:c,prevPageInfo:n,updatePrevPageInfo:this.updatePrevPageInfo.bind(this),onSelect:this.onSelect.bind(this)})))}}]),n}()),za=(pe(Ba,"defaultProps",void 0),Ba.defaultProps=Xe,Aa.displayName="GridCell",["children"]),n={type:"data",size:"standard",showHead:!0,showMenu:!0,multipleSorting:!0,headerOptions:{},withPagination:!0,paginationType:"jump",page:1,pageSize:15,draggable:!0,data:[],schema:[],loading:!(Ra.defaultProps={schema:[],data:[],searchPlaceholder:"Search",dynamicColumn:!0,showFilters:!0}),error:!1,loaderSchema:[],sortingList:[],filterList:{},filterPosition:"GRID",searchDebounceDuration:750,errorTemplate:function(e){e=e.errorType;return fe.createElement(at,null,{FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No results found"}[void 0===e?"DEFAULT":e])}},Dn=function(){h(i,fe["Component"]);var o=y(i);function i(e){d(this,i),pe(V(l=o.call(this,e)),"debounceUpdate",void 0),pe(V(l),"updateData",function(e){l.state.async&&l.setState({loading:!0}),e?l.debounceUpdate():l.updateDataFn()}),pe(V(l),"updateDataFn",function(){var e=l.props,t=e.fetchData,n=e.pageSize,r=e.withPagination,o=e.data,e=e.onSearch,i=l.state,a=i.async,s=i.page,c=i.sortingList,u=i.filterList,i=i.searchTerm,i=(l.onSelect(-1,!1),{page:s,pageSize:n,sortingList:c,filterList:u,searchTerm:i});l.props.withPagination||(delete i.page,delete i.pageSize),a?t&&t(i).then(function(e){var t,n;(!e.searchTerm||e.searchTerm&&e.searchTerm===l.state.searchTerm)&&(t=e.data,n=(l.state.schema.length?l.state:e).schema,l.setState({data:t,schema:n,selectAll:la(t),totalRecords:e.count,loading:!1,error:!t.length,errorType:"NO_RECORDS_FOUND"}))}).catch(function(){l.setState({loading:!1,error:!0,errorType:"FAILED_TO_FETCH"})}):(t=function(){var o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],i=2<arguments.length?arguments[2]:void 0,a=e;return i&&Object.keys(i).forEach(function(t){var n=i[t],e=o.findIndex(function(e){return e.name===t}),r=o[e].onFilterChange;n.length&&r&&(a=a.filter(function(e){return r(e,n)}))}),a}(a=l.state.schema,o,u),u=(o=function(){var o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],t=2<arguments.length?arguments[2]:void 0,i=H(e);return null!=t&&t.forEach(function(n){var e,r=o.findIndex(function(e){return e.name===n.name});-1!==r&&(e=o[r].comparator,i.sort(void 0===e?function(e,t){e=ca(o[r],e),t=ca(o[r],t);return e[n.name].title.localeCompare(t[n.name].title)}:e),"desc"===n.type&&i.reverse())}),i}(a,e&&void 0!==i.searchTerm?e(t,i.searchTerm):t,c)).length,r&&s&&n&&(o=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=1<arguments.length?arguments[1]:void 0,n=2<arguments.length?arguments[2]:void 0,t=(t-1)*n;return e.slice(t,t+n)}(o,s,n)),e=l.state.schema.length?l.state.schema:a,l.setState({totalRecords:u,error:!o.length,errorType:"NO_RECORDS_FOUND",selectAll:la(o),schema:e,data:o}))}),pe(V(l),"onSelect",function(e,t){var n=l.state.data,r=l.props.onSelect,o=[e],i=n;0<=e&&(i=sa(n,o,{_selected:t}),l.setState({data:i,selectAll:la(i)})),r&&r(o,t,-1===e?[]:i.filter(function(e){return e._selected}))}),pe(V(l),"onSelectAll",function(e,t){var n=l.props.onSelect,r=l.state.data,o=Array.from({length:r.length},function(e,t){return t}),r=sa(r,o,{_selected:e});n&&n(o,e,r.filter(function(e){return e._selected}),t),l.setState({data:r,selectAll:la(r)})}),pe(V(l),"onPageChange",function(e){l.setState({page:e})}),pe(V(l),"updateSchema",function(e){l.setState({schema:e})}),pe(V(l),"updateSortingList",function(e){var t=l.props.multipleSorting;l.setState({sortingList:t?H(e):e.slice(-1),page:1})}),pe(V(l),"updateFilterList",function(e){l.setState({filterList:e,page:1})}),pe(V(l),"updateSearchTerm",function(e){l.setState({searchTerm:e,page:1})});var l,t="fetchData"in l.props,n=e.data||[],r=e.schema||[];return l.state={async:t,data:t?[]:n,schema:t?[]:r,page:e.page,sortingList:e.sortingList,filterList:e.filterList,totalRecords:t?0:n.length,loading:t||e.loading,error:!t&&e.error,errorType:e.errorType,selectAll:la([]),searchTerm:void 0},l.debounceUpdate=I(e.searchDebounceDuration,l.updateDataFn),l}return a(i,[{key:"componentDidMount",value:function(){this.updateData()}},{key:"componentDidUpdate",value:function(e,t){var n,r=this;this.state.async||e.loading===this.props.loading&&e.error===this.props.error||(n=(e=this.props).data,e=e.schema,this.setState({data:n=void 0===n?[]:n,schema:void 0===e?[]:e,loading:this.props.loading||!1,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:n.length||0,selectAll:la([])},function(){r.updateData()})),t.page===this.state.page||(e=this.props.onPageChange)&&e(this.state.page),t.page===this.state.page&&t.filterList===this.state.filterList&&t.sortingList===this.state.sortingList&&t.searchTerm===this.state.searchTerm||this.props.loading||(n=t.searchTerm!==this.state.searchTerm,this.updateData(n))}},{key:"render",value:function(){var e=this.props,t=e.showHead,l=e.type,f=e.size,p=e.headCellTooltip,d=e.separator,h=e.draggable,y=e.nestedRows,g=e.nestedRowRenderer,m=e.withHeader,n=e.headerOptions,r=e.withCheckbox,v=e.showMenu,o=e.withPagination,b=e.paginationType,i=e.pageSize,_=e.onRowClick,w=e.loaderSchema,a=e.errorTemplate,s=e.className,e=e.filterPosition,S=me(this.props),E=n.children,n=K(n,za),s=s?" ".concat(s):"",c=this.state.totalRecords,u=ua(c,i);return fe.createElement("div",de({},S,{className:"Table".concat(s),"data-test":"DesignSystem-Table-wrapper"}),m&&fe.createElement("div",{className:"Table-header","data-test":"DesignSystem-Table-header"},fe.createElement(Ra,de({},this.state,{updateSchema:this.updateSchema,updateFilterList:this.updateFilterList,updateSearchTerm:this.updateSearchTerm,showHead:t,onSelectAll:this.onSelectAll,withCheckbox:r,withPagination:o,pageSize:i,showFilters:"HEADER"===e},n),E)),fe.createElement("div",{className:"Table-grid"},fe.createElement(Ba,de({},this.state,{key:this.state.searchTerm,updateData:this.updateData,updateSchema:this.updateSchema,updateSortingList:this.updateSortingList,updateFilterList:this.updateFilterList,withCheckbox:r,onSelect:this.onSelect,onSelectAll:this.onSelectAll,showMenu:v,showHead:t,type:l,size:f,headCellTooltip:p,separator:d,draggable:h,nestedRows:y,nestedRowRenderer:g,withPagination:o&&1<u,pageSize:i,loaderSchema:w,errorTemplate:a&&a({errorType:this.state.errorType}),onRowClick:_,showFilters:"GRID"===e}))),o&&!this.state.loading&&!this.state.error&&1<u&&fe.createElement("div",{className:"Table-pagination"},fe.createElement(hi,{page:this.state.page,totalPages:ua(c,i),type:b,onPageChange:this.onPageChange})))}}]),i}();pe(Dn,"defaultProps",n),fe.useState,fe.useEffect,fe.useState}.call(this,Ha(23))},function(e,t,n){function o(e){if(s[e])return s[e].exports;var t=s[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var r,i,a,s;window,e.exports=(r=n(2),i=n(24),s={},o.m=a=[function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t,n){e.exports=n(3)},function(n,e,t){"use strict";t.r(e);var u=t(0),o=t(1);function l(e){var t=e.getSelection(),e=e.getCurrentContent(),n=t.getStartKey(),r=t.getEndKey(),t=e.getBlockMap();return t.toSeq().skipUntil(function(e,t){return t===n}).takeUntil(function(e,t){return t===r}).concat([[r,t.get(r)]])}function f(e){return l(e).toList()}function c(e){if(e)return f(e).get(0)}function r(e){if(e){var n=c(e),e=e.getCurrentContent().getBlockMap().toSeq().toList(),r=0;if(e.forEach(function(e,t){e.get("key")===n.get("key")&&(r=t-1)}),-1<r)return e.get(r)}}function p(e){return e?e.getCurrentContent().getBlockMap().toList():new o.List}function d(e){var t=f(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function i(e){var t=u.RichUtils.tryToRemoveBlockStyle(e);return t?u.EditorState.push(e,t,"change-block-type"):e}function h(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),o=n.getFocusOffset(),i=f(e);if(0<i.size){n.getIsBackward()&&(e=r,r=o,o=e);for(var a=0;a<i.size;a+=1){var s=0===a?r:0,c=a===i.size-1?o:i.get(a).getText().length;t+=i.get(a).getText().slice(s,c)}}return t}function y(e){var t=e.getCurrentContent(),n=e.getSelection(),n=(t=u.Modifier.removeRange(t,n,"forward")).getSelectionAfter(),r=t.getBlockForKey(n.getStartKey()),t=u.Modifier.insertText(t,n,"\n",r.getInlineStyleAt(n.getStartOffset()),null);return u.EditorState.push(e,t,"insert-fragment")}function g(e){var t=u.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return i(u.EditorState.push(e,t,"split-block"))}function m(e){var t=e.getCurrentContent().getBlockMap().toList(),t=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),t=u.Modifier.removeRange(e.getCurrentContent(),t,"forward");return u.EditorState.push(e,t,"remove-range")}function v(e,t){t=u.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return u.EditorState.push(e,t,"change-block-data")}function b(e){var r=new o.Map({}),t=f(e);if(t&&0<t.size)for(var n=0;n<t.size&&"break"!==function(e){var n=t.get(e).getData();if(!n||0===n.size)return r=r.clear(),"break";if(0===e)r=n;else if(r.forEach(function(e,t){n.get(t)&&n.get(t)===e||(r=r.delete(t))}),0===r.size)return r=r.clear(),"break"}(n);n+=1);return r}var _=Object(o.Map)({code:{element:"pre"}}),w=u.DefaultDraftBlockRenderMap.merge(_);function S(e){return!!e&&("unordered-list-item"===(e=e.getType())||"ordered-list-item"===e)}function E(e,t,n){var r=e.getSelection(),r=r.getIsBackward()?r.getFocusKey():r.getAnchorKey(),o=e.getCurrentContent(),i=o.getBlockForKey(r),a=i.getType();if("unordered-list-item"!==a&&"ordered-list-item"!==a)return e;o=o.getBlockBefore(r);if(!o)return e;if(o.getType()!==a)return e;r=i.getDepth();if(1===t&&r===n)return e;var s,c,a=Math.min(o.getDepth()+1,n),a=(s=t,c=a,r=(i=e).getSelection(),n=(o=i.getCurrentContent()).getBlockMap(),t=l(i).map(function(e){var t=e.getDepth()+s,t=Math.max(0,Math.min(t,c));return e.set("depth",t)}),n=n.merge(t),o.merge({blockMap:n,selectionBefore:r,selectionAfter:r}));return u.EditorState.push(e,a,"adjust-depth")}function C(e,t){if(13===(t=t).which&&(t.getModifierState("Shift")||t.getModifierState("Alt")||t.getModifierState("Control")))return e.getSelection().isCollapsed()?u.RichUtils.insertSoftNewline(e):y(e);var n,r,t=e,e=t.getSelection();return e.isCollapsed()?(n=t.getCurrentContent(),r=e.getStartKey(),S(n=n.getBlockForKey(r))||"unstyled"===n.getType()||n.getLength()!==e.getStartOffset()?S(n)&&0===n.getLength()?0===(r=n.getDepth())?i(t):0<r?E(t,-1,r):void 0:void 0:g(t)):void 0}function O(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function D(e){var t=e.getSelection();if(t.isCollapsed()){var n={},r=e.getCurrentInlineStyle().toList().toJS();if(r)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=0<=r.indexOf(e)}),n}var i=t.getStartOffset(),a=t.getEndOffset(),s=f(e);if(0<s.size){t=function(){for(var n={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},r=0;r<s.size;r+=1){var e=0===r?i:0,t=r===s.size-1?a:s.get(r).getText().length;e===t&&0===e?(e=1,t=2):e===t&&--e;for(var o=e;o<t;o+=1)!function(e){var t=s.get(r).getInlineStyleAt(e);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=n[e]&&t.get(e)===e})}(o)}return{v:n}}();if("object"===k(t))return t.v}return{}}function T(e){var t,n=e.getSelection(),r=n.getStartOffset(),o=n.getEndOffset();r===o&&0===r?o=1:r===o&&--r;for(var i=c(e),a=r;a<o;a+=1){var s=i.getEntityAt(a);if(!s){t=void 0;break}if(a===r)t=s;else if(t!==s){t=void 0;break}}return t}function j(e,t){var n,r=c(e);return r.findEntityRanges(function(e){return e.get("entity")===t},function(e,t){n={start:e,end:t,text:r.get("text").slice(e,t)}}),n}function a(e,t,n){s[e]["".concat(e.toLowerCase(),"-").concat(n)]=x({},"".concat(t),n)}function I(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?O(Object(n),!0).forEach(function(e){x(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},s.color,{},s.bgcolor,{},s.fontSize,{},s.fontFamily,{CODE:s.CODE,SUPERSCRIPT:s.SUPERSCRIPT,SUBSCRIPT:s.SUBSCRIPT})}var s={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function M(e,t,n){var r=e.getSelection(),o=Object.keys(s[t]).reduce(function(e,t){return u.Modifier.removeInlineStyle(e,r,t)},e.getCurrentContent()),o=u.EditorState.push(e,o,"changeinline-style"),e=e.getCurrentInlineStyle();return r.isCollapsed()&&(o=e.reduce(function(e,t){return u.RichUtils.toggleInlineStyle(e,t)},o)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t?e.has(n)||(o=u.RichUtils.toggleInlineStyle(o,n)):e.has("".concat(e="bgcolor"===t?"backgroundColor":t,"-").concat(n))||(o=u.RichUtils.toggleInlineStyle(o,"".concat(t.toLowerCase(),"-").concat(n)),a(t,e,n)),o}function N(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?a("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?a("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?a("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&a("fontFamily","fontFamily",e.substr(11))})}function A(e,t,n){e=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(e&&0<e.size)return e.get(0)}function P(n,c){if(n&&c&&0<c.length){var e=function(){var e=n.getSelection(),o={};if(e.isCollapsed())return c.forEach(function(e){o[e]=function(t){var e=n.getCurrentInlineStyle().toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(e&&0<e.size)return e.get(0)}(e)}),{v:o};var i=e.getStartOffset(),a=e.getEndOffset(),s=f(n);if(0<s.size){for(var t=0;t<s.size;t+=1)!function(n){var e=0===n?i:0,t=n===s.size-1?a:s.get(n).getText().length;e===t&&0===e?(e=1,t=2):e===t&&--e;for(var r=e;r<t;r+=1)!function(t){t===e?c.forEach(function(e){o[e]=A(s.get(n),e,t)}):c.forEach(function(e){o[e]&&o[e]!==A(s.get(n),e,t)&&(o[e]=void 0)})}(r)}(t);return{v:o}}}();if("object"===k(e))return e.v}return{}}function R(t){var e=t.getCurrentInlineStyle(),n=t.getCurrentContent();return e.forEach(function(e){n=u.Modifier.removeInlineStyle(n,t.getSelection(),e)}),u.EditorState.push(t,n,"change-inline-style")}t.d(e,"isListBlock",function(){return S}),t.d(e,"changeDepth",function(){return E}),t.d(e,"handleNewLine",function(){return C}),t.d(e,"getEntityRange",function(){return j}),t.d(e,"getCustomStyleMap",function(){return I}),t.d(e,"toggleCustomInlineStyle",function(){return M}),t.d(e,"getSelectionEntity",function(){return T}),t.d(e,"extractInlineStyle",function(){return N}),t.d(e,"removeAllInlineStyles",function(){return R}),t.d(e,"getSelectionInlineStyle",function(){return D}),t.d(e,"getSelectionCustomInlineStyle",function(){return P}),t.d(e,"getSelectedBlocksMap",function(){return l}),t.d(e,"getSelectedBlocksList",function(){return f}),t.d(e,"getSelectedBlock",function(){return c}),t.d(e,"getBlockBeforeSelectedBlock",function(){return r}),t.d(e,"getAllBlocks",function(){return p}),t.d(e,"getSelectedBlocksType",function(){return d}),t.d(e,"removeSelectedBlocksStyle",function(){return i}),t.d(e,"getSelectionText",function(){return h}),t.d(e,"addLineBreakRemovingSelection",function(){return y}),t.d(e,"insertNewUnstyledBlock",function(){return g}),t.d(e,"clearEditorContent",function(){return m}),t.d(e,"setBlockData",function(){return v}),t.d(e,"getSelectedBlocksMetadata",function(){return b}),t.d(e,"blockRenderMap",function(){return w})}],o.c=s,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2))},function(e,t,n){var r;
|
|
38
|
+
*/function l(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Co:switch(e=e.type){case Io:case Mo:case xo:case Do:case ko:case Ao:return e;default:switch(e=e&&e.$$typeof){case jo:case No:case Lo:case Ro:case To:return e;default:return t}}case Oo:return t}}}function Ho(e){return l(e)===Mo}var Uo={AsyncMode:Io,ConcurrentMode:Mo,ContextConsumer:jo,ContextProvider:To,Element:Co,ForwardRef:No,Fragment:xo,Lazy:Lo,Memo:Ro,Portal:Oo,Profiler:Do,StrictMode:ko,Suspense:Ao,isAsyncMode:function(e){return Ho(e)||l(e)===Io},isConcurrentMode:Ho,isContextConsumer:function(e){return l(e)===jo},isContextProvider:function(e){return l(e)===To},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Co},isForwardRef:function(e){return l(e)===No},isFragment:function(e){return l(e)===xo},isLazy:function(e){return l(e)===Lo},isMemo:function(e){return l(e)===Ro},isPortal:function(e){return l(e)===Oo},isProfiler:function(e){return l(e)===Do},isStrictMode:function(e){return l(e)===ko},isSuspense:function(e){return l(e)===Ao},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===xo||e===Mo||e===Do||e===ko||e===Ao||e===Po||"object"==typeof e&&null!==e&&(e.$$typeof===Lo||e.$$typeof===Ro||e.$$typeof===To||e.$$typeof===jo||e.$$typeof===No||e.$$typeof===Bo||e.$$typeof===zo||e.$$typeof===Ko||e.$$typeof===Fo)},typeOf:l},o=t(function(e,t){});o.AsyncMode,o.ConcurrentMode,o.ContextConsumer,o.ContextProvider,o.Element,o.ForwardRef,o.Fragment,o.Lazy,o.Memo,o.Portal,o.Profiler,o.StrictMode,o.Suspense,o.isAsyncMode,o.isConcurrentMode,o.isContextConsumer,o.isContextProvider,o.isElement,o.isForwardRef,o.isFragment,o.isLazy,o.isMemo,o.isPortal,o.isProfiler,o.isStrictMode,o.isSuspense,o.isValidElementType,o.typeOf,t(function(e){e.exports=Uo}),Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;!function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},r)).join("")?void 0:1}catch(e){return}}()||Object.assign;function qo(){}function Wo(){}Function.call.bind(Object.prototype.hasOwnProperty),Wo.resetWarningCache=qo;function Vo(){return F[Zo]=(F[Zo]||0)+1}function Go(e){return Array.isArray(e)?e[0]:e}function Yo(e,t){if("function"==typeof e)return ni(e,t);null!=e&&(e.current=t)}var $o=t(function(e){function t(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i)throw i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"),i.name="Invariant Violation",i}function n(){return t}e.exports=(e={array:t.isRequired=t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:Wo,resetWarningCache:qo}).PropTypes=e}),Zo="__global_unique_id__",Jo=function(){},Xo=t(function(e,t){t.__esModule=!0,n(v.a);var l=n($o),f=n(Vo);function n(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}n(Jo);var y=1073741823;t.default=function(e,a){var t,s,n="__create-react-context-"+(0,f.default)()+"__",r=(h(c,s=v.a.Component),c.prototype.getChildContext=function(){var e={};return e[n]=this.emitter,e},c.prototype.componentWillReceiveProps=function(e){var t,n,r,o,i;this.props.value!==e.value&&(t=this.props.value,n=e.value,r=void 0,((o=t)===(i=n)?0===o&&1/o!=1/i:o==o||i==i)&&(r="function"==typeof a?a(t,n):y,0!==(r|=0)&&this.emitter.set(e.value,r)))},c.prototype.render=function(){return this.props.children},c);function c(){var e,t;p(this,c);for(var n,r,o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return(e=t=d(this,s.call.apply(s,[this].concat(i)))).emitter=(n=t.props.value,r=[],{on:function(e){r.push(e)},off:function(t){r=r.filter(function(e){return e!==t})},get:function(){return n},set:function(e,t){n=e,r.forEach(function(e){return e(n,t)})}}),d(t,e)}r.childContextTypes=((o={})[n]=l.default.object.isRequired,o),h(u,i=v.a.Component),u.prototype.componentWillReceiveProps=function(e){e=e.observedBits;this.observedBits=null==e?y:e},u.prototype.componentDidMount=function(){this.context[n]&&this.context[n].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?y:e},u.prototype.componentWillUnmount=function(){this.context[n]&&this.context[n].off(this.onUpdate)},u.prototype.getValue=function(){return this.context[n]?this.context[n].get():e},u.prototype.render=function(){return e=this.props.children,(Array.isArray(e)?e[0]:e)(this.state.value);var e};var i,o=u;function u(){var e,n;p(this,u);for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n=d(this,i.call.apply(i,[this].concat(r)))).state={value:n.getValue()},n.onUpdate=function(e,t){0!=((0|n.observedBits)&t)&&n.setState({value:n.getValue()})},d(n,e)}return o.contextTypes=((t={})[n]=l.default.object,t),{Provider:r,Consumer:o}},e.exports=t.default}),p=(B(Xo),t(function(e,t){t.__esModule=!0;var n=o(v.a),r=o(Xo);function o(e){return e&&e.__esModule?e:{default:e}}t.default=n.default.createContext||r.default,e.exports=t.default})),c=B(p),Qo=c(),ei=c(),ti=function(o){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t=o.call.apply(o,[this].concat(n))||this,s(i(i(t)),"referenceNode",void 0),s(i(i(t)),"setReferenceNode",function(e){e&&t.referenceNode!==e&&(t.referenceNode=e,t.forceUpdate())}),t}nn(e,o);var t=e.prototype;return t.componentWillUnmount=function(){this.referenceNode=null},t.render=function(){return fe.createElement(Qo.Provider,{value:this.referenceNode},fe.createElement(ei.Provider,{value:this.setReferenceNode},this.props.children))},e}(fe.Component),ni=function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}},ri={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},oi={},ii=function(o){function e(){for(var n,e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n=o.call.apply(o,[this].concat(t))||this,s(i(i(n)),"state",{data:void 0,placement:void 0}),s(i(i(n)),"popperInstance",void 0),s(i(i(n)),"popperNode",null),s(i(i(n)),"arrowNode",null),s(i(i(n)),"setPopperNode",function(e){e&&n.popperNode!==e&&(Yo(n.props.innerRef,e),n.popperNode=e,n.updatePopperInstance())}),s(i(i(n)),"setArrowNode",function(e){n.arrowNode=e}),s(i(i(n)),"updateStateModifier",{enabled:!0,order:900,fn:function(e){var t=e.placement;return n.setState({data:e,placement:t}),e}}),s(i(i(n)),"getOptions",function(){return{placement:n.props.placement,eventsEnabled:n.props.eventsEnabled,positionFixed:n.props.positionFixed,modifiers:en({},n.props.modifiers,{arrow:en({},n.props.modifiers&&n.props.modifiers.arrow,{enabled:!!n.arrowNode,element:n.arrowNode}),applyStyle:{enabled:!1},updateStateModifier:n.updateStateModifier})}}),s(i(i(n)),"getPopperStyle",function(){return n.popperNode&&n.state.data?en({position:n.state.data.offsets.popper.position},n.state.data.styles):ri}),s(i(i(n)),"getPopperPlacement",function(){return n.state.data?n.state.placement:void 0}),s(i(i(n)),"getArrowStyle",function(){return n.arrowNode&&n.state.data?n.state.data.arrowStyles:oi}),s(i(i(n)),"getOutOfBoundariesState",function(){return n.state.data?n.state.data.hide:void 0}),s(i(i(n)),"destroyPopperInstance",function(){n.popperInstance&&(n.popperInstance.destroy(),n.popperInstance=null)}),s(i(i(n)),"updatePopperInstance",function(){n.destroyPopperInstance();var e=i(i(n)).popperNode,t=n.props.referenceElement;t&&e&&(n.popperInstance=new Eo(t,e,n.getOptions()))}),s(i(i(n)),"scheduleUpdate",function(){n.popperInstance&&n.popperInstance.scheduleUpdate()}),n}nn(e,o);var t=e.prototype;return t.componentDidUpdate=function(e,t){this.props.placement===e.placement&&this.props.referenceElement===e.referenceElement&&this.props.positionFixed===e.positionFixed&&xr(this.props.modifiers,e.modifiers,{strict:!0})?this.props.eventsEnabled!==e.eventsEnabled&&this.popperInstance&&(this.props.eventsEnabled?this.popperInstance.enableEventListeners():this.popperInstance.disableEventListeners()):this.updatePopperInstance(),t.placement!==this.state.placement&&this.scheduleUpdate()},t.componentWillUnmount=function(){Yo(this.props.innerRef,null),this.destroyPopperInstance()},t.render=function(){return Go(this.props.children)({ref:this.setPopperNode,style:this.getPopperStyle(),placement:this.getPopperPlacement(),outOfBoundaries:this.getOutOfBoundariesState(),scheduleUpdate:this.scheduleUpdate,arrowProps:{ref:this.setArrowNode,style:this.getArrowStyle()}})},e}(fe.Component);function ai(e){var t=e.referenceElement,n=Qt(e,["referenceElement"]);return fe.createElement(Qo.Consumer,null,function(e){return fe.createElement(ii,en({referenceElement:void 0!==t?t:e},n))})}s(ii,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1}),Eo.placements;var si=function(o){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t=o.call.apply(o,[this].concat(n))||this,s(i(i(t)),"refHandler",function(e){Yo(t.props.innerRef,e),ni(t.props.setReferenceNode,e)}),t}nn(e,o);var t=e.prototype;return t.componentWillUnmount=function(){Yo(this.props.innerRef,null)},t.render=function(){return Jo(Boolean(this.props.setReferenceNode)),Go(this.props.children)({ref:this.refHandler})},e}(fe.Component);function ci(t){return fe.createElement(ei.Consumer,null,function(e){return fe.createElement(si,en({setReferenceNode:e},t))})}function ui(e){var n=e.open,t=e.className,r=e.children,o=e.actions,e=ge(e),t=ye({OverlayFooter:!0},t),i=fe.createRef();return fe.useEffect(function(){var e,t;n&&i.current&&(e=null==(e=i.current)?void 0:e.querySelectorAll(".Button--basic"),(t=e[e.length-1])&&window.requestAnimationFrame(function(){return t.focus({preventScroll:!0})}))},[n]),o?fe.createElement("div",de({ref:i},e,{className:t}),o.map(function(e,t){e.label;e=K(e,Ti);return fe.createElement(ve,de({type:"button"},e,{key:t}))})):fe.createElement("div",de({"data-test":"DesignSystem-OverlayFooter",ref:i},e,{className:t}),r)}function li(e){var t=e.className,n=e.heading,r=e.subHeading,o=e.backButton,i=e.backIcon,a=e.backIconCallback,s=e.backButtonCallback,c=e.headingClass,e=ge(e),t=ye(pe({OverlayHeader:!0},"OverlayHeader--withBackButton",o||i),t),u=ye((pe(u={},"OverlayHeader-subheading",!0),pe(u,"OverlayHeader-subheading--withBackButton",o||i),u));return fe.createElement("div",de({"data-test":"DesignSystem-OverlayHeader"},e,{className:t}),fe.createElement("div",{className:"OverlayHeader-headerWrapper"},(o||i)&&fe.createElement(ve,{"data-test":"DesignSystem-OverlayHeader--Button",appearance:"transparent",className:"mr-5",icon:"keyboard_backspace",onClick:s||a}),n&&fe.createElement(pt,{className:c,"data-test":"DesignSystem-OverlayHeader--heading"},n)),r&&fe.createElement(me,{"data-test":"DesignSystem-OverlayHeader--Subheading",appearance:"subtle",className:u},r))}function fi(e){var t=e.children,n=e.className,e=ge(e),n=ye({OverlayBody:!0},n);return fe.createElement("div",de({"data-test":"DesignSystem-OverlayBody"},e,{className:n}),t)}function pi(){var e=document.querySelector(".Overlay-wrapper");return null===e&&((e=document.createElement("div")).classList.add("Overlay-wrapper"),document.body.appendChild(e)),e}function di(e){var t=e.containerClassName,n=e.elementRef,e=e.element;if(null!==e){var r,e=e.querySelectorAll(t);if(!(e.length<1))return t=Array.from(e).filter(function(e){return e!==n.current}),r=-1,t.forEach(function(e){e=parseInt(window.getComputedStyle(e).zIndex||"0",10);r=Math.max(r,e+10)}),0<r?r:void 0}}function hi(e,t,n){"Escape"===e.key&&t&&(n(e),e.preventDefault())}function yi(e){function t(e){switch(l(!0),e){case"first":c(1);break;case"last":c(r);break;case"prev":1<s&&c(s-1);break;case"next":s<r&&c(s+1)}}var n=e.type,r=e.totalPages,o=e.onPageChange,i=e.className,a=ge(e),s=(f=he(fe.useState(e.page),2))[0],c=f[1],u=(f=he(fe.useState(!1),2))[0],l=f[1],f=(fe.useEffect(function(){c(e.page)},[e.page]),ye((pe(f={},"Pagination",!0),pe(f,"Pagination--".concat(n),n),f),i)),i=ye((pe(i={},"Pagination-buttonWrapper",!0),pe(i,"Pagination-buttonWrapper--next",!0),i)),p=ye((pe(p={},"Pagination-buttonWrapper",!0),pe(p,"Pagination-buttonWrapper--previous",!0),p));return fe.useEffect(function(){u&&1<=s&&s<=r&&o(s)},[s]),fe.createElement("div",de({"data-test":"DesignSystem-Pagination"},a,{className:f}),fe.createElement("div",{className:p},fe.createElement(ve,{onClick:function(){return t("first")},disabled:s<=1,appearance:"transparent",icon:"first_page","data-test":"DesignSystem-Pagination--FirstButton"}),fe.createElement(ve,{onClick:function(){return t("prev")},disabled:s<=1,icon:"navigate_before","data-test":"DesignSystem-Pagination--PrevButton",className:"ml-4 mr-3"})),"jump"===n&&fe.createElement("div",{className:"Pagination-pageIndex"},fe.createElement(vt,{name:"page",className:"Pagination-MetricInput",onChange:function(e){e.preventDefault();e=+e.target.value.trim();0<=e&&e<=r&&(u||l(!0),c(e))},value:"".concat(0===s?"":s),"data-test":"DesignSystem-Pagination--Input"}),fe.createElement(me,null," of ".concat(r," pages"))),fe.createElement("div",{className:i},fe.createElement(ve,{onClick:function(){return t("next")},disabled:r<=s,icon:"navigate_next","data-test":"DesignSystem-Pagination--NextButton",className:"mr-4 ml-3"}),fe.createElement(ve,{onClick:function(){return t("last")},disabled:r<=s,appearance:"transparent",icon:"last_page","data-test":"DesignSystem-Pagination--LastButton"})))}function gi(e){function t(e){var t,n;"start"===e&&(t=(n=Y(d)).year,n=n.month,p({yearNav:t,monthNav:n})),"end"===e&&(n=(t=Y(h)).year,e=t.month,p({yearNav:n,monthNav:e}))}function n(e,t,n){var r,o,i;p({open:!0}),"start"===n&&(r=c.placeholderChar||"_",t&&!t.includes(r)&&(r=Ke(s,t,l))&&(p({startDate:r}),h&&(o=(r=Y(h)).year,i=r.month,r=r.date,G(d,"more",o,i,r)&&p({endDate:void 0})))),"end"===n&&(o=u.placeholderChar||"_",t&&!t.includes(o)&&(i=Ke(s,t,l))&&p({endDate:i}))}function r(e,t,n){var r;p({init:!0}),"start"===n&&(r=c.placeholderChar,t&&!t.includes(void 0===r?"_":r)||p({startDate:void 0})),"end"===n&&(r=u.placeholderChar,t&&!t.includes(void 0===r?"_":r)||p({endDate:void 0}))}function o(e){p({init:!0}),"start"===e&&(p({startDate:void 0}),t("end")),"end"===e&&(p({endDate:void 0}),t("start"))}function i(e){f.open||t(e)}function a(e){return L(l,e,s)}var s=e.inputFormat,c=e.startInputOptions,u=e.endInputOptions,l=e.validators,f=e.state,p=e.setState,e=f.init,d=f.startDate,h=f.endDate,y=f.startError,g=f.endError,m=P[s],v=c.placeholderChar||"_",b=u.placeholderChar||"_",y=c.error||c.required&&y&&e,g=u.error||u.required&&g&&e,_=void 0===c.caption?"Invalid value":c.caption,w=void 0===u.caption?"Invalid value":u.caption,S=c.label,E=u.label;return fe.createElement(At,{"data-test":"DesignSystem-DateRangePicker-InputTrigger"},fe.createElement(O,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--startDate"},S&&fe.createElement(We,{required:c.required,withInput:!0},S),fe.createElement(_t,de({icon:"events",placeholder:s},c,{mask:m,value:d?C(s,d):e?_t.utils.getDefaultValue(m,v):"",onChange:function(e,t){n(0,t||"","start")},onBlur:function(e,t){r(0,t||"","start")},onClear:function(){return o("start")},onClick:function(){return i("start")},error:y,caption:y?_:"",validators:[a],clearOnEmptyBlur:!1}))),fe.createElement(O,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--endDate"},E&&fe.createElement(We,{required:u.required,withInput:!0},E),fe.createElement(_t,de({icon:"events",placeholder:s},u,{mask:m,value:h?C(s,h):e?_t.utils.getDefaultValue(m,b):"",onChange:function(e,t){n(0,t||"","end")},onBlur:function(e,t){r(0,t||"","end")},onClear:function(){return o("end")},onClick:function(){return i("end")},error:g,caption:g?w:"",validators:[a],clearOnEmptyBlur:!1}))))}function mi(e){var a=e.inputFormat,t=e.inputOptions,s=e.validators,n=e.state,c=e.setState,e=n.init,u=n.startDate,l=n.endDate,f=n.startValue,p=n.endValue,r=n.startError,n=n.endError,o=R[a],r=t.error||t.required&&(r||n)&&e,n=void 0===t.caption?"Invalid value":t.caption,i=t.label,d=void 0===(h=t.placeholderChar)?"_":h,h=_t.utils.getDefaultValue(o,d).split(" - "),y=f||h[0],h=p||h[1];return fe.createElement(At,{"data-test":"DesignSystem-DateRangePicker-SingleInputTrigger"},fe.createElement(O,null,i&&fe.createElement(We,{required:t.required,withInput:!0},i),fe.createElement(_t,de({icon:"events",placeholder:"".concat(a," - ").concat(a)},t,{mask:o,value:u||l||e?"".concat(y," - ").concat(h):void 0,onChange:function(e,t){var n,r,o,i;t=(t=t||"").split(" - "),i=t[0],t=t[1],f!==i&&i&&!i.includes(d)&&(n=Ke(a,i,s))&&(r=p&&!p.includes(d),c({startDate:n,endDate:r?l:void 0}),l&&(r=(n=Y(l)).year,o=n.month,n=n.date,G(u,"more",r,o,n)&&c({endDate:void 0}))),p!==t&&t&&!t.includes(d)&&(r=Ke(a,t,s),o=f&&!f.includes(d),r&&c({endDate:r,startDate:o?u:void 0})),c({startValue:i,endValue:t})},onBlur:function(e,t){var n;t=t||"",c({init:!0}),t=t.split(" - "),n=t[0],t=t[1],n&&!n.includes(d)||c({startDate:void 0}),t&&!t.includes(d)||c({endDate:void 0})},onClear:function(){c({init:!0,startDate:void 0,endDate:void 0,yearNav:void 0,monthNav:void 0})},error:r,caption:r?n:"",validators:[function(e){var e=he(e.split(" - "),2),t=e[0],e=e[1];return L(s,t,a)&&L(s,e,a)}],clearOnEmptyBlur:!1}))))}function vi(e){var t=new Date;return new Date(t.setDate(e))}function bi(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(e){return"Files"===e||"application/x-moz-file"===e}):!!e.target&&!!e.target.files}function _i(e){e.preventDefault()}function wi(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return function(t){for(var e=arguments.length,n=new Array(1<e?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return o.some(function(e){return!Ni(t)&&e&&e.apply(void 0,[t].concat(n)),Ni(t)})}}function Si(e,t){switch(t.type){case"focus":return z(z({},e),{},{isFocused:!0});case"blur":return z(z({},e),{},{isFocused:!1});case"openDialog":return z(z({},e),{},{isFileDialogActive:!0});case"closeDialog":return z(z({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return z(z({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return z(z({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return z(z({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}var Ei=function(){e(n,fe["Component"]);var t=h(n);function n(e){var o;return d(this,n),pe(V(o=t.call(this,e)),"triggerRef",void 0),pe(V(o),"popupRef",void 0),pe(V(o),"hoverableDelay",void 0),pe(V(o),"_timer",void 0),pe(V(o),"_throttleWait",void 0),pe(V(o),"offsetMapping",void 0),pe(V(o),"togglePopper",function(e,t){var n=o.props,r=n.open;(0,n.onToggle)(void 0===t?!r:t,e)}),pe(V(o),"doesEventContainsElement",function(e,t){t=t.current;return t&&t.contains(e.target)}),pe(V(o),"getUpdatedStyle",function(e,t,n){var r=z(z({},o.props.style),e);switch(t&&t.split("-")[0]){case"top":r.marginBottom=o.offsetMapping[n];break;case"bottom":r.marginTop=o.offsetMapping[n];break;case"left":r.marginRight=o.offsetMapping[n];break;case"right":r.marginLeft=o.offsetMapping[n]}return r}),o.state={animationKeyframe:"",isOpen:o.props.open||!1,uniqueKey:""},o.hoverableDelay=100,o.offsetMapping={small:"2px",medium:"4px",large:"8px"},o.triggerRef=fe.createRef(),o.popupRef=fe.createRef(),o.getPopperChildren=o.getPopperChildren.bind(V(o)),o.mouseMoveHandler=o.mouseMoveHandler.bind(V(o)),o.handleMouseEnter=o.handleMouseEnter.bind(V(o)),o.handleMouseLeave=o.handleMouseLeave.bind(V(o)),o.boundaryScrollHandler=o.boundaryScrollHandler.bind(V(o)),o}return a(n,[{key:"componentDidMount",value:function(){this.addBoundaryScrollHandler()}},{key:"componentDidUpdate",value:function(e){!e.boundaryElement&&this.props.boundaryElement&&(this.removeBoundaryScrollHandler(),this.addBoundaryScrollHandler()),e.open!==this.props.open&&(this._throttleWait=!1,this.setState({animationKeyframe:""}),this.props.open&&(e=this.triggerRef.current,e=this.getZIndexForLayer(e),this.setState({zIndex:void 0===e?e:e+1,isOpen:!0})))}},{key:"componentWillUnmount",value:function(){this.removeBoundaryScrollHandler()}},{key:"boundaryScrollHandler",value:function(){var e=this.props,t=e.open,n=e.on,e=e.closeOnScroll;"click"===n&&e&&t&&!this._throttleWait&&(this.togglePopper("onScroll",!1),this._throttleWait=!0)}},{key:"addBoundaryScrollHandler",value:function(){this.props.boundaryElement&&this.props.boundaryElement.addEventListener("scroll",this.boundaryScrollHandler)}},{key:"removeBoundaryScrollHandler",value:function(){this.props.boundaryElement&&this.props.boundaryElement.removeEventListener("scroll",this.boundaryScrollHandler)}},{key:"mouseMoveHandler",value:function(){var e=this;this._timer&&clearTimeout(this._timer),this._timer=window.setTimeout(function(){(0,e.props.onToggle)(!1,"mouseLeave")},this.hoverableDelay)}},{key:"handleMouseEnter",value:function(){"hover"===this.props.on&&(this._timer&&clearTimeout(this._timer),(0,this.props.onToggle)(!0,"mouseEnter"))}},{key:"handleMouseLeave",value:function(){var e,t;"hover"===this.props.on&&(e=(t=this.props).hoverable,t=t.onToggle,e?this.mouseMoveHandler():t(!1,"mouseLeave"))}},{key:"getZIndexForLayer",value:function(e){if(null!==e)return e=e.closest("[data-layer]")||document.body,e=e===document.body?"auto":parseInt(window.getComputedStyle(e).zIndex||"0",10),"auto"===e||isNaN(e)?void 0:e}},{key:"getTriggerElement",value:function(e){var r=this,t=this.props,n=t.trigger,o=t.on,t=t.triggerClass,o="hover"===o?{ref:e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave}:{ref:e,onClick:function(e){e.stopPropagation(),r.togglePopper("onClick")}},e=ye("PopperWrapper-trigger",t);return fe.createElement(Tt,de({className:e,onOutsideClick:function(e){var t=r.props,n=t.open,t=t.closeOnBackdropClick;n&&t&&(r.doesEventContainsElement(e,r.popupRef)||r.togglePopper("outsideClick"))}},o),n)}},{key:"getPopperChildren",value:function(e){var t,n=this,r=e.ref,o=e.style,i=e.placement,e=e.outOfBoundaries,a=this.props,s=a.offset,c=a.children,u=a.open,a=a.animationClass,l=this.state,f=l.zIndex,p=l.animationKeyframe,l=l.uniqueKey,s=z(z({},s?this.getUpdatedStyle(o,i,s):o),{},{zIndex:f}),o="",p=(a?o=ye((pe(f={},"".concat(a.open),u),pe(f,"".concat(a.close),!u),f),c.props.className):(f=null==(f=this.popupRef.current)?void 0:f.offsetHeight,(null==(t=this.popupRef.current)?void 0:t.style.getPropertyValue("transform"))&&f&&i&&!p&&(t=Math.random().toString(36).substring(2,6),p=i.includes("top"),p="\n @keyframes popper-open-".concat(t," {\n from { \n max-height: 0;\n ").concat(p?"margin-top: ".concat(f,"px"):"",";\n }\n to {\n max-height: ").concat(f,"px;\n ").concat(p?"margin-top: 0px":"",";\n }\n }\n @keyframes popper-close-").concat(t," {\n from {\n max-height: ").concat(f,"px;\n ").concat(p?"margin-top: 0px":"",";\n }\n to {\n max-height: 0;\n ").concat(p?"margin-top: ".concat(f,"px"):"",";\n }\n }\n "),this.setState({animationKeyframe:p,uniqueKey:t})),f={animation:u?"popper-open-".concat(l," 120ms cubic-bezier(0, 0, 0.38, 0.9), popper-fade-in 120ms"):"popper-close-".concat(l," 120ms cubic-bezier(0.2, 0, 1, 0.9) 120ms, fadeOut 120ms 120ms")},s=z(z(z({},s),f),{},{overflow:"hidden"})),{ref:r,style:s,"data-placement":i,"data-hide":e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onAnimationEnd:function(){u||n.setState({isOpen:!1})}});return fe.cloneElement(c,a?z(z({},p),{},{className:o}):z({},p))}},{key:"render",value:function(){var t=this,e=this.props,n=e.placement,r=e.appendToBody,o=e.hide,e=e.boundaryElement,i=this.state,a=i.animationKeyframe,i=i.isOpen;return fe.createElement(ti,null,fe.createElement("style",null,a),fe.createElement(ci,{innerRef:this.triggerRef},function(e){e=e.ref;return t.getTriggerElement(e)}),i&&r&&b.createPortal(fe.createElement(ai,{placement:n,innerRef:this.popupRef,modifiers:{preventOverflow:{boundariesElement:e||document.body},hide:{enabled:o}}},this.getPopperChildren),document.body),i&&!r&&fe.createElement(ai,{placement:n,innerRef:this.popupRef},this.getPopperChildren))}}]),n}(),Ci=(pe(Ei,"defaultProps",{on:"click",offset:"medium",closeOnBackdropClick:!0,hoverable:!0,appendToBody:!0,style:{}}),["position","customStyle","dark","children","onToggle","className","hideOnReferenceEscape","boundaryElement"]),Oi=function(e){var t=e.position,n=e.customStyle,r=e.dark,o=e.children,i=e.onToggle,a=e.className,s=e.hideOnReferenceEscape,c=e.boundaryElement,u=void 0===c?document.body:c,c=K(e,Ci),l=he(fe.useState(!!e.open),2),f=l[0],p=l[1],l=he(fe.useState(!1),2),d=l[0],h=l[1],l=(fe.useEffect(function(){void 0!==e.open&&p(e.open)},[e.open]),fe.useCallback(function(e){p(e)},[])),r=(fe.useEffect(function(){d||"current"in u&&u.current&&h(!0)},[u]),ye(pe({Popover:!0},"Popover--dark",r),a)),a=fe.createElement("div",{"data-test":"DesignSystem-Popover",className:r,"data-layer":!0},o);return fe.createElement(Ei,de({},c,{init:d,boundaryElement:"current"in u?u.current:u,open:f,hide:s,style:n,onToggle:i||l,placement:t}),a)},xi=(Oi.displayName="Popover",Oi.defaultProps=Object.assign({},U(Ei.defaultProps,["appendToBody","trigger","hoverable","on","open","closeOnBackdropClick","offset","closeOnScroll"],!0),{offset:"large",position:"bottom",hideOnReferenceEscape:!0,customStyle:{}}),["children","tooltip"]),ki={bottom:"bottom",top:"top","top-start":"top","top-end":"top","bottom-start":"bottom","bottom-end":"bottom",left:"left",right:"right"},Di=function(e){var t=e.children,n=e.tooltip,r=K(e,xi),n=fe.createElement("div",{className:"Tooltip"},fe.createElement(me,{className:"Tooltip-text",appearance:"white"},n));return fe.createElement(Oi,de({trigger:t,on:"hover",offset:"medium"},r,{animationClass:{open:"Tooltip-animation-open-".concat(ki[e.position]),close:"Tooltip-animation-close-".concat(ki[e.position])}}),n)},Ti=(Di.defaultProps=Object.assign({},U(Oi.defaultProps,["trigger","on","open","offset","onToggle","dark","customStyle","closeOnBackdropClick","hideOnReferenceEscape","closeOnScroll"]),{hoverable:!1}),["label"]),f=(ui.displayName="OverlayFooter",li.displayName="OverlayHeader",fi.defaultProps={stickFooter:!0,withFooter:!0},fi.displayName="OverlayBody",new(function(){function e(){d(this,e),pe(this,"overlays",void 0),this.overlays=[]}return a(e,[{key:"add",value:function(e){var t;if(null!==e)return t=this.overlays.indexOf(e),-1!==t||(t=this.overlays.length,this.overlays.push(e)),t}},{key:"remove",value:function(e){null!==e&&-1!==(e=this.overlays.indexOf(e))&&this.overlays.splice(e,1)}},{key:"isTopOverlay",value:function(e){if(null!==e)return!!this.overlays.length&&this.overlays[this.overlays.length-1]===e}}]),e}())),n=(Object.freeze(f),function(){e(r,fe["Component"]);var t=h(r);function r(e){var n;return d(this,r),pe(V(n=t.call(this,e)),"modalRef",fe.createRef()),pe(V(n),"element",void 0),pe(V(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.modalRef.current);hi(e,t,n.onOutsideClickHandler)}),n.element=pi(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(V(n)),n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&f.add(this.modalRef.current),document.addEventListener("keydown",this.onCloseHandler))}},{key:"componentWillUnmount",value:function(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}},{key:"componentDidUpdate",value:function(e){var t=this;e.open!==this.props.open&&(this.props.open?(e=di({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef}),this.setState({zIndex:e,open:!0,animate:!0}),this.props.closeOnEscape&&f.add(this.modalRef.current)):(this.setState({animate:!1},function(){window.setTimeout(function(){t.setState({open:!1})},120)}),this.props.closeOnEscape&&f.remove(this.modalRef.current)))}},{key:"onOutsideClickHandler",value:function(e){var t=this.props,n=t.backdropClose,t=t.onClose;this.state.open&&(this.props.closeOnEscape&&f.remove(this.modalRef.current),t?t(e,"OutsideClick"):"function"==typeof n&&n(e,"OutsideClick"))}},{key:"render",value:function(){var e=this.state,t=e.animate,n=e.open,e=e.zIndex,r=this.props,o=r.className,i=r.backdropClose,a=r.dimension,s=r.children,c=r.headerOptions,u=r.header,l=r.footerOptions,f=r.seperator,p=r.footer,d=r.onClose,r=e?e-1:1e3,t=ye({Modal:!0,"Modal--open":n,"Modal-animation--open":t,"Modal-animation--close":!t},o),o=ye((pe(o={},"Modal-header",!0),pe(o,"Modal-header--withSeperator",f),o)),f=ye((pe(h={},"Modal-footer",!0),pe(h,"Modal-footer--withSeperator",f),h)),h=ye((pe(h={},"Row",!0),pe(h,"Overlay-container",!0),pe(h,"Overlay-container--open",n),h)),y=c||l||p||u,y=ye((pe(g={},"Modal-body",!0),pe(g,"Modal-body--withMargin",!y||!!p),pe(g,"Modal-body--withPadding",!y||!p),g)),g=ge(this.props),h=fe.createElement(At,{"data-test":"DesignSystem-ModalContainer",className:h,"data-layer":!0,style:{zIndex:e}},fe.createElement(O,de({"data-test":"DesignSystem-Modal"},g,{className:t},{small:{size:"3",sizeL:"4",sizeM:"4",sizeXS:"10"},medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"10"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"10"}}[a],{ref:this.modalRef}),(c||u)&&fe.createElement("div",{className:o},fe.createElement(O,null,!u&&fe.createElement(li,de({"data-test":"DesignSystem-Modal--header"},c)),!!u&&u),fe.createElement(O,{className:"flex-grow-0"},fe.createElement(Di,{tooltip:"Close",position:"top"},fe.createElement(ve,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Modal--CloseButton",onClick:function(e){d&&d(e,"IconClick")}})))),s&&fe.createElement(fe.Fragment,null,c||l||p||u?fe.createElement(fi,{className:y},this.props.children):s),(!!p||!!l)&&fe.createElement(ui,de({"data-test":"DesignSystem-Modal--footer"},l,{open:n,className:f}),p))),e=i?fe.createElement(Tt,{"data-test":"DesignSystem-Modal--OutsideClick",onOutsideClick:this.onOutsideClickHandler},h):h,g=b.createPortal(e,this.element);return fe.createElement(fe.Fragment,null,g,fe.createElement(q,{open:this.state.animate,zIndex:r}))}}]),r}()),r=(pe(n,"defaultProps",{dimension:"medium"}),function(){e(r,fe["Component"]);var t=h(r);function r(e){var n;return d(this,r),pe(V(n=t.call(this,e)),"modalRef",fe.createRef()),pe(V(n),"element",void 0),pe(V(n),"onOutsideClickHandler",function(e){f.remove(n.modalRef.current),n.props.onClose?n.props.onClose(e,"EscapePress"):n.setState({animate:!1},function(){window.setTimeout(function(){n.setState({open:!1})},120)})}),pe(V(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.modalRef.current);hi(e,t,n.onOutsideClickHandler)}),n.element=pi(),n.state={open:e.open,animate:e.open},n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&f.add(this.modalRef.current),document.addEventListener("keydown",this.onCloseHandler))}},{key:"componentWillUnmount",value:function(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}},{key:"componentDidUpdate",value:function(e){var t=this;e.open!==this.props.open&&(this.props.open?(e=di({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef}),this.setState({zIndex:e,open:!0,animate:!0}),this.props.closeOnEscape&&f.add(this.modalRef.current)):(this.setState({animate:!1},function(){window.setTimeout(function(){t.setState({open:!1})},120)}),this.props.closeOnEscape&&f.remove(this.modalRef.current)))}},{key:"render",value:function(){var e=this.state,t=e.animate,n=e.open,e=e.zIndex,r=this.props,o=r.className,i=r.dimension,a=r.children,s=r.header,c=r.headerOptions,u=r.footer,l=r.footerOptions,f=r.onClose,r=ye({FullscreenModal:!0,"FullscreenModal-animation--open":t,"FullscreenModal-animation--close":!t},o),o=ye((pe(t={},"Overlay-container",!0),pe(t,"Overlay-container--open",n),t)),t=ge(this.props),o=n?fe.createElement("div",{"data-test":"DesignSystem-FullscreenModalContainer",className:o,"data-layer":!0,style:{zIndex:e}},fe.createElement("div",de({"data-test":"DesignSystem-FullscreenModal"},t,{className:r,ref:this.modalRef}),fe.createElement(At,{className:"justify-content-center"},fe.createElement(O,{medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"12"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"12"}}[i],fe.createElement(At,{className:"FullscreenModal-header"},fe.createElement(O,null,!s&&fe.createElement(li,de({"data-test":"DesignSystem-FullscreenModal--header"},c)),!!s&&s),fe.createElement(O,{className:"flex-grow-0"},fe.createElement(Di,{tooltip:"Close"},fe.createElement(ve,{icon:"close",appearance:"transparent","data-test":"DesignSystem-FullscreenModal--CloseButton",onClick:function(e){f&&f(e,"IconClick")}})))),fe.createElement(fi,{"data-test":"DesignSystem-FullscreenModal--Body",className:"FullscreenModal-body"},a),(!!u||!!l)&&fe.createElement(ui,de({"data-test":"DesignSystem-FullscreenModal--footer"},l,{open:n,className:"FullscreenModal-footer"}),u))))):null,e=b.createPortal(o,this.element);return fe.createElement(fe.Fragment,null,e)}}]),r}()),ji=(pe(r,"defaultProps",{dimension:"medium"}),{regular:"6",large:"10"}),u=function(){e(r,fe["Component"]);var t=h(r);function r(e){var n;return d(this,r),pe(V(n=t.call(this,e)),"sidesheetRef",fe.createRef()),pe(V(n),"element",void 0),pe(V(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.sidesheetRef.current);hi(e,t,n.onOutsideClickHandler)}),n.element=pi(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(V(n)),n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&f.add(this.sidesheetRef.current),document.addEventListener("keydown",this.onCloseHandler))}},{key:"componentWillUnmount",value:function(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}},{key:"componentDidUpdate",value:function(e){e.open!==this.props.open&&(this.props.open?(e=di({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.sidesheetRef}),this.setState({zIndex:e,open:!0,animate:!0}),this.props.closeOnEscape&&f.add(this.sidesheetRef.current)):(this.setState({animate:!1}),this.props.closeOnEscape&&f.remove(this.sidesheetRef.current)))}},{key:"onOutsideClickHandler",value:function(e){var t=this.props.onClose;this.state.open&&(this.props.closeOnEscape&&f.remove(this.sidesheetRef.current),t&&t(e,"OutsideClick"))}},{key:"handleAnimationEnd",value:function(){this.state.animate||this.setState({open:!1})}},{key:"render",value:function(){var e=this.state,t=e.animate,n=e.open,e=e.zIndex,r=this.props,o=r.className,i=r.backdropClose,a=r.dimension,s=r.footer,c=r.seperator,u=r.stickFooter,l=r.headerOptions,f=r.footerOptions,p=r.header,d=r.onClose,r=e?e-1:1e3,o=ye({Sidesheet:!0,"Sidesheet--open":n,"Sidesheet-animation--open":t,"Sidesheet-animation--close":!t},o),t=ye((pe(h={},"Overlay-container",!0),pe(h,"fade-in",t),pe(h,"Overlay-container--open",t),pe(h,"Overlay-container--close",!t),h)),h=ye((pe(h={},"Sidesheet-header",!0),pe(h,"Sidesheet-header--withSeperator",c),h)),c=ye((pe(y={},"Sidesheet-footer",!0),pe(y,"Sidesheet-footer--withSeperator",c),pe(y,"Sidesheet-footer--stickToBottom",u),y)),u=ye((pe(y={},"Sidesheet-body",!0),pe(y,"Sidesheet-body--withMargin",!!s&&u),y)),y=ye((pe(y={},"Sidesheet-header--shiftRight",(null==l?void 0:l.backButton)||(null==l?void 0:l.backIcon)),pe(y,"Sidesheet-header--shiftLeft",!(null!=l&&l.backButton||null!=l&&l.backIcon)),y)),g=ge(this.props),t=fe.createElement(At,{"data-test":"DesignSystem-SidesheetContainer",className:t,"data-layer":!0,style:{zIndex:e},ref:this.sidesheetRef,onAnimationEnd:this.handleAnimationEnd},fe.createElement(O,de({"data-test":"DesignSystem-Sidesheet"},g,{className:o,size:ji[a]}),fe.createElement("div",{className:h},fe.createElement(O,{"data-test":"DesignSystem-Sidesheet--Header"},!p&&fe.createElement(li,de({headingClass:y},l)),!!p&&p),fe.createElement(O,{className:"flex-grow-0"},fe.createElement(Di,{tooltip:"Close"},fe.createElement(ve,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Sidesheet--CloseButton",onClick:function(e){d&&d(e,"IconClick")}})))),fe.createElement(fi,{"data-test":"DesignSystem-Sidesheet--OverlayBody",className:u},this.props.children),(!!s||!!f)&&fe.createElement(ui,de({"data-test":"DesignSystem-Sidesheet--Footer"},f,{open:n,className:c}),s))),e=i?fe.createElement(Tt,{"data-test":"DesignSystem-Sidesheet--OutsideClick",onOutsideClick:this.onOutsideClickHandler},t):t,g=b.createPortal(e,this.element);return fe.createElement(fe.Fragment,null,g,fe.createElement(q,{open:this.state.animate,zIndex:r}))}}]),r}(),o=(pe(u,"defaultProps",{dimension:"regular",stickFooter:!1,headerOptions:{}}),function(e){var t=e.title,n=e.description,r=e.className,e=ge(e),r=ye({"Modal-description":!0},r);return fe.createElement("div",de({"data-test":"DesignSystem-ModalDescription"},e,{className:r}),t&&fe.createElement(me,{weight:"strong","data-test":"DesignSystem-ModalDescription--Title"},t),t&&n&&fe.createElement("br",null),n&&fe.createElement(me,{"data-test":"DesignSystem-ModalDescription--Description"},n))}),Ii=(o.displayName="ModalDescription",yi.displayName="Pagination",yi.defaultProps={type:"basic",page:1,totalPages:1},["startDate","endDate","yearNav","monthNav","open","inputFormat","outputFormat","startInputOptions","endInputOptions","validators","withInput","position","disabledBefore","disabledAfter","onRangeChange","rangeLimit"]),p=function(){e(c,fe["Component"]);var s=h(c);function c(e){d(this,c),pe(V(l=s.call(this,e)),"monthsInView",void 0),pe(V(l),"getDate",function(e,t){var n=l.props.inputFormat;return{startValue:e?C(n,e):"",endValue:t?C(n,t):""}}),pe(V(l),"getErrors",function(e,t){function n(e){var t=(n=l.props).disabledBefore,n=n.disabledAfter,r=(t=Y(t)).year,o=t.month,t=t.date,i=(n=Y(n)).year,a=n.month,n=n.date;return!e||(G(e,"less",r,o,t)||G(e,"more",i,a,n))}var r=n(e),o=n(t),t=Y(t),i=t.year,a=t.month,t=t.date;return G(e,"more",i,a,t)&&(o=r=!0),{startError:r,endError:o}}),pe(V(l),"getInRangeError",function(){var e=l.props.rangeLimit;if(e){var t,n=l.state,r=n.startDate,n=n.endDate,o=Y(r),i=o.year,a=o.month,o=o.date,s=Y(n),c=s.year,u=s.month,s=s.date;if(r)return(t=new Date(r)).setDate(o+e),G(t,"less",c,u,s+1);if(n)return(t=new Date(n)).setDate(s-e),G(t,"more",i,a,o-1)}return!1}),pe(V(l),"onRangeChangeHandler",function(e,t){l.setState({init:!0,startDate:e,endDate:t,startValue:e?C(l.props.inputFormat,e):"",endValue:t?C(l.props.inputFormat,t):""})}),pe(V(l),"onToggleHandler",function(e,t){var n=l.props,r=n.singleInput,o=n.inputOptions,i=n.startInputOptions,n=n.endInputOptions,r=r?o.disabled:i.disabled||n.disabled;if(!r)switch(t){case"outsideClick":l.setState({open:e});break;case"onClick":l.setState({open:!0})}});var l,t=e.inputFormat,n=e.validators,r=g(e.startDate,t,n),t=g(e.endDate,t,n),n=l.getDate(r,t),o=n.startValue,n=n.endValue,i=l.getErrors(r,t),a=i.startError,i=i.endError;return l.state={startDate:r,endDate:t,startValue:o,endValue:n,startError:a,endError:i,init:!1,open:e.open||!1,yearNav:e.yearNav,monthNav:e.monthNav},l.monthsInView=e.monthsInView||(e.withInput?2:1),l}return a(c,[{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a,s;e.startDate!==this.props.startDate&&(n=(r=this.props).inputFormat,r=r.validators,r=g(this.props.startDate,n,r),n=C(n,r),this.setState({startDate:r,startValue:n})),e.endDate!==this.props.endDate&&(n=(r=this.props).inputFormat,r=r.validators,r=g(this.props.endDate,n,r),n=C(n,r),this.setState({endDate:r,endValue:n})),e.open!==this.props.open&&this.setState({open:this.props.open||!1}),e.yearNav!==this.props.yearNav&&this.setState({yearNav:this.props.yearNav}),e.monthNav!==this.props.monthNav&&this.setState({monthNav:this.props.monthNav}),t.startDate===this.state.startDate&&t.endDate===this.state.endDate||(n=(r=this.props).onRangeChange,e=r.outputFormat,r=(t=this.state).startDate,t=t.endDate,o=(i=this.getErrors(r,t)).startError,i=i.endError,this.setState({startError:o,endError:i}),n&&(a=this.getInRangeError(),s=C(e,r),e=C(e,t),a||o||i?o?n(void 0,i?void 0:t,s,e):n(r,void 0,s,e):n(r,t,s,e)),this.state.startDate&&this.state.endDate&&this.setState({open:!1}))}},{key:"renderCalendar",value:function(){var e=this.props,t=(e.startDate,e.endDate,e.yearNav,e.monthNav,e.open,e.inputFormat),n=(e.outputFormat,e.startInputOptions,e.endInputOptions,e.validators),r=(e.withInput,e.position,e.disabledBefore),o=e.disabledAfter,i=(e.onRangeChange,e.rangeLimit),e=K(e,Ii),a=this.state,s=a.startDate,c=a.endDate,u=a.yearNav,a=a.monthNav;return fe.createElement(ot,de({},e,{monthsInView:this.monthsInView,rangePicker:!0,startDate:g(s,t,n),endDate:g(c,t,n),disabledBefore:g(r,t,n),disabledAfter:g(o,t,n),onRangeChange:this.onRangeChangeHandler,yearNav:u,monthNav:a,rangeLimit:i}))}},{key:"render",value:function(){var e,t=this.props,n=t.withInput,r=t.startInputOptions,o=t.endInputOptions,i=t.inputOptions,a=t.inputFormat,s=t.position,c=t.validators,u=t.singleInput,l=t.contentAlign,t=t.children,f=this.state.open,l=ye((pe(e={},"DateRangePicker",!0),pe(e,"DateRangePicker--".concat(l),l),e));return n?(e=u?fe.createElement(mi,{inputFormat:a,inputOptions:i,validators:c,state:this.state,setState:this.setState.bind(this)}):fe.createElement(gi,{inputFormat:a,startInputOptions:r,endInputOptions:o,validators:c,state:this.state,setState:this.setState.bind(this)}),fe.createElement(Oi,{trigger:e,triggerClass:"w-100",className:l,position:s,appendToBody:!0,open:f,onToggle:this.onToggleHandler},t,this.renderCalendar())):this.renderCalendar()}}]),c}(),c=(pe(p,"utils",{getCurrentWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:vi(t-e+1),endDate:vi(t-e+7)}},getPreviousWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:vi(t-e-6),endDate:vi(t-e)}},getPreviousMonth:function(){var e=new Date,t=e.getFullYear(),e=e.getMonth();return{endDate:new Date(t,e,0),startDate:new Date(t-(e<0),(e+11)%12,1)}},getPrevious90Days:function(){var e=(new Date).getDate();return{startDate:vi(e-90),endDate:vi(e)}},getCustomDates:function(){return{startDate:"",endDate:""}},getCurrentYear:function(){return(new Date).getFullYear()},getCurrentMonth:function(){return(new Date).getMonth()}}),pe(p,"defaultProps",z(z({},ot.defaultProps),{},{children:fe.createElement(fe.Fragment,null),contentAlign:"left",monthsInView:void 0,position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[A],inputOptions:{label:"Date"},startInputOptions:{label:"Start Date"},endInputOptions:{label:"End Date"}})),function(e){e=e.children;return fe.createElement(fe.Fragment,null,e)}),Mi=(c.displayName="Tab",function(e,t){var n,r,o;return!e||!t||(t=Array.isArray(t)?t:t.split(","),n=e.name||"",r=(e.type||"").toLowerCase(),o=r.replace(/\/.*$/,""),t.some(function(e){e=e.trim().toLowerCase();return"."===e.charAt(0)?n.toLowerCase().endsWith(e):e.endsWith("/*")?o===e.replace(/\/.*$/,""):r===e}))}),Ni=function(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble},Ai=function(e){return null!=e},Pi=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e,e=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{type:"FILE_INVALID_TYPE",message:"File type must be ".concat(e)}},Ri=function(e){return{type:"FILE_TOO_LARGE",message:"File is larger than ".concat(e," bytes")}},Li=function(e){return{type:"FILE_TOO_SMALL",message:"File is smaller than ".concat(e," bytes")}},Fi=function(e,t){e="application/x-moz-file"===e.type||Mi(e,t);return[e,e?null:Pi(t)]},Bi=function(e,t,n){if(Ai(e.size))if(Ai(t)&&Ai(n)){if(e.size>n)return[!1,Ri(n)];if(e.size<t)return[!1,Li(t)]}else{if(Ai(t)&&e.size<t)return[!1,Li(t)];if(Ai(n)&&e.size>n)return[!1,Ri(n)]}return[!0,null]},zi=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]),Ki=[".DS_Store","Thumbs.db"];function Hi(){return(Hi=S(regeneratorRuntime.mark(function e(n){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.dataTransfer&&n.dataTransfer?function(){return qi.apply(this,arguments)}(n.dataTransfer,n.type):(null!==(t=n).target&&t.target.files?Vi(t.target.files):[]).map(function(e){return Ui(e)}));case 1:case"end":return e.stop()}var t},e)}))).apply(this,arguments)}function Ui(e,t){var n,r=function(e){var t=e.name;t&&-1!==t.lastIndexOf(".")&&!e.type&&(t=t.split(".").pop().toLowerCase(),(t=zi.get(t))&&Object.defineProperty(e,"type",{value:t,writable:!1,configurable:!1,enumerable:!0}));return e}(e);return"string"!=typeof r.path&&(n=e.webkitRelativePath,Object.defineProperty(r,"path",{value:"string"==typeof t?t:"string"==typeof n&&0<n.length?n:e.name,writable:!1,configurable:!1,enumerable:!0})),r}function qi(){return(qi=S(regeneratorRuntime.mark(function e(t,n){var r,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.items){e.next=8;break}if(r=Vi(t.items).filter(function(e){return"file"===e.kind}),"drop"!==n)return e.abrupt("return",r);e.next=4;break;case 4:return e.next=6,Promise.all(r.map(Gi));case 6:return o=e.sent,e.abrupt("return",Wi(function n(e){return e.reduce(function(e,t){return[].concat(H(e),H(Array.isArray(t)?n(t):[t]))},[])}(o)));case 8:return e.abrupt("return",Wi(Vi(t.files).map(function(e){return Ui(e)})));case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Wi(e){return e.filter(function(e){return-1===Ki.indexOf(e.name)})}function Vi(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function Gi(e){if("function"!=typeof e.webkitGetAsEntry)return Yi(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Ji(t):Yi(e)}function Yi(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));e=Ui(t);return Promise.resolve(e)}function $i(e){return Zi.apply(this,arguments)}function Zi(){return(Zi=S(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(t.isDirectory?Ji:function(e){return Xi.apply(this,arguments)})(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ji(e){var t=e.createReader();return new Promise(function(o,i){var a=[];!function r(){t.readEntries(function(){var t=S(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=13;break}return e.prev=1,e.next=4,Promise.all(a);case 4:n=e.sent,o(n),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),i(e.t0);case 11:e.next=16;break;case 13:n=Promise.all(t.map($i)),a.push(n),r();case 16:case"end":return e.stop()}},e,null,[[1,8]])}));return function(e){return t.apply(this,arguments)}}(),function(e){i(e)})}()})}function Xi(){return(Xi=S(regeneratorRuntime.mark(function e(r){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(t,n){r.file(function(e){e=Ui(e,r.fullPath);t(e)},function(e){n(e)})}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Qi(e){function t(){x&&setTimeout(function(){var e;!E.current||(e=E.current.files)&&e.length||(O({type:"closeDialog"}),"function"==typeof v&&v())},300)}function n(e){e.target instanceof HTMLDivElement&&S.current&&S.current.contains(e.target)||(e.preventDefault(),M.current=[])}function a(e){return s?null:e}var r,o,i,c=e.accept,s=e.disabled,u=e.maxSize,l=e.minSize,f=e.multiple,p=e.onDragEnter,d=e.onDragLeave,h=e.onDragOver,y=e.onDrop,g=e.onDropAccepted,m=e.onDropRejected,v=e.onFileDialogCancel,b=e.getFilesFromEvent,_=e.preventDropOnDocument,w=e.validator,S=Object(fe.useRef)(null),E=Object(fe.useRef)(null),C=(e=he(Object(fe.useReducer)(Si,ia),2))[0],O=e[1],e=C.isFocused,x=C.isFileDialogActive,k=C.draggedFiles,D=Object(fe.useCallback)(function(){E.current&&(O({type:"openDialog"}),E.current.value="",E.current.click())},[O]),T=(Object(fe.useEffect)(function(){return window.addEventListener("focus",t,!1),function(){window.removeEventListener("focus",t,!1)}},[E,x,v]),Object(fe.useCallback)(function(e){S.current&&S.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),D()))},[S,E])),j=Object(fe.useCallback)(function(){O({type:"focus"})},[]),I=Object(fe.useCallback)(function(){O({type:"blur"})},[]),M=Object(fe.useRef)([]),R=(Object(fe.useEffect)(function(){return _&&(document.addEventListener("dragover",_i,!1),document.addEventListener("drop",n,!1)),function(){_&&(document.removeEventListener("dragover",_i),document.removeEventListener("drop",n))}},[S,_]),Object(fe.useCallback)(function(t){t.preventDefault(),t.persist(),M.current=[].concat(H(M.current),[t.target]),bi(t)&&Promise.resolve(b(t)).then(function(e){Ni(t)||(O({draggedFiles:e,isDragActive:!0,type:"setDraggedFiles"}),p&&p(t))})},[b,p])),L=Object(fe.useCallback)(function(e){if(e.preventDefault(),e.persist(),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return bi(e)&&h&&h(e),!1},[h]),F=Object(fe.useCallback)(function(e){e.preventDefault(),e.persist();var t=M.current.filter(function(e){return S.current&&S.current.contains(e)}),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),0<(M.current=t).length||(O({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),bi(e)&&d&&d(e))},[S,d]),N=Object(fe.useCallback)(function(t){t.preventDefault(),t.persist(),M.current=[],bi(t)&&Promise.resolve(b(t)).then(function(e){var a,s;Ni(t)||(a=[],s=[],e.forEach(function(e){var t=he(Fi(e,c),2),n=t[0],t=t[1],r=he(Bi(e,l,u),2),o=r[0],r=r[1],i=w?w(e):null;n&&o&&!i?a.push(e):(n=[t,r],o=(n=i?n.concat(i):n).filter(function(e){return e}),s.push({file:e,errors:o}))}),O({acceptedFiles:a,fileRejections:s,type:"setFiles"}),y&&y(t,a,s),0<s.length&&m&&m(t,s),0<a.length&&g&&g(t,a))}),O({type:"reset"})},[f,c,l,u,b,y,g,m]),T=Object(fe.useMemo)(function(){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,t=void 0===t?"ref":t,n=(e.onKeyDown,e.onFocus,e.onBlur,e.onClick,e.onDragEnterCallback),r=e.onDragOverCallback,o=e.onDragLeaveCallback,i=e.onDropCallback,e=K(e,ra);return z(pe({onDragEnter:a(wi(n,R)),onDragOver:a(wi(r,L)),onDragLeave:a(wi(o,F)),onDrop:a(wi(i,N))},t,S),e)}},[S,T,j,I,R,L,F,N,s]),B=Object(fe.useCallback)(function(e){e.stopPropagation()},[]),j=Object(fe.useMemo)(function(){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,t=void 0===t?"ref":t,n=e.onChange,r=e.onClick,e=K(e,oa);return z(z({},pe({accept:c,multiple:f,type:"file",style:{display:"none"},onChange:a(wi(n,N)),onClick:a(wi(r,B)),autoComplete:"off",tabIndex:-1},t,E)),e)}},[E,c,f,N,s]),A=0<(I=k.length)&&(P=(A={accept:c,minSize:l,maxSize:u,multiple:f,files:k}).files,r=A.accept,o=A.minSize,i=A.maxSize,!(!A.multiple&&1<P.length)&&P.every(function(e){var t=he(Fi(e,r),1)[0],e=he(Bi(e,o,i),1)[0];return t&&e})),P=0<I&&!A,I=P?function(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize;if(!e.multiple&&1<t.length)return"TOO_MANY_FILES";e=t.every(function(e){return!he(Fi(e,n),1)[0]}),t=t.every(function(e){return!he(Bi(e,r,o),1)[0]});return e?"FILE_INVALID_TYPE":t?"FILE_TOO_LARGE":""}({accept:c,minSize:l,maxSize:u,multiple:f,files:k}):"";return z(z({},C),{},{isDragAccept:A,isDragReject:P,getRootProps:T,getInputProps:j,rootRef:S,inputRef:E,draggedFiles:k,fileError:I,isFocused:e&&!s,open:a(D)})}function ea(e){var t=e.accept,n=e.multiple,r=e.uploadButtonLabel,o=e.disabled,i=e.name,a=e.className,s=e.id,c=e.onChange,e=ge(e),a=ye(pe({},"FileUploaderButton",!0),a);return fe.createElement("div",de({},e,{className:a}),fe.createElement(ve,{type:"button",disabled:o,icon:"backup"},r),fe.createElement("input",{name:i,id:s,"data-test":"DesignSystem-FileUploaderButton--Input",accept:t&&t.join(", "),multiple:n,disabled:o,type:"file",tabIndex:-1,className:"FileUploaderButton-input",onChange:function(e){var t=e.target.files?Array.from(e.target.files):[];c&&c(t,e)}}))}function ta(e,t,n){var r=e.sortingList,e=e.updateSortingList,o=(r=H(r)).findIndex(function(e){return e.name===t});-1!==o&&(r=[].concat(H(r.slice(0,o)),H(r.slice(o+1)))),"unsort"!==n&&r.push({name:t,type:n}),e(r)}function na(e,t,n){(0,e.updateColumnSchema)(t,{pinned:"unpin"!==n?n:void 0})}var ra=["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnterCallback","onDragOverCallback","onDragLeaveCallback","onDropCallback"],oa=["refKey","onChange","onClick"],ia={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};Qi.displayName="DropzoneBase",Qi.defaultProps={disabled:!1,getFilesFromEvent:function(e){return Hi.apply(this,arguments)},maxSize:1/0,minSize:0,multiple:!0,preventDropOnDocument:!0,validator:function(){return null}},z(z({},Qi.defaultProps),{},{type:"standard"}),ea.defaultProps={uploadButtonLabel:"Upload files",disabled:!"FileUploaderFormat",multiple:!1},ea.displayName="FileUploaderButton",Object.assign({},ea.defaultProps,{title:"Upload files",sizeLabel:"Maximum size: 25 MB"});function aa(e,t){var n,r=e.ref,e=e.withCheckbox;return"string"==typeof t&&"%"===t.slice(-1)?(n=r.querySelector(".Grid-cell--checkbox"),e=e?(null==n?void 0:n.clientWidth)||28:0,(r.clientWidth-e)*(+t.slice(0,-1)/100)):t}function sa(e,t,n){var r,o=H(e),i=N(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;o[a]=z(z({},o[a]),n)}}catch(e){i.e(e)}finally{i.f()}return o}function ca(e,t){var n=z({},t);return e.translate&&(t=e.translate(t),n[e.name]=null!==t&&"object"===$(t)?z(z({},n[e.name]),t):t),null!==n[e.name]&&"object"===$(n[e.name])||(n[e.name]={title:n[e.name]}),n}function ua(e,t){return Math.ceil(e/t)}function la(e){var t,n;return e.length?(t=e.some(function(e){return!e._selected}),n=e.every(function(e){return!e._selected}),{indeterminate:e=0<=e.length&&t&&!n,checked:!e&&!n}):{indeterminate:!1,checked:!1}}function fa(e){return e&&!!e.length}function pa(e){var t=(r=fe.useContext(ma)).schema,n=r.loading,r=r.nestedRowRenderer,o=e.data,e=e.rowIndex;return r?r({data:o,schema:t,loading:n,rowIndex:e}):null}function da(e){var t=fe.useContext(ma),n=e.isHead,r=e.firstCell,o=e.schema,i=e.data,a=e.rowIndex,s=e.colIndex,c=e.expandedState,u=e.onSelectAll,l=e.onMenuChange,f=e.onFilterChange,p=e.updateColumnSchema,d=e.reorderColumn,h=t.draggable,e=t.separator,y=t.nestedRows,g=t.ref,t=t.withCheckbox,m=o.name,v=o.hidden,b=o.pinned,_=(S={AVATAR:{minWidth:48},AVATAR_WITH_TEXT:{width:256},AVATAR_WITH_META_LIST:{width:256},ICON:{minWdth:48},STATUS_HINT:{width:96},WITH_META_LIST:{width:176},DEFAULT:{width:176}}[void 0===(S=o.cellType)?"DEFAULT":S]).width,w=void 0===(w=S.minWidth)?96:w,S=void 0===(S=S.maxWidth)?800:S,r=ye({"Grid-cell":!0,"Grid-cell--head":n,"Grid-cell--body":!n,"Grid-cell--separator":!r&&(void 0!==o.separator?o.separator:e),"Grid-cell--nestedRow":!n&&0===s&&y});return v?null:fe.createElement("div",{key:"".concat(a,"-").concat(s),className:r,draggable:n&&h,onDragStart:function(e){h&&(e.dataTransfer.setData("name",m),b&&e.dataTransfer.setData("type",b))},onDragOver:function(e){return e.preventDefault()},onDrop:function(e){var t;h&&(e={name:e.dataTransfer.getData("name"),type:e.dataTransfer.getData("type")}).type===(t={name:m,type:b||""}).type&&d&&d(e.name,t.name)},style:{width:aa({ref:g,withCheckbox:t},o.width||_),minWidth:aa({ref:g,withCheckbox:t},o.minWidth||w),maxWidth:aa({ref:g,withCheckbox:t},o.maxWidth||S)}},n?fe.createElement(ba,{colIndex:s,schema:o,onSelectAll:u,onMenuChange:l,onFilterChange:f,updateColumnSchema:p,reorderColumn:d}):fe.createElement(_a,{rowIndex:a,colIndex:s,data:i,schema:o,expandedState:c}))}function ha(e){function t(e,t,r){var n;return e.length?(n=ye((pe(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),pe(n,"Grid-cellGroup--main",!r),n)),fe.createElement("div",{className:n},t&&u?fe.createElement("div",{className:"Grid-cell Grid-cell--head Grid-cell--checkbox"},l?fe.createElement(I,null):fe.createElement(Te,de({},f,{onChange:o}))):null,e.map(function(e,t){var n="left"===r?t:p.length+t;return"right"===r&&(n+=d.length),fe.createElement(da,{key:"".concat(n),firstCell:!t,colIndex:n,isHead:!0,schema:e,onSelectAll:o,onMenuChange:i,onFilterChange:a,updateColumnSchema:s,reorderColumn:c})}))):null}var n=fe.useContext(ma),r=e.schema,o=e.onSelectAll,i=e.onMenuChange,a=e.onFilterChange,s=e.updateColumnSchema,c=e.reorderColumn,u=n.withCheckbox,l=n.loading,f=n.selectAll,p=(e=r.filter(function(e){return!e.hidden&&e.pinned})).filter(function(e){return!e.hidden&&"left"===e.pinned}),n=e.filter(function(e){return!e.hidden&&"right"===e.pinned}),d=r.filter(function(e){return!e.hidden&&!e.pinned});return fe.createElement("div",{className:"Grid-head","data-test":"DesignSystem-GridHead-wrapper"},fe.createElement("div",{className:"Grid-row Grid-row--head"},t(p,!!p.length,"left"),t(d,!p.length&&!!d.length),t(n,!1,"right")))}var ya=function(e,t,n){if(t===n)return e;return t<n?[].concat(H(e.slice(0,t)),H(e.slice(t+1,n+1)),[e[t]],H(e.slice(n+1))):[].concat(H(e.slice(0,n)),[e[t]],H(e.slice(n,t)),H(e.slice(t+1)))},ga=function(e){return 1<e?"s":""},n={showHead:!0,loaderSchema:[],schema:[],data:[],totalRecords:0,type:"data",size:"standard",page:1,pageSize:15,loading:!"FileUploaderList",error:!1,sortingList:[],filterList:{},showFilters:!0},ma=fe.createContext(z(z({},n),{},{ref:null})),va=ma.Provider,ba=function(e){function t(){return fe.createElement(fe.Fragment,null,fe.createElement(me,{weight:"strong",className:"ellipsis--noWrap"},r.displayName),h&&fe.createElement("div",{className:"Grid-sortingIcons"},v?"asc"===v?fe.createElement(T,{name:"arrow_upward"}):fe.createElement(T,{name:"arrow_downward"}):fe.createElement(T,{name:"unfold_more"})))}var n=fe.useContext(ma),r=e.schema,o=e.onMenuChange,i=e.onFilterChange,a=e.updateColumnSchema,s=n.loading,e=n.draggable,c=n.showMenu,u=n.sortingList,l=n.filterList,f=n.headCellTooltip,p=n.showFilters,n=n.schema,d=r.sorting,h=void 0===d||d,y=r.name,d=r.filters,g=r.pinned,n=fa(n),m=u.findIndex(function(e){return e.name===y}),v=-1!==m?u[m].type:null,b=fe.createRef(),u=[{label:"Sort Ascending",value:"sortAsc",icon:"arrow_upward"},{label:"Sort Descending",value:"sortDesc",icon:"arrow_downward"}],m=[{label:"Pin Left",value:"pinLeft",icon:"skip_previous"},{label:"Pin Right",value:"pinRight",icon:"skip_next"}],_={label:"Unpin",value:"unpin",icon:"replay"},_=("left"===g&&(m[0]=_),"right"===g&&(m[1]=_),{label:"Unsort",value:"unsort",icon:"unfold_more"}),_=("asc"===v&&(u[0]=_),"desc"===v&&(u[1]=_),[].concat(m,[{label:"Hide Column",value:"hide",icon:"cancel"}])),m=(h&&(_=[].concat(u,H(_))),ye({"Grid-headCell":!0,"Grid-headCell--draggable":e})),u=d?d.map(function(t){return z(z({},t),{},{selected:l[y]&&-1!==l[y].findIndex(function(e){return e===t.value})})}):[];return fe.createElement("div",{key:y,className:m,ref:b},fe.createElement("div",{className:"Grid-cellContent","data-test":"DesignSystem-Grid-cellContent",onClick:function(){!s&&h&&("asc"===v&&o(y,"sortDesc"),"desc"===v&&o(y,"unsort"),v||o(y,"sortAsc"))}},s&&!n?fe.createElement(I,{withImage:!1},fe.createElement(j,{length:"medium"})):fe.createElement(fe.Fragment,null,f?fe.createElement(Di,{position:"top-start",triggerClass:"w-100 overflow-hidden",tooltip:r.displayName},t()):t())),p&&d&&fe.createElement(fe.Fragment,null,s&&!n?fe.createElement("span",null,fe.createElement(I,null)):fe.createElement("div",null,fe.createElement(Ae,{menu:!0,showApplyButton:!0,withCheckbox:!0,triggerOptions:{customTrigger:function(){return fe.createElement(ve,{icon:"filter_list",appearance:"transparent"})}},options:u,align:"left",onChange:function(e){return i(y,e)},minWidth:176}))),c&&fe.createElement(fe.Fragment,null,s&&!n?fe.createElement("span",{className:"ml-4"},fe.createElement(I,null)):fe.createElement("div",null,fe.createElement(Ae,{key:"".concat(y,"-").concat(v,"-").concat(g),menu:!0,optionType:"WITH_ICON",triggerOptions:{customTrigger:function(){return fe.createElement(ve,{icon:"more_vert_filled",appearance:"transparent"})}},options:_,align:"left",onChange:function(e){return o(y,e)},minWidth:176}))),r.resizable&&fe.createElement("span",{className:"Grid-cellResize",onMouseDown:function(){function e(e){e.preventDefault(),i&&o(n,{width:e.pageX-i})}var t,n,r,o,i;t={updateColumnSchema:a},n=y,r=b.current,o=t.updateColumnSchema,i=null==r?void 0:r.getBoundingClientRect().x,window.addEventListener("mousemove",e),window.addEventListener("mouseup",function(){window.removeEventListener("mousemove",e)})}}))},_a=function(e){var t=fe.useContext(ma),n=e.data,r=e.schema,o=e.expandedState,i=e.rowIndex,e=e.colIndex,a=t.size,s=t.loading,t=t.nestedRows,o=he(o,2),c=o[0],u=o[1],o={rowIndex:i,colIndex:e,size:a,schema:r,data:n,loading:s,expanded:c},l=!pa({data:n,rowIndex:i});return fe.createElement("div",{className:"Grid-cellContent"},0===e&&t&&fe.createElement(fe.Fragment,null,l?fe.createElement("span",{className:"Grid-nestedRowPlaceholder"}):fe.createElement(T,{className:"Grid-nestedRowTrigger",name:c?"keyboard_arrow_up":"keyboard_arrow_down",size:20,appearance:"default",onClick:function(e){l||(e.stopPropagation(),u(!c))}})),r.cellRenderer?r.cellRenderer(o):fe.createElement(Aa,de({key:"".concat(i,"-").concat(e)},o)))};function wa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sa(){return(Sa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Ea(e){return(Ea=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ca(e,t){return(Ca=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oa(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};for(var n,r={},o=Object.keys(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function xa(e,t){if(!t||"object"!=typeof t&&"function"!=typeof t){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}return t}function ka(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Ea(n);return xa(this,r?(e=Ea(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function Da(e,t){var e=e.offsetTop,n=(t=t.getBoundingClientRect()).top;return 0<t.height-(e-n)}function Ta(e){function t(e,t,r){var n;return e.length?(n=ye((pe(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),pe(n,"Grid-cellGroup--main",!r),n)),fe.createElement("div",{className:n,"data-test":"DesignSystem-Grid-cellGroup"},t&&i?fe.createElement("div",{className:"Grid-cell Grid-cell--body Grid-cell--checkbox",onClick:function(e){return e.stopPropagation()}},o?fe.createElement(I,null):fe.createElement(Te,{checked:!!c._selected,onChange:function(e){l(u,e.target.checked)}})):null,e.map(function(e,t){var n="left"===r?t:g.length+t;return"right"===r&&(n+=v.length),fe.createElement(da,{key:"".concat(u,"-").concat(n),rowIndex:u,colIndex:n,firstCell:!t,schema:e,data:c,expandedState:[p,d]})}))):null}var n=(a=fe.useContext(ma)).type,r=a.onRowClick,o=a.loading,i=a.withCheckbox,a=a.nestedRows,s=e.schema,c=e.data,u=e.rowIndex,l=e.onSelect,e=e.className,f=fe.useRef(null),p=(h=he(fe.useState(!1),2))[0],d=h[1],h=ye("Grid-row","Grid-row--body",{"Grid-row--selected":c._selected}),y=fe.useCallback(function(){"resource"!==n||o||r&&r(c,u)},[c,u]),g=(m=s.filter(function(e){return!e.hidden&&e.pinned})).filter(function(e){return!e.hidden&&"left"===e.pinned}),m=m.filter(function(e){return!e.hidden&&"right"===e.pinned}),v=s.filter(function(e){return!e.hidden&&!e.pinned}),s=ye(e,{"Grid-rowWrapper":!0});return fe.createElement("div",{className:s},fe.createElement("div",{className:h,onClick:y,ref:f},t(g,!!g.length,"left"),t(v,!g.length&&!!v.length),t(m,!1,"right")),a&&p&&fe.createElement("div",{className:"Grid-nestedRow"},fe.createElement(pa,{data:c,rowIndex:u})))}function ja(e){var n=(f=fe.useContext(ma)).data,t=f.ref,r=f.size,o=f.loading,i=f.error,a=f.withPagination,s=f.nestedRows,c=f.page,u=f.pageSize,l=f.totalRecords,f=f.errorTemplate;if(!o&&i)return f?"function"==typeof f?f({}):f:null;function p(e,t){return fe.createElement(Ta,{key:e,rowIndex:e,data:t||n[e],schema:d,onSelect:g})}var d=e.schema,h=e.prevPageInfo,y=e.updatePrevPageInfo,g=e.onSelect,i=(fe.useEffect(function(){var e=t.querySelector(".Grid-body");return e&&window.requestAnimationFrame(function(){h.page===c&&(e.scrollTop=h.scrollTop)}),function(){e&&y({page:c,scrollTop:e.scrollTop})}},[]),Math.ceil(l/u)),f=a&&c===i?l-(c-1)*u:o?u:a?Math.min(l,u):l;return s&&!o?fe.createElement("div",{className:"Grid-body"},n.map(function(e,t){return p(t,e)})):fe.createElement(fe.Fragment,null,fe.createElement(Fa,{className:"Grid-body",minItemHeight:{comfortable:40,standard:40,compressed:32,tight:24}[r],totalLength:f,length:f,renderItem:p}))}function Ia(e){var t=e.tooltip;return null!=(e=e.cellData.title)?t?fe.createElement(Di,{tooltip:e,position:"top-start",triggerClass:"w-100 overflow-hidden"},fe.createElement(me,{className:"w-100 ellipsis"},e)):fe.createElement(me,{className:"w-100 ellipsis"},e):null}function Ma(e){return(e=e.cellData.metaList)?fe.createElement("div",{className:"GridCell-metaList","data-test":"DesignSystem-GridCell-metaList"},e.map(function(e,t){return fe.createElement(me,{key:t,className:"ellipsis",appearance:"subtle",size:"small"},e)})):null}function Na(e){var t=(e=e.cellData).firstName,n=e.lastName,e=e.title;return t||n?fe.createElement(W,{className:"mr-5",firstName:t,lastName:n}):e?fe.createElement(W,{className:"mr-5"},e):null}function Aa(e){var t,n,r=e.size,o=e.schema,i=e.loading,e=i?{}:ca(o,e.data),a=o.name,s=void 0===(s=o.cellType)?"DEFAULT":s,c=o.align,u=void 0===c?"left":c,l=o.tooltip,f=e[a],p=ye(pe({},"GridCell",!0));switch(s){case"DEFAULT":return fe.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--default")},i?fe.createElement(j,{length:"medium","data-test":"DesignSystem-GridCell-placeHolder"}):Ia({tooltip:l,cellData:f}));case"WITH_META_LIST":return fe.createElement("div",{className:"".concat(p," GridCell--metaList")},i?fe.createElement(fe.Fragment,null,fe.createElement(j,{length:"medium","data-test":"DesignSystem-GridCell-withMetaList"}),fe.createElement(j,{length:"large",size:"xxs"})):fe.createElement(fe.Fragment,null,Ia({tooltip:l,cellData:f}),Ma({cellData:f})));case"AVATAR":return i?fe.createElement(I,{className:"GridCell--align-".concat(u),imageSize:"medium",round:!0}):fe.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--avatar"),"data-test":"DesignSystem-GridCell-avatar"},"tight"!==r&&Na({cellData:f}));case"AVATAR_WITH_TEXT":return i?fe.createElement(I,{imageSize:"medium",round:!0},fe.createElement(j,{className:"ml-3",length:"medium"})):fe.createElement("div",{className:"".concat(p," "),"data-test":"DesignSystem-GridCell-avatarWithText"},"tight"!==r&&Na({cellData:f}),Ia({tooltip:l,cellData:f}));case"AVATAR_WITH_META_LIST":return i?fe.createElement(I,{imageSize:"medium",round:!0},fe.createElement(j,{className:"ml-3",length:"medium"}),fe.createElement(j,{className:"ml-3",length:"large"})):fe.createElement("div",{className:"".concat(p," GridCell--avatarWithText"),"data-test":"DesignSystem-GridCell-avatarWithMetaList"},"tight"!==r&&Na({cellData:f}),fe.createElement("div",{className:"GridCell-metaListWrapper"},Ia({tooltip:l,cellData:f}),Ma({cellData:f})));case"ICON":return i?fe.createElement(I,{className:"GridCell--align-".concat(u),imageSize:"small",round:!0}):fe.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--icon"),"data-test":"DesignSystem-GridCell-icon"},(t=(t={cellData:f}).cellData,n=t.title,(t=t.icon||n)?fe.createElement(T,{name:t}):null));case"STATUS_HINT":return fe.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--statusHint")},i?fe.createElement(I,{className:"w-75 flex-grow-0",imageSize:"small",round:!0},fe.createElement(j,{length:"large"})):(n=(n={cellData:f}).cellData,t=n.statusAppearance,(n=n.title)?fe.createElement(Pt,{appearance:t},n):null))}return null}function Pa(e){var t=e.options,n=e.onChange,r=(e=he(fe.useState(!1),2))[0],o=e[1],i=(e=he(fe.useState(t),2))[0],a=e[1],s=(e=he(fe.useState("var(--spacing-8)"),2))[0],c=e[1];return fe.useEffect(function(){a(t)},[r]),fe.createElement("div",{className:"Dropdown"},fe.createElement(Oi,{open:r,onToggle:function(e){o(e)},trigger:fe.createElement(ve,{type:"button",ref:function(e){c("".concat(null==e?void 0:e.clientWidth,"px"))},size:"tiny",appearance:"transparent",icon:"keyboard_arrow_down_filled",iconAlign:"right"},"Showing ".concat(t.filter(function(e){return e.selected}).length," of ").concat(t.length," column").concat(ga(t.length))),triggerClass:"w-100",customStyle:{width:s},className:"Header-draggableDropdown"},fe.createElement("div",{className:"Dropdown-wrapper"},fe.createElement("div",{className:"OptionWrapper"},fe.createElement(Te,{className:"OptionCheckbox",label:"Select All",checked:i.every(function(e){return e.selected}),indeterminate:i.some(function(e){return e.selected})&&i.some(function(e){return!e.selected}),onChange:function(t){a(i.map(function(e){return z(z({},e),{},{selected:t.target.checked})}))}})),i.map(function(e,r){return fe.createElement("div",{"data-test":"DesignSystem-Table-Header--draggableDropdownOption",key:e.value,className:"OptionWrapper d-flex flex-space-between align-items-center cursor-pointer",draggable:!0,onDragStart:function(e){e.dataTransfer.setData("index","".concat(r))},onDragOver:function(e){return e.preventDefault()},onDrop:function(e){e=+e.dataTransfer.getData("index");e!==r&&a(ya(i,e,r))}},fe.createElement(Te,{className:"OptionCheckbox",name:e.value,label:e.label,checked:i[r].selected,onChange:function(e){return e=e,t=r,(n=H(i))[t]=z(z({},n[t]),{},{selected:e.target.checked}),void a(n);var t,n}}),fe.createElement(T,{name:"drag_handle",className:"mr-4"}))})),fe.createElement("div",{className:"Dropdown-buttonWrapper"},fe.createElement(ve,{type:"button",className:"mr-4",size:"tiny",onClick:function(){o(!1)}},"Cancel"),fe.createElement(ve,{type:"button",appearance:"primary",size:"tiny",onClick:function(){o(!1),n&&n(i)}},"Apply"))))}function Ra(e){var t=e.loading,n=e.error,r=e.data,o=e.schema,i=e.withSearch,a=e.showHead,s=e.withPagination,c=e.page,u=e.pageSize,l=e.withCheckbox,f=e.children,p=e.updateSchema,d=void 0===(y=e.filterList)?{}:y,h=e.updateFilterList,y=void 0===(y=e.totalRecords)?0:y,g=e.onSelectAll,m=e.searchPlaceholder,v=e.selectAll,b=e.searchTerm,_=e.updateSearchTerm,w=e.dynamicColumn,S=e.allowSelectAll,e=e.showFilters,E=(k=he(fe.useState(!1),2))[0],C=k[1],O=(k=he(fe.useState(!0),2))[0],x=k[1],k=(fe.useEffect(function(){x(!O)},[o]),fe.useEffect(function(){v&&v.checked&&g&&g(!0,E)},[E]),fe.useEffect(function(){v&&!v.checked&&C(!1)},[v]),o.filter(function(e){return e.filters})),D=o.map(function(e){return{label:e.displayName,value:e.name,selected:!e.hidden}}),r=r.filter(function(e){return e._selected}).length,T=(c-1)*u+1,c=Math.min(c*u,y),u=n?"Showing 0 items":l&&r?E?"Selected all ".concat(y," item").concat(ga(y)):"Selected ".concat(r," item").concat(ga(y)," on this page"):(s?"Showing ".concat(T,"-").concat(c," of "):"Showing ").concat(y," item").concat(ga(y));return fe.createElement("div",{className:"Header"},fe.createElement("div",{className:"Header-content Header-content--top"},i&&fe.createElement("div",{className:"Header-search"},fe.createElement(yt,{"data-test":"DesignSystem-Table-Header--withSearch",name:"GridHeader-search",icon:"search",placeholder:m,onChange:function(e){e=e.target.value;_&&_(e)},value:b,onClear:function(){return _&&_("")},disabled:t&&!fa(o)})),e&&0<k.length&&fe.createElement("div",{className:"Header-dropdown"},fe.createElement("div",{className:"Header-filters"},k.map(function(e){var n=e.name,t=e.displayName,e=e.filters,e=e?e.map(function(t){return z(z({},t),{},{selected:d[n]&&-1!==d[n].findIndex(function(e){return e===t.value})})}):[];return fe.createElement(Ae,{key:n,withCheckbox:!0,showApplyButton:!0,inlineLabel:t,icon:"filter_list",options:e,onChange:function(e){var t=n;t=z(z({},d),{},pe({},t,e)),h&&h(t)}})}))),f&&fe.createElement("div",{className:"Header-actions"},f)),fe.createElement("div",{className:"Header-content Header-content--bottom"},fe.createElement("div",{className:"Header-label"},!a&&l&&!t&&fe.createElement(Te,de({},v,{onChange:function(e){g&&g(e.target.checked)}})),t?fe.createElement(I,{withImage:!a&&l},fe.createElement(j,{length:"small",size:"s"})):fe.createElement(fe.Fragment,null,fe.createElement(We,null,u),s&&(null==v?void 0:v.checked)&&S&&fe.createElement("div",{className:"ml-4"},E?fe.createElement(ve,{"data-test":"DesignSystem-Table-Header--clearSelectionItemsButton",size:"tiny",onClick:function(){return C(!1)}},"Clear Selection"):fe.createElement(ve,{"data-test":"DesignSystem-Table-Header--selectAllItemsButton",size:"tiny",onClick:function(){return C(!0)}},"Select all ".concat(y," items"))))),w&&fe.createElement("div",{className:"Header-hideColumns"},fe.createElement(Pa,{options:D,onChange:function(e){e=e.map(function(t){return z(z({},o.find(function(e){return e.name===t.value})),{},{hidden:!t.selected})});p&&p(e)}}))))}var La=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ca(t,e);var n,r=ka(o);function o(e){var t;if(this instanceof o)return(t=r.call(this,e)).state={offset:e.offset},t.lastScrollTop=0,t.avgRowHeight=e.minItemHeight,t;throw new TypeError("Cannot call a class as a function")}return t=o,(e=[{key:"componentDidMount",value:function(){var e=this;window.requestAnimationFrame(function(){e.listRef&&(e.listRef.scrollTop=e.state.offset*e.avgRowHeight)})}},{key:"componentDidUpdate",value:function(e,t){t.offset>this.state.offset&&this.updateOffset(t)}},{key:"updateOffset",value:function(e){var t=e.offset-this.state.offset;if(this.listRef){for(var n=this.listRef,r=n.querySelectorAll(".VS-item"),o=0,i=e.offset,a=Math.min(this.state.offset,this.props.buffer),t=a+t,s=Math.min(r.length,t)-1;a<=s;s--){if(!Da(n,r[s]))break;i--,o+=r[s].clientHeight}r.length<t&&(o+=(t=t-r.length)*this.props.minItemHeight,i-=t);t=0===i?this.props.minItemHeight:(this.avgRowHeight*e.offset-o)/i;this.setState({offset:i}),this.avgRowHeight=Math.max(this.props.minItemHeight,t)}}},{key:"onScrollHandler",value:function(e){if(this.listRef){var t=this.props,n=t.totalLength,r=t.length,t=t.buffer,o=this.state.offset,i=this.avgRowHeight,a=this.listRef,s=a.scrollTop,c=Math.floor(s-this.lastScrollTop);if(0===c)return;var u=a.querySelectorAll(".VS-item"),l=o,f=Math.min(o,t);if(0<c){if(o<n-r){for(var p=0,d=f;d<u.length;d++){var h=Da(a,u[d]),y=u[d].clientHeight;if(h)break;p+=y,l++}p<c&&(l+=c=Math.floor((c-p)/this.props.minItemHeight),p+=c*this.props.minItemHeight),c=0<l?(o*i+p)/l:this.props.minItemHeight,this.setState({offset:Math.min(l,n-r)}),this.avgRowHeight=Math.max(this.props.minItemHeight,c)}}else{i=u[f].getBoundingClientRect().y-a.getBoundingClientRect().y;0<i&&((c=o-(Math.floor(i/this.props.minItemHeight)||1))<n-(r+t)&&this.setState({offset:Math.max(0,c)}))}this.lastScrollTop=s}this.props.onScroll&&this.props.onScroll(e)}},{key:"renderItems",value:function(r,e){var o=this.props.renderItem;return Array.from({length:e-r+1},function(e,t){var t=r+t,n=o(t);return fe.cloneElement(n,{key:t,className:["VS-item",n.props.className].join(" ").trim()})})}},{key:"render",value:function(){var t=this,e=this.props,n=e.totalLength,r=e.length,o=e.buffer,i=(e.offset,e.renderItems,e.minItemHeight,e.forwardRef),e=Oa(e,["totalLength","length","buffer","offset","renderItems","minItemHeight","forwardRef"]),a=this.state,s=a.init,a=a.offset,c=this.avgRowHeight,u=Math.max(0,a-o),a=Math.min(a+(r+o)-1,n-1),r=Math.max(0,u*c),o=Math.max(0,(n-a-1)*c);return fe.createElement("div",Sa({},e,{ref:function(e){t.listRef=e,i&&(i.current=e),s||t.setState({init:!0})},onScroll:this.onScrollHandler.bind(this)}),s&&fe.createElement(fe.Fragment,null,fe.createElement("div",{style:{flexShrink:0,height:r}}),this.renderItems(u,a),fe.createElement("div",{style:{flexShrink:0,height:o}})))}}])&&wa(t.prototype,e),n&&wa(t,n),o}(fe.Component),Fa=(r={buffer:10,length:30,offset:0},(u="defaultProps")in(o=La)?Object.defineProperty(o,u,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[u]=r,fe.forwardRef(function(e,t){return fe.createElement(La,Sa({key:e.totalLength,forwardRef:t},e))})),Ba=(Ta.defaultProps={data:{}},function(){e(n,fe["Component"]);var t=h(n);function n(e){var i;d(this,n),pe(V(i=t.call(this,e)),"gridRef",null),pe(V(i),"isHeadSyncing",!1),pe(V(i),"isBodySyncing",!1),pe(V(i),"syncScroll",function(n){return function(){var e=i.gridRef.querySelector(".Grid-head"),t=i.gridRef.querySelector(".Grid-body");"head"===n&&(i.isHeadSyncing||(i.isBodySyncing=!0,t.scrollLeft=e.scrollLeft),i.isHeadSyncing=!1),"body"===n&&(i.isBodySyncing||(i.isHeadSyncing=!0,e.scrollLeft=t.scrollLeft),i.isBodySyncing=!1)}}),pe(V(i),"updateRenderedSchema",function(e){var t=i.props.updateSchema;t&&t(e)}),pe(V(i),"updateColumnSchema",function(t,e){var n=H(i.props.schema),r=n.findIndex(function(e){return e.name===t});n[r]=z(z({},n[r]),e),i.updateRenderedSchema(n)}),pe(V(i),"reorderColumn",function(t,n){var e=i.props.schema,r=e.findIndex(function(e){return e.name===t}),o=e.findIndex(function(e){return e.name===n}),e=ya(e,r,o);i.updateRenderedSchema(e)}),pe(V(i),"updateSortingList",function(e){var t=i.props.updateSortingList;t&&t(e)}),pe(V(i),"updateFilterList",function(e){var t=i.props.updateFilterList;t&&t(e)}),pe(V(i),"onMenuChange",function(e,t){var n,r,o=i.props.sortingList;switch(t){case"sortAsc":ta({sortingList:o,updateSortingList:i.updateSortingList},e,"asc");break;case"sortDesc":ta({sortingList:o,updateSortingList:i.updateSortingList},e,"desc");break;case"unsort":ta({sortingList:o,updateSortingList:i.updateSortingList},e,"unsort");break;case"pinLeft":na({updateColumnSchema:i.updateColumnSchema},e,"left");break;case"pinRight":na({updateColumnSchema:i.updateColumnSchema},e,"right");break;case"unpin":na({updateColumnSchema:i.updateColumnSchema},e,"unpin");break;case"hide":n={updateColumnSchema:i.updateColumnSchema},r=!0,(0,n.updateColumnSchema)(e,{hidden:r})}}),pe(V(i),"onFilterChange",function(e,t){e=z(z({},i.props.filterList),{},pe({},e,t));i.updateFilterList(e)}),pe(V(i),"onSelect",function(e,t){var n=i.props.onSelect;n&&n(e,t)}),pe(V(i),"onSelectAll",function(e){var t=i.props.onSelectAll;t&&t(e.target.checked)}),pe(V(i),"updatePrevPageInfo",function(e){i.setState({prevPageInfo:e})});return i.state={init:!1,prevPageInfo:{page:1,scrollTop:0}},i}return a(n,[{key:"componentDidMount",value:function(){this.setState({init:!0}),window.addEventListener("resize",this.forceRerender.bind(this))}},{key:"forceRerender",value:function(){this.forceUpdate()}},{key:"componentWillUnmount",value:function(){this.removeScrollListeners(),window.removeEventListener("resize",this.forceRerender.bind(this))}},{key:"componentDidUpdate",value:function(e,t){t.init!==this.state.init&&this.addScrollListeners(),e.page===this.props.page&&e.error===this.props.error||(this.removeScrollListeners(),this.addScrollListeners())}},{key:"addScrollListeners",value:function(){var e=this.gridRef.querySelector(".Grid-head"),t=this.gridRef.querySelector(".Grid-body");e&&t&&(e.addEventListener("scroll",this.syncScroll("head")),t.addEventListener("scroll",this.syncScroll("body")))}},{key:"removeScrollListeners",value:function(){var e=this.gridRef.querySelector(".Grid-head"),t=this.gridRef.querySelector(".Grid-body");e&&t&&(e.removeEventListener("scroll",this.syncScroll("head")),t.removeEventListener("scroll",this.syncScroll("body")))}},{key:"render",value:function(){var t=this,e=ge(this.props),n=this.state,r=n.init,n=n.prevPageInfo,o=this.props,i=o.type,a=o.size,s=o.showHead,c=o.className,u=o.page,l=o.loading,o=o.loaderSchema,l=(f=this.props.schema,l=l,o=o,f=!fa(f=f)&&l?o:f),f=ye((pe(o={Grid:"true"},"Grid--".concat(i),i),pe(o,"Grid--".concat(a),a),o),c);return fe.createElement("div",de({className:f},e,{ref:function(e){t.gridRef=e}}),r&&fe.createElement(va,{value:z(z({},this.props),{},{ref:this.gridRef})},s&&fe.createElement(ha,{schema:l,onSelectAll:null==(i=this.onSelectAll)?void 0:i.bind(this),onMenuChange:this.onMenuChange.bind(this),onFilterChange:this.onFilterChange.bind(this),updateColumnSchema:this.updateColumnSchema.bind(this),reorderColumn:this.reorderColumn.bind(this)}),fe.createElement(ja,{key:"".concat(u),schema:l,prevPageInfo:n,updatePrevPageInfo:this.updatePrevPageInfo.bind(this),onSelect:this.onSelect.bind(this)})))}}]),n}()),za=(pe(Ba,"defaultProps",void 0),Ba.defaultProps=n,Aa.displayName="GridCell",["children"]),p={type:"data",size:"standard",showHead:!0,showMenu:!0,multipleSorting:!0,headerOptions:{},withPagination:!0,paginationType:"jump",page:1,pageSize:15,draggable:!0,data:[],schema:[],loading:!(Ra.defaultProps={schema:[],data:[],searchPlaceholder:"Search",dynamicColumn:!0,showFilters:!0}),error:!1,loaderSchema:[],sortingList:[],filterList:{},filterPosition:"GRID",searchDebounceDuration:750,errorTemplate:function(e){e=e.errorType;return fe.createElement(pt,null,{FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No results found"}[void 0===e?"DEFAULT":e])}},c=function(){e(i,fe["Component"]);var o=h(i);function i(e){d(this,i),pe(V(l=o.call(this,e)),"debounceUpdate",void 0),pe(V(l),"updateData",function(e){l.state.async&&l.setState({loading:!0}),e?l.debounceUpdate():l.updateDataFn()}),pe(V(l),"updateDataFn",function(){var e=l.props,t=e.fetchData,n=e.pageSize,r=e.withPagination,o=e.data,e=e.onSearch,i=l.state,a=i.async,s=i.page,c=i.sortingList,u=i.filterList,i=i.searchTerm,i=(l.onSelect(-1,!1),{page:s,pageSize:n,sortingList:c,filterList:u,searchTerm:i});l.props.withPagination||(delete i.page,delete i.pageSize),a?t&&t(i).then(function(e){var t,n;(!e.searchTerm||e.searchTerm&&e.searchTerm===l.state.searchTerm)&&(t=e.data,n=(l.state.schema.length?l.state:e).schema,l.setState({data:t,schema:n,selectAll:la(t),totalRecords:e.count,loading:!1,error:!t.length,errorType:"NO_RECORDS_FOUND"}))}).catch(function(){l.setState({loading:!1,error:!0,errorType:"FAILED_TO_FETCH"})}):(t=function(){var o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],i=2<arguments.length?arguments[2]:void 0,a=e;return i&&Object.keys(i).forEach(function(t){var n=i[t],e=o.findIndex(function(e){return e.name===t}),r=o[e].onFilterChange;n.length&&r&&(a=a.filter(function(e){return r(e,n)}))}),a}(a=l.state.schema,o,u),u=(o=function(){var o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],t=2<arguments.length?arguments[2]:void 0,i=H(e);return null!=t&&t.forEach(function(n){var e,r=o.findIndex(function(e){return e.name===n.name});-1!==r&&(e=o[r].comparator,i.sort(void 0===e?function(e,t){e=ca(o[r],e),t=ca(o[r],t);return e[n.name].title.localeCompare(t[n.name].title)}:e),"desc"===n.type&&i.reverse())}),i}(a,e&&void 0!==i.searchTerm?e(t,i.searchTerm):t,c)).length,r&&s&&n&&(o=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=1<arguments.length?arguments[1]:void 0,n=2<arguments.length?arguments[2]:void 0,t=(t-1)*n;return e.slice(t,t+n)}(o,s,n)),e=l.state.schema.length?l.state.schema:a,l.setState({totalRecords:u,error:!o.length,errorType:"NO_RECORDS_FOUND",selectAll:la(o),schema:e,data:o}))}),pe(V(l),"onSelect",function(e,t){var n=l.state.data,r=l.props.onSelect,o=[e],i=n;0<=e&&(i=sa(n,o,{_selected:t}),l.setState({data:i,selectAll:la(i)})),r&&r(o,t,-1===e?[]:i.filter(function(e){return e._selected}))}),pe(V(l),"onSelectAll",function(e,t){var n=l.props.onSelect,r=l.state.data,o=Array.from({length:r.length},function(e,t){return t}),r=sa(r,o,{_selected:e});n&&n(o,e,r.filter(function(e){return e._selected}),t),l.setState({data:r,selectAll:la(r)})}),pe(V(l),"onPageChange",function(e){l.setState({page:e})}),pe(V(l),"updateSchema",function(e){l.setState({schema:e})}),pe(V(l),"updateSortingList",function(e){var t=l.props.multipleSorting;l.setState({sortingList:t?H(e):e.slice(-1),page:1})}),pe(V(l),"updateFilterList",function(e){l.setState({filterList:e,page:1})}),pe(V(l),"updateSearchTerm",function(e){l.setState({searchTerm:e,page:1})});var l,t="fetchData"in l.props,n=e.data||[],r=e.schema||[];return l.state={async:t,data:t?[]:n,schema:t?[]:r,page:e.page,sortingList:e.sortingList,filterList:e.filterList,totalRecords:t?0:n.length,loading:t||e.loading,error:!t&&e.error,errorType:e.errorType,selectAll:la([]),searchTerm:void 0},l.debounceUpdate=Q(e.searchDebounceDuration,l.updateDataFn),l}return a(i,[{key:"componentDidMount",value:function(){this.updateData()}},{key:"componentDidUpdate",value:function(e,t){var n,r=this;this.state.async||e.loading===this.props.loading&&e.error===this.props.error||(n=(e=this.props).data,e=e.schema,this.setState({data:n=void 0===n?[]:n,schema:void 0===e?[]:e,loading:this.props.loading||!1,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:n.length||0,selectAll:la([])},function(){r.updateData()})),t.page!==this.state.page&&(e=this.props.onPageChange)&&e(this.state.page),t.page===this.state.page&&t.filterList===this.state.filterList&&t.sortingList===this.state.sortingList&&t.searchTerm===this.state.searchTerm||this.props.loading||(n=t.searchTerm!==this.state.searchTerm,this.updateData(n))}},{key:"render",value:function(){var e=this.props,t=e.showHead,n=e.type,r=e.size,o=e.headCellTooltip,i=e.separator,a=e.draggable,s=e.nestedRows,c=e.nestedRowRenderer,u=e.withHeader,l=e.headerOptions,f=e.withCheckbox,p=e.showMenu,d=e.withPagination,h=e.paginationType,y=e.pageSize,g=e.onRowClick,m=e.loaderSchema,v=e.errorTemplate,b=e.className,e=e.filterPosition,_=ge(this.props),w=l.children,l=K(l,za),b=b?" ".concat(b):"",S=this.state.totalRecords,E=ua(S,y);return fe.createElement("div",de({},_,{className:"Table".concat(b),"data-test":"DesignSystem-Table-wrapper"}),u&&fe.createElement("div",{className:"Table-header","data-test":"DesignSystem-Table-header"},fe.createElement(Ra,de({},this.state,{updateSchema:this.updateSchema,updateFilterList:this.updateFilterList,updateSearchTerm:this.updateSearchTerm,showHead:t,onSelectAll:this.onSelectAll,withCheckbox:f,withPagination:d,pageSize:y,showFilters:"HEADER"===e},l),w)),fe.createElement("div",{className:"Table-grid"},fe.createElement(Ba,de({},this.state,{key:this.state.searchTerm,updateData:this.updateData,updateSchema:this.updateSchema,updateSortingList:this.updateSortingList,updateFilterList:this.updateFilterList,withCheckbox:f,onSelect:this.onSelect,onSelectAll:this.onSelectAll,showMenu:p,showHead:t,type:n,size:r,headCellTooltip:o,separator:i,draggable:a,nestedRows:s,nestedRowRenderer:c,withPagination:d&&1<E,pageSize:y,loaderSchema:m,errorTemplate:v&&v({errorType:this.state.errorType}),onRowClick:g,showFilters:"GRID"===e}))),d&&!this.state.loading&&!this.state.error&&1<E&&fe.createElement("div",{className:"Table-pagination"},fe.createElement(yi,{page:this.state.page,totalPages:ua(S,y),type:h,onPageChange:this.onPageChange})))}}]),i}();pe(c,"defaultProps",p),fe.useState,fe.useEffect,fe.useState}.call(this,Ha(23))},function(e,t,n){function o(e){if(s[e])return s[e].exports;var t=s[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var r,i,a,s;window,e.exports=(r=n(2),i=n(24),s={},o.m=a=[function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t,n){e.exports=n(3)},function(R,e,t){"use strict";t.r(e);var u=t(0),o=t(1);function l(e){var t=e.getSelection(),e=e.getCurrentContent(),n=t.getStartKey(),r=t.getEndKey(),t=e.getBlockMap();return t.toSeq().skipUntil(function(e,t){return t===n}).takeUntil(function(e,t){return t===r}).concat([[r,t.get(r)]])}function f(e){return l(e).toList()}function c(e){if(e)return f(e).get(0)}function n(e){if(e){var n=c(e),e=e.getCurrentContent().getBlockMap().toSeq().toList(),r=0;if(e.forEach(function(e,t){e.get("key")===n.get("key")&&(r=t-1)}),-1<r)return e.get(r)}}function r(e){return e?e.getCurrentContent().getBlockMap().toList():new o.List}function i(e){var t=f(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function a(e){var t=u.RichUtils.tryToRemoveBlockStyle(e);return t?u.EditorState.push(e,t,"change-block-type"):e}function s(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),o=n.getFocusOffset(),i=f(e);if(0<i.size){n.getIsBackward()&&(e=r,r=o,o=e);for(var a=0;a<i.size;a+=1){var s=0===a?r:0,c=a===i.size-1?o:i.get(a).getText().length;t+=i.get(a).getText().slice(s,c)}}return t}function p(e){var t=e.getCurrentContent(),n=e.getSelection(),n=(t=u.Modifier.removeRange(t,n,"forward")).getSelectionAfter(),r=t.getBlockForKey(n.getStartKey()),t=u.Modifier.insertText(t,n,"\n",r.getInlineStyleAt(n.getStartOffset()),null);return u.EditorState.push(e,t,"insert-fragment")}function d(e){var t=u.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return a(u.EditorState.push(e,t,"split-block"))}function h(e){var t=e.getCurrentContent().getBlockMap().toList(),t=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),t=u.Modifier.removeRange(e.getCurrentContent(),t,"forward");return u.EditorState.push(e,t,"remove-range")}function y(e,t){t=u.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return u.EditorState.push(e,t,"change-block-data")}function g(e){var r=new o.Map({}),t=f(e);if(t&&0<t.size)for(var n=0;n<t.size&&"break"!==function(e){var n=t.get(e).getData();if(!n||0===n.size)return r=r.clear(),"break";if(0===e)r=n;else if(r.forEach(function(e,t){n.get(t)&&n.get(t)===e||(r=r.delete(t))}),0===r.size)return r=r.clear(),"break"}(n);n+=1);return r}var m=Object(o.Map)({code:{element:"pre"}}),v=u.DefaultDraftBlockRenderMap.merge(m);function b(e){return!!e&&("unordered-list-item"===(e=e.getType())||"ordered-list-item"===e)}function _(e,t,n){var r=e.getSelection(),r=r.getIsBackward()?r.getFocusKey():r.getAnchorKey(),o=e.getCurrentContent(),i=o.getBlockForKey(r),a=i.getType();if("unordered-list-item"!==a&&"ordered-list-item"!==a)return e;o=o.getBlockBefore(r);if(!o)return e;if(o.getType()!==a)return e;r=i.getDepth();if(1===t&&r===n)return e;var s,c,a=Math.min(o.getDepth()+1,n),a=(s=t,c=a,r=(i=e).getSelection(),n=(o=i.getCurrentContent()).getBlockMap(),t=l(i).map(function(e){var t=e.getDepth()+s,t=Math.max(0,Math.min(t,c));return e.set("depth",t)}),n=n.merge(t),o.merge({blockMap:n,selectionBefore:r,selectionAfter:r}));return u.EditorState.push(e,a,"adjust-depth")}function w(e,t){if(13===(t=t).which&&(t.getModifierState("Shift")||t.getModifierState("Alt")||t.getModifierState("Control")))return e.getSelection().isCollapsed()?u.RichUtils.insertSoftNewline(e):p(e);var n,r,t=e,e=t.getSelection();return e.isCollapsed()?(n=t.getCurrentContent(),r=e.getStartKey(),b(n=n.getBlockForKey(r))||"unstyled"===n.getType()||n.getLength()!==e.getStartOffset()?b(n)&&0===n.getLength()?0===(r=n.getDepth())?a(t):0<r?_(t,-1,r):void 0:void 0:d(t)):void 0}function S(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e){var t=e.getSelection();if(t.isCollapsed()){var n={},r=e.getCurrentInlineStyle().toList().toJS();if(r)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=0<=r.indexOf(e)}),n}var i=t.getStartOffset(),a=t.getEndOffset(),s=f(e);if(0<s.size){t=function(){for(var n={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},r=0;r<s.size;r+=1){var e=0===r?i:0,t=r===s.size-1?a:s.get(r).getText().length;e===t&&0===e?(e=1,t=2):e===t&&--e;for(var o=e;o<t;o+=1)!function(e){var t=s.get(r).getInlineStyleAt(e);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=n[e]&&t.get(e)===e})}(o)}return{v:n}}();if("object"===C(t))return t.v}return{}}function x(e){var t,n=e.getSelection(),r=n.getStartOffset(),o=n.getEndOffset();r===o&&0===r?o=1:r===o&&--r;for(var i=c(e),a=r;a<o;a+=1){var s=i.getEntityAt(a);if(!s){t=void 0;break}if(a===r)t=s;else if(t!==s){t=void 0;break}}return t}function k(e,t){var n,r=c(e);return r.findEntityRanges(function(e){return e.get("entity")===t},function(e,t){n={start:e,end:t,text:r.get("text").slice(e,t)}}),n}function D(e,t,n){j[e]["".concat(e.toLowerCase(),"-").concat(n)]=E({},"".concat(t),n)}function T(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?S(Object(n),!0).forEach(function(e){E(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},j.color,{},j.bgcolor,{},j.fontSize,{},j.fontFamily,{CODE:j.CODE,SUPERSCRIPT:j.SUPERSCRIPT,SUBSCRIPT:j.SUBSCRIPT})}var j={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function I(e,t,n){var r=e.getSelection(),o=Object.keys(j[t]).reduce(function(e,t){return u.Modifier.removeInlineStyle(e,r,t)},e.getCurrentContent()),o=u.EditorState.push(e,o,"changeinline-style"),e=e.getCurrentInlineStyle();return r.isCollapsed()&&(o=e.reduce(function(e,t){return u.RichUtils.toggleInlineStyle(e,t)},o)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t?e.has(n)||(o=u.RichUtils.toggleInlineStyle(o,n)):e.has("".concat(e="bgcolor"===t?"backgroundColor":t,"-").concat(n))||(o=u.RichUtils.toggleInlineStyle(o,"".concat(t.toLowerCase(),"-").concat(n)),D(t,e,n)),o}function M(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?D("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?D("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?D("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&D("fontFamily","fontFamily",e.substr(11))})}function N(e,t,n){e=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(e&&0<e.size)return e.get(0)}function A(n,c){if(n&&c&&0<c.length){var e=function(){var e=n.getSelection(),o={};if(e.isCollapsed())return c.forEach(function(e){o[e]=function(t){var e=n.getCurrentInlineStyle().toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(e&&0<e.size)return e.get(0)}(e)}),{v:o};var i=e.getStartOffset(),a=e.getEndOffset(),s=f(n);if(0<s.size){for(var t=0;t<s.size;t+=1)!function(n){var e=0===n?i:0,t=n===s.size-1?a:s.get(n).getText().length;e===t&&0===e?(e=1,t=2):e===t&&--e;for(var r=e;r<t;r+=1)!function(t){t===e?c.forEach(function(e){o[e]=N(s.get(n),e,t)}):c.forEach(function(e){o[e]&&o[e]!==N(s.get(n),e,t)&&(o[e]=void 0)})}(r)}(t);return{v:o}}}();if("object"===C(e))return e.v}return{}}function P(t){var e=t.getCurrentInlineStyle(),n=t.getCurrentContent();return e.forEach(function(e){n=u.Modifier.removeInlineStyle(n,t.getSelection(),e)}),u.EditorState.push(t,n,"change-inline-style")}t.d(e,"isListBlock",function(){return b}),t.d(e,"changeDepth",function(){return _}),t.d(e,"handleNewLine",function(){return w}),t.d(e,"getEntityRange",function(){return k}),t.d(e,"getCustomStyleMap",function(){return T}),t.d(e,"toggleCustomInlineStyle",function(){return I}),t.d(e,"getSelectionEntity",function(){return x}),t.d(e,"extractInlineStyle",function(){return M}),t.d(e,"removeAllInlineStyles",function(){return P}),t.d(e,"getSelectionInlineStyle",function(){return O}),t.d(e,"getSelectionCustomInlineStyle",function(){return A}),t.d(e,"getSelectedBlocksMap",function(){return l}),t.d(e,"getSelectedBlocksList",function(){return f}),t.d(e,"getSelectedBlock",function(){return c}),t.d(e,"getBlockBeforeSelectedBlock",function(){return n}),t.d(e,"getAllBlocks",function(){return r}),t.d(e,"getSelectedBlocksType",function(){return i}),t.d(e,"removeSelectedBlocksStyle",function(){return a}),t.d(e,"getSelectionText",function(){return s}),t.d(e,"addLineBreakRemovingSelection",function(){return p}),t.d(e,"insertNewUnstyledBlock",function(){return d}),t.d(e,"clearEditorContent",function(){return h}),t.d(e,"setBlockData",function(){return y}),t.d(e,"getSelectedBlocksMetadata",function(){return g}),t.d(e,"blockRenderMap",function(){return v})}],o.c=s,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2))},function(e,t,n){var r;
|
|
39
39
|
/*!
|
|
40
40
|
Copyright (c) 2018 Jed Watson.
|
|
41
41
|
Licensed under the MIT License (MIT), see
|
|
42
42
|
http://jedwatson.github.io/classnames
|
|
43
43
|
*/
|
|
44
|
-
!function(){"use strict";var a={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r,o=typeof n;if("string"==o||"number"==o)e.push(n);else if(Array.isArray(n))!n.length||(r=s.apply(null,n))&&e.push(r);else if("object"==o)if(n.toString===Object.prototype.toString)for(var i in n)a.call(n,i)&&n[i]&&e.push(i);else e.push(n.toString())}}return e.join(" ")}e.exports?e.exports=s.default=s:void 0===(r=function(){return s}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){e.exports=function(){"use strict";var r=Array.prototype.slice;function e(e,t){if(t)e.prototype=Object.create(t.prototype);e.prototype.constructor=e}function u(e){return h(e)?e:X(e)}function l(e){return y(e)?e:Q(e)}function f(e){return g(e)?e:ee(e)}function o(e){return h(e)&&!m(e)?e:te(e)}function h(e){return!!(e&&e[a])}function y(e){return!!(e&&e[w])}function g(e){return!!(e&&e[S])}function m(e){return y(e)||g(e)}function _(e){return!!(e&&e[E])}e(l,u),e(f,u),e(o,u),u.isIterable=h,u.isKeyed=y,u.isIndexed=g,u.isAssociative=m,u.isOrdered=_,u.Keyed=l,u.Indexed=f,u.Set=o;var a="@@__IMMUTABLE_ITERABLE__@@",w="@@__IMMUTABLE_KEYED__@@",S="@@__IMMUTABLE_INDEXED__@@",E="@@__IMMUTABLE_ORDERED__@@",C="delete",b=5,O=1<<b,x=O-1,v={},k={value:false},D={value:false};function T(e){e.value=false;return e}function j(e){e&&(e.value=true)}function I(){}function M(e,t){t=t||0;var n=Math.max(0,e.length-t);var r=new Array(n);for(var o=0;o<n;o++)r[o]=e[o+t];return r}function N(e){if(e.size===undefined)e.size=e.__iterate(P);return e.size}function A(e,t){if(typeof t!=="number"){var n=t>>>0;if(""+n!==t||n===4294967295)return NaN;t=n}return t<0?N(e)+t:t}function P(){return true}function R(e,t,n){return(e===0||n!==undefined&&e<=-n)&&(t===undefined||n!==undefined&&t>=n)}function L(e,t){return B(e,t,0)}function F(e,t){return B(e,t,t)}function B(e,t,n){return e===undefined?n:e<0?Math.max(0,t+e):t===undefined?e:Math.min(t,e)}var z=0,K=1,H=2,U=typeof Symbol==="function"&&Symbol.iterator,q="@@iterator",W=U||q;function p(e){this.next=e}function d(e,t,n,r){var o=e===0?t:e===1?n:[t,n];r?r.value=o:r={value:o,done:false};return r}function V(){return{value:undefined,done:true}}function G(e){return!!Z(e)}function Y(e){return e&&typeof e.next==="function"}function $(e){var t=Z(e);return t&&t.call(e)}function Z(e){var t=e&&(U&&e[U]||e[q]);if(typeof t==="function")return t}function J(e){return e&&typeof e.length==="number"}function X(e){return e===null||e===undefined?fe():h(e)?e.toSeq():he(e)}function Q(e){return e===null||e===undefined?fe().toKeyedSeq():h(e)?y(e)?e.toSeq():e.fromEntrySeq():pe(e)}function ee(e){return e===null||e===undefined?fe():!h(e)?de(e):y(e)?e.entrySeq():e.toIndexedSeq()}function te(e){return(e===null||e===undefined?fe():!h(e)?de(e):y(e)?e.entrySeq():e).toSetSeq()}p.prototype.toString=function(){return"[Iterator]"},p.KEYS=z,p.VALUES=K,p.ENTRIES=H,p.prototype.inspect=p.prototype.toSource=function(){return this.toString()},p.prototype[W]=function(){return this},e(X,u),X.of=function(){return X(arguments)},X.prototype.toSeq=function(){return this},X.prototype.toString=function(){return this.__toString("Seq {","}")},X.prototype.cacheResult=function(){if(!this._cache&&this.__iterateUncached){this._cache=this.entrySeq().toArray();this.size=this._cache.length}return this},X.prototype.__iterate=function(e,t){return ge(this,e,t,true)},X.prototype.__iterator=function(e,t){return me(this,e,t,true)},e(Q,X),Q.prototype.toKeyedSeq=function(){return this},e(ee,X),ee.of=function(){return ee(arguments)},ee.prototype.toIndexedSeq=function(){return this},ee.prototype.toString=function(){return this.__toString("Seq [","]")},ee.prototype.__iterate=function(e,t){return ge(this,e,t,false)},ee.prototype.__iterator=function(e,t){return me(this,e,t,false)},e(te,X),te.of=function(){return te(arguments)},te.prototype.toSetSeq=function(){return this},X.isSeq=le,X.Keyed=Q,X.Set=te,X.Indexed=ee;var ne="@@__IMMUTABLE_SEQ__@@",re,oe,ie;function ae(e){this._array=e;this.size=e.length}function se(e){var t=Object.keys(e);this._object=e;this._keys=t;this.size=t.length}function ce(e){this._iterable=e;this.size=e.length||e.size}function ue(e){this._iterator=e;this._iteratorCache=[]}function le(e){return!!(e&&e[ne])}function fe(){return re||(re=new ae([]))}function pe(e){var t=Array.isArray(e)?new ae(e).fromEntrySeq():Y(e)?new ue(e).fromEntrySeq():G(e)?new ce(e).fromEntrySeq():typeof e==="object"?new se(e):undefined;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, "+"or keyed object: "+e);return t}function de(e){var t=ye(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function he(e){var t=ye(e)||typeof e==="object"&&new se(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function ye(e){return J(e)?new ae(e):Y(e)?new ue(e):G(e)?new ce(e):undefined}function ge(e,t,n,r){var o=e._cache;if(o){var i=o.length-1;for(var a=0;a<=i;a++){var s=o[n?i-a:a];if(t(s[1],r?s[0]:a,e)===false)return a+1}return a}return e.__iterateUncached(t,n)}function me(e,t,n,r){var o=e._cache;if(o){var i=o.length-1;var a=0;return new p(function(){var e=o[n?i-a:a];return a++>i?V():d(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function ve(e,t){return t?be(t,e,"",{"":e}):_e(e)}function be(n,r,e,t){if(Array.isArray(r))return n.call(t,e,ee(r).map(function(e,t){return be(n,e,t,r)}));if(we(r))return n.call(t,e,Q(r).map(function(e,t){return be(n,e,t,r)}));return r}function _e(e){if(Array.isArray(e))return ee(e).map(_e).toList();if(we(e))return Q(e).map(_e).toMap();return e}function we(e){return e&&(e.constructor===Object||e.constructor===undefined)}function Se(e,t){if(e===t||e!==e&&t!==t)return true;if(!e||!t)return false;if(typeof e.valueOf==="function"&&typeof t.valueOf==="function"){e=e.valueOf();t=t.valueOf();if(e===t||e!==e&&t!==t)return true;if(!e||!t)return false}if(typeof e.equals==="function"&&typeof t.equals==="function"&&e.equals(t))return true;return false}function Ee(n,e){if(n===e)return true;if(!h(e)||n.size!==undefined&&e.size!==undefined&&n.size!==e.size||n.__hash!==undefined&&e.__hash!==undefined&&n.__hash!==e.__hash||y(n)!==y(e)||g(n)!==g(e)||_(n)!==_(e))return false;if(n.size===0&&e.size===0)return true;var r=!m(n);if(_(n)){var o=n.entries();return e.every(function(e,t){var n=o.next().value;return n&&Se(n[1],e)&&(r||Se(n[0],t))})&&o.next().done}var i=false;if(n.size===undefined)if(e.size===undefined){if(typeof n.cacheResult==="function")n.cacheResult()}else{i=true;var t=n;n=e;e=t}var a=true;var s=e.__iterate(function(e,t){if(r?!n.has(e):i?!Se(e,n.get(t,v)):!Se(n.get(t,v),e)){a=false;return false}});return a&&n.size===s}function Ce(e,t){if(!(this instanceof Ce))return new Ce(e,t);this._value=e;this.size=t===undefined?Infinity:Math.max(0,t);if(this.size===0){if(oe)return oe;oe=this}}function Oe(e,t){if(!e)throw new Error(t)}function xe(e,t,n){if(!(this instanceof xe))return new xe(e,t,n);Oe(n!==0,"Cannot step a Range by 0");e=e||0;if(t===undefined)t=Infinity;n=n===undefined?1:Math.abs(n);if(t<e)n=-n;this._start=e;this._end=t;this._step=n;this.size=Math.max(0,Math.ceil((t-e)/n-1)+1);if(this.size===0){if(ie)return ie;ie=this}}function ke(){throw TypeError("Abstract")}function De(){}function Te(){}function je(){}X.prototype[ne]=true,e(ae,ee),ae.prototype.get=function(e,t){return this.has(e)?this._array[A(this,e)]:t},ae.prototype.__iterate=function(e,t){var n=this._array;var r=n.length-1;for(var o=0;o<=r;o++)if(e(n[t?r-o:o],o,this)===false)return o+1;return o},ae.prototype.__iterator=function(e,t){var n=this._array;var r=n.length-1;var o=0;return new p(function(){return o>r?V():d(e,o,n[t?r-o++:o++])})},e(se,Q),se.prototype.get=function(e,t){if(t!==undefined&&!this.has(e))return t;return this._object[e]},se.prototype.has=function(e){return this._object.hasOwnProperty(e)},se.prototype.__iterate=function(e,t){var n=this._object;var r=this._keys;var o=r.length-1;for(var i=0;i<=o;i++){var a=r[t?o-i:i];if(e(n[a],a,this)===false)return i+1}return i},se.prototype.__iterator=function(t,n){var r=this._object;var o=this._keys;var i=o.length-1;var a=0;return new p(function(){var e=o[n?i-a:a];return a++>i?V():d(t,e,r[e])})},se.prototype[E]=true,e(ce,ee),ce.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable;var r=$(n);var o=0;if(Y(r)){var i;while(!(i=r.next()).done)if(e(i.value,o++,this)===false)break}return o},ce.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable;var r=$(n);if(!Y(r))return new p(V);var o=0;return new p(function(){var e=r.next();return e.done?e:d(t,o++,e.value)})},e(ue,ee),ue.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterator;var r=this._iteratorCache;var o=0;while(o<r.length)if(e(r[o],o++,this)===false)return o;var i;while(!(i=n.next()).done){var a=i.value;r[o]=a;if(e(a,o++,this)===false)break}return o},ue.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterator;var r=this._iteratorCache;var o=0;return new p(function(){if(o>=r.length){var e=n.next();if(e.done)return e;r[o]=e.value}return d(t,o,r[o++])})},e(Ce,ee),Ce.prototype.toString=function(){if(this.size===0)return"Repeat []";return"Repeat [ "+this._value+" "+this.size+" times ]"},Ce.prototype.get=function(e,t){return this.has(e)?this._value:t},Ce.prototype.includes=function(e){return Se(this._value,e)},Ce.prototype.slice=function(e,t){var n=this.size;return R(e,t,n)?this:new Ce(this._value,F(t,n)-L(e,n))},Ce.prototype.reverse=function(){return this},Ce.prototype.indexOf=function(e){if(Se(this._value,e))return 0;return-1},Ce.prototype.lastIndexOf=function(e){if(Se(this._value,e))return this.size;return-1},Ce.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(e(this._value,n,this)===false)return n+1;return n},Ce.prototype.__iterator=function(e,t){var n=this;var r=0;return new p(function(){return r<n.size?d(e,r++,n._value):V()})},Ce.prototype.equals=function(e){return e instanceof Ce?Se(this._value,e._value):Ee(e)},e(xe,ee),xe.prototype.toString=function(){if(this.size===0)return"Range []";return"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},xe.prototype.get=function(e,t){return this.has(e)?this._start+A(this,e)*this._step:t},xe.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},xe.prototype.slice=function(e,t){if(R(e,t,this.size))return this;e=L(e,this.size);t=F(t,this.size);if(t<=e)return new xe(0,0);return new xe(this.get(e,this._end),this.get(t,this._end),this._step)},xe.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},xe.prototype.lastIndexOf=function(e){return this.indexOf(e)},xe.prototype.__iterate=function(e,t){var n=this.size-1;var r=this._step;var o=t?this._start+n*r:this._start;for(var i=0;i<=n;i++){if(e(o,i,this)===false)return i+1;o+=t?-r:r}return i},xe.prototype.__iterator=function(t,n){var r=this.size-1;var o=this._step;var i=n?this._start+r*o:this._start;var a=0;return new p(function(){var e=i;i+=n?-o:o;return a>r?V():d(t,a++,e)})},xe.prototype.equals=function(e){return e instanceof xe?this._start===e._start&&this._end===e._end&&this._step===e._step:Ee(this,e)},e(ke,u),e(De,ke),e(Te,ke),e(je,ke),ke.Keyed=De,ke.Indexed=Te,ke.Set=je;var Ie=typeof Math.imul==="function"&&Math.imul(4294967295,2)===-2?Math.imul:function e(t,n){t=t|0;n=n|0;var r=t&65535;var o=n&65535;return r*o+((t>>>16)*o+r*(n>>>16)<<16>>>0)|0};function Me(e){return e>>>1&1073741824|e&3221225471}function Ne(e){if(e===false||e===null||e===undefined)return 0;if(typeof e.valueOf==="function"){e=e.valueOf();if(e===false||e===null||e===undefined)return 0}if(e===true)return 1;var t=typeof e;if(t==="number"){var n=e|0;if(n!==e)n^=e*4294967295;while(e>4294967295){e/=4294967295;n^=e}return Me(n)}if(t==="string")return e.length>qe?Ae(e):Pe(e);if(typeof e.hashCode==="function")return e.hashCode();if(t==="object")return Re(e);if(typeof e.toString==="function")return Pe(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Ae(e){var t=Ge[e];if(t===undefined){t=Pe(e);if(Ve===We){Ve=0;Ge={}}Ve++;Ge[e]=t}return t}function Pe(e){var t=0;for(var n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Me(t)}function Re(e){var t;if(ze){t=Ke.get(e);if(t!==undefined)return t}t=e[Ue];if(t!==undefined)return t;if(!Fe){t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ue];if(t!==undefined)return t;t=Be(e);if(t!==undefined)return t}t=++He;if(He&1073741824)He=0;if(ze)Ke.set(e,t);else if(Le!==undefined&&Le(e)===false)throw new Error("Non-extensible objects are not allowed as keys.");else if(Fe)Object.defineProperty(e,Ue,{enumerable:false,configurable:false,writable:false,value:t});else if(e.propertyIsEnumerable!==undefined&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable){e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)};e.propertyIsEnumerable[Ue]=t}else if(e.nodeType!==undefined)e[Ue]=t;else throw new Error("Unable to set a non-enumerable property on object.");return t}var Le=Object.isExtensible,Fe=function(){try{Object.defineProperty({},"@",{});return true}catch(e){return false}}();function Be(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var ze=typeof WeakMap==="function",Ke;if(ze)Ke=new WeakMap;var He=0,Ue="__immutablehash__";if(typeof Symbol==="function")Ue=Symbol(Ue);var qe=16,We=255,Ve=0,Ge={};function Ye(e){Oe(e!==Infinity,"Cannot perform this action with an infinite size.")}function c(t){return t===null||t===undefined?st():$e(t)&&!_(t)?t:st().withMutations(function(n){var e=l(t);Ye(e.size);e.forEach(function(e,t){return n.set(t,e)})})}function $e(e){return!!(e&&e[Ze])}e(c,De),c.prototype.toString=function(){return this.__toString("Map {","}")},c.prototype.get=function(e,t){return this._root?this._root.get(0,undefined,e,t):t},c.prototype.set=function(e,t){return ct(this,e,t)},c.prototype.setIn=function(e,t){return this.updateIn(e,v,function(){return t})},c.prototype.remove=function(e){return ct(this,e,v)},c.prototype.deleteIn=function(e){return this.updateIn(e,function(){return v})},c.prototype.update=function(e,t,n){return arguments.length===1?e(this):this.updateIn([e],t,n)},c.prototype.updateIn=function(e,t,n){if(!n){n=t;t=undefined}var r=bt(this,En(e),t,n);return r===v?undefined:r},c.prototype.clear=function(){if(this.size===0)return this;if(this.__ownerID){this.size=0;this._root=null;this.__hash=undefined;this.__altered=true;return this}return st()},c.prototype.merge=function(){return yt(this,undefined,arguments)},c.prototype.mergeWith=function(e){var t=r.call(arguments,1);return yt(this,e,t)},c.prototype.mergeIn=function(e){var t=r.call(arguments,1);return this.updateIn(e,st(),function(e){return typeof e.merge==="function"?e.merge.apply(e,t):t[t.length-1]})},c.prototype.mergeDeep=function(){return yt(this,gt,arguments)},c.prototype.mergeDeepWith=function(e){var t=r.call(arguments,1);return yt(this,mt(e),t)},c.prototype.mergeDeepIn=function(e){var t=r.call(arguments,1);return this.updateIn(e,st(),function(e){return typeof e.mergeDeep==="function"?e.mergeDeep.apply(e,t):t[t.length-1]})},c.prototype.sort=function(e){return qt(dn(this,e))},c.prototype.sortBy=function(e,t){return qt(dn(this,t,e))},c.prototype.withMutations=function(e){var t=this.asMutable();e(t);return t.wasAltered()?t.__ensureOwner(this.__ownerID):this},c.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new I)},c.prototype.asImmutable=function(){return this.__ensureOwner()},c.prototype.wasAltered=function(){return this.__altered},c.prototype.__iterator=function(e,t){return new rt(this,e,t)},c.prototype.__iterate=function(t,e){var n=this;var r=0;this._root&&this._root.iterate(function(e){r++;return t(e[1],e[0],n)},e);return r},c.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;if(!e){this.__ownerID=e;this.__altered=false;return this}return at(this.size,this._root,e,this.__hash)},c.isMap=$e;var Ze="@@__IMMUTABLE_MAP__@@",i=c.prototype,Je;function Xe(e,t){this.ownerID=e;this.entries=t}function Qe(e,t,n){this.ownerID=e;this.bitmap=t;this.nodes=n}function et(e,t,n){this.ownerID=e;this.count=t;this.nodes=n}function tt(e,t,n){this.ownerID=e;this.keyHash=t;this.entries=n}function nt(e,t,n){this.ownerID=e;this.keyHash=t;this.entry=n}function rt(e,t,n){this._type=t;this._reverse=n;this._stack=e._root&&it(e._root)}function ot(e,t){return d(e,t[0],t[1])}function it(e,t){return{node:e,index:0,__prev:t}}function at(e,t,n,r){var o=Object.create(i);o.size=e;o._root=t;o.__ownerID=n;o.__hash=r;o.__altered=false;return o}function st(){return Je||(Je=at(0))}function ct(e,t,n){var r;var o;if(!e._root){if(n===v)return e;o=1;r=new Xe(e.__ownerID,[[t,n]])}else{var i=T(k);var a=T(D);r=ut(e._root,e.__ownerID,0,undefined,t,n,i,a);if(!a.value)return e;o=e.size+(i.value?n===v?-1:1:0)}if(e.__ownerID){e.size=o;e._root=r;e.__hash=undefined;e.__altered=true;return e}return r?at(o,r):st()}function ut(e,t,n,r,o,i,a,s){if(!e){if(i===v)return e;j(s);j(a);return new nt(t,r,[o,i])}return e.update(t,n,r,o,i,a,s)}function lt(e){return e.constructor===nt||e.constructor===tt}function ft(e,t,n,r,o){if(e.keyHash===r)return new tt(t,r,[e.entry,o]);var i=(n===0?e.keyHash:e.keyHash>>>n)&x;var a=(n===0?r:r>>>n)&x;var s;var c=i===a?[ft(e,t,n+b,r,o)]:(s=new nt(t,r,o),i<a?[e,s]:[s,e]);return new Qe(t,1<<i|1<<a,c)}function pt(e,t,n,r){if(!e)e=new I;var o=new nt(e,Ne(n),[n,r]);for(var i=0;i<t.length;i++){var a=t[i];o=o.update(e,0,undefined,a[0],a[1])}return o}function dt(e,t,n,r){var o=0;var i=0;var a=new Array(n);for(var s=0,c=1,l=t.length;s<l;s++,c<<=1){var u=t[s];if(u!==undefined&&s!==r){o|=c;a[i++]=u}}return new Qe(e,o,a)}function ht(e,t,n,r,o){var i=0;var a=new Array(O);for(var s=0;n!==0;s++,n>>>=1)a[s]=n&1?t[i++]:undefined;a[r]=o;return new et(e,i+1,a)}function yt(e,t,n){var r=[];for(var o=0;o<n.length;o++){var i=n[o];var a=l(i);if(!h(i))a=a.map(function(e){return ve(e)});r.push(a)}return vt(e,t,r)}function gt(e,t,n){return e&&e.mergeDeep&&h(t)?e.mergeDeep(t):Se(e,t)?e:t}function mt(o){return function(e,t,n){if(e&&e.mergeDeepWith&&h(t))return e.mergeDeepWith(o,t);var r=o(e,t,n);return Se(e,r)?e:r}}function vt(e,o,n){n=n.filter(function(e){return e.size!==0});if(n.length===0)return e;if(e.size===0&&!e.__ownerID&&n.length===1)return e.constructor(n[0]);return e.withMutations(function(r){var e=o?function(t,n){r.update(n,v,function(e){return e===v?t:o(e,t,n)})}:function(e,t){r.set(t,e)};for(var t=0;t<n.length;t++)n[t].forEach(e)})}function bt(e,t,n,r){var o=e===v;var i=t.next();if(i.done){var a=o?n:e;var s=r(a);return s===a?e:s}Oe(o||e&&e.set,"invalid keyPath");var c=i.value;var l=o?v:e.get(c,v);var u=bt(l,t,n,r);return u===l?e:u===v?e.remove(c):(o?st():e).set(c,u)}function _t(e){e=e-(e>>1&1431655765);e=(e&858993459)+(e>>2&858993459);e=e+(e>>4)&252645135;e=e+(e>>8);e=e+(e>>16);return e&127}function wt(e,t,n,r){var o=r?e:M(e);o[t]=n;return o}function St(e,t,n,r){var o=e.length+1;if(r&&t+1===o){e[t]=n;return e}var i=new Array(o);var a=0;for(var s=0;s<o;s++)if(s===t){i[s]=n;a=-1}else i[s]=e[s+a];return i}function Et(e,t,n){var r=e.length-1;if(n&&t===r){e.pop();return e}var o=new Array(r);var i=0;for(var a=0;a<r;a++){if(a===t)i=1;o[a]=e[a+i]}return o}i[Ze]=true,i[C]=i.remove,i.removeIn=i.deleteIn,Xe.prototype.get=function(e,t,n,r){var o=this.entries;for(var i=0,a=o.length;i<a;i++)if(Se(n,o[i][0]))return o[i][1];return r},Xe.prototype.update=function(e,l,f,t,n,p,d){var r=n===v;var o=this.entries;var i=0;for(var a=o.length;i<a;i++)if(Se(t,o[i][0]))break;var s=i<a;if(s?o[i][1]===n:r)return this;j(d);(r||!s)&&j(p);if(r&&o.length===1)return;if(!s&&!r&&o.length>=Ct)return pt(e,o,t,n);var c=e&&e===this.ownerID;var u=c?o:M(o);if(s)if(r)i===a-1?u.pop():u[i]=u.pop();else u[i]=[t,n];else u.push([t,n]);if(c){this.entries=u;return this}return new Xe(e,u)},Qe.prototype.get=function(e,t,n,r){if(t===undefined)t=Ne(n);var o=1<<((e===0?t:t>>>e)&x);var i=this.bitmap;return(i&o)===0?r:this.nodes[_t(i&o-1)].get(e+b,t,n,r)},Qe.prototype.update=function(e,t,n,l,f,p,d){if(n===undefined)n=Ne(l);var h=(t===0?n:n>>>t)&x;var r=1<<h;var o=this.bitmap;var i=(o&r)!==0;if(!i&&f===v)return this;var a=_t(o&r-1);var s=this.nodes;var y=i?s[a]:undefined;var c=ut(y,e,t+b,n,l,f,p,d);if(c===y)return this;if(!i&&c&&s.length>=Ot)return ht(e,s,o,h,c);if(i&&!c&&s.length===2&<(s[a^1]))return s[a^1];if(i&&c&&s.length===1&<(c))return c;var u=e&&e===this.ownerID;var g=i?c?o:o^r:o|r;var m=i?c?wt(s,a,c,u):Et(s,a,u):St(s,a,c,u);if(u){this.bitmap=g;this.nodes=m;return this}return new Qe(e,g,m)},et.prototype.get=function(e,t,n,r){if(t===undefined)t=Ne(n);var o=(e===0?t:t>>>e)&x;var i=this.nodes[o];return i?i.get(e+b,t,n,r):r},et.prototype.update=function(e,t,n,r,o,l,f){if(n===undefined)n=Ne(r);var i=(t===0?n:n>>>t)&x;var p=o===v;var a=this.nodes;var s=a[i];if(p&&!s)return this;var c=ut(s,e,t+b,n,r,o,l,f);if(c===s)return this;var u=this.count;if(!s)u++;else if(!c){u--;if(u<xt)return dt(e,a,u,i)}var d=e&&e===this.ownerID;var h=wt(a,i,c,d);if(d){this.count=u;this.nodes=h;return this}return new et(e,u,h)},tt.prototype.get=function(e,t,n,r){var o=this.entries;for(var i=0,a=o.length;i<a;i++)if(Se(n,o[i][0]))return o[i][1];return r},tt.prototype.update=function(e,l,t,n,r,f,p){if(t===undefined)t=Ne(n);var o=r===v;if(t!==this.keyHash){if(o)return this;j(p);j(f);return ft(this,e,l,t,[n,r])}var i=this.entries;var a=0;for(var s=i.length;a<s;a++)if(Se(n,i[a][0]))break;var c=a<s;if(c?i[a][1]===r:o)return this;j(p);(o||!c)&&j(f);if(o&&s===2)return new nt(e,this.keyHash,i[a^1]);var d=e&&e===this.ownerID;var u=d?i:M(i);if(c)if(o)a===s-1?u.pop():u[a]=u.pop();else u[a]=[n,r];else u.push([n,r]);if(d){this.entries=u;return this}return new tt(e,this.keyHash,u)},nt.prototype.get=function(e,t,n,r){return Se(n,this.entry[0])?this.entry[1]:r},nt.prototype.update=function(e,t,n,r,o,i,a){var s=o===v;var c=Se(r,this.entry[0]);if(c?o===this.entry[1]:s)return this;j(a);if(s){j(i);return}if(c){if(e&&e===this.ownerID){this.entry[1]=o;return this}return new nt(e,this.keyHash,[r,o])}j(i);return ft(this,e,t,Ne(r),[r,o])},Xe.prototype.iterate=tt.prototype.iterate=function(e,t){var n=this.entries;for(var r=0,o=n.length-1;r<=o;r++)if(e(n[t?o-r:r])===false)return false},Qe.prototype.iterate=et.prototype.iterate=function(e,t){var n=this.nodes;for(var r=0,o=n.length-1;r<=o;r++){var i=n[t?o-r:r];if(i&&i.iterate(e,t)===false)return false}},nt.prototype.iterate=function(e,t){return e(this.entry)},e(rt,p),rt.prototype.next=function(){var e=this._type;var t=this._stack;while(t){var n=t.node;var r=t.index++;var o;if(n.entry){if(r===0)return ot(e,n.entry)}else if(n.entries){o=n.entries.length-1;if(r<=o)return ot(e,n.entries[this._reverse?o-r:r])}else{o=n.nodes.length-1;if(r<=o){var i=n.nodes[this._reverse?o-r:r];if(i){if(i.entry)return ot(e,i.entry);t=this._stack=it(i,t)}continue}}t=this._stack=this._stack.__prev}return V()};var Ct=O/4,Ot=O/2,xt=O/4;function t(e){var t=Rt();if(e===null||e===undefined)return t;if(kt(e))return e;var r=f(e);var o=r.size;if(o===0)return t;Ye(o);if(o>0&&o<O)return Pt(0,o,b,null,new jt(r.toArray()));return t.withMutations(function(n){n.setSize(o);r.forEach(function(e,t){return n.set(t,e)})})}function kt(e){return!!(e&&e[Dt])}e(t,Te),t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){e=A(this,e);if(e>=0&&e<this.size){e+=this._origin;var n=zt(this,e);return n&&n.array[e&x]}return t},t.prototype.set=function(e,t){return Lt(this,e,t)},t.prototype.remove=function(e){return!this.has(e)?this:e===0?this.shift():e===this.size-1?this.pop():this.splice(e,1)},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){if(this.size===0)return this;if(this.__ownerID){this.size=this._origin=this._capacity=0;this._level=b;this._root=this._tail=null;this.__hash=undefined;this.__altered=true;return this}return Rt()},t.prototype.push=function(){var n=arguments;var r=this.size;return this.withMutations(function(e){Kt(e,0,r+n.length);for(var t=0;t<n.length;t++)e.set(r+t,n[t])})},t.prototype.pop=function(){return Kt(this,0,-1)},t.prototype.unshift=function(){var n=arguments;return this.withMutations(function(e){Kt(e,-n.length);for(var t=0;t<n.length;t++)e.set(t,n[t])})},t.prototype.shift=function(){return Kt(this,1)},t.prototype.merge=function(){return Ht(this,undefined,arguments)},t.prototype.mergeWith=function(e){var t=r.call(arguments,1);return Ht(this,e,t)},t.prototype.mergeDeep=function(){return Ht(this,gt,arguments)},t.prototype.mergeDeepWith=function(e){var t=r.call(arguments,1);return Ht(this,mt(e),t)},t.prototype.setSize=function(e){return Kt(this,0,e)},t.prototype.slice=function(e,t){var n=this.size;if(R(e,t,n))return this;return Kt(this,L(e,n),F(t,n))},t.prototype.__iterator=function(t,e){var n=0;var r=At(this,e);return new p(function(){var e=r();return e===It?V():d(t,n++,e)})},t.prototype.__iterate=function(e,t){var n=0;var r=At(this,t);var o;while((o=r())!==It)if(e(o,n++,this)===false)break;return n},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;if(!e){this.__ownerID=e;return this}return Pt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash)},t.isList=kt;var Dt="@@__IMMUTABLE_LIST__@@",Tt=t.prototype;function jt(e,t){this.array=e;this.ownerID=t}Tt[Dt]=true,Tt[C]=Tt.remove,Tt.setIn=i.setIn,Tt.deleteIn=Tt.removeIn=i.removeIn,Tt.update=i.update,Tt.updateIn=i.updateIn,Tt.mergeIn=i.mergeIn,Tt.mergeDeepIn=i.mergeDeepIn,Tt.withMutations=i.withMutations,Tt.asMutable=i.asMutable,Tt.asImmutable=i.asImmutable,Tt.wasAltered=i.wasAltered,jt.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:false||this.array.length===0)return this;var r=n>>>t&x;if(r>=this.array.length)return new jt([],e);var o=r===0;var i;if(t>0){var a=this.array[r];i=a&&a.removeBefore(e,t-b,n);if(i===a&&o)return this}if(o&&!i)return this;var s=Bt(this,e);if(!o)for(var c=0;c<r;c++)s.array[c]=undefined;if(i)s.array[r]=i;return s},jt.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||this.array.length===0)return this;var r=n-1>>>t&x;if(r>=this.array.length)return this;var o;if(t>0){var i=this.array[r];o=i&&i.removeAfter(e,t-b,n);if(o===i&&r===this.array.length-1)return this}var a=Bt(this,e);a.array.splice(r+1);if(o)a.array[r]=o;return a};var It={},Mt,Nt;function At(e,c){var u=e._origin;var l=e._capacity;var i=Ut(l);var a=e._tail;return f(e._root,e._level,0);function f(e,t,n){return t===0?r(e,n):o(e,t,n)}function r(e,t){var n=t===i?a&&a.array:e&&e.array;var r=t>u?0:u-t;var o=l-t;if(o>O)o=O;return function(){if(r===o)return It;var e=c?--o:r++;return n&&n[e]}}function o(e,n,r){var o;var i=e&&e.array;var a=r>u?0:u-r>>n;var s=(l-r>>n)+1;if(s>O)s=O;return function(){do{if(o){var e=o();if(e!==It)return e;o=null}if(a===s)return It;var t=c?--s:a++;o=f(i&&i[t],n-b,r+(t<<n))}while(true)}}}function Pt(e,t,n,r,o,i,a){var s=Object.create(Tt);s.size=t-e;s._origin=e;s._capacity=t;s._level=n;s._root=r;s._tail=o;s.__ownerID=i;s.__hash=a;s.__altered=false;return s}function Rt(){return Mt||(Mt=Pt(0,0,b))}function Lt(e,t,n){t=A(e,t);if(t!==t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Kt(e,t).set(0,n):Kt(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail;var o=e._root;var i=T(D);if(t>=Ut(e._capacity))r=Ft(r,e.__ownerID,0,t,n,i);else o=Ft(o,e.__ownerID,e._level,t,n,i);if(!i.value)return e;if(e.__ownerID){e._root=o;e._tail=r;e.__hash=undefined;e.__altered=true;return e}return Pt(e._origin,e._capacity,e._level,o,r)}function Ft(e,t,n,r,o,i){var a=r>>>n&x;var s=e&&a<e.array.length;if(!s&&o===undefined)return e;var c;if(n>0){var u=e&&e.array[a];var l=Ft(u,t,n-b,r,o,i);if(l===u)return e;c=Bt(e,t);c.array[a]=l;return c}if(s&&e.array[a]===o)return e;j(i);c=Bt(e,t);if(o===undefined&&a===c.array.length-1)c.array.pop();else c.array[a]=o;return c}function Bt(e,t){if(t&&e&&t===e.ownerID)return e;return new jt(e?e.array.slice():[],t)}function zt(e,t){if(t>=Ut(e._capacity))return e._tail;if(t<1<<e._level+b){var n=e._root;var r=e._level;while(n&&r>0){n=n.array[t>>>r&x];r-=b}return n}}function Kt(e,l,t){if(l!==undefined)l=l|0;if(t!==undefined)t=t|0;var n=e.__ownerID||new I;var f=e._origin;var p=e._capacity;var r=f+l;var o=t===undefined?p:t<0?p+t:f+t;if(r===f&&o===p)return e;if(r>=o)return e.clear();var i=e._level;var a=e._root;var s=0;while(r+s<0){a=new jt(a&&a.array.length?[undefined,a]:[],n);i+=b;s+=1<<i}if(s){r+=s;f+=s;o+=s;p+=s}var d=Ut(p);var c=Ut(o);while(c>=1<<i+b){a=new jt(a&&a.array.length?[a]:[],n);i+=b}var h=e._tail;var u=c<d?zt(e,o-1):c>d?new jt([],n):h;if(h&&c>d&&r<p&&h.array.length){a=Bt(a,n);var y=a;for(var g=i;g>b;g-=b){var m=d>>>g&x;y=y.array[m]=Bt(y.array[m],n)}y.array[d>>>b&x]=h}if(o<p)u=u&&u.removeAfter(n,0,o);if(r>=c){r-=c;o-=c;i=b;a=null;u=u&&u.removeBefore(n,0,r)}else if(r>f||c<d){s=0;while(a){var v=r>>>i&x;if(v!==c>>>i&x)break;if(v)s+=(1<<i)*v;i-=b;a=a.array[v]}if(a&&r>f)a=a.removeBefore(n,i,r-s);if(a&&c<d)a=a.removeAfter(n,i,c-s);if(s){r-=s;o-=s}}if(e.__ownerID){e.size=o-r;e._origin=r;e._capacity=o;e._level=i;e._root=a;e._tail=u;e.__hash=undefined;e.__altered=true;return e}return Pt(r,o,i,a,u)}function Ht(e,t,n){var r=[];var o=0;for(var i=0;i<n.length;i++){var a=n[i];var s=f(a);if(s.size>o)o=s.size;if(!h(a))s=s.map(function(e){return ve(e)});r.push(s)}if(o>e.size)e=e.setSize(o);return vt(e,t,r)}function Ut(e){return e<O?0:e-1>>>b<<b}function qt(t){return t===null||t===undefined?Gt():Wt(t)?t:Gt().withMutations(function(n){var e=l(t);Ye(e.size);e.forEach(function(e,t){return n.set(t,e)})})}function Wt(e){return $e(e)&&_(e)}function Vt(e,t,n,r){var o=Object.create(qt.prototype);o.size=e?e.size:0;o._map=e;o._list=t;o.__ownerID=n;o.__hash=r;return o}function Gt(){return Nt||(Nt=Vt(st(),Rt()))}function Yt(e,t,n){var r=e._map;var o=e._list;var i=r.get(t);var a=i!==undefined;var s;var c;if(n===v){if(!a)return e;if(o.size>=O&&o.size>=r.size*2){c=o.filter(function(e,t){return e!==undefined&&i!==t});s=c.toKeyedSeq().map(function(e){return e[0]}).flip().toMap();if(e.__ownerID)s.__ownerID=c.__ownerID=e.__ownerID}else{s=r.remove(t);c=i===o.size-1?o.pop():o.set(i,undefined)}}else if(a){if(n===o.get(i)[1])return e;s=r;c=o.set(i,[t,n])}else{s=r.set(t,o.size);c=o.set(o.size,[t,n])}if(e.__ownerID){e.size=s.size;e._map=s;e._list=c;e.__hash=undefined;return e}return Vt(s,c)}function $t(e,t){this._iter=e;this._useKeys=t;this.size=e.size}function Zt(e){this._iter=e;this.size=e.size}function Jt(e){this._iter=e;this.size=e.size}function Xt(e){this._iter=e;this.size=e.size}function Qt(o){var e=_n(o);e._iter=o;e.size=o.size;e.flip=function(){return o};e.reverse=function(){var e=o.reverse.apply(this);e.flip=function(){return o.reverse()};return e};e.has=function(e){return o.includes(e)};e.includes=function(e){return o.has(e)};e.cacheResult=wn;e.__iterateUncached=function(n,e){var r=this;return o.__iterate(function(e,t){return n(t,e,r)!==false},e)};e.__iteratorUncached=function(e,t){if(e===H){var n=o.__iterator(e,t);return new p(function(){var e=n.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1];e.value[1]=t}return e})}return o.__iterator(e===K?z:K,t)};return e}function en(i,a,s){var e=_n(i);e.size=i.size;e.has=function(e){return i.has(e)};e.get=function(e,t){var n=i.get(e,v);return n===v?t:a.call(s,n,e,i)};e.__iterateUncached=function(r,e){var o=this;return i.__iterate(function(e,t,n){return r(a.call(s,e,t,n),t,o)!==false},e)};e.__iteratorUncached=function(r,e){var o=i.__iterator(H,e);return new p(function(){var e=o.next();if(e.done)return e;var t=e.value;var n=t[0];return d(r,n,a.call(s,t[1],n,i),e)})};return e}function tn(o,n){var e=_n(o);e._iter=o;e.size=o.size;e.reverse=function(){return o};if(o.flip)e.flip=function(){var e=Qt(o);e.reverse=function(){return o.flip()};return e};e.get=function(e,t){return o.get(n?e:-1-e,t)};e.has=function(e){return o.has(n?e:-1-e)};e.includes=function(e){return o.includes(e)};e.cacheResult=wn;e.__iterate=function(n,e){var r=this;return o.__iterate(function(e,t){return n(e,t,r)},!e)};e.__iterator=function(e,t){return o.__iterator(e,!t)};return e}function nn(s,c,u,l){var e=_n(s);if(l){e.has=function(e){var t=s.get(e,v);return t!==v&&!!c.call(u,t,e,s)};e.get=function(e,t){var n=s.get(e,v);return n!==v&&c.call(u,n,e,s)?n:t}}e.__iterateUncached=function(r,e){var o=this;var i=0;s.__iterate(function(e,t,n){if(c.call(u,e,t,n)){i++;return r(e,l?t:i-1,o)}},e);return i};e.__iteratorUncached=function(o,e){var i=s.__iterator(H,e);var a=0;return new p(function(){while(true){var e=i.next();if(e.done)return e;var t=e.value;var n=t[0];var r=t[1];if(c.call(u,r,n,s))return d(o,l?n:a++,r,e)}})};return e}function rn(n,r,o){var i=c().asMutable();n.__iterate(function(e,t){i.update(r.call(o,e,t,n),0,function(e){return e+1})});return i.asImmutable()}function on(r,e,o){var i=y(r);var a=(_(r)?qt():c()).asMutable();r.__iterate(function(t,n){a.update(e.call(o,t,n,r),function(e){return e=e||[],e.push(i?[n,t]:t),e})});var t=bn(r);return a.map(function(e){return s(r,t(e))})}function an(s,e,t,c){var n=s.size;if(e!==undefined)e=e|0;if(t!==undefined)t=t|0;if(R(e,t,n))return s;var u=L(e,n);var r=F(t,n);if(u!==u||r!==r)return an(s.toSeq().cacheResult(),e,t,c);var o=r-u;var l;if(o===o)l=o<0?0:o;var i=_n(s);i.size=l===0?l:s.size&&l||undefined;if(!c&&le(s)&&l>=0)i.get=function(e,t){e=A(this,e);return e>=0&&e<l?s.get(e+u,t):t};i.__iterateUncached=function(n,e){var r=this;if(l===0)return 0;if(e)return this.cacheResult().__iterate(n,e);var o=0;var i=true;var a=0;s.__iterate(function(e,t){if(!(i&&(i=o++<u))){a++;return n(e,c?t:a-1,r)!==false&&a!==l}});return a};i.__iteratorUncached=function(t,e){if(l!==0&&e)return this.cacheResult().__iterator(t,e);var n=l!==0&&s.__iterator(t,e);var r=0;var o=0;return new p(function(){while(r++<u)n.next();if(++o>l)return V();var e=n.next();if(c||t===K)return e;else if(t===z)return d(t,o-1,undefined,e);else return d(t,o-1,e.value[1],e)})};return i}function sn(t,c,u){var e=_n(t);e.__iterateUncached=function(r,e){var o=this;if(e)return this.cacheResult().__iterate(r,e);var i=0;t.__iterate(function(e,t,n){return c.call(u,e,t,n)&&++i&&r(e,t,o)});return i};e.__iteratorUncached=function(o,e){var i=this;if(e)return this.cacheResult().__iterator(o,e);var a=t.__iterator(H,e);var s=true;return new p(function(){if(!s)return V();var e=a.next();if(e.done)return e;var t=e.value;var n=t[0];var r=t[1];if(!c.call(u,r,n,i)){s=false;return V()}return o===H?e:d(o,n,r,e)})};return e}function cn(t,u,l,f){var e=_n(t);e.__iterateUncached=function(r,e){var o=this;if(e)return this.cacheResult().__iterate(r,e);var i=true;var a=0;t.__iterate(function(e,t,n){if(!(i&&(i=u.call(l,e,t,n)))){a++;return r(e,f?t:a-1,o)}});return a};e.__iteratorUncached=function(o,e){var i=this;if(e)return this.cacheResult().__iterator(o,e);var a=t.__iterator(H,e);var s=true;var c=0;return new p(function(){var e,t,n;do{e=a.next();if(e.done)if(f||o===K)return e;else if(o===z)return d(o,c++,undefined,e);else return d(o,c++,e.value[1],e);var r=e.value;t=r[0];n=r[1];s&&(s=u.call(l,n,t,i))}while(s);return o===H?e:d(o,t,n,e)})};return e}function un(e,t){var n=y(e);var r=[e].concat(t).map(function(e){if(!h(e))e=n?pe(e):de(Array.isArray(e)?e:[e]);else if(n)e=l(e);return e}).filter(function(e){return e.size!==0});if(r.length===0)return e;if(r.length===1){var o=r[0];if(o===e||n&&y(o)||g(e)&&g(o))return o}var i=new ae(r);if(n)i=i.toKeyedSeq();else if(!g(e))i=i.toSetSeq();i=i.flatten(true);i.size=r.reduce(function(e,t){if(e!==undefined){var n=t.size;if(n!==undefined)return e+n}},0);return i}function ln(e,c,u){var t=_n(e);t.__iterateUncached=function(o,t){var i=0;var a=false;function s(e,n){var r=this;e.__iterate(function(e,t){if((!c||n<c)&&h(e))s(e,n+1);else if(o(e,u?t:i++,r)===false)a=true;return!a},t)}s(e,0);return i};t.__iteratorUncached=function(n,r){var o=e.__iterator(n,r);var i=[];var a=0;return new p(function(){while(o){var e=o.next();if(e.done!==false){o=i.pop();continue}var t=e.value;if(n===H)t=t[1];if((!c||i.length<c)&&h(t)){i.push(o);o=t.__iterator(n,r)}else return u?e:d(n,a++,t,e)}return V()})};return t}function fn(n,r,o){var i=bn(n);return n.toSeq().map(function(e,t){return i(r.call(o,e,t,n))}).flatten(true)}function pn(i,a){var e=_n(i);e.size=i.size&&i.size*2-1;e.__iterateUncached=function(n,e){var r=this;var o=0;i.__iterate(function(e,t){return(!o||n(a,o++,r)!==false)&&n(e,o++,r)!==false},e);return o};e.__iteratorUncached=function(e,t){var n=i.__iterator(K,t);var r=0;var o;return new p(function(){if(!o||r%2){o=n.next();if(o.done)return o}return r%2?d(e,r++,a):d(e,r++,o.value,o)})};return e}function dn(n,r,o){if(!r)r=Sn;var e=y(n);var i=0;var a=n.toSeq().map(function(e,t){return[t,e,i++,o?o(e,t,n):e]}).toArray();a.sort(function(e,t){return r(e[3],t[3])||e[2]-t[2]}).forEach(e?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]});return e?Q(a):g(n)?ee(a):te(a)}function hn(n,r,o){if(!r)r=Sn;if(o){var e=n.toSeq().map(function(e,t){return[e,o(e,t,n)]}).reduce(function(e,t){return yn(r,e[1],t[1])?t:e});return e&&e[0]}else return n.reduce(function(e,t){return yn(r,e,t)?t:e})}function yn(e,t,n){var r=e(n,t);return r===0&&n!==t&&(n===undefined||n===null||n!==n)||r>0}function gn(e,a,s){var t=_n(e);t.size=new ae(s).map(function(e){return e.size}).min();t.__iterate=function(e,t){var n=this.__iterator(K,t);var r;var o=0;while(!(r=n.next()).done)if(e(r.value,o++,this)===false)break;return o};t.__iteratorUncached=function(t,n){var r=s.map(function(e){return e=u(e),$(n?e.reverse():e)});var o=0;var i=false;return new p(function(){var e;if(!i){e=r.map(function(e){return e.next()});i=e.some(function(e){return e.done})}if(i)return V();return d(t,o++,a.apply(null,e.map(function(e){return e.value})))})};return t}function s(e,t){return le(e)?t:e.constructor(t)}function mn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function vn(e){Ye(e.size);return N(e)}function bn(e){return y(e)?l:g(e)?f:o}function _n(e){return Object.create((y(e)?Q:g(e)?ee:te).prototype)}function wn(){if(this._iter.cacheResult){this._iter.cacheResult();this.size=this._iter.size;return this}else return X.prototype.cacheResult.call(this)}function Sn(e,t){return e>t?1:e<t?-1:0}function En(e){var t=$(e);if(!t){if(!J(e))throw new TypeError("Expected iterable or array-like: "+e);t=$(u(e))}return t}function Cn(r,o){var i;var a=function e(t){if(t instanceof a)return t;if(!(this instanceof a))return new a(t);if(!i){i=true;var n=Object.keys(r);Dn(s,n);s.size=n.length;s._name=o;s._keys=n;s._defaultValues=r}this._map=c(t)};var s=a.prototype=Object.create(On);s.constructor=a;return a}e(qt,c),qt.of=function(){return this(arguments)},qt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},qt.prototype.get=function(e,t){var n=this._map.get(e);return n!==undefined?this._list.get(n)[1]:t},qt.prototype.clear=function(){if(this.size===0)return this;if(this.__ownerID){this.size=0;this._map.clear();this._list.clear();return this}return Gt()},qt.prototype.set=function(e,t){return Yt(this,e,t)},qt.prototype.remove=function(e){return Yt(this,e,v)},qt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},qt.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},qt.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},qt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);var n=this._list.__ensureOwner(e);if(!e){this.__ownerID=e;this._map=t;this._list=n;return this}return Vt(t,n,e,this.__hash)},qt.isOrderedMap=Wt,qt.prototype[E]=true,qt.prototype[C]=qt.prototype.remove,e($t,Q),$t.prototype.get=function(e,t){return this._iter.get(e,t)},$t.prototype.has=function(e){return this._iter.has(e)},$t.prototype.valueSeq=function(){return this._iter.valueSeq()},$t.prototype.reverse=function(){var e=this;var t=tn(this,true);if(!this._useKeys)t.valueSeq=function(){return e._iter.toSeq().reverse()};return t},$t.prototype.map=function(e,t){var n=this;var r=en(this,e,t);if(!this._useKeys)r.valueSeq=function(){return n._iter.toSeq().map(e,t)};return r},$t.prototype.__iterate=function(n,t){var r=this;var o;return this._iter.__iterate(this._useKeys?function(e,t){return n(e,t,r)}:(o=t?vn(this):0,function(e){return n(e,t?--o:o++,r)}),t)},$t.prototype.__iterator=function(t,n){if(this._useKeys)return this._iter.__iterator(t,n);var r=this._iter.__iterator(K,n);var o=n?vn(this):0;return new p(function(){var e=r.next();return e.done?e:d(t,n?--o:o++,e.value,e)})},$t.prototype[E]=true,e(Zt,ee),Zt.prototype.includes=function(e){return this._iter.includes(e)},Zt.prototype.__iterate=function(t,e){var n=this;var r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},Zt.prototype.__iterator=function(t,e){var n=this._iter.__iterator(K,e);var r=0;return new p(function(){var e=n.next();return e.done?e:d(t,r++,e.value,e)})},e(Jt,te),Jt.prototype.has=function(e){return this._iter.includes(e)},Jt.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},Jt.prototype.__iterator=function(t,e){var n=this._iter.__iterator(K,e);return new p(function(){var e=n.next();return e.done?e:d(t,e.value,e.value,e)})},e(Xt,Q),Xt.prototype.entrySeq=function(){return this._iter.toSeq()},Xt.prototype.__iterate=function(n,e){var r=this;return this._iter.__iterate(function(e){if(e){mn(e);var t=h(e);return n(t?e.get(1):e[1],t?e.get(0):e[0],r)}},e)},Xt.prototype.__iterator=function(r,e){var o=this._iter.__iterator(K,e);return new p(function(){while(true){var e=o.next();if(e.done)return e;var t=e.value;if(t){mn(t);var n=h(t);return d(r,n?t.get(0):t[0],n?t.get(1):t[1],e)}}})},Zt.prototype.cacheResult=$t.prototype.cacheResult=Jt.prototype.cacheResult=Xt.prototype.cacheResult=wn,e(Cn,De),Cn.prototype.toString=function(){return this.__toString(kn(this)+" {","}")},Cn.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Cn.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Cn.prototype.clear=function(){if(this.__ownerID){this._map&&this._map.clear();return this}var e=this.constructor;return e._empty||(e._empty=xn(this,st()))},Cn.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+kn(this));var n=this._map&&this._map.set(e,t);if(this.__ownerID||n===this._map)return this;return xn(this,n)},Cn.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);if(this.__ownerID||t===this._map)return this;return xn(this,t)},Cn.prototype.wasAltered=function(){return this._map.wasAltered()},Cn.prototype.__iterator=function(e,t){var n=this;return l(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},Cn.prototype.__iterate=function(e,t){var n=this;return l(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},Cn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);if(!e){this.__ownerID=e;this._map=t;return this}return xn(this,t,e)};var On=Cn.prototype;function xn(e,t,n){var r=Object.create(Object.getPrototypeOf(e));r._map=t;r.__ownerID=n;return r}function kn(e){return e._name||e.constructor.name||"Record"}function Dn(e,t){try{t.forEach(Tn.bind(undefined,e))}catch(e){}}function Tn(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){Oe(this.__ownerID,"Cannot set on an immutable record.");this.set(t,e)}})}function n(n){return n===null||n===undefined?Rn():jn(n)&&!_(n)?n:Rn().withMutations(function(t){var e=o(n);Ye(e.size);e.forEach(function(e){return t.add(e)})})}function jn(e){return!!(e&&e[In])}On[C]=On.remove,On.deleteIn=On.removeIn=i.removeIn,On.merge=i.merge,On.mergeWith=i.mergeWith,On.mergeIn=i.mergeIn,On.mergeDeep=i.mergeDeep,On.mergeDeepWith=i.mergeDeepWith,On.mergeDeepIn=i.mergeDeepIn,On.setIn=i.setIn,On.update=i.update,On.updateIn=i.updateIn,On.withMutations=i.withMutations,On.asMutable=i.asMutable,On.asImmutable=i.asImmutable,e(n,je),n.of=function(){return this(arguments)},n.fromKeys=function(e){return this(l(e).keySeq())},n.prototype.toString=function(){return this.__toString("Set {","}")},n.prototype.has=function(e){return this._map.has(e)},n.prototype.add=function(e){return An(this,this._map.set(e,true))},n.prototype.remove=function(e){return An(this,this._map.remove(e))},n.prototype.clear=function(){return An(this,this._map.clear())},n.prototype.union=function(){var n=r.call(arguments,0);n=n.filter(function(e){return e.size!==0});if(n.length===0)return this;if(this.size===0&&!this.__ownerID&&n.length===1)return this.constructor(n[0]);return this.withMutations(function(t){for(var e=0;e<n.length;e++)o(n[e]).forEach(function(e){return t.add(e)})})},n.prototype.intersect=function(){var n=r.call(arguments,0);if(n.length===0)return this;n=n.map(function(e){return o(e)});var t=this;return this.withMutations(function(e){t.forEach(function(t){if(!n.every(function(e){return e.includes(t)}))e.remove(t)})})},n.prototype.subtract=function(){var n=r.call(arguments,0);if(n.length===0)return this;n=n.map(function(e){return o(e)});var t=this;return this.withMutations(function(e){t.forEach(function(t){if(n.some(function(e){return e.includes(t)}))e.remove(t)})})},n.prototype.merge=function(){return this.union.apply(this,arguments)},n.prototype.mergeWith=function(e){var t=r.call(arguments,1);return this.union.apply(this,t)},n.prototype.sort=function(e){return Ln(dn(this,e))},n.prototype.sortBy=function(e,t){return Ln(dn(this,t,e))},n.prototype.wasAltered=function(){return this._map.wasAltered()},n.prototype.__iterate=function(n,e){var r=this;return this._map.__iterate(function(e,t){return n(t,t,r)},e)},n.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},n.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);if(!e){this.__ownerID=e;this._map=t;return this}return this.__make(t,e)},n.isSet=jn;var In="@@__IMMUTABLE_SET__@@",Mn=n.prototype,Nn;function An(e,t){if(e.__ownerID){e.size=t.size;e._map=t;return e}return t===e._map?e:t.size===0?e.__empty():e.__make(t)}function Pn(e,t){var n=Object.create(Mn);n.size=e?e.size:0;n._map=e;n.__ownerID=t;return n}function Rn(){return Nn||(Nn=Pn(st()))}function Ln(n){return n===null||n===undefined?Hn():Fn(n)?n:Hn().withMutations(function(t){var e=o(n);Ye(e.size);e.forEach(function(e){return t.add(e)})})}function Fn(e){return jn(e)&&_(e)}Mn[In]=true,Mn[C]=Mn.remove,Mn.mergeDeep=Mn.merge,Mn.mergeDeepWith=Mn.mergeWith,Mn.withMutations=i.withMutations,Mn.asMutable=i.asMutable,Mn.asImmutable=i.asImmutable,Mn.__empty=Rn,Mn.__make=Pn,e(Ln,n),Ln.of=function(){return this(arguments)},Ln.fromKeys=function(e){return this(l(e).keySeq())},Ln.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Ln.isOrderedSet=Fn;var Bn=Ln.prototype,zn;function Kn(e,t){var n=Object.create(Bn);n.size=e?e.size:0;n._map=e;n.__ownerID=t;return n}function Hn(){return zn||(zn=Kn(Gt()))}function Un(e){return e===null||e===undefined?$n():qn(e)?e:$n().unshiftAll(e)}function qn(e){return!!(e&&e[Wn])}Bn[E]=true,Bn.__empty=Hn,Bn.__make=Kn,e(Un,Te),Un.of=function(){return this(arguments)},Un.prototype.toString=function(){return this.__toString("Stack [","]")},Un.prototype.get=function(e,t){var n=this._head;e=A(this,e);while(n&&e--)n=n.next;return n?n.value:t},Un.prototype.peek=function(){return this._head&&this._head.value},Un.prototype.push=function(){if(arguments.length===0)return this;var e=this.size+arguments.length;var t=this._head;for(var n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};if(this.__ownerID){this.size=e;this._head=t;this.__hash=undefined;this.__altered=true;return this}return Yn(e,t)},Un.prototype.pushAll=function(e){e=f(e);if(e.size===0)return this;Ye(e.size);var t=this.size;var n=this._head;e.reverse().forEach(function(e){t++;n={value:e,next:n}});if(this.__ownerID){this.size=t;this._head=n;this.__hash=undefined;this.__altered=true;return this}return Yn(t,n)},Un.prototype.pop=function(){return this.slice(1)},Un.prototype.unshift=function(){return this.push.apply(this,arguments)},Un.prototype.unshiftAll=function(e){return this.pushAll(e)},Un.prototype.shift=function(){return this.pop.apply(this,arguments)},Un.prototype.clear=function(){if(this.size===0)return this;if(this.__ownerID){this.size=0;this._head=undefined;this.__hash=undefined;this.__altered=true;return this}return $n()},Un.prototype.slice=function(e,t){if(R(e,t,this.size))return this;var n=L(e,this.size);var r=F(t,this.size);if(r!==this.size)return Te.prototype.slice.call(this,e,t);var o=this.size-n;var i=this._head;while(n--)i=i.next;if(this.__ownerID){this.size=o;this._head=i;this.__hash=undefined;this.__altered=true;return this}return Yn(o,i)},Un.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;if(!e){this.__ownerID=e;this.__altered=false;return this}return Yn(this.size,this._head,e,this.__hash)},Un.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);var n=0;var r=this._head;while(r){if(e(r.value,n++,this)===false)break;r=r.next}return n},Un.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0;var r=this._head;return new p(function(){if(r){var e=r.value;r=r.next;return d(t,n++,e)}return V()})},Un.isStack=qn;var Wn="@@__IMMUTABLE_STACK__@@",Vn=Un.prototype,Gn;function Yn(e,t,n,r){var o=Object.create(Vn);o.size=e;o._head=t;o.__ownerID=n;o.__hash=r;o.__altered=false;return o}function $n(){return Gn||(Gn=Yn(0))}function Zn(t,n){var e=function(e){t.prototype[e]=n[e]};Object.keys(n).forEach(e);Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(n).forEach(e);return t}Vn[Wn]=true,Vn.withMutations=i.withMutations,Vn.asMutable=i.asMutable,Vn.asImmutable=i.asImmutable,Vn.wasAltered=i.wasAltered,u.Iterator=p,Zn(u,{toArray:function(){Ye(this.size);var n=new Array(this.size||0);this.valueSeq().__iterate(function(e,t){n[t]=e});return n},toIndexedSeq:function(){return new Zt(this)},toJS:function(){return this.toSeq().map(function(e){return e&&typeof e.toJS==="function"?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&typeof e.toJSON==="function"?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new $t(this,true)},toMap:function(){return c(this.toKeyedSeq())},toObject:function(){Ye(this.size);var n={};this.__iterate(function(e,t){n[t]=e});return n},toOrderedMap:function(){return qt(this.toKeyedSeq())},toOrderedSet:function(){return Ln(y(this)?this.valueSeq():this)},toSet:function(){return n(y(this)?this.valueSeq():this)},toSetSeq:function(){return new Jt(this)},toSeq:function(){return g(this)?this.toIndexedSeq():y(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Un(y(this)?this.valueSeq():this)},toList:function(){return t(y(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){if(this.size===0)return e+t;return e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var e=r.call(arguments,0);return s(this,un(this,e))},includes:function(t){return this.some(function(e){return Se(e,t)})},entries:function(){return this.__iterator(H)},every:function(r,o){Ye(this.size);var i=true;this.__iterate(function(e,t,n){if(!r.call(o,e,t,n)){i=false;return false}});return i},filter:function(e,t){return s(this,nn(this,e,t,true))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(r,o){var i;this.__iterate(function(e,t,n){if(r.call(o,e,t,n)){i=[t,e];return false}});return i},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){Ye(this.size);return this.__iterate(t?e.bind(t):e)},join:function(t){Ye(this.size);t=t!==undefined?""+t:",";var n="";var r=true;this.__iterate(function(e){r?r=false:n+=t;n+=e!==null&&e!==undefined?e.toString():""});return n},keys:function(){return this.__iterator(z)},map:function(e,t){return s(this,en(this,e,t))},reduce:function(r,e,o){Ye(this.size);var i;var a;if(arguments.length<2)a=true;else i=e;this.__iterate(function(e,t,n){if(a){a=false;i=e}else i=r.call(o,i,e,t,n)});return i},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return s(this,tn(this,true))},slice:function(e,t){return s(this,an(this,e,t,true))},some:function(e,t){return!this.every(nr(e),t)},sort:function(e){return s(this,dn(this,e))},values:function(){return this.__iterator(K)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size!==undefined?this.size===0:!this.some(function(){return true})},count:function(e,t){return N(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return rn(this,e,t)},equals:function(e){return Ee(this,e)},entrySeq:function(){var e=this;if(e._cache)return new ae(e._cache);var t=e.toSeq().map(tr).toIndexedSeq();t.fromEntrySeq=function(){return e.toSeq()};return t},filterNot:function(e,t){return this.filter(nr(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(P)},flatMap:function(e,t){return s(this,fn(this,e,t))},flatten:function(e){return s(this,ln(this,e,true))},fromEntrySeq:function(){return new Xt(this)},get:function(n,e){return this.find(function(e,t){return Se(t,n)},undefined,e)},getIn:function(e,t){var n=this;var r=En(e);var o;while(!(o=r.next()).done){var i=o.value;n=n&&n.get?n.get(i,v):v;if(n===v)return t}return n},groupBy:function(e,t){return on(this,e,t)},has:function(e){return this.get(e,v)!==v},hasIn:function(e){return this.getIn(e,v)!==v},isSubset:function(t){t=typeof t.includes==="function"?t:u(t);return this.every(function(e){return t.includes(e)})},isSuperset:function(e){e=typeof e.isSubset==="function"?e:u(e);return e.isSubset(this)},keySeq:function(){return this.toSeq().map(er).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return hn(this,e)},maxBy:function(e,t){return hn(this,t,e)},min:function(e){return hn(this,e?rr(e):ar)},minBy:function(e,t){return hn(this,t?rr(t):ar,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return s(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return s(this,cn(this,e,t,true))},skipUntil:function(e,t){return this.skipWhile(nr(e),t)},sortBy:function(e,t){return s(this,dn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return s(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return s(this,sn(this,e,t))},takeUntil:function(e,t){return this.takeWhile(nr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=sr(this))}});var Jn=u.prototype;Jn[a]=true,Jn[W]=Jn.values,Jn.__toJS=Jn.toArray,Jn.__toStringMapper=or,Jn.inspect=Jn.toSource=function(){return this.toString()},Jn.chain=Jn.flatMap,Jn.contains=Jn.includes;try{Object.defineProperty(Jn,"length",{get:function(){if(!u.noLengthWarning){var t;try{throw new Error}catch(e){t=e.stack}if(t.indexOf("_wrapObject")===-1){console&&console.warn&&console.warn("iterable.length has been deprecated, "+"use iterable.size or iterable.count(). "+"This warning will become a silent error in a future version. "+t);return this.size}}}})}catch(e){}Zn(l,{flip:function(){return s(this,Qt(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(t){return this.findKey(function(e){return Se(e,t)})},lastKeyOf:function(t){return this.findLastKey(function(e){return Se(e,t)})},mapEntries:function(n,r){var o=this;var i=0;return s(this,this.toSeq().map(function(e,t){return n.call(r,[t,e],i++,o)}).fromEntrySeq())},mapKeys:function(n,r){var o=this;return s(this,this.toSeq().flip().map(function(e,t){return n.call(r,e,t,o)}).flip())}});var Xn=l.prototype,Qn;function er(e,t){return t}function tr(e,t){return[t,e]}function nr(e){return function(){return!e.apply(this,arguments)}}function rr(e){return function(){return-e.apply(this,arguments)}}function or(e){return typeof e==="string"?JSON.stringify(e):e}function ir(){return M(arguments)}function ar(e,t){return e<t?1:e>t?-1:0}function sr(e){if(e.size===Infinity)return 0;var t=_(e);var n=y(e);var r=t?1:0;var o=e.__iterate(n?t?function(e,t){r=31*r+ur(Ne(e),Ne(t))|0}:function(e,t){r=r+ur(Ne(e),Ne(t))|0}:t?function(e){r=31*r+Ne(e)|0}:function(e){r=r+Ne(e)|0});return cr(o,r)}function cr(e,t){t=Ie(t,3432918353);t=Ie(t<<15|t>>>-15,461845907);t=Ie(t<<13|t>>>-13,5);t=(t+3864292196|0)^e;t=Ie(t^t>>>16,2246822507);t=Ie(t^t>>>13,3266489909);t=Me(t^t>>>16);return t}function ur(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Xn[w]=true,Xn[W]=Jn.entries,Xn.__toJS=Jn.toObject,Xn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+or(e)},Zn(f,{toKeyedSeq:function(){return new $t(this,false)},filter:function(e,t){return s(this,nn(this,e,t,false))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return t===undefined?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return t===undefined?-1:t},reverse:function(){return s(this,tn(this,false))},slice:function(e,t){return s(this,an(this,e,t,false))},splice:function(e,t){var n=arguments.length;t=Math.max(t|0,0);if(n===0||n===2&&!t)return this;e=L(e,e<0?this.count():this.size);var r=this.slice(0,e);return s(this,n===1?r:r.concat(M(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return n===undefined?-1:n},first:function(){return this.get(0)},flatten:function(e){return s(this,ln(this,e,false))},get:function(n,e){n=A(this,n);return n<0||(this.size===Infinity||this.size!==undefined&&n>this.size)?e:this.find(function(e,t){return t===n},undefined,e)},has:function(e){e=A(this,e);return e>=0&&(this.size!==undefined?this.size===Infinity||e<this.size:this.indexOf(e)!==-1)},interpose:function(e){return s(this,pn(this,e))},interleave:function(){var e=[this].concat(M(arguments));var t=gn(this.toSeq(),ee.of,e);var n=t.flatten(true);if(t.size)n.size=t.size*e.length;return s(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return s(this,cn(this,e,t,false))},zip:function(){var e=[this].concat(M(arguments));return s(this,gn(this,ir,e))},zipWith:function(e){var t=M(arguments);t[0]=this;return s(this,gn(this,e,t))}}),f.prototype[S]=true,f.prototype[E]=true,Zn(o,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=Jn.includes,Zn(Q,l.prototype),Zn(ee,f.prototype),Zn(te,o.prototype),Zn(De,l.prototype),Zn(Te,f.prototype),Zn(je,o.prototype),{Iterable:u,Seq:X,Collection:ke,Map:c,OrderedMap:qt,List:t,Stack:Un,Set:n,OrderedSet:Ln,Record:Cn,Range:xe,Repeat:Ce,is:Se,fromJS:ve}}()},function(e,t,n){"use strict";var s=function(e){};e.exports=function(e,t){for(var n,r,o=arguments.length,i=new Array(2<o?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];if(s(t),!e)throw void 0===t?r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."):(n=0,(r=new Error(t.replace(/%s/g,function(){return String(i[n++])}))).name="Invariant Violation"),r.framesToPop=1,r}},function(s,c,e){"use strict";function n(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);(r="function"==typeof Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})):r).forEach(function(e){o(t,e,n[e])})}return t}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h=e(114),r=e(40),l=e(116),i=e(31),e=e(6),t=e.OrderedSet,u=e.Record,f=e.Stack,a=e.OrderedMap,p=e.List,d=u({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:f(),selection:null,treeMap:null,undoStack:f()}),y=function(){u.createEmpty=function(e){return this.createWithText("",e)},u.createWithText=function(e,t){return u.createWithContent(r.createFromText(e),t)},u.createWithContent=function(e,t){if(0===e.getBlockMap().count())return u.createEmpty(t);var n=e.getBlockMap().first().getKey();return u.create({currentContent:e,undoStack:f(),redoStack:f(),decorator:t||null,selection:i.createEmpty(n)})},u.create=function(e){var t=e.currentContent,e=n({},e,{treeMap:m(t,e.decorator),directionMap:l.getDirectionMap(t)});return new u(new d(e))},u.fromJS=function(e){return new u(new d(n({},e,{directionMap:null!=e.directionMap?a(e.directionMap):e.directionMap,inlineStyleOverride:null!=e.inlineStyleOverride?t(e.inlineStyleOverride):e.inlineStyleOverride,nativelyRenderedContent:null!=e.nativelyRenderedContent?r.fromJS(e.nativelyRenderedContent):e.nativelyRenderedContent,redoStack:null!=e.redoStack?f(e.redoStack.map(function(e){return r.fromJS(e)})):e.redoStack,selection:null!=e.selection?new i(e.selection):e.selection,treeMap:null!=e.treeMap?a(e.treeMap).map(function(e){return p(e).map(function(e){return h.fromJS(e)})}):e.treeMap,undoStack:null!=e.undoStack?f(e.undoStack.map(function(e){return r.fromJS(e)})):e.undoStack,currentContent:r.fromJS(e.currentContent)})))},u.set=function(p,d){return new u(p.getImmutable().withMutations(function(e){var t,n,r,o,i,l,a,f,s=e.get("decorator"),c=s,u=(null===d.decorator?c=null:d.decorator&&(c=d.decorator),d.currentContent||p.getCurrentContent());if(c!==s)return o=e.get("treeMap"),s=c&&s?(i=(t=u).getBlockMap(),n=c,r=s,o.merge(i.toSeq().filter(function(e){return n.getDecorations(e,t)!==r.getDecorations(e,t)}).map(function(e){return h.generate(t,e,n)}))):m(u,c),void e.merge({decorator:c,treeMap:s,nativelyRenderedContent:null});u!==p.getCurrentContent()&&e.set("treeMap",(o=p,i=u.getBlockMap(),s=u.getEntityMap(),l=c,a=o.getCurrentContent().set("entityMap",s),f=a.getBlockMap(),o.getImmutable().get("treeMap").merge(i.toSeq().filter(function(e,t){return e!==f.get(t)}).map(function(e){return h.generate(a,e,l)})))),e.merge(d)}))};var e=u.prototype;function u(e){o(this,"_immutable",void 0),this._immutable=e}return e.toJS=function(){return this.getImmutable().toJS()},e.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},e.getCurrentContent=function(){return this.getImmutable().get("currentContent")},e.getUndoStack=function(){return this.getImmutable().get("undoStack")},e.getRedoStack=function(){return this.getImmutable().get("redoStack")},e.getSelection=function(){return this.getImmutable().get("selection")},e.getDecorator=function(){return this.getImmutable().get("decorator")},e.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},e.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},e.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},e.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},e.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},u.setInlineStyleOverride=function(e,t){return u.set(e,{inlineStyleOverride:t})},e.getCurrentInlineStyle=function(){var e=this.getInlineStyleOverride();if(null!=e)return e;var t,n,r,o,e=this.getCurrentContent(),i=this.getSelection();return i.isCollapsed()?(n=e,o=(t=i).getStartKey(),t=t.getStartOffset(),r=n.getBlockForKey(o),0<t?r.getInlineStyleAt(t-1):r.getLength()?r.getInlineStyleAt(0):v(n,o)):(t=e,n=(r=i).getStartKey(),r=r.getStartOffset(),o=t.getBlockForKey(n),r<o.getLength()?o.getInlineStyleAt(r):0<r?o.getInlineStyleAt(r-1):v(t,n))},e.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},e.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},e.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},e.getDirectionMap=function(){return this.getImmutable().get("directionMap")},u.acceptSelection=function(e,t){return g(e,t,!1)},u.forceSelection=function(e,t){return g(e,t=t.getHasFocus()?t:t.set("hasFocus",!0),!0)},u.moveSelectionToEnd=function(e){var t=e.getCurrentContent().getLastBlock(),n=t.getKey(),t=t.getLength();return u.acceptSelection(e,new i({anchorKey:n,anchorOffset:t,focusKey:n,focusOffset:t,isBackward:!1}))},u.moveFocusToEnd=function(e){e=u.moveSelectionToEnd(e);return u.forceSelection(e,e.getSelection())},u.push=function(e,t,n){var r=!(3<arguments.length&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===t)return e;var o=l.getDirectionMap(t,e.getDirectionMap());if(!e.getAllowUndo())return u.set(e,{currentContent:t,directionMap:o,lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:null});var i=e.getSelection(),a=e.getCurrentContent(),s=e.getUndoStack(),c=t,i=(i!==a.getSelectionAfter()||function(e,t){e=e.getLastChangeType();return t!==e||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(e,n)?(s=s.push(a),c=c.set("selectionBefore",i)):"insert-characters"!==n&&"backspace-character"!==n&&"delete-character"!==n||(c=c.set("selectionBefore",a.getSelectionBefore())),e.getInlineStyleOverride()),a=(-1===["adjust-depth","change-block-type","split-block"].indexOf(n)&&(i=null),{currentContent:c,directionMap:o,undoStack:s,redoStack:f(),lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:i});return u.set(e,a)},u.undo=function(e){if(!e.getAllowUndo())return e;var t=e.getUndoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=l.getDirectionMap(n,e.getDirectionMap());return u.set(e,{currentContent:n,directionMap:o,undoStack:t.shift(),redoStack:e.getRedoStack().push(r),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:r.getSelectionBefore()})},u.redo=function(e){if(!e.getAllowUndo())return e;var t=e.getRedoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=l.getDirectionMap(n,e.getDirectionMap());return u.set(e,{currentContent:n,directionMap:o,undoStack:e.getUndoStack().push(r),redoStack:t.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:n.getSelectionAfter()})},e.getImmutable=function(){return this._immutable},u}();function g(e,t,n){return y.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function m(t,n){return t.getBlockMap().map(function(e){return h.generate(t,e,n)}).toOrderedMap()}function v(e,n){e=e.getBlockMap().reverse().skipUntil(function(e,t){return t===n}).skip(1).skipUntil(function(e,t){return e.getLength()}).first();return e?e.getInlineStyleAt(e.getLength()-1):t()}s.exports=y},function(e,n,t){"use strict";var i=t(12),r=t(104),o=t(105),u=t(107),c=t(29),p=t(6),d=t(110),h=t(111),y=t(7),a=t(54),l=t(52),f=t(112),g=t(113),m=p.OrderedSet,s={replaceText:function(e,t,n,r,o){e=l(e,t),e=f(e,t),t=i.create({style:r||m(),entity:o||null});return h(e,e.getSelectionAfter(),n,t)},insertText:function(e,t,n,r,o){return t.isCollapsed()||y(!1),s.replaceText(e,t,n,r,o)},moveText:function(e,t,n){var r=c(e,t),e=s.removeRange(e,t,"backward");return s.replaceWithFragment(e,n,r)},replaceWithFragment:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",e=l(e,t),e=f(e,t);return d(e,e.getSelectionAfter(),n,r)},removeRange:function(e,t,n){i=(t=t.getIsBackward()?t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1}):t).getAnchorKey(),c=t.getFocusKey(),r=e.getBlockForKey(i),o=e.getBlockForKey(c);var r,o,i,a=t.getStartOffset(),s=t.getEndOffset(),a=r.getEntityAt(a),s=o.getEntityAt(s-1);if(i===c&&(a&&a===s))return i=u(e.getEntityMap(),r,o,t,n),f(e,i);var c=l(e,t);return f(c,t)},splitBlock:function(e,t){e=l(e,t),e=f(e,t);return g(e,e.getSelectionAfter())},applyInlineStyle:function(e,t,n){return r.add(e,t,n)},removeInlineStyle:function(e,t,n){return r.remove(e,t,n)},setBlockType:function(e,t,n){return a(e,t,function(e){return e.merge({type:n,depth:0})})},setBlockData:function(e,t,n){return a(e,t,function(e){return e.merge({data:n})})},mergeBlockData:function(e,t,n){return a(e,t,function(e){return e.merge({data:e.getData().merge(n)})})},applyEntity:function(e,t,n){e=l(e,t);return o(e,t,n)}};e.exports=s},function(e,t,n){"use strict";e.exports=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")}},function(e,t,n){"use strict";var r=n(123),o=n(126),i=n(127),n=n(128);function a(e,t,n,r){if(e===n)return!0;if(!n.startsWith(e))return!1;n=n.slice(e.length);return!!t&&(n=r?r(n):n,o.contains(n,t))}function s(e){return"Windows"===r.platformName?e.replace(/^\s*NT/,""):e}e.exports=i({isBrowser:function(e){return a(r.browserName,r.browserFullVersion,e)},isBrowserArchitecture:function(e){return a(r.browserArchitecture,null,e)},isDevice:function(e){return a(r.deviceName,null,e)},isEngine:function(e){return a(r.engineName,r.engineVersion,e)},isPlatform:function(e){return a(r.platformName,r.platformFullVersion,e,s)},isPlatformArchitecture:function(e){return a(r.platformArchitecture,null,e)}},n)},function(e,t,n){"use strict";var n=n(6),o=n.Map,i=n.OrderedSet,n=n.Record,a=i(),r={style:a,entity:null},n=function(e){var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.getStyle=function(){return this.get("style")},r.getEntity=function(){return this.get("entity")},r.hasStyle=function(e){return this.getStyle().includes(e)},n.applyStyle=function(e,t){e=e.set("style",e.getStyle().add(t));return n.create(e)},n.removeStyle=function(e,t){e=e.set("style",e.getStyle().remove(t));return n.create(e)},n.applyEntity=function(e,t){e=e.getEntity()===t?e:e.set("entity",t);return n.create(e)},n.create=function(e){if(!e)return s;var e=o({style:a,entity:null}).merge(e),t=c.get(e);if(t)return t;t=new n(e);return c=c.set(e,t),t},n.fromJS=function(e){var t=e.style,e=e.entity;return new n({style:Array.isArray(t)?i(t):t,entity:Array.isArray(e)?i(e):e})},n}(n(r)),s=new n,c=o([[o(r),s]]);n.EMPTY=s,e.exports=n},function(e,l,t){"use strict";function o(e,t){return e.getStyle()===t.getStyle()}function i(e,t){return e.getEntity()===t.getEntity()}var a=t(12),s=t(26),t=t(6),c=t.List,n=t.Map,r=t.OrderedSet,f=t.Record,p=t.Repeat,d=r(),u={parent:null,characterList:c(),data:n(),depth:0,key:"",text:"",type:"unstyled",children:c(),prevSibling:null,nextSibling:null},t=function(e){var t;function n(){return e.call(this,function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=c(p(a.EMPTY,n.length))),e}(0<arguments.length&&void 0!==arguments[0]?arguments[0]:u))||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.getKey=function(){return this.get("key")},r.getType=function(){return this.get("type")},r.getText=function(){return this.get("text")},r.getCharacterList=function(){return this.get("characterList")},r.getLength=function(){return this.getText().length},r.getDepth=function(){return this.get("depth")},r.getData=function(){return this.get("data")},r.getInlineStyleAt=function(e){e=this.getCharacterList().get(e);return e?e.getStyle():d},r.getEntityAt=function(e){e=this.getCharacterList().get(e);return e?e.getEntity():null},r.getChildKeys=function(){return this.get("children")},r.getParentKey=function(){return this.get("parent")},r.getPrevSiblingKey=function(){return this.get("prevSibling")},r.getNextSiblingKey=function(){return this.get("nextSibling")},r.findStyleRanges=function(e,t){s(this.getCharacterList(),o,e,t)},r.findEntityRanges=function(e,t){s(this.getCharacterList(),i,e,t)},n}(f(u));e.exports=t},function(e,t,n){"use strict";var r={},o=Math.pow(2,24);e.exports=function(){for(var e;void 0===e||r.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*o).toString(32);return r[e]=!0,e}},function(e,t,n){"use strict";e.exports={encode:function(e,t,n){return e+"-"+t+"-"+n},decode:function(e){var e=e.split("-").reverse(),t=e[0],n=e[1];return{blockKey:e.slice(2).reverse().join("-"),decoratorKey:parseInt(n,10),leafKey:parseInt(t,10)}}}},function(e,t,n){"use strict";e.exports=function(e){return!("undefined"==typeof window||!window.__DRAFT_GKX)&&!!window.__DRAFT_GKX[e]}},function(e,t,n){"use strict";
|
|
44
|
+
!function(){"use strict";var a={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r,o=typeof n;if("string"==o||"number"==o)e.push(n);else if(Array.isArray(n))!n.length||(r=s.apply(null,n))&&e.push(r);else if("object"==o)if(n.toString===Object.prototype.toString)for(var i in n)a.call(n,i)&&n[i]&&e.push(i);else e.push(n.toString())}}return e.join(" ")}e.exports?e.exports=s.default=s:void 0!==(r=function(){return s}.apply(t,[]))&&(e.exports=r)}()},function(e,t,n){e.exports=function(){"use strict";var R=Array.prototype.slice;function e(e,t){if(t)e.prototype=Object.create(t.prototype);e.prototype.constructor=e}function c(e){return l(e)?e:t(e)}function s(e){return u(e)?e:w(e)}function L(e){return f(e)?e:S(e)}function r(e){return l(e)&&!F(e)?e:de(e)}function l(e){return!!(e&&e[z])}function u(e){return!!(e&&e[K])}function f(e){return!!(e&&e[H])}function F(e){return u(e)||f(e)}function B(e){return!!(e&&e[U])}e(s,c),e(L,c),e(r,c),c.isIterable=l,c.isKeyed=u,c.isIndexed=f,c.isAssociative=F,c.isOrdered=B,c.Keyed=s,c.Indexed=L,c.Set=r;var z="@@__IMMUTABLE_ITERABLE__@@",K="@@__IMMUTABLE_KEYED__@@",H="@@__IMMUTABLE_INDEXED__@@",U="@@__IMMUTABLE_ORDERED__@@",q="delete",b=5,p=1<<b,_=p-1,v={},W={value:false},V={value:false};function G(e){e.value=false;return e}function h(e){e&&(e.value=true)}function Y(){}function $(e,t){t=t||0;var n=Math.max(0,e.length-t);var r=new Array(n);for(var o=0;o<n;o++)r[o]=e[o+t];return r}function Z(e){if(e.size===undefined)e.size=e.__iterate(X);return e.size}function J(e,t){if(typeof t!=="number"){var n=t>>>0;if(""+n!==t||n===4294967295)return NaN;t=n}return t<0?Z(e)+t:t}function X(){return true}function Q(e,t,n){return(e===0||n!==undefined&&e<=-n)&&(t===undefined||n!==undefined&&t>=n)}function ee(e,t){return ne(e,t,0)}function te(e,t){return ne(e,t,t)}function ne(e,t,n){return e===undefined?n:e<0?Math.max(0,t+e):t===undefined?e:Math.min(t,e)}var re=0,d=1,oe=2,ie=typeof Symbol==="function"&&Symbol.iterator,ae="@@iterator",se=ie||ae;function y(e){this.next=e}function g(e,t,n,r){var o=e===0?t:e===1?n:[t,n];r?r.value=o:r={value:o,done:false};return r}function m(){return{value:undefined,done:true}}function ce(e){return!!fe(e)}function ue(e){return e&&typeof e.next==="function"}function le(e){var t=fe(e);return t&&t.call(e)}function fe(e){var t=e&&(ie&&e[ie]||e[ae]);if(typeof t==="function")return t}function pe(e){return e&&typeof e.length==="number"}function t(e){return e===null||e===undefined?Ee():l(e)?e.toSeq():xe(e)}function w(e){return e===null||e===undefined?Ee().toKeyedSeq():l(e)?u(e)?e.toSeq():e.fromEntrySeq():Ce(e)}function S(e){return e===null||e===undefined?Ee():!l(e)?Oe(e):u(e)?e.entrySeq():e.toIndexedSeq()}function de(e){return(e===null||e===undefined?Ee():!l(e)?Oe(e):u(e)?e.entrySeq():e).toSetSeq()}y.prototype.toString=function(){return"[Iterator]"},y.KEYS=re,y.VALUES=d,y.ENTRIES=oe,y.prototype.inspect=y.prototype.toSource=function(){return this.toString()},y.prototype[se]=function(){return this},e(t,c),t.of=function(){return t(arguments)},t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){if(!this._cache&&this.__iterateUncached){this._cache=this.entrySeq().toArray();this.size=this._cache.length}return this},t.prototype.__iterate=function(e,t){return De(this,e,t,true)},t.prototype.__iterator=function(e,t){return Te(this,e,t,true)},e(w,t),w.prototype.toKeyedSeq=function(){return this},e(S,t),S.of=function(){return S(arguments)},S.prototype.toIndexedSeq=function(){return this},S.prototype.toString=function(){return this.__toString("Seq [","]")},S.prototype.__iterate=function(e,t){return De(this,e,t,false)},S.prototype.__iterator=function(e,t){return Te(this,e,t,false)},e(de,t),de.of=function(){return de(arguments)},de.prototype.toSetSeq=function(){return this},t.isSeq=Se,t.Keyed=w,t.Set=de,t.Indexed=S;var he="@@__IMMUTABLE_SEQ__@@",ye,ge,me;function ve(e){this._array=e;this.size=e.length}function be(e){var t=Object.keys(e);this._object=e;this._keys=t;this.size=t.length}function _e(e){this._iterable=e;this.size=e.length||e.size}function we(e){this._iterator=e;this._iteratorCache=[]}function Se(e){return!!(e&&e[he])}function Ee(){return ye||(ye=new ve([]))}function Ce(e){var t=Array.isArray(e)?new ve(e).fromEntrySeq():ue(e)?new we(e).fromEntrySeq():ce(e)?new _e(e).fromEntrySeq():typeof e==="object"?new be(e):undefined;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, "+"or keyed object: "+e);return t}function Oe(e){var t=ke(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function xe(e){var t=ke(e)||typeof e==="object"&&new be(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function ke(e){return pe(e)?new ve(e):ue(e)?new we(e):ce(e)?new _e(e):undefined}function De(e,t,n,r){var o=e._cache;if(o){var i=o.length-1;for(var a=0;a<=i;a++){var s=o[n?i-a:a];if(t(s[1],r?s[0]:a,e)===false)return a+1}return a}return e.__iterateUncached(t,n)}function Te(e,t,n,r){var o=e._cache;if(o){var i=o.length-1;var a=0;return new y(function(){var e=o[n?i-a:a];return a++>i?m():g(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function je(e,t){return t?Ie(t,e,"",{"":e}):Me(e)}function Ie(n,r,e,t){if(Array.isArray(r))return n.call(t,e,S(r).map(function(e,t){return Ie(n,e,t,r)}));if(Ne(r))return n.call(t,e,w(r).map(function(e,t){return Ie(n,e,t,r)}));return r}function Me(e){if(Array.isArray(e))return S(e).map(Me).toList();if(Ne(e))return w(e).map(Me).toMap();return e}function Ne(e){return e&&(e.constructor===Object||e.constructor===undefined)}function E(e,t){if(e===t||e!==e&&t!==t)return true;if(!e||!t)return false;if(typeof e.valueOf==="function"&&typeof t.valueOf==="function"){e=e.valueOf();t=t.valueOf();if(e===t||e!==e&&t!==t)return true;if(!e||!t)return false}if(typeof e.equals==="function"&&typeof t.equals==="function"&&e.equals(t))return true;return false}function Ae(n,e){if(n===e)return true;if(!l(e)||n.size!==undefined&&e.size!==undefined&&n.size!==e.size||n.__hash!==undefined&&e.__hash!==undefined&&n.__hash!==e.__hash||u(n)!==u(e)||f(n)!==f(e)||B(n)!==B(e))return false;if(n.size===0&&e.size===0)return true;var r=!F(n);if(B(n)){var o=n.entries();return e.every(function(e,t){var n=o.next().value;return n&&E(n[1],e)&&(r||E(n[0],t))})&&o.next().done}var i=false;if(n.size===undefined)if(e.size===undefined){if(typeof n.cacheResult==="function")n.cacheResult()}else{i=true;var t=n;n=e;e=t}var a=true;var s=e.__iterate(function(e,t){if(r?!n.has(e):i?!E(e,n.get(t,v)):!E(n.get(t,v),e)){a=false;return false}});return a&&n.size===s}function o(e,t){if(!(this instanceof o))return new o(e,t);this._value=e;this.size=t===undefined?Infinity:Math.max(0,t);if(this.size===0){if(ge)return ge;ge=this}}function Pe(e,t){if(!e)throw new Error(t)}function i(e,t,n){if(!(this instanceof i))return new i(e,t,n);Pe(n!==0,"Cannot step a Range by 0");e=e||0;if(t===undefined)t=Infinity;n=n===undefined?1:Math.abs(n);if(t<e)n=-n;this._start=e;this._end=t;this._step=n;this.size=Math.max(0,Math.ceil((t-e)/n-1)+1);if(this.size===0){if(me)return me;me=this}}function Re(){throw TypeError("Abstract")}function Le(){}function Fe(){}function Be(){}t.prototype[he]=true,e(ve,S),ve.prototype.get=function(e,t){return this.has(e)?this._array[J(this,e)]:t},ve.prototype.__iterate=function(e,t){var n=this._array;var r=n.length-1;for(var o=0;o<=r;o++)if(e(n[t?r-o:o],o,this)===false)return o+1;return o},ve.prototype.__iterator=function(e,t){var n=this._array;var r=n.length-1;var o=0;return new y(function(){return o>r?m():g(e,o,n[t?r-o++:o++])})},e(be,w),be.prototype.get=function(e,t){if(t!==undefined&&!this.has(e))return t;return this._object[e]},be.prototype.has=function(e){return this._object.hasOwnProperty(e)},be.prototype.__iterate=function(e,t){var n=this._object;var r=this._keys;var o=r.length-1;for(var i=0;i<=o;i++){var a=r[t?o-i:i];if(e(n[a],a,this)===false)return i+1}return i},be.prototype.__iterator=function(t,n){var r=this._object;var o=this._keys;var i=o.length-1;var a=0;return new y(function(){var e=o[n?i-a:a];return a++>i?m():g(t,e,r[e])})},be.prototype[U]=true,e(_e,S),_e.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable;var r=le(n);var o=0;if(ue(r)){var i;while(!(i=r.next()).done)if(e(i.value,o++,this)===false)break}return o},_e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable;var r=le(n);if(!ue(r))return new y(m);var o=0;return new y(function(){var e=r.next();return e.done?e:g(t,o++,e.value)})},e(we,S),we.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterator;var r=this._iteratorCache;var o=0;while(o<r.length)if(e(r[o],o++,this)===false)return o;var i;while(!(i=n.next()).done){var a=i.value;r[o]=a;if(e(a,o++,this)===false)break}return o},we.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterator;var r=this._iteratorCache;var o=0;return new y(function(){if(o>=r.length){var e=n.next();if(e.done)return e;r[o]=e.value}return g(t,o,r[o++])})},e(o,S),o.prototype.toString=function(){if(this.size===0)return"Repeat []";return"Repeat [ "+this._value+" "+this.size+" times ]"},o.prototype.get=function(e,t){return this.has(e)?this._value:t},o.prototype.includes=function(e){return E(this._value,e)},o.prototype.slice=function(e,t){var n=this.size;return Q(e,t,n)?this:new o(this._value,te(t,n)-ee(e,n))},o.prototype.reverse=function(){return this},o.prototype.indexOf=function(e){if(E(this._value,e))return 0;return-1},o.prototype.lastIndexOf=function(e){if(E(this._value,e))return this.size;return-1},o.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(e(this._value,n,this)===false)return n+1;return n},o.prototype.__iterator=function(e,t){var n=this;var r=0;return new y(function(){return r<n.size?g(e,r++,n._value):m()})},o.prototype.equals=function(e){return e instanceof o?E(this._value,e._value):Ae(e)},e(i,S),i.prototype.toString=function(){if(this.size===0)return"Range []";return"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},i.prototype.get=function(e,t){return this.has(e)?this._start+J(this,e)*this._step:t},i.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},i.prototype.slice=function(e,t){if(Q(e,t,this.size))return this;e=ee(e,this.size);t=te(t,this.size);if(t<=e)return new i(0,0);return new i(this.get(e,this._end),this.get(t,this._end),this._step)},i.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},i.prototype.lastIndexOf=function(e){return this.indexOf(e)},i.prototype.__iterate=function(e,t){var n=this.size-1;var r=this._step;var o=t?this._start+n*r:this._start;for(var i=0;i<=n;i++){if(e(o,i,this)===false)return i+1;o+=t?-r:r}return i},i.prototype.__iterator=function(t,n){var r=this.size-1;var o=this._step;var i=n?this._start+r*o:this._start;var a=0;return new y(function(){var e=i;i+=n?-o:o;return a>r?m():g(t,a++,e)})},i.prototype.equals=function(e){return e instanceof i?this._start===e._start&&this._end===e._end&&this._step===e._step:Ae(this,e)},e(Re,c),e(Le,Re),e(Fe,Re),e(Be,Re),Re.Keyed=Le,Re.Indexed=Fe,Re.Set=Be;var ze=typeof Math.imul==="function"&&Math.imul(4294967295,2)===-2?Math.imul:function e(t,n){t=t|0;n=n|0;var r=t&65535;var o=n&65535;return r*o+((t>>>16)*o+r*(n>>>16)<<16>>>0)|0};function Ke(e){return e>>>1&1073741824|e&3221225471}function C(e){if(e===false||e===null||e===undefined)return 0;if(typeof e.valueOf==="function"){e=e.valueOf();if(e===false||e===null||e===undefined)return 0}if(e===true)return 1;var t=typeof e;if(t==="number"){var n=e|0;if(n!==e)n^=e*4294967295;while(e>4294967295){e/=4294967295;n^=e}return Ke(n)}if(t==="string")return e.length>Xe?He(e):Ue(e);if(typeof e.hashCode==="function")return e.hashCode();if(t==="object")return qe(e);if(typeof e.toString==="function")return Ue(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function He(e){var t=tt[e];if(t===undefined){t=Ue(e);if(et===Qe){et=0;tt={}}et++;tt[e]=t}return t}function Ue(e){var t=0;for(var n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Ke(t)}function qe(e){var t;if(Ye){t=$e.get(e);if(t!==undefined)return t}t=e[Je];if(t!==undefined)return t;if(!Ve){t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Je];if(t!==undefined)return t;t=Ge(e);if(t!==undefined)return t}t=++Ze;if(Ze&1073741824)Ze=0;if(Ye)$e.set(e,t);else if(We!==undefined&&We(e)===false)throw new Error("Non-extensible objects are not allowed as keys.");else if(Ve)Object.defineProperty(e,Je,{enumerable:false,configurable:false,writable:false,value:t});else if(e.propertyIsEnumerable!==undefined&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable){e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)};e.propertyIsEnumerable[Je]=t}else if(e.nodeType!==undefined)e[Je]=t;else throw new Error("Unable to set a non-enumerable property on object.");return t}var We=Object.isExtensible,Ve=function(){try{Object.defineProperty({},"@",{});return true}catch(e){return false}}();function Ge(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Ye=typeof WeakMap==="function",$e;if(Ye)$e=new WeakMap;var Ze=0,Je="__immutablehash__";if(typeof Symbol==="function")Je=Symbol(Je);var Xe=16,Qe=255,et=0,tt={};function O(e){Pe(e!==Infinity,"Cannot perform this action with an infinite size.")}function x(t){return t===null||t===undefined?ht():nt(t)&&!B(t)?t:ht().withMutations(function(n){var e=s(t);O(e.size);e.forEach(function(e,t){return n.set(t,e)})})}function nt(e){return!!(e&&e[rt])}e(x,Le),x.prototype.toString=function(){return this.__toString("Map {","}")},x.prototype.get=function(e,t){return this._root?this._root.get(0,undefined,e,t):t},x.prototype.set=function(e,t){return yt(this,e,t)},x.prototype.setIn=function(e,t){return this.updateIn(e,v,function(){return t})},x.prototype.remove=function(e){return yt(this,e,v)},x.prototype.deleteIn=function(e){return this.updateIn(e,function(){return v})},x.prototype.update=function(e,t,n){return arguments.length===1?e(this):this.updateIn([e],t,n)},x.prototype.updateIn=function(e,t,n){if(!n){n=t;t=undefined}var r=xt(this,Dn(e),t,n);return r===v?undefined:r},x.prototype.clear=function(){if(this.size===0)return this;if(this.__ownerID){this.size=0;this._root=null;this.__hash=undefined;this.__altered=true;return this}return ht()},x.prototype.merge=function(){return St(this,undefined,arguments)},x.prototype.mergeWith=function(e){var t=R.call(arguments,1);return St(this,e,t)},x.prototype.mergeIn=function(e){var t=R.call(arguments,1);return this.updateIn(e,ht(),function(e){return typeof e.merge==="function"?e.merge.apply(e,t):t[t.length-1]})},x.prototype.mergeDeep=function(){return St(this,Et,arguments)},x.prototype.mergeDeepWith=function(e){var t=R.call(arguments,1);return St(this,Ct(e),t)},x.prototype.mergeDeepIn=function(e){var t=R.call(arguments,1);return this.updateIn(e,ht(),function(e){return typeof e.mergeDeep==="function"?e.mergeDeep.apply(e,t):t[t.length-1]})},x.prototype.sort=function(e){return D(vn(this,e))},x.prototype.sortBy=function(e,t){return D(vn(this,t,e))},x.prototype.withMutations=function(e){var t=this.asMutable();e(t);return t.wasAltered()?t.__ensureOwner(this.__ownerID):this},x.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new Y)},x.prototype.asImmutable=function(){return this.__ensureOwner()},x.prototype.wasAltered=function(){return this.__altered},x.prototype.__iterator=function(e,t){return new lt(this,e,t)},x.prototype.__iterate=function(t,e){var n=this;var r=0;this._root&&this._root.iterate(function(e){r++;return t(e[1],e[0],n)},e);return r},x.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;if(!e){this.__ownerID=e;this.__altered=false;return this}return dt(this.size,this._root,e,this.__hash)},x.isMap=nt;var rt="@@__IMMUTABLE_MAP__@@",a=x.prototype,ot;function it(e,t){this.ownerID=e;this.entries=t}function at(e,t,n){this.ownerID=e;this.bitmap=t;this.nodes=n}function st(e,t,n){this.ownerID=e;this.count=t;this.nodes=n}function ct(e,t,n){this.ownerID=e;this.keyHash=t;this.entries=n}function ut(e,t,n){this.ownerID=e;this.keyHash=t;this.entry=n}function lt(e,t,n){this._type=t;this._reverse=n;this._stack=e._root&&pt(e._root)}function ft(e,t){return g(e,t[0],t[1])}function pt(e,t){return{node:e,index:0,__prev:t}}function dt(e,t,n,r){var o=Object.create(a);o.size=e;o._root=t;o.__ownerID=n;o.__hash=r;o.__altered=false;return o}function ht(){return ot||(ot=dt(0))}function yt(e,t,n){var r;var o;if(!e._root){if(n===v)return e;o=1;r=new it(e.__ownerID,[[t,n]])}else{var i=G(W);var a=G(V);r=gt(e._root,e.__ownerID,0,undefined,t,n,i,a);if(!a.value)return e;o=e.size+(i.value?n===v?-1:1:0)}if(e.__ownerID){e.size=o;e._root=r;e.__hash=undefined;e.__altered=true;return e}return r?dt(o,r):ht()}function gt(e,t,n,r,o,i,a,s){if(!e){if(i===v)return e;h(s);h(a);return new ut(t,r,[o,i])}return e.update(t,n,r,o,i,a,s)}function mt(e){return e.constructor===ut||e.constructor===ct}function vt(e,t,n,r,o){if(e.keyHash===r)return new ct(t,r,[e.entry,o]);var i=(n===0?e.keyHash:e.keyHash>>>n)&_;var a=(n===0?r:r>>>n)&_;var s;var c=i===a?[vt(e,t,n+b,r,o)]:(s=new ut(t,r,o),i<a?[e,s]:[s,e]);return new at(t,1<<i|1<<a,c)}function bt(e,t,n,r){if(!e)e=new Y;var o=new ut(e,C(n),[n,r]);for(var i=0;i<t.length;i++){var a=t[i];o=o.update(e,0,undefined,a[0],a[1])}return o}function _t(e,t,n,r){var o=0;var i=0;var a=new Array(n);for(var s=0,c=1,u=t.length;s<u;s++,c<<=1){var l=t[s];if(l!==undefined&&s!==r){o|=c;a[i++]=l}}return new at(e,o,a)}function wt(e,t,n,r,o){var i=0;var a=new Array(p);for(var s=0;n!==0;s++,n>>>=1)a[s]=n&1?t[i++]:undefined;a[r]=o;return new st(e,i+1,a)}function St(e,t,n){var r=[];for(var o=0;o<n.length;o++){var i=n[o];var a=s(i);if(!l(i))a=a.map(function(e){return je(e)});r.push(a)}return Ot(e,t,r)}function Et(e,t,n){return e&&e.mergeDeep&&l(t)?e.mergeDeep(t):E(e,t)?e:t}function Ct(o){return function(e,t,n){if(e&&e.mergeDeepWith&&l(t))return e.mergeDeepWith(o,t);var r=o(e,t,n);return E(e,r)?e:r}}function Ot(e,o,n){n=n.filter(function(e){return e.size!==0});if(n.length===0)return e;if(e.size===0&&!e.__ownerID&&n.length===1)return e.constructor(n[0]);return e.withMutations(function(r){var e=o?function(t,n){r.update(n,v,function(e){return e===v?t:o(e,t,n)})}:function(e,t){r.set(t,e)};for(var t=0;t<n.length;t++)n[t].forEach(e)})}function xt(e,t,n,r){var o=e===v;var i=t.next();if(i.done){var a=o?n:e;var s=r(a);return s===a?e:s}Pe(o||e&&e.set,"invalid keyPath");var c=i.value;var u=o?v:e.get(c,v);var l=xt(u,t,n,r);return l===u?e:l===v?e.remove(c):(o?ht():e).set(c,l)}function kt(e){e=e-(e>>1&1431655765);e=(e&858993459)+(e>>2&858993459);e=e+(e>>4)&252645135;e=e+(e>>8);e=e+(e>>16);return e&127}function Dt(e,t,n,r){var o=r?e:$(e);o[t]=n;return o}function Tt(e,t,n,r){var o=e.length+1;if(r&&t+1===o){e[t]=n;return e}var i=new Array(o);var a=0;for(var s=0;s<o;s++)if(s===t){i[s]=n;a=-1}else i[s]=e[s+a];return i}function jt(e,t,n){var r=e.length-1;if(n&&t===r){e.pop();return e}var o=new Array(r);var i=0;for(var a=0;a<r;a++){if(a===t)i=1;o[a]=e[a+i]}return o}a[rt]=true,a[q]=a.remove,a.removeIn=a.deleteIn,it.prototype.get=function(e,t,n,r){var o=this.entries;for(var i=0,a=o.length;i<a;i++)if(E(n,o[i][0]))return o[i][1];return r},it.prototype.update=function(e,t,n,r,o,i,a){var s=o===v;var c=this.entries;var u=0;for(var l=c.length;u<l;u++)if(E(r,c[u][0]))break;var f=u<l;if(f?c[u][1]===o:s)return this;h(a);(s||!f)&&h(i);if(s&&c.length===1)return;if(!f&&!s&&c.length>=It)return bt(e,c,r,o);var p=e&&e===this.ownerID;var d=p?c:$(c);if(f)if(s)u===l-1?d.pop():d[u]=d.pop();else d[u]=[r,o];else d.push([r,o]);if(p){this.entries=d;return this}return new it(e,d)},at.prototype.get=function(e,t,n,r){if(t===undefined)t=C(n);var o=1<<((e===0?t:t>>>e)&_);var i=this.bitmap;return(i&o)===0?r:this.nodes[kt(i&o-1)].get(e+b,t,n,r)},at.prototype.update=function(e,t,n,r,o,i,a){if(n===undefined)n=C(r);var s=(t===0?n:n>>>t)&_;var c=1<<s;var u=this.bitmap;var l=(u&c)!==0;if(!l&&o===v)return this;var f=kt(u&c-1);var p=this.nodes;var d=l?p[f]:undefined;var h=gt(d,e,t+b,n,r,o,i,a);if(h===d)return this;if(!l&&h&&p.length>=Mt)return wt(e,p,u,s,h);if(l&&!h&&p.length===2&&mt(p[f^1]))return p[f^1];if(l&&h&&p.length===1&&mt(h))return h;var y=e&&e===this.ownerID;var g=l?h?u:u^c:u|c;var m=l?h?Dt(p,f,h,y):jt(p,f,y):Tt(p,f,h,y);if(y){this.bitmap=g;this.nodes=m;return this}return new at(e,g,m)},st.prototype.get=function(e,t,n,r){if(t===undefined)t=C(n);var o=(e===0?t:t>>>e)&_;var i=this.nodes[o];return i?i.get(e+b,t,n,r):r},st.prototype.update=function(e,t,n,r,o,i,a){if(n===undefined)n=C(r);var s=(t===0?n:n>>>t)&_;var c=o===v;var u=this.nodes;var l=u[s];if(c&&!l)return this;var f=gt(l,e,t+b,n,r,o,i,a);if(f===l)return this;var p=this.count;if(!l)p++;else if(!f){p--;if(p<Nt)return _t(e,u,p,s)}var d=e&&e===this.ownerID;var h=Dt(u,s,f,d);if(d){this.count=p;this.nodes=h;return this}return new st(e,p,h)},ct.prototype.get=function(e,t,n,r){var o=this.entries;for(var i=0,a=o.length;i<a;i++)if(E(n,o[i][0]))return o[i][1];return r},ct.prototype.update=function(e,t,n,r,o,i,a){if(n===undefined)n=C(r);var s=o===v;if(n!==this.keyHash){if(s)return this;h(a);h(i);return vt(this,e,t,n,[r,o])}var c=this.entries;var u=0;for(var l=c.length;u<l;u++)if(E(r,c[u][0]))break;var f=u<l;if(f?c[u][1]===o:s)return this;h(a);(s||!f)&&h(i);if(s&&l===2)return new ut(e,this.keyHash,c[u^1]);var p=e&&e===this.ownerID;var d=p?c:$(c);if(f)if(s)u===l-1?d.pop():d[u]=d.pop();else d[u]=[r,o];else d.push([r,o]);if(p){this.entries=d;return this}return new ct(e,this.keyHash,d)},ut.prototype.get=function(e,t,n,r){return E(n,this.entry[0])?this.entry[1]:r},ut.prototype.update=function(e,t,n,r,o,i,a){var s=o===v;var c=E(r,this.entry[0]);if(c?o===this.entry[1]:s)return this;h(a);if(s){h(i);return}if(c){if(e&&e===this.ownerID){this.entry[1]=o;return this}return new ut(e,this.keyHash,[r,o])}h(i);return vt(this,e,t,C(r),[r,o])},it.prototype.iterate=ct.prototype.iterate=function(e,t){var n=this.entries;for(var r=0,o=n.length-1;r<=o;r++)if(e(n[t?o-r:r])===false)return false},at.prototype.iterate=st.prototype.iterate=function(e,t){var n=this.nodes;for(var r=0,o=n.length-1;r<=o;r++){var i=n[t?o-r:r];if(i&&i.iterate(e,t)===false)return false}},ut.prototype.iterate=function(e,t){return e(this.entry)},e(lt,y),lt.prototype.next=function(){var e=this._type;var t=this._stack;while(t){var n=t.node;var r=t.index++;var o;if(n.entry){if(r===0)return ft(e,n.entry)}else if(n.entries){o=n.entries.length-1;if(r<=o)return ft(e,n.entries[this._reverse?o-r:r])}else{o=n.nodes.length-1;if(r<=o){var i=n.nodes[this._reverse?o-r:r];if(i){if(i.entry)return ft(e,i.entry);t=this._stack=pt(i,t)}continue}}t=this._stack=this._stack.__prev}return m()};var It=p/4,Mt=p/2,Nt=p/4;function n(e){var t=Ht();if(e===null||e===undefined)return t;if(At(e))return e;var r=L(e);var o=r.size;if(o===0)return t;O(o);if(o>0&&o<p)return Kt(0,o,b,null,new Rt(r.toArray()));return t.withMutations(function(n){n.setSize(o);r.forEach(function(e,t){return n.set(t,e)})})}function At(e){return!!(e&&e[Pt])}e(n,Fe),n.of=function(){return this(arguments)},n.prototype.toString=function(){return this.__toString("List [","]")},n.prototype.get=function(e,t){e=J(this,e);if(e>=0&&e<this.size){e+=this._origin;var n=Vt(this,e);return n&&n.array[e&_]}return t},n.prototype.set=function(e,t){return Ut(this,e,t)},n.prototype.remove=function(e){return!this.has(e)?this:e===0?this.shift():e===this.size-1?this.pop():this.splice(e,1)},n.prototype.insert=function(e,t){return this.splice(e,0,t)},n.prototype.clear=function(){if(this.size===0)return this;if(this.__ownerID){this.size=this._origin=this._capacity=0;this._level=b;this._root=this._tail=null;this.__hash=undefined;this.__altered=true;return this}return Ht()},n.prototype.push=function(){var n=arguments;var r=this.size;return this.withMutations(function(e){Gt(e,0,r+n.length);for(var t=0;t<n.length;t++)e.set(r+t,n[t])})},n.prototype.pop=function(){return Gt(this,0,-1)},n.prototype.unshift=function(){var n=arguments;return this.withMutations(function(e){Gt(e,-n.length);for(var t=0;t<n.length;t++)e.set(t,n[t])})},n.prototype.shift=function(){return Gt(this,1)},n.prototype.merge=function(){return Yt(this,undefined,arguments)},n.prototype.mergeWith=function(e){var t=R.call(arguments,1);return Yt(this,e,t)},n.prototype.mergeDeep=function(){return Yt(this,Et,arguments)},n.prototype.mergeDeepWith=function(e){var t=R.call(arguments,1);return Yt(this,Ct(e),t)},n.prototype.setSize=function(e){return Gt(this,0,e)},n.prototype.slice=function(e,t){var n=this.size;if(Q(e,t,n))return this;return Gt(this,ee(e,n),te(t,n))},n.prototype.__iterator=function(t,e){var n=0;var r=zt(this,e);return new y(function(){var e=r();return e===Lt?m():g(t,n++,e)})},n.prototype.__iterate=function(e,t){var n=0;var r=zt(this,t);var o;while((o=r())!==Lt)if(e(o,n++,this)===false)break;return n},n.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;if(!e){this.__ownerID=e;return this}return Kt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash)},n.isList=At;var Pt="@@__IMMUTABLE_LIST__@@",k=n.prototype;function Rt(e,t){this.array=e;this.ownerID=t}k[Pt]=true,k[q]=k.remove,k.setIn=a.setIn,k.deleteIn=k.removeIn=a.removeIn,k.update=a.update,k.updateIn=a.updateIn,k.mergeIn=a.mergeIn,k.mergeDeepIn=a.mergeDeepIn,k.withMutations=a.withMutations,k.asMutable=a.asMutable,k.asImmutable=a.asImmutable,k.wasAltered=a.wasAltered,Rt.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:false||this.array.length===0)return this;var r=n>>>t&_;if(r>=this.array.length)return new Rt([],e);var o=r===0;var i;if(t>0){var a=this.array[r];i=a&&a.removeBefore(e,t-b,n);if(i===a&&o)return this}if(o&&!i)return this;var s=Wt(this,e);if(!o)for(var c=0;c<r;c++)s.array[c]=undefined;if(i)s.array[r]=i;return s},Rt.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||this.array.length===0)return this;var r=n-1>>>t&_;if(r>=this.array.length)return this;var o;if(t>0){var i=this.array[r];o=i&&i.removeAfter(e,t-b,n);if(o===i&&r===this.array.length-1)return this}var a=Wt(this,e);a.array.splice(r+1);if(o)a.array[r]=o;return a};var Lt={},Ft,Bt;function zt(e,c){var u=e._origin;var l=e._capacity;var i=$t(l);var a=e._tail;return f(e._root,e._level,0);function f(e,t,n){return t===0?r(e,n):o(e,t,n)}function r(e,t){var n=t===i?a&&a.array:e&&e.array;var r=t>u?0:u-t;var o=l-t;if(o>p)o=p;return function(){if(r===o)return Lt;var e=c?--o:r++;return n&&n[e]}}function o(e,n,r){var o;var i=e&&e.array;var a=r>u?0:u-r>>n;var s=(l-r>>n)+1;if(s>p)s=p;return function(){do{if(o){var e=o();if(e!==Lt)return e;o=null}if(a===s)return Lt;var t=c?--s:a++;o=f(i&&i[t],n-b,r+(t<<n))}while(true)}}}function Kt(e,t,n,r,o,i,a){var s=Object.create(k);s.size=t-e;s._origin=e;s._capacity=t;s._level=n;s._root=r;s._tail=o;s.__ownerID=i;s.__hash=a;s.__altered=false;return s}function Ht(){return Ft||(Ft=Kt(0,0,b))}function Ut(e,t,n){t=J(e,t);if(t!==t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Gt(e,t).set(0,n):Gt(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail;var o=e._root;var i=G(V);if(t>=$t(e._capacity))r=qt(r,e.__ownerID,0,t,n,i);else o=qt(o,e.__ownerID,e._level,t,n,i);if(!i.value)return e;if(e.__ownerID){e._root=o;e._tail=r;e.__hash=undefined;e.__altered=true;return e}return Kt(e._origin,e._capacity,e._level,o,r)}function qt(e,t,n,r,o,i){var a=r>>>n&_;var s=e&&a<e.array.length;if(!s&&o===undefined)return e;var c;if(n>0){var u=e&&e.array[a];var l=qt(u,t,n-b,r,o,i);if(l===u)return e;c=Wt(e,t);c.array[a]=l;return c}if(s&&e.array[a]===o)return e;h(i);c=Wt(e,t);if(o===undefined&&a===c.array.length-1)c.array.pop();else c.array[a]=o;return c}function Wt(e,t){if(t&&e&&t===e.ownerID)return e;return new Rt(e?e.array.slice():[],t)}function Vt(e,t){if(t>=$t(e._capacity))return e._tail;if(t<1<<e._level+b){var n=e._root;var r=e._level;while(n&&r>0){n=n.array[t>>>r&_];r-=b}return n}}function Gt(e,t,n){if(t!==undefined)t=t|0;if(n!==undefined)n=n|0;var r=e.__ownerID||new Y;var o=e._origin;var i=e._capacity;var a=o+t;var s=n===undefined?i:n<0?i+n:o+n;if(a===o&&s===i)return e;if(a>=s)return e.clear();var c=e._level;var u=e._root;var l=0;while(a+l<0){u=new Rt(u&&u.array.length?[undefined,u]:[],r);c+=b;l+=1<<c}if(l){a+=l;o+=l;s+=l;i+=l}var f=$t(i);var p=$t(s);while(p>=1<<c+b){u=new Rt(u&&u.array.length?[u]:[],r);c+=b}var d=e._tail;var h=p<f?Vt(e,s-1):p>f?new Rt([],r):d;if(d&&p>f&&a<i&&d.array.length){u=Wt(u,r);var y=u;for(var g=c;g>b;g-=b){var m=f>>>g&_;y=y.array[m]=Wt(y.array[m],r)}y.array[f>>>b&_]=d}if(s<i)h=h&&h.removeAfter(r,0,s);if(a>=p){a-=p;s-=p;c=b;u=null;h=h&&h.removeBefore(r,0,a)}else if(a>o||p<f){l=0;while(u){var v=a>>>c&_;if(v!==p>>>c&_)break;if(v)l+=(1<<c)*v;c-=b;u=u.array[v]}if(u&&a>o)u=u.removeBefore(r,c,a-l);if(u&&p<f)u=u.removeAfter(r,c,p-l);if(l){a-=l;s-=l}}if(e.__ownerID){e.size=s-a;e._origin=a;e._capacity=s;e._level=c;e._root=u;e._tail=h;e.__hash=undefined;e.__altered=true;return e}return Kt(a,s,c,u,h)}function Yt(e,t,n){var r=[];var o=0;for(var i=0;i<n.length;i++){var a=n[i];var s=L(a);if(s.size>o)o=s.size;if(!l(a))s=s.map(function(e){return je(e)});r.push(s)}if(o>e.size)e=e.setSize(o);return Ot(e,t,r)}function $t(e){return e<p?0:e-1>>>b<<b}function D(t){return t===null||t===undefined?Xt():Zt(t)?t:Xt().withMutations(function(n){var e=s(t);O(e.size);e.forEach(function(e,t){return n.set(t,e)})})}function Zt(e){return nt(e)&&B(e)}function Jt(e,t,n,r){var o=Object.create(D.prototype);o.size=e?e.size:0;o._map=e;o._list=t;o.__ownerID=n;o.__hash=r;return o}function Xt(){return Bt||(Bt=Jt(ht(),Ht()))}function Qt(e,t,n){var r=e._map;var o=e._list;var i=r.get(t);var a=i!==undefined;var s;var c;if(n===v){if(!a)return e;if(o.size>=p&&o.size>=r.size*2){c=o.filter(function(e,t){return e!==undefined&&i!==t});s=c.toKeyedSeq().map(function(e){return e[0]}).flip().toMap();if(e.__ownerID)s.__ownerID=c.__ownerID=e.__ownerID}else{s=r.remove(t);c=i===o.size-1?o.pop():o.set(i,undefined)}}else if(a){if(n===o.get(i)[1])return e;s=r;c=o.set(i,[t,n])}else{s=r.set(t,o.size);c=o.set(o.size,[t,n])}if(e.__ownerID){e.size=s.size;e._map=s;e._list=c;e.__hash=undefined;return e}return Jt(s,c)}function en(e,t){this._iter=e;this._useKeys=t;this.size=e.size}function tn(e){this._iter=e;this.size=e.size}function nn(e){this._iter=e;this.size=e.size}function rn(e){this._iter=e;this.size=e.size}function on(o){var e=On(o);e._iter=o;e.size=o.size;e.flip=function(){return o};e.reverse=function(){var e=o.reverse.apply(this);e.flip=function(){return o.reverse()};return e};e.has=function(e){return o.includes(e)};e.includes=function(e){return o.has(e)};e.cacheResult=xn;e.__iterateUncached=function(n,e){var r=this;return o.__iterate(function(e,t){return n(t,e,r)!==false},e)};e.__iteratorUncached=function(e,t){if(e===oe){var n=o.__iterator(e,t);return new y(function(){var e=n.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1];e.value[1]=t}return e})}return o.__iterator(e===d?re:d,t)};return e}function an(i,a,s){var e=On(i);e.size=i.size;e.has=function(e){return i.has(e)};e.get=function(e,t){var n=i.get(e,v);return n===v?t:a.call(s,n,e,i)};e.__iterateUncached=function(r,e){var o=this;return i.__iterate(function(e,t,n){return r(a.call(s,e,t,n),t,o)!==false},e)};e.__iteratorUncached=function(r,e){var o=i.__iterator(oe,e);return new y(function(){var e=o.next();if(e.done)return e;var t=e.value;var n=t[0];return g(r,n,a.call(s,t[1],n,i),e)})};return e}function sn(o,n){var e=On(o);e._iter=o;e.size=o.size;e.reverse=function(){return o};if(o.flip)e.flip=function(){var e=on(o);e.reverse=function(){return o.flip()};return e};e.get=function(e,t){return o.get(n?e:-1-e,t)};e.has=function(e){return o.has(n?e:-1-e)};e.includes=function(e){return o.includes(e)};e.cacheResult=xn;e.__iterate=function(n,e){var r=this;return o.__iterate(function(e,t){return n(e,t,r)},!e)};e.__iterator=function(e,t){return o.__iterator(e,!t)};return e}function cn(s,c,u,l){var e=On(s);if(l){e.has=function(e){var t=s.get(e,v);return t!==v&&!!c.call(u,t,e,s)};e.get=function(e,t){var n=s.get(e,v);return n!==v&&c.call(u,n,e,s)?n:t}}e.__iterateUncached=function(r,e){var o=this;var i=0;s.__iterate(function(e,t,n){if(c.call(u,e,t,n)){i++;return r(e,l?t:i-1,o)}},e);return i};e.__iteratorUncached=function(o,e){var i=s.__iterator(oe,e);var a=0;return new y(function(){while(true){var e=i.next();if(e.done)return e;var t=e.value;var n=t[0];var r=t[1];if(c.call(u,r,n,s))return g(o,l?n:a++,r,e)}})};return e}function un(n,r,o){var i=x().asMutable();n.__iterate(function(e,t){i.update(r.call(o,e,t,n),0,function(e){return e+1})});return i.asImmutable()}function ln(r,e,o){var i=u(r);var a=(B(r)?D():x()).asMutable();r.__iterate(function(t,n){a.update(e.call(o,t,n,r),function(e){return e=e||[],e.push(i?[n,t]:t),e})});var t=Cn(r);return a.map(function(e){return T(r,t(e))})}function fn(s,e,t,c){var n=s.size;if(e!==undefined)e=e|0;if(t!==undefined)t=t|0;if(Q(e,t,n))return s;var u=ee(e,n);var r=te(t,n);if(u!==u||r!==r)return fn(s.toSeq().cacheResult(),e,t,c);var o=r-u;var l;if(o===o)l=o<0?0:o;var i=On(s);i.size=l===0?l:s.size&&l||undefined;if(!c&&Se(s)&&l>=0)i.get=function(e,t){e=J(this,e);return e>=0&&e<l?s.get(e+u,t):t};i.__iterateUncached=function(n,e){var r=this;if(l===0)return 0;if(e)return this.cacheResult().__iterate(n,e);var o=0;var i=true;var a=0;s.__iterate(function(e,t){if(!(i&&(i=o++<u))){a++;return n(e,c?t:a-1,r)!==false&&a!==l}});return a};i.__iteratorUncached=function(t,e){if(l!==0&&e)return this.cacheResult().__iterator(t,e);var n=l!==0&&s.__iterator(t,e);var r=0;var o=0;return new y(function(){while(r++<u)n.next();if(++o>l)return m();var e=n.next();if(c||t===d)return e;else if(t===re)return g(t,o-1,undefined,e);else return g(t,o-1,e.value[1],e)})};return i}function pn(t,c,u){var e=On(t);e.__iterateUncached=function(r,e){var o=this;if(e)return this.cacheResult().__iterate(r,e);var i=0;t.__iterate(function(e,t,n){return c.call(u,e,t,n)&&++i&&r(e,t,o)});return i};e.__iteratorUncached=function(o,e){var i=this;if(e)return this.cacheResult().__iterator(o,e);var a=t.__iterator(oe,e);var s=true;return new y(function(){if(!s)return m();var e=a.next();if(e.done)return e;var t=e.value;var n=t[0];var r=t[1];if(!c.call(u,r,n,i)){s=false;return m()}return o===oe?e:g(o,n,r,e)})};return e}function dn(t,u,l,f){var e=On(t);e.__iterateUncached=function(r,e){var o=this;if(e)return this.cacheResult().__iterate(r,e);var i=true;var a=0;t.__iterate(function(e,t,n){if(!(i&&(i=u.call(l,e,t,n)))){a++;return r(e,f?t:a-1,o)}});return a};e.__iteratorUncached=function(o,e){var i=this;if(e)return this.cacheResult().__iterator(o,e);var a=t.__iterator(oe,e);var s=true;var c=0;return new y(function(){var e,t,n;do{e=a.next();if(e.done)if(f||o===d)return e;else if(o===re)return g(o,c++,undefined,e);else return g(o,c++,e.value[1],e);var r=e.value;t=r[0];n=r[1];s&&(s=u.call(l,n,t,i))}while(s);return o===oe?e:g(o,t,n,e)})};return e}function hn(e,t){var n=u(e);var r=[e].concat(t).map(function(e){if(!l(e))e=n?Ce(e):Oe(Array.isArray(e)?e:[e]);else if(n)e=s(e);return e}).filter(function(e){return e.size!==0});if(r.length===0)return e;if(r.length===1){var o=r[0];if(o===e||n&&u(o)||f(e)&&f(o))return o}var i=new ve(r);if(n)i=i.toKeyedSeq();else if(!f(e))i=i.toSetSeq();i=i.flatten(true);i.size=r.reduce(function(e,t){if(e!==undefined){var n=t.size;if(n!==undefined)return e+n}},0);return i}function yn(e,c,u){var t=On(e);t.__iterateUncached=function(o,t){var i=0;var a=false;function s(e,n){var r=this;e.__iterate(function(e,t){if((!c||n<c)&&l(e))s(e,n+1);else if(o(e,u?t:i++,r)===false)a=true;return!a},t)}s(e,0);return i};t.__iteratorUncached=function(n,r){var o=e.__iterator(n,r);var i=[];var a=0;return new y(function(){while(o){var e=o.next();if(e.done!==false){o=i.pop();continue}var t=e.value;if(n===oe)t=t[1];if((!c||i.length<c)&&l(t)){i.push(o);o=t.__iterator(n,r)}else return u?e:g(n,a++,t,e)}return m()})};return t}function gn(n,r,o){var i=Cn(n);return n.toSeq().map(function(e,t){return i(r.call(o,e,t,n))}).flatten(true)}function mn(i,a){var e=On(i);e.size=i.size&&i.size*2-1;e.__iterateUncached=function(n,e){var r=this;var o=0;i.__iterate(function(e,t){return(!o||n(a,o++,r)!==false)&&n(e,o++,r)!==false},e);return o};e.__iteratorUncached=function(e,t){var n=i.__iterator(d,t);var r=0;var o;return new y(function(){if(!o||r%2){o=n.next();if(o.done)return o}return r%2?g(e,r++,a):g(e,r++,o.value,o)})};return e}function vn(n,r,o){if(!r)r=kn;var e=u(n);var i=0;var a=n.toSeq().map(function(e,t){return[t,e,i++,o?o(e,t,n):e]}).toArray();a.sort(function(e,t){return r(e[3],t[3])||e[2]-t[2]}).forEach(e?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]});return e?w(a):f(n)?S(a):de(a)}function bn(n,r,o){if(!r)r=kn;if(o){var e=n.toSeq().map(function(e,t){return[e,o(e,t,n)]}).reduce(function(e,t){return _n(r,e[1],t[1])?t:e});return e&&e[0]}else return n.reduce(function(e,t){return _n(r,e,t)?t:e})}function _n(e,t,n){var r=e(n,t);return r===0&&n!==t&&(n===undefined||n===null||n!==n)||r>0}function wn(e,a,s){var t=On(e);t.size=new ve(s).map(function(e){return e.size}).min();t.__iterate=function(e,t){var n=this.__iterator(d,t);var r;var o=0;while(!(r=n.next()).done)if(e(r.value,o++,this)===false)break;return o};t.__iteratorUncached=function(t,n){var r=s.map(function(e){return e=c(e),le(n?e.reverse():e)});var o=0;var i=false;return new y(function(){var e;if(!i){e=r.map(function(e){return e.next()});i=e.some(function(e){return e.done})}if(i)return m();return g(t,o++,a.apply(null,e.map(function(e){return e.value})))})};return t}function T(e,t){return Se(e)?t:e.constructor(t)}function Sn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function En(e){O(e.size);return Z(e)}function Cn(e){return u(e)?s:f(e)?L:r}function On(e){return Object.create((u(e)?w:f(e)?S:de).prototype)}function xn(){if(this._iter.cacheResult){this._iter.cacheResult();this.size=this._iter.size;return this}else return t.prototype.cacheResult.call(this)}function kn(e,t){return e>t?1:e<t?-1:0}function Dn(e){var t=le(e);if(!t){if(!pe(e))throw new TypeError("Expected iterable or array-like: "+e);t=le(c(e))}return t}function j(r,o){var i;var a=function e(t){if(t instanceof a)return t;if(!(this instanceof a))return new a(t);if(!i){i=true;var n=Object.keys(r);In(s,n);s.size=n.length;s._name=o;s._keys=n;s._defaultValues=r}this._map=x(t)};var s=a.prototype=Object.create(I);s.constructor=a;return a}e(D,x),D.of=function(){return this(arguments)},D.prototype.toString=function(){return this.__toString("OrderedMap {","}")},D.prototype.get=function(e,t){var n=this._map.get(e);return n!==undefined?this._list.get(n)[1]:t},D.prototype.clear=function(){if(this.size===0)return this;if(this.__ownerID){this.size=0;this._map.clear();this._list.clear();return this}return Xt()},D.prototype.set=function(e,t){return Qt(this,e,t)},D.prototype.remove=function(e){return Qt(this,e,v)},D.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},D.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},D.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},D.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);var n=this._list.__ensureOwner(e);if(!e){this.__ownerID=e;this._map=t;this._list=n;return this}return Jt(t,n,e,this.__hash)},D.isOrderedMap=Zt,D.prototype[U]=true,D.prototype[q]=D.prototype.remove,e(en,w),en.prototype.get=function(e,t){return this._iter.get(e,t)},en.prototype.has=function(e){return this._iter.has(e)},en.prototype.valueSeq=function(){return this._iter.valueSeq()},en.prototype.reverse=function(){var e=this;var t=sn(this,true);if(!this._useKeys)t.valueSeq=function(){return e._iter.toSeq().reverse()};return t},en.prototype.map=function(e,t){var n=this;var r=an(this,e,t);if(!this._useKeys)r.valueSeq=function(){return n._iter.toSeq().map(e,t)};return r},en.prototype.__iterate=function(n,t){var r=this;var o;return this._iter.__iterate(this._useKeys?function(e,t){return n(e,t,r)}:(o=t?En(this):0,function(e){return n(e,t?--o:o++,r)}),t)},en.prototype.__iterator=function(t,n){if(this._useKeys)return this._iter.__iterator(t,n);var r=this._iter.__iterator(d,n);var o=n?En(this):0;return new y(function(){var e=r.next();return e.done?e:g(t,n?--o:o++,e.value,e)})},en.prototype[U]=true,e(tn,S),tn.prototype.includes=function(e){return this._iter.includes(e)},tn.prototype.__iterate=function(t,e){var n=this;var r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},tn.prototype.__iterator=function(t,e){var n=this._iter.__iterator(d,e);var r=0;return new y(function(){var e=n.next();return e.done?e:g(t,r++,e.value,e)})},e(nn,de),nn.prototype.has=function(e){return this._iter.includes(e)},nn.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},nn.prototype.__iterator=function(t,e){var n=this._iter.__iterator(d,e);return new y(function(){var e=n.next();return e.done?e:g(t,e.value,e.value,e)})},e(rn,w),rn.prototype.entrySeq=function(){return this._iter.toSeq()},rn.prototype.__iterate=function(n,e){var r=this;return this._iter.__iterate(function(e){if(e){Sn(e);var t=l(e);return n(t?e.get(1):e[1],t?e.get(0):e[0],r)}},e)},rn.prototype.__iterator=function(r,e){var o=this._iter.__iterator(d,e);return new y(function(){while(true){var e=o.next();if(e.done)return e;var t=e.value;if(t){Sn(t);var n=l(t);return g(r,n?t.get(0):t[0],n?t.get(1):t[1],e)}}})},tn.prototype.cacheResult=en.prototype.cacheResult=nn.prototype.cacheResult=rn.prototype.cacheResult=xn,e(j,Le),j.prototype.toString=function(){return this.__toString(jn(this)+" {","}")},j.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},j.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},j.prototype.clear=function(){if(this.__ownerID){this._map&&this._map.clear();return this}var e=this.constructor;return e._empty||(e._empty=Tn(this,ht()))},j.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+jn(this));var n=this._map&&this._map.set(e,t);if(this.__ownerID||n===this._map)return this;return Tn(this,n)},j.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);if(this.__ownerID||t===this._map)return this;return Tn(this,t)},j.prototype.wasAltered=function(){return this._map.wasAltered()},j.prototype.__iterator=function(e,t){var n=this;return s(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},j.prototype.__iterate=function(e,t){var n=this;return s(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},j.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);if(!e){this.__ownerID=e;this._map=t;return this}return Tn(this,t,e)};var I=j.prototype;function Tn(e,t,n){var r=Object.create(Object.getPrototypeOf(e));r._map=t;r.__ownerID=n;return r}function jn(e){return e._name||e.constructor.name||"Record"}function In(e,t){try{t.forEach(Mn.bind(undefined,e))}catch(e){}}function Mn(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){Pe(this.__ownerID,"Cannot set on an immutable record.");this.set(t,e)}})}function M(n){return n===null||n===undefined?Fn():Nn(n)&&!B(n)?n:Fn().withMutations(function(t){var e=r(n);O(e.size);e.forEach(function(e){return t.add(e)})})}function Nn(e){return!!(e&&e[An])}I[q]=I.remove,I.deleteIn=I.removeIn=a.removeIn,I.merge=a.merge,I.mergeWith=a.mergeWith,I.mergeIn=a.mergeIn,I.mergeDeep=a.mergeDeep,I.mergeDeepWith=a.mergeDeepWith,I.mergeDeepIn=a.mergeDeepIn,I.setIn=a.setIn,I.update=a.update,I.updateIn=a.updateIn,I.withMutations=a.withMutations,I.asMutable=a.asMutable,I.asImmutable=a.asImmutable,e(M,Be),M.of=function(){return this(arguments)},M.fromKeys=function(e){return this(s(e).keySeq())},M.prototype.toString=function(){return this.__toString("Set {","}")},M.prototype.has=function(e){return this._map.has(e)},M.prototype.add=function(e){return Rn(this,this._map.set(e,true))},M.prototype.remove=function(e){return Rn(this,this._map.remove(e))},M.prototype.clear=function(){return Rn(this,this._map.clear())},M.prototype.union=function(){var n=R.call(arguments,0);n=n.filter(function(e){return e.size!==0});if(n.length===0)return this;if(this.size===0&&!this.__ownerID&&n.length===1)return this.constructor(n[0]);return this.withMutations(function(t){for(var e=0;e<n.length;e++)r(n[e]).forEach(function(e){return t.add(e)})})},M.prototype.intersect=function(){var n=R.call(arguments,0);if(n.length===0)return this;n=n.map(function(e){return r(e)});var t=this;return this.withMutations(function(e){t.forEach(function(t){if(!n.every(function(e){return e.includes(t)}))e.remove(t)})})},M.prototype.subtract=function(){var n=R.call(arguments,0);if(n.length===0)return this;n=n.map(function(e){return r(e)});var t=this;return this.withMutations(function(e){t.forEach(function(t){if(n.some(function(e){return e.includes(t)}))e.remove(t)})})},M.prototype.merge=function(){return this.union.apply(this,arguments)},M.prototype.mergeWith=function(e){var t=R.call(arguments,1);return this.union.apply(this,t)},M.prototype.sort=function(e){return Bn(vn(this,e))},M.prototype.sortBy=function(e,t){return Bn(vn(this,t,e))},M.prototype.wasAltered=function(){return this._map.wasAltered()},M.prototype.__iterate=function(n,e){var r=this;return this._map.__iterate(function(e,t){return n(t,t,r)},e)},M.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},M.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);if(!e){this.__ownerID=e;this._map=t;return this}return this.__make(t,e)},M.isSet=Nn;var An="@@__IMMUTABLE_SET__@@",N=M.prototype,Pn;function Rn(e,t){if(e.__ownerID){e.size=t.size;e._map=t;return e}return t===e._map?e:t.size===0?e.__empty():e.__make(t)}function Ln(e,t){var n=Object.create(N);n.size=e?e.size:0;n._map=e;n.__ownerID=t;return n}function Fn(){return Pn||(Pn=Ln(ht()))}function Bn(n){return n===null||n===undefined?qn():zn(n)?n:qn().withMutations(function(t){var e=r(n);O(e.size);e.forEach(function(e){return t.add(e)})})}function zn(e){return Nn(e)&&B(e)}N[An]=true,N[q]=N.remove,N.mergeDeep=N.merge,N.mergeDeepWith=N.mergeWith,N.withMutations=a.withMutations,N.asMutable=a.asMutable,N.asImmutable=a.asImmutable,N.__empty=Fn,N.__make=Ln,e(Bn,M),Bn.of=function(){return this(arguments)},Bn.fromKeys=function(e){return this(s(e).keySeq())},Bn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Bn.isOrderedSet=zn;var Kn=Bn.prototype,Hn;function Un(e,t){var n=Object.create(Kn);n.size=e?e.size:0;n._map=e;n.__ownerID=t;return n}function qn(){return Hn||(Hn=Un(Xt()))}function A(e){return e===null||e===undefined?Zn():Wn(e)?e:Zn().unshiftAll(e)}function Wn(e){return!!(e&&e[Vn])}Kn[U]=true,Kn.__empty=qn,Kn.__make=Un,e(A,Fe),A.of=function(){return this(arguments)},A.prototype.toString=function(){return this.__toString("Stack [","]")},A.prototype.get=function(e,t){var n=this._head;e=J(this,e);while(n&&e--)n=n.next;return n?n.value:t},A.prototype.peek=function(){return this._head&&this._head.value},A.prototype.push=function(){if(arguments.length===0)return this;var e=this.size+arguments.length;var t=this._head;for(var n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};if(this.__ownerID){this.size=e;this._head=t;this.__hash=undefined;this.__altered=true;return this}return $n(e,t)},A.prototype.pushAll=function(e){e=L(e);if(e.size===0)return this;O(e.size);var t=this.size;var n=this._head;e.reverse().forEach(function(e){t++;n={value:e,next:n}});if(this.__ownerID){this.size=t;this._head=n;this.__hash=undefined;this.__altered=true;return this}return $n(t,n)},A.prototype.pop=function(){return this.slice(1)},A.prototype.unshift=function(){return this.push.apply(this,arguments)},A.prototype.unshiftAll=function(e){return this.pushAll(e)},A.prototype.shift=function(){return this.pop.apply(this,arguments)},A.prototype.clear=function(){if(this.size===0)return this;if(this.__ownerID){this.size=0;this._head=undefined;this.__hash=undefined;this.__altered=true;return this}return Zn()},A.prototype.slice=function(e,t){if(Q(e,t,this.size))return this;var n=ee(e,this.size);var r=te(t,this.size);if(r!==this.size)return Fe.prototype.slice.call(this,e,t);var o=this.size-n;var i=this._head;while(n--)i=i.next;if(this.__ownerID){this.size=o;this._head=i;this.__hash=undefined;this.__altered=true;return this}return $n(o,i)},A.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;if(!e){this.__ownerID=e;this.__altered=false;return this}return $n(this.size,this._head,e,this.__hash)},A.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);var n=0;var r=this._head;while(r){if(e(r.value,n++,this)===false)break;r=r.next}return n},A.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0;var r=this._head;return new y(function(){if(r){var e=r.value;r=r.next;return g(t,n++,e)}return m()})},A.isStack=Wn;var Vn="@@__IMMUTABLE_STACK__@@",Gn=A.prototype,Yn;function $n(e,t,n,r){var o=Object.create(Gn);o.size=e;o._head=t;o.__ownerID=n;o.__hash=r;o.__altered=false;return o}function Zn(){return Yn||(Yn=$n(0))}function Jn(t,n){var e=function(e){t.prototype[e]=n[e]};Object.keys(n).forEach(e);Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(n).forEach(e);return t}Gn[Vn]=true,Gn.withMutations=a.withMutations,Gn.asMutable=a.asMutable,Gn.asImmutable=a.asImmutable,Gn.wasAltered=a.wasAltered,c.Iterator=y,Jn(c,{toArray:function(){O(this.size);var n=new Array(this.size||0);this.valueSeq().__iterate(function(e,t){n[t]=e});return n},toIndexedSeq:function(){return new tn(this)},toJS:function(){return this.toSeq().map(function(e){return e&&typeof e.toJS==="function"?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&typeof e.toJSON==="function"?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new en(this,true)},toMap:function(){return x(this.toKeyedSeq())},toObject:function(){O(this.size);var n={};this.__iterate(function(e,t){n[t]=e});return n},toOrderedMap:function(){return D(this.toKeyedSeq())},toOrderedSet:function(){return Bn(u(this)?this.valueSeq():this)},toSet:function(){return M(u(this)?this.valueSeq():this)},toSetSeq:function(){return new nn(this)},toSeq:function(){return f(this)?this.toIndexedSeq():u(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return A(u(this)?this.valueSeq():this)},toList:function(){return n(u(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){if(this.size===0)return e+t;return e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var e=R.call(arguments,0);return T(this,hn(this,e))},includes:function(t){return this.some(function(e){return E(e,t)})},entries:function(){return this.__iterator(oe)},every:function(r,o){O(this.size);var i=true;this.__iterate(function(e,t,n){if(!r.call(o,e,t,n)){i=false;return false}});return i},filter:function(e,t){return T(this,cn(this,e,t,true))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(r,o){var i;this.__iterate(function(e,t,n){if(r.call(o,e,t,n)){i=[t,e];return false}});return i},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){O(this.size);return this.__iterate(t?e.bind(t):e)},join:function(t){O(this.size);t=t!==undefined?""+t:",";var n="";var r=true;this.__iterate(function(e){r?r=false:n+=t;n+=e!==null&&e!==undefined?e.toString():""});return n},keys:function(){return this.__iterator(re)},map:function(e,t){return T(this,an(this,e,t))},reduce:function(r,e,o){O(this.size);var i;var a;if(arguments.length<2)a=true;else i=e;this.__iterate(function(e,t,n){if(a){a=false;i=e}else i=r.call(o,i,e,t,n)});return i},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return T(this,sn(this,true))},slice:function(e,t){return T(this,fn(this,e,t,true))},some:function(e,t){return!this.every(nr(e),t)},sort:function(e){return T(this,vn(this,e))},values:function(){return this.__iterator(d)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size!==undefined?this.size===0:!this.some(function(){return true})},count:function(e,t){return Z(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return un(this,e,t)},equals:function(e){return Ae(this,e)},entrySeq:function(){var e=this;if(e._cache)return new ve(e._cache);var t=e.toSeq().map(tr).toIndexedSeq();t.fromEntrySeq=function(){return e.toSeq()};return t},filterNot:function(e,t){return this.filter(nr(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(X)},flatMap:function(e,t){return T(this,gn(this,e,t))},flatten:function(e){return T(this,yn(this,e,true))},fromEntrySeq:function(){return new rn(this)},get:function(n,e){return this.find(function(e,t){return E(t,n)},undefined,e)},getIn:function(e,t){var n=this;var r=Dn(e);var o;while(!(o=r.next()).done){var i=o.value;n=n&&n.get?n.get(i,v):v;if(n===v)return t}return n},groupBy:function(e,t){return ln(this,e,t)},has:function(e){return this.get(e,v)!==v},hasIn:function(e){return this.getIn(e,v)!==v},isSubset:function(t){t=typeof t.includes==="function"?t:c(t);return this.every(function(e){return t.includes(e)})},isSuperset:function(e){e=typeof e.isSubset==="function"?e:c(e);return e.isSubset(this)},keySeq:function(){return this.toSeq().map(er).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return bn(this,e)},maxBy:function(e,t){return bn(this,t,e)},min:function(e){return bn(this,e?rr(e):ar)},minBy:function(e,t){return bn(this,t?rr(t):ar,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return T(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return T(this,dn(this,e,t,true))},skipUntil:function(e,t){return this.skipWhile(nr(e),t)},sortBy:function(e,t){return T(this,vn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return T(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return T(this,pn(this,e,t))},takeUntil:function(e,t){return this.takeWhile(nr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=sr(this))}});var P=c.prototype;P[z]=true,P[se]=P.values,P.__toJS=P.toArray,P.__toStringMapper=or,P.inspect=P.toSource=function(){return this.toString()},P.chain=P.flatMap,P.contains=P.includes;try{Object.defineProperty(P,"length",{get:function(){if(!c.noLengthWarning){var t;try{throw new Error}catch(e){t=e.stack}if(t.indexOf("_wrapObject")===-1){console&&console.warn&&console.warn("iterable.length has been deprecated, "+"use iterable.size or iterable.count(). "+"This warning will become a silent error in a future version. "+t);return this.size}}}})}catch(e){}Jn(s,{flip:function(){return T(this,on(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(t){return this.findKey(function(e){return E(e,t)})},lastKeyOf:function(t){return this.findLastKey(function(e){return E(e,t)})},mapEntries:function(n,r){var o=this;var i=0;return T(this,this.toSeq().map(function(e,t){return n.call(r,[t,e],i++,o)}).fromEntrySeq())},mapKeys:function(n,r){var o=this;return T(this,this.toSeq().flip().map(function(e,t){return n.call(r,e,t,o)}).flip())}});var Xn=s.prototype,Qn;function er(e,t){return t}function tr(e,t){return[t,e]}function nr(e){return function(){return!e.apply(this,arguments)}}function rr(e){return function(){return-e.apply(this,arguments)}}function or(e){return typeof e==="string"?JSON.stringify(e):e}function ir(){return $(arguments)}function ar(e,t){return e<t?1:e>t?-1:0}function sr(e){if(e.size===Infinity)return 0;var t=B(e);var n=u(e);var r=t?1:0;var o=e.__iterate(n?t?function(e,t){r=31*r+ur(C(e),C(t))|0}:function(e,t){r=r+ur(C(e),C(t))|0}:t?function(e){r=31*r+C(e)|0}:function(e){r=r+C(e)|0});return cr(o,r)}function cr(e,t){t=ze(t,3432918353);t=ze(t<<15|t>>>-15,461845907);t=ze(t<<13|t>>>-13,5);t=(t+3864292196|0)^e;t=ze(t^t>>>16,2246822507);t=ze(t^t>>>13,3266489909);t=Ke(t^t>>>16);return t}function ur(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Xn[K]=true,Xn[se]=P.entries,Xn.__toJS=P.toObject,Xn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+or(e)},Jn(L,{toKeyedSeq:function(){return new en(this,false)},filter:function(e,t){return T(this,cn(this,e,t,false))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return t===undefined?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return t===undefined?-1:t},reverse:function(){return T(this,sn(this,false))},slice:function(e,t){return T(this,fn(this,e,t,false))},splice:function(e,t){var n=arguments.length;t=Math.max(t|0,0);if(n===0||n===2&&!t)return this;e=ee(e,e<0?this.count():this.size);var r=this.slice(0,e);return T(this,n===1?r:r.concat($(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return n===undefined?-1:n},first:function(){return this.get(0)},flatten:function(e){return T(this,yn(this,e,false))},get:function(n,e){n=J(this,n);return n<0||(this.size===Infinity||this.size!==undefined&&n>this.size)?e:this.find(function(e,t){return t===n},undefined,e)},has:function(e){e=J(this,e);return e>=0&&(this.size!==undefined?this.size===Infinity||e<this.size:this.indexOf(e)!==-1)},interpose:function(e){return T(this,mn(this,e))},interleave:function(){var e=[this].concat($(arguments));var t=wn(this.toSeq(),S.of,e);var n=t.flatten(true);if(t.size)n.size=t.size*e.length;return T(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return T(this,dn(this,e,t,false))},zip:function(){var e=[this].concat($(arguments));return T(this,wn(this,ir,e))},zipWith:function(e){var t=$(arguments);t[0]=this;return T(this,wn(this,e,t))}}),L.prototype[H]=true,L.prototype[U]=true,Jn(r,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),r.prototype.has=P.includes,Jn(w,s.prototype),Jn(S,L.prototype),Jn(de,r.prototype),Jn(Le,s.prototype),Jn(Fe,L.prototype),Jn(Be,r.prototype),{Iterable:c,Seq:t,Collection:Re,Map:x,OrderedMap:D,List:n,Stack:A,Set:M,OrderedSet:Bn,Record:j,Range:i,Repeat:o,is:E,fromJS:je}}()},function(e,t,n){"use strict";var s=function(e){};e.exports=function(e,t){for(var n,r,o=arguments.length,i=new Array(2<o?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];if(s(t),!e)throw void 0===t?r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."):(n=0,(r=new Error(t.replace(/%s/g,function(){return String(i[n++])}))).name="Invariant Violation"),r.framesToPop=1,r}},function(e,t,n){"use strict";function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);(r="function"==typeof Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})):r).forEach(function(e){o(t,e,n[e])})}return t}function o(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}var h=n(114),i=n(40),l=n(116),a=n(31),n=n(6),s=n.OrderedSet,c=n.Record,f=n.Stack,p=n.OrderedMap,d=n.List,y=c({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:f(),selection:null,treeMap:null,undoStack:f()}),u=function(){u.createEmpty=function(e){return this.createWithText("",e)},u.createWithText=function(e,t){return u.createWithContent(i.createFromText(e),t)},u.createWithContent=function(e,t){if(0===e.getBlockMap().count())return u.createEmpty(t);var n=e.getBlockMap().first().getKey();return u.create({currentContent:e,undoStack:f(),redoStack:f(),decorator:t||null,selection:a.createEmpty(n)})},u.create=function(e){var t=e.currentContent,e=r({},e,{treeMap:m(t,e.decorator),directionMap:l.getDirectionMap(t)});return new u(new y(e))},u.fromJS=function(e){return new u(new y(r({},e,{directionMap:null!=e.directionMap?p(e.directionMap):e.directionMap,inlineStyleOverride:null!=e.inlineStyleOverride?s(e.inlineStyleOverride):e.inlineStyleOverride,nativelyRenderedContent:null!=e.nativelyRenderedContent?i.fromJS(e.nativelyRenderedContent):e.nativelyRenderedContent,redoStack:null!=e.redoStack?f(e.redoStack.map(function(e){return i.fromJS(e)})):e.redoStack,selection:null!=e.selection?new a(e.selection):e.selection,treeMap:null!=e.treeMap?p(e.treeMap).map(function(e){return d(e).map(function(e){return h.fromJS(e)})}):e.treeMap,undoStack:null!=e.undoStack?f(e.undoStack.map(function(e){return i.fromJS(e)})):e.undoStack,currentContent:i.fromJS(e.currentContent)})))},u.set=function(p,d){return new u(p.getImmutable().withMutations(function(e){var t,n,r,o,i,a,s,c,u=e.get("decorator"),l=u,f=(null===d.decorator?l=null:d.decorator&&(l=d.decorator),d.currentContent||p.getCurrentContent());if(l!==u)return o=e.get("treeMap"),u=l&&u?(i=(t=f).getBlockMap(),n=l,r=u,o.merge(i.toSeq().filter(function(e){return n.getDecorations(e,t)!==r.getDecorations(e,t)}).map(function(e){return h.generate(t,e,n)}))):m(f,l),void e.merge({decorator:l,treeMap:u,nativelyRenderedContent:null});f!==p.getCurrentContent()&&e.set("treeMap",(o=p,i=f.getBlockMap(),u=f.getEntityMap(),a=l,s=o.getCurrentContent().set("entityMap",u),c=s.getBlockMap(),o.getImmutable().get("treeMap").merge(i.toSeq().filter(function(e,t){return e!==c.get(t)}).map(function(e){return h.generate(s,e,a)})))),e.merge(d)}))};var e=u.prototype;function u(e){o(this,"_immutable",void 0),this._immutable=e}return e.toJS=function(){return this.getImmutable().toJS()},e.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},e.getCurrentContent=function(){return this.getImmutable().get("currentContent")},e.getUndoStack=function(){return this.getImmutable().get("undoStack")},e.getRedoStack=function(){return this.getImmutable().get("redoStack")},e.getSelection=function(){return this.getImmutable().get("selection")},e.getDecorator=function(){return this.getImmutable().get("decorator")},e.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},e.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},e.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},e.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},e.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},u.setInlineStyleOverride=function(e,t){return u.set(e,{inlineStyleOverride:t})},e.getCurrentInlineStyle=function(){var e=this.getInlineStyleOverride();if(null!=e)return e;var t,n,r,o,e=this.getCurrentContent(),i=this.getSelection();return i.isCollapsed()?(n=e,o=(t=i).getStartKey(),t=t.getStartOffset(),r=n.getBlockForKey(o),0<t?r.getInlineStyleAt(t-1):r.getLength()?r.getInlineStyleAt(0):v(n,o)):(t=e,n=(r=i).getStartKey(),r=r.getStartOffset(),o=t.getBlockForKey(n),r<o.getLength()?o.getInlineStyleAt(r):0<r?o.getInlineStyleAt(r-1):v(t,n))},e.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},e.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},e.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},e.getDirectionMap=function(){return this.getImmutable().get("directionMap")},u.acceptSelection=function(e,t){return g(e,t,!1)},u.forceSelection=function(e,t){return g(e,t=t.getHasFocus()?t:t.set("hasFocus",!0),!0)},u.moveSelectionToEnd=function(e){var t=e.getCurrentContent().getLastBlock(),n=t.getKey(),t=t.getLength();return u.acceptSelection(e,new a({anchorKey:n,anchorOffset:t,focusKey:n,focusOffset:t,isBackward:!1}))},u.moveFocusToEnd=function(e){e=u.moveSelectionToEnd(e);return u.forceSelection(e,e.getSelection())},u.push=function(e,t,n){var r=!(3<arguments.length&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===t)return e;var o=l.getDirectionMap(t,e.getDirectionMap());if(!e.getAllowUndo())return u.set(e,{currentContent:t,directionMap:o,lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:null});var i=e.getSelection(),a=e.getCurrentContent(),s=e.getUndoStack(),c=t,i=(i!==a.getSelectionAfter()||function(e,t){e=e.getLastChangeType();return t!==e||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(e,n)?(s=s.push(a),c=c.set("selectionBefore",i)):"insert-characters"!==n&&"backspace-character"!==n&&"delete-character"!==n||(c=c.set("selectionBefore",a.getSelectionBefore())),e.getInlineStyleOverride()),a=(-1===["adjust-depth","change-block-type","split-block"].indexOf(n)&&(i=null),{currentContent:c,directionMap:o,undoStack:s,redoStack:f(),lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:i});return u.set(e,a)},u.undo=function(e){if(!e.getAllowUndo())return e;var t=e.getUndoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=l.getDirectionMap(n,e.getDirectionMap());return u.set(e,{currentContent:n,directionMap:o,undoStack:t.shift(),redoStack:e.getRedoStack().push(r),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:r.getSelectionBefore()})},u.redo=function(e){if(!e.getAllowUndo())return e;var t=e.getRedoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=l.getDirectionMap(n,e.getDirectionMap());return u.set(e,{currentContent:n,directionMap:o,undoStack:e.getUndoStack().push(r),redoStack:t.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:n.getSelectionAfter()})},e.getImmutable=function(){return this._immutable},u}();function g(e,t,n){return u.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function m(t,n){return t.getBlockMap().map(function(e){return h.generate(t,e,n)}).toOrderedMap()}function v(e,n){e=e.getBlockMap().reverse().skipUntil(function(e,t){return t===n}).skip(1).skipUntil(function(e,t){return e.getLength()}).first();return e?e.getInlineStyleAt(e.getLength()-1):s()}e.exports=u},function(e,t,n){"use strict";var i=n(12),r=n(104),o=n(105),u=n(107),a=n(29),s=n(6),c=n(110),l=n(111),f=n(7),p=n(54),d=n(52),h=n(112),y=n(113),g=s.OrderedSet,m={replaceText:function(e,t,n,r,o){e=d(e,t),e=h(e,t),t=i.create({style:r||g(),entity:o||null});return l(e,e.getSelectionAfter(),n,t)},insertText:function(e,t,n,r,o){return t.isCollapsed()||f(!1),m.replaceText(e,t,n,r,o)},moveText:function(e,t,n){var r=a(e,t),e=m.removeRange(e,t,"backward");return m.replaceWithFragment(e,n,r)},replaceWithFragment:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",e=d(e,t),e=h(e,t);return c(e,e.getSelectionAfter(),n,r)},removeRange:function(e,t,n){i=(t=t.getIsBackward()?t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1}):t).getAnchorKey(),c=t.getFocusKey(),r=e.getBlockForKey(i),o=e.getBlockForKey(c);var r,o,i,a=t.getStartOffset(),s=t.getEndOffset(),a=r.getEntityAt(a),s=o.getEntityAt(s-1);if(i===c&&(a&&a===s))return i=u(e.getEntityMap(),r,o,t,n),h(e,i);var c=d(e,t);return h(c,t)},splitBlock:function(e,t){e=d(e,t),e=h(e,t);return y(e,e.getSelectionAfter())},applyInlineStyle:function(e,t,n){return r.add(e,t,n)},removeInlineStyle:function(e,t,n){return r.remove(e,t,n)},setBlockType:function(e,t,n){return p(e,t,function(e){return e.merge({type:n,depth:0})})},setBlockData:function(e,t,n){return p(e,t,function(e){return e.merge({data:n})})},mergeBlockData:function(e,t,n){return p(e,t,function(e){return e.merge({data:e.getData().merge(n)})})},applyEntity:function(e,t,n){e=d(e,t);return o(e,t,n)}};e.exports=m},function(e,t,n){"use strict";e.exports=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")}},function(e,t,n){"use strict";var r=n(123),o=n(126),i=n(127),n=n(128);function a(e,t,n,r){if(e===n)return!0;if(!n.startsWith(e))return!1;n=n.slice(e.length);return!!t&&(n=r?r(n):n,o.contains(n,t))}function s(e){return"Windows"===r.platformName?e.replace(/^\s*NT/,""):e}e.exports=i({isBrowser:function(e){return a(r.browserName,r.browserFullVersion,e)},isBrowserArchitecture:function(e){return a(r.browserArchitecture,null,e)},isDevice:function(e){return a(r.deviceName,null,e)},isEngine:function(e){return a(r.engineName,r.engineVersion,e)},isPlatform:function(e){return a(r.platformName,r.platformFullVersion,e,s)},isPlatformArchitecture:function(e){return a(r.platformArchitecture,null,e)}},n)},function(e,t,n){"use strict";var n=n(6),o=n.Map,i=n.OrderedSet,n=n.Record,a=i(),r={style:a,entity:null},n=function(e){var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.getStyle=function(){return this.get("style")},r.getEntity=function(){return this.get("entity")},r.hasStyle=function(e){return this.getStyle().includes(e)},n.applyStyle=function(e,t){e=e.set("style",e.getStyle().add(t));return n.create(e)},n.removeStyle=function(e,t){e=e.set("style",e.getStyle().remove(t));return n.create(e)},n.applyEntity=function(e,t){e=e.getEntity()===t?e:e.set("entity",t);return n.create(e)},n.create=function(e){if(!e)return s;var e=o({style:a,entity:null}).merge(e),t=c.get(e);if(t)return t;t=new n(e);return c=c.set(e,t),t},n.fromJS=function(e){var t=e.style,e=e.entity;return new n({style:Array.isArray(t)?i(t):t,entity:Array.isArray(e)?i(e):e})},n}(n(r)),s=new n,c=o([[o(r),s]]);n.EMPTY=s,e.exports=n},function(e,t,n){"use strict";function o(e,t){return e.getStyle()===t.getStyle()}function i(e,t){return e.getEntity()===t.getEntity()}var a=n(12),s=n(26),n=n(6),c=n.List,r=n.Map,u=n.OrderedSet,l=n.Record,f=n.Repeat,p=u(),d={parent:null,characterList:c(),data:r(),depth:0,key:"",text:"",type:"unstyled",children:c(),prevSibling:null,nextSibling:null},n=function(e){var t;function n(){return e.call(this,function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=c(f(a.EMPTY,n.length))),e}(0<arguments.length&&void 0!==arguments[0]?arguments[0]:d))||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.getKey=function(){return this.get("key")},r.getType=function(){return this.get("type")},r.getText=function(){return this.get("text")},r.getCharacterList=function(){return this.get("characterList")},r.getLength=function(){return this.getText().length},r.getDepth=function(){return this.get("depth")},r.getData=function(){return this.get("data")},r.getInlineStyleAt=function(e){e=this.getCharacterList().get(e);return e?e.getStyle():p},r.getEntityAt=function(e){e=this.getCharacterList().get(e);return e?e.getEntity():null},r.getChildKeys=function(){return this.get("children")},r.getParentKey=function(){return this.get("parent")},r.getPrevSiblingKey=function(){return this.get("prevSibling")},r.getNextSiblingKey=function(){return this.get("nextSibling")},r.findStyleRanges=function(e,t){s(this.getCharacterList(),o,e,t)},r.findEntityRanges=function(e,t){s(this.getCharacterList(),i,e,t)},n}(l(d));e.exports=n},function(e,t,n){"use strict";var r={},o=Math.pow(2,24);e.exports=function(){for(var e;void 0===e||r.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*o).toString(32);return r[e]=!0,e}},function(e,t,n){"use strict";e.exports={encode:function(e,t,n){return e+"-"+t+"-"+n},decode:function(e){var e=e.split("-").reverse(),t=e[0],n=e[1];return{blockKey:e.slice(2).reverse().join("-"),decoratorKey:parseInt(n,10),leafKey:parseInt(t,10)}}}},function(e,t,n){"use strict";e.exports=function(e){return!("undefined"==typeof window||!window.__DRAFT_GKX)&&!!window.__DRAFT_GKX[e]}},function(e,t,n){"use strict";
|
|
45
45
|
/*
|
|
46
46
|
object-assign
|
|
47
47
|
(c) Sindre Sorhus
|
|
48
48
|
@license MIT
|
|
49
|
-
*/var c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},r)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var n,r=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var i in n=Object(arguments[o]))u.call(n,i)&&(r[i]=n[i]);if(c)for(var a=c(n),s=0;s<a.length;s++)l.call(n,a[s])&&(r[a[s]]=n[a[s]])}return r}},function(e,l,t){"use strict";var o=t(12),i=t(26),t=t(6),a=t.List,n=t.Map,r=t.OrderedSet,s=t.Record,c=t.Repeat,u=r(),t=s({key:"",type:"unstyled",text:"",characterList:a(),depth:0,data:n()}),r=function(t){var e;function n(e){return t.call(this,function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=a(c(o.EMPTY,n.length))),e}(e))||this}e=t,(r=n).prototype=Object.create(e.prototype),(r.prototype.constructor=r).__proto__=e;var r=n.prototype;return r.getKey=function(){return this.get("key")},r.getType=function(){return this.get("type")},r.getText=function(){return this.get("text")},r.getCharacterList=function(){return this.get("characterList")},r.getLength=function(){return this.getText().length},r.getDepth=function(){return this.get("depth")},r.getData=function(){return this.get("data")},r.getInlineStyleAt=function(e){e=this.getCharacterList().get(e);return e?e.getStyle():u},r.getEntityAt=function(e){e=this.getCharacterList().get(e);return e?e.getEntity():null},r.findStyleRanges=function(e,t){i(this.getCharacterList(),f,e,t)},r.findEntityRanges=function(e,t){i(this.getCharacterList(),p,e,t)},n}(t);function f(e,t){return e.getStyle()===t.getStyle()}function p(e,t){return e.getEntity()===t.getEntity()}e.exports=r},function(e,t,n){"use strict";function r(e){return e.replace(/\//g,"-")}e.exports=function(t){return("object"==typeof t?Object.keys(t).filter(function(e){return t[e]}).map(r):Array.prototype.map.call(arguments,r)).join(" ")}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.ownerDocument)&&e.nodeType===Node.ELEMENT_NODE}},function(e,l,t){"use strict";var r=t(7),o=55296,i=57343,n=/[\uD800-\uDFFF]/;function a(e){return o<=e&&e<=i}function s(e){return n.test(e)}function c(e,t){return 1+a(e.charCodeAt(t))}function u(e,t,n){if(t=t||0,n=void 0===n?1/0:n||0,!s(e))return e.substr(t,n);var r=e.length;if(r<=0||r<t||n<=0)return"";var o=0;if(0<t){for(;0<t&&o<r;t--)o+=c(e,o);if(r<=o)return""}else if(t<0){for(o=r;t<0&&0<o;t++)o-=c(e,o-1);o<0&&(o=0)}var i=r;if(n<r)for(i=o;0<n&&i<r;n--)i+=c(e,i);return e.substring(o,i)}e.exports={getCodePoints:function(e){for(var t=[],n=0;n<e.length;n+=c(e,n))t.push(e.codePointAt(n));return t},getUTF16Length:c,hasSurrogateUnit:s,isCodeUnitInSurrogateRange:a,isSurrogatePair:function(e,t){if(0<=t&&t<e.length||r(!1),t+1===e.length)return!1;var n=e.charCodeAt(t),e=e.charCodeAt(t+1);return o<=n&&n<=56319&&56320<=e&&e<=i},strlen:function(e){if(!s(e))return e.length;for(var t=0,n=0;n<e.length;n+=c(e,n))t++;return t},substring:function(e,t,n){(t=t||0)<0&&(t=0),(n=void 0===n?1/0:n||0)<0&&(n=0);var r=Math.abs(n-t);return u(e,t=t<n?t:n,r)},substr:u}},function(e,t){e.exports=ReactDOM},function(e,t){var n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(r,e,t){"use strict";t.r(e),t.d(e,"Collection",function(){return u}),t.d(e,"Iterable",function(){return Cr}),t.d(e,"List",function(){return ln}),t.d(e,"Map",function(){return Kt}),t.d(e,"OrderedMap",function(){return En}),t.d(e,"OrderedSet",function(){return fr}),t.d(e,"Range",function(){return Gn}),t.d(e,"Record",function(){return yr}),t.d(e,"Repeat",function(){return _r}),t.d(e,"Seq",function(){return te}),t.d(e,"Set",function(){return Kn}),t.d(e,"Stack",function(){return jn}),t.d(e,"fromJS",function(){return wr}),t.d(e,"get",function(){return lt}),t.d(e,"getIn",function(){return Yn}),t.d(e,"has",function(){return ut}),t.d(e,"hasIn",function(){return Zn}),t.d(e,"hash",function(){return _e}),t.d(e,"is",function(){return ge}),t.d(e,"isAssociative",function(){return T}),t.d(e,"isCollection",function(){return O}),t.d(e,"isImmutable",function(){return L}),t.d(e,"isIndexed",function(){return D}),t.d(e,"isKeyed",function(){return c}),t.d(e,"isList",function(){return cn}),t.d(e,"isMap",function(){return de}),t.d(e,"isOrdered",function(){return B}),t.d(e,"isOrderedMap",function(){return he}),t.d(e,"isOrderedSet",function(){return Rn}),t.d(e,"isPlainObject",function(){return at}),t.d(e,"isRecord",function(){return R}),t.d(e,"isSeq",function(){return A}),t.d(e,"isSet",function(){return Pn}),t.d(e,"isStack",function(){return Dn}),t.d(e,"isValueObject",function(){return ye}),t.d(e,"merge",function(){return Ot}),t.d(e,"mergeDeep",function(){return kt}),t.d(e,"mergeDeepWith",function(){return Dt}),t.d(e,"mergeWith",function(){return xt}),t.d(e,"remove",function(){return pt}),t.d(e,"removeIn",function(){return mt}),t.d(e,"set",function(){return dt}),t.d(e,"setIn",function(){return yt}),t.d(e,"update",function(){return bt}),t.d(e,"updateIn",function(){return ht}),t.d(e,"version",function(){return Er});var t="delete",b=5,w=1<<b,S=w-1,_={};function a(){return{value:!1}}function m(e){e&&(e.value=!0)}function v(){}function f(e){return void 0===e.size&&(e.size=e.__iterate(o)),e.size}function d(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295==n)return NaN;t=n}return t<0?f(e)+t:t}function o(){return!0}function h(e,t,n){return(0===e&&!E(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&n<=t)}function y(e,t){return s(e,t,0)}function g(e,t){return s(e,t,t)}function s(e,t,n){return void 0===e?n:E(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function E(e){return e<0||0===e&&1/e==-1/0}var C="@@__IMMUTABLE_ITERABLE__@@";function O(e){return Boolean(e&&e[C])}var x="@@__IMMUTABLE_KEYED__@@";function c(e){return Boolean(e&&e[x])}var k="@@__IMMUTABLE_INDEXED__@@";function D(e){return Boolean(e&&e[k])}function T(e){return c(e)||D(e)}var u=function(e){return O(e)?e:te(e)},j=function(e){function t(e){return c(e)?e:ne(e)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t}(u),I=function(e){function t(e){return D(e)?e:re(e)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t}(u),M=function(e){function t(e){return O(e)&&!T(e)?e:oe(e)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t}(u),N=(u.Keyed=j,u.Indexed=I,u.Set=M,"@@__IMMUTABLE_SEQ__@@");function A(e){return Boolean(e&&e[N])}var P="@@__IMMUTABLE_RECORD__@@";function R(e){return Boolean(e&&e[P])}function L(e){return O(e)||R(e)}var F="@@__IMMUTABLE_ORDERED__@@";function B(e){return Boolean(e&&e[F])}var z=0,K=1,H=2,U="function"==typeof Symbol&&Symbol.iterator,q="@@iterator",W=U||q,p=function(e){this.next=e};function V(e,t,n,r){e=0===e?t:1===e?n:[t,n];return r?r.value=e:r={value:e,done:!1},r}function G(){return{value:void 0,done:!0}}function Y(e){return Array.isArray(e)||J(e)}function $(e){return e&&"function"==typeof e.next}function Z(e){var t=J(e);return t&&t.call(e)}function J(e){e=e&&(U&&e[U]||e[q]);if("function"==typeof e)return e}p.prototype.toString=function(){return"[Iterator]"},p.KEYS=z,p.VALUES=K,p.ENTRIES=H,p.prototype.inspect=p.prototype.toSource=function(){return this.toString()},p.prototype[W]=function(){return this};var X=Object.prototype.hasOwnProperty;function Q(e){return Array.isArray(e)||"string"==typeof e||e&&"object"==typeof e&&Number.isInteger(e.length)&&0<=e.length&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var ee,te=function(e){function t(e){{if(null==e)return ce();if(L(e))return e.toSeq();var t=fe(e);if(t)return function(e){var t=J(e);return t&&t===e.entries}(e)?t.fromEntrySeq():function(e){var t=J(e);return t&&t===e.keys}(e)?t.toSetSeq():t;if("object"!=typeof e)throw new TypeError("Expected Array or collection object of values, or keyed object: "+e);return new ae(e)}}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,o=0;o!==r;){var i=n[t?r-++o:o++];if(!1===e(i[1],i[0],this))break}return o}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(t,n){var r,o,i=this._cache;return i?(r=i.length,o=0,new p(function(){if(o===r)return G();var e=i[n?r-++o:o++];return V(t,e[0],e[1])})):this.__iteratorUncached(t,n)},t}(u),ne=function(e){function t(e){return null==e?ce().toKeyedSeq():O(e)?c(e)?e.toSeq():e.fromEntrySeq():R(e)?e.toSeq():ue(e)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.toKeyedSeq=function(){return this},t}(te),re=function(e){function t(e){return null==e?ce():O(e)?c(e)?e.entrySeq():e.toIndexedSeq():R(e)?e.toSeq().entrySeq():le(e)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(te),oe=function(e){function t(e){return(O(e)&&!T(e)?e:re(e)).toSetSeq()}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(te),ie=(te.isSeq=A,te.Keyed=ne,te.Set=oe,te.Indexed=re,te.prototype[N]=!0,function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.get=function(e,t){return this.has(e)?this._array[d(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,o=0;o!==r;){var i=t?r-++o:o++;if(!1===e(n[i],i,this))break}return o},t.prototype.__iterator=function(t,n){var r=this._array,o=r.length,i=0;return new p(function(){if(i===o)return G();var e=n?o-++i:i++;return V(t,e,r[e])})},t}(re)),ae=function(e){function t(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return X.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length,i=0;i!==o;){var a=r[t?o-++i:i++];if(!1===e(n[a],a,this))break}return i},t.prototype.__iterator=function(t,n){var r=this._object,o=this._keys,i=o.length,a=0;return new p(function(){if(a===i)return G();var e=o[n?i-++a:a++];return V(t,e,r[e])})},t}(ne),se=(ae.prototype[F]=!0,function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n,r=Z(this._collection),o=0;if($(r))for(;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},t.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=Z(this._collection);if(!$(n))return new p(G);var r=0;return new p(function(){var e=n.next();return e.done?e:V(t,r++,e.value)})},t}(re));function ce(){return ee=ee||new ie([])}function ue(e){var t=fe(e);if(t)return t.fromEntrySeq();if("object"==typeof e)return new ae(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function le(e){var t=fe(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function fe(e){return Q(e)?new ie(e):Y(e)?new se(e):void 0}var pe="@@__IMMUTABLE_MAP__@@";function de(e){return Boolean(e&&e[pe])}function he(e){return de(e)&&B(e)}function ye(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function ge(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(ye(e)&&ye(t)&&e.equals(t))}var me="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ve(e){return e>>>1&1073741824|3221225471&e}var be=Object.prototype.valueOf;function _e(e){if(null==e)return we(e);if("function"==typeof e.hashCode)return ve(e.hashCode(e));var t=(e=e).valueOf!==be&&"function"==typeof e.valueOf?e.valueOf(e):e;if(null==t)return we(t);switch(typeof t){case"boolean":return t?1108378657:1108378656;case"number":var n=t;if(n!=n||n===1/0)return 0;var r=0|n;for(r!==n&&(r^=4294967295*n);4294967295<n;)r^=n/=4294967295;return ve(r);case"string":return(t.length>Ie?function(e){var t=Ae[e];void 0===t&&(t=Se(e),Ne===Me&&(Ne=0,Ae={}),Ne++,Ae[e]=t);return t}:Se)(t);case"object":case"function":var o,i=t;if(ke&&void 0!==(o=xe.get(i)))return o;if(void 0!==(o=i[je]))return o;if(!Ce){if(void 0!==(o=i.propertyIsEnumerable&&i.propertyIsEnumerable[je]))return o;if(void 0!==(o=function(e){if(e&&0<e.nodeType)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(i)))return o}if(o=Oe(),ke)xe.set(i,o);else{if(void 0!==Ee&&!1===Ee(i))throw new Error("Non-extensible objects are not allowed as keys.");if(Ce)Object.defineProperty(i,je,{enumerable:!1,configurable:!1,writable:!1,value:o});else if(void 0!==i.propertyIsEnumerable&&i.propertyIsEnumerable===i.constructor.prototype.propertyIsEnumerable)i.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},i.propertyIsEnumerable[je]=o;else{if(void 0===i.nodeType)throw new Error("Unable to set a non-enumerable property on object.");i[je]=o}}return o;case"symbol":return void 0===(o=De[i=t])?(o=Oe(),De[i]=o):o;default:if("function"==typeof t.toString)return Se(t.toString());throw new Error("Value type "+typeof t+" cannot be hashed.")}}function we(e){return null===e?1108378658:1108378659}function Se(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return ve(t)}var Ee=Object.isExtensible,Ce=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Oe(){var e=++Te;return 1073741824&Te&&(Te=0),e}var xe,ke="function"==typeof WeakMap,De=(ke&&(xe=new WeakMap),Object.create(null)),Te=0,je="__immutablehash__",Ie=("function"==typeof Symbol&&(je=Symbol(je)),16),Me=255,Ne=0,Ae={},Pe=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=Ke(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=ze(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(n,e){var r=this;return this._iter.__iterate(function(e,t){return n(e,t,r)},e)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(ne),Re=(Pe.prototype[F]=!0,function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(t,n){var r=this,o=0;return n&&f(this),this._iter.__iterate(function(e){return t(e,n?r.size-++o:o++,r)},n)},t.prototype.__iterator=function(t,n){var r=this,o=this._iter.__iterator(K,n),i=0;return n&&f(this),new p(function(){var e=o.next();return e.done?e:V(t,n?r.size-++i:i++,e.value,e)})},t}(re)),Le=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},t.prototype.__iterator=function(t,e){var n=this._iter.__iterator(K,e);return new p(function(){var e=n.next();return e.done?e:V(t,e.value,e.value,e)})},t}(oe),Fe=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(n,e){var r=this;return this._iter.__iterate(function(e){var t;if(e)return Ze(e),t=O(e),n(t?e.get(1):e[1],t?e.get(0):e[0],r)},e)},t.prototype.__iterator=function(r,e){var o=this._iter.__iterator(K,e);return new p(function(){for(;;){var e=o.next();if(e.done)return e;var t,n=e.value;if(n)return Ze(n),t=O(n),V(r,t?n.get(0):n[0],t?n.get(1):n[1],e)}})},t}(ne);function Be(o){var e=Xe(o);return e._iter=o,e.size=o.size,e.flip=function(){return o},e.reverse=function(){var e=o.reverse.apply(this);return e.flip=function(){return o.reverse()},e},e.has=function(e){return o.includes(e)},e.includes=function(e){return o.has(e)},e.cacheResult=Qe,e.__iterateUncached=function(n,e){var r=this;return o.__iterate(function(e,t){return!1!==n(t,e,r)},e)},e.__iteratorUncached=function(e,t){var n;return e===H?(n=o.__iterator(e,t),new p(function(){var e,t=n.next();return t.done||(e=t.value[0],t.value[0]=t.value[1],t.value[1]=e),t})):o.__iterator(e===K?z:K,t)},e}function ze(i,a,s){var e=Xe(i);return e.size=i.size,e.has=function(e){return i.has(e)},e.get=function(e,t){var n=i.get(e,_);return n===_?t:a.call(s,n,e,i)},e.__iterateUncached=function(r,e){var o=this;return i.__iterate(function(e,t,n){return!1!==r(a.call(s,e,t,n),t,o)},e)},e.__iteratorUncached=function(r,e){var o=i.__iterator(H,e);return new p(function(){var e=o.next();if(e.done)return e;var t=e.value,n=t[0];return V(r,n,a.call(s,t[1],n,i),e)})},e}function Ke(a,s){var c=this,e=Xe(a);return e._iter=a,e.size=a.size,e.reverse=function(){return a},a.flip&&(e.flip=function(){var e=Be(a);return e.reverse=function(){return a.flip()},e}),e.get=function(e,t){return a.get(s?e:-1-e,t)},e.has=function(e){return a.has(s?e:-1-e)},e.includes=function(e){return a.includes(e)},e.cacheResult=Qe,e.__iterate=function(n,r){var o=this,i=0;return r&&f(a),a.__iterate(function(e,t){return n(e,s?t:r?o.size-++i:i++,o)},!r)},e.__iterator=function(n,r){var o=0,i=(r&&f(a),a.__iterator(H,!r));return new p(function(){var e=i.next();if(e.done)return e;var t=e.value;return V(n,s?t[0]:r?c.size-++o:o++,t[1],e)})},e}function He(a,s,c,u){var e=Xe(a);return u&&(e.has=function(e){var t=a.get(e,_);return t!==_&&!!s.call(c,t,e,a)},e.get=function(e,t){var n=a.get(e,_);return n!==_&&s.call(c,n,e,a)?n:t}),e.__iterateUncached=function(r,e){var o=this,i=0;return a.__iterate(function(e,t,n){if(s.call(c,e,t,n))return i++,r(e,u?t:i-1,o)},e),i},e.__iteratorUncached=function(r,e){var o=a.__iterator(H,e),i=0;return new p(function(){for(;;){var e=o.next();if(e.done)return e;var t=e.value,n=t[0],t=t[1];if(s.call(c,t,n,a))return V(r,u?n:i++,t,e)}})},e}function Ue(s,e,t,c){var n=s.size;if(h(e,t,n))return s;var u=y(e,n),n=g(t,n);if(u!=u||n!=n)return Ue(s.toSeq().cacheResult(),e,t,c);var l,e=n-u,t=(e==e&&(l=e<0?0:e),Xe(s));return t.size=0===l?l:s.size&&l||void 0,!c&&A(s)&&0<=l&&(t.get=function(e,t){return 0<=(e=d(this,e))&&e<l?s.get(e+u,t):t}),t.__iterateUncached=function(n,e){var r=this;if(0===l)return 0;if(e)return this.cacheResult().__iterate(n,e);var o=0,i=!0,a=0;return s.__iterate(function(e,t){if(!(i=i&&o++<u))return a++,!1!==n(e,c?t:a-1,r)&&a!==l}),a},t.__iteratorUncached=function(t,e){if(0!==l&&e)return this.cacheResult().__iterator(t,e);if(0===l)return new p(G);var n=s.__iterator(t,e),r=0,o=0;return new p(function(){for(;r++<u;)n.next();if(++o>l)return G();var e=n.next();return c||t===K||e.done?e:V(t,o-1,t===z?void 0:e.value[1],e)})},t}function qe(t,u,l,f){var e=Xe(t);return e.__iterateUncached=function(r,e){var o=this;if(e)return this.cacheResult().__iterate(r,e);var i=!0,a=0;return t.__iterate(function(e,t,n){if(!(i=i&&u.call(l,e,t,n)))return a++,r(e,f?t:a-1,o)}),a},e.__iteratorUncached=function(o,e){var i=this;if(e)return this.cacheResult().__iterator(o,e);var a=t.__iterator(H,e),s=!0,c=0;return new p(function(){var e;do{if((e=a.next()).done)return f||o===K?e:V(o,c++,o===z?void 0:e.value[1],e);var t=e.value,n=t[0],r=t[1]}while(s=s&&u.call(l,r,n,i));return o===H?e:V(o,n,r,e)})},e}function We(e,s,c){var u=Xe(e);return u.__iterateUncached=function(o,t){if(t)return this.cacheResult().__iterate(o,t);var i=0,a=!1;return function n(e,r){e.__iterate(function(e,t){return(!s||r<s)&&O(e)?n(e,r+1):(i++,!1===o(e,c?t:i-1,u)&&(a=!0)),!a},t)}(e,0),i},u.__iteratorUncached=function(n,r){if(r)return this.cacheResult().__iterator(n,r);var o=e.__iterator(n,r),i=[],a=0;return new p(function(){for(;o;){var e=o.next();if(!1===e.done){var t=e.value;if(n===H&&(t=t[1]),s&&!(i.length<s)||!O(t))return c?e:V(n,a++,t,e);i.push(o),o=t.__iterator(n,r)}else o=i.pop()}return G()})},u}function Ve(n,r,o){r=r||et;var e=c(n),i=0,a=n.toSeq().map(function(e,t){return[t,e,i++,o?o(e,t,n):e]}).valueSeq().toArray();return a.sort(function(e,t){return r(e[3],t[3])||e[2]-t[2]}).forEach(e?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]}),(e?ne:D(n)?re:oe)(a)}function Ge(n,r,o){var e;return r=r||et,o?(e=n.toSeq().map(function(e,t){return[e,o(e,t,n)]}).reduce(function(e,t){return Ye(r,e[1],t[1])?t:e}))&&e[0]:n.reduce(function(e,t){return Ye(r,e,t)?t:e})}function Ye(e,t,n){e=e(n,t);return 0===e&&n!==t&&(null==n||n!=n)||0<e}function $e(e,a,s,c){var e=Xe(e),t=new ie(s).map(function(e){return e.size});return e.size=c?t.max():t.min(),e.__iterate=function(e,t){for(var n,r=this.__iterator(K,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},e.__iteratorUncached=function(t,n){var r=s.map(function(e){return e=u(e),Z(n?e.reverse():e)}),o=0,i=!1;return new p(function(){var e;return i||(e=r.map(function(e){return e.next()}),i=c?e.every(function(e){return e.done}):e.some(function(e){return e.done})),i?G():V(t,o++,a.apply(null,e.map(function(e){return e.value})))})},e}function l(e,t){return e===t?e:A(e)?t:e.constructor(t)}function Ze(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Je(e){return c(e)?j:D(e)?I:M}function Xe(e){return Object.create((c(e)?ne:D(e)?re:oe).prototype)}function Qe(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):te.prototype.cacheResult.call(this)}function et(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:t<e?1:e<t?-1:0}function tt(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function nt(e,t){if(!e)throw new Error(t)}function rt(e){nt(e!==1/0,"Cannot perform this action with an infinite size.")}function ot(e){if(Q(e)&&"string"!=typeof e)return e;if(B(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}Re.prototype.cacheResult=Pe.prototype.cacheResult=Le.prototype.cacheResult=Fe.prototype.cacheResult=Qe;var it=Object.prototype.toString;function at(e){if(!e||"object"!=typeof e||"[object Object]"!==it.call(e))return!1;e=Object.getPrototypeOf(e);if(null===e)return!0;for(var t=e,n=Object.getPrototypeOf(e);null!==n;)t=n,n=Object.getPrototypeOf(t);return t===e}function st(e){return"object"==typeof e&&(L(e)||Array.isArray(e)||at(e))}function ct(t){try{return"string"==typeof t?JSON.stringify(t):String(t)}catch(e){return JSON.stringify(t)}}function ut(e,t){return L(e)?e.has(t):st(e)&&X.call(e,t)}function lt(e,t,n){return L(e)?e.get(t,n):ut(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function ft(e){if(Array.isArray(e))return tt(e);var t,n={};for(t in e)X.call(e,t)&&(n[t]=e[t]);return n}function pt(e,t){if(!st(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(L(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!X.call(e,t))return e;e=ft(e);return Array.isArray(e)?e.splice(t,1):delete e[t],e}function dt(e,t,n){if(!st(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(L(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,n)}if(X.call(e,t)&&n===e[t])return e;e=ft(e);return e[t]=n,e}function ht(e,t,n,r){r||(r=n,n=void 0);e=function e(t,n,r,o,i,a){var s=n===_;if(o===r.length)return(u=a(c=s?i:n))===c?n:u;if(!s&&!st(n))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,o).map(ct)+"]: "+n);var c=r[o];var u=s?_:lt(n,c,_);r=e(u===_?t:L(u),u,r,o+1,i,a);return r===u?n:r===_?pt(n,c):dt(s?t?Zt():{}:n,c,r)}(L(e),e,ot(t),0,n,r);return e===_?n:e}function yt(e,t,n){return ht(e,t,_,function(){return n})}function gt(e,t){return yt(this,e,t)}function mt(e,t){return ht(e,t,function(){return _})}function vt(e){return mt(this,e)}function bt(e,t,n,r){return ht(e,[t],n,r)}function _t(e,t,n){return 1===arguments.length?e(this):bt(this,e,t,n)}function wt(e,t,n){return ht(this,e,t,n)}function St(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Ct(this,e)}function Et(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return Ct(this,t,e)}function Ct(e,t,o){for(var n=[],r=0;r<t.length;r++){var i=j(t[r]);0!==i.size&&n.push(i)}return 0===n.length?e:0!==e.toSeq().size||e.__ownerID||1!==n.length?e.withMutations(function(r){for(var e=o?function(t,n){bt(r,n,_,function(e){return e===_?t:o(e,t,n)})}:function(e,t){r.set(t,e)},t=0;t<n.length;t++)n[t].forEach(e)}):e.constructor(n[0])}function Ot(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return jt(e,t)}function xt(e,t){for(var n=[],r=arguments.length-2;0<r--;)n[r]=arguments[r+2];return jt(t,n,e)}function kt(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return Tt(e,t)}function Dt(e,t){for(var n=[],r=arguments.length-2;0<r--;)n[r]=arguments[r+2];return Tt(t,n,e)}function Tt(e,t,n){return jt(e,t,(o=n,function e(t,n,r){return st(t)&&st(n)&&function(e,t){return e=te(e),t=te(t),D(e)===D(t)&&c(e)===c(t)}(t,n)?jt(t,[n],e):o?o(t,n,r):n}));var o}function jt(r,e,o){if(!st(r))throw new TypeError("Cannot merge into non-data-structure value: "+r);if(L(r))return"function"==typeof o&&r.mergeWith?r.mergeWith.apply(r,[o].concat(e)):(r.merge||r.concat).apply(r,e);for(var t=Array.isArray(r),i=r,n=t?I:j,a=t?function(e){(i=i===r?ft(i):i).push(e)}:function(e,t){var n=X.call(i,t),e=n&&o?o(i[t],e,t):e;n&&e===i[t]||((i=i===r?ft(i):i)[t]=e)},s=0;s<e.length;s++)n(e[s]).forEach(a);return i}function It(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Tt(this,e)}function Mt(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return Tt(this,t,e)}function Nt(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return ht(this,e,Zt(),function(e){return jt(e,t)})}function At(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return ht(this,e,Zt(),function(e){return Tt(e,t)})}function Pt(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Rt(){return this.__ownerID?this:this.__ensureOwner(new v)}function Lt(){return this.__ensureOwner()}function Ft(){return this.__altered}function Bt(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}var zt,Kt=function(r){function e(t){return null==t?Zt():de(t)&&!B(t)?t:Zt().withMutations(function(n){var e=r(t);rt(e.size),e.forEach(function(e,t){return n.set(t,e)})})}return r&&(e.__proto__=r),((e.prototype=Object.create(r&&r.prototype)).constructor=e).of=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return Zt().withMutations(function(e){for(var t=0;t<n.length;t+=2){if(t+1>=n.length)throw new Error("Missing value for key: "+n[t]);e.set(n[t],n[t+1])}})},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},e.prototype.set=function(e,t){return Jt(this,e,t)},e.prototype.remove=function(e){return Jt(this,e,_)},e.prototype.deleteAll=function(e){var n=u(e);return 0===n.size?this:this.withMutations(function(t){n.forEach(function(e){return t.remove(e)})})},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Zt()},e.prototype.sort=function(e){return En(Ve(this,e))},e.prototype.sortBy=function(e,t){return En(Ve(this,t,e))},e.prototype.map=function(r,o){var i=this;return this.withMutations(function(n){n.forEach(function(e,t){n.set(t,r.call(o,e,t,i))})})},e.prototype.__iterator=function(e,t){return new Vt(this,e,t)},e.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},e.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?$t(this.size,this._root,e,this.__hash):0===this.size?Zt():(this.__ownerID=e,this.__altered=!1,this)},e}(j),i=(Kt.isMap=de,Kt.prototype),Ht=(i[pe]=!0,i[t]=i.remove,i.removeAll=i.deleteAll,i.setIn=gt,i.removeIn=i.deleteIn=vt,i.update=_t,i.updateIn=wt,i.merge=i.concat=St,i.mergeWith=Et,i.mergeDeep=It,i.mergeDeepWith=Mt,i.mergeIn=Nt,i.mergeDeepIn=At,i.withMutations=Pt,i.wasAltered=Ft,i.asImmutable=Lt,i["@@transducer/init"]=i.asMutable=Rt,i["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},i["@@transducer/result"]=function(e){return e.asImmutable()},function(e,t){this.ownerID=e,this.entries=t}),Ut=(Ht.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(ge(n,o[i][0]))return o[i][1];return r},Ht.prototype.update=function(e,l,f,t,n,r,o){for(var i=n===_,a=this.entries,s=0,p=a.length;s<p&&!ge(t,a[s][0]);s++);var c=s<p;if(c?a[s][1]===n:i)return this;if(m(o),!i&&c||m(r),!i||1!==a.length){if(!c&&!i&&a.length>=rn){var u=e,d=a,o=t,r=n;u=u||new v;for(var h=new Wt(u,_e(o),[o,r]),y=0;y<d.length;y++){var g=d[y];h=h.update(u,0,void 0,g[0],g[1])}return h}o=e&&e===this.ownerID,r=o?a:tt(a);return c?i?s===p-1?r.pop():r[s]=r.pop():r[s]=[t,n]:r.push([t,n]),o?(this.entries=r,this):new Ht(e,r)}},Bt.prototype.get=function(e,t,n,r){void 0===t&&(t=_e(n));var o=1<<((0===e?t:t>>>e)&S),i=this.bitmap;return 0==(i&o)?r:this.nodes[tn(i&o-1)].get(e+b,t,n,r)},Bt.prototype.update=function(e,t,n,l,f,r,o){void 0===n&&(n=_e(l));var p=(0===t?n:n>>>t)&S,d=1<<p,i=this.bitmap,a=0!=(i&d);if(!a&&f===_)return this;var s=tn(i&d-1),c=this.nodes,u=a?c[s]:void 0,t=Xt(u,e,t+b,n,l,f,r,o);if(t===u)return this;if(!a&&t&&c.length>=on){for(var n=e,h=c,y=i,l=p,f=t,g=0,m=new Array(w),v=0;0!==y;v++,y>>>=1)m[v]=1&y?h[g++]:void 0;return m[l]=f,new Ut(n,g+1,m)}if(a&&!t&&2===c.length&&Qt(c[1^s]))return c[1^s];if(a&&t&&1===c.length&&Qt(t))return t;r=e&&e===this.ownerID,o=a?t?i:i^d:i|d,u=a?t?nn(c,s,t,r):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),i=0,a=0;a<r;a++)a===t&&(i=1),o[a]=e[a+i];return o}(c,s,r):function(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var i=new Array(o),a=0,s=0;s<o;s++)s===t?(i[s]=n,a=-1):i[s]=e[s+a];return i}(c,s,t,r);return r?(this.bitmap=o,this.nodes=u,this):new Bt(e,o,u)},function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}),qt=(Ut.prototype.get=function(e,t,n,r){void 0===t&&(t=_e(n));var o=this.nodes[(0===e?t:t>>>e)&S];return o?o.get(e+b,t,n,r):r},Ut.prototype.update=function(e,t,n,r,o,i,l){void 0===n&&(n=_e(r));var a=(0===t?n:n>>>t)&S,s=this.nodes,c=s[a];if(o===_&&!c)return this;t=Xt(c,e,t+b,n,r,o,i,l);if(t===c)return this;n=this.count;if(c){if(!t&&--n<an){for(var r=e,f=s,p=a,d=0,h=0,y=new Array(n),u=0,g=1,m=f.length;u<m;u++,g<<=1){var v=f[u];void 0!==v&&u!==p&&(d|=g,y[h++]=v)}return new Bt(r,d,y)}}else n++;o=e&&e===this.ownerID,i=nn(s,a,t,o);return o?(this.count=n,this.nodes=i,this):new Ut(e,n,i)},function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}),Wt=(qt.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(ge(n,o[i][0]))return o[i][1];return r},qt.prototype.update=function(e,t,n,r,o,l,i){void 0===n&&(n=_e(r));var a=o===_;if(n!==this.keyHash)return a?this:(m(i),m(l),en(this,e,t,n,[r,o]));for(var s=this.entries,c=0,u=s.length;c<u&&!ge(r,s[c][0]);c++);t=c<u;if(t?s[c][1]===o:a)return this;if(m(i),!a&&t||m(l),a&&2===u)return new Wt(e,this.keyHash,s[1^c]);n=e&&e===this.ownerID,i=n?s:tt(s);return t?a?c===u-1?i.pop():i[c]=i.pop():i[c]=[r,o]:i.push([r,o]),n?(this.entries=i,this):new qt(e,this.keyHash,i)},function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}),Vt=(Wt.prototype.get=function(e,t,n,r){return ge(n,this.entry[0])?this.entry[1]:r},Wt.prototype.update=function(e,t,n,r,o,i,a){var s=o===_,c=ge(r,this.entry[0]);return(c?o===this.entry[1]:s)?this:(m(a),s?void m(i):c?e&&e===this.ownerID?(this.entry[1]=o,this):new Wt(e,this.keyHash,[r,o]):(m(i),en(this,e,t,_e(r),[r,o])))},Ht.prototype.iterate=qt.prototype.iterate=function(e,t){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===e(n[t?o-r:r]))return!1},Bt.prototype.iterate=Ut.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var i=n[t?o-r:r];if(i&&!1===i.iterate(e,t))return!1}},Wt.prototype.iterate=function(e,t){return e(this.entry)},function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&Yt(e._root)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,o=void 0;if(n.entry){if(0==r)return Gt(e,n.entry)}else if(n.entries){if(r<=(o=n.entries.length-1))return Gt(e,n.entries[this._reverse?o-r:r])}else if(r<=(o=n.nodes.length-1)){n=n.nodes[this._reverse?o-r:r];if(n){if(n.entry)return Gt(e,n.entry);t=this._stack=Yt(n,t)}continue}t=this._stack=this._stack.__prev}return G()},t}(p));function Gt(e,t){return V(e,t[0],t[1])}function Yt(e,t){return{node:e,index:0,__prev:t}}function $t(e,t,n,r){var o=Object.create(i);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Zt(){return zt=zt||$t(0)}function Jt(e,t,n){if(e._root){var r=a(),o=a(),i=Xt(e._root,e.__ownerID,0,void 0,t,n,r,o);if(!o.value)return e;o=e.size+(r.value?n===_?-1:1:0)}else{if(n===_)return e;o=1,i=new Ht(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=i,e.__hash=void 0,e.__altered=!0,e):i?$t(o,i):Zt()}function Xt(e,t,n,r,o,i,a,s){return e?e.update(t,n,r,o,i,a,s):i===_?e:(m(s),m(a),new Wt(t,r,[o,i]))}function Qt(e){return e.constructor===Wt||e.constructor===qt}function en(e,t,n,r,o){if(e.keyHash===r)return new qt(t,r,[e.entry,o]);var i=(0===n?e.keyHash:e.keyHash>>>n)&S,a=(0===n?r:r>>>n)&S,r=i==a?[en(e,t,n+b,r,o)]:(n=new Wt(t,r,o),i<a?[e,n]:[n,e]);return new Bt(t,1<<i|1<<a,r)}function tn(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,127&(e=(e+=e>>8)+(e>>16))}function nn(e,t,n,r){r=r?e:tt(e);return r[t]=n,r}var rn=w/4,on=w/2,an=w/4,sn="@@__IMMUTABLE_LIST__@@";function cn(e){return Boolean(e&&e[sn])}var un,ln=function(i){function e(e){var t=gn();if(null==e)return t;if(cn(e))return e;var r=i(e),o=r.size;return 0===o?t:(rt(o),0<o&&o<w?yn(0,o,b,null,new pn(r.toArray())):t.withMutations(function(n){n.setSize(o),r.forEach(function(e,t){return n.set(t,e)})}))}return i&&(e.__proto__=i),((e.prototype=Object.create(i&&i.prototype)).constructor=e).of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(e,t){var n;return 0<=(e=d(this,e))&&e<this.size?(n=bn(this,e+=this._origin))&&n.array[e&S]:t},e.prototype.set=function(e,t){var n=this,r=e,o=t;if((r=d(n,r))!==r)return n;if(r>=n.size||r<0)return n.withMutations(function(e){r<0?_n(e,r).set(0,o):_n(e,0,r+1).set(r,o)});r+=n._origin;var e=n._tail,t=n._root,i=a();return r>=wn(n._capacity)?e=mn(e,n.__ownerID,0,r,o,i):t=mn(t,n.__ownerID,n._level,r,o,i),i.value?n.__ownerID?(n._root=t,n._tail=e,n.__hash=void 0,n.__altered=!0,n):yn(n._origin,n._capacity,n._level,t,e):n},e.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},e.prototype.insert=function(e,t){return this.splice(e,0,t)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=b,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):gn()},e.prototype.push=function(){var n=arguments,r=this.size;return this.withMutations(function(e){_n(e,0,r+n.length);for(var t=0;t<n.length;t++)e.set(r+t,n[t])})},e.prototype.pop=function(){return _n(this,0,-1)},e.prototype.unshift=function(){var n=arguments;return this.withMutations(function(e){_n(e,-n.length);for(var t=0;t<n.length;t++)e.set(t,n[t])})},e.prototype.shift=function(){return _n(this,1)},e.prototype.concat=function(){for(var e=arguments,n=[],t=0;t<arguments.length;t++){var r=e[t],r=i("string"!=typeof r&&Y(r)?r:[r]);0!==r.size&&n.push(r)}return 0===n.length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations(function(t){n.forEach(function(e){return e.forEach(function(e){return t.push(e)})})}):this.constructor(n[0])},e.prototype.setSize=function(e){return _n(this,0,e)},e.prototype.map=function(n,r){var o=this;return this.withMutations(function(e){for(var t=0;t<o.size;t++)e.set(t,n.call(r,e.get(t),t,o))})},e.prototype.slice=function(e,t){var n=this.size;return h(e,t,n)?this:_n(this,y(e,n),g(t,n))},e.prototype.__iterator=function(t,n){var r=n?this.size:0,o=hn(this,n);return new p(function(){var e=o();return e===dn?G():V(t,n?--r:r++,e)})},e.prototype.__iterate=function(e,t){for(var n,r=t?this.size:0,o=hn(this,t);(n=o())!==dn&&!1!==e(n,t?--r:r++,this););return r},e.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?yn(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?gn():(this.__ownerID=e,this.__altered=!1,this)},e}(I),fn=(ln.isList=cn,ln.prototype),pn=(fn[sn]=!0,fn[t]=fn.remove,fn.merge=fn.concat,fn.setIn=gt,fn.deleteIn=fn.removeIn=vt,fn.update=_t,fn.updateIn=wt,fn.mergeIn=Nt,fn.mergeDeepIn=At,fn.withMutations=Pt,fn.wasAltered=Ft,fn.asImmutable=Lt,fn["@@transducer/init"]=fn.asMutable=Rt,fn["@@transducer/step"]=function(e,t){return e.push(t)},fn["@@transducer/result"]=function(e){return e.asImmutable()},function(e,t){this.array=e,this.ownerID=t}),dn=(pn.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&S;if(r>=this.array.length)return new pn([],e);var o=0==r;if(0<t){var i,a=this.array[r];if((i=a&&a.removeBefore(e,t-b,n))===a&&o)return this}if(o&&!i)return this;var s=vn(this,e);if(!o)for(var c=0;c<r;c++)s.array[c]=void 0;return i&&(s.array[r]=i),s},pn.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r=n-1>>>t&S;if(r>=this.array.length)return this;if(0<t){var o,i=this.array[r];if((o=i&&i.removeAfter(e,t-b,n))===i&&r==this.array.length-1)return this}t=vn(this,e);return t.array.splice(1+r),o&&(t.array[r]=o),t},{});function hn(e,d){var h=e._origin,y=e._capacity,g=wn(y),m=e._tail;return v(e._root,e._level,0);function v(l,e,f){var t,n,r,o,i,a,s,c,p,u;return 0!==e?(s=l,t=e,n=f,o=s&&s.array,i=h<n?0:h-n>>t,a=1+(y-n>>t),w<a&&(a=w),function(){for(;;){if(r){var e=r();if(e!==dn)return e;r=null}if(i===a)return dn;e=d?--a:i++;r=v(o&&o[e],t-b,n+(e<<t))}}):(e=l,s=f,c=s===g?m&&m.array:e&&e.array,p=h<s?0:h-s,u=y-s,w<u&&(u=w),function(){if(p===u)return dn;var e=d?--u:p++;return c&&c[e]})}}function yn(e,t,n,r,o,i,a){var s=Object.create(fn);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=o,s.__ownerID=i,s.__hash=a,s.__altered=!1,s}function gn(){return un=un||yn(0,0,b)}function mn(e,t,n,r,o,i){var a,s,c=r>>>n&S,u=e&&c<e.array.length;return u||void 0!==o?0<n?(n=mn(s=e&&e.array[c],t,n-b,r,o,i))===s?e:((a=vn(e,t)).array[c]=n,a):u&&e.array[c]===o?e:(i&&m(i),a=vn(e,t),void 0===o&&c==a.array.length-1?a.array.pop():a.array[c]=o,a):e}function vn(e,t){return t&&e&&t===e.ownerID?e:new pn(e?e.array.slice():[],t)}function bn(e,t){if(t>=wn(e._capacity))return e._tail;if(t<1<<e._level+b){for(var n=e._root,r=e._level;n&&0<r;)n=n.array[t>>>r&S],r-=b;return n}}function _n(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new v,l=e._origin,f=e._capacity,o=l+t,t=void 0===n?f:n<0?f+n:l+n;if(o===l&&t===f)return e;if(t<=o)return e.clear();for(var i=e._level,a=e._root,s=0;o+s<0;)a=new pn(a&&a.array.length?[void 0,a]:[],r),s+=1<<(i+=b);s&&(o+=s,l+=s,t+=s,f+=s);for(var p=wn(f),c=wn(t);1<<i+b<=c;)a=new pn(a&&a.array.length?[a]:[],r),i+=b;var n=e._tail,u=c<p?bn(e,t-1):p<c?new pn([],r):n;if(n&&p<c&&o<f&&n.array.length){for(var d=a=vn(a,r),h=i;b<h;h-=b)var y=p>>>h&S,d=d.array[y]=vn(d.array[y],r);d.array[p>>>b&S]=n}if(t<f&&(u=u&&u.removeAfter(r,0,t)),c<=o)o-=c,t-=c,i=b,a=null,u=u&&u.removeBefore(r,0,o);else if(l<o||c<p){for(s=0;a;){var g=o>>>i&S;if(g!=c>>>i&S)break;g&&(s+=(1<<i)*g),i-=b,a=a.array[g]}(a=a&&l<o?a.removeBefore(r,i,o-s):a)&&c<p&&(a=a.removeAfter(r,i,c-s)),s&&(o-=s,t-=s)}return e.__ownerID?(e.size=t-o,e._origin=o,e._capacity=t,e._level=i,e._root=a,e._tail=u,e.__hash=void 0,e.__altered=!0,e):yn(o,t,i,a,u)}function wn(e){return e<w?0:e-1>>>b<<b}var Sn,En=function(e){function t(t){return null==t?On():he(t)?t:On().withMutations(function(n){var e=j(t);rt(e.size),e.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){e=this._map.get(e);return void 0!==e?this._list.get(e)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):On()},t.prototype.set=function(e,t){return xn(this,e,t)},t.prototype.remove=function(e){return xn(this,e,_)},t.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Cn(t,n,e,this.__hash):0===this.size?On():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=n,this)},t}(Kt);function Cn(e,t,n,r){var o=Object.create(En.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function On(){return Sn=Sn||Cn(Zt(),gn())}function xn(e,t,n){var r,o,i=e._map,a=e._list,s=i.get(t),c=void 0!==s;if(n===_){if(!c)return e;a.size>=w&&a.size>=2*i.size?(r=(o=a.filter(function(e,t){return void 0!==e&&s!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=i.remove(t),o=s===a.size-1?a.pop():a.set(s,void 0))}else if(c){if(n===a.get(s)[1])return e;r=i,o=a.set(s,[t,n])}else r=i.set(t,a.size),o=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e.__altered=!0,e):Cn(r,o)}En.isOrderedMap=he,En.prototype[F]=!0,En.prototype[t]=En.prototype.remove;var kn="@@__IMMUTABLE_STACK__@@";function Dn(e){return Boolean(e&&e[kn])}var Tn,jn=function(o){function e(e){return null==e?Nn():Dn(e)?e:Nn().pushAll(e)}return o&&(e.__proto__=o),((e.prototype=Object.create(o&&o.prototype)).constructor=e).of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(e,t){var n=this._head;for(e=d(this,e);n&&e--;)n=n.next;return n?n.value:t},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;0<=r;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Mn(t,n)},e.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;if(0===this.size&&Dn(e))return e;rt(e.size);var t=this.size,n=this._head;return e.__iterate(function(e){t++,n={value:e,next:n}},!0),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Mn(t,n)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Nn()},e.prototype.slice=function(e,t){if(h(e,t,this.size))return this;var n=y(e,this.size);if(g(t,this.size)!==this.size)return o.prototype.slice.call(this,e,t);for(var e=this.size-n,r=this._head;n--;)r=r.next;return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Mn(e,r)},e.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Mn(this.size,this._head,e,this.__hash):0===this.size?Nn():(this.__ownerID=e,this.__altered=!1,this)},e.prototype.__iterate=function(n,e){var r=this;if(e)return new ie(this.toArray()).__iterate(function(e,t){return n(e,t,r)},e);for(var t=0,o=this._head;o&&!1!==n(o.value,t++,this);)o=o.next;return t},e.prototype.__iterator=function(t,e){if(e)return new ie(this.toArray()).__iterator(t,e);var n=0,r=this._head;return new p(function(){var e;return r?(e=r.value,r=r.next,V(t,n++,e)):G()})},e}(I),In=(jn.isStack=Dn,jn.prototype);function Mn(e,t,n,r){var o=Object.create(In);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Nn(){return Tn=Tn||Mn(0)}In[kn]=!0,In.shift=In.pop,In.unshift=In.push,In.unshiftAll=In.pushAll,In.withMutations=Pt,In.wasAltered=Ft,In.asImmutable=Lt,In["@@transducer/init"]=In.asMutable=Rt,In["@@transducer/step"]=function(e,t){return e.unshift(t)},In["@@transducer/result"]=function(e){return e.asImmutable()};var An="@@__IMMUTABLE_SET__@@";function Pn(e){return Boolean(e&&e[An])}function Rn(e){return Pn(e)&&B(e)}function Ln(n,e){if(n===e)return!0;if(!O(e)||void 0!==n.size&&void 0!==e.size&&n.size!==e.size||void 0!==n.__hash&&void 0!==e.__hash&&n.__hash!==e.__hash||c(n)!==c(e)||D(n)!==D(e)||B(n)!==B(e))return!1;if(0===n.size&&0===e.size)return!0;var r,o=!T(n);if(B(n))return r=n.entries(),e.every(function(e,t){var n=r.next().value;return n&&ge(n[1],e)&&(o||ge(n[0],t))})&&r.next().done;var i=!1,a=(void 0===n.size&&(void 0===e.size?"function"==typeof n.cacheResult&&n.cacheResult():(i=!0,t=n,n=e,e=t)),!0),t=e.__iterate(function(e,t){if(o?!n.has(e):i?!ge(e,n.get(t,_)):!ge(n.get(t,_),e))return a=!1});return a&&n.size===t}function Fn(t,n){function e(e){t.prototype[e]=n[e]}return Object.keys(n).forEach(e),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(n).forEach(e),t}function Bn(e){if(!e||"object"!=typeof e)return e;if(!O(e)){if(!st(e))return e;e=te(e)}var n;if(c(e))return n={},e.__iterate(function(e,t){n[t]=Bn(e)}),n;var t=[];return e.__iterate(function(e){t.push(Bn(e))}),t}var zn,Kn=function(r){function t(n){return null==n?Wn():Pn(n)&&!B(n)?n:Wn().withMutations(function(t){var e=r(n);rt(e.size),e.forEach(function(e){return t.add(e)})})}return r&&(t.__proto__=r),((t.prototype=Object.create(r&&r.prototype)).constructor=t).of=function(){return this(arguments)},t.fromKeys=function(e){return this(j(e).keySeq())},t.intersect=function(e){return(e=u(e).toArray()).length?Hn.intersect.apply(t(e.pop()),e):Wn()},t.union=function(e){return(e=u(e).toArray()).length?Hn.union.apply(t(e.pop()),e):Wn()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Un(this,this._map.set(e,e))},t.prototype.remove=function(e){return Un(this,this._map.remove(e))},t.prototype.clear=function(){return Un(this,this._map.clear())},t.prototype.map=function(n,r){var o=this,i=!1,e=Un(this,this._map.mapEntries(function(e){var e=e[1],t=n.call(r,e,e,o);return t!==e&&(i=!0),[t,t]},r));return i?e:this},t.prototype.union=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return 0===(n=n.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations(function(t){for(var e=0;e<n.length;e++)r(n[e]).forEach(function(e){return t.add(e)})}):this.constructor(n[0])},t.prototype.intersect=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(0===e.length)return this;var e=e.map(function(e){return r(e)}),n=[];return this.forEach(function(t){e.every(function(e){return e.includes(t)})||n.push(t)}),this.withMutations(function(t){n.forEach(function(e){t.remove(e)})})},t.prototype.subtract=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(0===e.length)return this;var e=e.map(function(e){return r(e)}),n=[];return this.forEach(function(t){e.some(function(e){return e.includes(t)})&&n.push(t)}),this.withMutations(function(t){n.forEach(function(e){t.remove(e)})})},t.prototype.sort=function(e){return fr(Ve(this,e))},t.prototype.sortBy=function(e,t){return fr(Ve(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(t,e){var n=this;return this._map.__iterate(function(e){return t(e,e,n)},e)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(M),Hn=(Kn.isSet=Pn,Kn.prototype);function Un(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function qn(e,t){var n=Object.create(Hn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Wn(){return zn=zn||qn(Zt())}Hn[An]=!0,Hn[t]=Hn.remove,Hn.merge=Hn.concat=Hn.union,Hn.withMutations=Pt,Hn.asImmutable=Lt,Hn["@@transducer/init"]=Hn.asMutable=Rt,Hn["@@transducer/step"]=function(e,t){return e.add(t)},Hn["@@transducer/result"]=function(e){return e.asImmutable()},Hn.__empty=Wn,Hn.__make=qn;var Vn,Gn=function(e){function r(e,t,n){if(!(this instanceof r))return new r(e,t,n);if(nt(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(Vn)return Vn;Vn=this}}return e&&(r.__proto__=e),((r.prototype=Object.create(e&&e.prototype)).constructor=r).prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},r.prototype.get=function(e,t){return this.has(e)?this._start+d(this,e)*this._step:t},r.prototype.includes=function(e){e=(e-this._start)/this._step;return 0<=e&&e<this.size&&e===Math.floor(e)},r.prototype.slice=function(e,t){return h(e,t,this.size)?this:(e=y(e,this.size),(t=g(t,this.size))<=e?new r(0,0):new r(this.get(e,this._end),this.get(t,this._end),this._step))},r.prototype.indexOf=function(e){e-=this._start;if(e%this._step==0){e=e/this._step;if(0<=e&&e<this.size)return e}return-1},r.prototype.lastIndexOf=function(e){return this.indexOf(e)},r.prototype.__iterate=function(e,t){for(var n=this.size,r=this._step,o=t?this._start+(n-1)*r:this._start,i=0;i!==n&&!1!==e(o,t?n-++i:i++,this);)o+=t?-r:r;return i},r.prototype.__iterator=function(t,n){var r=this.size,o=this._step,i=n?this._start+(r-1)*o:this._start,a=0;return new p(function(){if(a===r)return G();var e=i;return i+=n?-o:o,V(t,n?r-++a:a++,e)})},r.prototype.equals=function(e){return e instanceof r?this._start===e._start&&this._end===e._end&&this._step===e._step:Ln(this,e)},r}(re);function Yn(e,t,n){for(var r=ot(t),o=0;o!==r.length;)if((e=lt(e,r[o++],_))===_)return n;return e}function $n(e,t){return Yn(this,e,t)}function Zn(e,t){return Yn(e,t,_)!==_}function Jn(){rt(this.size);var n={};return this.__iterate(function(e,t){n[t]=e}),n}u.isIterable=O,u.isKeyed=c,u.isIndexed=D,u.isAssociative=T,u.isOrdered=B,u.Iterator=p,Fn(u,{toArray:function(){rt(this.size);var n=new Array(this.size||0),r=c(this),o=0;return this.__iterate(function(e,t){n[o++]=r?[t,e]:e}),n},toIndexedSeq:function(){return new Re(this)},toJS:function(){return Bn(this)},toKeyedSeq:function(){return new Pe(this,!0)},toMap:function(){return Kt(this.toKeyedSeq())},toObject:Jn,toOrderedMap:function(){return En(this.toKeyedSeq())},toOrderedSet:function(){return fr(c(this)?this.valueSeq():this)},toSet:function(){return Kn(c(this)?this.valueSeq():this)},toSetSeq:function(){return new Le(this)},toSeq:function(){return D(this)?this.toIndexedSeq():c(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return jn(c(this)?this.valueSeq():this)},toList:function(){return ln(c(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return l(this,function(e,t){var n=c(e);if(0===(t=[e].concat(t).map(function(e){return O(e)?n&&(e=j(e)):e=n?ue(e):le(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size})).length)return e;if(1===t.length){var r=t[0];if(r===e||n&&c(r)||D(e)&&D(r))return r}return r=new ie(t),n?r=r.toKeyedSeq():D(e)||(r=r.toSetSeq()),(r=r.flatten(!0)).size=t.reduce(function(e,t){if(void 0!==e){t=t.size;if(void 0!==t)return e+t}},0),r}(this,e))},includes:function(t){return this.some(function(e){return ge(e,t)})},entries:function(){return this.__iterator(H)},every:function(r,o){rt(this.size);var i=!0;return this.__iterate(function(e,t,n){if(!r.call(o,e,t,n))return i=!1}),i},filter:function(e,t){return l(this,He(this,e,t,!0))},find:function(e,t,n){e=this.findEntry(e,t);return e?e[1]:n},forEach:function(e,t){return rt(this.size),this.__iterate(t?e.bind(t):e)},join:function(t){rt(this.size),t=void 0!==t?""+t:",";var n="",r=!0;return this.__iterate(function(e){r?r=!1:n+=t,n+=null!=e?e.toString():""}),n},keys:function(){return this.__iterator(z)},map:function(e,t){return l(this,ze(this,e,t))},reduce:function(e,t,n){return nr(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return nr(this,e,t,n,arguments.length<2,!0)},reverse:function(){return l(this,Ke(this,!0))},slice:function(e,t){return l(this,Ue(this,e,t,!0))},some:function(e,t){return!this.every(ir(e),t)},sort:function(e){return l(this,Ve(this,e))},values:function(){return this.__iterator(K)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return f(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return n=this,r=e,o=t,i=Kt().asMutable(),n.__iterate(function(e,t){i.update(r.call(o,e,t,n),0,function(e){return e+1})}),i.asImmutable();var n,r,o,i},equals:function(e){return Ln(this,e)},entrySeq:function(){var e=this;if(e._cache)return new ie(e._cache);var t=e.toSeq().map(or).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(ir(e),t)},findEntry:function(r,o,e){var i=e;return this.__iterate(function(e,t,n){if(r.call(o,e,t,n))return!(i=[t,e])}),i},findKey:function(e,t){e=this.findEntry(e,t);return e&&e[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(o,null,e)},flatMap:function(e,t){return l(this,(r=e,o=t,i=Je(n=this),n.toSeq().map(function(e,t){return i(r.call(o,e,t,n))}).flatten(!0)));var n,r,o,i},flatten:function(e){return l(this,We(this,e,!0))},fromEntrySeq:function(){return new Fe(this)},get:function(n,e){return this.find(function(e,t){return ge(t,n)},void 0,e)},getIn:$n,groupBy:function(e,t){return o=e,i=t,a=c(r=this),s=(B(r)?En:Kt)().asMutable(),r.__iterate(function(t,n){s.update(o.call(i,t,n,r),function(e){return(e=e||[]).push(a?[n,t]:t),e})}),n=Je(r),s.map(function(e){return l(r,n(e))}).asImmutable();var r,o,i,a,s,n},has:function(e){return this.get(e,_)!==_},hasIn:function(e){return Zn(this,e)},isSubset:function(t){return t="function"==typeof t.includes?t:u(t),this.every(function(e){return t.includes(e)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:u(e)).isSubset(this)},keyOf:function(t){return this.findKey(function(e){return ge(e,t)})},keySeq:function(){return this.toSeq().map(rr).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Ge(this,e)},maxBy:function(e,t){return Ge(this,t,e)},min:function(e){return Ge(this,e?ar(e):cr)},minBy:function(e,t){return Ge(this,t?ar(t):cr,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return l(this,qe(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(ir(e),t)},sortBy:function(e,t){return l(this,Ve(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return l(this,(s=e,c=t,(e=Xe(n=this)).__iterateUncached=function(r,e){var o=this;if(e)return this.cacheResult().__iterate(r,e);var i=0;return n.__iterate(function(e,t,n){return s.call(c,e,t,n)&&++i&&r(e,t,o)}),i},e.__iteratorUncached=function(r,e){var o=this;if(e)return this.cacheResult().__iterator(r,e);var i=n.__iterator(H,e),a=!0;return new p(function(){if(!a)return G();var e=i.next();if(e.done)return e;var t=e.value,n=t[0],t=t[1];return s.call(c,t,n,o)?r===H?e:V(r,n,t,e):(a=!1,G())})},e));var n,s,c},takeUntil:function(e,t){return this.takeWhile(ir(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=B(e),n=c(e),r=t?1:0;return function(e,t){return t=me(t,3432918353),t=me(t<<15|t>>>-15,461845907),t=me(t<<13|t>>>-13,5),t=me((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ve((t=me(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+ur(_e(e),_e(t))|0}:function(e,t){r=r+ur(_e(e),_e(t))|0}:t?function(e){r=31*r+_e(e)|0}:function(e){r=r+_e(e)|0}),r)}(this))}});var Xn=u.prototype,Qn=(Xn[C]=!0,Xn[W]=Xn.values,Xn.toJSON=Xn.toArray,Xn.__toStringMapper=ct,Xn.inspect=Xn.toSource=function(){return this.toString()},Xn.chain=Xn.flatMap,Xn.contains=Xn.includes,Fn(j,{flip:function(){return l(this,Be(this))},mapEntries:function(n,r){var o=this,i=0;return l(this,this.toSeq().map(function(e,t){return n.call(r,[t,e],i++,o)}).fromEntrySeq())},mapKeys:function(n,r){var o=this;return l(this,this.toSeq().flip().map(function(e,t){return n.call(r,e,t,o)}).flip())}}),j.prototype),er=(Qn[x]=!0,Qn[W]=Xn.entries,Qn.toJSON=Jn,Qn.__toStringMapper=function(e,t){return ct(t)+": "+ct(e)},Fn(I,{toKeyedSeq:function(){return new Pe(this,!1)},filter:function(e,t){return l(this,He(this,e,t,!1))},findIndex:function(e,t){e=this.findEntry(e,t);return e?e[0]:-1},indexOf:function(e){e=this.keyOf(e);return void 0===e?-1:e},lastIndexOf:function(e){e=this.lastKeyOf(e);return void 0===e?-1:e},reverse:function(){return l(this,Ke(this,!1))},slice:function(e,t){return l(this,Ue(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=y(e,e<0?this.count():this.size);var r=this.slice(0,e);return l(this,1===n?r:r.concat(tt(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){e=this.findLastEntry(e,t);return e?e[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return l(this,We(this,e,!1))},get:function(n,e){return(n=d(this,n))<0||this.size===1/0||void 0!==this.size&&n>this.size?e:this.find(function(e,t){return t===n},void 0,e)},has:function(e){return 0<=(e=d(this,e))&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return l(this,(a=e,(e=Xe(i=this)).size=i.size&&2*i.size-1,e.__iterateUncached=function(t,e){var n=this,r=0;return i.__iterate(function(e){return(!r||!1!==t(a,r++,n))&&!1!==t(e,r++,n)},e),r},e.__iteratorUncached=function(e,t){var n,r=i.__iterator(K,t),o=0;return new p(function(){return(!n||o%2)&&(n=r.next()).done?n:o%2?V(e,o++,a):V(e,o++,n.value,n)})},e));var i,a},interleave:function(){var e=[this].concat(tt(arguments)),t=$e(this.toSeq(),re.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),l(this,n)},keySeq:function(){return Gn(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return l(this,qe(this,e,t,!1))},zip:function(){var e=[this].concat(tt(arguments));return l(this,$e(this,sr,e))},zipAll:function(){var e=[this].concat(tt(arguments));return l(this,$e(this,sr,e,!0))},zipWith:function(e){var t=tt(arguments);return l(t[0]=this,$e(this,e,t))}}),I.prototype),tr=(er[k]=!0,er[F]=!0,Fn(M,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),M.prototype);function nr(e,r,o,i,a,t){return rt(e.size),e.__iterate(function(e,t,n){o=a?(a=!1,e):r.call(i,o,e,t,n)},t),o}function rr(e,t){return t}function or(e,t){return[t,e]}function ir(e){return function(){return!e.apply(this,arguments)}}function ar(e){return function(){return-e.apply(this,arguments)}}function sr(){return tt(arguments)}function cr(e,t){return e<t?1:t<e?-1:0}function ur(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}tr.has=Xn.includes,tr.contains=tr.includes,tr.keys=tr.values,Fn(ne,Qn),Fn(re,er),Fn(oe,tr);var lr,fr=function(e){function t(n){return null==n?hr():Rn(n)?n:hr().withMutations(function(t){var e=M(n);rt(e.size),e.forEach(function(e){return t.add(e)})})}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).of=function(){return this(arguments)},t.fromKeys=function(e){return this(j(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Kn),pr=(fr.isOrderedSet=Rn,fr.prototype);function dr(e,t){var n=Object.create(pr);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function hr(){return lr=lr||dr(On())}pr[F]=!0,pr.zip=er.zip,pr.zipWith=er.zipWith,pr.zipAll=er.zipAll,pr.__empty=hr,pr.__make=dr;var yr=function(a,s){var c,e=a;if(R(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(L(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.");function u(e){var r=this;if(e instanceof u)return e;if(!(this instanceof u))return new u(e);if(!c){c=!0;var t=Object.keys(a),n=l._indices={};l._name=s,l._keys=t,l._defaultValues=a;for(var o=0;o<t.length;o++){var i=t[o];n[i]=o,l[i]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+mr(this)+' with property "'+i+'" since that property name is part of the Record API.'):function(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){nt(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}(l,i)}}return this.__ownerID=void 0,this._values=ln().withMutations(function(n){n.setSize(r._keys.length),j(e).forEach(function(e,t){n.set(r._indices[t],e===r._defaultValues[t]?void 0:e)})}),this}var l=u.prototype=Object.create(n);return l.constructor=u,s&&(u.displayName=s),u},n=(yr.prototype.toString=function(){for(var e,t=mr(this)+" { ",n=this._keys,r=0,o=n.length;r!==o;r++)t+=(r?", ":"")+(e=n[r])+": "+ct(this.get(e));return t+" }"},yr.prototype.equals=function(e){return this===e||e&&vr(this).equals(vr(e))},yr.prototype.hashCode=function(){return vr(this).hashCode()},yr.prototype.has=function(e){return this._indices.hasOwnProperty(e)},yr.prototype.get=function(e,t){if(!this.has(e))return t;t=this._indices[e],t=this._values.get(t);return void 0===t?this._defaultValues[e]:t},yr.prototype.set=function(e,t){if(this.has(e)){e=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(e!==this._values&&!this.__ownerID)return gr(this,e)}return this},yr.prototype.remove=function(e){return this.set(e)},yr.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:gr(this,e)},yr.prototype.wasAltered=function(){return this._values.wasAltered()},yr.prototype.toSeq=function(){return vr(this)},yr.prototype.toJS=function(){return Bn(this)},yr.prototype.entries=function(){return this.__iterator(H)},yr.prototype.__iterator=function(e,t){return vr(this).__iterator(e,t)},yr.prototype.__iterate=function(e,t){return vr(this).__iterate(e,t)},yr.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?gr(this,t,e):(this.__ownerID=e,this._values=t,this)},yr.isRecord=R,yr.getDescriptiveName=mr,yr.prototype);function gr(e,t,n){e=Object.create(Object.getPrototypeOf(e));return e._values=t,e.__ownerID=n,e}function mr(e){return e.constructor.displayName||e.constructor.name||"Record"}function vr(t){return ue(t._keys.map(function(e){return[e,t.get(e)]}))}n[P]=!0,n[t]=n.remove,n.deleteIn=n.removeIn=vt,n.getIn=$n,n.hasIn=Xn.hasIn,n.merge=St,n.mergeWith=Et,n.mergeIn=Nt,n.mergeDeep=It,n.mergeDeepWith=Mt,n.mergeDeepIn=At,n.setIn=gt,n.update=_t,n.updateIn=wt,n.withMutations=Pt,n.asMutable=Rt,n.asImmutable=Lt,n[W]=n.entries,n.toJSON=n.toObject=Xn.toObject,n.inspect=n.toSource=function(){return this.toString()};var br,_r=function(e){function r(e,t){if(!(this instanceof r))return new r(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(br)return br;br=this}}return e&&(r.__proto__=e),((r.prototype=Object.create(e&&e.prototype)).constructor=r).prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},r.prototype.get=function(e,t){return this.has(e)?this._value:t},r.prototype.includes=function(e){return ge(this._value,e)},r.prototype.slice=function(e,t){var n=this.size;return h(e,t,n)?this:new r(this._value,g(t,n)-y(e,n))},r.prototype.reverse=function(){return this},r.prototype.indexOf=function(e){return ge(this._value,e)?0:-1},r.prototype.lastIndexOf=function(e){return ge(this._value,e)?this.size:-1},r.prototype.__iterate=function(e,t){for(var n=this.size,r=0;r!==n&&!1!==e(this._value,t?n-++r:r++,this););return r},r.prototype.__iterator=function(e,t){var n=this,r=this.size,o=0;return new p(function(){return o===r?G():V(e,t?r-++o:o++,n._value)})},r.prototype.equals=function(e){return e instanceof r?ge(this._value,e._value):Ln(e)},r}(re);function wr(e,t){return function n(r,o,i,e,a,t){if("string"!=typeof i&&!L(i)&&(Q(i)||Y(i)||at(i))){if(~r.indexOf(i))throw new TypeError("Cannot convert circular structure to Immutable");r.push(i),a&&""!==e&&a.push(e);t=o.call(t,e,te(i).map(function(e,t){return n(r,o,e,t,a,i)}),a&&a.slice());return r.pop(),a&&a.pop(),t}return i}([],t||Sr,e,"",t&&2<t.length?[]:void 0,{"":e})}function Sr(e,t){return D(t)?t.toList():c(t)?t.toMap():t.toSet()}var Er="4.0.0",Cr=u;e.default={version:Er,Collection:u,Iterable:u,Seq:te,Map:Kt,OrderedMap:En,List:ln,Stack:jn,Set:Kn,OrderedSet:fr,Record:yr,Range:Gn,Repeat:_r,is:ge,fromJS:wr,hash:_e,isImmutable:L,isCollection:O,isKeyed:c,isIndexed:D,isAssociative:T,isOrdered:B,isValueObject:ye,isPlainObject:at,isSeq:A,isList:cn,isMap:de,isOrderedMap:he,isStack:Dn,isSet:Pn,isOrderedSet:Rn,isRecord:R,get:lt,getIn:Yn,has:ut,hasIn:Zn,merge:Ot,mergeDeep:kt,mergeWith:xt,mergeDeepWith:Dt,remove:pt,removeIn:mt,set:dt,setIn:yt,update:bt,updateIn:ht}},function(e,t,n){"use strict";var r=n(6).OrderedMap;e.exports={createFromArray:function(e){return r(e.map(function(e){return[e.getKey(),e]}))}}},function(e,t,n){"use strict";e.exports=function(e,r,o,i){var a;e.size&&(a=0,e.reduce(function(e,t,n){return r(e,t)||(o(e)&&i(a,n),a=n),t}),o(e.last())&&i(a,e.count()))}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.ownerDocument)&&(e.ownerDocument.defaultView?e instanceof e.ownerDocument.defaultView.HTMLElement:e instanceof HTMLElement)}},function(e,t,n){"use strict";var u=n(9),l=n(16)("draft_tree_data_support");e.exports=function(e,t,n){var r=e.getSelection(),o=e.getCurrentContent(),i=r,a=r.getAnchorKey(),s=r.getFocusKey(),c=o.getBlockForKey(a);if(l&&"forward"===n&&a!==s)return o;if(r.isCollapsed()){if("forward"===n){if(e.isSelectionAtEndOfContent())return o;if(l)if(r.getAnchorOffset()===o.getBlockForKey(a).getLength()){s=o.getBlockForKey(c.nextSibling);if(!s||0===s.getLength())return o}}else if(e.isSelectionAtStartOfContent())return o;if((i=t(e))===r)return o}return u.removeRange(o,i,n)}},function(e,t,n){"use strict";var r=n(51),c=n(52);e.exports=function(e,t){var o=t.getStartKey(),i=t.getStartOffset(),a=t.getEndKey(),s=t.getEndOffset(),e=c(e,t).getBlockMap(),t=e.keySeq(),n=t.indexOf(o),t=t.indexOf(a)+1;return r(e.slice(n,t).map(function(e,t){var n=e.getText(),r=e.getCharacterList();return o===a?e.merge({text:n.slice(i,s),characterList:r.slice(i,s)}):t===o?e.merge({text:n.slice(i),characterList:r.slice(i)}):t===a?e.merge({text:n.slice(0,s),characterList:r.slice(0,s)}):e}))}},function(e,l,t){"use strict";function r(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}var o=t(57),n=t(6),f=t(7),i=t(115),a=(0,n.Map)(),s=i();function c(e,t){console.warn("WARNING: "+e+' will be deprecated soon!\nPlease use "'+t+'" instead.')}var u={getLastCreatedEntityKey:function(){return c("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),u.__getLastCreatedEntityKey()},create:function(e,t,n){return c("DraftEntity.create","contentState.createEntity"),u.__create(e,t,n)},add:function(e){return c("DraftEntity.add","contentState.addEntity"),u.__add(e)},get:function(e){return c("DraftEntity.get","contentState.getEntity"),u.__get(e)},__getAll:function(){return a},__loadWithEntities:function(e){a=e,s=i()},mergeData:function(e,t){return c("DraftEntity.mergeData","contentState.mergeEntityData"),u.__mergeData(e,t)},replaceData:function(e,t){return c("DraftEntity.replaceData","contentState.replaceEntityData"),u.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return s},__create:function(e,t,n){return u.__add(new o({type:e,mutability:t,data:n||{}}))},__add:function(e){return s=i(),a=a.set(s,e),s},__get:function(e){e=a.get(e);return e||f(!1),e},__mergeData:function(e,t){var n=u.__get(e),t=r({},n.getData(),t),n=n.set("data",t);return a=a.set(e,n),n},__replaceData:function(e,t){t=u.__get(e).set("data",t);return a=a.set(e,t),t}};e.exports=u},function(e,t,n){"use strict";n=function(e){var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},r.getAnchorKey=function(){return this.get("anchorKey")},r.getAnchorOffset=function(){return this.get("anchorOffset")},r.getFocusKey=function(){return this.get("focusKey")},r.getFocusOffset=function(){return this.get("focusOffset")},r.getIsBackward=function(){return this.get("isBackward")},r.getHasFocus=function(){return this.get("hasFocus")},r.hasEdgeWithin=function(e,t,n){var r,o=this.getAnchorKey(),i=this.getFocusKey();if(o===i&&o===e)return a=this.getStartOffset(),r=this.getEndOffset(),t<=a&&a<=n||t<=r&&r<=n;if(e!==o&&e!==i)return!1;var a=e===o?this.getAnchorOffset():this.getFocusOffset();return t<=a&&a<=n},r.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},r.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},r.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},r.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},r.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},n.createEmpty=function(e){return new n({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},n}((0,n(6).Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));e.exports=n},function(e,t,n){"use strict";var r=n(7),o=null;function i(e){return"LTR"===e||"RTL"===e}function a(e){return i(e)||r(!1),"LTR"===e?"ltr":"rtl"}function s(e){o=e}e.exports={NEUTRAL:"NEUTRAL",LTR:"LTR",RTL:"RTL",isStrong:i,getHTMLDir:a,getHTMLDirIfDifferent:function(e,t){return i(e)||r(!1),i(t)||r(!1),e===t?null:a(e)},setGlobalDir:s,initGlobalDir:function(){s("LTR")},getGlobalDir:function(){return o||this.initGlobalDir(),o||r(!1),o}}},function(e,t,n){"use strict";var r=n(34),o=n(60);e.exports=function(e){for(var t=e;t&&t!==r(e).documentElement;){var n=o(t);if(null!=n)return n;t=t.parentNode}return null}},function(e,t,n){"use strict";e.exports=function(e){return e&&e.ownerDocument?e.ownerDocument:document}},function(e,t,n){"use strict";e.exports={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105}},function(e,t,n){"use strict";function r(e,t){e=o.get(e,t);return"auto"===e||"scroll"===e}var o={get:n(138),getScrollParent:function(e){if(!e)return null;for(var t=e.ownerDocument;e&&e!==t.body;){if(r(e,"overflow")||r(e,"overflowY")||r(e,"overflowX"))return e;e=e.parentNode}return t.defaultView||t.parentWindow}};e.exports=o},function(e,t,n){"use strict";var o=n(142),i=n(143);e.exports=function(e){var t=o(e.ownerDocument||e.document),n=(e.Window&&e instanceof e.Window&&(e=t),i(e)),t=e===t?e.ownerDocument.documentElement:e,r=e.scrollWidth-t.clientWidth,e=e.scrollHeight-t.clientHeight;return n.x=Math.max(0,Math.min(n.x,r)),n.y=Math.max(0,Math.min(n.y,e)),n}},function(e,t,n){"use strict";e.exports=function(e){return"handled"===e||!0===e}},function(e,t,n){function o(e){if(s[e])return s[e].exports;var t=s[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var r,i,a,s;window,e.exports=(r=n(24),i=n(2),s={},o.m=a=[function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t,n){e.exports=n(3)},function(n,e,t){"use strict";t.r(e);var y=t(1),s=t(0),g=function(e,t,n){var r,e=e.textContent;return""===e.trim()?{chunk:(r=n,{text:" ",inlines:[new s.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:e,inlines:Array(e.length).fill(t),entities:Array(e.length).fill(n),blocks:[]}}},m=function(){return{text:"\n",inlines:[new s.OrderedSet],entities:new Array(1),blocks:[]}},S=function(){return{text:"",inlines:[],entities:[],blocks:[]}},E=function(e,t){return{text:"",inlines:[],entities:[],blocks:[{type:e,depth:0,data:t||new s.Map({})}]}},C=function(e,t,n){return{text:"\r",inlines:[],entities:[],blocks:[{type:e,depth:Math.max(0,Math.min(4,t)),data:n||new s.Map({})}]}},v=function(e){return{text:"\r ",inlines:[new s.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new s.Map({})}]}},O=function(e,t){return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},x=new s.Map({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},"unordered-list-item":{element:"li",wrapper:"ul"},"ordered-list-item":{element:"li",wrapper:"ol"},blockquote:{element:"blockquote"},code:{element:"pre"},atomic:{element:"figure"},unstyled:{element:"p",aliasedElements:["div"]}}),b={code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",strong:"BOLD",ins:"UNDERLINE",sub:"SUBSCRIPT",sup:"SUPERSCRIPT"};function _(e){return e.style.textAlign?new s.Map({"text-align":e.style.textAlign}):e.style.marginLeft?new s.Map({"margin-left":e.style.marginLeft}):void 0}var k=function(e){var t,n=void 0;return e instanceof HTMLAnchorElement&&(t={},n=e.dataset&&void 0!==e.dataset.mention?(t.url=e.href,t.text=e.innerHTML,t.value=e.dataset.value,y.Entity.__create("MENTION","IMMUTABLE",t)):(t.url=e.getAttribute&&e.getAttribute("href")||e.href,t.title=e.innerHTML,t.targetOption=e.target,y.Entity.__create("LINK","MUTABLE",t))),n},c=(t.d(e,"default",function(){return r})," "),u=new RegExp(" ","g"),w=!0;function r(e,t){t=t,e=e.trim().replace(u,c),e=e,r=null,document.implementation&&document.implementation.createHTMLDocument&&((n=document.implementation.createHTMLDocument("foo")).documentElement.innerHTML=e,r=n.getElementsByTagName("body")[0]);var n,r,i,o,a,e=r?(w=!0,{chunk:function l(e,t,n,r,f,p){var o=e.nodeName.toLowerCase();if(p)if(a=p(o,e))return a=y.Entity.__create(a.type,a.mutability,a.data||{}),{chunk:v(a)};if("#text"===o&&"\n"!==e.textContent)return g(e,t,f);if("br"===o)return{chunk:m()};if("img"===o&&e instanceof HTMLImageElement)return(a={}).src=e.getAttribute&&e.getAttribute("src")||e.src,a.alt=e.alt,a.height=e.style.height,a.width=e.style.width,e.style.float&&(a.alignment=e.style.float),a=y.Entity.__create("IMAGE","MUTABLE",a),{chunk:v(a)};if("video"===o&&e instanceof HTMLVideoElement)return(a={}).src=e.getAttribute&&e.getAttribute("src")||e.src,a.alt=e.alt,a.height=e.style.height,a.width=e.style.width,e.style.float&&(a.alignment=e.style.float),a=y.Entity.__create("VIDEO","MUTABLE",a),{chunk:v(a)};if("iframe"===o&&e instanceof HTMLIFrameElement)return(a={}).src=e.getAttribute&&e.getAttribute("src")||e.src,a.height=e.height,a.width=e.width,a=y.Entity.__create("EMBEDDED_LINK","MUTABLE",a),{chunk:v(a)};var d,c,i,a=function(t,n){var e=x.filter(function(e){return e.element===t&&(!e.wrapper||e.wrapper===n)||e.wrapper===t||e.aliasedElements&&-1<e.aliasedElements.indexOf(t)}).keySeq().toSet().toArray();if(1===e.length)return e[0]}(o,r);a&&("ul"===o||"ol"===o?(r=o,n+=1):("unordered-list-item"!==a&&"ordered-list-item"!==a&&(r="",n=-1),w?(u=E(a,_(e)),w=!1):u=C(a,n,_(e)))),u=u||S(),a=e,d=t,(o=b[o])?i=d.add(o).toOrderedSet():a instanceof HTMLElement&&(c=a,i=(i=d).withMutations(function(e){var t=c.style.color,n=c.style.backgroundColor,r=c.style.fontSize,o=c.style.fontFamily.replace(/^"|"$/g,""),i=c.style.fontWeight,a=c.style.textDecoration,s=c.style.fontStyle;t&&e.add("color-".concat(t.replace(/ /g,""))),n&&e.add("bgcolor-".concat(n.replace(/ /g,""))),r&&e.add("fontsize-".concat(r.replace(/px$/g,""))),o&&e.add("fontfamily-".concat(o)),"bold"===i&&e.add(b.strong),"underline"===a&&e.add(b.ins),"italic"===s&&e.add(b.em)}).toOrderedSet()),t=i;for(var s=e.firstChild;s;)var h=l(s,t,n,r,k(s)||f,p).chunk,u=O(u,h),s=s.nextSibling;return{chunk:u}}(r,new s.OrderedSet,-1,"",void 0,t).chunk}):null;return e?(i=e.chunk,o=new s.OrderedMap({}),i.entities&&i.entities.forEach(function(e){e&&(o=o.set(e,y.Entity.__get(e)))}),a=0,{contentBlocks:i.text.split("\r").map(function(e,t){var n=a+e.length,r=i&&i.inlines.slice(a,n),o=i&&i.entities.slice(a,n),r=new s.List(r.map(function(e,t){e={style:e,entity:null};return o[t]&&(e.entity=o[t]),y.CharacterMetadata.create(e)}));return a=n,new y.ContentBlock({key:Object(y.genKey)(),type:i&&i.blocks[t]&&i.blocks[t].type||"unstyled",depth:i&&i.blocks[t]&&i.blocks[t].depth,data:i&&i.blocks[t]&&i.blocks[t].data||new s.Map({}),text:e,characterList:r})}),entityMap:o}):null}}],o.c=s,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2))},function(e,r,t){"use strict";function o(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}var i=t(25),a=t(12),f=t(18),p=t(13),s=t(30),c=t(31),d=t(14),h=t(56),y=t(16),n=t(6),g=t(58),u=n.List,t=n.Record,m=n.Repeat,v=n.Map,b=n.OrderedMap,n=t({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),l=y("draft_tree_data_support")?p:f,t=function(e){var t;function r(){return e.apply(this,arguments)||this}t=e,(n=r).prototype=Object.create(t.prototype),(n.prototype.constructor=n).__proto__=t;var n=r.prototype;return n.getEntityMap=function(){return s},n.getBlockMap=function(){return this.get("blockMap")},n.getSelectionBefore=function(){return this.get("selectionBefore")},n.getSelectionAfter=function(){return this.get("selectionAfter")},n.getBlockForKey=function(e){return this.getBlockMap().get(e)},n.getKeyBefore=function(t){return this.getBlockMap().reverse().keySeq().skipUntil(function(e){return e===t}).skip(1).first()},n.getKeyAfter=function(t){return this.getBlockMap().keySeq().skipUntil(function(e){return e===t}).skip(1).first()},n.getBlockAfter=function(n){return this.getBlockMap().skipUntil(function(e,t){return t===n}).skip(1).first()},n.getBlockBefore=function(n){return this.getBlockMap().reverse().skipUntil(function(e,t){return t===n}).skip(1).first()},n.getBlocksAsArray=function(){return this.getBlockMap().toArray()},n.getFirstBlock=function(){return this.getBlockMap().first()},n.getLastBlock=function(){return this.getBlockMap().last()},n.getPlainText=function(e){return this.getBlockMap().map(function(e){return e?e.getText():""}).join(e||"\n")},n.getLastCreatedEntityKey=function(){return s.__getLastCreatedEntityKey()},n.hasText=function(){var e=this.getBlockMap();return 1<e.size||0<escape(e.first().getText()).replace(/%u200B/g,"").length},n.createEntity=function(e,t,n){return s.__create(e,t,n),this},n.mergeEntityData=function(e,t){return s.__mergeData(e,t),this},n.replaceEntityData=function(e,t){return s.__replaceData(e,t),this},n.addEntity=function(e){return s.__add(e),this},n.getEntity=function(e){return s.__get(e)},n.getAllEntities=function(){return s.__getAll()},n.loadWithEntities=function(e){return s.__loadWithEntities(e)},r.createFromBlockArray=function(e,t){var e=Array.isArray(e)?e:e.contentBlocks,e=i.createFromArray(e),n=e.isEmpty()?new c:c.createEmpty(e.first().getKey());return new r({blockMap:e,entityMap:t||s,selectionBefore:n,selectionAfter:n})},r.createFromText=function(e){e=e.split(1<arguments.length&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g).map(function(e){return e=g(e),new l({key:d(),text:e,type:"unstyled",characterList:u(m(a.EMPTY,e.length))})});return r.createFromBlockArray(e)},r.fromJS=function(e){return new r(o({},e,{blockMap:b(e.blockMap).map(r.createContentBlockFromJS),selectionBefore:new c(e.selectionBefore),selectionAfter:new c(e.selectionAfter)}))},r.createContentBlockFromJS=function(e){var t=e.characterList;return new l(o({},e,{data:v(e.data),characterList:null!=t?u((Array.isArray(t)?t:h(t)).map(function(e){return a.fromJS(e)})):void 0}))},r}(n);e.exports=t},function(e,l,t){"use strict";var n=t(32),r=t(7),t="־׀׃׆-א-ת-ׯװ-ײ׳-״-߀-߉ߊ-ߪߴ-ߵߺ-߿ࠀ-ࠕࠚࠤࠨ-࠰-࠾ࡀ-ࡘ-࡞-࢟יִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﭏ",o="؈؋؍؛؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍ܐܒ-ܯ-ݍ-ޥޱ-ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-ﯓ-ﴽ﵀-﵏ﵐ-ﶏ-ﶒ-ﷇ-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴﹶ-ﻼ-",i=new RegExp("["+"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+t+o+"]"),f=new RegExp("["+t+o+"]");function a(e){e=i.exec(e);return null==e?null:e[0]}function s(e){e=a(e);return null==e?n.NEUTRAL:f.exec(e)?n.RTL:n.LTR}function c(e,t){if(t=t||n.NEUTRAL,!e.length)return t;e=s(e);return e===n.NEUTRAL?t:e}function u(e,t){return t=t||n.getGlobalDir(),n.isStrong(t)||r(!1),c(e,t)}e.exports={firstStrongChar:a,firstStrongCharDir:s,resolveBlockDir:c,getDirection:u,isDirectionLTR:function(e,t){return u(e,t)===n.LTR},isDirectionRTL:function(e,t){return u(e,t)===n.RTL}}},function(e,t,n){"use strict";var r=n(0),o=n(19),n=(0,n(6).Map)({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},section:{element:"section"},article:{element:"article"},"unordered-list-item":{element:"li",wrapper:r.createElement("ul",{className:o("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:r.createElement("ol",{className:o("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:r.createElement("pre",{className:o("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}});e.exports=n},function(e,t,n){"use strict";var r=n(68).notEmptyKey;function i(e,t){return r(t)&&"MUTABLE"===e.__get(t).getMutability()?t:null}e.exports=function(e,t){if(t.isCollapsed())return n=t.getAnchorKey(),!(0<(r=t.getAnchorOffset()))||(o=e.getBlockForKey(n).getEntityAt(r-1))!==e.getBlockForKey(n).getEntityAt(r)?null:i(e.getEntityMap(),o);var n=t.getStartKey(),r=t.getStartOffset(),t=e.getBlockForKey(n),o=r===t.getLength()?null:t.getEntityAt(r);return i(e.getEntityMap(),o)}},function(e,t,n){"use strict";var r=n(136);e.exports=function e(t,n){return!(!t||!n)&&(t===n||!r(t)&&(r(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}},function(e,t,n){"use strict";function r(e,t){return t&&(e===t.documentElement||e===t.body)}e.exports={getTop:function(e){var t=e.ownerDocument;return r(e,t)?t.body.scrollTop||t.documentElement.scrollTop:e.scrollTop},setTop:function(e,t){var n=e.ownerDocument;r(e,n)?n.body.scrollTop=n.documentElement.scrollTop=t:e.scrollTop=t},getLeft:function(e){var t=e.ownerDocument;return r(e,t)?t.body.scrollLeft||t.documentElement.scrollLeft:e.scrollLeft},setLeft:function(e,t){var n=e.ownerDocument;r(e,n)?n.body.scrollLeft=n.documentElement.scrollLeft=t:e.scrollLeft=t}}},function(e,t,n){"use strict";n(47);e.exports=function(e,t){var n,r=e.getSelection(),e=e.getCurrentContent(),o=r.getStartKey(),i=r.getStartOffset(),a=o,s=0;return i<t?null==(n=e.getKeyBefore(o))?a=o:s=e.getBlockForKey(a=n).getText().length:s=i-t,r.merge({focusKey:a,focusOffset:s,isBackward:!0})}},function(e,t,n){"use strict";n=n(77);e.exports=n},function(e,t,n){"use strict";var r=n(11),n=n(165),o=r.isPlatform("Mac OS X"),i={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return o&&e.altKey},usesMacOSHeuristics:function(){return o},hasCommandModifier:function(e){return o?!!e.metaKey&&!e.altKey:i.isCtrlKeyCommand(e)},isSoftNewlineEvent:n};e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeDecorator=t.renderNode=t.RawParser=t.createBlockRenderer=t.createStylesRenderer=void 0;var r=s(n(89)),o=s(n(217)),i=n(218),a=s(n(91)),n=s(n(228));function s(e){return e&&e.__esModule?e:{default:e}}t.createStylesRenderer=o.default,t.createBlockRenderer=n.default,t.RawParser=r.default,t.renderNode=i.renderNode,t.CompositeDecorator=a.default,t.default=i.render},function(e,t,n){"use strict";e.exports=n(229)},function(e,t,n){"use strict";var r=n(13),f=n(14),o=n(6).OrderedMap;e.exports=function(e){var u,l;return e.first()instanceof r?(l={},o(e.withMutations(function(c){c.forEach(function(e,t){var n=e.getKey(),r=e.getNextSiblingKey(),o=e.getPrevSiblingKey(),i=e.getChildKeys(),a=e.getParentKey(),s=f();l[n]=s,r&&(c.get(r)?c.setIn([r,"prevSibling"],s):c.setIn([n,"nextSibling"],null)),o&&(c.get(o)?c.setIn([o,"nextSibling"],s):c.setIn([n,"prevSibling"],null)),a&&c.get(a)?(r=c.get(a).getChildKeys(),c.setIn([a,"children"],r.set(r.indexOf(e.getKey()),s))):(c.setIn([n,"parent"],null),u&&(c.setIn([u.getKey(),"nextSibling"],s),c.setIn([n,"prevSibling"],l[u.getKey()])),u=c.get(n)),i.forEach(function(t){c.get(t)?c.setIn([t,"parent"],s):c.setIn([n,"children"],e.getChildKeys().filter(function(e){return e!==t}))})})}).toArray().map(function(e){return[l[e.getKey()],e.set("key",l[e.getKey()])]}))):o(e.toArray().map(function(e){var t=f();return[t,e.set("key",t)]}))}},function(e,t,n){"use strict";var p=n(12),d=n(26),h=n(7);function l(l,e,t){var n,r,o,i=e.getCharacterList(),a=0<t?i.get(t-1):void 0,s=t<i.count()?i.get(t):void 0,a=a?a.getEntity():void 0,s=s?s.getEntity():void 0;if(s&&s===a&&"MUTABLE"!==l.__get(s).getMutability()){n=s,r=t,d(i,function(e,t){return e.getEntity()===t.getEntity()},function(e){return e.getEntity()===n},function(e,t){e<=r&&r<=t&&(o={start:e,end:t})}),"object"!=typeof o&&h(!1);for(var c,a=o,u=a.start,f=a.end;u<f;)c=i.get(u),i=i.set(u,p.applyEntity(c,null)),u++;return e.set("characterList",i)}return e}e.exports=function(e,t){var n=e.getBlockMap(),r=e.getEntityMap(),o={},i=t.getStartKey(),a=t.getStartOffset(),s=n.get(i),s=((a=l(r,s,a))!==s&&(o[i]=a),t.getEndKey()),c=t.getEndOffset(),u=n.get(s);return(r=l(r,u=i===s?a:u,c))!==u&&(o[s]=r),Object.keys(o).length?e.merge({blockMap:n.merge(o),selectionAfter:t}):e.set("selectionAfter",t)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=e;return n===r.count()?t.forEach(function(e){r=r.push(e)}):0===n?t.reverse().forEach(function(e){r=r.unshift(e)}):(e=r.slice(0,n),n=r.slice(n),r=e.concat(t,n).toList()),r}},function(e,t,n){"use strict";var a=n(6).Map;e.exports=function(e,t,n){var r=t.getStartKey(),o=t.getEndKey(),i=e.getBlockMap(),n=i.toSeq().skipUntil(function(e,t){return t===r}).takeUntil(function(e,t){return t===o}).concat(a([[o,i.get(o)]])).map(n);return e.merge({blockMap:i.merge(n),selectionBefore:t,selectionAfter:t})}},function(e,t,n){"use strict";var i=n(13);e.exports=function(e,t){if(!(e instanceof i))return null;var n=e.getNextSiblingKey();if(n)return n;n=e.getParentKey();if(!n)return null;for(var r=t.get(n);r&&!r.getNextSiblingKey();)var o=r.getParentKey(),r=o?t.get(o):null;return r?r.getNextSiblingKey():null}},function(e,t,n){"use strict";e.exports=function(t){return Object.keys(t).map(function(e){return t[e]})}},function(e,t,n){"use strict";n=function(e){var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.getType=function(){return this.get("type")},r.getMutability=function(){return this.get("mutability")},r.getData=function(){return this.get("data")},n}((0,n(6).Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object}));e.exports=n},function(e,t,n){"use strict";var r=new RegExp("\r","g");e.exports=function(e){return e.replace(r,"")}},function(e,t,n){"use strict";e.exports={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}}},function(e,t,n){"use strict";var i=n(20);e.exports=function e(t){if(i(t)){var n=t;if(t=n.getAttribute("data-offset-key"))return t;for(var r=0;r<n.childNodes.length;r++){var o=e(n.childNodes[r]);if(o)return o}}return null}},function(e,t,n){"use strict";e.exports=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}},function(e,t,n){"use strict";var o=n(63),i=n(8),a=n(64),s=n(65);e.exports=function(e){var t,n,r;e._blockSelectEvents||e._latestEditorState!==e.props.editorState?e._blockSelectEvents&&(t=e.props.editorState.getSelection(),o.logBlockedSelectionEvent({anonymizedDom:"N/A",extraParams:JSON.stringify({stacktrace:(new Error).stack}),selectionState:JSON.stringify(t.toJS())})):(t=e.props.editorState,(r=(n=s(t,a(e))).selectionState)!==t.getSelection()&&(t=n.needsRecovery?i.forceSelection(t,r):i.acceptSelection(t,r),e.update(t)))}},function(e,t,n){"use strict";e.exports={logBlockedSelectionEvent:function(){return null},logSelectionStateFailure:function(){return null}}},function(e,t,n){"use strict";var r=n(7),o=n(27);e.exports=function(e){return(e=e.editorContainer)||r(!1),o(e.firstChild)||r(!1),e.firstChild}},function(e,t,n){"use strict";var s=n(66);e.exports=function(e,t){var n=t.ownerDocument.defaultView.getSelection(),r=n.anchorNode,o=n.anchorOffset,i=n.focusNode,a=n.focusOffset;return 0===n.rangeCount||null==r||null==i?{selectionState:e.getSelection().set("hasFocus",!1),needsRecovery:!1}:s(e,t,r,o,i,a)}},function(e,n,t){"use strict";var f=t(33),i=t(60),p=t(67),a=t(7),s=t(20),d=t(10);function h(e,t,n){var r=f(t);if(null!=r||e&&(e===t||e.firstChild===t)||a(!1),e===t&&(t=t.firstChild,s(t)||a(!1),"true"!==(t=t).getAttribute("data-contents")&&a(!1),0<n&&(n=t.childNodes.length)),0===n)return{key:null!=r?r:(e=function(e){for(;e.firstChild&&(s(e.firstChild)&&"true"===e.firstChild.getAttribute("data-blocks")||i(e.firstChild));)e=e.firstChild;return e}(t),d(i(e))),offset:0};var o,e=t.childNodes[n-1],t=null,n=null;return n=i(e)?(o=function(e){for(;e.lastChild&&(s(e.lastChild)&&"true"===e.lastChild.getAttribute("data-blocks")||i(e.lastChild));)e=e.lastChild;return e}(e),t=d(i(o)),c(o)):(t=d(r),c(e)),{key:t,offset:n}}function c(e){e=e.textContent;return"\n"===e?0:e.length}e.exports=function(e,t,n,r,o,i){var a=n.nodeType===Node.TEXT_NODE,s=o.nodeType===Node.TEXT_NODE;if(a&&s)return{selectionState:p(e,d(f(n)),r,d(f(o)),i),needsRecovery:!1};var c=null,u=null,l=!0;return a?(c={key:d(f(n)),offset:r},u=h(t,o,i)):s?(u={key:d(f(o)),offset:i},c=h(t,n,r)):(c=h(t,n,r),u=h(t,o,i),n===o&&r===i&&(l=!!n.firstChild&&"BR"!==n.firstChild.nodeName)),{selectionState:p(e,c.key,c.offset,u.key,u.offset),needsRecovery:l}}},function(e,t,n){"use strict";var d=n(15),h=n(10);e.exports=function(e,t,n,r,o){var i=h(e.getSelection());if(!t||!r)return i;var a=(t=d.decode(t)).blockKey,s=(s=e.getBlockTree(a))&&s.getIn([t.decoratorKey,"leaves",t.leafKey]),c=(t=d.decode(r)).blockKey,r=(r=e.getBlockTree(c))&&r.getIn([t.decoratorKey,"leaves",t.leafKey]);if(!s||!r)return i;var t=s.get("start"),u=r.get("start"),l=s?t+n:null,f=r?u+o:null;if(i.getAnchorKey()===a&&i.getAnchorOffset()===l&&i.getFocusKey()===c&&i.getFocusOffset()===f)return i;var p=!1;return p=a===c?(s=s.get("end"),r=r.get("end"),u===t&&r===s?o<n:u<t):e.getCurrentContent().getBlockMap().keySeq().skipUntil(function(e){return e===a||e===c}).first()===c,i.merge({anchorKey:a,anchorOffset:l,focusKey:c,focusOffset:f,isBackward:p})}},function(e,t,n){"use strict";e.exports={notEmptyKey:function(e){return null!=e&&""!=e}}},function(e,t,n){"use strict";var c=n(17);var u=n(134),l=n(0),f=n(7),p=n(70),d=n(135).setDraftEditorSelection,n=function(s){var e;function t(){for(var e,t,n,r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=s.call.apply(s,[this].concat(i))||this,t=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e),r=void 0,(n="leaf")in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,e}e=s,(n=t).prototype=Object.create(e.prototype),(n.prototype.constructor=n).__proto__=e;var n=t.prototype;return n._setSelection=function(){var e,t,n,r,o,i,a=this.props.selection;null!=a&&a.getHasFocus()&&(t=(n=this.props).block,e=n.start,n=n.text,t=t.getKey(),n=e+n.length,a.hasEdgeWithin(t,e,n)&&((r=this.leaf)||f(!1),(o=r.firstChild)||f(!1),o.nodeType===Node.TEXT_NODE?i=o:p(o)?i=r:(i=o.firstChild)||f(!1),d(a,i,t,e,n)))},n.shouldComponentUpdate=function(e){var t=this.leaf;return t||f(!1),t.textContent!==e.text||e.styleSet!==this.props.styleSet||e.forceSelection},n.componentDidUpdate=function(){this._setSelection()},n.componentDidMount=function(){this._setSelection()},n.render=function(){var t=this,e=this.props.block,n=this.props.text,r=(n.endsWith("\n")&&this.props.isLast&&(n+="\n"),this.props),o=r.customStyleMap,i=r.customStyleFn,a=r.offsetKey,r=r.styleSet,s=r.reduce(function(e,t){var n={},t=o[t];return void 0!==t&&e.textDecoration!==t.textDecoration&&(n.textDecoration=[e.textDecoration,t.textDecoration].join(" ").trim()),c(e,t,n)},{});return i&&(i=i(r,e),s=c(s,i)),l.createElement("span",{"data-offset-key":a,ref:function(e){return t.leaf=e},style:s},l.createElement(u,null,n))},t}(l.Component);e.exports=n},function(e,t,n){"use strict";var r=n(20);e.exports=function(e){return!(!e||!e.ownerDocument)&&(r(e)&&"BR"===e.nodeName)}},function(e,t,n){"use strict";e.exports={initODS:function(){},handleExtensionCausedError:function(){}}},function(e,t,n){"use strict";e.exports=function(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}},function(e,t,n){"use strict";var r=n(141);e.exports=function(e){return{x:(e=r(e)).left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}},function(e,t,n){"use strict";function r(){var e;return(e=!(e=document.documentElement?document.documentElement.clientWidth:e)&&document.body?document.body.clientWidth:e)||0}function o(){var e;return(e=!(e=document.documentElement?document.documentElement.clientHeight:e)&&document.body?document.body.clientHeight:e)||0}function i(){return{width:window.innerWidth||r(),height:window.innerHeight||o()}}i.withoutScrollbars=function(){return{width:r(),height:o()}},e.exports=i},function(e,a,t){"use strict";var n=t(17);function m(){return(m=n||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function r(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t}var v=t(69),b=t(15),_=t(0),o=t(45),i=t(36),w=t(41),S=t(32),c=t(19),u=t(73),l=t(37),f=t(74),p=t(7),d=t(27),E=t(10),t=function(s){var e;function t(){for(var e,t,n,r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=s.call.apply(s,[this].concat(i))||this,t=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e),r=void 0,(n="_node")in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,e}e=s,(n=t).prototype=Object.create(e.prototype),(n.prototype.constructor=n).__proto__=e;var n=t.prototype;return n.shouldComponentUpdate=function(e){return this.props.block!==e.block||this.props.tree!==e.tree||this.props.direction!==e.direction||r(e.selection,e.block.getKey())&&e.forceSelection},n.componentDidMount=function(){var e,t,n,r;this.props.preventScroll||(t=(e=this.props.selection).getEndKey(),!e.getHasFocus()||t!==this.props.block.getKey()||null!=(e=this._node)&&(t=i.getScrollParent(e),n=l(t),t===window?0<(r=(r=u(e)).y+r.height-f().height)&&window.scrollTo(n.x,n.y+r+10):(d(e)||p(!1),0<(r=e.offsetHeight+e.offsetTop-(t.offsetTop+t.offsetHeight+n.y))&&o.setTop(t,o.getTop(t)+r+10))))},n._renderChildren=function(){var f=this,p=this.props.block,d=p.getKey(),h=p.getText(),y=this.props.tree.size-1,g=r(this.props.selection,d);return this.props.tree.map(function(e,o){var t=e.get("leaves");if(0===t.size)return null;var i=t.size-1,n=t.map(function(e,t){var n=b.encode(d,o,t),r=e.get("start"),e=e.get("end");return _.createElement(v,{key:n,offsetKey:n,block:p,start:r,selection:g?f.props.selection:null,forceSelection:f.props.forceSelection,text:h.slice(r,e),styleSet:p.getInlineStyleAt(r),customStyleMap:f.props.customStyleMap,customStyleFn:f.props.customStyleFn,isLast:o===y&&t===i})}).toArray(),r=e.get("decoratorKey");if(null==r)return n;if(!f.props.decorator)return n;var a=E(f.props.decorator),s=a.getComponentForKey(r);if(!s)return n;var a=a.getPropsForKey(r),r=b.encode(d,o,0),c=t.first().get("start"),t=t.last().get("end"),u=h.slice(c,t),e=p.getEntityAt(e.get("start")),l=S.getHTMLDirIfDifferent(w.getDirection(u),f.props.direction),u={contentState:f.props.contentState,decoratedText:u,dir:l,start:c,end:t,blockKey:d,entityKey:e,offsetKey:r};return _.createElement(s,m({},a,u,{key:r}),n)}).toArray()},n.render=function(){var t=this,e=this.props,n=e.direction,e=e.offsetKey,n=c({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===n,"public/DraftStyleDefault/rtl":"RTL"===n});return _.createElement("div",{"data-offset-key":e,className:n,ref:function(e){return t._node=e}},this._renderChildren())},t}(_.Component);e.exports=t},function(e,t,n){"use strict";var r=n(147),o=n(148),i=n(77),a=new RegExp("\r\n","g"),s={"text/rtf":1,"text/html":1};function c(e){if("file"==e.kind)return e.getAsFile()}e.exports=function(){function e(e){this.data=e,this.types=e.types?o(e.types):[]}var t=e.prototype;return t.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some(function(e){return s[e]})},t.getText=function(){var e;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(e=this.data.getData("text/plain")):e=this.data.getData("Text")),e?e.replace(a,"\n"):null},t.getHTML=function(){if(this.data.getData)return this.types.length?-1!=this.types.indexOf("text/html")?this.data.getData("text/html"):void 0:this.data.getData("Text")},t.isLink=function(){return this.types.some(function(e){return-1!=e.indexOf("Url")||-1!=e.indexOf("text/uri-list")||e.indexOf("text/x-moz-url")})},t.getLink=function(){return this.data.getData?-1==this.types.indexOf("text/x-moz-url")?-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):this.data.getData("text/x-moz-url").split("\n")[0]:null},t.isImage=function(){if(this.types.some(function(e){return-1!=e.indexOf("application/x-moz-file")}))return!0;for(var e=this.getFiles(),t=0;t<e.length;t++){var n=e[t].type;if(!r.isImage(n))return!1}return!0},t.getCount=function(){return this.data.hasOwnProperty("items")?this.data.items.length:this.data.hasOwnProperty("mozItemCount")?this.data.mozItemCount:this.data.files?this.data.files.length:null},t.getFiles=function(){return this.data.items?Array.prototype.slice.call(this.data.items).map(c).filter(i.thatReturnsArgument):this.data.files?Array.prototype.slice.call(this.data.files):[]},t.hasFiles=function(){return 0<this.getFiles().length},e}()},function(e,t,n){"use strict";function r(e){return function(){return e}}function o(){}o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";!function(c){var u=n(7),l=/\.textClipping$/,f={"text/plain":!0,"text/html":!0,"text/rtf":!0};e.exports=function(o,i){var a=0,s=[];o.forEach(function(e){var t,n,r;e=e,t=function(e){a++,e&&s.push(e.slice(0,5e3)),a==o.length&&i(s.join("\r"))},c.FileReader&&(!e.type||e.type in f)?""!==e.type?((n=new FileReader).onload=function(){var e=n.result;"string"!=typeof e&&u(!1),t(e)},n.onerror=function(){t("")},n.readAsText(e)):(r="",l.test(e.name)&&(r=e.name.replace(l,"")),t(r)):t("")})}}.call(this,n(23))},function(e,t,n){"use strict";var r=n(29);e.exports=function(e){var t=e.getSelection();return t.isCollapsed()?null:r(e.getCurrentContent(),t)}},function(e,t,n){"use strict";var r=n(8),o=n(21),i=n(46),a=n(28);e.exports=function(e){var t=a(e,function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),t=t.getAnchorOffset(),n=n.getBlockForKey(r).getText()[t-1];return i(e,n?o.getUTF16Length(n,0):1)},"backward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return r.push(e,t.set("selectionBefore",n),n.isCollapsed()?"backspace-character":"remove-range")}},function(e,t,n){"use strict";var r=n(11),a=n(7),n=r.isBrowser("Chrome");e.exports=n?function(e){for(var t=e.cloneRange(),n=[],r=e.endContainer;null!=r;r=r.parentNode){var o=r===e.commonAncestorContainer,i=(o?t.setStart(e.startContainer,e.startOffset):t.setStart(t.endContainer,0),Array.from(t.getClientRects()));if(n.push(i),o)return n.reverse(),(i=[]).concat.apply(i,n);t.setEndBefore(r)}a(!1)}:function(e){return Array.from(e.getClientRects())}},function(e,t,n){"use strict";var n="\\s|(?![_])"+n(170).getPunctuation(),r=new RegExp("^(?:"+n+")*(?:['‘’]|(?!"+n+").)*(?:(?!"+n+").)"),o=new RegExp("(?:(?!"+n+").)(?:['‘’]|(?!"+n+").)*(?:"+n+")*$");function i(e,t){t=(t?o:r).exec(e);return t?t[0]:e}e.exports={getBackward:function(e){return i(e,!0)},getForward:function(e){return i(e,!1)}}},function(e,t,n){"use strict";n(47);e.exports=function(e,t){var n=e.getSelection(),r=n.getStartKey(),o=n.getStartOffset(),e=e.getCurrentContent(),i=r,e=t>e.getBlockForKey(r).getText().length-o?(i=e.getKeyAfter(r),0):o+t;return n.merge({focusKey:i,focusOffset:e})}},function(s,c,e){"use strict";function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);(r="function"==typeof Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})):r).forEach(function(e){o(t,e,n[e])})}return t}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){return"ul"===e||"ol"===e}var u=e(12),d=e(18),h=e(13),y=e(42),n=e(30),f=e(180),t=e(19),g=e(14),m=e(85),v=e(16),r=e(6),a=r.List,b=r.Map,_=r.OrderedSet,w=e(181),S=e(70),p=e(27),E=e(182),C=v("draft_tree_data_support"),O=new RegExp("\r","g"),x=new RegExp("\n","g"),k=new RegExp("^\n","g"),D=new RegExp(" ","g"),T=new RegExp(" ?","g"),j=new RegExp("​?","g"),I=["bold","bolder","500","600","700","800","900"],M=["light","lighter","normal","100","200","300","400"],N=["className","href","rel","target","title"],A=["alt","className","height","src","width"],P=(o(r={},t("public/DraftStyleDefault/depth0"),0),o(r,t("public/DraftStyleDefault/depth1"),1),o(r,t("public/DraftStyleDefault/depth2"),2),o(r,t("public/DraftStyleDefault/depth3"),3),o(r,t("public/DraftStyleDefault/depth4"),4),r),R=b({b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE",mark:"HIGHLIGHT"}),L=function(){function e(e,t){o(this,"characterList",a()),o(this,"currentBlockType","unstyled"),o(this,"currentDepth",0),o(this,"currentEntity",null),o(this,"currentText",""),o(this,"wrapper",null),o(this,"blockConfigs",[]),o(this,"contentBlocks",[]),o(this,"entityMap",n),o(this,"blockTypeMap",void 0),o(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=e,this.disambiguate=t}var t=e.prototype;return t.clear=function(){this.characterList=a(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=n,this.wrapper=null,this.contentBlocks=[]},t.addDOMNode=function(e){var t;return this.contentBlocks=[],this.currentDepth=0,(t=this.blockConfigs).push.apply(t,this._toBlockConfigs([e],_())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},t.getContentBlocks=function(){return 0===this.contentBlocks.length&&(C?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},t._makeBlockConfig=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=i({key:e.key||g(),type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:a(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=a(),this.currentBlockType="unstyled",this.currentText="",e},t._toBlockConfigs=function(e,t){for(var n=[],r=0;r<e.length;r++){var o,i,a,s,c=e[r],u=c.nodeName.toLowerCase();"body"===u||l(u)?(this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig()),o=this.currentDepth,i=this.wrapper,l(u)&&(this.wrapper=u,l(i)&&this.currentDepth++),n.push.apply(n,this._toBlockConfigs(Array.from(c.childNodes),t)),this.currentDepth=o,this.wrapper=i):void 0===(o=this.blockTypeMap.get(u))?"#text"!==u?"br"!==u?!function(e){if(!E(e))return!1;return!(!e.attributes.getNamedItem("src")||!e.attributes.getNamedItem("src").value)}(c)?!function(e){if(!w(e))return!1;if(!e.href||"http:"!==e.protocol&&"https:"!==e.protocol&&"mailto:"!==e.protocol&&"tel:"!==e.protocol)return!1;try{new f(e.href);return!0}catch(e){return!1}}(c)?(i=t,i=function(e,t){if(!p(e))return t;var n=e.style.fontWeight,r=e.style.fontStyle,o=e.style.textDecoration;return t.withMutations(function(e){0<=I.indexOf(n)?e.add("BOLD"):0<=M.indexOf(n)&&e.remove("BOLD"),"italic"===r?e.add("ITALIC"):"normal"===r&&e.remove("ITALIC"),"underline"===o&&e.add("UNDERLINE"),"line-through"===o&&e.add("STRIKETHROUGH"),"none"===o&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))})}(c,i=R.has(u)?i.add(R.get(u)):i),null!=(a=function(e){if(p(e)&&e.style.fontFamily.includes("monospace"))return"CODE";return null}(c))&&(i=i.add(a)),n.push.apply(n,this._toBlockConfigs(Array.from(c.childNodes),i))):this._addAnchorNode(c,n,t):this._addImgNode(c,t):this._addBreakNode(c,t):this._addTextNode(c,t):(this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig()),a=this.currentDepth,s=this.wrapper,this.wrapper="pre"===u?"pre":this.wrapper,"string"!=typeof o&&(o=this.disambiguate(u,this.wrapper)||o[0]||"unstyled"),C||!p(c)||"unordered-list-item"!==o&&"ordered-list-item"!==o||(this.currentDepth=function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(P).some(function(e){t.classList.contains(e)&&(n=P[e])}),n}(c,this.currentDepth)),u=g(),c=this._toBlockConfigs(Array.from(c.childNodes),t),this._trimCurrentText(),n.push(this._makeBlockConfig({key:u,childConfigs:c,type:o})),this.currentDepth=a,this.wrapper=s)}return n},t._appendText=function(e,t){this.currentText+=e;var n,t=u.create({style:t,entity:this.currentEntity});this.characterList=(n=this.characterList).push.apply(n,Array(e.length).fill(t))},t._trimCurrentText=function(){var e=this.currentText.length,t=e-this.currentText.trimLeft().length,n=this.currentText.trimRight().length,r=this.characterList.findEntry(function(e){return null!==e.getEntity()}),t=void 0!==r?Math.min(t,r[0]):t;(n=void 0!==(r=this.characterList.reverse().findEntry(function(e){return null!==e.getEntity()}))?Math.max(n,e-r[0]):n)<t?(this.currentText="",this.characterList=a()):(this.currentText=this.currentText.slice(t,n),this.characterList=this.characterList.slice(t,n))},t._addTextNode=function(e,t){e=e.textContent;""===e.trim()&&"pre"!==this.wrapper&&(e=" "),"pre"!==this.wrapper&&(e=(e=e.replace(k,"")).replace(x," ")),this._appendText(e,t)},t._addBreakNode=function(e,t){S(e)&&this._appendText("\n",t)},t._addImgNode=function(e,t){var n,r;E(e)&&(n=e,r={},A.forEach(function(e){var t=n.getAttribute(e);t&&(r[e]=t)}),this.currentEntity=this.entityMap.__create("IMAGE","IMMUTABLE",r),v("draftjs_fix_paste_for_img")&&"presentation"===n.getAttribute("role")||this._appendText("📷",t),this.currentEntity=null)},t._addAnchorNode=function(e,t,n){var r,o;w(e)&&(r=e,o={},N.forEach(function(e){var t=r.getAttribute(e);t&&(o[e]=t)}),o.url=new f(r.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",o||{}),t.push.apply(t,this._toBlockConfigs(Array.from(e.childNodes),n)),this.currentEntity=null)},t._toContentBlocks=function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,n=e.length-1,r=0;r<=n;r++){var o=e[r];o.parent=t,o.prevSibling=0<r?e[r-1].key:null,o.nextSibling=r<n?e[r+1].key:null,o.children=a(o.childConfigs.map(function(e){return e.key})),this.contentBlocks.push(new h(i({},o))),this._toContentBlocks(o.childConfigs,o.key)}},t._hoistContainersInBlockConfigs=function(e){var t=this;return a(e).flatMap(function(e){return"unstyled"!==e.type||""!==e.text?[e]:t._hoistContainersInBlockConfigs(e.childConfigs)})},t._toFlatContentBlocks=function(e){var r=this;this._hoistContainersInBlockConfigs(e).forEach(function(e){var t=r._extractTextFromBlockConfigs(e.childConfigs),n=t.text,t=t.characterList;r.contentBlocks.push(new d(i({},e,{text:e.text+n,characterList:e.characterList.concat(t)})))})},t._extractTextFromBlockConfigs=function(e){for(var t=e.length-1,n="",r=a(),o=0;o<=t;o++){var i=e[o],i=(n+=i.text,r=r.concat(i.characterList),""!==n&&"unstyled"!==i.type&&(n+="\n",r=r.push(r.last())),this._extractTextFromBlockConfigs(i.childConfigs));n+=i.text,r=r.concat(i.characterList)}return{text:n,characterList:r}},e}();s.exports=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:m,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:y,t=t(e=e.trim().replace(O,"").replace(D," ").replace(T,"").replace(j,""));if(!t)return null;r={},n.mapKeys(function(t,e){var n=[e.element];void 0!==e.aliasedElements&&n.push.apply(n,e.aliasedElements),n.forEach(function(e){void 0===r[e]?r[e]=t:"string"==typeof r[e]?r[e]=[r[e],t]:r[e].push(t)})});var r,e=b(r);return new L(e,function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null}).addDOMNode(t).getContentBlocks()}},function(e,t,n){"use strict";var r=n(11),o=n(7),i=r.isBrowser("IE <= 9");e.exports=function(e){var t,n=null;return!i&&document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement||o(!1),t.documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}},function(e,t,n){"use strict";var c=n(9),u=n(8),s=n(183),l=n(10),o={currentBlockContainsLink:function(e){var t=e.getSelection(),e=e.getCurrentContent(),n=e.getEntityMap();return e.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some(function(e){e=e.getEntity();return!!e&&"LINK"===n.__get(e).getType()})},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t,n){switch(t){case"bold":return o.toggleInlineStyle(e,"BOLD");case"italic":return o.toggleInlineStyle(e,"ITALIC");case"underline":return o.toggleInlineStyle(e,"UNDERLINE");case"code":return o.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return o.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return o.onDelete(e);default:return null}},insertSoftNewline:function(e){var t=c.insertText(e.getCurrentContent(),e.getSelection(),"\n",e.getCurrentInlineStyle(),null),e=u.push(e,t,"insert-characters");return u.forceSelection(e,t.getSelectionAfter())},onBackspace:function(e){var t=e.getSelection();if(!t.isCollapsed()||t.getAnchorOffset()||t.getFocusOffset())return null;var n=e.getCurrentContent(),r=t.getStartKey(),r=n.getBlockBefore(r);if(r&&"atomic"===r.getType()){r=n.getBlockMap().delete(r.getKey()),r=n.merge({blockMap:r,selectionAfter:t});if(r!==n)return u.push(e,r,"remove-range")}t=o.tryToRemoveBlockStyle(e);return t?u.push(e,t,"change-block-type"):null},onDelete:function(e){var t=e.getSelection();if(!t.isCollapsed())return null;var n=e.getCurrentContent(),r=t.getStartKey(),o=n.getBlockForKey(r).getLength();if(t.getStartOffset()<o)return null;o=n.getBlockAfter(r);if(!o||"atomic"!==o.getType())return null;r=t.merge({focusKey:o.getKey(),focusOffset:o.getLength()}),t=c.removeRange(n,r,"forward");return t!==n?u.push(e,t,"remove-range"):null},onTab:function(e,t,n){var r=t.getSelection(),o=r.getAnchorKey();if(o!==r.getFocusKey())return t;var i=t.getCurrentContent(),o=i.getBlockForKey(o),a=o.getType();if("unordered-list-item"!==a&&"ordered-list-item"!==a)return t;e.preventDefault();a=o.getDepth();if(!e.shiftKey&&a===n)return t;o=s(i,r,e.shiftKey?-1:1,n);return u.push(t,o,"adjust-depth")},toggleBlockType:function(e,t){var n,r=e.getSelection(),o=r.getStartKey(),i=r.getEndKey(),a=e.getCurrentContent(),s=r;if(o!==i&&0===r.getEndOffset()&&(n=l(a.getBlockBefore(i)),i=n.getKey(),s=s.merge({anchorKey:o,anchorOffset:r.getStartOffset(),focusKey:i,focusOffset:n.getLength(),isBackward:!1})),a.getBlockMap().skipWhile(function(e,t){return t!==o}).reverse().skipWhile(function(e,t){return t!==i}).some(function(e){return"atomic"===e.getType()}))return e;r=a.getBlockForKey(o).getType()===t?"unstyled":t;return u.push(e,c.setBlockType(a,s,r),"change-block-type")},toggleCode:function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=t.getFocusKey();return t.isCollapsed()||n!==r?o.toggleBlockType(e,"code-block"):o.toggleInlineStyle(e,"CODE")},toggleInlineStyle:function(e,t){var n=e.getSelection(),r=e.getCurrentInlineStyle();if(n.isCollapsed())return u.setInlineStyleOverride(e,r.has(t)?r.remove(t):r.add(t));var o=e.getCurrentContent(),r=r.has(t)?c.removeInlineStyle(o,n,t):c.applyInlineStyle(o,n,t);return u.push(e,r,"change-inline-style")},toggleLink:function(e,t,n){t=c.applyEntity(e.getCurrentContent(),t,n);return u.push(e,t,"apply-entity")},tryToRemoveBlockStyle:function(e){var t=e.getSelection(),n=t.getAnchorOffset();if(t.isCollapsed()&&0===n){var n=t.getAnchorKey(),e=e.getCurrentContent(),r=e.getBlockForKey(n).getType(),n=e.getBlockBefore(n);if("code-block"===r&&n&&"code-block"===n.getType()&&0!==n.getLength())return null;if("unstyled"!==r)return c.setBlockType(e,t,"unstyled")}return null}};e.exports=o},function(e,u,t){"use strict";var n=t(48),r=t(35),t=t(11),o=t.isPlatform("Mac OS X"),i=o&&t.isBrowser("Firefox < 29"),a=n.hasCommandModifier,s=n.isCtrlKeyCommand;function c(e){return o&&e.altKey||s(e)}e.exports=function(e){switch(e.keyCode){case 66:return a(e)?"bold":null;case 68:return s(e)?"delete":null;case 72:return s(e)?"backspace":null;case 73:return a(e)?"italic":null;case 74:return a(e)?"code":null;case 75:return o&&s(e)?"secondary-cut":null;case 77:case 79:return s(e)?"split-block":null;case 84:return o&&s(e)?"transpose-characters":null;case 85:return a(e)?"underline":null;case 87:return o&&s(e)?"backspace-word":null;case 89:return s(e)?o?"secondary-paste":"redo":null;case 90:return(a(n=e)?n.shiftKey?"redo":"undo":null)||null;case r.RETURN:return"split-block";case r.DELETE:return n=e,!o&&n.shiftKey?null:c(n)?"delete-word":"delete";case r.BACKSPACE:return a(t=e)&&o?"backspace-to-start-of-line":c(t)?"backspace-word":"backspace";case r.LEFT:return i&&a(e)?"move-selection-to-start-of-block":null;case r.RIGHT:return i&&a(e)?"move-selection-to-end-of-block":null;default:return null}var t,n}},function(e,t,n){"use strict";e.exports={stringify:function(e){return"_"+String(e)},unstringify:function(e){return e.slice(1)}}},function(i,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e};function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=n(t(90)),c=n(t(215));function n(e){return e&&e.__esModule?e:{default:e}}function u(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function l(e,t,n){return a.default.ucs2.encode(e.slice(t,n))}function s(t,e){return e.forEach(function(e){t.push(e.offset),t.push(e.offset+e.length)}),t}f(o,[{key:"relevantStyles",value:function(t){return this.ranges.filter(function(e){return t>=e.offset&&t<e.offset+e.length}).map(function(e){return e.style})}},{key:"nodeIterator",value:function(o,e,i){var a=this,s=this.relevantIndexes.slice(this.relevantIndexes.indexOf(e),this.relevantIndexes.indexOf(i));return s.forEach(function(e,t){var n=a.relevantStyles(e),r=s[t+1]?s[t+1]-e:1,r=l(a.textArray,e,e+r);o.pushContent(r,n,a.flat),!s[t+1]&&e<i&&o.pushContent(l(a.textArray,e+1,i),a.relevantStyles(i-1),a.flat)}),o}},{key:"parse",value:function(e){var t=this,n=e.text,r=e.inlineStyleRanges,o=e.entityRanges,i=e.decoratorRanges,i=void 0===i?[]:i;this.textArray=a.default.ucs2.decode(n),this.ranges=r,this.iterator=0,this.relevantIndexes=function(e,t,n,r){var n=2<arguments.length&&void 0!==n?n:[],r=3<arguments.length&&void 0!==r?r:[],o=s(o=[],t);return o=s(o,n),(o=s(o,r)).push(0),o.push(e.length),o.filter(function(e,t,n){return n.indexOf(e)===t}).sort(function(e,t){return e-t})}(n,r,o,i);n=function(e,t,n,r){var t=1<arguments.length&&void 0!==t?t:[],o=n,i=r,a=0,n=[].concat(u(e),u(t)).sort(function(e,t){return e.offset-t.offset}),s=[];return n.length<1?s.push(new c.default({block:i,start:0,end:o.length})):(n.forEach(function(e){e.offset>a&&s.push(new c.default({block:i,start:a,end:e.offset})),s.push(new c.default({block:i,entity:e.key,decorator:e.component,decoratorProps:e.decoratorProps,decoratedText:e.component?l(o,e.offset,e.offset+e.length):void 0,start:e.offset,end:e.offset+e.length,contentState:e.contentState})),a=e.offset+e.length}),a<o.length&&s.push(new c.default({block:i,start:a,end:o.length}))),s}(o,i,this.textArray,e).map(function(e){return t.nodeIterator(e,e.start,e.end)});return new c.default({block:e,content:n})}}]);t=o;function o(e){e=e.flat,e=void 0!==e&&e;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");this.flat=e}e.default=t},function(e,y,O){!function(e,t){var n,g,m,v,i,a,r,s,c,u,o,b,_;/*! https://mths.be/punycode v1.4.1 by @mathias */function w(e){throw new RangeError(u[e])}function l(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function f(e,t){var n=e.split("@"),r="",n=(1<n.length&&(r=n[0]+"@",e=n[1]),(e=e.replace(c,".")).split("."));return r+l(n,t).join(".")}function S(e){for(var t,n,r=[],o=0,i=e.length;o<i;)55296<=(t=e.charCodeAt(o++))&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function h(e){return l(e,function(e){var t="";return 65535<e&&(t+=_((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=_(e)}).join("")}function E(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function C(e,t,n){var r=0;for(e=n?b(e/a):e>>1,e+=b(e/t);o*v>>1<e;r+=m)e=b(e/o);return b(r+(o+1)*e/(e+i))}function p(e){var t,n,r,l,o,i,a,s=[],f=e.length,c=0,p=128,d=72,u=e.lastIndexOf("-");for(u<0&&(u=0),n=0;n<u;++n)128<=e.charCodeAt(n)&&w("not-basic"),s.push(e.charCodeAt(n));for(r=0<u?u+1:0;r<f;){for(l=c,o=1,i=m;f<=r&&w("invalid-input"),a=e.charCodeAt(r++),(m<=(a=a-48<10?a-22:a-65<26?a-65:a-97<26?a-97:m)||a>b((g-c)/o))&&w("overflow"),c+=a*o,!(a<(a=i<=d?1:d+v<=i?v:i-d));i+=m)o>b(g/(a=m-a))&&w("overflow"),o*=a;d=C(c-l,t=s.length+1,0==l),b(c/t)>g-p&&w("overflow"),p+=b(c/t),c%=t,s.splice(c++,0,p)}return h(s)}function d(e){for(var t,n,l,r,o,f,i,p,a,d,s=[],h=(e=S(e)).length,c=128,y=72,u=t=0;u<h;++u)(i=e[u])<128&&s.push(_(i));for(n=l=s.length,l&&s.push("-");n<h;){for(r=g,u=0;u<h;++u)c<=(i=e[u])&&i<r&&(r=i);for(r-c>b((g-t)/(p=n+1))&&w("overflow"),t+=(r-c)*p,c=r,u=0;u<h;++u)if((i=e[u])<c&&++t>g&&w("overflow"),i==c){for(o=t,f=m;!(o<(a=f<=y?1:y+v<=f?v:f-y));f+=m)s.push(_(E(a+(d=o-a)%(a=m-a),0))),o=b(d/a);s.push(_(E(o,0))),y=C(t,p,n==l),t=0,++n}++t,++c}return s.join("")}y&&y.nodeType,e&&e.nodeType,(t="object"==typeof t&&t).global!==t&&t.window!==t&&t.self,g=2147483647,v=26,i=38,a=700,r=/^xn--/,s=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,u={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},o=(m=36)-1,b=Math.floor,_=String.fromCharCode,n={version:"1.4.1",ucs2:{decode:S,encode:h},decode:p,encode:d,toASCII:function(e){return f(e,function(e){return s.test(e)?"xn--"+d(e):e})},toUnicode:function(e){return f(e,function(e){return r.test(e)?p(e.slice(4).toLowerCase()):e})}},void 0===(t=function(){return n}.call(y,O,y,e))||(e.exports=t)}.call(this,O(214)(e),O(23))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});(function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)})(i,[{key:"getDecorations",value:function(t,n){var c=Array(t.getText().length).fill(null);return this.decorators.forEach(function(e,a){var s=0;(0,e.strategy)(t,function(e,t){if(function(e,t,n){for(var r=t;r<n;r++)if(null!=e[r])return;return 1}(c,e,t)){for(var n=c,r=t,o=a+"."+s,i=e;i<r;i++)n[i]=o;s++}},n)}),c}},{key:"getComponentForKey",value:function(e){e=parseInt(e.split(".")[0],10);return this.decorators[e].component}},{key:"getPropsForKey",value:function(e){e=parseInt(e.split(".")[0],10);return this.decorators[e].props}}]);var o=i;function i(e){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");this.decorators=e.slice()}t.default=o},function(e,t,n){e.exports=function(){"use strict";function o(e,t){if(e)for(var n in e)if({}.hasOwnProperty.call(e,n))t(n,e[n])}function t(e){if(e===undefined||e===null||e.length===0||e.trim().length===0)return true;return false}var n={unstyled:"p","header-one":"h1","header-two":"h2","header-three":"h3","header-four":"h4","header-five":"h5","header-six":"h6","unordered-list-item":"ul","ordered-list-item":"ol",blockquote:"blockquote",code:"pre"};function l(e){return e&&n[e]}function f(e){var n="";o(e,function(e,t){if(t)n+="".concat(e,":").concat(t,";")});return n}function i(e,t){var n=[];if(t){var r=0;var o=0;var i=e;var a=t.trigger||"#";var s=t.separator||" ";for(;i.length>0&&o>=0;){if(i[0]===a){o=0;r=0;i=i.substr(a.length)}else{o=i.indexOf(s+a);if(o>=0){i=i.substr(o+(s+a).length);r+=o+s.length}}if(o>=0){var c=i.indexOf(s)>=0?i.indexOf(s):i.length;var u=i.substr(0,c);if(u&&u.length>0)n.push({offset:r,length:u.length+a.length,type:"HASHTAG"});r+=a.length}}}return n}function u(e,t){var n=[];var r=0;var o=e.entityRanges.map(function(e){var t=e.offset,n=e.length,r=e.key;return{offset:t,length:n,key:r,type:"ENTITY"}});o=o.concat(i(e.text,t));o=o.sort(function(e,t){return e.offset-t.offset});o.forEach(function(e){if(e.offset>r)n.push({start:r,end:e.offset});n.push({start:e.offset,end:e.offset+e.length,entityKey:e.key,type:e.type});r=e.offset+e.length});if(r<e.text.length)n.push({start:r,end:e.text.length});return n}function h(e){if(e.entityRanges.length>0&&(t(e.text)||e.type==="atomic"))return true;return false}function y(e){var t=e.text,n=e.inlineStyleRanges;var o={BOLD:new Array(t.length),ITALIC:new Array(t.length),UNDERLINE:new Array(t.length),STRIKETHROUGH:new Array(t.length),CODE:new Array(t.length),SUPERSCRIPT:new Array(t.length),SUBSCRIPT:new Array(t.length),COLOR:new Array(t.length),BGCOLOR:new Array(t.length),FONTSIZE:new Array(t.length),FONTFAMILY:new Array(t.length),length:t.length};if(n&&n.length>0)n.forEach(function(e){var t=e.offset;var n=t+e.length;for(var r=t;r<n;r+=1)if(e.style.indexOf("color-")===0)o.COLOR[r]=e.style.substring(6);else if(e.style.indexOf("bgcolor-")===0)o.BGCOLOR[r]=e.style.substring(8);else if(e.style.indexOf("fontsize-")===0)o.FONTSIZE[r]=e.style.substring(9);else if(e.style.indexOf("fontfamily-")===0)o.FONTFAMILY[r]=e.style.substring(11);else if(o[e.style])o[e.style][r]=true});return o}function g(e,t){var n={};if(e.COLOR[t])n.COLOR=e.COLOR[t];if(e.BGCOLOR[t])n.BGCOLOR=e.BGCOLOR[t];if(e.FONTSIZE[t])n.FONTSIZE=e.FONTSIZE[t];if(e.FONTFAMILY[t])n.FONTFAMILY=e.FONTFAMILY[t];if(e.UNDERLINE[t])n.UNDERLINE=true;if(e.ITALIC[t])n.ITALIC=true;if(e.BOLD[t])n.BOLD=true;if(e.STRIKETHROUGH[t])n.STRIKETHROUGH=true;if(e.CODE[t])n.CODE=true;if(e.SUBSCRIPT[t])n.SUBSCRIPT=true;if(e.SUPERSCRIPT[t])n.SUPERSCRIPT=true;return n}function m(t,e,n){var r=true;if(n>0&&n<t.length)e.forEach(function(e){r=r&&t[e][n]===t[e][n-1]});else r=false;return r}function a(e,t){if(e==="BOLD")return"<strong>".concat(t,"</strong>");if(e==="ITALIC")return"<em>".concat(t,"</em>");if(e==="UNDERLINE")return"<ins>".concat(t,"</ins>");if(e==="STRIKETHROUGH")return"<del>".concat(t,"</del>");if(e==="CODE")return"<code>".concat(t,"</code>");if(e==="SUPERSCRIPT")return"<sup>".concat(t,"</sup>");if(e==="SUBSCRIPT")return"<sub>".concat(t,"</sub>");return t}function v(e){if(e&&e.length>0){var t=e.map(function(e){switch(e){case"\n":return"<br>";case"&":return"&";case"<":return"<";case">":return">";default:return e}});return t.join("")}return""}function b(e,t){if(e&&(e.COLOR||e.BGCOLOR||e.FONTSIZE||e.FONTFAMILY)){var n='style="';if(e.COLOR)n+="color: ".concat(e.COLOR,";");if(e.BGCOLOR)n+="background-color: ".concat(e.BGCOLOR,";");if(e.FONTSIZE)n+="font-size: ".concat(e.FONTSIZE).concat(/^\d+$/.test(e.FONTSIZE)?"px":"",";");if(e.FONTFAMILY)n+="font-family: ".concat(e.FONTFAMILY,";");n+='"';return"<span ".concat(n,">").concat(t,"</span>")}return t}function c(e,t,n,r){var o=e[t];if(typeof r==="function"){var i=r(o,n);if(i)return i}if(o.type==="MENTION")return'<a href="'.concat(o.data.url,'" class="wysiwyg-mention" data-mention data-value="').concat(o.data.value,'">').concat(n,"</a>");if(o.type==="LINK"){var a=o.data.targetOption||"_self";return'<a href="'.concat(o.data.url,'" target="').concat(a,'">').concat(n,"</a>")}if(o.type==="IMAGE"){var s=o.data.alignment;if(s&&s.length)return'<div style="text-align:'.concat(s,';"><img src="').concat(o.data.src,'" alt="').concat(o.data.alt,'" style="height: ').concat(o.data.height,";width: ").concat(o.data.width,'"/></div>');return'<img src="'.concat(o.data.src,'" alt="').concat(o.data.alt,'" style="height: ').concat(o.data.height,";width: ").concat(o.data.width,'"/>')}if(o.type==="EMBEDDED_LINK")return'<iframe width="'.concat(o.data.width,'" height="').concat(o.data.height,'" src="').concat(o.data.src,'" frameBorder="0"></iframe>');return n}function s(e,t,n,r){var o=[];var i=Array.from(e.text);if(i.length>0){var a=y(e);var s;for(var c=n;c<r;c+=1)if(c!==n&&m(a,t,c)){s.text.push(i[c]);s.end=c+1}else{s={styles:g(a,c),text:[i[c]],start:c,end:c+1};o.push(s)}}return o}function _(e){if(e){var t=e;for(var n=0;n<t.length;n+=1)if(e[n]===" ")t=t.replace(" "," ");else break;return t}return e}function w(e){if(e){var t=e;for(var n=t.length-1;n>=0;n-=1)if(t[n]===" ")t="".concat(t.substring(0,n)," ").concat(t.substring(n+1));else break;return t}return e}function S(e){var t=e.styles,n=e.text;var r=v(n);o(t,function(e,t){r=a(e,r)});return r}function E(e,t){var n=s(e,["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"],t.start,t.end);var r="";n.forEach(function(e){r+=S(e)});r=b(t.styles,r);return r}function C(t,e,n,r){var o=[];var i=s(t,["COLOR","BGCOLOR","FONTSIZE","FONTFAMILY"],n.start,n.end);i.forEach(function(e){o.push(E(t,e))});var a=o.join("");if(n.type==="ENTITY"){if(n.entityKey!==undefined&&n.entityKey!==null)a=c(e,n.entityKey,a,r)}else if(n.type==="HASHTAG")a='<a href="'.concat(a,'" class="wysiwyg-hashtag">').concat(a,"</a>");return a}function p(r,o,e,i){var a=[];var s=u(r,e);s.forEach(function(e,t){var n=C(r,o,e,i);if(t===0)n=_(n);if(t===s.length-1)n=w(n);a.push(n)});return a.join("")}function O(e,t,n,r,o){var i=[];if(h(e))i.push(c(t,e.entityRanges[0].key,undefined,o));else{var a=l(e.type);if(a){i.push("<".concat(a));var s=f(e.data);if(s)i.push(' style="'.concat(s,'"'));if(r)i.push(' dir = "auto"');i.push(">");i.push(p(e,t,n,o));i.push("</".concat(a,">"))}}i.push("\n");return i.join("")}function x(e){return e==="unordered-list-item"||e==="ordered-list-item"}function d(e,r,o,i,a){var s=[];var c=[];var u;e.forEach(function(e){var t=false;if(!u)s.push("<".concat(l(e.type),">\n"));else if(u.type!==e.type){s.push("</".concat(l(u.type),">\n"));s.push("<".concat(l(e.type),">\n"))}else if(u.depth===e.depth){if(c&&c.length>0){s.push(d(c,r,o,i,a));c=[]}}else{t=true;c.push(e)}if(!t){s.push("<li");var n=f(e.data);if(n)s.push(' style="'.concat(n,'"'));if(i)s.push(' dir = "auto"');s.push(">");s.push(p(e,r,o,a));s.push("</li>\n");u=e}});if(c&&c.length>0)s.push(d(c,r,o,i,a));s.push("</".concat(l(u.type),">\n"));return s.join("")}function e(e,r,o,i){var a=[];if(e){var t=e.blocks,s=e.entityMap;if(t&&t.length>0){var c=[];t.forEach(function(e){if(x(e.type))c.push(e);else{if(c.length>0){var t=d(c,s,r,i);a.push(t);c=[]}var n=O(e,s,r,o,i);a.push(n)}});if(c.length>0){var n=d(c,s,r,o,i);a.push(n);c=[]}}}return a.join("")}return e}()},function(e,t,r){"use strict";function o(n){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n}function s(e){return Object.prototype.toString.call(e)}function c(e){return"[object Function]"===s(e)}function p(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var i={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var d={"http:":{validate:function(e,t,n){e=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(e)?e.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),!n.re.no_http.test(r)||3<=t&&":"===e[t-3]||3<=t&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length}},"mailto:":{validate:function(e,t,n){e=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(e)?e.match(n.re.mailto)[0].length:0}}},h="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",y="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(){return function(e,t){t.normalize(e)}}function a(o){var t=o.re=r(204)(o.__opts__),e=o.__tlds__.slice();function n(e){return e.replace("%TLDS%",t.src_tlds)}o.onCompile(),o.__tlds_replaced__||e.push(h),e.push(t.src_xn),t.src_tlds=e.join("|"),t.email_fuzzy=RegExp(n(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(n(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(n(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(n(t.tpl_host_fuzzy_test),"i");var i=[];function a(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}o.__compiled__={},Object.keys(o.__schemas__).forEach(function(e){var t=o.__schemas__[e];if(null!==t){var n,r={validate:null,link:null};if(o.__compiled__[e]=r,"[object Object]"===s(t))return"[object RegExp]"===s(t.validate)?r.validate=(n=t.validate,function(e,t){e=e.slice(t);return n.test(e)?e.match(n)[0].length:0}):c(t.validate)?r.validate=t.validate:a(e,t),void(c(t.normalize)?r.normalize=t.normalize:t.normalize?a(e,t):r.normalize=u());"[object String]"!==s(t)?a(e,t):i.push(e)}}),i.forEach(function(e){o.__compiled__[o.__schemas__[e]]&&(o.__compiled__[e].validate=o.__compiled__[o.__schemas__[e]].validate,o.__compiled__[e].normalize=o.__compiled__[o.__schemas__[e]].normalize)}),o.__compiled__[""]={validate:null,normalize:u()};var e=Object.keys(o.__compiled__).filter(function(e){return 0<e.length&&o.__compiled__[e]}).map(p).join("|");o.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+e+")","i"),o.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+e+")","ig"),o.re.pretest=RegExp("("+o.re.schema_test.source+")|("+o.re.host_fuzzy_test.source+")|@","i"),(e=o).__index__=-1,e.__text_cache__=""}function n(e,t){var n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function l(e,t){t=new n(e,t);return e.__compiled__[t.schema].normalize(t,e),t}function f(e,t){if(!(this instanceof f))return new f(e,t);var n;t||(n=e,Object.keys(n||{}).reduce(function(e,t){return e||i.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=o({},i,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=o({},d,e),this.__compiled__={},this.__tlds__=y,this.__tlds_replaced__=!1,this.re={},a(this)}f.prototype.add=function(e,t){return this.__schemas__[e]=t,a(this),this},f.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},f.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,o,i,a,s;if(this.re.schema_test.test(e))for((a=this.re.schema_search).lastIndex=0;null!==(t=a.exec(e));)if(o=this.testSchemaAt(e,t[2],a.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(s=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||s<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&0<=e.indexOf("@")&&null!==(r=e.match(this.re.email_fuzzy))&&(i=r.index+r[1].length,s=r.index+r[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=s)),0<=this.__index__},f.prototype.pretest=function(e){return this.re.pretest.test(e)},f.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},f.prototype.match=function(e){for(var t=0,n=[],r=(0<=this.__index__&&this.__text_cache__===e&&(n.push(l(this,t)),t=this.__last_index__),t?e.slice(t):e);this.test(r);)n.push(l(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},f.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),a(this),this},f.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},f.prototype.onCompile=function(){},e.exports=f},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports=n(231)},function(e,r,t){"use strict";function a(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}var d=t(25),h=t(12),o=t(18),i=t(13),s=t(9),c=t(8),u=t(14),y=t(16),n=t(6),l=t(118),f=y("draft_tree_data_support"),p=f?i:o,g=n.List,m=n.Repeat;e.exports={insertAtomicBlock:function(e,t,n){var r=e.getCurrentContent(),o=e.getSelection(),r=s.removeRange(r,o,"backward"),i=r.getSelectionAfter(),r=s.splitBlock(r,i),i=r.getSelectionAfter(),r=s.setBlockType(r,i,"atomic"),t=h.create({entity:t}),t={key:u(),type:"atomic",text:n,characterList:g(m(t,n.length))},n={key:u(),type:"unstyled"},t=(f&&(t=a({},t,{nextSibling:n.key}),n=a({},n,{prevSibling:t.key})),[new p(t),new p(n)]),n=d.createFromArray(t),t=s.replaceWithFragment(r,i,n),r=t.merge({selectionBefore:o,selectionAfter:t.getSelectionAfter().set("hasFocus",!0)});return c.push(e,r,"insert-fragment")},moveAtomicBlock:function(e,t,n,r){var o,i=e.getCurrentContent(),a=e.getSelection(),i=(r="before"===r||"after"===r?(o=i.getBlockForKey("before"===r?n.getStartKey():n.getEndKey()),l(i,t,o,r)):(r=(o=s.removeRange(i,n,"backward")).getSelectionAfter(),i=o.getBlockForKey(r.getFocusKey()),0===r.getStartOffset()?l(o,t,i,"before"):r.getEndOffset()===i.getLength()?l(o,t,i,"after"):(i=(n=s.splitBlock(o,r)).getSelectionAfter(),o=n.getBlockForKey(i.getFocusKey()),l(n,t,o,"before")))).merge({selectionBefore:a,selectionAfter:r.getSelectionAfter().set("hasFocus",!0)});return c.push(e,i,"move-block")}}},function(e,t,n){"use strict";var p=n(12),o=n(6).Map;function r(e,t,a,s){var n=e.getBlockMap(),c=t.getStartKey(),u=t.getStartOffset(),l=t.getEndKey(),f=t.getEndOffset(),r=n.skipUntil(function(e,t){return t===c}).takeUntil(function(e,t){return t===l}).concat(o([[l,n.get(l)]])).map(function(e,t){for(var n,r,o=c===l?(n=u,f):(n=t===c?u:0,t===l?f:e.getLength()),i=e.getCharacterList();n<o;)r=i.get(n),i=i.set(n,s?p.applyStyle(r,a):p.removeStyle(r,a)),n++;return e.set("characterList",i)});return e.merge({blockMap:n.merge(r),selectionBefore:t,selectionAfter:t})}e.exports={add:function(e,t,n){return r(e,t,n,!0)},remove:function(e,t,n){return r(e,t,n,!1)}}},function(e,t,n){"use strict";var u=n(106),l=n(6);e.exports=function(e,t,r){var n=e.getBlockMap(),o=t.getStartKey(),i=t.getStartOffset(),a=t.getEndKey(),s=t.getEndOffset(),c=n.skipUntil(function(e,t){return t===o}).takeUntil(function(e,t){return t===a}).toOrderedMap().merge(l.OrderedMap([[a,n.get(a)]])).map(function(e,t){var n=t===o?i:0,t=t===a?s:e.getLength();return u(e,n,t,r)});return e.merge({blockMap:n.merge(c),selectionBefore:t,selectionAfter:t})}},function(e,t,n){"use strict";var a=n(12);e.exports=function(e,t,n,r){for(var o=t,i=e.getCharacterList();o<n;)i=i.set(o,a.applyEntity(i.get(o),r)),o++;return e.set("characterList",i)}},function(e,t,n){"use strict";var l=n(108),f=n(109),p=n(7);function u(e,t,n,r,o,i,a){var s=n.getStartOffset(),c=n.getEndOffset(),e=e.__get(o).getMutability(),u=a?s:c;if("MUTABLE"===e)return n;o=f(t,o).filter(function(e){return u<=e.end&&u>=e.start}),1!=o.length&&p(!1),o=o[0];if("IMMUTABLE"===e)return n.merge({anchorOffset:o.start,focusOffset:o.end,isBackward:!1});i||(a?c=o.end:s=o.start);e=l.getRemovalRange(s,c,t.getText().slice(o.start,o.end),o.start,r);return n.merge({anchorOffset:e.start,focusOffset:e.end,isBackward:!1})}e.exports=function(e,t,n,r,o){var i,a,s=r.getStartOffset(),c=r.getEndOffset(),s=t.getEntityAt(s),c=n.getEntityAt(c-1);return(s||c)&&(s&&s===c?r=u(e,t,r,o,s,!0,!0):s&&c?(i=u(e,t,r,o,s,!1,!0),a=u(e,n,r,o,c,!1,!1),r=r.merge({anchorOffset:i.getAnchorOffset(),focusOffset:a.getFocusOffset(),isBackward:!1})):s?(i=u(e,t,r,o,s,!1,!0),r=r.merge({anchorOffset:i.getStartOffset(),isBackward:!1})):c&&(a=u(e,n,r,o,c,!1,!1),r=r.merge({focusOffset:a.getEndOffset(),isBackward:!1}))),r}},function(e,t,n){"use strict";e.exports={getRemovalRange:function(l,f,e,t,n){for(var r,o=(o=e.split(" ")).map(function(e,t){if("forward"===n){if(0<t)return" "+e}else if(t<o.length-1)return e+" ";return e}),i=t,a=null,s=null,c=0;c<o.length;c++){if(l<(r=i+o[c].length)&&i<f)s=(null!==a||(a=i),r);else if(null!==a)break;i=r}var e=t+e.length,u=a===t,p=s===e;return(!u&&p||u&&!p)&&("forward"===n?s!==e&&s++:a!==t&&a--),{start:a,end:s}}}},function(e,t,n){"use strict";var r=n(7);e.exports=function(e,t){var n=[];return e.findEntityRanges(function(e){return e.getEntity()===t},function(e,t){n.push({start:e,end:t})}),n.length||r(!1),n}},function(e,r,t){"use strict";var y=t(25),g=t(13),n=t(6),m=t(53),v=t(7),b=t(51),l=n.List,_=function(e,t,n){var r=e.getText(),o=e.getCharacterList(),r=r.slice(0,t),o=o.slice(0,t),t=n.first();return e.merge({text:r+t.getText(),characterList:o.concat(t.getCharacterList()),type:(r?e:t).getType(),data:t.getData()})},w=function(e,t,n){var r=e.getText(),e=e.getCharacterList(),o=r.length,r=r.slice(t,o),e=e.slice(t,o),t=n.last();return t.merge({text:t.getText()+r,characterList:t.getCharacterList().concat(e),data:t.getData()})},S=function(s,e,c,u){return s.withMutations(function(t){var e=c.getKey(),n=u.getKey(),r=c.getNextSiblingKey(),o=c.getParentKey(),i=function(e,t){var n=e.getKey(),r=e,o=[];for(t.get(n)&&o.push(n);r&&r.getNextSiblingKey();){var i=r.getNextSiblingKey();if(!i)break;o.push(i),r=t.get(i)}return o}(u,s),a=i[i.length-1];t.get(n)?(t.setIn([e,"nextSibling"],n),t.setIn([n,"prevSibling"],e)):(t.setIn([e,"nextSibling"],u.getNextSiblingKey()),t.setIn([u.getNextSiblingKey(),"prevSibling"],e)),t.setIn([a,"nextSibling"],r),r&&t.setIn([r,"prevSibling"],a),i.forEach(function(e){return t.setIn([e,"parent"],o)}),o&&(r=(n=s.get(o).getChildKeys()).indexOf(e)+1,(a=n.toArray()).splice.apply(a,[r,0].concat(i)),t.setIn([o,"children"],l(a)))})};e.exports=function(e,t,n){var r,l,f,o,p,d,i,a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",s=(t.isCollapsed()||v(!1),e.getBlockMap()),n=b(n),c=t.getStartKey(),u=t.getStartOffset(),h=s.get(c);return h instanceof g&&(h.getChildKeys().isEmpty()||v(!1)),1===n.size?function(u,e,t,n,r,o){var i=6<arguments.length&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",a=t.get(r),s=a.getText(),l=a.getCharacterList(),f=r,p=o+n.getText().length,c=null;switch(i){case"MERGE_OLD_DATA_TO_NEW_DATA":c=n.getData().merge(a.getData());break;case"REPLACE_WITH_NEW_DATA":c=n.getData()}i=a.getType(),s&&"unstyled"===i&&(i=n.getType()),s=a.merge({text:s.slice(0,o)+n.getText()+s.slice(o),characterList:m(l,n.getCharacterList(),o),type:i,data:c});return u.merge({blockMap:t.set(r,s),selectionBefore:e,selectionAfter:e.merge({anchorKey:f,anchorOffset:p,focusKey:f,focusOffset:p,isBackward:!1})})}(e,t,s,n.first(),c,u,a):(h=e,a=t,r=n,l=c,f=u,t=(e=s).first()instanceof g,o=[],p=r.size,n=e.get(l),c=r.first(),u=r.last(),s=u.getLength(),u=u.getKey(),d=t&&(!n.getChildKeys().isEmpty()||!c.getChildKeys().isEmpty()),e.forEach(function(e,t){t===l?(d?o.push(e):o.push(_(e,f,r)),r.slice(d?0:1,p-1).forEach(function(e){return o.push(e)}),o.push(w(e,f,r))):o.push(e)}),i=y.createFromArray(o),t&&(i=S(i,e,n,c)),h.merge({blockMap:i,selectionBefore:a,selectionAfter:a.merge({anchorKey:u,anchorOffset:s,focusKey:u,focusOffset:s,isBackward:!1})}))}},function(e,t,n){"use strict";var r=n(6),l=n(53),f=n(7),p=r.Repeat;e.exports=function(e,t,n,r){t.isCollapsed()||f(!1);var o=null;if(null==(o=null!=n?n.length:o)||0===o)return e;var i=e.getBlockMap(),a=t.getStartKey(),s=t.getStartOffset(),c=i.get(a),u=c.getText(),n=c.merge({text:u.slice(0,s)+n+u.slice(s,c.getLength()),characterList:l(c.getCharacterList(),p(r,o).toList(),s)}),u=s+o;return e.merge({blockMap:i.set(a,n),selectionAfter:t.merge({anchorOffset:u,focusOffset:u})})}},function(e,n,t){"use strict";function v(e,t,n){if(0===t)for(;t<n;)e=e.shift(),t++;else if(n===e.count())for(;t<n;)e=e.pop(),n--;else{var r=e.slice(0,t),o=e.slice(n);e=r.concat(o).toList()}return e}var b=t(13),_=t(55),t=t(6),w=(t.List,t.Map),S=function(e,t,n){var r;!e||(r=t.get(e))&&t.set(e,n(r))},E=function(e,t){var n=[];if(!e)return n;for(var r=t.get(e);r&&r.getParentKey();){var o=r.getParentKey();o&&n.push(o),r=o?t.get(o):null}return n},x=function(e,t){var n=[];if(!e)return n;for(var r=_(e,t);r&&t.get(r);){var o=t.get(r);n.push(r),r=o.getParentKey()?_(o,t):null}return n},C=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getNextSiblingKey();r&&!t.get(r);)r=n.get(r).getNextSiblingKey()||null;return r},O=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getPrevSiblingKey();r&&!t.get(r);)r=n.get(r).getPrevSiblingKey()||null;return r};e.exports=function(l,e){if(e.isCollapsed())return l;var f,i,a,s,t=l.getBlockMap(),n=e.getStartKey(),p=e.getStartOffset(),d=e.getEndKey(),h=e.getEndOffset(),r=t.get(n),o=t.get(d),y=r instanceof b,c=[],g=(y&&(u=o.getChildKeys(),m=E(d,t),o.getNextSiblingKey()&&(c=c.concat(m)),c=(c=u.isEmpty()?c:c.concat(m.concat([d]))).concat(E(_(o,t),t))),u=r===o?v(r.getCharacterList(),p,h):r.getCharacterList().slice(0,p).concat(o.getCharacterList().slice(h)),r.merge({text:r.getText().slice(0,p)+o.getText().slice(h),characterList:u})),m=y&&0===p&&0===h&&o.getParentKey()===n&&null==o.getPrevSiblingKey()?w([[n,null]]):t.toSeq().skipUntil(function(e,t){return t===n}).takeUntil(function(e,t){return t===d}).filter(function(e,t){return-1===c.indexOf(t)}).concat(w([[d,null]])).map(function(e,t){return t===n?g:null}),u=t.merge(m).filter(function(e){return!!e});return y&&r!==o&&(i=r,a=o,s=t,u=(f=u).withMutations(function(t){var n,e,r,o;S(i.getKey(),t,function(e){return e.merge({nextSibling:C(e,t,s),prevSibling:O(e,t,s)})}),S(a.getKey(),t,function(e){return e.merge({nextSibling:C(e,t,s),prevSibling:O(e,t,s)})}),E(i.getKey(),s).forEach(function(e){return S(e,t,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return t.get(e)}),nextSibling:C(e,t,s),prevSibling:O(e,t,s)})})}),S(i.getNextSiblingKey(),t,function(e){return e.merge({prevSibling:i.getPrevSiblingKey()})}),S(i.getPrevSiblingKey(),t,function(e){return e.merge({nextSibling:C(e,t,s)})}),S(a.getNextSiblingKey(),t,function(e){return e.merge({prevSibling:O(e,t,s)})}),S(a.getPrevSiblingKey(),t,function(e){return e.merge({nextSibling:a.getNextSiblingKey()})}),E(a.getKey(),s).forEach(function(e){S(e,t,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return t.get(e)}),nextSibling:C(e,t,s),prevSibling:O(e,t,s)})})}),x(a,s).forEach(function(e){return S(e,t,function(e){return e.merge({nextSibling:C(e,t,s),prevSibling:O(e,t,s)})})}),null==f.get(i.getKey())&&null!=f.get(a.getKey())&&a.getParentKey()===i.getKey()&&null==a.getPrevSiblingKey()&&(n=i.getPrevSiblingKey(),S(a.getKey(),t,function(e){return e.merge({prevSibling:n})}),S(n,t,function(e){return e.merge({nextSibling:a.getKey()})}),e=n?f.get(n):null,r=e?e.getParentKey():null,i.getChildKeys().forEach(function(e){S(e,t,function(e){return e.merge({parent:r})})}),null!=r&&(o=f.get(r),S(r,t,function(e){return e.merge({children:o.getChildKeys().concat(i.getChildKeys())})})),S(i.getChildKeys().find(function(e){return null===f.get(e).getNextSiblingKey()}),t,function(e){return e.merge({nextSibling:i.getNextSiblingKey()})}))})),l.merge({blockMap:u,selectionBefore:e,selectionAfter:e.merge({anchorKey:n,anchorOffset:p,focusKey:n,focusOffset:p,isBackward:!1})})}},function(e,r,t){"use strict";var d=t(13),h=t(14),n=t(6),y=t(7),g=t(54),m=n.List,v=n.Map,b=function(e,t,n){var r;!e||(r=t.get(e))&&t.set(e,n(r))};e.exports=function(e,t){t.isCollapsed()||y(!1);var l=t.getAnchorKey(),n=e.getBlockMap(),r=n.get(l),o=r.getText();if(!o){var i=r.getType();if("unordered-list-item"===i||"ordered-list-item"===i)return g(e,t,function(e){return e.merge({type:"unstyled",depth:0})})}var a,f,i=t.getAnchorOffset(),s=r.getCharacterList(),c=h(),p=r instanceof d,u=r.merge({text:o.slice(0,i),characterList:s.slice(0,i)}),o=u.merge({key:c,text:o.slice(i),characterList:s.slice(i),data:v()}),s=n.toSeq().takeUntil(function(e){return e===r}),i=n.toSeq().skipUntil(function(e){return e===r}).rest(),n=s.concat([[l,u],[c,o]],i).toOrderedMap();return p&&(r.getChildKeys().isEmpty()||y(!1),a=u,f=o,n=n.withMutations(function(e){var r=a.getKey(),o=f.getKey();b(a.getParentKey(),e,function(e){var t=e.getChildKeys(),n=t.indexOf(r)+1,t=t.toArray();return t.splice(n,0,o),e.merge({children:m(t)})}),b(a.getNextSiblingKey(),e,function(e){return e.merge({prevSibling:o})}),b(r,e,function(e){return e.merge({nextSibling:o})}),b(o,e,function(e){return e.merge({prevSibling:r})})})),e.merge({blockMap:n,selectionBefore:t,selectionAfter:t.merge({anchorKey:c,anchorOffset:0,focusKey:c,focusOffset:0,isBackward:!1})})}},function(e,o,t){"use strict";function n(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}function s(){return!0}var c=t(26),r=t(56),t=t(6),u=t.List,d=t.Repeat,t=t.Record,l=t({start:null,end:null}),f=t({start:null,end:null,decoratorKey:null,leaves:null});function p(e,t){return e===t}e.exports={generate:function(e,t,n){var r=t.getLength();if(!r)return u.of(new f({start:0,end:0,decoratorKey:null,leaves:u.of(new l({start:0,end:0}))}));var o=[],i=n?n.getDecorations(t,e):u(d(null,r)),a=t.getCharacterList();return c(i,p,s,function(e,t){var n,r;o.push(new f({start:e,end:t,decoratorKey:i.get(e),leaves:(t=a.slice(e,t).toList(),n=e,r=[],t=t.map(function(e){return e.getStyle()}).toList(),c(t,p,s,function(e,t){r.push(new l({start:e+n,end:t+n}))}),u(r))}))}),u(o)},fromJS:function(e){var t=e.leaves,e=function(e,t){if(null==e)return{};for(var n,r={},o=Object.keys(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||(r[n]=e[n]);return r}(e,["leaves"]);return new f(n({},e,{leaves:null!=t?u(Array.isArray(t)?t:r(t)).map(function(e){return l(e)}):null}))}}},function(e,t,n){"use strict";e.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}},function(e,t,n){"use strict";var r,o=n(117),i=n(6),a=n(10),s=i.OrderedMap;e.exports={getDirectionMap:function(e,t){r?r.reset():r=new o;var e=e.getBlockMap(),n=e.valueSeq().map(function(e){return a(r).getDirection(e.getText())}),e=s(e.keySeq().zip(n));return null!=t&&i.is(t,e)?t:e}}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(41),i=n(32),a=n(7),n=function(){function e(e){r(this,"_defaultDir",void 0),r(this,"_lastDir",void 0),e?i.isStrong(e)||a(!1):e=i.getGlobalDir(),this._defaultDir=e,this.reset()}var t=e.prototype;return t.reset=function(){this._lastDir=this._defaultDir},t.getDirection=function(e){return this._lastDir=o.getDirection(e,this._lastDir),this._lastDir},e}();e.exports=n},function(e,r,t){"use strict";var d=t(13),h=t(55),n=t(6),y=t(7),g=n.OrderedMap,m=n.List,v=function(e,t,n){var r;!e||(r=t.get(e))&&t.set(e,n(r))};e.exports=function(e,n,t,r){"replace"===r&&y(!1);var o,i=t.getKey(),a=n.getKey(),s=(a===i&&y(!1),e.getBlockMap()),l=n instanceof d,c=[n],u=s.delete(a),s=(l&&(c=[],u=s.withMutations(function(t){var o=n.getNextSiblingKey(),i=h(n,t);t.toSeq().skipUntil(function(e){return e.getKey()===a}).takeWhile(function(e){var t=e.getKey(),n=t===a,r=o&&t!==o,e=!o&&e.getParentKey()&&(!i||t!==i);return!!(n||r||e)}).forEach(function(e){c.push(e),t.delete(e.getKey())})})),u.toSeq().takeUntil(function(e){return e===t})),u=u.toSeq().skipUntil(function(e){return e===t}).skip(1),f=c.map(function(e){return[e.getKey(),e]}),p=g();return"before"===r?((o=e.getBlockBefore(i))&&o.getKey()===n.getKey()&&y(!1),p=s.concat([].concat(f,[[i,t]]),u).toOrderedMap()):"after"===r&&((o=e.getBlockAfter(i))&&o.getKey()===a&&y(!1),p=s.concat([[i,t]].concat(f),u).toOrderedMap()),e.merge({blockMap:function(e,t,n,l,f){if(!f)return e;var r="after"===l,o=t.getKey(),i=n.getKey(),p=t.getParentKey(),a=t.getNextSiblingKey(),s=t.getPrevSiblingKey(),c=n.getParentKey(),u=r?n.getNextSiblingKey():i,d=r?i:n.getPrevSiblingKey();return e.withMutations(function(e){v(p,e,function(e){var t=e.getChildKeys();return e.merge({children:t.delete(t.indexOf(o))})}),v(s,e,function(e){return e.merge({nextSibling:a})}),v(a,e,function(e){return e.merge({prevSibling:s})}),v(u,e,function(e){return e.merge({prevSibling:o})}),v(d,e,function(e){return e.merge({nextSibling:o})}),v(c,e,function(e){var t=e.getChildKeys(),n=t.indexOf(i),n=r?n+1:0!==n?n-1:0,t=t.toArray();return t.splice(n,0,o),e.merge({children:m(t)})}),v(o,e,function(e){return e.merge({nextSibling:u,prevSibling:d,parent:c})})})}(p,n,t,r,l),selectionBefore:e.getSelectionAfter(),selectionAfter:e.getSelectionAfter().merge({anchorKey:a,focusKey:a})})}},function(e,t,n){"use strict";var r=n(6).List,n=function(){function e(e){var t,n,r;r=void 0,(n="_decorators")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this._decorators=e.slice()}var t=e.prototype;return t.getDecorations=function(t,n){var c=Array(t.getText().length).fill(null);return this._decorators.forEach(function(e,a){var s=0;(0,e.strategy)(t,function(e,t){if(function(e,t,n){for(var r=t;r<n;r++)if(null!=e[r])return!1;return!0}(c,e,t)){for(var n=c,r=t,o=a+"."+s,i=e;i<r;i++)n[i]=o;s++}},n)}),r(c)},t.getComponentForKey=function(e){e=parseInt(e.split(".")[0],10);return this._decorators[e].component},t.getPropsForKey=function(e){e=parseInt(e.split(".")[0],10);return this._decorators[e].props},e}();e.exports=n},function(A,e,P){"use strict";!function(c){var t=P(17);function p(){return(p=t||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);(r="function"==typeof Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})):r).forEach(function(e){o(t,e,n[e])})}return t}function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}var n=P(42),g=P(59),u=P(121),m=P(129),l=P(146),f=P(149),a=P(185),v=P(186),b=P(71),_=P(8),h=P(0),w=P(45),S=P(36),e=P(11),y=P(19),E=P(14),C=P(87),O=P(37),x=P(16),s=P(7),k=P(27),D=P(10),T=e.isBrowser("IE"),j=!T,I={edit:f,composite:u,drag:l,cut:null,render:null},M=!1,N=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.render=function(){return null},n.componentDidMount=function(){this._update()},n.componentDidUpdate=function(){this._update()},n._update=function(){var e=this.props.editor;e._latestEditorState=this.props.editorState,e._blockSelectEvents=!0},t}(h.Component),e=function(t){function e(e){var a=t.call(this,e)||this;return o(r(a),"_blockSelectEvents",void 0),o(r(a),"_clipboard",void 0),o(r(a),"_handler",void 0),o(r(a),"_dragCount",void 0),o(r(a),"_internalDrag",void 0),o(r(a),"_editorKey",void 0),o(r(a),"_placeholderAccessibilityID",void 0),o(r(a),"_latestEditorState",void 0),o(r(a),"_latestCommittedEditorState",void 0),o(r(a),"_pendingStateFromBeforeInput",void 0),o(r(a),"_onBeforeInput",void 0),o(r(a),"_onBlur",void 0),o(r(a),"_onCharacterData",void 0),o(r(a),"_onCompositionEnd",void 0),o(r(a),"_onCompositionStart",void 0),o(r(a),"_onCopy",void 0),o(r(a),"_onCut",void 0),o(r(a),"_onDragEnd",void 0),o(r(a),"_onDragOver",void 0),o(r(a),"_onDragStart",void 0),o(r(a),"_onDrop",void 0),o(r(a),"_onInput",void 0),o(r(a),"_onFocus",void 0),o(r(a),"_onKeyDown",void 0),o(r(a),"_onKeyPress",void 0),o(r(a),"_onKeyUp",void 0),o(r(a),"_onMouseDown",void 0),o(r(a),"_onMouseUp",void 0),o(r(a),"_onPaste",void 0),o(r(a),"_onSelect",void 0),o(r(a),"editor",void 0),o(r(a),"editorContainer",void 0),o(r(a),"focus",void 0),o(r(a),"blur",void 0),o(r(a),"setMode",void 0),o(r(a),"exitCurrentMode",void 0),o(r(a),"restoreEditorDOM",void 0),o(r(a),"setClipboard",void 0),o(r(a),"getClipboard",void 0),o(r(a),"getEditorKey",void 0),o(r(a),"update",void 0),o(r(a),"onDragEnter",void 0),o(r(a),"onDragLeave",void 0),o(r(a),"_handleEditorContainerRef",function(e){a.editorContainer=e,a.editor=null!==e?e.firstChild:null}),o(r(a),"focus",function(e){var t,n,r=a.props.editorState,o=r.getSelection().getHasFocus(),i=a.editor;i&&(t=S.getScrollParent(i),n=(e=e||O(t)).x,e=e.y,k(i)||s(!1),i.focus(),t===window?window.scrollTo(n,e):w.setTop(t,e),o||a.update(_.forceSelection(r,r.getSelection())))}),o(r(a),"blur",function(){var e=a.editor;e&&(k(e)||s(!1),e.blur())}),o(r(a),"setMode",function(e){var t=a.props,n=t.onPaste,r=t.onCut,t=t.onCopy,o=d({},I.edit),n=(n&&(o.onPaste=n),r&&(o.onCut=r),t&&(o.onCopy=t),d({},I,{edit:o}));a._handler=n[e]}),o(r(a),"exitCurrentMode",function(){a.setMode("edit")}),o(r(a),"restoreEditorDOM",function(e){a.setState({contentsKey:a.state.contentsKey+1},function(){a.focus(e)})}),o(r(a),"setClipboard",function(e){a._clipboard=e}),o(r(a),"getClipboard",function(){return a._clipboard}),o(r(a),"update",function(e){a._latestEditorState=e,a.props.onChange(e)}),o(r(a),"onDragEnter",function(){a._dragCount++}),o(r(a),"onDragLeave",function(){a._dragCount--,0===a._dragCount&&a.exitCurrentMode()}),a._blockSelectEvents=!1,a._clipboard=null,a._handler=null,a._dragCount=0,a._editorKey=e.editorKey||E(),a._placeholderAccessibilityID="placeholder-"+a._editorKey,a._latestEditorState=e.editorState,a._latestCommittedEditorState=e.editorState,a._onBeforeInput=a._buildHandler("onBeforeInput"),a._onBlur=a._buildHandler("onBlur"),a._onCharacterData=a._buildHandler("onCharacterData"),a._onCompositionEnd=a._buildHandler("onCompositionEnd"),a._onCompositionStart=a._buildHandler("onCompositionStart"),a._onCopy=a._buildHandler("onCopy"),a._onCut=a._buildHandler("onCut"),a._onDragEnd=a._buildHandler("onDragEnd"),a._onDragOver=a._buildHandler("onDragOver"),a._onDragStart=a._buildHandler("onDragStart"),a._onDrop=a._buildHandler("onDrop"),a._onInput=a._buildHandler("onInput"),a._onFocus=a._buildHandler("onFocus"),a._onKeyDown=a._buildHandler("onKeyDown"),a._onKeyPress=a._buildHandler("onKeyPress"),a._onKeyUp=a._buildHandler("onKeyUp"),a._onMouseDown=a._buildHandler("onMouseDown"),a._onMouseUp=a._buildHandler("onMouseUp"),a._onPaste=a._buildHandler("onPaste"),a._onSelect=a._buildHandler("onSelect"),a.getEditorKey=function(){return a._editorKey},a.state={contentsKey:0},a}i(e,t);var n=e.prototype;return n._buildHandler=function(n){var r=this;return function(e){var t;r.props.readOnly||(t=r._handler&&r._handler[n])&&(a?a(function(){return t(r,e)}):t(r,e))}},n._showPlaceholder=function(){return!!this.props.placeholder&&!this.props.editorState.isInCompositionMode()&&!this.props.editorState.getCurrentContent().hasText()},n._renderPlaceholder=function(){var e;return this._showPlaceholder()?(e={text:D(this.props.placeholder),editorState:this.props.editorState,textAlignment:this.props.textAlignment,accessibilityID:this._placeholderAccessibilityID},h.createElement(v,e)):null},n._renderARIADescribedBy=function(){var e=this.props.ariaDescribedBy||"",t=this._showPlaceholder()?this._placeholderAccessibilityID:"";return e.replace("{{editor_id_placeholder}}",t)||void 0},n.render=function(){var e=this.props,t=e.blockRenderMap,n=e.blockRendererFn,r=e.blockStyleFn,o=e.customStyleFn,i=e.customStyleMap,a=e.editorState,l=e.preventScroll,s=e.readOnly,c=e.textAlignment,e=e.textDirectionality,c=y({"DraftEditor/root":!0,"DraftEditor/alignLeft":"left"===c,"DraftEditor/alignRight":"right"===c,"DraftEditor/alignCenter":"center"===c}),u=this.props.role||"textbox",f="combobox"===u?!!this.props.ariaExpanded:null,t={blockRenderMap:t,blockRendererFn:n,blockStyleFn:r,customStyleMap:d({},g,i),customStyleFn:o,editorKey:this._editorKey,editorState:a,preventScroll:l,textDirectionality:e};return h.createElement("div",{className:c},this._renderPlaceholder(),h.createElement("div",{className:y("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},h.createElement("div",{"aria-activedescendant":s?null:this.props.ariaActiveDescendantID,"aria-autocomplete":s?null:this.props.ariaAutoComplete,"aria-controls":s?null:this.props.ariaControls,"aria-describedby":this._renderARIADescribedBy(),"aria-expanded":s?null:f,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-multiline":this.props.ariaMultiline,"aria-owns":s?null:this.props.ariaOwneeID,autoCapitalize:this.props.autoCapitalize,autoComplete:this.props.autoComplete,autoCorrect:this.props.autoCorrect,className:y({notranslate:!s,"public/DraftEditor/content":!0}),contentEditable:!s,"data-testid":this.props.webDriverTestID,onBeforeInput:this._onBeforeInput,onBlur:this._onBlur,onCompositionEnd:this._onCompositionEnd,onCompositionStart:this._onCompositionStart,onCopy:this._onCopy,onCut:this._onCut,onDragEnd:this._onDragEnd,onDragEnter:this.onDragEnter,onDragLeave:this.onDragLeave,onDragOver:this._onDragOver,onDragStart:this._onDragStart,onDrop:this._onDrop,onFocus:this._onFocus,onInput:this._onInput,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onMouseUp:this._onMouseUp,onPaste:this._onPaste,onSelect:this._onSelect,ref:this.props.editorRef,role:s?null:u,spellCheck:j&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},h.createElement(N,{editor:this,editorState:a}),h.createElement(m,p({},t,{key:"contents"+this.state.contentsKey})))))},n.componentDidMount=function(){this._blockSelectEvents=!1,!M&&x("draft_ods_enabled")&&(M=!0,b.initODS()),this.setMode("edit"),T&&(this.editor?this.editor.ownerDocument:c).execCommand("AutoUrlDetect",!1,!1)},n.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestEditorState=this.props.editorState,this._latestCommittedEditorState=this.props.editorState},e}(h.Component);o(e,"defaultProps",{ariaDescribedBy:"{{editor_id_placeholder}}",blockRenderMap:n,blockRendererFn:function(){return null},blockStyleFn:function(){return""},keyBindingFn:C,readOnly:!1,spellCheck:!1,stripPastedStyles:!1}),A.exports=e}.call(this,P(23))},function(e,a,t){"use strict";var n=t(122),f=t(9),p=t(15),s=t(8),r=t(35),d=t(11),h=t(62),o=t(64),y=t(65),g=t(43),m=t(10),v=d.isBrowser("IE"),c=!1,u=!1,l=null;var i={onCompositionStart:function(e){u=!0,e=e,l||(l=new n(o(e))).start()},onCompositionEnd:function(e){u=c=!1,setTimeout(function(){c||i.resolveComposition(e)},20)},onSelect:h,onKeyDown:function(e,t){if(!u)return i.resolveComposition(e),void e._onKeyDown(t);t.which!==r.RIGHT&&t.which!==r.LEFT||t.preventDefault()},onKeyPress:function(e,t){t.which===r.RETURN&&t.preventDefault()},resolveComposition:function(e){var i,a,t;u||(t=m(l).stopAndFlushMutations(),c=!(l=null),i=s.set(e._latestEditorState,{inCompositionMode:!1}),e.exitCurrentMode(),t.size?(a=i.getCurrentContent(),t.forEach(function(e,t){var t=p.decode(t),n=t.blockKey,r=t.decoratorKey,t=t.leafKey,r=i.getBlockTree(n).getIn([r,"leaves",t]),t=r.start,r=r.end,r=i.getSelection().merge({anchorKey:n,focusKey:n,anchorOffset:t,focusOffset:r,isBackward:!1}),o=g(a,r),n=a.getBlockForKey(n).getInlineStyleAt(t);a=f.replaceText(a,r,e,n,o),i=s.set(i,{currentContent:a})}),t=y(i,o(e)).selectionState,e.restoreEditorDOM(),t=v?s.forceSelection(i,t):s.acceptSelection(i,t),e.update(s.push(t,a,"insert-characters"))):e.update(i))}};e.exports=i},function(e,l,t){"use strict";function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var r=t(11),o=t(33),i=t(61),a=t(6),s=t(7),f=t(10),c=a.Map,p={subtree:!0,characterData:!0,childList:!0,characterDataOldValue:!1,attributes:!1},u=r.isBrowser("IE <= 11");e.exports=function(){function e(e){var t=this,e=(n(this,"observer",void 0),n(this,"container",void 0),n(this,"mutations",void 0),n(this,"onCharData",void 0),this.container=e,this.mutations=c(),i(e));e.MutationObserver&&!u?this.observer=new e.MutationObserver(function(e){return t.registerMutations(e)}):this.onCharData=function(e){e.target instanceof Node||s(!1),t.registerMutation({type:"characterData",target:e.target})}}var t=e.prototype;return t.start=function(){this.observer?this.observer.observe(this.container,p):this.container.addEventListener("DOMCharacterDataModified",this.onCharData)},t.stopAndFlushMutations=function(){var e=this.observer,e=(e?(this.registerMutations(e.takeRecords()),e.disconnect()):this.container.removeEventListener("DOMCharacterDataModified",this.onCharData),this.mutations);return this.mutations=c(),e},t.registerMutations=function(e){for(var t=0;t<e.length;t++)this.registerMutation(e[t])},t.getMutationTextContent=function(e){var t=e.type,n=e.target,e=e.removedNodes;if("characterData"===t){if(""!==n.textContent)return u?n.textContent.replace("\n",""):n.textContent}else if("childList"===t){if(e&&e.length)return"";if(""!==n.textContent)return n.textContent}return null},t.registerMutation=function(e){var t=this.getMutationTextContent(e);null!=t&&(e=f(o(e.target)),this.mutations=this.mutations.set(e,t))},e}()},function(e,t,n){"use strict";var n=n(124),r="Unknown",o={"Mac OS":"Mac OS X"};var n=(new n).getResult(),i=(i=n.browser.version)?{major:(i=i.split("."))[0],minor:i[1]}:{major:"",minor:""},o={browserArchitecture:n.cpu.architecture||r,browserFullVersion:n.browser.version||r,browserMinorVersion:i.minor||r,browserName:n.browser.name||r,browserVersion:n.browser.major||r,deviceName:n.device.model||r,engineName:n.engine.name||r,engineVersion:n.engine.version||r,platformArchitecture:n.cpu.architecture||r,platformName:(i=n.os.name,o[i]||i||r),platformVersion:n.os.version||r,platformFullVersion:n.os.version||r};e.exports=o},function(F,B,z){var K;!function(u,f){"use strict";function l(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}function p(e,t){return typeof e===w&&-1!==A(t).indexOf(A(e))}function d(e,t){if(typeof e===w)return e=e.replace(/^\s\s*/,m).replace(/\s\s*$/,m),typeof t==b?e:e.substring(0,255)}function h(l,e){for(var t,n,r,o,i,a=0;a<e.length&&!o;){for(var s=e[a],c=e[a+1],u=t=0;u<s.length&&!o;)if(o=s[u++].exec(l))for(n=0;n<c.length;n++)i=o[++t],typeof(r=c[n])===_&&0<r.length?2===r.length?typeof r[1]==v?this[r[0]]=r[1].call(this,i):this[r[0]]=r[1]:3===r.length?typeof r[1]!==v||r[1].exec&&r[1].test?this[r[0]]=i?i.replace(r[1],r[2]):f:this[r[0]]=i?r[1].call(this,i,r[2]):f:4===r.length&&(this[r[0]]=i?r[3].call(this,i.replace(r[1],r[2])):f):this[r]=i||f;a+=2}}function y(e,t){for(var n in t)if(typeof t[n]===_&&0<t[n].length){for(var r=0;r<t[n].length;r++)if(p(t[n][r],e))return"?"===n?f:n}else if(p(t[n],e))return"?"===n?f:n;return e}function o(e,t){if(typeof e===_&&(t=e,e=f),!(this instanceof o))return new o(e,t).getResult();var n=e||(typeof u!=b&&u.navigator&&u.navigator.userAgent?u.navigator.userAgent:m),r=t?function(e,t){var n,r={};for(n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}(R,t):R;return this.getBrowser=function(){var e,t={};return t.name=f,t[s]=f,h.call(t,n,r.browser),t.major=typeof(e=t.version)===w?e.replace(/[^\d\.]/g,m).split(".")[0]:f,t},this.getCPU=function(){var e={};return e[c]=f,h.call(e,n,r.cpu),e},this.getDevice=function(){var e={};return e[a]=f,e[i]=f,e.type=f,h.call(e,n,r.device),e},this.getEngine=function(){var e={};return e.name=f,e[s]=f,h.call(e,n,r.engine),e},this.getOS=function(){var e={};return e.name=f,e[s]=f,h.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===w&&255<e.length?d(e,255):e,this},this.setUA(n),this}var g,m="",v="function",b="undefined",_="object",w="string",i="model",e="name",t="type",a="vendor",s="version",c="architecture",S="console",n="mobile",r="tablet",E="smarttv",C="wearable",O="Amazon",x="BlackBerry",k="Browser",D="Chrome",T="Firefox",j="Google",I="Microsoft",M="Opera",N="Samsung",A=function(e){return e.toLowerCase()},P={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},R={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[s,[e,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[s,[e,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[e,s],[/opios[\/ ]+([\w\.]+)/i],[s,[e,M+" Mini"]],[/\bopr\/([\w\.]+)/i],[s,[e,M]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[e,s],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[s,[e,"UC"+k]],[/\bqbcore\/([\w\.]+)/i],[s,[e,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[s,[e,"WeChat"]],[/konqueror\/([\w\.]+)/i],[s,[e,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[s,[e,"IE"]],[/yabrowser\/([\w\.]+)/i],[s,[e,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[e,/(.+)/,"$1 Secure "+k],s],[/\bfocus\/([\w\.]+)/i],[s,[e,T+" Focus"]],[/\bopt\/([\w\.]+)/i],[s,[e,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[s,[e,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[s,[e,"Dolphin"]],[/coast\/([\w\.]+)/i],[s,[e,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[s,[e,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[s,[e,T]],[/\bqihu|(qi?ho?o?|360)browser/i],[[e,"360 "+k]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[e,/(.+)/,"$1 "+k],s],[/(comodo_dragon)\/([\w\.]+)/i],[[e,/_/g," "],s],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[e,s],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[e],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[e,"Facebook"],s],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[e,s],[/\bgsa\/([\w\.]+) .*safari\//i],[s,[e,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[s,[e,D+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[e,D+" WebView"],s],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[s,[e,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[e,s],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[s,[e,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[s,e],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[e,[s,y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[e,s],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[e,"Netscape"],s],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[s,[e,T+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[e,s]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[c,"amd64"]],[/(ia32(?=;))/i],[[c,A]],[/((?:i[346]|x)86)[;\)]/i],[[c,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[c,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[c,"armhf"]],[/windows (ce|mobile); ppc;/i],[[c,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[c,/ower/,m,A]],[/(sun4\w)[;\)]/i],[[c,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[c,A]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[i,[a,N],[t,r]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[i,[a,N],[t,n]],[/\((ip(?:hone|od)[\w ]*);/i],[i,[a,"Apple"],[t,n]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[i,[a,"Apple"],[t,r]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[i,[a,"Huawei"],[t,r]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[i,[a,"Huawei"],[t,n]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[i,/_/g," "],[a,"Xiaomi"],[t,n]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[i,/_/g," "],[a,"Xiaomi"],[t,r]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[i,[a,"OPPO"],[t,n]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[i,[a,"Vivo"],[t,n]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[i,[a,"Realme"],[t,n]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[i,[a,"Motorola"],[t,n]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[i,[a,"Motorola"],[t,r]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[i,[a,"LG"],[t,r]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[i,[a,"LG"],[t,n]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[i,[a,"Lenovo"],[t,r]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[i,/_/g," "],[a,"Nokia"],[t,n]],[/(pixel c)\b/i],[i,[a,j],[t,r]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[i,[a,j],[t,n]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[i,[a,"Sony"],[t,n]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[i,"Xperia Tablet"],[a,"Sony"],[t,r]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[i,[a,"OnePlus"],[t,n]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[i,[a,O],[t,r]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[i,/(.+)/g,"Fire Phone $1"],[a,O],[t,n]],[/(playbook);[-\w\),; ]+(rim)/i],[i,a,[t,r]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[i,[a,x],[t,n]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[i,[a,"ASUS"],[t,r]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[i,[a,"ASUS"],[t,n]],[/(nexus 9)/i],[i,[a,"HTC"],[t,r]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[a,[i,/_/g," "],[t,n]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[i,[a,"Acer"],[t,r]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[i,[a,"Meizu"],[t,n]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[i,[a,"Sharp"],[t,n]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[a,i,[t,n]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[a,i,[t,r]],[/(surface duo)/i],[i,[a,I],[t,r]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[i,[a,"Fairphone"],[t,n]],[/(u304aa)/i],[i,[a,"AT&T"],[t,n]],[/\bsie-(\w*)/i],[i,[a,"Siemens"],[t,n]],[/\b(rct\w+) b/i],[i,[a,"RCA"],[t,r]],[/\b(venue[\d ]{2,7}) b/i],[i,[a,"Dell"],[t,r]],[/\b(q(?:mv|ta)\w+) b/i],[i,[a,"Verizon"],[t,r]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[i,[a,"Barnes & Noble"],[t,r]],[/\b(tm\d{3}\w+) b/i],[i,[a,"NuVision"],[t,r]],[/\b(k88) b/i],[i,[a,"ZTE"],[t,r]],[/\b(nx\d{3}j) b/i],[i,[a,"ZTE"],[t,n]],[/\b(gen\d{3}) b.+49h/i],[i,[a,"Swiss"],[t,n]],[/\b(zur\d{3}) b/i],[i,[a,"Swiss"],[t,r]],[/\b((zeki)?tb.*\b) b/i],[i,[a,"Zeki"],[t,r]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[a,"Dragon Touch"],i,[t,r]],[/\b(ns-?\w{0,9}) b/i],[i,[a,"Insignia"],[t,r]],[/\b((nxa|next)-?\w{0,9}) b/i],[i,[a,"NextBook"],[t,r]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[a,"Voice"],i,[t,n]],[/\b(lvtel\-)?(v1[12]) b/i],[[a,"LvTel"],i,[t,n]],[/\b(ph-1) /i],[i,[a,"Essential"],[t,n]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[i,[a,"Envizen"],[t,r]],[/\b(trio[-\w\. ]+) b/i],[i,[a,"MachSpeed"],[t,r]],[/\btu_(1491) b/i],[i,[a,"Rotor"],[t,r]],[/(shield[\w ]+) b/i],[i,[a,"Nvidia"],[t,r]],[/(sprint) (\w+)/i],[a,i,[t,n]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[a,I],[t,n]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[i,[a,"Zebra"],[t,r]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[i,[a,"Zebra"],[t,n]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[a,i,[t,S]],[/droid.+; (shield) bui/i],[i,[a,"Nvidia"],[t,S]],[/(playstation [345portablevi]+)/i],[i,[a,"Sony"],[t,S]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[i,[a,I],[t,S]],[/smart-tv.+(samsung)/i],[a,[t,E]],[/hbbtv.+maple;(\d+)/i],[[i,/^/,"SmartTV"],[a,N],[t,E]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[a,"LG"],[t,E]],[/(apple) ?tv/i],[a,[i,"Apple TV"],[t,E]],[/crkey/i],[[i,D+"cast"],[a,j],[t,E]],[/droid.+aft(\w)( bui|\))/i],[i,[a,O],[t,E]],[/\(dtv[\);].+(aquos)/i],[i,[a,"Sharp"],[t,E]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[a,d],[i,d],[t,E]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[t,E]],[/((pebble))app/i],[a,i,[t,C]],[/droid.+; (glass) \d/i],[i,[a,j],[t,C]],[/droid.+; (wt63?0{2,3})\)/i],[i,[a,"Zebra"],[t,C]],[/(quest( 2)?)/i],[i,[a,"Facebook"],[t,C]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[a,[t,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[i,[t,n]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[i,[t,r]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[t,r]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[t,n]],[/(android[-\w\. ]{0,9});.+buil/i],[i,[a,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[s,[e,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[s,[e,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[e,s],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[s,e]],os:[[/microsoft (windows) (vista|xp)/i],[e,s],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[e,[s,y,P]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[e,"Windows"],[s,y,P]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[s,/_/g,"."],[e,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[e,"Mac OS"],[s,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[s,e],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[e,s],[/\(bb(10);/i],[s,[e,x]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[s,[e,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[s,[e,T+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[s,[e,"webOS"]],[/crkey\/([\d\.]+)/i],[s,[e,D+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[e,"Chromium OS"],s],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[e,s],[/(sunos) ?([\w\.\d]*)/i],[[e,"Solaris"],s],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[e,s]]},L=(o.VERSION="0.7.31",o.BROWSER=l([e,s,"major"]),o.CPU=l([c]),o.DEVICE=l([i,a,t,S,n,E,r,C,"embedded"]),o.ENGINE=o.OS=l([e,s]),typeof B!=b?(B=typeof F!=b&&F.exports?F.exports=o:B).UAParser=o:"function"===v&&z(125)?(K=function(){return o}.call(B,z,B,F))===f||(F.exports=K):typeof u!=b&&(u.UAParser=o),typeof u!=b&&(u.jQuery||u.Zepto));L&&!L.ua&&(g=new o,L.ua=g.getResult(),L.ua.get=function(){return g.getUA()},L.ua.set=function(e){g.setUA(e);var t,n=g.getResult();for(t in n)L.ua[t]=n[t]})}("object"==typeof window?window:this)},function(t,e){!function(e){t.exports=e}.call(this,{})},function(e,t,n){"use strict";var o=n(7),u=/\./,s=/\|\|/,c=/\s+\-\s+/,r=/^(<=|<|=|>=|~>|~|>|)?\s*(.+)/,l=/^(\d*)(.*)/;function g(e,t){var n,r=e.split(s);return 1<r.length?r.some(function(e){return b.contains(e,t)}):(r=e=r[0].trim(),e=t,0<(r=r.split(c)).length&&r.length<=2||o(!1),1===r.length?i(r[0],e):(n=r[0],r=r[1],a(n)&&a(r)||o(!1),i(">="+n,e)&&i("<="+r,e)))}function i(e,t){if(""===(e=e.trim()))return!0;var n=t.split(u),t=d(e),e=t.modifier,r=t.rangeComponents;switch(e){case"<":return f(n,r);case"<=":var o=n;return-1===(o=y(o,r))||0===o;case">=":return p(n,r);case">":return 1===y(n,r);case"~":case"~>":var o=n,i=r,a=i.slice(),s=(1<(i=i.slice()).length&&i.pop(),i.length-1),c=parseInt(i[s],10);return h(c)&&(i[s]=c+1+""),p(o,a)&&f(o,i);default:return 0===y(n,r)}}function f(e,t){return-1===y(e,t)}function p(e,t){e=y(e,t);return 1===e||0===e}function d(e){var e=e.split(u),t=e[0].match(r);return t||o(!1),{modifier:t[1],rangeComponents:[t[2]].concat(e.slice(1))}}function h(e){return!isNaN(e)&&isFinite(e)}function a(e){return!d(e).modifier}function m(e,t){for(var n=e.length;n<t;n++)e[n]="0"}function v(e,t){return typeof e!=typeof t&&o(!1),t<e?1:e<t?-1:0}function y(e,t){for(var n,r,o,e=function(e,t){m(e=e.slice(),(t=t.slice()).length);for(var n=0;n<t.length;n++){var r=t[n].match(/^[x*]$/i);if(r&&(t[n]=e[n]="0","*"===r[0]&&n===t.length-1))for(var o=n;o<e.length;o++)e[o]="0"}return m(t,e.length),[e,t]}(e,t),i=e[0],a=e[1],s=0;s<a.length;s++){n=i[s],r=a[s],o=c=o=c=void 0,c=n.match(l)[1],o=r.match(l)[1],c=parseInt(c,10),o=parseInt(o,10);var c=h(c)&&h(o)&&c!==o?v(c,o):v(n,r);if(c)return c}return 0}var b={contains:function(e,t){return g(e.trim(),t.trim())}};e.exports=b},function(e,t,n){"use strict";var i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){if(!e)return null;var r,o={};for(r in e)i.call(e,r)&&(o[r]=t.call(n,e[r],r,e));return o}},function(e,t,n){"use strict";e.exports=function(t){var n={};return function(e){return n.hasOwnProperty(e)||(n[e]=t.call(this,e)),n[e]}}},function(e,t,n){"use strict";var r=n(16)("draft_tree_data_support");e.exports=n(r?130:144)},function(e,t,n){"use strict";var r=n(17);function C(){return(C=r||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var O=n(131),x=n(15),k=n(0),D=n(10),n=function(e){var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.shouldComponentUpdate=function(e){var t=this.props.editorState,e=e.editorState;if(t.getDirectionMap()!==e.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==e.getSelection().getHasFocus())return!0;var n=e.getNativelyRenderedContent(),r=t.isInCompositionMode(),o=e.isInCompositionMode();if(t===e||null!==n&&e.getCurrentContent()===n||r&&o)return!1;var n=t.getCurrentContent(),i=e.getCurrentContent(),t=t.getDecorator(),a=e.getDecorator();return r!==o||n!==i||t!==a||e.mustForceSelection()},r.render=function(){for(var e=this.props,t=e.blockRenderMap,l=e.blockRendererFn,f=e.blockStyleFn,p=e.customStyleMap,d=e.customStyleFn,n=e.editorState,h=e.editorKey,y=e.textDirectionality,r=n.getCurrentContent(),g=n.getSelection(),m=n.mustForceSelection(),v=n.getDecorator(),b=D(n.getDirectionMap()),o=[],i=r.getBlocksAsArray()[0];i;)var a=i.getKey(),s={blockRenderMap:t,blockRendererFn:l,blockStyleFn:f,contentState:r,customStyleFn:d,customStyleMap:p,decorator:v,editorKey:h,editorState:n,forceSelection:m,selection:g,block:i,direction:y||b.get(a),tree:n.getBlockTree(a)},_=(t.get(i.getType())||t.get("unstyled")).wrapper,s=(o.push({block:k.createElement(O,C({key:a},s)),wrapperTemplate:_,key:a,offsetKey:x.encode(a,0,0)}),i.getNextSiblingKey()),i=s?r.getBlockForKey(s):null;for(var w=[],c=0;c<o.length;){var u=o[c];if(u.wrapperTemplate){for(var S=[];S.push(o[c].block),++c<o.length&&o[c].wrapperTemplate===u.wrapperTemplate;);var E=k.cloneElement(u.wrapperTemplate,{key:u.key+"-wrap","data-offset-key":u.offsetKey},S);w.push(E)}else w.push(u.block),c++}return k.createElement("div",{"data-contents":"true"},w)},n}(k.Component);e.exports=n},function(t,n,e){"use strict";var r=e(17);function d(){return(d=r||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function E(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);(r="function"==typeof Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})):r).forEach(function(e){i(t,e,n[e])})}return t}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t}function C(e,t){var n=(e=t.get(e.getType())||t.get("unstyled")).wrapper;return{Element:e.element||t.get("unstyled").element,wrapperTemplate:n}}function O(e,t){return(t=t(e))?{CustomComponent:t.component,customProps:t.props,customEditable:t.editable}:{}}function x(e,t,n,r,o,i){return t={"data-block":!0,"data-editor":t,"data-offset-key":n,key:e.getKey(),ref:i},(n=r(e))&&(t.className=n),t=void 0!==o.customEditable?E({},t,{contentEditable:o.customEditable,suppressContentEditableWarning:!0}):t}var T=e(132),k=e(15),D=e(0),a=e(45),s=e(36),c=e(73),u=e(37),l=e(74),o=e(6),f=e(7),p=e(27),e=(o.List,function(o){var e;function S(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e=o.call.apply(o,[this].concat(n))||this),"wrapperRef",D.createRef()),e}e=o,(t=S).prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e;var t=S.prototype;return t.shouldComponentUpdate=function(e){var t=this.props,n=t.block,r=t.direction,t=t.tree,o=!n.getChildKeys().isEmpty(),n=n!==e.block||t!==e.tree||r!==e.direction||h(e.selection,e.block.getKey())&&e.forceSelection;return o||n},t.componentDidMount=function(){var e,t,n=this.props.selection,r=n.getEndKey();!n.getHasFocus()||r!==this.props.block.getKey()||(n=this.wrapperRef.current)&&(r=s.getScrollParent(n),e=u(r),r===window?0<(t=(t=c(n)).y+t.height-l().height)&&window.scrollTo(e.x,e.y+t+10):(p(n)||f(!1),0<(t=n.offsetHeight+n.offsetTop-(r.offsetHeight+e.y))&&a.setTop(r,a.getTop(r)+t+10)))},t.render=function(){var v=this,e=this.props,t=e.block,y=e.blockRenderMap,g=e.blockRendererFn,b=e.blockStyleFn,m=e.contentState,s=e.decorator,_=e.editorKey,w=e.editorState,n=e.customStyleFn,c=e.customStyleMap,u=e.direction,l=e.forceSelection,f=e.selection,e=e.tree,r=null,o=(t.children.size&&(r=t.children.reduce(function(e,t){var n=k.encode(t,0,0),r=m.getBlockForKey(t),o=O(r,g),l=o.CustomComponent||S,i=C(r,y),f=i.Element,i=i.wrapperTemplate,a=x(r,_,n,b,o,null),t=E({},v.props,{tree:w.getBlockTree(t),blockProps:o.customProps,offsetKey:n,block:r});if(e.push(D.createElement(f,a,D.createElement(l,t))),!i||(o=m,!!(a=(n=r).getNextSiblingKey())&&o.getBlockForKey(a).getType()===n.getType()))return e;var l=i,p=f,t=e,s=[],c=!0,r=!1,o=void 0;try{for(var d,u=t.reverse()[Symbol.iterator]();!(c=(d=u.next()).done);c=!0){var h=d.value;if(h.type!==p)break;s.push(h)}}catch(e){r=!0,o=e}finally{try{c||null==u.return||u.return()}finally{if(r)throw o}}return t.splice(t.indexOf(s[0]),s.length+1),r=s.reverse(),o=r[0].key,t.push(D.cloneElement(l,{key:"".concat(o,"-wrap"),"data-offset-key":k.encode(o,0,0)},r)),e},[])),t.getKey()),p=k.encode(o,0,0),i=O(t,g),a=i.CustomComponent,a=null!=a?D.createElement(a,d({},this.props,{tree:w.getBlockTree(o),blockProps:i.customProps,offsetKey:p,block:t})):D.createElement(T,{block:t,children:r,contentState:m,customStyleFn:n,customStyleMap:c,decorator:s,direction:u,forceSelection:l,hasSelection:h(f,o),selection:f,tree:e});if(t.getParentKey())return a;r=C(t,y).Element,n=x(t,_,p,b,i,this.wrapperRef);return D.createElement(r,n,a)},S}(D.Component));t.exports=e},function(e,t,n){"use strict";var m=n(133),v=n(69),b=n(15),r=n(6),_=n(0),o=n(19),n=(r.List,function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),(t.prototype.constructor=t).__proto__=n,r.prototype.render=function(){var e=this.props,s=e.block,n=e.contentState,c=e.customStyleFn,u=e.customStyleMap,r=e.decorator,l=e.direction,f=e.forceSelection,h=e.hasSelection,y=e.selection,e=e.tree,p=s.getKey(),d=s.getText(),g=e.size-1,e=this.props.children||e.map(function(e,o){var i=e.get("decoratorKey"),t=e.get("leaves"),a=t.size-1,t=t.map(function(e,t){var n=b.encode(p,o,t),r=e.get("start"),e=e.get("end");return _.createElement(v,{key:n,offsetKey:n,block:s,start:r,selection:h?y:null,forceSelection:f,text:d.slice(r,e),styleSet:s.getInlineStyleAt(r),customStyleMap:u,customStyleFn:c,isLast:i===g&&t===a})}).toArray();return i&&r?_.createElement(m,{block:s,children:t,contentState:n,decorator:r,decoratorKey:i,direction:l,leafSet:e,text:d,key:o}):t}).toArray();return _.createElement("div",{"data-offset-key":b.encode(p,0,0),className:o({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===l,"public/DraftStyleDefault/rtl":"RTL"===l})},e)},r}(_.Component));e.exports=n},function(e,t,n){"use strict";var r=n(17);function f(){return(f=r||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var p=n(15),d=n(0),h=n(41),y=n(32),n=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),(t.prototype.constructor=t).__proto__=n,r.prototype.render=function(){var e=this.props,t=e.block,n=e.children,r=e.contentState,o=e.decorator,i=e.decoratorKey,a=e.direction,s=e.leafSet,e=e.text,c=t.getKey(),u=s.get("leaves"),l=o.getComponentForKey(i),o=o.getPropsForKey(i),c=p.encode(c,parseInt(i,10),0),i=e.slice(u.first().get("start"),u.last().get("end")),e=y.getHTMLDirIfDifferent(h.getDirection(i),a);return d.createElement(l,f({},o,{contentState:r,decoratedText:i,dir:e,key:c,entityKey:t.getEntityAt(s.get("start")),offsetKey:c}),n)},r}(d.Component);e.exports=n},function(e,r,t){"use strict";function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=t(0),n=t(11),s=t(7),c=t(20),u=n.isBrowser("IE <= 11");t=function(t){var e;function n(e){e=t.call(this,e)||this;return i(o(e),"_forceFlag",void 0),i(o(e),"_node",void 0),e._forceFlag=!1,e}e=t,(r=n).prototype=Object.create(e.prototype),(r.prototype.constructor=r).__proto__=e;var r=n.prototype;return r.shouldComponentUpdate=function(e){var t=this._node,n=""===e.children;c(t)||s(!1);return n?(n=t,!(u?"\n"===n.textContent:"BR"===n.tagName)):t.textContent!==e.children},r.componentDidMount=function(){this._forceFlag=!this._forceFlag},r.componentDidUpdate=function(){this._forceFlag=!this._forceFlag},r.render=function(){var e,t=this;return""===this.props.children?this._forceFlag?(e=function(e){return t._node=e},u?a.createElement("span",{key:"A","data-text":"true",ref:e},"\n"):a.createElement("br",{key:"A","data-text":"true",ref:e})):(e=function(e){return t._node=e},u?a.createElement("span",{key:"B","data-text":"true",ref:e},"\n"):a.createElement("br",{key:"B","data-text":"true",ref:e})):a.createElement("span",{key:this._forceFlag?"A":"B","data-text":"true",ref:function(e){return t._node=e}},this.props.children)},n}(a.Component);e.exports=t},function(e,n,t){"use strict";var i=t(71),s=t(63),r=t(11),d=t(44),l=t(72),h=t(34),a=t(7),o=t(20),f=r.isBrowser("IE");function p(e,t){if(!e)return"[empty]";e=function e(t,n){var r=void 0!==n?n(t):[];{var o;if(t.nodeType===Node.TEXT_NODE)return o=t.textContent.length,h(t).createTextNode("[text "+o+(r.length?" | "+r.join(", "):"")+"]")}var i=t.cloneNode();1===i.nodeType&&r.length&&i.setAttribute("data-labels",r.join(", "));var a=t.childNodes;for(var s=0;s<a.length;s++)i.appendChild(e(a[s],n));return i}(e,t);return e.nodeType===Node.TEXT_NODE?e.textContent:(o(e)||a(!1),e.outerHTML)}function c(e,t){for(var n=e,r=n;n;){if(o(n)&&r.hasAttribute("contenteditable"))return p(n,t);r=n=n.parentNode}return"Could not find contentEditable parent of node"}function u(e){return(null===e.nodeValue?e.childNodes:e.nodeValue).length}function y(n,t,r,o){var i=l();if(n.extend&&null!=t&&d(i,t)){r>u(t)&&s.logSelectionStateFailure({anonymizedDom:c(t),extraParams:JSON.stringify({offset:r}),selectionState:JSON.stringify(o.toJS())});var a=t===n.focusNode;try{0<n.rangeCount&&n.extend&&n.extend(t,r)}catch(e){throw s.logSelectionStateFailure({anonymizedDom:c(t,function(e){var t=[];return e===i&&t.push("active element"),e===n.anchorNode&&t.push("selection anchor node"),e===n.focusNode&&t.push("selection focus node"),t}),extraParams:JSON.stringify({activeElementName:i?i.nodeName:null,nodeIsFocus:t===n.focusNode,nodeWasFocus:a,selectionRangeCount:n.rangeCount,selectionAnchorNodeName:n.anchorNode?n.anchorNode.nodeName:null,selectionAnchorOffset:n.anchorOffset,selectionFocusNodeName:n.focusNode?n.focusNode.nodeName:null,selectionFocusOffset:n.focusOffset,message:e?""+e:null,offset:r},null,2),selectionState:JSON.stringify(o.toJS(),null,2)}),e}}else t&&0<n.rangeCount&&((a=n.getRangeAt(0)).setEnd(t,r),n.addRange(a.cloneRange()))}function g(e,t,n,r){var o=h(t).createRange();if(n>u(t)&&(s.logSelectionStateFailure({anonymizedDom:c(t),extraParams:JSON.stringify({offset:n}),selectionState:JSON.stringify(r.toJS())}),i.handleExtensionCausedError()),o.setStart(t,n),f)try{e.addRange(o)}catch(e){0}else e.addRange(o)}e.exports={setDraftEditorSelection:function(e,t,l,n,f){var r=h(t);if(d(r.documentElement,t)){var r=r.defaultView.getSelection(),o=e.getAnchorKey(),i=e.getAnchorOffset(),a=e.getFocusKey(),s=e.getFocusOffset(),p=e.getIsBackward(),c=(!r.extend&&p&&(c=o,u=i,o=a,i=s,a=c,s=u,p=!1),o===l&&n<=i&&i<=f),u=a===l&&n<=s&&s<=f;if(c&&u)return r.removeAllRanges(),g(r,t,i-n,e),void y(r,t,s-n,e);p?(u&&(r.removeAllRanges(),g(r,t,s-n,e)),c&&(o=r.focusNode,a=r.focusOffset,r.removeAllRanges(),g(r,t,i-n,e),y(r,o,a,e))):(c&&(r.removeAllRanges(),g(r,t,i-n,e)),u&&y(r,t,s-n,e))}},addFocusToSelection:y}},function(e,t,n){"use strict";var r=n(137);e.exports=function(e){return r(e)&&3==e.nodeType}},function(e,t,n){"use strict";e.exports=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}},function(e,t,n){"use strict";var r=n(139),o=n(140);function i(e){return null==e?e:String(e)}e.exports=function(e,t){var n;if(window.getComputedStyle&&(n=window.getComputedStyle(e,null)))return i(n.getPropertyValue(o(t)));if(document.defaultView&&document.defaultView.getComputedStyle){if(n=document.defaultView.getComputedStyle(e,null))return i(n.getPropertyValue(o(t)));if("display"===t)return"none"}return e.currentStyle?i("float"===t?e.currentStyle.cssFloat||e.currentStyle.styleFloat:e.currentStyle[r(t)]):i(e.style&&e.style[r(t)])}},function(e,t,n){"use strict";var r=/-(.)/g;e.exports=function(e){return e.replace(r,function(e,t){return t.toUpperCase()})}},function(e,t,n){"use strict";var r=/([A-Z])/g;e.exports=function(e){return e.replace(r,"-$1").toLowerCase()}},function(e,t,n){"use strict";var r=n(44);e.exports=function(e){var t=e.ownerDocument.documentElement;return"getBoundingClientRect"in e&&r(t,e)?(e=e.getBoundingClientRect(),{left:Math.round(e.left)-t.clientLeft,right:Math.round(e.right)-t.clientLeft,top:Math.round(e.top)-t.clientTop,bottom:Math.round(e.bottom)-t.clientTop}):{left:0,right:0,top:0,bottom:0}}},function(e,t,n){"use strict";var r="undefined"!=typeof navigator&&-1<navigator.userAgent.indexOf("AppleWebKit");e.exports=function(e){return(e=e||document).scrollingElement?e.scrollingElement:r||"CSS1Compat"!==e.compatMode?e.body:e.documentElement}},function(e,t,n){"use strict";e.exports=function(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}},function(e,r,t){"use strict";var n=t(17);function L(){return(L=n||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function F(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}var B=t(75),z=t(15),K=t(0),H=t(19),U=t(145),q=t(10),t=function(e){var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.shouldComponentUpdate=function(e){var t=this.props.editorState,e=e.editorState;if(t.getDirectionMap()!==e.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==e.getSelection().getHasFocus())return!0;var n=e.getNativelyRenderedContent(),r=t.isInCompositionMode(),o=e.isInCompositionMode();if(t===e||null!==n&&e.getCurrentContent()===n||r&&o)return!1;var n=t.getCurrentContent(),i=e.getCurrentContent(),t=t.getDecorator(),a=e.getDecorator();return r!==o||n!==i||t!==a||e.mustForceSelection()},r.render=function(){for(var e=this.props,l=e.blockRenderMap,f=e.blockRendererFn,p=e.blockStyleFn,d=e.customStyleMap,h=e.customStyleFn,t=e.editorState,y=e.editorKey,g=e.preventScroll,m=e.textDirectionality,v=t.getCurrentContent(),b=t.getSelection(),_=t.mustForceSelection(),w=t.getDecorator(),S=q(t.getDirectionMap()),E=v.getBlocksAsArray(),n=[],C=null,O=null,x=0;x<E.length;x++){var r=E[x],o=r.getKey(),i=r.getType(),a=f(r),k=void 0,D=void 0,T=void 0,a=(a&&(k=a.component,D=a.props,T=a.editable),m||S.get(o)),j=z.encode(o,0,0),D={contentState:v,block:r,blockProps:D,blockStyleFn:p,customStyleMap:d,customStyleFn:h,decorator:w,direction:a,forceSelection:_,offsetKey:j,preventScroll:g,selection:b,tree:t.getBlockTree(o)},I=l.get(i)||l.get("unstyled"),M=I.wrapper,I=I.element||l.get("unstyled").element,s=r.getDepth(),N="",i=(p&&(N=p(r)),"li"===I&&(N=U(N,H({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===i,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===i,"public/DraftStyleDefault/reset":O!==M||null===C||C<s,"public/DraftStyleDefault/depth0":0===s,"public/DraftStyleDefault/depth1":1===s,"public/DraftStyleDefault/depth2":2===s,"public/DraftStyleDefault/depth3":3===s,"public/DraftStyleDefault/depth4":4<=s,"public/DraftStyleDefault/listLTR":"LTR"===a,"public/DraftStyleDefault/listRTL":"RTL"===a}))),k||B),s={className:N,"data-block":!0,"data-editor":y,"data-offset-key":j,key:o},a=(void 0!==T&&(s=F({},s,{contentEditable:T,suppressContentEditableWarning:!0})),K.createElement(I,s,K.createElement(i,L({},D,{key:o}))));n.push({block:a,wrapperTemplate:M,key:o,offsetKey:j}),C=M?r.getDepth():null,O=M}for(var A=[],c=0;c<n.length;){var u=n[c];if(u.wrapperTemplate){for(var P=[];P.push(n[c].block),++c<n.length&&n[c].wrapperTemplate===u.wrapperTemplate;);var R=K.cloneElement(u.wrapperTemplate,{key:u.key+"-wrap","data-offset-key":u.offsetKey},P);A.push(R)}else A.push(u.block),c++}return K.createElement("div",{"data-contents":"true"},A)},n}(K.Component);e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=e||"",n=arguments.length;if(1<n)for(var r=1;r<n;r++){var o=arguments[r];o&&(t=(t?t+" ":"")+o)}return t}},function(e,n,t){"use strict";var i=t(76),a=t(9),s=t(8),c=t(33),d=t(34),h=t(78),y=t(67),r=t(61),u=t(38),l=t(10);function f(e){e._internalDrag=!1;var t,e=e.editorContainer;e&&(t=new MouseEvent("mouseup",{view:r(e),bubbles:!0,cancelable:!0}),e.dispatchEvent(t))}function p(e,t,n){t=a.insertText(e.getCurrentContent(),t,n,e.getCurrentInlineStyle());return s.push(e,t,"insert-fragment")}e.exports={onDragEnd:function(e){e.exitCurrentMode(),f(e)},onDrop:function(t,e){var n=new i(e.nativeEvent.dataTransfer),r=t._latestEditorState,o=function(e,t){var n=null,r=null,o=d(e.currentTarget);if("function"==typeof o.caretRangeFromPoint)o=o.caretRangeFromPoint(e.x,e.y),n=o.startContainer,r=o.startOffset;else{if(!e.rangeParent)return null;n=e.rangeParent,r=e.rangeOffset}return n=l(n),r=l(r),o=l(c(n)),y(t,o,r,o,r)}(e.nativeEvent,r);if(e.preventDefault(),t._dragCount=0,t.exitCurrentMode(),null!=o){e=n.getFiles();if(0<e.length)return t.props.handleDroppedFiles&&u(t.props.handleDroppedFiles(o,e))?void 0:void h(e,function(e){e&&t.update(p(r,o,e))});e=t._internalDrag?"internal":"external";t.props.handleDrop&&u(t.props.handleDrop(o,n,e))||(t._internalDrag?t.update(function(e,t){t=a.moveText(e.getCurrentContent(),e.getSelection(),t);return s.push(e,t,"insert-fragment")}(r,o)):t.update(p(r,o,n.getText()))),f(t)}}}},function(e,t,n){"use strict";var r={isImage:function(e){return"image"===o(e)[0]},isJpeg:function(e){var t=o(e);return r.isImage(e)&&("jpeg"===t[1]||"pjpeg"===t[1])}};function o(e){return e.split("/")}e.exports=r},function(e,t,n){"use strict";var a=n(7);e.exports=function(e){if(!(r=e)||"object"!=typeof r&&"function"!=typeof r||!("length"in r)||"setInterval"in r||"number"==typeof r.nodeType||!(Array.isArray(r)||"callee"in r||"item"in r))return[e];if(Array.isArray(e))return e.slice();var t=e,n=t.length;if((Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t)&&a(!1),"number"!=typeof n&&a(!1),0===n||n-1 in t||a(!1),"function"==typeof t.callee&&a(!1),t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(e){}for(var r,o=Array(n),i=0;i<n;i++)o[i]=t[i];return o}},function(e,l,t){"use strict";var n=t(11),r=t(150),o=t(155),i=t(156),a=t(157),s=t(158),c=t(160),f=t(161),p=t(162),d=t(163),h=t(164),y=t(178),t=t(62),u=n.isBrowser("Chrome"),n=n.isBrowser("Firefox"),u=u||n?t:function(e){};e.exports={onBeforeInput:r,onBlur:o,onCompositionStart:i,onCopy:a,onCut:s,onDragOver:c,onDragStart:f,onFocus:p,onInput:d,onKeyDown:h,onPaste:y,onSelect:t,onMouseUp:u,onKeyUp:u}},function(e,r,t){"use strict";var i=t(9),c=t(8),n=t(11),f=t(43),p=t(38),d=t(151),h=t(10),g=t(152),m="'",v="/",b=n.isBrowser("Firefox");function y(e,t,n,r,o){t=i.replaceText(e.getCurrentContent(),e.getSelection(),t,n,r);return c.push(e,t,"insert-characters",o)}e.exports=function(e,t){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var u,n,r,o,i,a,s=e._latestEditorState,l=t.data;if(l){if(!e.props.handleBeforeInput||!p(e.props.handleBeforeInput(l,s,t.timeStamp)))return r=s.getSelection(),u=r.getStartOffset(),n=r.getAnchorKey(),r.isCollapsed()?(r=y(s,l,s.getCurrentInlineStyle(),f(s.getCurrentContent(),s.getSelection()),!1),(i=(i=!1)||d(e._latestCommittedEditorState))||(a=s.getBlockTree(n),o=r.getBlockTree(n),i=a.size!==o.size||a.zip(o).some(function(e){var t=e[0],e=e[1],n=t.get("start"),r=n+(u<=n?l.length:0),o=t.get("end"),i=o+(u<=o?l.length:0),a=e.get("start"),s=e.get("end"),c=e.get("decoratorKey");return t.get("decoratorKey")!==c||t.get("leaves").size!==e.get("leaves").size||r!==a||i!==s||null!=c&&s-a!=o-n})),i||(a=l,i=b&&(a==m||a==v)),(i=i||h(r.getDirectionMap()).get(n)!==h(s.getDirectionMap()).get(n))?(t.preventDefault(),r=c.set(r,{forceSelection:!0}),void e.update(r)):(r=c.set(r,{nativelyRenderedContent:r.getCurrentContent()}),e._pendingStateFromBeforeInput=r,void g(function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)}))):(t.preventDefault(),void e.update(y(s,l,s.getCurrentInlineStyle(),f(s.getCurrentContent(),s.getSelection()),!0)));t.preventDefault()}}},function(e,t,n){"use strict";e.exports=function(e){var t=e.getSelection(),n=t.getAnchorKey(),e=e.getBlockTree(n),r=t.getStartOffset(),o=!1;return e.some(function(e){return r===e.get("start")?o=!0:r<e.get("end")&&e.get("leaves").some(function(e){e=e.get("start");return r===e&&(o=!0)})}),o}},function(t,e,n){"use strict";!function(e){n(153),t.exports=e.setImmediate}.call(this,n(23))},function(e,t,n){!function(e,d){!function(n,l){"use strict";var r,i,a,o,s,c,t,e;function f(e){delete i[e]}function u(e){if(a)setTimeout(u,0,e);else{var t=i[e];if(t){a=!0;try{var n=t,r=n.callback,o=n.args;switch(o.length){case 0:r();break;case 1:r(o[0]);break;case 2:r(o[0],o[1]);break;case 3:r(o[0],o[1],o[2]);break;default:r.apply(l,o)}}finally{f(e),a=!1}}}}function p(){function e(e){e.source===n&&"string"==typeof e.data&&0===e.data.indexOf(t)&&u(+e.data.slice(t.length))}var t="setImmediate$"+Math.random()+"$";n.addEventListener?n.addEventListener("message",e,!1):n.attachEvent("onmessage",e),s=function(e){n.postMessage(t+e,"*")}}n.setImmediate||(r=1,a=!(i={}),o=n.document,e=(e=Object.getPrototypeOf&&Object.getPrototypeOf(n))&&e.setTimeout?e:n,"[object process]"==={}.toString.call(n.process)?s=function(e){d.nextTick(function(){u(e)})}:!function(){var e,t;if(n.postMessage&&!n.importScripts)return e=!0,t=n.onmessage,n.onmessage=function(){e=!1},n.postMessage("","*"),n.onmessage=t,e}()?s=n.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){u(e.data)},function(e){t.port2.postMessage(e)}):o&&"onreadystatechange"in o.createElement("script")?(c=o.documentElement,function(e){var t=o.createElement("script");t.onreadystatechange=function(){u(e),t.onreadystatechange=null,c.removeChild(t),t=null},c.appendChild(t)}):function(e){setTimeout(u,0,e)}:p(),e.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];return i[r]={callback:e,args:t},s(r),r++},e.clearImmediate=f)}("undefined"==typeof self?void 0===e?this:e:self)}.call(this,n(23),n(154))},function(e,l){var n,r,e=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}function f(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return(n=setTimeout)(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}var a,s=[],c=!1,u=-1;function p(){c&&a&&(c=!1,a.length?s=a.concat(s):u=-1,s.length&&d())}function d(){if(!c){for(var e=f(p),t=(c=!0,s.length);t;){for(a=s,s=[];++u<t;)a&&a[u].run();u=-1,t=s.length}a=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===i||!r)&&clearTimeout)return(r=clearTimeout)(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function t(){}e.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new h(e,t)),1!==s.length||c||f(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=t,e.addListener=t,e.once=t,e.off=t,e.removeListener=t,e.removeAllListeners=t,e.emit=t,e.prependListener=t,e.prependOnceListener=t,e.listeners=function(e){return[]},e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}},function(e,t,n){"use strict";var o=n(8),i=n(44),a=n(72);e.exports=function(e,t){var n=t.currentTarget.ownerDocument,r=(Boolean(e.props.preserveSelectionOnBlur)||a(n)!==n.body||(n=n.defaultView.getSelection(),r=e.editor,1===n.rangeCount&&i(r,n.anchorNode)&&i(r,n.focusNode)&&n.removeAllRanges()),e._latestEditorState);(n=r.getSelection()).getHasFocus()&&(n=n.set("hasFocus",!1),e.props.onBlur&&e.props.onBlur(t),e.update(o.acceptSelection(r,n)))}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e,t){e.setMode("composite"),e.update(r.set(e._latestEditorState,{inCompositionMode:!0})),e._onCompositionStart(t)}},function(e,t,n){"use strict";var r=n(79);e.exports=function(e,t){e._latestEditorState.getSelection().isCollapsed()?t.preventDefault():e.setClipboard(r(e._latestEditorState))}},function(e,t,n){"use strict";var a=n(9),s=n(8),c=n(36),u=n(79),l=n(37),f=n(159);e.exports=function(n,e){var r,o=n._latestEditorState,t=o.getSelection(),i=e.target;t.isCollapsed()?e.preventDefault():(f(i)&&(r=l(c.getScrollParent(i))),t=u(o),n.setClipboard(t),n.setMode("cut"),setTimeout(function(){var e,t;n.restoreEditorDOM(r),n.exitCurrentMode(),n.update((e=o,t=a.removeRange(e.getCurrentContent(),e.getSelection(),"forward"),s.push(e,t,"remove-range")))},0))}},function(e,t,n){"use strict";e.exports=function(e){if(!(e&&"ownerDocument"in e))return!1;if("ownerDocument"in e){if(!e.ownerDocument.defaultView)return e instanceof Node;if(e instanceof e.ownerDocument.defaultView.Node)return!0}return!1}},function(e,t,n){"use strict";e.exports=function(e,t){e.setMode("drag"),t.preventDefault()}},function(e,t,n){"use strict";e.exports=function(e){e._internalDrag=!0,e.setMode("drag")}},function(e,t,n){"use strict";var o=n(8),i=n(11);e.exports=function(e,t){var n=e._latestEditorState,r=n.getSelection();r.getHasFocus()||(r=r.set("hasFocus",!0),e.props.onFocus&&e.props.onFocus(t),i.isBrowser("Chrome < 60.0.3081.0")?e.update(o.forceSelection(n,r)):e.update(o.acceptSelection(n,r)))}},function(e,r,t){"use strict";var w=t(9),S=t(15),E=t(8),n=t(11),C=t(68).notEmptyKey,O=t(33),x=t(80),k=t(10),D=n.isEngine("Gecko");e.exports=function(e,l){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var t=e.editor.ownerDocument.defaultView.getSelection(),n=t.anchorNode,f=t.isCollapsed,r=(null==n?void 0:n.nodeType)!==Node.TEXT_NODE&&(null==n?void 0:n.nodeType)!==Node.ELEMENT_NODE;if(null!=n&&!r){if(n.nodeType===Node.TEXT_NODE&&(null!==n.previousSibling||null!==n.nextSibling)){var p=n.parentNode;if(null==p)return;n.nodeValue=p.textContent;for(var d=p.firstChild;null!=d;d=d.nextSibling)d!==n&&p.removeChild(d)}var r=n.textContent,o=e._latestEditorState,i=k(O(n)),i=S.decode(i),a=i.blockKey,s=i.decoratorKey,i=i.leafKey,s=o.getBlockTree(a).getIn([s,"leaves",i]),i=s.start,s=s.end,h=o.getCurrentContent(),a=h.getBlockForKey(a),y=a.getText().slice(i,s);if((r=r.endsWith("\n\n")?r.slice(0,-1):r)!==y){var g,m,c,v,b=o.getSelection(),s=b.merge({anchorOffset:i,focusOffset:s,isBackward:!1}),u=a.getEntityAt(i),u=C(u)?h.getEntity(u):null,u="MUTABLE"===(null!=u?u.getMutability():null),_=u?"spellcheck-change":"apply-entity",s=w.replaceText(h,s,r,a.getInlineStyleAt(i),u?a.getEntityAt(i):null),a=(v=D?(c=t.anchorOffset,v=t.focusOffset,m=(g=i+Math.min(c,v))+Math.abs(c-v),c=g,m):(u=r.length-y.length,g=b.getStartOffset(),m=b.getEndOffset(),c=f?m+u:g,m+u),s.merge({selectionBefore:h.getSelectionAfter(),selectionAfter:b.merge({anchorOffset:c,focusOffset:v})}));e.update(E.push(o,a,_))}else{t=l.nativeEvent.inputType;if(t){i=o;r="deleteContentBackward"===t?x(i):i;if(r!==o)return e.restoreEditorDOM(),void e.update(r)}}}}},function(e,r,t){"use strict";var a=t(9),s=t(8),n=t(48),c=t(35),u=t(166),o=t(11),l=t(38),d=t(167),h=t(169),y=t(171),g=t(172),m=t(173),v=t(174),b=t(80),_=t(175),w=t(176),S=t(177),f=n.isOptionKeyCommand,p=o.isBrowser("Chrome");e.exports=function(t,n){var e=n.which,r=t._latestEditorState;function o(e){e=t.props[e];return e&&(e(n),1)}switch(e){case c.RETURN:if(n.preventDefault(),t.props.handleReturn&&l(t.props.handleReturn(n,r)))return;break;case c.ESC:if(n.preventDefault(),o("onEscape"))return;break;case c.TAB:if(o("onTab"))return;break;case c.UP:if(o("onUpArrow"))return;break;case c.RIGHT:if(o("onRightArrow"))return;break;case c.DOWN:if(o("onDownArrow"))return;break;case c.LEFT:if(o("onLeftArrow"))return;break;case c.SPACE:p&&f(n)&&n.preventDefault()}var i=t.props.keyBindingFn(n);null!=i&&""!==i?"undo"!==i?(n.preventDefault(),t.props.handleKeyCommand&&l(t.props.handleKeyCommand(i,r,n.timeStamp))||(i=function(e,t,n){switch(e){case"redo":return s.redo(t);case"delete":return _(t);case"delete-word":return y(t);case"backspace":return b(t);case"backspace-word":return h(t);case"backspace-to-start-of-line":return d(t,n);case"split-block":return g(t);case"transpose-characters":return w(t);case"move-selection-to-start-of-block":return v(t);case"move-selection-to-end-of-block":return m(t);case"secondary-cut":return u.cut(t);case"secondary-paste":return u.paste(t);default:return t}}(i,r,n))!==r&&t.update(i)):S(n,r,t.update):e===c.SPACE&&p&&f(n)&&(i=a.replaceText(r.getCurrentContent(),r.getSelection()," "),t.update(s.push(r,i,"insert-characters")))}},function(e,t,n){"use strict";var r=n(35);e.exports=function(e){return e.which===r.RETURN&&(e.getModifierState("Shift")||e.getModifierState("Alt")||e.getModifierState("Control"))}},function(e,t,n){"use strict";var a=n(9),s=n(8),c=n(29),u=n(10),l=null;e.exports={cut:function(e){var t=e.getCurrentContent(),n=e.getSelection(),r=null;if(n.isCollapsed()){var o=n.getAnchorKey(),i=t.getBlockForKey(o).getLength();if(i===n.getAnchorOffset()){o=t.getKeyAfter(o);if(null==o)return e;r=n.set("focusKey",o).set("focusOffset",0)}else r=n.set("focusOffset",i)}else r=n;r=u(r),l=c(t,r);o=a.removeRange(t,r,"forward");return o===t?e:s.push(e,o,"remove-range")},paste:function(e){if(!l)return e;var t=a.replaceWithFragment(e.getCurrentContent(),e.getSelection(),l);return s.push(e,t,"insert-fragment")}}},function(e,t,n){"use strict";var r=n(8),o=n(168),i=n(66),a=n(46),s=n(28);e.exports=function(e,n){var t=s(e,function(e){var t=e.getSelection();if(t.isCollapsed()&&0===t.getAnchorOffset())return a(e,1);t=n.currentTarget.ownerDocument.defaultView.getSelection().getRangeAt(0),t=o(t);return i(e,null,t.endContainer,t.endOffset,t.startContainer,t.startOffset).selectionState},"backward");return t===e.getCurrentContent()?e:r.push(e,t,"remove-range")}},function(e,t,n){"use strict";var u=n(21),l=n(34),f=n(81),p=n(7);function d(e,t){for(var n=1/0,r=1/0,o=-1/0,i=-1/0,a=0;a<e.length;a++){var s=e[a];0!==s.width&&1!==s.width&&(n=Math.min(n,s.top),r=Math.min(r,s.bottom),o=Math.max(o,s.top),i=Math.max(i,s.bottom))}return o<=r&&o-n<t&&i-r<t}e.exports=function(e){e.collapsed||p(!1);var t=(e=e.cloneRange()).startContainer,n=function(e){var t=getComputedStyle(e),n=(e=l(e)).createElement("div");n.style.fontFamily=t.fontFamily,n.style.fontSize=t.fontSize,n.style.fontStyle=t.fontStyle,n.style.fontWeight=t.fontWeight,n.style.lineHeight=t.lineHeight,n.style.position="absolute",n.textContent="M";(t=e.body)||p(!1),t.appendChild(n),e=n.getBoundingClientRect();return t.removeChild(n),e.height}(t=1!==t.nodeType?t.parentNode:t),r=e.endContainer,o=e.endOffset;for(e.setStart(e.startContainer,0);d(f(e),n)&&(r=e.startContainer,o=e.startOffset,r.parentNode||p(!1),e.setStartBefore(r),1!==r.nodeType||"inline"===getComputedStyle(r).display););for(var i=r,a=o-1;;){for(var s=i.nodeValue,c=a;0<=c;c--)if(!(null!=s&&0<c&&u.isSurrogatePair(s,c-1))){if(e.setStart(i,c),!d(f(e),n))break;r=i,o=c}if(-1===c||0===i.childNodes.length)break;a=function(e){switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:return 0;case Node.TEXT_NODE:case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:return e.length;default:return e.childNodes.length}}(i=i.childNodes[c])}return e.setStart(r,o),e}},function(e,t,n){"use strict";var r=n(82),o=n(8),i=n(46),a=n(28);e.exports=function(e){var t=a(e,function(e){var t=e.getSelection(),n=t.getStartOffset();if(0===n)return i(e,1);t=t.getStartKey(),t=e.getCurrentContent().getBlockForKey(t).getText().slice(0,n),n=r.getBackward(t);return i(e,n.length||1)},"backward");return t===e.getCurrentContent()?e:o.push(e,t,"remove-range")}},function(e,t,n){"use strict";e.exports={getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:-?!-/[-`{-・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"}}},function(e,t,n){"use strict";var r=n(82),o=n(8),i=n(83),a=n(28);e.exports=function(e){var t=a(e,function(e){var t=e.getSelection(),n=t.getStartOffset(),t=t.getStartKey(),t=e.getCurrentContent().getBlockForKey(t).getText().slice(n),n=r.getForward(t);return i(e,n.length||1)},"forward");return t===e.getCurrentContent()?e:o.push(e,t,"remove-range")}},function(e,t,n){"use strict";var r=n(9),o=n(8);e.exports=function(e){var t=r.splitBlock(e.getCurrentContent(),e.getSelection());return o.push(e,t,"split-block")}},function(e,t,n){"use strict";var o=n(8);e.exports=function(e){var t=e.getSelection(),n=t.getEndKey(),r=e.getCurrentContent().getBlockForKey(n).getLength();return o.set(e,{selection:t.merge({anchorKey:n,anchorOffset:r,focusKey:n,focusOffset:r,isBackward:!1}),forceSelection:!0})}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e){var t=e.getSelection(),n=t.getStartKey();return r.set(e,{selection:t.merge({anchorKey:n,anchorOffset:0,focusKey:n,focusOffset:0,isBackward:!1}),forceSelection:!0})}},function(e,t,n){"use strict";var r=n(8),o=n(21),i=n(83),a=n(28);e.exports=function(e){var t=a(e,function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),t=t.getAnchorOffset(),n=n.getBlockForKey(r).getText()[t];return i(e,n?o.getUTF16Length(n,0):1)},"forward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return r.push(e,t.set("selectionBefore",n),n.isCollapsed()?"delete-character":"remove-range")}},function(e,t,n){"use strict";var a=n(9),s=n(8),c=n(29);e.exports=function(e){if(!(r=e.getSelection()).isCollapsed())return e;if(0===(o=r.getAnchorOffset()))return e;var t=r.getAnchorKey(),n=e.getCurrentContent();if((t=n.getBlockForKey(t).getLength())<=1)return e;var t=o===t?(i=r.set("anchorOffset",o-1),r):(i=r.set("focusOffset",o+1)).set("anchorOffset",o+1),r=c(n,i),o=a.removeRange(n,i,"backward"),i=(n=o.getSelectionAfter()).getAnchorOffset()-1,n=n.merge({anchorOffset:i,focusOffset:i}),i=a.replaceWithFragment(o,n,r),o=s.push(e,i,"insert-fragment");return s.acceptSelection(o,t)}},function(e,t,n){"use strict";var i=n(8);e.exports=function(e,t,n){var r,o=i.undo(t);if("spellcheck-change"===t.getLastChangeType())return r=o.getCurrentContent(),void n(i.set(o,{nativelyRenderedContent:r}));e.preventDefault(),t.getNativelyRenderedContent()?(n(i.set(t,{nativelyRenderedContent:null})),setTimeout(function(){n(o)},0)):n(o)}},function(t,n,e){"use strict";var u=e(25),l=e(12),v=e(76),f=e(9),p=e(179),d=e(8),h=e(86),y=e(43),b=e(78),g=e(38),_=e(184);function m(e,t,n){t=f.replaceWithFragment(e.getCurrentContent(),e.getSelection(),t);return d.push(e,t.set("entityMap",n),"insert-fragment")}t.exports=function(o,e){if(e.preventDefault(),!(e=new v(e.clipboardData)).isRichText()){var t=e.getFiles(),i=e.getText();if(0<t.length)return o.props.handlePastedFiles&&g(o.props.handlePastedFiles(t))?void 0:void b(t,function(e){var t,n,r;(e=e||i)&&(t=o._latestEditorState,e=_(e),n=l.create({style:t.getCurrentInlineStyle(),entity:y(t.getCurrentContent(),t.getSelection())}),r=h.getCurrentBlockType(t),e=p.processText(e,n,r),n=u.createFromArray(e),r=f.replaceWithFragment(t.getCurrentContent(),t.getSelection(),n),o.update(d.push(t,r,"insert-fragment")))})}var n,t=[],r=e.getText(),a=e.getHTML(),s=o._latestEditorState;if(o.props.formatPastedText&&(r=(c=o.props.formatPastedText(r,a)).text,a=c.html),!o.props.handlePastedText||!g(o.props.handlePastedText(r,a,s))){if(r&&(t=_(r)),!o.props.stripPastedStyles){var c=o.getClipboard();if(!o.props.formatPastedText&&e.isRichText()&&c){if(-1!==(null===a||void 0===a?void 0:a.indexOf(o.getEditorKey()))||1===t.length&&1===c.size&&c.first().getText()===r)return void o.update(m(o._latestEditorState,c))}else if(c&&e.types.includes("com.apple.webarchive")&&!e.types.includes("text/html")&&(r=c,(n=t).length===r.size&&r.valueSeq().every(function(e,t){return e.getText()===n[t]})))return void o.update(m(o._latestEditorState,c));if(a){var e=p.processHTML(a,o.props.blockRenderMap);if(e){var r=e.contentBlocks,c=e.entityMap;if(r)return a=u.createFromArray(r),void o.update(m(o._latestEditorState,a,c))}}o.setClipboard(null)}t.length&&(e=l.create({style:s.getCurrentInlineStyle(),entity:y(s.getCurrentContent(),s.getSelection())}),r=h.getCurrentBlockType(s),a=p.processText(t,e,r),c=u.createFromArray(a),o.update(m(o._latestEditorState,c)))}}},function(e,l,t){"use strict";function a(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}var n=t(18),r=t(13),o=t(84),s=t(14),i=t(85),f=t(16),c=t(6),p=t(58),d=c.List,h=c.Repeat,u=f("draft_tree_data_support"),y=u?r:n;e.exports={processHTML:function(e,t){return o(e,i,t)},processText:function(e,o,i){return e.reduce(function(e,t,n){t=p(t);var r=s(),t={key:r,type:i,text:t,characterList:d(h(o,t.length))};return u&&0!==n&&(t=a({},t,{prevSibling:(e[n=n-1]=e[n].merge({nextSibling:r})).getKey()})),e.push(new y(t)),e},[])}}},function(e,t,n){"use strict";var r=function(){function e(e){var t,n,r;r=void 0,(n="_uri")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this._uri=e}return e.prototype.toString=function(){return this._uri},e}();e.exports=r},function(e,t,n){"use strict";var r=n(20);e.exports=function(e){return!(!e||!e.ownerDocument)&&(r(e)&&"A"===e.nodeName)}},function(e,t,n){"use strict";var r=n(20);e.exports=function(e){return!(!e||!e.ownerDocument)&&(r(e)&&"IMG"===e.nodeName)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var o=t.getStartKey(),i=t.getEndKey(),a=(s=e.getBlockMap()).toSeq().skipUntil(function(e,t){return t===o}).takeUntil(function(e,t){return t===i}).concat([[i,s.get(i)]]).map(function(e){var t=e.getDepth()+n,t=Math.max(0,Math.min(t,r));return e.set("depth",t)}),s=s.merge(a);return e.merge({blockMap:s,selectionBefore:t,selectionAfter:t})}},function(e,t,n){"use strict";var r=/\r\n?|\n/g;e.exports=function(e){return e.split(r)}},function(e,t,n){"use strict";n=n(22).unstable_flushControlled;e.exports=n},function(e,t,n){"use strict";var o=n(0),i=n(19),n=function(e){var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.shouldComponentUpdate=function(e){return this.props.text!==e.text||this.props.editorState.getSelection().getHasFocus()!==e.editorState.getSelection().getHasFocus()},r.render=function(){var e=this.props.editorState.getSelection().getHasFocus(),e=i({"public/DraftEditorPlaceholder/root":!0,"public/DraftEditorPlaceholder/hasFocus":e});return o.createElement("div",{className:e},o.createElement("div",{className:i("public/DraftEditorPlaceholder/inner"),id:this.props.accessibilityID,style:{whiteSpace:"pre-wrap"}},this.props.text))},n}(o.Component);e.exports=n},function(e,t,n){},function(e,o,t){"use strict";function i(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}function a(e,t){return{key:e.getKey(),text:e.getText(),type:e.getType(),depth:e.getDepth(),inlineStyleRanges:r(e),entityRanges:n(e,t),data:e.getData().toObject()}}var s=t(18),c=t(13),l=t(88),n=t(189),r=t(190),u=t(7),f=function(e,t,n,r){var o;e instanceof s?n.push(a(e,t)):(e instanceof c||u(!1),o=e.getParentKey(),e=r[e.getKey()]=i({},a(e,t),{children:[]}),(o?r[o].children:n).push(e))};e.exports=function(e){var r,t,o,i,a,n,s,c,u={entityMap:{},blocks:[]};return r=u.entityMap,t=[],o={},i={},a=0,e.getBlockMap().forEach(function(n){n.findEntityRanges(function(e){return null!==e.getEntity()},function(e){var e=n.getEntityAt(e),t=l.stringify(e);i[t]||(i[t]=e,r[t]="".concat(a),a++)}),f(n,r,t,o)}),n=e,e=u={blocks:t,entityMap:r},s=u.blocks,e=u.entityMap,c={},Object.keys(e).forEach(function(e,t){e=n.getEntity(l.unstringify(e));c[t]={type:e.getType(),mutability:e.getMutability(),data:e.getData()}}),u={blocks:s,entityMap:c}}},function(e,t,n){"use strict";var s=n(88),c=n(21).strlen;e.exports=function(o,i){var a=[];return o.findEntityRanges(function(e){return!!e.getEntity()},function(e,t){var n=o.getText(),r=o.getEntityAt(e);a.push({offset:c(n.slice(0,e)),length:c(n.slice(e,t)),key:Number(i[s.stringify(r)])})}),a}},function(e,t,n){"use strict";var a=n(21),s=n(26),c=function(e,t){return e===t},u=function(e){return!!e},r=[];e.exports=function(t){var n=t.getCharacterList().map(function(e){return e.getStyle()}).toList(),e=n.flatten().toSet().map(function(e){return r=t,o=e,i=[],e=(e=n).map(function(e){return e.has(o)}).toList(),s(e,c,u,function(e,t){var n=r.getText();i.push({offset:a.strlen(n.slice(0,e)),length:a.strlen(n.slice(e,t)),style:o})}),i;var r,o,i});return Array.prototype.concat.apply(r,e.toJS())}},function(n,r,e){"use strict";function p(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}function d(e,t){var n=e.key,r=e.type,o=e.data;return{text:e.text,depth:e.depth||0,type:r||"unstyled",key:n||b(),data:E(o),characterList:i(e,t)}}function i(e,t){var n=e.text,r=e.entityRanges,e=e.inlineStyleRanges,r=r||[];return a(v(n,e||[]),f(n,r.filter(function(e){return t.hasOwnProperty(e.key)}).map(function(e){return p({},e,{key:t[e.key]})})))}function h(e){return p({},e,{key:e.key||b()})}function y(e,t,n){return t=t.map(function(e){return p({},e,{parentRef:n})}),e.concat(t.reverse())}var o=e(18),g=e(13),u=e(40),l=e(30),s=e(192),c=(e(193),e(31)),a=e(194),f=e(195),v=e(196),b=e(14),_=e(16),t=e(6),m=e(7),w=_("draft_tree_data_support"),S=t.List,E=t.Map,C=t.OrderedMap,O=function(l,f){return l.map(h).reduce(function(e,t,n){Array.isArray(t.children)||m(!1);for(var r=t.children.map(h),t=new g(p({},d(t,f),{prevSibling:0===n?null:l[n-1].key,nextSibling:n===l.length-1?null:l[n+1].key,children:S(r.map(function(e){return e.key}))})),o=(e=e.set(t.getKey(),t),y([],r,t));0<o.length;){var i=o.pop(),a=i.parentRef,s=a.getChildKeys(),c=s.indexOf(i.key),u=Array.isArray(i.children);if(!u){m(!1);break}u=i.children.map(h),i=new g(p({},d(i,f),{parent:a.getKey(),children:S(u.map(function(e){return e.key})),prevSibling:0===c?null:s.get(c-1),nextSibling:c===s.size-1?null:s.get(c+1)}));e=e.set(i.getKey(),i),o=y(o,u,i)}return e},C())},x=function(e,t){return C(e.map(function(e){e=new o(d(e,t));return[e.getKey(),e]}))};n.exports=function(e){Array.isArray(e.blocks)||m(!1);o=e.entityMap,i={},Object.keys(o).forEach(function(e){var t=o[e],n=t.type,r=t.mutability,t=t.data;i[e]=l.__create(n,r,t||{})});var o,i,t,n,r=i,a=(t=r,a=(e=e).blocks.find(function(e){return Array.isArray(e.children)&&0<e.children.length}),n=(w&&!a?s.fromRawStateToRawTreeState(e):e).blocks,w?O(n,t):x(a?s.fromRawTreeStateToRawState(e).blocks:n,t)),e=a.isEmpty()?new c:c.createEmpty(a.first().getKey());return new u({blockMap:a,entityMap:r,selectionBefore:e,selectionAfter:e})}},function(e,t,n){"use strict";function s(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}function c(e){return!(!e||!e.type)&&("unordered-list-item"===(e=e.type)||"ordered-list-item"===e)}var u=n(14),a=n(7);e.exports={fromRawTreeStateToRawState:function(e){var t=e.blocks,r=[];if(Array.isArray(t)||a(!1),!Array.isArray(t)||!t.length)return e;for(var n=function(e){var t,n=s({},e);c(e)&&(n.depth=n.depth||0,t=e,Array.isArray(t.children)&&(t.children=t.children.map(function(e){return e.type===t.type?s({},e,{depth:(t.depth||0)+1}):e})),null!=e.children&&0<e.children.length)||(delete n.children,r.push(n))},o=[].concat(t).reverse();o.length;){var i=o.pop(),i=(n(i),i.children);Array.isArray(i)||a(!1),o=o.concat([].concat(i.reverse()))}return e.blocks=r,s({},e,{blocks:r})},fromRawStateToRawTreeState:function(e){var i=[],a=[];return e.blocks.forEach(function(e){var t=c(e),n=e.depth||0,r=s({},e,{children:[]});if(t){var o=a[0];if(null==o&&0===n)i.push(r);else if(null==o||o.depth<n-1){t={key:u(),text:"",depth:n-1,type:e.type,children:[],entityRanges:[],inlineStyleRanges:[]};a.unshift(t),1===n?i.push(t):null!=o&&o.children.push(t),t.children.push(r)}else if(o.depth===n-1)o.children.push(r);else{for(;null!=o&&o.depth>=n;)a.shift(),o=a[0];(0<n?o.children:i).push(r)}}else i.push(r)}),s({},e,{blocks:i})}}},function(e,t,n){"use strict";n(47);e.exports={isValidBlock:function(e,t){var n=e.getKey(),r=e.getParentKey();if(null!=r&&!t.get(r).getChildKeys().includes(n))return!1;if(!e.getChildKeys().map(function(e){return t.get(e)}).every(function(e){return e.getParentKey()===n}))return!1;r=e.getPrevSiblingKey();if(null!=r&&t.get(r).getNextSiblingKey()!==n)return!1;var o=e.getNextSiblingKey();if(null!=o&&t.get(o).getPrevSiblingKey()!==n)return!1;return(null===o||null===r||r!==o)&&!(""!=e.text&&0<e.getChildKeys().size)},isConnectedTree:function(t){var e=t.toArray().filter(function(e){return null==e.getParentKey()&&null==e.getPrevSiblingKey()});if(1!==e.length)return!1;for(var n=0,r=e.shift().getKey(),o=[];null!=r;){var i=t.get(r),a=i.getChildKeys(),s=i.getNextSiblingKey();if(0<a.size){null!=s&&o.unshift(s);s=a.map(function(e){return t.get(e)}).find(function(e){return null==e.getPrevSiblingKey()});if(null==s)return!1;r=s.getKey()}else r=null!=i.getNextSiblingKey()?i.getNextSiblingKey():o.shift();n++}return n===t.size},isValidTree:function(t){var n=this;return!!t.toArray().every(function(e){return n.isValidBlock(e,t)})&&this.isConnectedTree(t)}}},function(e,t,n){"use strict";var r=n(12),o=n(6).List;e.exports=function(e,n){return e=e.map(function(e,t){t=n[t];return r.create({style:e,entity:t})}),o(e)}},function(e,t,n){"use strict";var a=n(21).substr;e.exports=function(o,e){var i=Array(o.length).fill(null);return e&&e.forEach(function(e){for(var t=a(o,0,e.offset).length,n=t+a(o,e.offset,e.length).length,r=t;r<n;r++)i[r]=e.key}),i}},function(e,t,n){"use strict";var r=n(21),n=n(6).OrderedSet,i=r.substr,a=n();e.exports=function(r,e){var o=Array(r.length).fill(a);return e&&e.forEach(function(e){for(var t=i(r,0,e.offset).length,n=t+i(r,e.offset,e.length).length;t<n;)o[t]=o[t].add(e.style),t++}),o}},function(e,t,n){"use strict";var i=n(198);e.exports=function(e){if(!(e=e.getSelection()).rangeCount)return null;var e=e.getRangeAt(0),t=(e=i(e)).top,n=e.right,r=e.bottom,o=e.left;return 0===t&&0===n&&0===r&&0===o?null:e}},function(e,t,n){"use strict";var c=n(81);e.exports=function(e){var t=c(e),n=0,r=0,o=0,i=0;if(t.length){i=1<t.length&&0===t[0].width?(n=(e=t[1]).top,r=e.right,o=e.bottom,e.left):(n=(e=t[0]).top,r=e.right,o=e.bottom,e.left);for(var a=1;a<t.length;a++){var s=t[a];0!==s.height&&0!==s.width&&(n=Math.min(n,s.top),r=Math.max(r,s.right),o=Math.max(o,s.bottom),i=Math.min(i,s.left))}}return{top:n,right:r,bottom:o,left:i,width:r-i,height:o-n}}},function(e,t,n){"use strict";var a=n(200);function r(){}function o(){}o.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,o,i){if(i!==a)throw i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"),i.name="Invariant Violation",i}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,r){"use strict";e.exports=function(e){var t={},n=(t.src_Any=r(205).source,t.src_Cc=r(206).source,t.src_Z=r(207).source,t.src_P=r(208).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|"),"[><|]");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e};function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var n=n(216),i=(n=n)&&n.__esModule?n:{default:n};function a(e){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this.content=e.content||[],this.start=void 0!==e.start?e.start:null,this.end=void 0!==e.end?e.end:null,this.entity=void 0!==e.entity?e.entity:null,this.decorator=void 0!==e.decorator?e.decorator:null,this.decoratorProps=e.decoratorProps||null,this.decoratedText=void 0!==e.decoratedText?e.decoratedText:null,this.contentState=e.contentState,this.style=e.style||null,this.styles=e.styles||null,this.block=e.block||{}}r(a,[{key:"getCurrentContent",value:function(){return this.content[this.content.length-1]}},{key:"addToCurrentContent",value:function(e){this.content[this.content.length-1]=this.content[this.content.length-1]+e}},{key:"handleFlatPush",value:function(e,t){var n=this.getCurrentContent();n instanceof a&&(0,i.default)(t,n.styles)?n.addToCurrentContent(e):(n=new a({styles:[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t)),content:[e]}),this.content.push(n))}},{key:"pushContent",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];if(!t||t.length<1)return"string"==typeof e&&"string"==typeof this.getCurrentContent()?this.addToCurrentContent(e):this.content.push(e),this;if(n)return this.handleFlatPush(e,t),this;t=t;var t=Array.isArray(t)?t:Array.from(t),r=t[0],t=t.slice(1),o=this.getCurrentContent();return o instanceof a&&o.style===r?o.pushContent(e,t,n):((o=new a({style:r})).pushContent(e,t,n),this.content.push(o)),this}}]),t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(o,i){return function(e,t,n){r=i;var r,t=t.map(function(e){return r[e]}).reduce(function(e,t){var n,r={};return void 0===t||t[n="text-decoration"in t?"text-decoration":"textDecoration"]!==e[n]&&(r[n]=[e[n],t[n]].join(" ").trim()),Object.assign(e,t,r)},{});return o(Object.assign({},{children:e},n,{style:t}))}}},function(o,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.render=e.renderNode=void 0;var n=r(t(89)),s=r(t(219)),m=r(t(220)),v=r(t(221)),b=r(t(222)),f=r(t(223)),S=r(t(224)),c=r(t(225));function r(e){return e&&e.__esModule?e:{default:e}}function u(e){function t(e){var t=i-e;for(o.length<t&&(t=o.length);0<t;--t){var n=r;(r=o.pop())[r.length-1].children=n}}var r=[],o=[],i=0;return e.forEach(function(e){i<e.depth?(o.push(r),r=[]):i>e.depth&&t(e.depth),i=e.depth,r.push(Object.assign({},e))}),0!==i&&t(0),r}function _(e,t,n,r,o){var i=r.prevType,a=r.prevDepth,s=r.prevKeys,r=r.prevData;return 0!==e.length&&((i=t[i]||t[o.blockFallback])?(t={depth:a,keys:s},r&&r.some(function(e){return!!e})&&(t.data=r),void n.push(i(e,t))):void n.push(e))}function w(e){var p=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},o=arguments[4],h=5<arguments.length&&void 0!==arguments[5]?arguments[5]:{},i=Object.assign({},S.default,6<arguments.length&&void 0!==arguments[6]?arguments[6]:{}),a=[],s=[],c=null,u=0,l=[],f=[],y=!1,g=new n.default({flat:!!o});return e.forEach(function(e){var t,n;(0,m.default)(e,c,i)?!0===i.cleanup.split&&(y=!0):(t=g.parse(e),t=E(t,p,d,o,h,i,(0,v.default)()),(c&&c!==e.type||y)&&(_(s,r,a,{prevType:c,prevDepth:u,prevKeys:l,prevData:f},i),f=[],l=[],y=!(s=[])),e.children&&(n=w(e.children,p,r,d,o,h,i),t.push(n)),s.push(t),c=e.type,u=e.depth,l.push(e.key),f.push(e.data))}),_(s,r,a,{prevType:c,prevDepth:u,prevKeys:l,prevData:f},i),(0,b.default)(a,i)}var E=e.renderNode=function l(e,t,n,r,o,i,a){if(e.styles&&r)return r((0,b.default)(e.content,i),e.styles,{key:a()});var s=[],c=0;if(e.content.forEach(function(e){"string"==typeof e?s=(0,f.default)(e,s,c):(s[c+=1]=l(e,t,n,r,o,i,a),c+=1)}),e.style&&t[e.style])return t[e.style]((0,b.default)(s,i),{key:a()});if(null!==e.entity){var u=o[e.entity];if(u&&n[u.type])return n[u.type]((0,b.default)(s,i),u.data,{key:e.entity})}return null!==e.decorator?(u=[e.block.key,e.start,0].join("."),e.decorator(Object.assign({children:(0,b.default)(s,i),decoratedText:e.decoratedText,contentState:e.contentState,entityKey:e.entity,offsetKey:u,key:u},e.decoratorProps))):s};e.render=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(!e||!Array.isArray(e.blocks))return(0,s.default)("invalid raw object"),null;if(!e.blocks.length)return null;var r=t.inline,o=t.blocks,i=t.entities,a=t.styles,t=t.decorators,t=t?(0,c.default)(e,t,n):e.blocks,t=u(t);return w(t,r,o,i,a,e.entityMap,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e,t){return!!(t.trim?e.trim():e)};t.default=function(e,t,n){var r,n=n.cleanup;return!(!n||o((r=e).text,n)||r.data&&Object.keys(r.data).length||r.entityRanges&&r.entityRanges.length)&&((!n.after||"all"===n.after||-1!==n.after.indexOf(t))&&(!(!n.except||-1!==n.except.indexOf(e.type))||!(!n.types||"all"!==n.types&&-1===n.types.indexOf(e.type))))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){var t=0;return function(){var e=t;return t+=1,e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){return Array.isArray(e)&&t.joinOutput?e.join(""):e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t,n){var r=t;return t[n]?r[n]+=e:r[n]=e,r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={joinOutput:!1,cleanup:{after:["atomic"],types:["unstyled"],trim:!1,split:!0},blockFallback:"unstyled"}},function(s,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=i(t(90)),n=i(t(91)),r=i(t(226)),f=i(t(227));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return"function"==typeof e.getDecorations&&"function"==typeof e.getComponentForKey&&"function"==typeof e.getPropsForKey}var p=function(e,r){return e.forEach(function(e){var t=r.text.substring(0,e.offset),n=r.text.substring(e.offset,e.offset+e.length);e.offset=o.default.ucs2.decode(t).length,e.length=o.default.ucs2.decode(n).length}),e},d=function(e){var t=new n.default(e.filter(function(e){return!a(e)})),e=e.filter(a),e=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(e),[t]);return new r.default(e)};e.default=function(e,c,u){var l=u.convertFromRaw&&u.convertFromRaw(e);return e.blocks.map(function(e){return e=e,t=c,r=l,n=(n=u||{}).createContentBlock,o=[],i=d(t),t=(n||f.default)(e),a=i.getDecorations(t,r),s=0,a.forEach(function(e,t){var n;e?(n=a[t=t+1])&&n===e||(o.push({offset:s,length:t-s,component:i.getComponentForKey(e),decoratorProps:i.getPropsForKey(e)||{},contentState:r}),s=t):s+=1}),Object.assign({},e,{decoratorRanges:p(o,e)});var t,r,n,o,i,a,s})}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});function o(e){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");this.decorators=e}(function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)})(o,[{key:"getDecorations",value:function(t,r){var o=new Array(t.getText().length).fill(null);return this.decorators.forEach(function(e,n){e.getDecorations(t,r).forEach(function(e,t){e&&(o[t]=n+"-"+e)})}),o}},{key:"getComponentForKey",value:function(e){return this.getDecoratorForKey(e).getComponentForKey(o.getInnerKey(e))}},{key:"getPropsForKey",value:function(e){return this.getDecoratorForKey(e).getPropsForKey(o.getInnerKey(e))}},{key:"getDecoratorForKey",value:function(e){e=e.split("-"),e=Number(e[0]);return this.decorators[e]}}],[{key:"getInnerKey",value:function(e){return e.split("-").slice(1).join("-")}}]),t.default=o},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});(function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)})(i,[{key:"get",value:function(e){return this[e]}},{key:"getText",value:function(){return this.text}},{key:"getType",value:function(){return this.type}},{key:"getKey",value:function(){return this.key}},{key:"getLength",value:function(){return this.text.length}},{key:"getDepth",value:function(){return this.depth}},{key:"getData",value:function(){return this.data}}]);var o=i;function i(e){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");Object.assign(this,e)}t.default=function(e){return new o(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e,t){e=e.keys;return t||(e?e.join(","):void 0)},u=function(r,o){return function(e,t,n){t=Object.assign({},t),n=i(t,n);return delete t.depth,delete t.keys,o.apply(void 0,[r,Object.assign({},t,{key:n})].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(e)))}};t.default=function(c,t){var n={};return Object.keys(t).forEach(function(e){var s=t[e];s.wrapper?n[e]=function(e,t,n){return r=c,o=s,t=(e={children:e,props:t,key:n}).children,i=e.props,e=e.key,n=u(o.wrapper,r),a=u(o.element,r,!0),n(t.map(function(e,t){return a(e,{depth:i.depth},i.keys&&i.keys[t])}),i,e);var r,o,i,a}:n[e]=u(s.element,c)}),n}},function(t,r,e){"use strict";
|
|
49
|
+
*/var c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},r)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var n,r=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var i in n=Object(arguments[o]))u.call(n,i)&&(r[i]=n[i]);if(c)for(var a=c(n),s=0;s<a.length;s++)l.call(n,a[s])&&(r[a[s]]=n[a[s]])}return r}},function(e,t,n){"use strict";var o=n(12),i=n(26),n=n(6),a=n.List,r=n.Map,s=n.OrderedSet,c=n.Record,u=n.Repeat,l=s(),n=c({key:"",type:"unstyled",text:"",characterList:a(),depth:0,data:r()}),s=function(t){var e;function n(e){return t.call(this,function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=a(u(o.EMPTY,n.length))),e}(e))||this}e=t,(r=n).prototype=Object.create(e.prototype),(r.prototype.constructor=r).__proto__=e;var r=n.prototype;return r.getKey=function(){return this.get("key")},r.getType=function(){return this.get("type")},r.getText=function(){return this.get("text")},r.getCharacterList=function(){return this.get("characterList")},r.getLength=function(){return this.getText().length},r.getDepth=function(){return this.get("depth")},r.getData=function(){return this.get("data")},r.getInlineStyleAt=function(e){e=this.getCharacterList().get(e);return e?e.getStyle():l},r.getEntityAt=function(e){e=this.getCharacterList().get(e);return e?e.getEntity():null},r.findStyleRanges=function(e,t){i(this.getCharacterList(),f,e,t)},r.findEntityRanges=function(e,t){i(this.getCharacterList(),p,e,t)},n}(n);function f(e,t){return e.getStyle()===t.getStyle()}function p(e,t){return e.getEntity()===t.getEntity()}e.exports=s},function(e,t,n){"use strict";function r(e){return e.replace(/\//g,"-")}e.exports=function(t){return("object"==typeof t?Object.keys(t).filter(function(e){return t[e]}).map(r):Array.prototype.map.call(arguments,r)).join(" ")}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.ownerDocument)&&e.nodeType===Node.ELEMENT_NODE}},function(e,t,n){"use strict";var r=n(7),o=55296,i=57343,a=/[\uD800-\uDFFF]/;function s(e){return o<=e&&e<=i}function c(e){return a.test(e)}function u(e,t){return 1+s(e.charCodeAt(t))}function l(e,t,n){if(t=t||0,n=void 0===n?1/0:n||0,!c(e))return e.substr(t,n);var r=e.length;if(r<=0||r<t||n<=0)return"";var o=0;if(0<t){for(;0<t&&o<r;t--)o+=u(e,o);if(r<=o)return""}else if(t<0){for(o=r;t<0&&0<o;t++)o-=u(e,o-1);o<0&&(o=0)}var i=r;if(n<r)for(i=o;0<n&&i<r;n--)i+=u(e,i);return e.substring(o,i)}e.exports={getCodePoints:function(e){for(var t=[],n=0;n<e.length;n+=u(e,n))t.push(e.codePointAt(n));return t},getUTF16Length:u,hasSurrogateUnit:c,isCodeUnitInSurrogateRange:s,isSurrogatePair:function(e,t){if(0<=t&&t<e.length||r(!1),t+1===e.length)return!1;var n=e.charCodeAt(t),e=e.charCodeAt(t+1);return o<=n&&n<=56319&&56320<=e&&e<=i},strlen:function(e){if(!c(e))return e.length;for(var t=0,n=0;n<e.length;n+=u(e,n))t++;return t},substring:function(e,t,n){(t=t||0)<0&&(t=0),(n=void 0===n?1/0:n||0)<0&&(n=0);var r=Math.abs(n-t);return l(e,t=t<n?t:n,r)},substr:l}},function(e,t){e.exports=ReactDOM},function(e,t){var n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(R,e,t){"use strict";t.r(e),t.d(e,"Collection",function(){return u}),t.d(e,"Iterable",function(){return Cr}),t.d(e,"List",function(){return gn}),t.d(e,"Map",function(){return Yt}),t.d(e,"OrderedMap",function(){return N}),t.d(e,"OrderedSet",function(){return pr}),t.d(e,"Range",function(){return $n}),t.d(e,"Record",function(){return A}),t.d(e,"Repeat",function(){return _r}),t.d(e,"Seq",function(){return C}),t.d(e,"Set",function(){return qn}),t.d(e,"Stack",function(){return An}),t.d(e,"fromJS",function(){return wr}),t.d(e,"get",function(){return mt}),t.d(e,"getIn",function(){return Zn}),t.d(e,"has",function(){return gt}),t.d(e,"hasIn",function(){return Xn}),t.d(e,"hash",function(){return k}),t.d(e,"is",function(){return x}),t.d(e,"isAssociative",function(){return Z}),t.d(e,"isCollection",function(){return l}),t.d(e,"isImmutable",function(){return p}),t.d(e,"isIndexed",function(){return s}),t.d(e,"isKeyed",function(){return c}),t.d(e,"isList",function(){return hn}),t.d(e,"isMap",function(){return Oe}),t.d(e,"isOrdered",function(){return d}),t.d(e,"isOrderedMap",function(){return xe}),t.d(e,"isOrderedSet",function(){return Bn}),t.d(e,"isPlainObject",function(){return dt}),t.d(e,"isRecord",function(){return ne}),t.d(e,"isSeq",function(){return ee}),t.d(e,"isSet",function(){return Fn}),t.d(e,"isStack",function(){return Mn}),t.d(e,"isValueObject",function(){return ke}),t.d(e,"merge",function(){return Mt}),t.d(e,"mergeDeep",function(){return At}),t.d(e,"mergeDeepWith",function(){return Pt}),t.d(e,"mergeWith",function(){return Nt}),t.d(e,"remove",function(){return bt}),t.d(e,"removeIn",function(){return Ct}),t.d(e,"set",function(){return _t}),t.d(e,"setIn",function(){return St}),t.d(e,"update",function(){return xt}),t.d(e,"updateIn",function(){return wt}),t.d(e,"version",function(){return Er});var t="delete",_=5,w=1<<_,b=w-1,S={};function L(){return{value:!1}}function m(e){e&&(e.value=!0)}function F(){}function B(e){return void 0===e.size&&(e.size=e.__iterate(K)),e.size}function z(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295==n)return NaN;t=n}return t<0?B(e)+t:t}function K(){return!0}function H(e,t,n){return(0===e&&!V(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&n<=t)}function U(e,t){return W(e,t,0)}function q(e,t){return W(e,t,t)}function W(e,t,n){return void 0===e?n:V(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function V(e){return e<0||0===e&&1/e==-1/0}var G="@@__IMMUTABLE_ITERABLE__@@";function l(e){return Boolean(e&&e[G])}var Y="@@__IMMUTABLE_KEYED__@@";function c(e){return Boolean(e&&e[Y])}var $="@@__IMMUTABLE_INDEXED__@@";function s(e){return Boolean(e&&e[$])}function Z(e){return c(e)||s(e)}var u=function(e){return l(e)?e:C(e)},f=function(e){function t(e){return c(e)?e:ye(e)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t}(u),J=function(e){function t(e){return s(e)?e:O(e)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t}(u),X=function(e){function t(e){return l(e)&&!Z(e)?e:ge(e)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t}(u),Q=(u.Keyed=f,u.Indexed=J,u.Set=X,"@@__IMMUTABLE_SEQ__@@");function ee(e){return Boolean(e&&e[Q])}var te="@@__IMMUTABLE_RECORD__@@";function ne(e){return Boolean(e&&e[te])}function p(e){return l(e)||ne(e)}var re="@@__IMMUTABLE_ORDERED__@@";function d(e){return Boolean(e&&e[re])}var oe=0,h=1,y=2,ie="function"==typeof Symbol&&Symbol.iterator,ae="@@iterator",se=ie||ae,g=function(e){this.next=e};function v(e,t,n,r){e=0===e?t:1===e?n:[t,n];return r?r.value=e:r={value:e,done:!1},r}function E(){return{value:void 0,done:!0}}function ce(e){return Array.isArray(e)||fe(e)}function ue(e){return e&&"function"==typeof e.next}function le(e){var t=fe(e);return t&&t.call(e)}function fe(e){e=e&&(ie&&e[ie]||e[ae]);if("function"==typeof e)return e}g.prototype.toString=function(){return"[Iterator]"},g.KEYS=oe,g.VALUES=h,g.ENTRIES=y,g.prototype.inspect=g.prototype.toSource=function(){return this.toString()},g.prototype[se]=function(){return this};var pe=Object.prototype.hasOwnProperty;function de(e){return Array.isArray(e)||"string"==typeof e||e&&"object"==typeof e&&Number.isInteger(e.length)&&0<=e.length&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var he,C=function(e){function t(e){{if(null==e)return _e();if(p(e))return e.toSeq();var t=Ee(e);if(t)return function(e){var t=fe(e);return t&&t===e.entries}(e)?t.fromEntrySeq():function(e){var t=fe(e);return t&&t===e.keys}(e)?t.toSetSeq():t;if("object"!=typeof e)throw new TypeError("Expected Array or collection object of values, or keyed object: "+e);return new ve(e)}}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,o=0;o!==r;){var i=n[t?r-++o:o++];if(!1===e(i[1],i[0],this))break}return o}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(t,n){var r,o,i=this._cache;return i?(r=i.length,o=0,new g(function(){if(o===r)return E();var e=i[n?r-++o:o++];return v(t,e[0],e[1])})):this.__iteratorUncached(t,n)},t}(u),ye=function(e){function t(e){return null==e?_e().toKeyedSeq():l(e)?c(e)?e.toSeq():e.fromEntrySeq():ne(e)?e.toSeq():we(e)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.toKeyedSeq=function(){return this},t}(C),O=function(e){function t(e){return null==e?_e():l(e)?c(e)?e.entrySeq():e.toIndexedSeq():ne(e)?e.toSeq().entrySeq():Se(e)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(C),ge=function(e){function t(e){return(l(e)&&!Z(e)?e:O(e)).toSetSeq()}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(C),me=(C.isSeq=ee,C.Keyed=ye,C.Set=ge,C.Indexed=O,C.prototype[Q]=!0,function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.get=function(e,t){return this.has(e)?this._array[z(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,o=0;o!==r;){var i=t?r-++o:o++;if(!1===e(n[i],i,this))break}return o},t.prototype.__iterator=function(t,n){var r=this._array,o=r.length,i=0;return new g(function(){if(i===o)return E();var e=n?o-++i:i++;return v(t,e,r[e])})},t}(O)),ve=function(e){function t(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return pe.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length,i=0;i!==o;){var a=r[t?o-++i:i++];if(!1===e(n[a],a,this))break}return i},t.prototype.__iterator=function(t,n){var r=this._object,o=this._keys,i=o.length,a=0;return new g(function(){if(a===i)return E();var e=o[n?i-++a:a++];return v(t,e,r[e])})},t}(ye),be=(ve.prototype[re]=!0,function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n,r=le(this._collection),o=0;if(ue(r))for(;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},t.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=le(this._collection);if(!ue(n))return new g(E);var r=0;return new g(function(){var e=n.next();return e.done?e:v(t,r++,e.value)})},t}(O));function _e(){return he=he||new me([])}function we(e){var t=Ee(e);if(t)return t.fromEntrySeq();if("object"==typeof e)return new ve(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function Se(e){var t=Ee(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function Ee(e){return de(e)?new me(e):ce(e)?new be(e):void 0}var Ce="@@__IMMUTABLE_MAP__@@";function Oe(e){return Boolean(e&&e[Ce])}function xe(e){return Oe(e)&&d(e)}function ke(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function x(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(ke(e)&&ke(t)&&e.equals(t))}var De="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Te(e){return e>>>1&1073741824|3221225471&e}var je=Object.prototype.valueOf;function k(e){if(null==e)return Ie(e);if("function"==typeof e.hashCode)return Te(e.hashCode(e));var t=(e=e).valueOf!==je&&"function"==typeof e.valueOf?e.valueOf(e):e;if(null==t)return Ie(t);switch(typeof t){case"boolean":return t?1108378657:1108378656;case"number":var n=t;if(n!=n||n===1/0)return 0;var r=0|n;for(r!==n&&(r^=4294967295*n);4294967295<n;)r^=n/=4294967295;return Te(r);case"string":return(t.length>Ke?function(e){var t=qe[e];void 0===t&&(t=Me(e),Ue===He&&(Ue=0,qe={}),Ue++,qe[e]=t);return t}:Me)(t);case"object":case"function":var o,i=t;if(Le&&void 0!==(o=Re.get(i)))return o;if(void 0!==(o=i[ze]))return o;if(!Ae){if(void 0!==(o=i.propertyIsEnumerable&&i.propertyIsEnumerable[ze]))return o;if(void 0!==(o=function(e){if(e&&0<e.nodeType)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(i)))return o}if(o=Pe(),Le)Re.set(i,o);else{if(void 0!==Ne&&!1===Ne(i))throw new Error("Non-extensible objects are not allowed as keys.");if(Ae)Object.defineProperty(i,ze,{enumerable:!1,configurable:!1,writable:!1,value:o});else if(void 0!==i.propertyIsEnumerable&&i.propertyIsEnumerable===i.constructor.prototype.propertyIsEnumerable)i.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},i.propertyIsEnumerable[ze]=o;else{if(void 0===i.nodeType)throw new Error("Unable to set a non-enumerable property on object.");i[ze]=o}}return o;case"symbol":return void 0===(o=Fe[i=t])?(o=Pe(),Fe[i]=o):o;default:if("function"==typeof t.toString)return Me(t.toString());throw new Error("Value type "+typeof t+" cannot be hashed.")}}function Ie(e){return null===e?1108378658:1108378659}function Me(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Te(t)}var Ne=Object.isExtensible,Ae=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Pe(){var e=++Be;return 1073741824&Be&&(Be=0),e}var Re,Le="function"==typeof WeakMap,Fe=(Le&&(Re=new WeakMap),Object.create(null)),Be=0,ze="__immutablehash__",Ke=("function"==typeof Symbol&&(ze=Symbol(ze)),16),He=255,Ue=0,qe={},We=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=Je(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=Ze(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(n,e){var r=this;return this._iter.__iterate(function(e,t){return n(e,t,r)},e)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(ye),Ve=(We.prototype[re]=!0,function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(t,n){var r=this,o=0;return n&&B(this),this._iter.__iterate(function(e){return t(e,n?r.size-++o:o++,r)},n)},t.prototype.__iterator=function(t,n){var r=this,o=this._iter.__iterator(h,n),i=0;return n&&B(this),new g(function(){var e=o.next();return e.done?e:v(t,n?r.size-++i:i++,e.value,e)})},t}(O)),Ge=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},t.prototype.__iterator=function(t,e){var n=this._iter.__iterator(h,e);return new g(function(){var e=n.next();return e.done?e:v(t,e.value,e.value,e)})},t}(ge),Ye=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(n,e){var r=this;return this._iter.__iterate(function(e){var t;if(e)return at(e),t=l(e),n(t?e.get(1):e[1],t?e.get(0):e[0],r)},e)},t.prototype.__iterator=function(r,e){var o=this._iter.__iterator(h,e);return new g(function(){for(;;){var e=o.next();if(e.done)return e;var t,n=e.value;if(n)return at(n),t=l(n),v(r,t?n.get(0):n[0],t?n.get(1):n[1],e)}})},t}(ye);function $e(o){var e=r(o);return e._iter=o,e.size=o.size,e.flip=function(){return o},e.reverse=function(){var e=o.reverse.apply(this);return e.flip=function(){return o.reverse()},e},e.has=function(e){return o.includes(e)},e.includes=function(e){return o.has(e)},e.cacheResult=ct,e.__iterateUncached=function(n,e){var r=this;return o.__iterate(function(e,t){return!1!==n(t,e,r)},e)},e.__iteratorUncached=function(e,t){var n;return e===y?(n=o.__iterator(e,t),new g(function(){var e,t=n.next();return t.done||(e=t.value[0],t.value[0]=t.value[1],t.value[1]=e),t})):o.__iterator(e===h?oe:h,t)},e}function Ze(i,a,s){var e=r(i);return e.size=i.size,e.has=function(e){return i.has(e)},e.get=function(e,t){var n=i.get(e,S);return n===S?t:a.call(s,n,e,i)},e.__iterateUncached=function(r,e){var o=this;return i.__iterate(function(e,t,n){return!1!==r(a.call(s,e,t,n),t,o)},e)},e.__iteratorUncached=function(r,e){var o=i.__iterator(y,e);return new g(function(){var e=o.next();if(e.done)return e;var t=e.value,n=t[0];return v(r,n,a.call(s,t[1],n,i),e)})},e}function Je(a,s){var c=this,e=r(a);return e._iter=a,e.size=a.size,e.reverse=function(){return a},a.flip&&(e.flip=function(){var e=$e(a);return e.reverse=function(){return a.flip()},e}),e.get=function(e,t){return a.get(s?e:-1-e,t)},e.has=function(e){return a.has(s?e:-1-e)},e.includes=function(e){return a.includes(e)},e.cacheResult=ct,e.__iterate=function(n,r){var o=this,i=0;return r&&B(a),a.__iterate(function(e,t){return n(e,s?t:r?o.size-++i:i++,o)},!r)},e.__iterator=function(n,r){var o=0,i=(r&&B(a),a.__iterator(y,!r));return new g(function(){var e=i.next();if(e.done)return e;var t=e.value;return v(n,s?t[0]:r?c.size-++o:o++,t[1],e)})},e}function Xe(a,s,c,u){var e=r(a);return u&&(e.has=function(e){var t=a.get(e,S);return t!==S&&!!s.call(c,t,e,a)},e.get=function(e,t){var n=a.get(e,S);return n!==S&&s.call(c,n,e,a)?n:t}),e.__iterateUncached=function(r,e){var o=this,i=0;return a.__iterate(function(e,t,n){if(s.call(c,e,t,n))return i++,r(e,u?t:i-1,o)},e),i},e.__iteratorUncached=function(r,e){var o=a.__iterator(y,e),i=0;return new g(function(){for(;;){var e=o.next();if(e.done)return e;var t=e.value,n=t[0],t=t[1];if(s.call(c,t,n,a))return v(r,u?n:i++,t,e)}})},e}function Qe(s,e,t,c){var n=s.size;if(H(e,t,n))return s;var u=U(e,n),n=q(t,n);if(u!=u||n!=n)return Qe(s.toSeq().cacheResult(),e,t,c);var l,e=n-u,t=(e==e&&(l=e<0?0:e),r(s));return t.size=0===l?l:s.size&&l||void 0,!c&&ee(s)&&0<=l&&(t.get=function(e,t){return 0<=(e=z(this,e))&&e<l?s.get(e+u,t):t}),t.__iterateUncached=function(n,e){var r=this;if(0===l)return 0;if(e)return this.cacheResult().__iterate(n,e);var o=0,i=!0,a=0;return s.__iterate(function(e,t){if(!(i=i&&o++<u))return a++,!1!==n(e,c?t:a-1,r)&&a!==l}),a},t.__iteratorUncached=function(t,e){if(0!==l&&e)return this.cacheResult().__iterator(t,e);if(0===l)return new g(E);var n=s.__iterator(t,e),r=0,o=0;return new g(function(){for(;r++<u;)n.next();if(++o>l)return E();var e=n.next();return c||t===h||e.done?e:v(t,o-1,t===oe?void 0:e.value[1],e)})},t}function et(t,u,l,f){var e=r(t);return e.__iterateUncached=function(r,e){var o=this;if(e)return this.cacheResult().__iterate(r,e);var i=!0,a=0;return t.__iterate(function(e,t,n){if(!(i=i&&u.call(l,e,t,n)))return a++,r(e,f?t:a-1,o)}),a},e.__iteratorUncached=function(o,e){var i=this;if(e)return this.cacheResult().__iterator(o,e);var a=t.__iterator(y,e),s=!0,c=0;return new g(function(){var e;do{if((e=a.next()).done)return f||o===h?e:v(o,c++,o===oe?void 0:e.value[1],e);var t=e.value,n=t[0],r=t[1]}while(s=s&&u.call(l,r,n,i));return o===y?e:v(o,n,r,e)})},e}function tt(e,s,c){var u=r(e);return u.__iterateUncached=function(o,t){if(t)return this.cacheResult().__iterate(o,t);var i=0,a=!1;return function n(e,r){e.__iterate(function(e,t){return(!s||r<s)&&l(e)?n(e,r+1):(i++,!1===o(e,c?t:i-1,u)&&(a=!0)),!a},t)}(e,0),i},u.__iteratorUncached=function(n,r){if(r)return this.cacheResult().__iterator(n,r);var o=e.__iterator(n,r),i=[],a=0;return new g(function(){for(;o;){var e=o.next();if(!1!==e.done)o=i.pop();else{var t=e.value;if(n===y&&(t=t[1]),s&&!(i.length<s)||!l(t))return c?e:v(n,a++,t,e);i.push(o),o=t.__iterator(n,r)}}return E()})},u}function nt(n,r,o){r=r||ut;var e=c(n),i=0,a=n.toSeq().map(function(e,t){return[t,e,i++,o?o(e,t,n):e]}).valueSeq().toArray();return a.sort(function(e,t){return r(e[3],t[3])||e[2]-t[2]}).forEach(e?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]}),(e?ye:s(n)?O:ge)(a)}function rt(n,r,o){var e;return r=r||ut,o?(e=n.toSeq().map(function(e,t){return[e,o(e,t,n)]}).reduce(function(e,t){return ot(r,e[1],t[1])?t:e}))&&e[0]:n.reduce(function(e,t){return ot(r,e,t)?t:e})}function ot(e,t,n){e=e(n,t);return 0===e&&n!==t&&(null==n||n!=n)||0<e}function it(e,a,s,c){var e=r(e),t=new me(s).map(function(e){return e.size});return e.size=c?t.max():t.min(),e.__iterate=function(e,t){for(var n,r=this.__iterator(h,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},e.__iteratorUncached=function(t,n){var r=s.map(function(e){return e=u(e),le(n?e.reverse():e)}),o=0,i=!1;return new g(function(){var e;return i||(e=r.map(function(e){return e.next()}),i=c?e.every(function(e){return e.done}):e.some(function(e){return e.done})),i?E():v(t,o++,a.apply(null,e.map(function(e){return e.value})))})},e}function D(e,t){return e===t?e:ee(e)?t:e.constructor(t)}function at(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function st(e){return c(e)?f:s(e)?J:X}function r(e){return Object.create((c(e)?ye:s(e)?O:ge).prototype)}function ct(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):C.prototype.cacheResult.call(this)}function ut(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:t<e?1:e<t?-1:0}function T(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function lt(e,t){if(!e)throw new Error(t)}function j(e){lt(e!==1/0,"Cannot perform this action with an infinite size.")}function ft(e){if(de(e)&&"string"!=typeof e)return e;if(d(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}Ve.prototype.cacheResult=We.prototype.cacheResult=Ge.prototype.cacheResult=Ye.prototype.cacheResult=ct;var pt=Object.prototype.toString;function dt(e){if(!e||"object"!=typeof e||"[object Object]"!==pt.call(e))return!1;e=Object.getPrototypeOf(e);if(null===e)return!0;for(var t=e,n=Object.getPrototypeOf(e);null!==n;)t=n,n=Object.getPrototypeOf(t);return t===e}function ht(e){return"object"==typeof e&&(p(e)||Array.isArray(e)||dt(e))}function yt(t){try{return"string"==typeof t?JSON.stringify(t):String(t)}catch(e){return JSON.stringify(t)}}function gt(e,t){return p(e)?e.has(t):ht(e)&&pe.call(e,t)}function mt(e,t,n){return p(e)?e.get(t,n):gt(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function vt(e){if(Array.isArray(e))return T(e);var t,n={};for(t in e)pe.call(e,t)&&(n[t]=e[t]);return n}function bt(e,t){if(!ht(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(p(e)){if(e.remove)return e.remove(t);throw new TypeError("Cannot update immutable value without .remove() method: "+e)}if(!pe.call(e,t))return e;e=vt(e);return Array.isArray(e)?e.splice(t,1):delete e[t],e}function _t(e,t,n){if(!ht(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(p(e)){if(e.set)return e.set(t,n);throw new TypeError("Cannot update immutable value without .set() method: "+e)}if(pe.call(e,t)&&n===e[t])return e;e=vt(e);return e[t]=n,e}function wt(e,t,n,r){r||(r=n,n=void 0);e=function e(t,n,r,o,i,a){var s=n===S;if(o===r.length)return(u=a(c=s?i:n))===c?n:u;if(!s&&!ht(n))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,o).map(yt)+"]: "+n);var c=r[o];var u=s?S:mt(n,c,S);r=e(u===S?t:p(u),u,r,o+1,i,a);return r===u?n:r===S?bt(n,c):_t(s?t?I():{}:n,c,r)}(p(e),e,ft(t),0,n,r);return e===S?n:e}function St(e,t,n){return wt(e,t,S,function(){return n})}function Et(e,t){return St(this,e,t)}function Ct(e,t){return wt(e,t,function(){return S})}function Ot(e){return Ct(this,e)}function xt(e,t,n,r){return wt(e,[t],n,r)}function kt(e,t,n){return 1===arguments.length?e(this):xt(this,e,t,n)}function Dt(e,t,n){return wt(this,e,t,n)}function Tt(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return It(this,e)}function jt(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return It(this,t,e)}function It(e,t,o){for(var n=[],r=0;r<t.length;r++){var i=f(t[r]);0!==i.size&&n.push(i)}return 0===n.length?e:0!==e.toSeq().size||e.__ownerID||1!==n.length?e.withMutations(function(r){for(var e=o?function(t,n){xt(r,n,S,function(e){return e===S?t:o(e,t,n)})}:function(e,t){r.set(t,e)},t=0;t<n.length;t++)n[t].forEach(e)}):e.constructor(n[0])}function Mt(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return Lt(e,t)}function Nt(e,t){for(var n=[],r=arguments.length-2;0<r--;)n[r]=arguments[r+2];return Lt(t,n,e)}function At(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return Rt(e,t)}function Pt(e,t){for(var n=[],r=arguments.length-2;0<r--;)n[r]=arguments[r+2];return Rt(t,n,e)}function Rt(e,t,n){return Lt(e,t,(o=n,function e(t,n,r){return ht(t)&&ht(n)&&function(e,t){return e=C(e),t=C(t),s(e)===s(t)&&c(e)===c(t)}(t,n)?Lt(t,[n],e):o?o(t,n,r):n}));var o}function Lt(r,e,o){if(!ht(r))throw new TypeError("Cannot merge into non-data-structure value: "+r);if(p(r))return"function"==typeof o&&r.mergeWith?r.mergeWith.apply(r,[o].concat(e)):(r.merge||r.concat).apply(r,e);for(var t=Array.isArray(r),i=r,n=t?J:f,a=t?function(e){(i=i===r?vt(i):i).push(e)}:function(e,t){var n=pe.call(i,t),e=n&&o?o(i[t],e,t):e;n&&e===i[t]||((i=i===r?vt(i):i)[t]=e)},s=0;s<e.length;s++)n(e[s]).forEach(a);return i}function Ft(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Rt(this,e)}function Bt(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return Rt(this,t,e)}function zt(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return wt(this,e,I(),function(e){return Lt(e,t)})}function Kt(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return wt(this,e,I(),function(e){return Rt(e,t)})}function Ht(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Ut(){return this.__ownerID?this:this.__ensureOwner(new F)}function qt(){return this.__ensureOwner()}function Wt(){return this.__altered}function Vt(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}var Gt,Yt=function(r){function e(t){return null==t?I():Oe(t)&&!d(t)?t:I().withMutations(function(n){var e=r(t);j(e.size),e.forEach(function(e,t){return n.set(t,e)})})}return r&&(e.__proto__=r),((e.prototype=Object.create(r&&r.prototype)).constructor=e).of=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return I().withMutations(function(e){for(var t=0;t<n.length;t+=2){if(t+1>=n.length)throw new Error("Missing value for key: "+n[t]);e.set(n[t],n[t+1])}})},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},e.prototype.set=function(e,t){return rn(this,e,t)},e.prototype.remove=function(e){return rn(this,e,S)},e.prototype.deleteAll=function(e){var n=u(e);return 0===n.size?this:this.withMutations(function(t){n.forEach(function(e){return t.remove(e)})})},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):I()},e.prototype.sort=function(e){return N(nt(this,e))},e.prototype.sortBy=function(e,t){return N(nt(this,t,e))},e.prototype.map=function(r,o){var i=this;return this.withMutations(function(n){n.forEach(function(e,t){n.set(t,r.call(o,e,t,i))})})},e.prototype.__iterator=function(e,t){return new Qt(this,e,t)},e.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},e.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?nn(this.size,this._root,e,this.__hash):0===this.size?I():(this.__ownerID=e,this.__altered=!1,this)},e}(f),i=(Yt.isMap=Oe,Yt.prototype),$t=(i[Ce]=!0,i[t]=i.remove,i.removeAll=i.deleteAll,i.setIn=Et,i.removeIn=i.deleteIn=Ot,i.update=kt,i.updateIn=Dt,i.merge=i.concat=Tt,i.mergeWith=jt,i.mergeDeep=Ft,i.mergeDeepWith=Bt,i.mergeIn=zt,i.mergeDeepIn=Kt,i.withMutations=Ht,i.wasAltered=Wt,i.asImmutable=qt,i["@@transducer/init"]=i.asMutable=Ut,i["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},i["@@transducer/result"]=function(e){return e.asImmutable()},function(e,t){this.ownerID=e,this.entries=t}),Zt=($t.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(x(n,o[i][0]))return o[i][1];return r},$t.prototype.update=function(e,t,n,r,o,i,a){for(var s=o===S,c=this.entries,u=0,l=c.length;u<l&&!x(r,c[u][0]);u++);var f=u<l;if(f?c[u][1]===o:s)return this;if(m(a),!s&&f||m(i),!s||1!==c.length){if(!f&&!s&&c.length>=ln){var p=e,d=c,a=r,i=o;p=p||new F;for(var h=new Xt(p,k(a),[a,i]),y=0;y<d.length;y++){var g=d[y];h=h.update(p,0,void 0,g[0],g[1])}return h}a=e&&e===this.ownerID,i=a?c:T(c);return f?s?u===l-1?i.pop():i[u]=i.pop():i[u]=[r,o]:i.push([r,o]),a?(this.entries=i,this):new $t(e,i)}},Vt.prototype.get=function(e,t,n,r){void 0===t&&(t=k(n));var o=1<<((0===e?t:t>>>e)&b),i=this.bitmap;return 0==(i&o)?r:this.nodes[cn(i&o-1)].get(e+_,t,n,r)},Vt.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=k(r));var s=(0===t?n:n>>>t)&b,c=1<<s,u=this.bitmap,l=0!=(u&c);if(!l&&o===S)return this;var f=cn(u&c-1),p=this.nodes,d=l?p[f]:void 0,t=on(d,e,t+_,n,r,o,i,a);if(t===d)return this;if(!l&&t&&p.length>=fn){for(var n=e,h=p,y=u,r=s,o=t,g=0,m=new Array(w),v=0;0!==y;v++,y>>>=1)m[v]=1&y?h[g++]:void 0;return m[r]=o,new Zt(n,g+1,m)}if(l&&!t&&2===p.length&&an(p[1^f]))return p[1^f];if(l&&t&&1===p.length&&an(t))return t;i=e&&e===this.ownerID,a=l?t?u:u^c:u|c,d=l?t?un(p,f,t,i):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),i=0,a=0;a<r;a++)a===t&&(i=1),o[a]=e[a+i];return o}(p,f,i):function(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var i=new Array(o),a=0,s=0;s<o;s++)s===t?(i[s]=n,a=-1):i[s]=e[s+a];return i}(p,f,t,i);return i?(this.bitmap=a,this.nodes=d,this):new Vt(e,a,d)},function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}),Jt=(Zt.prototype.get=function(e,t,n,r){void 0===t&&(t=k(n));var o=this.nodes[(0===e?t:t>>>e)&b];return o?o.get(e+_,t,n,r):r},Zt.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=k(r));var s=(0===t?n:n>>>t)&b,c=this.nodes,u=c[s];if(o===S&&!u)return this;t=on(u,e,t+_,n,r,o,i,a);if(t===u)return this;n=this.count;if(u){if(!t&&--n<pn){for(var r=e,l=c,f=s,p=0,d=0,h=new Array(n),y=0,g=1,m=l.length;y<m;y++,g<<=1){var v=l[y];void 0!==v&&y!==f&&(p|=g,h[d++]=v)}return new Vt(r,p,h)}}else n++;o=e&&e===this.ownerID,i=un(c,s,t,o);return o?(this.count=n,this.nodes=i,this):new Zt(e,n,i)},function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}),Xt=(Jt.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(x(n,o[i][0]))return o[i][1];return r},Jt.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=k(r));var s=o===S;if(n!==this.keyHash)return s?this:(m(a),m(i),sn(this,e,t,n,[r,o]));for(var c=this.entries,u=0,l=c.length;u<l&&!x(r,c[u][0]);u++);t=u<l;if(t?c[u][1]===o:s)return this;if(m(a),!s&&t||m(i),s&&2===l)return new Xt(e,this.keyHash,c[1^u]);n=e&&e===this.ownerID,a=n?c:T(c);return t?s?u===l-1?a.pop():a[u]=a.pop():a[u]=[r,o]:a.push([r,o]),n?(this.entries=a,this):new Jt(e,this.keyHash,a)},function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}),Qt=(Xt.prototype.get=function(e,t,n,r){return x(n,this.entry[0])?this.entry[1]:r},Xt.prototype.update=function(e,t,n,r,o,i,a){var s=o===S,c=x(r,this.entry[0]);return(c?o===this.entry[1]:s)?this:(m(a),s?void m(i):c?e&&e===this.ownerID?(this.entry[1]=o,this):new Xt(e,this.keyHash,[r,o]):(m(i),sn(this,e,t,k(r),[r,o])))},$t.prototype.iterate=Jt.prototype.iterate=function(e,t){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===e(n[t?o-r:r]))return!1},Vt.prototype.iterate=Zt.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var i=n[t?o-r:r];if(i&&!1===i.iterate(e,t))return!1}},Xt.prototype.iterate=function(e,t){return e(this.entry)},function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&tn(e._root)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,o=void 0;if(n.entry){if(0==r)return en(e,n.entry)}else if(n.entries){if(r<=(o=n.entries.length-1))return en(e,n.entries[this._reverse?o-r:r])}else if(r<=(o=n.nodes.length-1)){n=n.nodes[this._reverse?o-r:r];if(n){if(n.entry)return en(e,n.entry);t=this._stack=tn(n,t)}continue}t=this._stack=this._stack.__prev}return E()},t}(g));function en(e,t){return v(e,t[0],t[1])}function tn(e,t){return{node:e,index:0,__prev:t}}function nn(e,t,n,r){var o=Object.create(i);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function I(){return Gt=Gt||nn(0)}function rn(e,t,n){if(e._root){var r=L(),o=L(),i=on(e._root,e.__ownerID,0,void 0,t,n,r,o);if(!o.value)return e;o=e.size+(r.value?n===S?-1:1:0)}else{if(n===S)return e;o=1,i=new $t(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=i,e.__hash=void 0,e.__altered=!0,e):i?nn(o,i):I()}function on(e,t,n,r,o,i,a,s){return e?e.update(t,n,r,o,i,a,s):i===S?e:(m(s),m(a),new Xt(t,r,[o,i]))}function an(e){return e.constructor===Xt||e.constructor===Jt}function sn(e,t,n,r,o){if(e.keyHash===r)return new Jt(t,r,[e.entry,o]);var i=(0===n?e.keyHash:e.keyHash>>>n)&b,a=(0===n?r:r>>>n)&b,r=i==a?[sn(e,t,n+_,r,o)]:(n=new Xt(t,r,o),i<a?[e,n]:[n,e]);return new Vt(t,1<<i|1<<a,r)}function cn(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,127&(e=(e+=e>>8)+(e>>16))}function un(e,t,n,r){r=r?e:T(e);return r[t]=n,r}var ln=w/4,fn=w/2,pn=w/4,dn="@@__IMMUTABLE_LIST__@@";function hn(e){return Boolean(e&&e[dn])}var yn,gn=function(i){function e(e){var t=wn();if(null==e)return t;if(hn(e))return e;var r=i(e),o=r.size;return 0===o?t:(j(o),0<o&&o<w?_n(0,o,_,null,new mn(r.toArray())):t.withMutations(function(n){n.setSize(o),r.forEach(function(e,t){return n.set(t,e)})}))}return i&&(e.__proto__=i),((e.prototype=Object.create(i&&i.prototype)).constructor=e).of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(e,t){var n;return 0<=(e=z(this,e))&&e<this.size?(n=Cn(this,e+=this._origin))&&n.array[e&b]:t},e.prototype.set=function(e,t){var n=this,r=e,o=t;if((r=z(n,r))!==r)return n;if(r>=n.size||r<0)return n.withMutations(function(e){r<0?On(e,r).set(0,o):On(e,0,r+1).set(r,o)});r+=n._origin;var e=n._tail,t=n._root,i=L();return r>=xn(n._capacity)?e=Sn(e,n.__ownerID,0,r,o,i):t=Sn(t,n.__ownerID,n._level,r,o,i),i.value?n.__ownerID?(n._root=t,n._tail=e,n.__hash=void 0,n.__altered=!0,n):_n(n._origin,n._capacity,n._level,t,e):n},e.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},e.prototype.insert=function(e,t){return this.splice(e,0,t)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=_,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):wn()},e.prototype.push=function(){var n=arguments,r=this.size;return this.withMutations(function(e){On(e,0,r+n.length);for(var t=0;t<n.length;t++)e.set(r+t,n[t])})},e.prototype.pop=function(){return On(this,0,-1)},e.prototype.unshift=function(){var n=arguments;return this.withMutations(function(e){On(e,-n.length);for(var t=0;t<n.length;t++)e.set(t,n[t])})},e.prototype.shift=function(){return On(this,1)},e.prototype.concat=function(){for(var e=arguments,n=[],t=0;t<arguments.length;t++){var r=e[t],r=i("string"!=typeof r&&ce(r)?r:[r]);0!==r.size&&n.push(r)}return 0===n.length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations(function(t){n.forEach(function(e){return e.forEach(function(e){return t.push(e)})})}):this.constructor(n[0])},e.prototype.setSize=function(e){return On(this,0,e)},e.prototype.map=function(n,r){var o=this;return this.withMutations(function(e){for(var t=0;t<o.size;t++)e.set(t,n.call(r,e.get(t),t,o))})},e.prototype.slice=function(e,t){var n=this.size;return H(e,t,n)?this:On(this,U(e,n),q(t,n))},e.prototype.__iterator=function(t,n){var r=n?this.size:0,o=bn(this,n);return new g(function(){var e=o();return e===vn?E():v(t,n?--r:r++,e)})},e.prototype.__iterate=function(e,t){for(var n,r=t?this.size:0,o=bn(this,t);(n=o())!==vn&&!1!==e(n,t?--r:r++,this););return r},e.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?_n(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?wn():(this.__ownerID=e,this.__altered=!1,this)},e}(J),M=(gn.isList=hn,gn.prototype),mn=(M[dn]=!0,M[t]=M.remove,M.merge=M.concat,M.setIn=Et,M.deleteIn=M.removeIn=Ot,M.update=kt,M.updateIn=Dt,M.mergeIn=zt,M.mergeDeepIn=Kt,M.withMutations=Ht,M.wasAltered=Wt,M.asImmutable=qt,M["@@transducer/init"]=M.asMutable=Ut,M["@@transducer/step"]=function(e,t){return e.push(t)},M["@@transducer/result"]=function(e){return e.asImmutable()},function(e,t){this.array=e,this.ownerID=t}),vn=(mn.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&b;if(r>=this.array.length)return new mn([],e);var o=0==r;if(0<t){var i,a=this.array[r];if((i=a&&a.removeBefore(e,t-_,n))===a&&o)return this}if(o&&!i)return this;var s=En(this,e);if(!o)for(var c=0;c<r;c++)s.array[c]=void 0;return i&&(s.array[r]=i),s},mn.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r=n-1>>>t&b;if(r>=this.array.length)return this;if(0<t){var o,i=this.array[r];if((o=i&&i.removeAfter(e,t-_,n))===i&&r==this.array.length-1)return this}t=En(this,e);return t.array.splice(1+r),o&&(t.array[r]=o),t},{});function bn(e,h){var y=e._origin,g=e._capacity,m=xn(g),v=e._tail;return b(e._root,e._level,0);function b(e,t,n){var r,o,i,a,s,c,u,l,f,p,d;return 0===t?(s=e,r=n,o=r===m?v&&v.array:s&&s.array,i=y<r?0:y-r,a=g-r,w<a&&(a=w),function(){if(i===a)return vn;var e=h?--a:i++;return o&&o[e]}):(s=e,c=t,u=n,f=s&&s.array,p=y<u?0:y-u>>c,d=1+(g-u>>c),w<d&&(d=w),function(){for(;;){if(l){var e=l();if(e!==vn)return e;l=null}if(p===d)return vn;e=h?--d:p++;l=b(f&&f[e],c-_,u+(e<<c))}})}}function _n(e,t,n,r,o,i,a){var s=Object.create(M);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=o,s.__ownerID=i,s.__hash=a,s.__altered=!1,s}function wn(){return yn=yn||_n(0,0,_)}function Sn(e,t,n,r,o,i){var a,s,c=r>>>n&b,u=e&&c<e.array.length;return u||void 0!==o?0<n?(n=Sn(s=e&&e.array[c],t,n-_,r,o,i))===s?e:((a=En(e,t)).array[c]=n,a):u&&e.array[c]===o?e:(i&&m(i),a=En(e,t),void 0===o&&c==a.array.length-1?a.array.pop():a.array[c]=o,a):e}function En(e,t){return t&&e&&t===e.ownerID?e:new mn(e?e.array.slice():[],t)}function Cn(e,t){if(t>=xn(e._capacity))return e._tail;if(t<1<<e._level+_){for(var n=e._root,r=e._level;n&&0<r;)n=n.array[t>>>r&b],r-=_;return n}}function On(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new F,o=e._origin,i=e._capacity,a=o+t,t=void 0===n?i:n<0?i+n:o+n;if(a===o&&t===i)return e;if(t<=a)return e.clear();for(var s=e._level,c=e._root,u=0;a+u<0;)c=new mn(c&&c.array.length?[void 0,c]:[],r),u+=1<<(s+=_);u&&(a+=u,o+=u,t+=u,i+=u);for(var l=xn(i),f=xn(t);1<<s+_<=f;)c=new mn(c&&c.array.length?[c]:[],r),s+=_;var n=e._tail,p=f<l?Cn(e,t-1):l<f?new mn([],r):n;if(n&&l<f&&a<i&&n.array.length){for(var d=c=En(c,r),h=s;_<h;h-=_)var y=l>>>h&b,d=d.array[y]=En(d.array[y],r);d.array[l>>>_&b]=n}if(t<i&&(p=p&&p.removeAfter(r,0,t)),f<=a)a-=f,t-=f,s=_,c=null,p=p&&p.removeBefore(r,0,a);else if(o<a||f<l){for(u=0;c;){var g=a>>>s&b;if(g!=f>>>s&b)break;g&&(u+=(1<<s)*g),s-=_,c=c.array[g]}(c=c&&o<a?c.removeBefore(r,s,a-u):c)&&f<l&&(c=c.removeAfter(r,s,f-u)),u&&(a-=u,t-=u)}return e.__ownerID?(e.size=t-a,e._origin=a,e._capacity=t,e._level=s,e._root=c,e._tail=p,e.__hash=void 0,e.__altered=!0,e):_n(a,t,s,c,p)}function xn(e){return e<w?0:e-1>>>_<<_}var kn,N=function(e){function t(t){return null==t?Tn():xe(t)?t:Tn().withMutations(function(n){var e=f(t);j(e.size),e.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){e=this._map.get(e);return void 0!==e?this._list.get(e)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):Tn()},t.prototype.set=function(e,t){return jn(this,e,t)},t.prototype.remove=function(e){return jn(this,e,S)},t.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Dn(t,n,e,this.__hash):0===this.size?Tn():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=n,this)},t}(Yt);function Dn(e,t,n,r){var o=Object.create(N.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Tn(){return kn=kn||Dn(I(),wn())}function jn(e,t,n){var r,o,i=e._map,a=e._list,s=i.get(t),c=void 0!==s;if(n===S){if(!c)return e;a.size>=w&&a.size>=2*i.size?(r=(o=a.filter(function(e,t){return void 0!==e&&s!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=i.remove(t),o=s===a.size-1?a.pop():a.set(s,void 0))}else if(c){if(n===a.get(s)[1])return e;r=i,o=a.set(s,[t,n])}else r=i.set(t,a.size),o=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e.__altered=!0,e):Dn(r,o)}N.isOrderedMap=xe,N.prototype[re]=!0,N.prototype[t]=N.prototype.remove;var In="@@__IMMUTABLE_STACK__@@";function Mn(e){return Boolean(e&&e[In])}var Nn,An=function(o){function e(e){return null==e?Rn():Mn(e)?e:Rn().pushAll(e)}return o&&(e.__proto__=o),((e.prototype=Object.create(o&&o.prototype)).constructor=e).of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(e,t){var n=this._head;for(e=z(this,e);n&&e--;)n=n.next;return n?n.value:t},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;0<=r;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Pn(t,n)},e.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;if(0===this.size&&Mn(e))return e;j(e.size);var t=this.size,n=this._head;return e.__iterate(function(e){t++,n={value:e,next:n}},!0),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Pn(t,n)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Rn()},e.prototype.slice=function(e,t){if(H(e,t,this.size))return this;var n=U(e,this.size);if(q(t,this.size)!==this.size)return o.prototype.slice.call(this,e,t);for(var e=this.size-n,r=this._head;n--;)r=r.next;return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Pn(e,r)},e.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Pn(this.size,this._head,e,this.__hash):0===this.size?Rn():(this.__ownerID=e,this.__altered=!1,this)},e.prototype.__iterate=function(n,e){var r=this;if(e)return new me(this.toArray()).__iterate(function(e,t){return n(e,t,r)},e);for(var t=0,o=this._head;o&&!1!==n(o.value,t++,this);)o=o.next;return t},e.prototype.__iterator=function(t,e){if(e)return new me(this.toArray()).__iterator(t,e);var n=0,r=this._head;return new g(function(){var e;return r?(e=r.value,r=r.next,v(t,n++,e)):E()})},e}(J),a=(An.isStack=Mn,An.prototype);function Pn(e,t,n,r){var o=Object.create(a);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Rn(){return Nn=Nn||Pn(0)}a[In]=!0,a.shift=a.pop,a.unshift=a.push,a.unshiftAll=a.pushAll,a.withMutations=Ht,a.wasAltered=Wt,a.asImmutable=qt,a["@@transducer/init"]=a.asMutable=Ut,a["@@transducer/step"]=function(e,t){return e.unshift(t)},a["@@transducer/result"]=function(e){return e.asImmutable()};var Ln="@@__IMMUTABLE_SET__@@";function Fn(e){return Boolean(e&&e[Ln])}function Bn(e){return Fn(e)&&d(e)}function zn(n,e){if(n===e)return!0;if(!l(e)||void 0!==n.size&&void 0!==e.size&&n.size!==e.size||void 0!==n.__hash&&void 0!==e.__hash&&n.__hash!==e.__hash||c(n)!==c(e)||s(n)!==s(e)||d(n)!==d(e))return!1;if(0===n.size&&0===e.size)return!0;var r,o=!Z(n);if(d(n))return r=n.entries(),e.every(function(e,t){var n=r.next().value;return n&&x(n[1],e)&&(o||x(n[0],t))})&&r.next().done;var i=!1,a=(void 0===n.size&&(void 0===e.size?"function"==typeof n.cacheResult&&n.cacheResult():(i=!0,t=n,n=e,e=t)),!0),t=e.__iterate(function(e,t){if(o?!n.has(e):i?!x(e,n.get(t,S)):!x(n.get(t,S),e))return a=!1});return a&&n.size===t}function Kn(t,n){function e(e){t.prototype[e]=n[e]}Object.keys(n).forEach(e),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(n).forEach(e)}function Hn(e){if(!e||"object"!=typeof e)return e;if(!l(e)){if(!ht(e))return e;e=C(e)}var n;if(c(e))return n={},e.__iterate(function(e,t){n[t]=Hn(e)}),n;var t=[];return e.__iterate(function(e){t.push(Hn(e))}),t}var Un,qn=function(r){function t(n){return null==n?Gn():Fn(n)&&!d(n)?n:Gn().withMutations(function(t){var e=r(n);j(e.size),e.forEach(function(e){return t.add(e)})})}return r&&(t.__proto__=r),((t.prototype=Object.create(r&&r.prototype)).constructor=t).of=function(){return this(arguments)},t.fromKeys=function(e){return this(f(e).keySeq())},t.intersect=function(e){return(e=u(e).toArray()).length?o.intersect.apply(t(e.pop()),e):Gn()},t.union=function(e){return(e=u(e).toArray()).length?o.union.apply(t(e.pop()),e):Gn()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Wn(this,this._map.set(e,e))},t.prototype.remove=function(e){return Wn(this,this._map.remove(e))},t.prototype.clear=function(){return Wn(this,this._map.clear())},t.prototype.map=function(n,r){var o=this,i=!1,e=Wn(this,this._map.mapEntries(function(e){var e=e[1],t=n.call(r,e,e,o);return t!==e&&(i=!0),[t,t]},r));return i?e:this},t.prototype.union=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return 0===(n=n.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations(function(t){for(var e=0;e<n.length;e++)r(n[e]).forEach(function(e){return t.add(e)})}):this.constructor(n[0])},t.prototype.intersect=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(0===e.length)return this;var e=e.map(function(e){return r(e)}),n=[];return this.forEach(function(t){e.every(function(e){return e.includes(t)})||n.push(t)}),this.withMutations(function(t){n.forEach(function(e){t.remove(e)})})},t.prototype.subtract=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(0===e.length)return this;var e=e.map(function(e){return r(e)}),n=[];return this.forEach(function(t){e.some(function(e){return e.includes(t)})&&n.push(t)}),this.withMutations(function(t){n.forEach(function(e){t.remove(e)})})},t.prototype.sort=function(e){return pr(nt(this,e))},t.prototype.sortBy=function(e,t){return pr(nt(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(t,e){var n=this;return this._map.__iterate(function(e){return t(e,e,n)},e)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(X),o=(qn.isSet=Fn,qn.prototype);function Wn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Vn(e,t){var n=Object.create(o);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Gn(){return Un=Un||Vn(I())}o[Ln]=!0,o[t]=o.remove,o.merge=o.concat=o.union,o.withMutations=Ht,o.asImmutable=qt,o["@@transducer/init"]=o.asMutable=Ut,o["@@transducer/step"]=function(e,t){return e.add(t)},o["@@transducer/result"]=function(e){return e.asImmutable()},o.__empty=Gn,o.__make=Vn;var Yn,$n=function(e){function r(e,t,n){if(!(this instanceof r))return new r(e,t,n);if(lt(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(Yn)return Yn;Yn=this}}return e&&(r.__proto__=e),((r.prototype=Object.create(e&&e.prototype)).constructor=r).prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},r.prototype.get=function(e,t){return this.has(e)?this._start+z(this,e)*this._step:t},r.prototype.includes=function(e){e=(e-this._start)/this._step;return 0<=e&&e<this.size&&e===Math.floor(e)},r.prototype.slice=function(e,t){return H(e,t,this.size)?this:(e=U(e,this.size),(t=q(t,this.size))<=e?new r(0,0):new r(this.get(e,this._end),this.get(t,this._end),this._step))},r.prototype.indexOf=function(e){e-=this._start;if(e%this._step==0){e=e/this._step;if(0<=e&&e<this.size)return e}return-1},r.prototype.lastIndexOf=function(e){return this.indexOf(e)},r.prototype.__iterate=function(e,t){for(var n=this.size,r=this._step,o=t?this._start+(n-1)*r:this._start,i=0;i!==n&&!1!==e(o,t?n-++i:i++,this);)o+=t?-r:r;return i},r.prototype.__iterator=function(t,n){var r=this.size,o=this._step,i=n?this._start+(r-1)*o:this._start,a=0;return new g(function(){if(a===r)return E();var e=i;return i+=n?-o:o,v(t,n?r-++a:a++,e)})},r.prototype.equals=function(e){return e instanceof r?this._start===e._start&&this._end===e._end&&this._step===e._step:zn(this,e)},r}(O);function Zn(e,t,n){for(var r=ft(t),o=0;o!==r.length;)if((e=mt(e,r[o++],S))===S)return n;return e}function Jn(e,t){return Zn(this,e,t)}function Xn(e,t){return Zn(e,t,S)!==S}function Qn(){j(this.size);var n={};return this.__iterate(function(e,t){n[t]=e}),n}u.isIterable=l,u.isKeyed=c,u.isIndexed=s,u.isAssociative=Z,u.isOrdered=d,u.Iterator=g,Kn(u,{toArray:function(){j(this.size);var n=new Array(this.size||0),r=c(this),o=0;return this.__iterate(function(e,t){n[o++]=r?[t,e]:e}),n},toIndexedSeq:function(){return new Ve(this)},toJS:function(){return Hn(this)},toKeyedSeq:function(){return new We(this,!0)},toMap:function(){return Yt(this.toKeyedSeq())},toObject:Qn,toOrderedMap:function(){return N(this.toKeyedSeq())},toOrderedSet:function(){return pr(c(this)?this.valueSeq():this)},toSet:function(){return qn(c(this)?this.valueSeq():this)},toSetSeq:function(){return new Ge(this)},toSeq:function(){return s(this)?this.toIndexedSeq():c(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return An(c(this)?this.valueSeq():this)},toList:function(){return gn(c(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return D(this,function(e,t){var n=c(e);if(0===(t=[e].concat(t).map(function(e){return l(e)?n&&(e=f(e)):e=n?we(e):Se(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size})).length)return e;if(1===t.length){var r=t[0];if(r===e||n&&c(r)||s(e)&&s(r))return r}return r=new me(t),n?r=r.toKeyedSeq():s(e)||(r=r.toSetSeq()),(r=r.flatten(!0)).size=t.reduce(function(e,t){if(void 0!==e){t=t.size;if(void 0!==t)return e+t}},0),r}(this,e))},includes:function(t){return this.some(function(e){return x(e,t)})},entries:function(){return this.__iterator(y)},every:function(r,o){j(this.size);var i=!0;return this.__iterate(function(e,t,n){if(!r.call(o,e,t,n))return i=!1}),i},filter:function(e,t){return D(this,Xe(this,e,t,!0))},find:function(e,t,n){e=this.findEntry(e,t);return e?e[1]:n},forEach:function(e,t){return j(this.size),this.__iterate(t?e.bind(t):e)},join:function(t){j(this.size),t=void 0!==t?""+t:",";var n="",r=!0;return this.__iterate(function(e){r?r=!1:n+=t,n+=null!=e?e.toString():""}),n},keys:function(){return this.__iterator(oe)},map:function(e,t){return D(this,Ze(this,e,t))},reduce:function(e,t,n){return rr(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return rr(this,e,t,n,arguments.length<2,!0)},reverse:function(){return D(this,Je(this,!0))},slice:function(e,t){return D(this,Qe(this,e,t,!0))},some:function(e,t){return!this.every(ar(e),t)},sort:function(e){return D(this,nt(this,e))},values:function(){return this.__iterator(h)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return B(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return n=this,r=e,o=t,i=Yt().asMutable(),n.__iterate(function(e,t){i.update(r.call(o,e,t,n),0,function(e){return e+1})}),i.asImmutable();var n,r,o,i},equals:function(e){return zn(this,e)},entrySeq:function(){var e=this;if(e._cache)return new me(e._cache);var t=e.toSeq().map(ir).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(ar(e),t)},findEntry:function(r,o,e){var i=e;return this.__iterate(function(e,t,n){if(r.call(o,e,t,n))return!(i=[t,e])}),i},findKey:function(e,t){e=this.findEntry(e,t);return e&&e[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(K,null,e)},flatMap:function(e,t){return D(this,(r=e,o=t,i=st(n=this),n.toSeq().map(function(e,t){return i(r.call(o,e,t,n))}).flatten(!0)));var n,r,o,i},flatten:function(e){return D(this,tt(this,e,!0))},fromEntrySeq:function(){return new Ye(this)},get:function(n,e){return this.find(function(e,t){return x(t,n)},void 0,e)},getIn:Jn,groupBy:function(e,t){return o=e,i=t,a=c(r=this),s=(d(r)?N:Yt)().asMutable(),r.__iterate(function(t,n){s.update(o.call(i,t,n,r),function(e){return(e=e||[]).push(a?[n,t]:t),e})}),n=st(r),s.map(function(e){return D(r,n(e))}).asImmutable();var r,o,i,a,s,n},has:function(e){return this.get(e,S)!==S},hasIn:function(e){return Xn(this,e)},isSubset:function(t){return t="function"==typeof t.includes?t:u(t),this.every(function(e){return t.includes(e)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:u(e)).isSubset(this)},keyOf:function(t){return this.findKey(function(e){return x(e,t)})},keySeq:function(){return this.toSeq().map(or).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return rt(this,e)},maxBy:function(e,t){return rt(this,t,e)},min:function(e){return rt(this,e?sr(e):ur)},minBy:function(e,t){return rt(this,t?sr(t):ur,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return D(this,et(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(ar(e),t)},sortBy:function(e,t){return D(this,nt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return D(this,(s=e,c=t,(e=r(n=this)).__iterateUncached=function(r,e){var o=this;if(e)return this.cacheResult().__iterate(r,e);var i=0;return n.__iterate(function(e,t,n){return s.call(c,e,t,n)&&++i&&r(e,t,o)}),i},e.__iteratorUncached=function(r,e){var o=this;if(e)return this.cacheResult().__iterator(r,e);var i=n.__iterator(y,e),a=!0;return new g(function(){if(!a)return E();var e=i.next();if(e.done)return e;var t=e.value,n=t[0],t=t[1];return s.call(c,t,n,o)?r===y?e:v(r,n,t,e):(a=!1,E())})},e));var n,s,c},takeUntil:function(e,t){return this.takeWhile(ar(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=d(e),n=c(e),r=t?1:0;return function(e,t){return t=De(t,3432918353),t=De(t<<15|t>>>-15,461845907),t=De(t<<13|t>>>-13,5),t=De((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Te((t=De(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+lr(k(e),k(t))|0}:function(e,t){r=r+lr(k(e),k(t))|0}:t?function(e){r=31*r+k(e)|0}:function(e){r=r+k(e)|0}),r)}(this))}});var n=u.prototype,er=(n[G]=!0,n[se]=n.values,n.toJSON=n.toArray,n.__toStringMapper=yt,n.inspect=n.toSource=function(){return this.toString()},n.chain=n.flatMap,n.contains=n.includes,Kn(f,{flip:function(){return D(this,$e(this))},mapEntries:function(n,r){var o=this,i=0;return D(this,this.toSeq().map(function(e,t){return n.call(r,[t,e],i++,o)}).fromEntrySeq())},mapKeys:function(n,r){var o=this;return D(this,this.toSeq().flip().map(function(e,t){return n.call(r,e,t,o)}).flip())}}),f.prototype),tr=(er[Y]=!0,er[se]=n.entries,er.toJSON=Qn,er.__toStringMapper=function(e,t){return yt(t)+": "+yt(e)},Kn(J,{toKeyedSeq:function(){return new We(this,!1)},filter:function(e,t){return D(this,Xe(this,e,t,!1))},findIndex:function(e,t){e=this.findEntry(e,t);return e?e[0]:-1},indexOf:function(e){e=this.keyOf(e);return void 0===e?-1:e},lastIndexOf:function(e){e=this.lastKeyOf(e);return void 0===e?-1:e},reverse:function(){return D(this,Je(this,!1))},slice:function(e,t){return D(this,Qe(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=U(e,e<0?this.count():this.size);var r=this.slice(0,e);return D(this,1===n?r:r.concat(T(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){e=this.findLastEntry(e,t);return e?e[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return D(this,tt(this,e,!1))},get:function(n,e){return(n=z(this,n))<0||this.size===1/0||void 0!==this.size&&n>this.size?e:this.find(function(e,t){return t===n},void 0,e)},has:function(e){return 0<=(e=z(this,e))&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return D(this,(a=e,(e=r(i=this)).size=i.size&&2*i.size-1,e.__iterateUncached=function(t,e){var n=this,r=0;return i.__iterate(function(e){return(!r||!1!==t(a,r++,n))&&!1!==t(e,r++,n)},e),r},e.__iteratorUncached=function(e,t){var n,r=i.__iterator(h,t),o=0;return new g(function(){return(!n||o%2)&&(n=r.next()).done?n:o%2?v(e,o++,a):v(e,o++,n.value,n)})},e));var i,a},interleave:function(){var e=[this].concat(T(arguments)),t=it(this.toSeq(),O.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),D(this,n)},keySeq:function(){return $n(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return D(this,et(this,e,t,!1))},zip:function(){var e=[this].concat(T(arguments));return D(this,it(this,cr,e))},zipAll:function(){var e=[this].concat(T(arguments));return D(this,it(this,cr,e,!0))},zipWith:function(e){var t=T(arguments);return D(t[0]=this,it(this,e,t))}}),J.prototype),nr=(tr[$]=!0,tr[re]=!0,Kn(X,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),X.prototype);function rr(e,r,o,i,a,t){return j(e.size),e.__iterate(function(e,t,n){o=a?(a=!1,e):r.call(i,o,e,t,n)},t),o}function or(e,t){return t}function ir(e,t){return[t,e]}function ar(e){return function(){return!e.apply(this,arguments)}}function sr(e){return function(){return-e.apply(this,arguments)}}function cr(){return T(arguments)}function ur(e,t){return e<t?1:t<e?-1:0}function lr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}nr.has=n.includes,nr.contains=nr.includes,nr.keys=nr.values,Kn(ye,er),Kn(O,tr),Kn(ge,nr);var fr,pr=function(e){function t(n){return null==n?yr():Bn(n)?n:yr().withMutations(function(t){var e=X(n);j(e.size),e.forEach(function(e){return t.add(e)})})}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).of=function(){return this(arguments)},t.fromKeys=function(e){return this(f(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(qn),dr=(pr.isOrderedSet=Bn,pr.prototype);function hr(e,t){var n=Object.create(dr);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function yr(){return fr=fr||hr(Tn())}dr[re]=!0,dr.zip=tr.zip,dr.zipWith=tr.zipWith,dr.zipAll=tr.zipAll,dr.__empty=yr,dr.__make=hr;var A=function(a,s){var c,e=a;if(ne(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(p(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.");function u(e){var r=this;if(e instanceof u)return e;if(!(this instanceof u))return new u(e);if(!c){c=!0;var t=Object.keys(a),n=l._indices={};l._name=s,l._keys=t,l._defaultValues=a;for(var o=0;o<t.length;o++){var i=t[o];n[i]=o,l[i]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+mr(this)+' with property "'+i+'" since that property name is part of the Record API.'):function(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){lt(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}(l,i)}}return this.__ownerID=void 0,this._values=gn().withMutations(function(n){n.setSize(r._keys.length),f(e).forEach(function(e,t){n.set(r._indices[t],e===r._defaultValues[t]?void 0:e)})}),this}var l=u.prototype=Object.create(P);return l.constructor=u,s&&(u.displayName=s),u},P=(A.prototype.toString=function(){for(var e,t=mr(this)+" { ",n=this._keys,r=0,o=n.length;r!==o;r++)t+=(r?", ":"")+(e=n[r])+": "+yt(this.get(e));return t+" }"},A.prototype.equals=function(e){return this===e||e&&vr(this).equals(vr(e))},A.prototype.hashCode=function(){return vr(this).hashCode()},A.prototype.has=function(e){return this._indices.hasOwnProperty(e)},A.prototype.get=function(e,t){if(!this.has(e))return t;t=this._indices[e],t=this._values.get(t);return void 0===t?this._defaultValues[e]:t},A.prototype.set=function(e,t){if(this.has(e)){e=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(e!==this._values&&!this.__ownerID)return gr(this,e)}return this},A.prototype.remove=function(e){return this.set(e)},A.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:gr(this,e)},A.prototype.wasAltered=function(){return this._values.wasAltered()},A.prototype.toSeq=function(){return vr(this)},A.prototype.toJS=function(){return Hn(this)},A.prototype.entries=function(){return this.__iterator(y)},A.prototype.__iterator=function(e,t){return vr(this).__iterator(e,t)},A.prototype.__iterate=function(e,t){return vr(this).__iterate(e,t)},A.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?gr(this,t,e):(this.__ownerID=e,this._values=t,this)},A.isRecord=ne,A.getDescriptiveName=mr,A.prototype);function gr(e,t,n){e=Object.create(Object.getPrototypeOf(e));return e._values=t,e.__ownerID=n,e}function mr(e){return e.constructor.displayName||e.constructor.name||"Record"}function vr(t){return we(t._keys.map(function(e){return[e,t.get(e)]}))}P[te]=!0,P[t]=P.remove,P.deleteIn=P.removeIn=Ot,P.getIn=Jn,P.hasIn=n.hasIn,P.merge=Tt,P.mergeWith=jt,P.mergeIn=zt,P.mergeDeep=Ft,P.mergeDeepWith=Bt,P.mergeDeepIn=Kt,P.setIn=Et,P.update=kt,P.updateIn=Dt,P.withMutations=Ht,P.asMutable=Ut,P.asImmutable=qt,P[se]=P.entries,P.toJSON=P.toObject=n.toObject,P.inspect=P.toSource=function(){return this.toString()};var br,_r=function(e){function r(e,t){if(!(this instanceof r))return new r(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(br)return br;br=this}}return e&&(r.__proto__=e),((r.prototype=Object.create(e&&e.prototype)).constructor=r).prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},r.prototype.get=function(e,t){return this.has(e)?this._value:t},r.prototype.includes=function(e){return x(this._value,e)},r.prototype.slice=function(e,t){var n=this.size;return H(e,t,n)?this:new r(this._value,q(t,n)-U(e,n))},r.prototype.reverse=function(){return this},r.prototype.indexOf=function(e){return x(this._value,e)?0:-1},r.prototype.lastIndexOf=function(e){return x(this._value,e)?this.size:-1},r.prototype.__iterate=function(e,t){for(var n=this.size,r=0;r!==n&&!1!==e(this._value,t?n-++r:r++,this););return r},r.prototype.__iterator=function(e,t){var n=this,r=this.size,o=0;return new g(function(){return o===r?E():v(e,t?r-++o:o++,n._value)})},r.prototype.equals=function(e){return e instanceof r?x(this._value,e._value):zn(e)},r}(O);function wr(e,t){return function n(r,o,i,e,a,t){if("string"!=typeof i&&!p(i)&&(de(i)||ce(i)||dt(i))){if(~r.indexOf(i))throw new TypeError("Cannot convert circular structure to Immutable");r.push(i),a&&""!==e&&a.push(e);t=o.call(t,e,C(i).map(function(e,t){return n(r,o,e,t,a,i)}),a&&a.slice());return r.pop(),a&&a.pop(),t}return i}([],t||Sr,e,"",t&&2<t.length?[]:void 0,{"":e})}function Sr(e,t){return s(t)?t.toList():c(t)?t.toMap():t.toSet()}var Er="4.0.0",Cr=u;e.default={version:Er,Collection:u,Iterable:u,Seq:C,Map:Yt,OrderedMap:N,List:gn,Stack:An,Set:qn,OrderedSet:pr,Record:A,Range:$n,Repeat:_r,is:x,fromJS:wr,hash:k,isImmutable:p,isCollection:l,isKeyed:c,isIndexed:s,isAssociative:Z,isOrdered:d,isValueObject:ke,isPlainObject:dt,isSeq:ee,isList:hn,isMap:Oe,isOrderedMap:xe,isStack:Mn,isSet:Fn,isOrderedSet:Bn,isRecord:ne,get:mt,getIn:Zn,has:gt,hasIn:Xn,merge:Mt,mergeDeep:At,mergeWith:Nt,mergeDeepWith:Pt,remove:bt,removeIn:Ct,set:_t,setIn:St,update:xt,updateIn:wt}},function(e,t,n){"use strict";var r=n(6).OrderedMap;e.exports={createFromArray:function(e){return r(e.map(function(e){return[e.getKey(),e]}))}}},function(e,t,n){"use strict";e.exports=function(e,r,o,i){var a;e.size&&(a=0,e.reduce(function(e,t,n){return r(e,t)||(o(e)&&i(a,n),a=n),t}),o(e.last())&&i(a,e.count()))}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.ownerDocument)&&(e.ownerDocument.defaultView?e instanceof e.ownerDocument.defaultView.HTMLElement:e instanceof HTMLElement)}},function(e,t,n){"use strict";var u=n(9),l=n(16)("draft_tree_data_support");e.exports=function(e,t,n){var r=e.getSelection(),o=e.getCurrentContent(),i=r,a=r.getAnchorKey(),s=r.getFocusKey(),c=o.getBlockForKey(a);if(l&&"forward"===n&&a!==s)return o;if(r.isCollapsed()){if("forward"===n){if(e.isSelectionAtEndOfContent())return o;if(l)if(r.getAnchorOffset()===o.getBlockForKey(a).getLength()){s=o.getBlockForKey(c.nextSibling);if(!s||0===s.getLength())return o}}else if(e.isSelectionAtStartOfContent())return o;if((i=t(e))===r)return o}return u.removeRange(o,i,n)}},function(e,t,n){"use strict";var r=n(51),c=n(52);e.exports=function(e,t){var o=t.getStartKey(),i=t.getStartOffset(),a=t.getEndKey(),s=t.getEndOffset(),e=c(e,t).getBlockMap(),t=e.keySeq(),n=t.indexOf(o),t=t.indexOf(a)+1;return r(e.slice(n,t).map(function(e,t){var n=e.getText(),r=e.getCharacterList();return o===a?e.merge({text:n.slice(i,s),characterList:r.slice(i,s)}):t===o?e.merge({text:n.slice(i),characterList:r.slice(i)}):t===a?e.merge({text:n.slice(0,s),characterList:r.slice(0,s)}):e}))}},function(e,t,n){"use strict";function r(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}var o=n(57),i=n(6),a=n(7),s=n(115),c=(0,i.Map)(),u=s();function l(e,t){console.warn("WARNING: "+e+' will be deprecated soon!\nPlease use "'+t+'" instead.')}var f={getLastCreatedEntityKey:function(){return l("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),f.__getLastCreatedEntityKey()},create:function(e,t,n){return l("DraftEntity.create","contentState.createEntity"),f.__create(e,t,n)},add:function(e){return l("DraftEntity.add","contentState.addEntity"),f.__add(e)},get:function(e){return l("DraftEntity.get","contentState.getEntity"),f.__get(e)},__getAll:function(){return c},__loadWithEntities:function(e){c=e,u=s()},mergeData:function(e,t){return l("DraftEntity.mergeData","contentState.mergeEntityData"),f.__mergeData(e,t)},replaceData:function(e,t){return l("DraftEntity.replaceData","contentState.replaceEntityData"),f.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return u},__create:function(e,t,n){return f.__add(new o({type:e,mutability:t,data:n||{}}))},__add:function(e){return u=s(),c=c.set(u,e),u},__get:function(e){e=c.get(e);return e||a(!1),e},__mergeData:function(e,t){var n=f.__get(e),t=r({},n.getData(),t),n=n.set("data",t);return c=c.set(e,n),n},__replaceData:function(e,t){t=f.__get(e).set("data",t);return c=c.set(e,t),t}};e.exports=f},function(e,t,n){"use strict";n=function(e){var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},r.getAnchorKey=function(){return this.get("anchorKey")},r.getAnchorOffset=function(){return this.get("anchorOffset")},r.getFocusKey=function(){return this.get("focusKey")},r.getFocusOffset=function(){return this.get("focusOffset")},r.getIsBackward=function(){return this.get("isBackward")},r.getHasFocus=function(){return this.get("hasFocus")},r.hasEdgeWithin=function(e,t,n){var r,o=this.getAnchorKey(),i=this.getFocusKey();if(o===i&&o===e)return a=this.getStartOffset(),r=this.getEndOffset(),t<=a&&a<=n||t<=r&&r<=n;if(e!==o&&e!==i)return!1;var a=e===o?this.getAnchorOffset():this.getFocusOffset();return t<=a&&a<=n},r.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},r.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},r.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},r.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},r.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},n.createEmpty=function(e){return new n({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},n}((0,n(6).Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));e.exports=n},function(e,t,n){"use strict";var r=n(7),o=null;function i(e){return"LTR"===e||"RTL"===e}function a(e){return i(e)||r(!1),"LTR"===e?"ltr":"rtl"}function s(e){o=e}e.exports={NEUTRAL:"NEUTRAL",LTR:"LTR",RTL:"RTL",isStrong:i,getHTMLDir:a,getHTMLDirIfDifferent:function(e,t){return i(e)||r(!1),i(t)||r(!1),e===t?null:a(e)},setGlobalDir:s,initGlobalDir:function(){s("LTR")},getGlobalDir:function(){return o||this.initGlobalDir(),o||r(!1),o}}},function(e,t,n){"use strict";var r=n(34),o=n(60);e.exports=function(e){for(var t=e;t&&t!==r(e).documentElement;){var n=o(t);if(null!=n)return n;t=t.parentNode}return null}},function(e,t,n){"use strict";e.exports=function(e){return e&&e.ownerDocument?e.ownerDocument:document}},function(e,t,n){"use strict";e.exports={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105}},function(e,t,n){"use strict";function r(e,t){e=o.get(e,t);return"auto"===e||"scroll"===e}var o={get:n(138),getScrollParent:function(e){if(!e)return null;for(var t=e.ownerDocument;e&&e!==t.body;){if(r(e,"overflow")||r(e,"overflowY")||r(e,"overflowX"))return e;e=e.parentNode}return t.defaultView||t.parentWindow}};e.exports=o},function(e,t,n){"use strict";var o=n(142),i=n(143);e.exports=function(e){var t=o(e.ownerDocument||e.document),n=(e.Window&&e instanceof e.Window&&(e=t),i(e)),t=e===t?e.ownerDocument.documentElement:e,r=e.scrollWidth-t.clientWidth,e=e.scrollHeight-t.clientHeight;return n.x=Math.max(0,Math.min(n.x,r)),n.y=Math.max(0,Math.min(n.y,e)),n}},function(e,t,n){"use strict";e.exports=function(e){return"handled"===e||!0===e}},function(e,t,n){function o(e){if(s[e])return s[e].exports;var t=s[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var r,i,a,s;window,e.exports=(r=n(24),i=n(2),s={},o.m=a=[function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t,n){e.exports=n(3)},function(e,t,n){"use strict";n.r(t);var y=n(1),s=n(0),g=function(e,t,n){var r,e=e.textContent;return""===e.trim()?{chunk:(r=n,{text:" ",inlines:[new s.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:e,inlines:Array(e.length).fill(t),entities:Array(e.length).fill(n),blocks:[]}}},m=function(){return{text:"\n",inlines:[new s.OrderedSet],entities:new Array(1),blocks:[]}},v=function(){return{text:"",inlines:[],entities:[],blocks:[]}},b=function(e,t){return{text:"",inlines:[],entities:[],blocks:[{type:e,depth:0,data:t||new s.Map({})}]}},_=function(e,t,n){return{text:"\r",inlines:[],entities:[],blocks:[{type:e,depth:Math.max(0,Math.min(4,t)),data:n||new s.Map({})}]}},w=function(e){return{text:"\r ",inlines:[new s.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new s.Map({})}]}},S=function(e,t){return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},E=new s.Map({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},"unordered-list-item":{element:"li",wrapper:"ul"},"ordered-list-item":{element:"li",wrapper:"ol"},blockquote:{element:"blockquote"},code:{element:"pre"},atomic:{element:"figure"},unstyled:{element:"p",aliasedElements:["div"]}}),C={code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",strong:"BOLD",ins:"UNDERLINE",sub:"SUBSCRIPT",sup:"SUPERSCRIPT"};function O(e){return e.style.textAlign?new s.Map({"text-align":e.style.textAlign}):e.style.marginLeft?new s.Map({"margin-left":e.style.marginLeft}):void 0}var x=function(e){var t,n=void 0;return e instanceof HTMLAnchorElement&&(t={},n=e.dataset&&void 0!==e.dataset.mention?(t.url=e.href,t.text=e.innerHTML,t.value=e.dataset.value,y.Entity.__create("MENTION","IMMUTABLE",t)):(t.url=e.getAttribute&&e.getAttribute("href")||e.href,t.title=e.innerHTML,t.targetOption=e.target,y.Entity.__create("LINK","MUTABLE",t))),n},c=(n.d(t,"default",function(){return r})," "),u=new RegExp(" ","g"),k=!0;function r(e,t){t=t,e=e.trim().replace(u,c),e=e,r=null,document.implementation&&document.implementation.createHTMLDocument&&((n=document.implementation.createHTMLDocument("foo")).documentElement.innerHTML=e,r=n.getElementsByTagName("body")[0]);var n,r,i,o,a,e=r?(k=!0,{chunk:function e(t,n,r,o,i,a){var s=t.nodeName.toLowerCase();if(a)if(f=a(s,t))return f=y.Entity.__create(f.type,f.mutability,f.data||{}),{chunk:w(f)};if("#text"===s&&"\n"!==t.textContent)return g(t,n,i);if("br"===s)return{chunk:m()};if("img"===s&&t instanceof HTMLImageElement)return(f={}).src=t.getAttribute&&t.getAttribute("src")||t.src,f.alt=t.alt,f.height=t.style.height,f.width=t.style.width,t.style.float&&(f.alignment=t.style.float),f=y.Entity.__create("IMAGE","MUTABLE",f),{chunk:w(f)};if("video"===s&&t instanceof HTMLVideoElement)return(f={}).src=t.getAttribute&&t.getAttribute("src")||t.src,f.alt=t.alt,f.height=t.style.height,f.width=t.style.width,t.style.float&&(f.alignment=t.style.float),f=y.Entity.__create("VIDEO","MUTABLE",f),{chunk:w(f)};if("iframe"===s&&t instanceof HTMLIFrameElement)return(f={}).src=t.getAttribute&&t.getAttribute("src")||t.src,f.height=t.height,f.width=t.width,f=y.Entity.__create("EMBEDDED_LINK","MUTABLE",f),{chunk:w(f)};var c,u,l,f=function(t,n){var e=E.filter(function(e){return e.element===t&&(!e.wrapper||e.wrapper===n)||e.wrapper===t||e.aliasedElements&&-1<e.aliasedElements.indexOf(t)}).keySeq().toSet().toArray();if(1===e.length)return e[0]}(s,o);f&&("ul"===s||"ol"===s?(o=s,r+=1):("unordered-list-item"!==f&&"ordered-list-item"!==f&&(o="",r=-1),k?(h=b(f,O(t)),k=!1):h=_(f,r,O(t)))),h=h||v(),f=t,c=n,(s=C[s])?l=c.add(s).toOrderedSet():f instanceof HTMLElement&&(u=f,l=(l=c).withMutations(function(e){var t=u.style.color,n=u.style.backgroundColor,r=u.style.fontSize,o=u.style.fontFamily.replace(/^"|"$/g,""),i=u.style.fontWeight,a=u.style.textDecoration,s=u.style.fontStyle;t&&e.add("color-".concat(t.replace(/ /g,""))),n&&e.add("bgcolor-".concat(n.replace(/ /g,""))),r&&e.add("fontsize-".concat(r.replace(/px$/g,""))),o&&e.add("fontfamily-".concat(o)),"bold"===i&&e.add(C.strong),"underline"===a&&e.add(C.ins),"italic"===s&&e.add(C.em)}).toOrderedSet()),n=l;for(var p=t.firstChild;p;)var d=e(p,n,r,o,x(p)||i,a).chunk,h=S(h,d),p=p.nextSibling;return{chunk:h}}(r,new s.OrderedSet,-1,"",void 0,t).chunk}):null;return e?(i=e.chunk,o=new s.OrderedMap({}),i.entities&&i.entities.forEach(function(e){e&&(o=o.set(e,y.Entity.__get(e)))}),a=0,{contentBlocks:i.text.split("\r").map(function(e,t){var n=a+e.length,r=i&&i.inlines.slice(a,n),o=i&&i.entities.slice(a,n),r=new s.List(r.map(function(e,t){e={style:e,entity:null};return o[t]&&(e.entity=o[t]),y.CharacterMetadata.create(e)}));return a=n,new y.ContentBlock({key:Object(y.genKey)(),type:i&&i.blocks[t]&&i.blocks[t].type||"unstyled",depth:i&&i.blocks[t]&&i.blocks[t].depth,data:i&&i.blocks[t]&&i.blocks[t].data||new s.Map({}),text:e,characterList:r})}),entityMap:o}):null}}],o.c=s,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2))},function(e,t,n){"use strict";function o(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}var i=n(25),a=n(12),r=n(18),s=n(13),c=n(30),u=n(31),l=n(14),f=n(56),p=n(16),d=n(6),h=n(58),y=d.List,n=d.Record,g=d.Repeat,m=d.Map,v=d.OrderedMap,d=n({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),b=p("draft_tree_data_support")?s:r,n=function(e){var t;function r(){return e.apply(this,arguments)||this}t=e,(n=r).prototype=Object.create(t.prototype),(n.prototype.constructor=n).__proto__=t;var n=r.prototype;return n.getEntityMap=function(){return c},n.getBlockMap=function(){return this.get("blockMap")},n.getSelectionBefore=function(){return this.get("selectionBefore")},n.getSelectionAfter=function(){return this.get("selectionAfter")},n.getBlockForKey=function(e){return this.getBlockMap().get(e)},n.getKeyBefore=function(t){return this.getBlockMap().reverse().keySeq().skipUntil(function(e){return e===t}).skip(1).first()},n.getKeyAfter=function(t){return this.getBlockMap().keySeq().skipUntil(function(e){return e===t}).skip(1).first()},n.getBlockAfter=function(n){return this.getBlockMap().skipUntil(function(e,t){return t===n}).skip(1).first()},n.getBlockBefore=function(n){return this.getBlockMap().reverse().skipUntil(function(e,t){return t===n}).skip(1).first()},n.getBlocksAsArray=function(){return this.getBlockMap().toArray()},n.getFirstBlock=function(){return this.getBlockMap().first()},n.getLastBlock=function(){return this.getBlockMap().last()},n.getPlainText=function(e){return this.getBlockMap().map(function(e){return e?e.getText():""}).join(e||"\n")},n.getLastCreatedEntityKey=function(){return c.__getLastCreatedEntityKey()},n.hasText=function(){var e=this.getBlockMap();return 1<e.size||0<escape(e.first().getText()).replace(/%u200B/g,"").length},n.createEntity=function(e,t,n){return c.__create(e,t,n),this},n.mergeEntityData=function(e,t){return c.__mergeData(e,t),this},n.replaceEntityData=function(e,t){return c.__replaceData(e,t),this},n.addEntity=function(e){return c.__add(e),this},n.getEntity=function(e){return c.__get(e)},n.getAllEntities=function(){return c.__getAll()},n.loadWithEntities=function(e){return c.__loadWithEntities(e)},r.createFromBlockArray=function(e,t){var e=Array.isArray(e)?e:e.contentBlocks,e=i.createFromArray(e),n=e.isEmpty()?new u:u.createEmpty(e.first().getKey());return new r({blockMap:e,entityMap:t||c,selectionBefore:n,selectionAfter:n})},r.createFromText=function(e){e=e.split(1<arguments.length&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g).map(function(e){return e=h(e),new b({key:l(),text:e,type:"unstyled",characterList:y(g(a.EMPTY,e.length))})});return r.createFromBlockArray(e)},r.fromJS=function(e){return new r(o({},e,{blockMap:v(e.blockMap).map(r.createContentBlockFromJS),selectionBefore:new u(e.selectionBefore),selectionAfter:new u(e.selectionAfter)}))},r.createContentBlockFromJS=function(e){var t=e.characterList;return new b(o({},e,{data:m(e.data),characterList:null!=t?y((Array.isArray(t)?t:f(t)).map(function(e){return a.fromJS(e)})):void 0}))},r}(d);e.exports=n},function(e,t,n){"use strict";var r=n(32),o=n(7),n="־׀׃׆-א-ת-ׯװ-ײ׳-״-߀-߉ߊ-ߪߴ-ߵߺ-߿ࠀ-ࠕࠚࠤࠨ-࠰-࠾ࡀ-ࡘ-࡞-࢟יִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﭏ",i="؈؋؍؛؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍ܐܒ-ܯ-ݍ-ޥޱ-ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-ﯓ-ﴽ﵀-﵏ﵐ-ﶏ-ﶒ-ﷇ-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴﹶ-ﻼ-",a=new RegExp("["+"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+n+i+"]"),s=new RegExp("["+n+i+"]");function c(e){e=a.exec(e);return null==e?null:e[0]}function u(e){e=c(e);return null==e?r.NEUTRAL:s.exec(e)?r.RTL:r.LTR}function l(e,t){if(t=t||r.NEUTRAL,!e.length)return t;e=u(e);return e===r.NEUTRAL?t:e}function f(e,t){return t=t||r.getGlobalDir(),r.isStrong(t)||o(!1),l(e,t)}e.exports={firstStrongChar:c,firstStrongCharDir:u,resolveBlockDir:l,getDirection:f,isDirectionLTR:function(e,t){return f(e,t)===r.LTR},isDirectionRTL:function(e,t){return f(e,t)===r.RTL}}},function(e,t,n){"use strict";var r=n(0),o=n(19),n=(0,n(6).Map)({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},section:{element:"section"},article:{element:"article"},"unordered-list-item":{element:"li",wrapper:r.createElement("ul",{className:o("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:r.createElement("ol",{className:o("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:r.createElement("pre",{className:o("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}});e.exports=n},function(e,t,n){"use strict";var r=n(68).notEmptyKey;function i(e,t){return r(t)&&"MUTABLE"===e.__get(t).getMutability()?t:null}e.exports=function(e,t){if(t.isCollapsed())return n=t.getAnchorKey(),!(0<(r=t.getAnchorOffset()))||(o=e.getBlockForKey(n).getEntityAt(r-1))!==e.getBlockForKey(n).getEntityAt(r)?null:i(e.getEntityMap(),o);var n=t.getStartKey(),r=t.getStartOffset(),t=e.getBlockForKey(n),o=r===t.getLength()?null:t.getEntityAt(r);return i(e.getEntityMap(),o)}},function(e,t,n){"use strict";var r=n(136);e.exports=function e(t,n){return!(!t||!n)&&(t===n||!r(t)&&(r(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}},function(e,t,n){"use strict";function r(e,t){return t&&(e===t.documentElement||e===t.body)}e.exports={getTop:function(e){var t=e.ownerDocument;return r(e,t)?t.body.scrollTop||t.documentElement.scrollTop:e.scrollTop},setTop:function(e,t){var n=e.ownerDocument;r(e,n)?n.body.scrollTop=n.documentElement.scrollTop=t:e.scrollTop=t},getLeft:function(e){var t=e.ownerDocument;return r(e,t)?t.body.scrollLeft||t.documentElement.scrollLeft:e.scrollLeft},setLeft:function(e,t){var n=e.ownerDocument;r(e,n)?n.body.scrollLeft=n.documentElement.scrollLeft=t:e.scrollLeft=t}}},function(e,t,n){"use strict";n(47);e.exports=function(e,t){var n,r=e.getSelection(),e=e.getCurrentContent(),o=r.getStartKey(),i=r.getStartOffset(),a=o,s=0;return i<t?null==(n=e.getKeyBefore(o))?a=o:s=e.getBlockForKey(a=n).getText().length:s=i-t,r.merge({focusKey:a,focusOffset:s,isBackward:!0})}},function(e,t,n){"use strict";n=n(77);e.exports=n},function(e,t,n){"use strict";var r=n(11),n=n(165),o=r.isPlatform("Mac OS X"),i={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return o&&e.altKey},usesMacOSHeuristics:function(){return o},hasCommandModifier:function(e){return o?!!e.metaKey&&!e.altKey:i.isCtrlKeyCommand(e)},isSoftNewlineEvent:n};e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeDecorator=t.renderNode=t.RawParser=t.createBlockRenderer=t.createStylesRenderer=void 0;var r=s(n(89)),o=s(n(217)),i=n(218),a=s(n(91)),n=s(n(228));function s(e){return e&&e.__esModule?e:{default:e}}t.createStylesRenderer=o.default,t.createBlockRenderer=n.default,t.RawParser=r.default,t.renderNode=i.renderNode,t.CompositeDecorator=a.default,t.default=i.render},function(e,t,n){"use strict";e.exports=n(229)},function(e,t,n){"use strict";var r=n(13),f=n(14),o=n(6).OrderedMap;e.exports=function(e){var u,l;return e.first()instanceof r?(l={},o(e.withMutations(function(c){c.forEach(function(e,t){var n=e.getKey(),r=e.getNextSiblingKey(),o=e.getPrevSiblingKey(),i=e.getChildKeys(),a=e.getParentKey(),s=f();l[n]=s,r&&(c.get(r)?c.setIn([r,"prevSibling"],s):c.setIn([n,"nextSibling"],null)),o&&(c.get(o)?c.setIn([o,"nextSibling"],s):c.setIn([n,"prevSibling"],null)),a&&c.get(a)?(r=c.get(a).getChildKeys(),c.setIn([a,"children"],r.set(r.indexOf(e.getKey()),s))):(c.setIn([n,"parent"],null),u&&(c.setIn([u.getKey(),"nextSibling"],s),c.setIn([n,"prevSibling"],l[u.getKey()])),u=c.get(n)),i.forEach(function(t){c.get(t)?c.setIn([t,"parent"],s):c.setIn([n,"children"],e.getChildKeys().filter(function(e){return e!==t}))})})}).toArray().map(function(e){return[l[e.getKey()],e.set("key",l[e.getKey()])]}))):o(e.toArray().map(function(e){var t=f();return[t,e.set("key",t)]}))}},function(e,t,n){"use strict";var p=n(12),d=n(26),h=n(7);function l(e,t,n){var r,o,i,a=t.getCharacterList(),s=0<n?a.get(n-1):void 0,c=n<a.count()?a.get(n):void 0,s=s?s.getEntity():void 0,c=c?c.getEntity():void 0;if(c&&c===s&&"MUTABLE"!==e.__get(c).getMutability()){r=c,o=n,d(a,function(e,t){return e.getEntity()===t.getEntity()},function(e){return e.getEntity()===r},function(e,t){e<=o&&o<=t&&(i={start:e,end:t})}),"object"!=typeof i&&h(!1);for(var u,s=i,l=s.start,f=s.end;l<f;)u=a.get(l),a=a.set(l,p.applyEntity(u,null)),l++;return t.set("characterList",a)}return t}e.exports=function(e,t){var n=e.getBlockMap(),r=e.getEntityMap(),o={},i=t.getStartKey(),a=t.getStartOffset(),s=n.get(i),s=((a=l(r,s,a))!==s&&(o[i]=a),t.getEndKey()),c=t.getEndOffset(),u=n.get(s);return(r=l(r,u=i===s?a:u,c))!==u&&(o[s]=r),Object.keys(o).length?e.merge({blockMap:n.merge(o),selectionAfter:t}):e.set("selectionAfter",t)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=e;return n===r.count()?t.forEach(function(e){r=r.push(e)}):0===n?t.reverse().forEach(function(e){r=r.unshift(e)}):(e=r.slice(0,n),n=r.slice(n),r=e.concat(t,n).toList()),r}},function(e,t,n){"use strict";var a=n(6).Map;e.exports=function(e,t,n){var r=t.getStartKey(),o=t.getEndKey(),i=e.getBlockMap(),n=i.toSeq().skipUntil(function(e,t){return t===r}).takeUntil(function(e,t){return t===o}).concat(a([[o,i.get(o)]])).map(n);return e.merge({blockMap:i.merge(n),selectionBefore:t,selectionAfter:t})}},function(e,t,n){"use strict";var i=n(13);e.exports=function(e,t){if(!(e instanceof i))return null;var n=e.getNextSiblingKey();if(n)return n;n=e.getParentKey();if(!n)return null;for(var r=t.get(n);r&&!r.getNextSiblingKey();)var o=r.getParentKey(),r=o?t.get(o):null;return r?r.getNextSiblingKey():null}},function(e,t,n){"use strict";e.exports=function(t){return Object.keys(t).map(function(e){return t[e]})}},function(e,t,n){"use strict";n=function(e){var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.getType=function(){return this.get("type")},r.getMutability=function(){return this.get("mutability")},r.getData=function(){return this.get("data")},n}((0,n(6).Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object}));e.exports=n},function(e,t,n){"use strict";var r=new RegExp("\r","g");e.exports=function(e){return e.replace(r,"")}},function(e,t,n){"use strict";e.exports={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}}},function(e,t,n){"use strict";var i=n(20);e.exports=function e(t){if(i(t)){var n=t;if(t=n.getAttribute("data-offset-key"))return t;for(var r=0;r<n.childNodes.length;r++){var o=e(n.childNodes[r]);if(o)return o}}return null}},function(e,t,n){"use strict";e.exports=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}},function(e,t,n){"use strict";var o=n(63),i=n(8),a=n(64),s=n(65);e.exports=function(e){var t,n,r;e._blockSelectEvents||e._latestEditorState!==e.props.editorState?e._blockSelectEvents&&(t=e.props.editorState.getSelection(),o.logBlockedSelectionEvent({anonymizedDom:"N/A",extraParams:JSON.stringify({stacktrace:(new Error).stack}),selectionState:JSON.stringify(t.toJS())})):(t=e.props.editorState,(r=(n=s(t,a(e))).selectionState)!==t.getSelection()&&(t=n.needsRecovery?i.forceSelection(t,r):i.acceptSelection(t,r),e.update(t)))}},function(e,t,n){"use strict";e.exports={logBlockedSelectionEvent:function(){return null},logSelectionStateFailure:function(){return null}}},function(e,t,n){"use strict";var r=n(7),o=n(27);e.exports=function(e){return(e=e.editorContainer)||r(!1),o(e.firstChild)||r(!1),e.firstChild}},function(e,t,n){"use strict";var s=n(66);e.exports=function(e,t){var n=t.ownerDocument.defaultView.getSelection(),r=n.anchorNode,o=n.anchorOffset,i=n.focusNode,a=n.focusOffset;return 0===n.rangeCount||null==r||null==i?{selectionState:e.getSelection().set("hasFocus",!1),needsRecovery:!1}:s(e,t,r,o,i,a)}},function(e,t,n){"use strict";var f=n(33),i=n(60),p=n(67),a=n(7),s=n(20),d=n(10);function h(e,t,n){var r=f(t);if(null!=r||e&&(e===t||e.firstChild===t)||a(!1),e===t&&(t=t.firstChild,s(t)||a(!1),"true"!==(t=t).getAttribute("data-contents")&&a(!1),0<n&&(n=t.childNodes.length)),0===n)return{key:null!=r?r:(e=function(e){for(;e.firstChild&&(s(e.firstChild)&&"true"===e.firstChild.getAttribute("data-blocks")||i(e.firstChild));)e=e.firstChild;return e}(t),d(i(e))),offset:0};var o,e=t.childNodes[n-1],t=null,n=null;return n=i(e)?(o=function(e){for(;e.lastChild&&(s(e.lastChild)&&"true"===e.lastChild.getAttribute("data-blocks")||i(e.lastChild));)e=e.lastChild;return e}(e),t=d(i(o)),c(o)):(t=d(r),c(e)),{key:t,offset:n}}function c(e){e=e.textContent;return"\n"===e?0:e.length}e.exports=function(e,t,n,r,o,i){var a=n.nodeType===Node.TEXT_NODE,s=o.nodeType===Node.TEXT_NODE;if(a&&s)return{selectionState:p(e,d(f(n)),r,d(f(o)),i),needsRecovery:!1};var c=null,u=null,l=!0;return a?(c={key:d(f(n)),offset:r},u=h(t,o,i)):s?(u={key:d(f(o)),offset:i},c=h(t,n,r)):(c=h(t,n,r),u=h(t,o,i),n===o&&r===i&&(l=!!n.firstChild&&"BR"!==n.firstChild.nodeName)),{selectionState:p(e,c.key,c.offset,u.key,u.offset),needsRecovery:l}}},function(e,t,n){"use strict";var d=n(15),h=n(10);e.exports=function(e,t,n,r,o){var i=h(e.getSelection());if(!t||!r)return i;var a=(t=d.decode(t)).blockKey,s=(s=e.getBlockTree(a))&&s.getIn([t.decoratorKey,"leaves",t.leafKey]),c=(t=d.decode(r)).blockKey,r=(r=e.getBlockTree(c))&&r.getIn([t.decoratorKey,"leaves",t.leafKey]);if(!s||!r)return i;var t=s.get("start"),u=r.get("start"),l=s?t+n:null,f=r?u+o:null;if(i.getAnchorKey()===a&&i.getAnchorOffset()===l&&i.getFocusKey()===c&&i.getFocusOffset()===f)return i;var p=!1;return p=a===c?(s=s.get("end"),r=r.get("end"),u===t&&r===s?o<n:u<t):e.getCurrentContent().getBlockMap().keySeq().skipUntil(function(e){return e===a||e===c}).first()===c,i.merge({anchorKey:a,anchorOffset:l,focusKey:c,focusOffset:f,isBackward:p})}},function(e,t,n){"use strict";e.exports={notEmptyKey:function(e){return null!=e&&""!=e}}},function(e,t,n){"use strict";var c=n(17);var u=n(134),l=n(0),f=n(7),p=n(70),d=n(135).setDraftEditorSelection,n=function(s){var e;function t(){for(var e,t,n,r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=s.call.apply(s,[this].concat(i))||this,t=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e),r=void 0,(n="leaf")in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,e}e=s,(n=t).prototype=Object.create(e.prototype),(n.prototype.constructor=n).__proto__=e;var n=t.prototype;return n._setSelection=function(){var e,t,n,r,o,i,a=this.props.selection;null!=a&&a.getHasFocus()&&(t=(n=this.props).block,e=n.start,n=n.text,t=t.getKey(),n=e+n.length,a.hasEdgeWithin(t,e,n)&&((r=this.leaf)||f(!1),(o=r.firstChild)||f(!1),o.nodeType===Node.TEXT_NODE?i=o:p(o)?i=r:(i=o.firstChild)||f(!1),d(a,i,t,e,n)))},n.shouldComponentUpdate=function(e){var t=this.leaf;return t||f(!1),t.textContent!==e.text||e.styleSet!==this.props.styleSet||e.forceSelection},n.componentDidUpdate=function(){this._setSelection()},n.componentDidMount=function(){this._setSelection()},n.render=function(){var t=this,e=this.props.block,n=this.props.text,r=(n.endsWith("\n")&&this.props.isLast&&(n+="\n"),this.props),o=r.customStyleMap,i=r.customStyleFn,a=r.offsetKey,r=r.styleSet,s=r.reduce(function(e,t){var n={},t=o[t];return void 0!==t&&e.textDecoration!==t.textDecoration&&(n.textDecoration=[e.textDecoration,t.textDecoration].join(" ").trim()),c(e,t,n)},{});return i&&(i=i(r,e),s=c(s,i)),l.createElement("span",{"data-offset-key":a,ref:function(e){return t.leaf=e},style:s},l.createElement(u,null,n))},t}(l.Component);e.exports=n},function(e,t,n){"use strict";var r=n(20);e.exports=function(e){return!(!e||!e.ownerDocument)&&(r(e)&&"BR"===e.nodeName)}},function(e,t,n){"use strict";e.exports={initODS:function(){},handleExtensionCausedError:function(){}}},function(e,t,n){"use strict";e.exports=function(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}},function(e,t,n){"use strict";var r=n(141);e.exports=function(e){return{x:(e=r(e)).left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}},function(e,t,n){"use strict";function r(){var e;return(e=!(e=document.documentElement?document.documentElement.clientWidth:e)&&document.body?document.body.clientWidth:e)||0}function o(){var e;return(e=!(e=document.documentElement?document.documentElement.clientHeight:e)&&document.body?document.body.clientHeight:e)||0}function i(){return{width:window.innerWidth||r(),height:window.innerHeight||o()}}i.withoutScrollbars=function(){return{width:r(),height:o()}},e.exports=i},function(e,t,n){"use strict";var r=n(17);function m(){return(m=r||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function o(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t}var v=n(69),b=n(15),_=n(0),i=n(45),a=n(36),w=n(41),S=n(32),c=n(19),u=n(73),l=n(37),f=n(74),p=n(7),d=n(27),E=n(10),n=function(s){var e;function t(){for(var e,t,n,r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=s.call.apply(s,[this].concat(i))||this,t=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e),r=void 0,(n="_node")in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,e}e=s,(n=t).prototype=Object.create(e.prototype),(n.prototype.constructor=n).__proto__=e;var n=t.prototype;return n.shouldComponentUpdate=function(e){return this.props.block!==e.block||this.props.tree!==e.tree||this.props.direction!==e.direction||o(e.selection,e.block.getKey())&&e.forceSelection},n.componentDidMount=function(){var e,t,n,r;this.props.preventScroll||(t=(e=this.props.selection).getEndKey(),e.getHasFocus()&&t===this.props.block.getKey()&&null!=(e=this._node)&&(t=a.getScrollParent(e),n=l(t),t===window?0<(r=(r=u(e)).y+r.height-f().height)&&window.scrollTo(n.x,n.y+r+10):(d(e)||p(!1),0<(r=e.offsetHeight+e.offsetTop-(t.offsetTop+t.offsetHeight+n.y))&&i.setTop(t,i.getTop(t)+r+10))))},n._renderChildren=function(){var f=this,p=this.props.block,d=p.getKey(),h=p.getText(),y=this.props.tree.size-1,g=o(this.props.selection,d);return this.props.tree.map(function(e,o){var t=e.get("leaves");if(0===t.size)return null;var i=t.size-1,n=t.map(function(e,t){var n=b.encode(d,o,t),r=e.get("start"),e=e.get("end");return _.createElement(v,{key:n,offsetKey:n,block:p,start:r,selection:g?f.props.selection:null,forceSelection:f.props.forceSelection,text:h.slice(r,e),styleSet:p.getInlineStyleAt(r),customStyleMap:f.props.customStyleMap,customStyleFn:f.props.customStyleFn,isLast:o===y&&t===i})}).toArray(),r=e.get("decoratorKey");if(null==r)return n;if(!f.props.decorator)return n;var a=E(f.props.decorator),s=a.getComponentForKey(r);if(!s)return n;var a=a.getPropsForKey(r),r=b.encode(d,o,0),c=t.first().get("start"),t=t.last().get("end"),u=h.slice(c,t),e=p.getEntityAt(e.get("start")),l=S.getHTMLDirIfDifferent(w.getDirection(u),f.props.direction),u={contentState:f.props.contentState,decoratedText:u,dir:l,start:c,end:t,blockKey:d,entityKey:e,offsetKey:r};return _.createElement(s,m({},a,u,{key:r}),n)}).toArray()},n.render=function(){var t=this,e=this.props,n=e.direction,e=e.offsetKey,n=c({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===n,"public/DraftStyleDefault/rtl":"RTL"===n});return _.createElement("div",{"data-offset-key":e,className:n,ref:function(e){return t._node=e}},this._renderChildren())},t}(_.Component);e.exports=n},function(e,t,n){"use strict";var r=n(147),o=n(148),i=n(77),a=new RegExp("\r\n","g"),s={"text/rtf":1,"text/html":1};function c(e){if("file"==e.kind)return e.getAsFile()}e.exports=function(){function e(e){this.data=e,this.types=e.types?o(e.types):[]}var t=e.prototype;return t.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some(function(e){return s[e]})},t.getText=function(){var e;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(e=this.data.getData("text/plain")):e=this.data.getData("Text")),e?e.replace(a,"\n"):null},t.getHTML=function(){if(this.data.getData)return this.types.length?-1!=this.types.indexOf("text/html")?this.data.getData("text/html"):void 0:this.data.getData("Text")},t.isLink=function(){return this.types.some(function(e){return-1!=e.indexOf("Url")||-1!=e.indexOf("text/uri-list")||e.indexOf("text/x-moz-url")})},t.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/x-moz-url")?this.data.getData("text/x-moz-url").split("\n")[0]:-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},t.isImage=function(){if(this.types.some(function(e){return-1!=e.indexOf("application/x-moz-file")}))return!0;for(var e=this.getFiles(),t=0;t<e.length;t++){var n=e[t].type;if(!r.isImage(n))return!1}return!0},t.getCount=function(){return this.data.hasOwnProperty("items")?this.data.items.length:this.data.hasOwnProperty("mozItemCount")?this.data.mozItemCount:this.data.files?this.data.files.length:null},t.getFiles=function(){return this.data.items?Array.prototype.slice.call(this.data.items).map(c).filter(i.thatReturnsArgument):this.data.files?Array.prototype.slice.call(this.data.files):[]},t.hasFiles=function(){return 0<this.getFiles().length},e}()},function(e,t,n){"use strict";function r(e){return function(){return e}}function o(){}o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";!function(c){var u=n(7),l=/\.textClipping$/,f={"text/plain":!0,"text/html":!0,"text/rtf":!0};e.exports=function(o,i){var a=0,s=[];o.forEach(function(e){var t,n,r;e=e,t=function(e){a++,e&&s.push(e.slice(0,5e3)),a==o.length&&i(s.join("\r"))},c.FileReader&&(!e.type||e.type in f)?""===e.type?(n="",l.test(e.name)&&(n=e.name.replace(l,"")),t(n)):((r=new FileReader).onload=function(){var e=r.result;"string"!=typeof e&&u(!1),t(e)},r.onerror=function(){t("")},r.readAsText(e)):t("")})}}.call(this,n(23))},function(e,t,n){"use strict";var r=n(29);e.exports=function(e){var t=e.getSelection();return t.isCollapsed()?null:r(e.getCurrentContent(),t)}},function(e,t,n){"use strict";var r=n(8),o=n(21),i=n(46),a=n(28);e.exports=function(e){var t=a(e,function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),t=t.getAnchorOffset(),n=n.getBlockForKey(r).getText()[t-1];return i(e,n?o.getUTF16Length(n,0):1)},"backward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return r.push(e,t.set("selectionBefore",n),n.isCollapsed()?"backspace-character":"remove-range")}},function(e,t,n){"use strict";var r=n(11),a=n(7),n=r.isBrowser("Chrome");e.exports=n?function(e){for(var t=e.cloneRange(),n=[],r=e.endContainer;null!=r;r=r.parentNode){var o=r===e.commonAncestorContainer,i=(o?t.setStart(e.startContainer,e.startOffset):t.setStart(t.endContainer,0),Array.from(t.getClientRects()));if(n.push(i),o)return n.reverse(),(i=[]).concat.apply(i,n);t.setEndBefore(r)}a(!1)}:function(e){return Array.from(e.getClientRects())}},function(e,t,n){"use strict";var n="\\s|(?![_])"+n(170).getPunctuation(),r=new RegExp("^(?:"+n+")*(?:['‘’]|(?!"+n+").)*(?:(?!"+n+").)"),o=new RegExp("(?:(?!"+n+").)(?:['‘’]|(?!"+n+").)*(?:"+n+")*$");function i(e,t){t=(t?o:r).exec(e);return t?t[0]:e}e.exports={getBackward:function(e){return i(e,!0)},getForward:function(e){return i(e,!1)}}},function(e,t,n){"use strict";n(47);e.exports=function(e,t){var n=e.getSelection(),r=n.getStartKey(),o=n.getStartOffset(),e=e.getCurrentContent(),i=r,e=t>e.getBlockForKey(r).getText().length-o?(i=e.getKeyAfter(r),0):o+t;return n.merge({focusKey:i,focusOffset:e})}},function(e,R,t){"use strict";function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);(r="function"==typeof Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})):r).forEach(function(e){o(t,e,n[e])})}return t}function o(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function f(e){return"ul"===e||"ol"===e}var r=t(12),a=t(18),s=t(13),c=t(42),n=t(30),p=t(180),u=t(19),d=t(14),l=t(85),h=t(16),y=t(6),g=y.List,m=y.Map,v=y.OrderedSet,b=t(181),_=t(70),w=t(27),S=t(182),E=h("draft_tree_data_support"),C=new RegExp("\r","g"),O=new RegExp("\n","g"),x=new RegExp("^\n","g"),k=new RegExp(" ","g"),D=new RegExp(" ?","g"),T=new RegExp("​?","g"),j=["bold","bolder","500","600","700","800","900"],I=["light","lighter","normal","100","200","300","400"],M=["className","href","rel","target","title"],N=["alt","className","height","src","width"],A=(o(y={},u("public/DraftStyleDefault/depth0"),0),o(y,u("public/DraftStyleDefault/depth1"),1),o(y,u("public/DraftStyleDefault/depth2"),2),o(y,u("public/DraftStyleDefault/depth3"),3),o(y,u("public/DraftStyleDefault/depth4"),4),y),P=m({b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE",mark:"HIGHLIGHT"}),L=function(){function e(e,t){o(this,"characterList",g()),o(this,"currentBlockType","unstyled"),o(this,"currentDepth",0),o(this,"currentEntity",null),o(this,"currentText",""),o(this,"wrapper",null),o(this,"blockConfigs",[]),o(this,"contentBlocks",[]),o(this,"entityMap",n),o(this,"blockTypeMap",void 0),o(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=e,this.disambiguate=t}var t=e.prototype;return t.clear=function(){this.characterList=g(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=n,this.wrapper=null,this.contentBlocks=[]},t.addDOMNode=function(e){var t;return this.contentBlocks=[],this.currentDepth=0,(t=this.blockConfigs).push.apply(t,this._toBlockConfigs([e],v())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},t.getContentBlocks=function(){return 0===this.contentBlocks.length&&(E?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},t._makeBlockConfig=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=i({key:e.key||d(),type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:g(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=g(),this.currentBlockType="unstyled",this.currentText="",e},t._toBlockConfigs=function(e,t){for(var n=[],r=0;r<e.length;r++){var o,i,a,s,c,u=e[r],l=u.nodeName.toLowerCase();"body"===l||f(l)?(this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig()),o=this.currentDepth,i=this.wrapper,f(l)&&(this.wrapper=l,f(i)&&this.currentDepth++),n.push.apply(n,this._toBlockConfigs(Array.from(u.childNodes),t)),this.currentDepth=o,this.wrapper=i):void 0!==(o=this.blockTypeMap.get(l))?(this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig()),i=this.currentDepth,a=this.wrapper,this.wrapper="pre"===l?"pre":this.wrapper,"string"!=typeof o&&(o=this.disambiguate(l,this.wrapper)||o[0]||"unstyled"),E||!w(u)||"unordered-list-item"!==o&&"ordered-list-item"!==o||(this.currentDepth=function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(A).some(function(e){t.classList.contains(e)&&(n=A[e])}),n}(u,this.currentDepth)),s=d(),c=this._toBlockConfigs(Array.from(u.childNodes),t),this._trimCurrentText(),n.push(this._makeBlockConfig({key:s,childConfigs:c,type:o})),this.currentDepth=i,this.wrapper=a):"#text"===l?this._addTextNode(u,t):"br"===l?this._addBreakNode(u,t):!function(e){if(!S(e))return!1;return!(!e.attributes.getNamedItem("src")||!e.attributes.getNamedItem("src").value)}(u)?!function(e){if(!b(e))return!1;if(!e.href||"http:"!==e.protocol&&"https:"!==e.protocol&&"mailto:"!==e.protocol&&"tel:"!==e.protocol)return!1;try{new p(e.href);return!0}catch(e){return!1}}(u)?(s=t,s=function(e,t){if(!w(e))return t;var n=e.style.fontWeight,r=e.style.fontStyle,o=e.style.textDecoration;return t.withMutations(function(e){0<=j.indexOf(n)?e.add("BOLD"):0<=I.indexOf(n)&&e.remove("BOLD"),"italic"===r?e.add("ITALIC"):"normal"===r&&e.remove("ITALIC"),"underline"===o&&e.add("UNDERLINE"),"line-through"===o&&e.add("STRIKETHROUGH"),"none"===o&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))})}(u,s=P.has(l)?s.add(P.get(l)):s),null!=(c=function(e){if(w(e)&&e.style.fontFamily.includes("monospace"))return"CODE";return null}(u))&&(s=s.add(c)),n.push.apply(n,this._toBlockConfigs(Array.from(u.childNodes),s))):this._addAnchorNode(u,n,t):this._addImgNode(u,t)}return n},t._appendText=function(e,t){this.currentText+=e;var n,t=r.create({style:t,entity:this.currentEntity});this.characterList=(n=this.characterList).push.apply(n,Array(e.length).fill(t))},t._trimCurrentText=function(){var e=this.currentText.length,t=e-this.currentText.trimLeft().length,n=this.currentText.trimRight().length,r=this.characterList.findEntry(function(e){return null!==e.getEntity()}),t=void 0!==r?Math.min(t,r[0]):t;(n=void 0!==(r=this.characterList.reverse().findEntry(function(e){return null!==e.getEntity()}))?Math.max(n,e-r[0]):n)<t?(this.currentText="",this.characterList=g()):(this.currentText=this.currentText.slice(t,n),this.characterList=this.characterList.slice(t,n))},t._addTextNode=function(e,t){e=e.textContent;""===e.trim()&&"pre"!==this.wrapper&&(e=" "),"pre"!==this.wrapper&&(e=(e=e.replace(x,"")).replace(O," ")),this._appendText(e,t)},t._addBreakNode=function(e,t){_(e)&&this._appendText("\n",t)},t._addImgNode=function(e,t){var n,r;S(e)&&(n=e,r={},N.forEach(function(e){var t=n.getAttribute(e);t&&(r[e]=t)}),this.currentEntity=this.entityMap.__create("IMAGE","IMMUTABLE",r),h("draftjs_fix_paste_for_img")&&"presentation"===n.getAttribute("role")||this._appendText("📷",t),this.currentEntity=null)},t._addAnchorNode=function(e,t,n){var r,o;b(e)&&(r=e,o={},M.forEach(function(e){var t=r.getAttribute(e);t&&(o[e]=t)}),o.url=new p(r.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",o||{}),t.push.apply(t,this._toBlockConfigs(Array.from(e.childNodes),n)),this.currentEntity=null)},t._toContentBlocks=function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,n=e.length-1,r=0;r<=n;r++){var o=e[r];o.parent=t,o.prevSibling=0<r?e[r-1].key:null,o.nextSibling=r<n?e[r+1].key:null,o.children=g(o.childConfigs.map(function(e){return e.key})),this.contentBlocks.push(new s(i({},o))),this._toContentBlocks(o.childConfigs,o.key)}},t._hoistContainersInBlockConfigs=function(e){var t=this;return g(e).flatMap(function(e){return"unstyled"!==e.type||""!==e.text?[e]:t._hoistContainersInBlockConfigs(e.childConfigs)})},t._toFlatContentBlocks=function(e){var r=this;this._hoistContainersInBlockConfigs(e).forEach(function(e){var t=r._extractTextFromBlockConfigs(e.childConfigs),n=t.text,t=t.characterList;r.contentBlocks.push(new a(i({},e,{text:e.text+n,characterList:e.characterList.concat(t)})))})},t._extractTextFromBlockConfigs=function(e){for(var t=e.length-1,n="",r=g(),o=0;o<=t;o++){var i=e[o],i=(n+=i.text,r=r.concat(i.characterList),""!==n&&"unstyled"!==i.type&&(n+="\n",r=r.push(r.last())),this._extractTextFromBlockConfigs(i.childConfigs));n+=i.text,r=r.concat(i.characterList)}return{text:n,characterList:r}},e}();e.exports=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:l,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:c,t=t(e=e.trim().replace(C,"").replace(k," ").replace(D,"").replace(T,""));if(!t)return null;r={},n.mapKeys(function(t,e){var n=[e.element];void 0!==e.aliasedElements&&n.push.apply(n,e.aliasedElements),n.forEach(function(e){void 0===r[e]?r[e]=t:"string"==typeof r[e]?r[e]=[r[e],t]:r[e].push(t)})});var r,e=m(r);return new L(e,function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null}).addDOMNode(t).getContentBlocks()}},function(e,t,n){"use strict";var r=n(11),o=n(7),i=r.isBrowser("IE <= 9");e.exports=function(e){var t,n=null;return!i&&document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement||o(!1),t.documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}},function(e,t,n){"use strict";var c=n(9),u=n(8),s=n(183),l=n(10),o={currentBlockContainsLink:function(e){var t=e.getSelection(),e=e.getCurrentContent(),n=e.getEntityMap();return e.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some(function(e){e=e.getEntity();return!!e&&"LINK"===n.__get(e).getType()})},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t,n){switch(t){case"bold":return o.toggleInlineStyle(e,"BOLD");case"italic":return o.toggleInlineStyle(e,"ITALIC");case"underline":return o.toggleInlineStyle(e,"UNDERLINE");case"code":return o.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return o.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return o.onDelete(e);default:return null}},insertSoftNewline:function(e){var t=c.insertText(e.getCurrentContent(),e.getSelection(),"\n",e.getCurrentInlineStyle(),null),e=u.push(e,t,"insert-characters");return u.forceSelection(e,t.getSelectionAfter())},onBackspace:function(e){var t=e.getSelection();if(!t.isCollapsed()||t.getAnchorOffset()||t.getFocusOffset())return null;var n=e.getCurrentContent(),r=t.getStartKey(),r=n.getBlockBefore(r);if(r&&"atomic"===r.getType()){r=n.getBlockMap().delete(r.getKey()),r=n.merge({blockMap:r,selectionAfter:t});if(r!==n)return u.push(e,r,"remove-range")}t=o.tryToRemoveBlockStyle(e);return t?u.push(e,t,"change-block-type"):null},onDelete:function(e){var t=e.getSelection();if(!t.isCollapsed())return null;var n=e.getCurrentContent(),r=t.getStartKey(),o=n.getBlockForKey(r).getLength();if(t.getStartOffset()<o)return null;o=n.getBlockAfter(r);if(!o||"atomic"!==o.getType())return null;r=t.merge({focusKey:o.getKey(),focusOffset:o.getLength()}),t=c.removeRange(n,r,"forward");return t!==n?u.push(e,t,"remove-range"):null},onTab:function(e,t,n){var r=t.getSelection(),o=r.getAnchorKey();if(o!==r.getFocusKey())return t;var i=t.getCurrentContent(),o=i.getBlockForKey(o),a=o.getType();if("unordered-list-item"!==a&&"ordered-list-item"!==a)return t;e.preventDefault();a=o.getDepth();if(!e.shiftKey&&a===n)return t;o=s(i,r,e.shiftKey?-1:1,n);return u.push(t,o,"adjust-depth")},toggleBlockType:function(e,t){var n,r=e.getSelection(),o=r.getStartKey(),i=r.getEndKey(),a=e.getCurrentContent(),s=r;if(o!==i&&0===r.getEndOffset()&&(n=l(a.getBlockBefore(i)),i=n.getKey(),s=s.merge({anchorKey:o,anchorOffset:r.getStartOffset(),focusKey:i,focusOffset:n.getLength(),isBackward:!1})),a.getBlockMap().skipWhile(function(e,t){return t!==o}).reverse().skipWhile(function(e,t){return t!==i}).some(function(e){return"atomic"===e.getType()}))return e;r=a.getBlockForKey(o).getType()===t?"unstyled":t;return u.push(e,c.setBlockType(a,s,r),"change-block-type")},toggleCode:function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=t.getFocusKey();return t.isCollapsed()||n!==r?o.toggleBlockType(e,"code-block"):o.toggleInlineStyle(e,"CODE")},toggleInlineStyle:function(e,t){var n=e.getSelection(),r=e.getCurrentInlineStyle();if(n.isCollapsed())return u.setInlineStyleOverride(e,r.has(t)?r.remove(t):r.add(t));var o=e.getCurrentContent(),r=r.has(t)?c.removeInlineStyle(o,n,t):c.applyInlineStyle(o,n,t);return u.push(e,r,"change-inline-style")},toggleLink:function(e,t,n){t=c.applyEntity(e.getCurrentContent(),t,n);return u.push(e,t,"apply-entity")},tryToRemoveBlockStyle:function(e){var t=e.getSelection(),n=t.getAnchorOffset();if(t.isCollapsed()&&0===n){var n=t.getAnchorKey(),e=e.getCurrentContent(),r=e.getBlockForKey(n).getType(),n=e.getBlockBefore(n);if("code-block"===r&&n&&"code-block"===n.getType()&&0!==n.getLength())return null;if("unstyled"!==r)return c.setBlockType(e,t,"unstyled")}return null}};e.exports=o},function(e,t,n){"use strict";var r=n(48),o=n(35),n=n(11),i=n.isPlatform("Mac OS X"),a=i&&n.isBrowser("Firefox < 29"),s=r.hasCommandModifier,c=r.isCtrlKeyCommand;function u(e){return i&&e.altKey||c(e)}e.exports=function(e){switch(e.keyCode){case 66:return s(e)?"bold":null;case 68:return c(e)?"delete":null;case 72:return c(e)?"backspace":null;case 73:return s(e)?"italic":null;case 74:return s(e)?"code":null;case 75:return i&&c(e)?"secondary-cut":null;case 77:case 79:return c(e)?"split-block":null;case 84:return i&&c(e)?"transpose-characters":null;case 85:return s(e)?"underline":null;case 87:return i&&c(e)?"backspace-word":null;case 89:return c(e)?i?"secondary-paste":"redo":null;case 90:return(s(n=e)?n.shiftKey?"redo":"undo":null)||null;case o.RETURN:return"split-block";case o.DELETE:return n=e,!i&&n.shiftKey?null:u(n)?"delete-word":"delete";case o.BACKSPACE:return s(t=e)&&i?"backspace-to-start-of-line":u(t)?"backspace-word":"backspace";case o.LEFT:return a&&s(e)?"move-selection-to-start-of-block":null;case o.RIGHT:return a&&s(e)?"move-selection-to-end-of-block":null;default:return null}var t,n}},function(e,t,n){"use strict";e.exports={stringify:function(e){return"_"+String(e)},unstringify:function(e){return e.slice(1)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e};function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=i(n(90)),c=i(n(215));function i(e){return e&&e.__esModule?e:{default:e}}function u(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function l(e,t,n){return a.default.ucs2.encode(e.slice(t,n))}function s(t,e){return e.forEach(function(e){t.push(e.offset),t.push(e.offset+e.length)}),t}r(f,[{key:"relevantStyles",value:function(t){return this.ranges.filter(function(e){return t>=e.offset&&t<e.offset+e.length}).map(function(e){return e.style})}},{key:"nodeIterator",value:function(o,e,i){var a=this,s=this.relevantIndexes.slice(this.relevantIndexes.indexOf(e),this.relevantIndexes.indexOf(i));return s.forEach(function(e,t){var n=a.relevantStyles(e),r=s[t+1]?s[t+1]-e:1,r=l(a.textArray,e,e+r);o.pushContent(r,n,a.flat),!s[t+1]&&e<i&&o.pushContent(l(a.textArray,e+1,i),a.relevantStyles(i-1),a.flat)}),o}},{key:"parse",value:function(e){var t=this,n=e.text,r=e.inlineStyleRanges,o=e.entityRanges,i=e.decoratorRanges,i=void 0===i?[]:i;this.textArray=a.default.ucs2.decode(n),this.ranges=r,this.iterator=0,this.relevantIndexes=function(e,t,n,r){var n=2<arguments.length&&void 0!==n?n:[],r=3<arguments.length&&void 0!==r?r:[],o=s(o=[],t);return o=s(o,n),(o=s(o,r)).push(0),o.push(e.length),o.filter(function(e,t,n){return n.indexOf(e)===t}).sort(function(e,t){return e-t})}(n,r,o,i);n=function(e,t,n,r){var t=1<arguments.length&&void 0!==t?t:[],o=n,i=r,a=0,n=[].concat(u(e),u(t)).sort(function(e,t){return e.offset-t.offset}),s=[];return n.length<1?s.push(new c.default({block:i,start:0,end:o.length})):(n.forEach(function(e){e.offset>a&&s.push(new c.default({block:i,start:a,end:e.offset})),s.push(new c.default({block:i,entity:e.key,decorator:e.component,decoratorProps:e.decoratorProps,decoratedText:e.component?l(o,e.offset,e.offset+e.length):void 0,start:e.offset,end:e.offset+e.length,contentState:e.contentState})),a=e.offset+e.length}),a<o.length&&s.push(new c.default({block:i,start:a,end:o.length}))),s}(o,i,this.textArray,e).map(function(e){return t.nodeIterator(e,e.start,e.end)});return new c.default({block:e,content:n})}}]);n=f;function f(e){e=e.flat,e=void 0!==e&&e;if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");this.flat=e}t.default=n},function(e,y,O){!function(e,t){var n,g,m,v,o,i,r,a,s,c,u,b,_;/*! https://mths.be/punycode v1.4.1 by @mathias */function w(e){throw new RangeError(c[e])}function l(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function f(e,t){var n=e.split("@"),r="",n=(1<n.length&&(r=n[0]+"@",e=n[1]),(e=e.replace(s,".")).split("."));return r+l(n,t).join(".")}function S(e){for(var t,n,r=[],o=0,i=e.length;o<i;)55296<=(t=e.charCodeAt(o++))&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function h(e){return l(e,function(e){var t="";return 65535<e&&(t+=_((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=_(e)}).join("")}function E(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function C(e,t,n){var r=0;for(e=n?b(e/i):e>>1,e+=b(e/t);u*v>>1<e;r+=m)e=b(e/u);return b(r+(u+1)*e/(e+o))}function p(e){var t,n,r,o,i,a,s,c=[],u=e.length,l=0,f=128,p=72,d=e.lastIndexOf("-");for(d<0&&(d=0),n=0;n<d;++n)128<=e.charCodeAt(n)&&w("not-basic"),c.push(e.charCodeAt(n));for(r=0<d?d+1:0;r<u;){for(o=l,i=1,a=m;u<=r&&w("invalid-input"),s=e.charCodeAt(r++),(m<=(s=s-48<10?s-22:s-65<26?s-65:s-97<26?s-97:m)||s>b((g-l)/i))&&w("overflow"),l+=s*i,!(s<(s=a<=p?1:p+v<=a?v:a-p));a+=m)i>b(g/(s=m-s))&&w("overflow"),i*=s;p=C(l-o,t=c.length+1,0==o),b(l/t)>g-f&&w("overflow"),f+=b(l/t),l%=t,c.splice(l++,0,f)}return h(c)}function d(e){for(var t,n,r,o,i,a,s,c,u,l,f=[],p=(e=S(e)).length,d=128,h=72,y=t=0;y<p;++y)(s=e[y])<128&&f.push(_(s));for(n=r=f.length,r&&f.push("-");n<p;){for(o=g,y=0;y<p;++y)d<=(s=e[y])&&s<o&&(o=s);for(o-d>b((g-t)/(c=n+1))&&w("overflow"),t+=(o-d)*c,d=o,y=0;y<p;++y)if((s=e[y])<d&&++t>g&&w("overflow"),s==d){for(i=t,a=m;!(i<(u=a<=h?1:h+v<=a?v:a-h));a+=m)f.push(_(E(u+(l=i-u)%(u=m-u),0))),i=b(l/u);f.push(_(E(i,0))),h=C(t,c,n==r),t=0,++n}++t,++d}return f.join("")}y&&y.nodeType,e&&e.nodeType,(t="object"==typeof t&&t).global!==t&&t.window!==t&&t.self,g=2147483647,v=26,o=38,i=700,r=/^xn--/,a=/[^\x20-\x7E]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,c={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},u=(m=36)-1,b=Math.floor,_=String.fromCharCode,n={version:"1.4.1",ucs2:{decode:S,encode:h},decode:p,encode:d,toASCII:function(e){return f(e,function(e){return a.test(e)?"xn--"+d(e):e})},toUnicode:function(e){return f(e,function(e){return r.test(e)?p(e.slice(4).toLowerCase()):e})}},void 0!==(t=function(){return n}.call(y,O,y,e))&&(e.exports=t)}.call(this,O(214)(e),O(23))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});(function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)})(i,[{key:"getDecorations",value:function(t,n){var c=Array(t.getText().length).fill(null);return this.decorators.forEach(function(e,a){var s=0;(0,e.strategy)(t,function(e,t){if(function(e,t,n){for(var r=t;r<n;r++)if(null!=e[r])return;return 1}(c,e,t)){for(var n=c,r=t,o=a+"."+s,i=e;i<r;i++)n[i]=o;s++}},n)}),c}},{key:"getComponentForKey",value:function(e){e=parseInt(e.split(".")[0],10);return this.decorators[e].component}},{key:"getPropsForKey",value:function(e){e=parseInt(e.split(".")[0],10);return this.decorators[e].props}}]);var o=i;function i(e){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");this.decorators=e.slice()}t.default=o},function(e,t,n){e.exports=function(){"use strict";function o(e,t){if(e)for(var n in e)if({}.hasOwnProperty.call(e,n))t(n,e[n])}function t(e){if(e===undefined||e===null||e.length===0||e.trim().length===0)return true;return false}var n={unstyled:"p","header-one":"h1","header-two":"h2","header-three":"h3","header-four":"h4","header-five":"h5","header-six":"h6","unordered-list-item":"ul","ordered-list-item":"ol",blockquote:"blockquote",code:"pre"};function l(e){return e&&n[e]}function f(e){var n="";o(e,function(e,t){if(t)n+="".concat(e,":").concat(t,";")});return n}function i(e,t){var n=[];if(t){var r=0;var o=0;var i=e;var a=t.trigger||"#";var s=t.separator||" ";for(;i.length>0&&o>=0;){if(i[0]===a){o=0;r=0;i=i.substr(a.length)}else{o=i.indexOf(s+a);if(o>=0){i=i.substr(o+(s+a).length);r+=o+s.length}}if(o>=0){var c=i.indexOf(s)>=0?i.indexOf(s):i.length;var u=i.substr(0,c);if(u&&u.length>0)n.push({offset:r,length:u.length+a.length,type:"HASHTAG"});r+=a.length}}}return n}function c(e,t){var n=[];var r=0;var o=e.entityRanges.map(function(e){var t=e.offset,n=e.length,r=e.key;return{offset:t,length:n,key:r,type:"ENTITY"}});o=o.concat(i(e.text,t));o=o.sort(function(e,t){return e.offset-t.offset});o.forEach(function(e){if(e.offset>r)n.push({start:r,end:e.offset});n.push({start:e.offset,end:e.offset+e.length,entityKey:e.key,type:e.type});r=e.offset+e.length});if(r<e.text.length)n.push({start:r,end:e.text.length});return n}function u(e){if(e.entityRanges.length>0&&(t(e.text)||e.type==="atomic"))return true;return false}function p(e){var t=e.text,n=e.inlineStyleRanges;var o={BOLD:new Array(t.length),ITALIC:new Array(t.length),UNDERLINE:new Array(t.length),STRIKETHROUGH:new Array(t.length),CODE:new Array(t.length),SUPERSCRIPT:new Array(t.length),SUBSCRIPT:new Array(t.length),COLOR:new Array(t.length),BGCOLOR:new Array(t.length),FONTSIZE:new Array(t.length),FONTFAMILY:new Array(t.length),length:t.length};if(n&&n.length>0)n.forEach(function(e){var t=e.offset;var n=t+e.length;for(var r=t;r<n;r+=1)if(e.style.indexOf("color-")===0)o.COLOR[r]=e.style.substring(6);else if(e.style.indexOf("bgcolor-")===0)o.BGCOLOR[r]=e.style.substring(8);else if(e.style.indexOf("fontsize-")===0)o.FONTSIZE[r]=e.style.substring(9);else if(e.style.indexOf("fontfamily-")===0)o.FONTFAMILY[r]=e.style.substring(11);else if(o[e.style])o[e.style][r]=true});return o}function d(e,t){var n={};if(e.COLOR[t])n.COLOR=e.COLOR[t];if(e.BGCOLOR[t])n.BGCOLOR=e.BGCOLOR[t];if(e.FONTSIZE[t])n.FONTSIZE=e.FONTSIZE[t];if(e.FONTFAMILY[t])n.FONTFAMILY=e.FONTFAMILY[t];if(e.UNDERLINE[t])n.UNDERLINE=true;if(e.ITALIC[t])n.ITALIC=true;if(e.BOLD[t])n.BOLD=true;if(e.STRIKETHROUGH[t])n.STRIKETHROUGH=true;if(e.CODE[t])n.CODE=true;if(e.SUBSCRIPT[t])n.SUBSCRIPT=true;if(e.SUPERSCRIPT[t])n.SUPERSCRIPT=true;return n}function h(t,e,n){var r=true;if(n>0&&n<t.length)e.forEach(function(e){r=r&&t[e][n]===t[e][n-1]});else r=false;return r}function a(e,t){if(e==="BOLD")return"<strong>".concat(t,"</strong>");if(e==="ITALIC")return"<em>".concat(t,"</em>");if(e==="UNDERLINE")return"<ins>".concat(t,"</ins>");if(e==="STRIKETHROUGH")return"<del>".concat(t,"</del>");if(e==="CODE")return"<code>".concat(t,"</code>");if(e==="SUPERSCRIPT")return"<sup>".concat(t,"</sup>");if(e==="SUBSCRIPT")return"<sub>".concat(t,"</sub>");return t}function s(e){if(e&&e.length>0){var t=e.map(function(e){switch(e){case"\n":return"<br>";case"&":return"&";case"<":return"<";case">":return">";default:return e}});return t.join("")}return""}function y(e,t){if(e&&(e.COLOR||e.BGCOLOR||e.FONTSIZE||e.FONTFAMILY)){var n='style="';if(e.COLOR)n+="color: ".concat(e.COLOR,";");if(e.BGCOLOR)n+="background-color: ".concat(e.BGCOLOR,";");if(e.FONTSIZE)n+="font-size: ".concat(e.FONTSIZE).concat(/^\d+$/.test(e.FONTSIZE)?"px":"",";");if(e.FONTFAMILY)n+="font-family: ".concat(e.FONTFAMILY,";");n+='"';return"<span ".concat(n,">").concat(t,"</span>")}return t}function g(e,t,n,r){var o=e[t];if(typeof r==="function"){var i=r(o,n);if(i)return i}if(o.type==="MENTION")return'<a href="'.concat(o.data.url,'" class="wysiwyg-mention" data-mention data-value="').concat(o.data.value,'">').concat(n,"</a>");if(o.type==="LINK"){var a=o.data.targetOption||"_self";return'<a href="'.concat(o.data.url,'" target="').concat(a,'">').concat(n,"</a>")}if(o.type==="IMAGE"){var s=o.data.alignment;if(s&&s.length)return'<div style="text-align:'.concat(s,';"><img src="').concat(o.data.src,'" alt="').concat(o.data.alt,'" style="height: ').concat(o.data.height,";width: ").concat(o.data.width,'"/></div>');return'<img src="'.concat(o.data.src,'" alt="').concat(o.data.alt,'" style="height: ').concat(o.data.height,";width: ").concat(o.data.width,'"/>')}if(o.type==="EMBEDDED_LINK")return'<iframe width="'.concat(o.data.width,'" height="').concat(o.data.height,'" src="').concat(o.data.src,'" frameBorder="0"></iframe>');return n}function m(e,t,n,r){var o=[];var i=Array.from(e.text);if(i.length>0){var a=p(e);var s;for(var c=n;c<r;c+=1)if(c!==n&&h(a,t,c)){s.text.push(i[c]);s.end=c+1}else{s={styles:d(a,c),text:[i[c]],start:c,end:c+1};o.push(s)}}return o}function v(e){if(e){var t=e;for(var n=0;n<t.length;n+=1)if(e[n]===" ")t=t.replace(" "," ");else break;return t}return e}function b(e){if(e){var t=e;for(var n=t.length-1;n>=0;n-=1)if(t[n]===" ")t="".concat(t.substring(0,n)," ").concat(t.substring(n+1));else break;return t}return e}function _(e){var t=e.styles,n=e.text;var r=s(n);o(t,function(e,t){r=a(e,r)});return r}function w(e,t){var n=m(e,["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"],t.start,t.end);var r="";n.forEach(function(e){r+=_(e)});r=y(t.styles,r);return r}function S(t,e,n,r){var o=[];var i=m(t,["COLOR","BGCOLOR","FONTSIZE","FONTFAMILY"],n.start,n.end);i.forEach(function(e){o.push(w(t,e))});var a=o.join("");if(n.type==="ENTITY"){if(n.entityKey!==undefined&&n.entityKey!==null)a=g(e,n.entityKey,a,r)}else if(n.type==="HASHTAG")a='<a href="'.concat(a,'" class="wysiwyg-hashtag">').concat(a,"</a>");return a}function E(r,o,e,i){var a=[];var s=c(r,e);s.forEach(function(e,t){var n=S(r,o,e,i);if(t===0)n=v(n);if(t===s.length-1)n=b(n);a.push(n)});return a.join("")}function C(e,t,n,r,o){var i=[];if(u(e))i.push(g(t,e.entityRanges[0].key,undefined,o));else{var a=l(e.type);if(a){i.push("<".concat(a));var s=f(e.data);if(s)i.push(' style="'.concat(s,'"'));if(r)i.push(' dir = "auto"');i.push(">");i.push(E(e,t,n,o));i.push("</".concat(a,">"))}}i.push("\n");return i.join("")}function O(e){return e==="unordered-list-item"||e==="ordered-list-item"}function x(e,r,o,i,a){var s=[];var c=[];var u;e.forEach(function(e){var t=false;if(!u)s.push("<".concat(l(e.type),">\n"));else if(u.type!==e.type){s.push("</".concat(l(u.type),">\n"));s.push("<".concat(l(e.type),">\n"))}else if(u.depth===e.depth){if(c&&c.length>0){s.push(x(c,r,o,i,a));c=[]}}else{t=true;c.push(e)}if(!t){s.push("<li");var n=f(e.data);if(n)s.push(' style="'.concat(n,'"'));if(i)s.push(' dir = "auto"');s.push(">");s.push(E(e,r,o,a));s.push("</li>\n");u=e}});if(c&&c.length>0)s.push(x(c,r,o,i,a));s.push("</".concat(l(u.type),">\n"));return s.join("")}function e(e,r,o,i){var a=[];if(e){var t=e.blocks,s=e.entityMap;if(t&&t.length>0){var c=[];t.forEach(function(e){if(O(e.type))c.push(e);else{if(c.length>0){var t=x(c,s,r,i);a.push(t);c=[]}var n=C(e,s,r,o,i);a.push(n)}});if(c.length>0){var n=x(c,s,r,o,i);a.push(n);c=[]}}}return a.join("")}return e}()},function(e,t,r){"use strict";function o(n){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n}function s(e){return Object.prototype.toString.call(e)}function c(e){return"[object Function]"===s(e)}function u(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var i={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var a={"http:":{validate:function(e,t,n){e=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(e)?e.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),!n.re.no_http.test(r)||3<=t&&":"===e[t-3]||3<=t&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length}},"mailto:":{validate:function(e,t,n){e=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(e)?e.match(n.re.mailto)[0].length:0}}},l="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",f="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function p(){return function(e,t){t.normalize(e)}}function d(o){var t=o.re=r(204)(o.__opts__),e=o.__tlds__.slice();function n(e){return e.replace("%TLDS%",t.src_tlds)}o.onCompile(),o.__tlds_replaced__||e.push(l),e.push(t.src_xn),t.src_tlds=e.join("|"),t.email_fuzzy=RegExp(n(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(n(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(n(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(n(t.tpl_host_fuzzy_test),"i");var i=[];function a(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}o.__compiled__={},Object.keys(o.__schemas__).forEach(function(e){var t=o.__schemas__[e];if(null!==t){var n,r={validate:null,link:null};if(o.__compiled__[e]=r,"[object Object]"===s(t))return"[object RegExp]"===s(t.validate)?r.validate=(n=t.validate,function(e,t){e=e.slice(t);return n.test(e)?e.match(n)[0].length:0}):c(t.validate)?r.validate=t.validate:a(e,t),void(c(t.normalize)?r.normalize=t.normalize:t.normalize?a(e,t):r.normalize=p());"[object String]"===s(t)?i.push(e):a(e,t)}}),i.forEach(function(e){o.__compiled__[o.__schemas__[e]]&&(o.__compiled__[e].validate=o.__compiled__[o.__schemas__[e]].validate,o.__compiled__[e].normalize=o.__compiled__[o.__schemas__[e]].normalize)}),o.__compiled__[""]={validate:null,normalize:p()};var e=Object.keys(o.__compiled__).filter(function(e){return 0<e.length&&o.__compiled__[e]}).map(u).join("|");o.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+e+")","i"),o.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+e+")","ig"),o.re.pretest=RegExp("("+o.re.schema_test.source+")|("+o.re.host_fuzzy_test.source+")|@","i"),(e=o).__index__=-1,e.__text_cache__=""}function n(e,t){var n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function h(e,t){t=new n(e,t);return e.__compiled__[t.schema].normalize(t,e),t}function y(e,t){if(!(this instanceof y))return new y(e,t);var n;t||(n=e,Object.keys(n||{}).reduce(function(e,t){return e||i.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=o({},i,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=o({},a,e),this.__compiled__={},this.__tlds__=f,this.__tlds_replaced__=!1,this.re={},d(this)}y.prototype.add=function(e,t){return this.__schemas__[e]=t,d(this),this},y.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},y.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,o,i;if(this.re.schema_test.test(e))for((o=this.re.schema_search).lastIndex=0;null!==(t=o.exec(e));)if(n=this.testSchemaAt(e,t[2],o.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(i=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||i<this.__index__)&&null!==(i=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(r=i.index+i[1].length,(this.__index__<0||r<this.__index__)&&(this.__schema__="",this.__index__=r,this.__last_index__=i.index+i[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&0<=e.indexOf("@")&&null!==(i=e.match(this.re.email_fuzzy))&&(r=i.index+i[1].length,i=i.index+i[0].length,(this.__index__<0||r<this.__index__||r===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=r,this.__last_index__=i)),0<=this.__index__},y.prototype.pretest=function(e){return this.re.pretest.test(e)},y.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},y.prototype.match=function(e){for(var t=0,n=[],r=(0<=this.__index__&&this.__text_cache__===e&&(n.push(h(this,t)),t=this.__last_index__),t?e.slice(t):e);this.test(r);)n.push(h(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},y.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),d(this),this},y.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},y.prototype.onCompile=function(){},e.exports=y},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports=n(231)},function(e,t,n){"use strict";function a(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}var s=n(25),c=n(12),r=n(18),o=n(13),u=n(9),l=n(8),f=n(14),i=n(16),p=n(6),d=n(118),h=i("draft_tree_data_support"),y=h?o:r,g=p.List,m=p.Repeat;e.exports={insertAtomicBlock:function(e,t,n){var r=e.getCurrentContent(),o=e.getSelection(),r=u.removeRange(r,o,"backward"),i=r.getSelectionAfter(),r=u.splitBlock(r,i),i=r.getSelectionAfter(),r=u.setBlockType(r,i,"atomic"),t=c.create({entity:t}),t={key:f(),type:"atomic",text:n,characterList:g(m(t,n.length))},n={key:f(),type:"unstyled"},t=(h&&(t=a({},t,{nextSibling:n.key}),n=a({},n,{prevSibling:t.key})),[new y(t),new y(n)]),n=s.createFromArray(t),t=u.replaceWithFragment(r,i,n),r=t.merge({selectionBefore:o,selectionAfter:t.getSelectionAfter().set("hasFocus",!0)});return l.push(e,r,"insert-fragment")},moveAtomicBlock:function(e,t,n,r){var o,i=e.getCurrentContent(),a=e.getSelection(),i=(r="before"===r||"after"===r?(o=i.getBlockForKey("before"===r?n.getStartKey():n.getEndKey()),d(i,t,o,r)):(r=(o=u.removeRange(i,n,"backward")).getSelectionAfter(),i=o.getBlockForKey(r.getFocusKey()),0===r.getStartOffset()?d(o,t,i,"before"):r.getEndOffset()===i.getLength()?d(o,t,i,"after"):(i=(n=u.splitBlock(o,r)).getSelectionAfter(),o=n.getBlockForKey(i.getFocusKey()),d(n,t,o,"before")))).merge({selectionBefore:a,selectionAfter:r.getSelectionAfter().set("hasFocus",!0)});return l.push(e,i,"move-block")}}},function(e,t,n){"use strict";var p=n(12),o=n(6).Map;function r(e,t,a,s){var n=e.getBlockMap(),c=t.getStartKey(),u=t.getStartOffset(),l=t.getEndKey(),f=t.getEndOffset(),r=n.skipUntil(function(e,t){return t===c}).takeUntil(function(e,t){return t===l}).concat(o([[l,n.get(l)]])).map(function(e,t){for(var n,r,o=c===l?(n=u,f):(n=t===c?u:0,t===l?f:e.getLength()),i=e.getCharacterList();n<o;)r=i.get(n),i=i.set(n,s?p.applyStyle(r,a):p.removeStyle(r,a)),n++;return e.set("characterList",i)});return e.merge({blockMap:n.merge(r),selectionBefore:t,selectionAfter:t})}e.exports={add:function(e,t,n){return r(e,t,n,!0)},remove:function(e,t,n){return r(e,t,n,!1)}}},function(e,t,n){"use strict";var u=n(106),l=n(6);e.exports=function(e,t,r){var n=e.getBlockMap(),o=t.getStartKey(),i=t.getStartOffset(),a=t.getEndKey(),s=t.getEndOffset(),c=n.skipUntil(function(e,t){return t===o}).takeUntil(function(e,t){return t===a}).toOrderedMap().merge(l.OrderedMap([[a,n.get(a)]])).map(function(e,t){var n=t===o?i:0,t=t===a?s:e.getLength();return u(e,n,t,r)});return e.merge({blockMap:n.merge(c),selectionBefore:t,selectionAfter:t})}},function(e,t,n){"use strict";var a=n(12);e.exports=function(e,t,n,r){for(var o=t,i=e.getCharacterList();o<n;)i=i.set(o,a.applyEntity(i.get(o),r)),o++;return e.set("characterList",i)}},function(e,t,n){"use strict";var l=n(108),f=n(109),p=n(7);function u(e,t,n,r,o,i,a){var s=n.getStartOffset(),c=n.getEndOffset(),e=e.__get(o).getMutability(),u=a?s:c;if("MUTABLE"===e)return n;o=f(t,o).filter(function(e){return u<=e.end&&u>=e.start}),1!=o.length&&p(!1),o=o[0];if("IMMUTABLE"===e)return n.merge({anchorOffset:o.start,focusOffset:o.end,isBackward:!1});i||(a?c=o.end:s=o.start);e=l.getRemovalRange(s,c,t.getText().slice(o.start,o.end),o.start,r);return n.merge({anchorOffset:e.start,focusOffset:e.end,isBackward:!1})}e.exports=function(e,t,n,r,o){var i,a,s=r.getStartOffset(),c=r.getEndOffset(),s=t.getEntityAt(s),c=n.getEntityAt(c-1);return(s||c)&&(s&&s===c?r=u(e,t,r,o,s,!0,!0):s&&c?(i=u(e,t,r,o,s,!1,!0),a=u(e,n,r,o,c,!1,!1),r=r.merge({anchorOffset:i.getAnchorOffset(),focusOffset:a.getFocusOffset(),isBackward:!1})):s?(i=u(e,t,r,o,s,!1,!0),r=r.merge({anchorOffset:i.getStartOffset(),isBackward:!1})):c&&(a=u(e,n,r,o,c,!1,!1),r=r.merge({focusOffset:a.getEndOffset(),isBackward:!1}))),r}},function(e,t,n){"use strict";e.exports={getRemovalRange:function(e,t,n,r,o){for(var i,a=(a=n.split(" ")).map(function(e,t){if("forward"===o){if(0<t)return" "+e}else if(t<a.length-1)return e+" ";return e}),s=r,c=null,u=null,l=0;l<a.length;l++){if(e<(i=s+a[l].length)&&s<t)u=(null!==c||(c=s),i);else if(null!==c)break;s=i}var n=r+n.length,f=c===r,p=u===n;return(!f&&p||f&&!p)&&("forward"===o?u!==n&&u++:c!==r&&c--),{start:c,end:u}}}},function(e,t,n){"use strict";var r=n(7);e.exports=function(e,t){var n=[];return e.findEntityRanges(function(e){return e.getEntity()===t},function(e,t){n.push({start:e,end:t})}),n.length||r(!1),n}},function(e,t,n){"use strict";var y=n(25),g=n(13),r=n(6),m=n(53),v=n(7),b=n(51),l=r.List,_=function(e,t,n){var r=e.getText(),o=e.getCharacterList(),r=r.slice(0,t),o=o.slice(0,t),t=n.first();return e.merge({text:r+t.getText(),characterList:o.concat(t.getCharacterList()),type:(r?e:t).getType(),data:t.getData()})},w=function(e,t,n){var r=e.getText(),e=e.getCharacterList(),o=r.length,r=r.slice(t,o),e=e.slice(t,o),t=n.last();return t.merge({text:t.getText()+r,characterList:t.getCharacterList().concat(e),data:t.getData()})},S=function(s,e,c,u){return s.withMutations(function(t){var e=c.getKey(),n=u.getKey(),r=c.getNextSiblingKey(),o=c.getParentKey(),i=function(e,t){var n=e.getKey(),r=e,o=[];for(t.get(n)&&o.push(n);r&&r.getNextSiblingKey();){var i=r.getNextSiblingKey();if(!i)break;o.push(i),r=t.get(i)}return o}(u,s),a=i[i.length-1];t.get(n)?(t.setIn([e,"nextSibling"],n),t.setIn([n,"prevSibling"],e)):(t.setIn([e,"nextSibling"],u.getNextSiblingKey()),t.setIn([u.getNextSiblingKey(),"prevSibling"],e)),t.setIn([a,"nextSibling"],r),r&&t.setIn([r,"prevSibling"],a),i.forEach(function(e){return t.setIn([e,"parent"],o)}),o&&(r=(n=s.get(o).getChildKeys()).indexOf(e)+1,(a=n.toArray()).splice.apply(a,[r,0].concat(i)),t.setIn([o,"children"],l(a)))})};e.exports=function(e,t,n){var r,o,i,a,s,c,u,l=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",f=(t.isCollapsed()||v(!1),e.getBlockMap()),n=b(n),p=t.getStartKey(),d=t.getStartOffset(),h=f.get(p);return h instanceof g&&(h.getChildKeys().isEmpty()||v(!1)),1===n.size?function(e,t,n,r,o,i){var a=6<arguments.length&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",s=n.get(o),c=s.getText(),u=s.getCharacterList(),l=o,f=i+r.getText().length,p=null;switch(a){case"MERGE_OLD_DATA_TO_NEW_DATA":p=r.getData().merge(s.getData());break;case"REPLACE_WITH_NEW_DATA":p=r.getData()}a=s.getType(),c&&"unstyled"===a&&(a=r.getType()),c=s.merge({text:c.slice(0,i)+r.getText()+c.slice(i),characterList:m(u,r.getCharacterList(),i),type:a,data:p});return e.merge({blockMap:n.set(o,c),selectionBefore:t,selectionAfter:t.merge({anchorKey:l,anchorOffset:f,focusKey:l,focusOffset:f,isBackward:!1})})}(e,t,f,n.first(),p,d,l):(h=e,l=t,r=n,o=p,i=d,t=(e=f).first()instanceof g,a=[],s=r.size,n=e.get(o),p=r.first(),d=r.last(),f=d.getLength(),d=d.getKey(),c=t&&(!n.getChildKeys().isEmpty()||!p.getChildKeys().isEmpty()),e.forEach(function(e,t){t!==o?a.push(e):(c?a.push(e):a.push(_(e,i,r)),r.slice(c?0:1,s-1).forEach(function(e){return a.push(e)}),a.push(w(e,i,r)))}),u=y.createFromArray(a),t&&(u=S(u,e,n,p)),h.merge({blockMap:u,selectionBefore:l,selectionAfter:l.merge({anchorKey:d,anchorOffset:f,focusKey:d,focusOffset:f,isBackward:!1})}))}},function(e,t,n){"use strict";var r=n(6),l=n(53),f=n(7),p=r.Repeat;e.exports=function(e,t,n,r){t.isCollapsed()||f(!1);var o=null;if(null==(o=null!=n?n.length:o)||0===o)return e;var i=e.getBlockMap(),a=t.getStartKey(),s=t.getStartOffset(),c=i.get(a),u=c.getText(),n=c.merge({text:u.slice(0,s)+n+u.slice(s,c.getLength()),characterList:l(c.getCharacterList(),p(r,o).toList(),s)}),u=s+o;return e.merge({blockMap:i.set(a,n),selectionAfter:t.merge({anchorOffset:u,focusOffset:u})})}},function(e,t,n){"use strict";function v(e,t,n){if(0===t)for(;t<n;)e=e.shift(),t++;else if(n===e.count())for(;t<n;)e=e.pop(),n--;else{var r=e.slice(0,t),o=e.slice(n);e=r.concat(o).toList()}return e}var b=n(13),_=n(55),n=n(6),w=(n.List,n.Map),S=function(e,t,n){var r;!e||(r=t.get(e))&&t.set(e,n(r))},E=function(e,t){var n=[];if(!e)return n;for(var r=t.get(e);r&&r.getParentKey();){var o=r.getParentKey();o&&n.push(o),r=o?t.get(o):null}return n},C=function(e,t){var n=[];if(!e)return n;for(var r=_(e,t);r&&t.get(r);){var o=t.get(r);n.push(r),r=o.getParentKey()?_(o,t):null}return n},O=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getNextSiblingKey();r&&!t.get(r);)r=n.get(r).getNextSiblingKey()||null;return r},x=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getPrevSiblingKey();r&&!t.get(r);)r=n.get(r).getPrevSiblingKey()||null;return r};e.exports=function(e,t){if(t.isCollapsed())return e;var i,a,s,c,n=e.getBlockMap(),r=t.getStartKey(),o=t.getStartOffset(),u=t.getEndKey(),l=t.getEndOffset(),f=n.get(r),p=n.get(u),d=f instanceof b,h=[],y=(d&&(m=p.getChildKeys(),g=E(u,n),p.getNextSiblingKey()&&(h=h.concat(g)),h=(h=m.isEmpty()?h:h.concat(g.concat([u]))).concat(E(_(p,n),n))),m=f===p?v(f.getCharacterList(),o,l):f.getCharacterList().slice(0,o).concat(p.getCharacterList().slice(l)),f.merge({text:f.getText().slice(0,o)+p.getText().slice(l),characterList:m})),g=d&&0===o&&0===l&&p.getParentKey()===r&&null==p.getPrevSiblingKey()?w([[r,null]]):n.toSeq().skipUntil(function(e,t){return t===r}).takeUntil(function(e,t){return t===u}).filter(function(e,t){return-1===h.indexOf(t)}).concat(w([[u,null]])).map(function(e,t){return t===r?y:null}),m=n.merge(g).filter(function(e){return!!e});return d&&f!==p&&(a=f,s=p,c=n,m=(i=m).withMutations(function(t){var n,e,r,o;S(a.getKey(),t,function(e){return e.merge({nextSibling:O(e,t,c),prevSibling:x(e,t,c)})}),S(s.getKey(),t,function(e){return e.merge({nextSibling:O(e,t,c),prevSibling:x(e,t,c)})}),E(a.getKey(),c).forEach(function(e){return S(e,t,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return t.get(e)}),nextSibling:O(e,t,c),prevSibling:x(e,t,c)})})}),S(a.getNextSiblingKey(),t,function(e){return e.merge({prevSibling:a.getPrevSiblingKey()})}),S(a.getPrevSiblingKey(),t,function(e){return e.merge({nextSibling:O(e,t,c)})}),S(s.getNextSiblingKey(),t,function(e){return e.merge({prevSibling:x(e,t,c)})}),S(s.getPrevSiblingKey(),t,function(e){return e.merge({nextSibling:s.getNextSiblingKey()})}),E(s.getKey(),c).forEach(function(e){S(e,t,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return t.get(e)}),nextSibling:O(e,t,c),prevSibling:x(e,t,c)})})}),C(s,c).forEach(function(e){return S(e,t,function(e){return e.merge({nextSibling:O(e,t,c),prevSibling:x(e,t,c)})})}),null==i.get(a.getKey())&&null!=i.get(s.getKey())&&s.getParentKey()===a.getKey()&&null==s.getPrevSiblingKey()&&(n=a.getPrevSiblingKey(),S(s.getKey(),t,function(e){return e.merge({prevSibling:n})}),S(n,t,function(e){return e.merge({nextSibling:s.getKey()})}),e=n?i.get(n):null,r=e?e.getParentKey():null,a.getChildKeys().forEach(function(e){S(e,t,function(e){return e.merge({parent:r})})}),null!=r&&(o=i.get(r),S(r,t,function(e){return e.merge({children:o.getChildKeys().concat(a.getChildKeys())})})),S(a.getChildKeys().find(function(e){return null===i.get(e).getNextSiblingKey()}),t,function(e){return e.merge({nextSibling:a.getNextSiblingKey()})}))})),e.merge({blockMap:m,selectionBefore:t,selectionAfter:t.merge({anchorKey:r,anchorOffset:o,focusKey:r,focusOffset:o,isBackward:!1})})}},function(e,t,n){"use strict";var d=n(13),h=n(14),r=n(6),y=n(7),g=n(54),m=r.List,v=r.Map,b=function(e,t,n){var r;!e||(r=t.get(e))&&t.set(e,n(r))};e.exports=function(e,t){t.isCollapsed()||y(!1);var n=t.getAnchorKey(),r=e.getBlockMap(),o=r.get(n),i=o.getText();if(!i){var a=o.getType();if("unordered-list-item"===a||"ordered-list-item"===a)return g(e,t,function(e){return e.merge({type:"unstyled",depth:0})})}var s,c,a=t.getAnchorOffset(),u=o.getCharacterList(),l=h(),f=o instanceof d,p=o.merge({text:i.slice(0,a),characterList:u.slice(0,a)}),i=p.merge({key:l,text:i.slice(a),characterList:u.slice(a),data:v()}),u=r.toSeq().takeUntil(function(e){return e===o}),a=r.toSeq().skipUntil(function(e){return e===o}).rest(),r=u.concat([[n,p],[l,i]],a).toOrderedMap();return f&&(o.getChildKeys().isEmpty()||y(!1),s=p,c=i,r=r.withMutations(function(e){var r=s.getKey(),o=c.getKey();b(s.getParentKey(),e,function(e){var t=e.getChildKeys(),n=t.indexOf(r)+1,t=t.toArray();return t.splice(n,0,o),e.merge({children:m(t)})}),b(s.getNextSiblingKey(),e,function(e){return e.merge({prevSibling:o})}),b(r,e,function(e){return e.merge({nextSibling:o})}),b(o,e,function(e){return e.merge({prevSibling:r})})})),e.merge({blockMap:r,selectionBefore:t,selectionAfter:t.merge({anchorKey:l,anchorOffset:0,focusKey:l,focusOffset:0,isBackward:!1})})}},function(e,t,n){"use strict";function r(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}function s(){return!0}var c=n(26),o=n(56),n=n(6),u=n.List,l=n.Repeat,n=n.Record,f=n({start:null,end:null}),p=n({start:null,end:null,decoratorKey:null,leaves:null});function d(e,t){return e===t}e.exports={generate:function(e,t,n){var r=t.getLength();if(!r)return u.of(new p({start:0,end:0,decoratorKey:null,leaves:u.of(new f({start:0,end:0}))}));var o=[],i=n?n.getDecorations(t,e):u(l(null,r)),a=t.getCharacterList();return c(i,d,s,function(e,t){var n,r;o.push(new p({start:e,end:t,decoratorKey:i.get(e),leaves:(t=a.slice(e,t).toList(),n=e,r=[],t=t.map(function(e){return e.getStyle()}).toList(),c(t,d,s,function(e,t){r.push(new f({start:e+n,end:t+n}))}),u(r))}))}),u(o)},fromJS:function(e){var t=e.leaves,e=function(e,t){if(null==e)return{};for(var n,r={},o=Object.keys(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||(r[n]=e[n]);return r}(e,["leaves"]);return new p(r({},e,{leaves:null!=t?u(Array.isArray(t)?t:o(t)).map(function(e){return f(e)}):null}))}}},function(e,t,n){"use strict";e.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}},function(e,t,n){"use strict";var r,o=n(117),i=n(6),a=n(10),s=i.OrderedMap;e.exports={getDirectionMap:function(e,t){r?r.reset():r=new o;var e=e.getBlockMap(),n=e.valueSeq().map(function(e){return a(r).getDirection(e.getText())}),e=s(e.keySeq().zip(n));return null!=t&&i.is(t,e)?t:e}}},function(e,t,n){"use strict";function r(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}var o=n(41),i=n(32),a=n(7),n=function(){function e(e){r(this,"_defaultDir",void 0),r(this,"_lastDir",void 0),e?i.isStrong(e)||a(!1):e=i.getGlobalDir(),this._defaultDir=e,this.reset()}var t=e.prototype;return t.reset=function(){this._lastDir=this._defaultDir},t.getDirection=function(e){return this._lastDir=o.getDirection(e,this._lastDir),this._lastDir},e}();e.exports=n},function(e,t,n){"use strict";var d=n(13),h=n(55),r=n(6),y=n(7),g=r.OrderedMap,m=r.List,v=function(e,t,n){var r;!e||(r=t.get(e))&&t.set(e,n(r))};e.exports=function(e,n,t,r){"replace"===r&&y(!1);var o,i=t.getKey(),a=n.getKey(),s=(a===i&&y(!1),e.getBlockMap()),c=n instanceof d,u=[n],l=s.delete(a),s=(c&&(u=[],l=s.withMutations(function(t){var o=n.getNextSiblingKey(),i=h(n,t);t.toSeq().skipUntil(function(e){return e.getKey()===a}).takeWhile(function(e){var t=e.getKey(),n=t===a,r=o&&t!==o,e=!o&&e.getParentKey()&&(!i||t!==i);return!!(n||r||e)}).forEach(function(e){u.push(e),t.delete(e.getKey())})})),l.toSeq().takeUntil(function(e){return e===t})),l=l.toSeq().skipUntil(function(e){return e===t}).skip(1),f=u.map(function(e){return[e.getKey(),e]}),p=g();return"before"===r?((o=e.getBlockBefore(i))&&o.getKey()===n.getKey()&&y(!1),p=s.concat([].concat(f,[[i,t]]),l).toOrderedMap()):"after"===r&&((o=e.getBlockAfter(i))&&o.getKey()===a&&y(!1),p=s.concat([[i,t]].concat(f),l).toOrderedMap()),e.merge({blockMap:function(e,t,n,r,o){if(!o)return e;var i="after"===r,a=t.getKey(),s=n.getKey(),c=t.getParentKey(),u=t.getNextSiblingKey(),l=t.getPrevSiblingKey(),f=n.getParentKey(),p=i?n.getNextSiblingKey():s,d=i?s:n.getPrevSiblingKey();return e.withMutations(function(e){v(c,e,function(e){var t=e.getChildKeys();return e.merge({children:t.delete(t.indexOf(a))})}),v(l,e,function(e){return e.merge({nextSibling:u})}),v(u,e,function(e){return e.merge({prevSibling:l})}),v(p,e,function(e){return e.merge({prevSibling:a})}),v(d,e,function(e){return e.merge({nextSibling:a})}),v(f,e,function(e){var t=e.getChildKeys(),n=t.indexOf(s),n=i?n+1:0!==n?n-1:0,t=t.toArray();return t.splice(n,0,a),e.merge({children:m(t)})}),v(a,e,function(e){return e.merge({nextSibling:p,prevSibling:d,parent:f})})})}(p,n,t,r,c),selectionBefore:e.getSelectionAfter(),selectionAfter:e.getSelectionAfter().merge({anchorKey:a,focusKey:a})})}},function(e,t,n){"use strict";var r=n(6).List,n=function(){function e(e){var t,n,r;r=void 0,(n="_decorators")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this._decorators=e.slice()}var t=e.prototype;return t.getDecorations=function(t,n){var c=Array(t.getText().length).fill(null);return this._decorators.forEach(function(e,a){var s=0;(0,e.strategy)(t,function(e,t){if(function(e,t,n){for(var r=t;r<n;r++)if(null!=e[r])return;return 1}(c,e,t)){for(var n=c,r=t,o=a+"."+s,i=e;i<r;i++)n[i]=o;s++}},n)}),r(c)},t.getComponentForKey=function(e){e=parseInt(e.split(".")[0],10);return this._decorators[e].component},t.getPropsForKey=function(e){e=parseInt(e.split(".")[0],10);return this._decorators[e].props},e}();e.exports=n},function(A,e,P){"use strict";!function(r){var e=P(17);function p(){return(p=e||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);(r="function"==typeof Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})):r).forEach(function(e){i(t,e,n[e])})}return t}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function a(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}var t=P(42),h=P(59),n=P(121),y=P(129),s=P(146),c=P(149),u=P(185),l=P(186),f=P(71),g=P(8),m=P(0),v=P(45),b=P(36),_=P(11),w=P(19),S=P(14),E=P(87),C=P(37),O=P(16),x=P(7),k=P(27),D=P(10),T=_.isBrowser("IE"),j=!T,I={edit:c,composite:n,drag:s,cut:null,render:null},M=!1,N=function(e){function t(){return e.apply(this,arguments)||this}a(t,e);var n=t.prototype;return n.render=function(){return null},n.componentDidMount=function(){this._update()},n.componentDidUpdate=function(){this._update()},n._update=function(){var e=this.props.editor;e._latestEditorState=this.props.editorState,e._blockSelectEvents=!0},t}(m.Component),_=function(t){function e(e){var a=t.call(this,e)||this;return i(o(a),"_blockSelectEvents",void 0),i(o(a),"_clipboard",void 0),i(o(a),"_handler",void 0),i(o(a),"_dragCount",void 0),i(o(a),"_internalDrag",void 0),i(o(a),"_editorKey",void 0),i(o(a),"_placeholderAccessibilityID",void 0),i(o(a),"_latestEditorState",void 0),i(o(a),"_latestCommittedEditorState",void 0),i(o(a),"_pendingStateFromBeforeInput",void 0),i(o(a),"_onBeforeInput",void 0),i(o(a),"_onBlur",void 0),i(o(a),"_onCharacterData",void 0),i(o(a),"_onCompositionEnd",void 0),i(o(a),"_onCompositionStart",void 0),i(o(a),"_onCopy",void 0),i(o(a),"_onCut",void 0),i(o(a),"_onDragEnd",void 0),i(o(a),"_onDragOver",void 0),i(o(a),"_onDragStart",void 0),i(o(a),"_onDrop",void 0),i(o(a),"_onInput",void 0),i(o(a),"_onFocus",void 0),i(o(a),"_onKeyDown",void 0),i(o(a),"_onKeyPress",void 0),i(o(a),"_onKeyUp",void 0),i(o(a),"_onMouseDown",void 0),i(o(a),"_onMouseUp",void 0),i(o(a),"_onPaste",void 0),i(o(a),"_onSelect",void 0),i(o(a),"editor",void 0),i(o(a),"editorContainer",void 0),i(o(a),"focus",void 0),i(o(a),"blur",void 0),i(o(a),"setMode",void 0),i(o(a),"exitCurrentMode",void 0),i(o(a),"restoreEditorDOM",void 0),i(o(a),"setClipboard",void 0),i(o(a),"getClipboard",void 0),i(o(a),"getEditorKey",void 0),i(o(a),"update",void 0),i(o(a),"onDragEnter",void 0),i(o(a),"onDragLeave",void 0),i(o(a),"_handleEditorContainerRef",function(e){a.editorContainer=e,a.editor=null!==e?e.firstChild:null}),i(o(a),"focus",function(e){var t,n,r=a.props.editorState,o=r.getSelection().getHasFocus(),i=a.editor;i&&(t=b.getScrollParent(i),n=(e=e||C(t)).x,e=e.y,k(i)||x(!1),i.focus(),t===window?window.scrollTo(n,e):v.setTop(t,e),o||a.update(g.forceSelection(r,r.getSelection())))}),i(o(a),"blur",function(){var e=a.editor;e&&(k(e)||x(!1),e.blur())}),i(o(a),"setMode",function(e){var t=a.props,n=t.onPaste,r=t.onCut,t=t.onCopy,o=d({},I.edit),n=(n&&(o.onPaste=n),r&&(o.onCut=r),t&&(o.onCopy=t),d({},I,{edit:o}));a._handler=n[e]}),i(o(a),"exitCurrentMode",function(){a.setMode("edit")}),i(o(a),"restoreEditorDOM",function(e){a.setState({contentsKey:a.state.contentsKey+1},function(){a.focus(e)})}),i(o(a),"setClipboard",function(e){a._clipboard=e}),i(o(a),"getClipboard",function(){return a._clipboard}),i(o(a),"update",function(e){a._latestEditorState=e,a.props.onChange(e)}),i(o(a),"onDragEnter",function(){a._dragCount++}),i(o(a),"onDragLeave",function(){a._dragCount--,0===a._dragCount&&a.exitCurrentMode()}),a._blockSelectEvents=!1,a._clipboard=null,a._handler=null,a._dragCount=0,a._editorKey=e.editorKey||S(),a._placeholderAccessibilityID="placeholder-"+a._editorKey,a._latestEditorState=e.editorState,a._latestCommittedEditorState=e.editorState,a._onBeforeInput=a._buildHandler("onBeforeInput"),a._onBlur=a._buildHandler("onBlur"),a._onCharacterData=a._buildHandler("onCharacterData"),a._onCompositionEnd=a._buildHandler("onCompositionEnd"),a._onCompositionStart=a._buildHandler("onCompositionStart"),a._onCopy=a._buildHandler("onCopy"),a._onCut=a._buildHandler("onCut"),a._onDragEnd=a._buildHandler("onDragEnd"),a._onDragOver=a._buildHandler("onDragOver"),a._onDragStart=a._buildHandler("onDragStart"),a._onDrop=a._buildHandler("onDrop"),a._onInput=a._buildHandler("onInput"),a._onFocus=a._buildHandler("onFocus"),a._onKeyDown=a._buildHandler("onKeyDown"),a._onKeyPress=a._buildHandler("onKeyPress"),a._onKeyUp=a._buildHandler("onKeyUp"),a._onMouseDown=a._buildHandler("onMouseDown"),a._onMouseUp=a._buildHandler("onMouseUp"),a._onPaste=a._buildHandler("onPaste"),a._onSelect=a._buildHandler("onSelect"),a.getEditorKey=function(){return a._editorKey},a.state={contentsKey:0},a}a(e,t);var n=e.prototype;return n._buildHandler=function(n){var r=this;return function(e){var t;r.props.readOnly||(t=r._handler&&r._handler[n])&&(u?u(function(){return t(r,e)}):t(r,e))}},n._showPlaceholder=function(){return!!this.props.placeholder&&!this.props.editorState.isInCompositionMode()&&!this.props.editorState.getCurrentContent().hasText()},n._renderPlaceholder=function(){var e;return this._showPlaceholder()?(e={text:D(this.props.placeholder),editorState:this.props.editorState,textAlignment:this.props.textAlignment,accessibilityID:this._placeholderAccessibilityID},m.createElement(l,e)):null},n._renderARIADescribedBy=function(){var e=this.props.ariaDescribedBy||"",t=this._showPlaceholder()?this._placeholderAccessibilityID:"";return e.replace("{{editor_id_placeholder}}",t)||void 0},n.render=function(){var e=this.props,t=e.blockRenderMap,n=e.blockRendererFn,r=e.blockStyleFn,o=e.customStyleFn,i=e.customStyleMap,a=e.editorState,s=e.preventScroll,c=e.readOnly,u=e.textAlignment,e=e.textDirectionality,u=w({"DraftEditor/root":!0,"DraftEditor/alignLeft":"left"===u,"DraftEditor/alignRight":"right"===u,"DraftEditor/alignCenter":"center"===u}),l=this.props.role||"textbox",f="combobox"===l?!!this.props.ariaExpanded:null,t={blockRenderMap:t,blockRendererFn:n,blockStyleFn:r,customStyleMap:d({},h,i),customStyleFn:o,editorKey:this._editorKey,editorState:a,preventScroll:s,textDirectionality:e};return m.createElement("div",{className:u},this._renderPlaceholder(),m.createElement("div",{className:w("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},m.createElement("div",{"aria-activedescendant":c?null:this.props.ariaActiveDescendantID,"aria-autocomplete":c?null:this.props.ariaAutoComplete,"aria-controls":c?null:this.props.ariaControls,"aria-describedby":this._renderARIADescribedBy(),"aria-expanded":c?null:f,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-multiline":this.props.ariaMultiline,"aria-owns":c?null:this.props.ariaOwneeID,autoCapitalize:this.props.autoCapitalize,autoComplete:this.props.autoComplete,autoCorrect:this.props.autoCorrect,className:w({notranslate:!c,"public/DraftEditor/content":!0}),contentEditable:!c,"data-testid":this.props.webDriverTestID,onBeforeInput:this._onBeforeInput,onBlur:this._onBlur,onCompositionEnd:this._onCompositionEnd,onCompositionStart:this._onCompositionStart,onCopy:this._onCopy,onCut:this._onCut,onDragEnd:this._onDragEnd,onDragEnter:this.onDragEnter,onDragLeave:this.onDragLeave,onDragOver:this._onDragOver,onDragStart:this._onDragStart,onDrop:this._onDrop,onFocus:this._onFocus,onInput:this._onInput,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onMouseUp:this._onMouseUp,onPaste:this._onPaste,onSelect:this._onSelect,ref:this.props.editorRef,role:c?null:l,spellCheck:j&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},m.createElement(N,{editor:this,editorState:a}),m.createElement(y,p({},t,{key:"contents"+this.state.contentsKey})))))},n.componentDidMount=function(){this._blockSelectEvents=!1,!M&&O("draft_ods_enabled")&&(M=!0,f.initODS()),this.setMode("edit"),T&&(this.editor?this.editor.ownerDocument:r).execCommand("AutoUrlDetect",!1,!1)},n.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestEditorState=this.props.editorState,this._latestCommittedEditorState=this.props.editorState},e}(m.Component);i(_,"defaultProps",{ariaDescribedBy:"{{editor_id_placeholder}}",blockRenderMap:t,blockRendererFn:function(){return null},blockStyleFn:function(){return""},keyBindingFn:E,readOnly:!1,spellCheck:!1,stripPastedStyles:!1}),A.exports=_}.call(this,P(23))},function(e,t,n){"use strict";var r=n(122),s=n(9),c=n(15),u=n(8),o=n(35),i=n(11),a=n(62),l=n(64),f=n(65),p=n(43),d=n(10),h=i.isBrowser("IE"),y=!1,g=!1,m=null;var v={onCompositionStart:function(e){g=!0,e=e,m||(m=new r(l(e))).start()},onCompositionEnd:function(e){g=y=!1,setTimeout(function(){y||v.resolveComposition(e)},20)},onSelect:a,onKeyDown:function(e,t){if(!g)return v.resolveComposition(e),void e._onKeyDown(t);t.which!==o.RIGHT&&t.which!==o.LEFT||t.preventDefault()},onKeyPress:function(e,t){t.which===o.RETURN&&t.preventDefault()},resolveComposition:function(e){var i,a,t;g||(t=d(m).stopAndFlushMutations(),y=!(m=null),i=u.set(e._latestEditorState,{inCompositionMode:!1}),e.exitCurrentMode(),t.size?(a=i.getCurrentContent(),t.forEach(function(e,t){var t=c.decode(t),n=t.blockKey,r=t.decoratorKey,t=t.leafKey,r=i.getBlockTree(n).getIn([r,"leaves",t]),t=r.start,r=r.end,r=i.getSelection().merge({anchorKey:n,focusKey:n,anchorOffset:t,focusOffset:r,isBackward:!1}),o=p(a,r),n=a.getBlockForKey(n).getInlineStyleAt(t);a=s.replaceText(a,r,e,n,o),i=u.set(i,{currentContent:a})}),t=f(i,l(e)).selectionState,e.restoreEditorDOM(),t=h?u.forceSelection(i,t):u.acceptSelection(i,t),e.update(u.push(t,a,"insert-characters"))):e.update(i))}};e.exports=v},function(e,t,n){"use strict";function r(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}var o=n(11),i=n(33),a=n(61),s=n(6),c=n(7),u=n(10),l=s.Map,f={subtree:!0,characterData:!0,childList:!0,characterDataOldValue:!1,attributes:!1},p=o.isBrowser("IE <= 11");e.exports=function(){function e(e){var t=this,e=(r(this,"observer",void 0),r(this,"container",void 0),r(this,"mutations",void 0),r(this,"onCharData",void 0),this.container=e,this.mutations=l(),a(e));e.MutationObserver&&!p?this.observer=new e.MutationObserver(function(e){return t.registerMutations(e)}):this.onCharData=function(e){e.target instanceof Node||c(!1),t.registerMutation({type:"characterData",target:e.target})}}var t=e.prototype;return t.start=function(){this.observer?this.observer.observe(this.container,f):this.container.addEventListener("DOMCharacterDataModified",this.onCharData)},t.stopAndFlushMutations=function(){var e=this.observer,e=(e?(this.registerMutations(e.takeRecords()),e.disconnect()):this.container.removeEventListener("DOMCharacterDataModified",this.onCharData),this.mutations);return this.mutations=l(),e},t.registerMutations=function(e){for(var t=0;t<e.length;t++)this.registerMutation(e[t])},t.getMutationTextContent=function(e){var t=e.type,n=e.target,e=e.removedNodes;if("characterData"===t){if(""!==n.textContent)return p?n.textContent.replace("\n",""):n.textContent}else if("childList"===t){if(e&&e.length)return"";if(""!==n.textContent)return n.textContent}return null},t.registerMutation=function(e){var t=this.getMutationTextContent(e);null!=t&&(e=u(i(e.target)),this.mutations=this.mutations.set(e,t))},e}()},function(e,t,n){"use strict";var n=n(124),r="Unknown",o={"Mac OS":"Mac OS X"};var n=(new n).getResult(),i=(i=n.browser.version)?{major:(i=i.split("."))[0],minor:i[1]}:{major:"",minor:""},o={browserArchitecture:n.cpu.architecture||r,browserFullVersion:n.browser.version||r,browserMinorVersion:i.minor||r,browserName:n.browser.name||r,browserVersion:n.browser.major||r,deviceName:n.device.model||r,engineName:n.engine.name||r,engineVersion:n.engine.version||r,platformArchitecture:n.cpu.architecture||r,platformName:(i=n.os.name,o[i]||i||r),platformVersion:n.os.version||r,platformFullVersion:n.os.version||r};e.exports=o},function(F,B,z){var K;!function(o,f){"use strict";function e(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}function i(e,t){return typeof e===h&&-1!==A(t).indexOf(A(e))}function a(e,t){if(typeof e===h)return e=e.replace(/^\s\s*/,u).replace(/\s\s*$/,u),typeof t==l?e:e.substring(0,255)}function s(e,t){for(var n,r,o,i,a,s=0;s<t.length&&!i;){for(var c=t[s],u=t[s+1],l=n=0;l<c.length&&!i;)if(i=c[l++].exec(e))for(r=0;r<u.length;r++)a=i[++n],typeof(o=u[r])===d&&0<o.length?2===o.length?typeof o[1]==p?this[o[0]]=o[1].call(this,a):this[o[0]]=o[1]:3===o.length?typeof o[1]!==p||o[1].exec&&o[1].test?this[o[0]]=a?a.replace(o[1],o[2]):f:this[o[0]]=a?o[1].call(this,a,o[2]):f:4===o.length&&(this[o[0]]=a?o[3].call(this,a.replace(o[1],o[2])):f):this[o]=a||f;s+=2}}function t(e,t){for(var n in t)if(typeof t[n]===d&&0<t[n].length){for(var r=0;r<t[n].length;r++)if(i(t[n][r],e))return"?"===n?f:n}else if(i(t[n],e))return"?"===n?f:n;return e}function c(e,t){if(typeof e===d&&(t=e,e=f),!(this instanceof c))return new c(e,t).getResult();var n=e||(typeof o!=l&&o.navigator&&o.navigator.userAgent?o.navigator.userAgent:u),r=t?function(e,t){var n,r={};for(n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}(L,t):L;return this.getBrowser=function(){var e,t={};return t.name=f,t[v]=f,s.call(t,n,r.browser),t.major=typeof(e=t.version)===h?e.replace(/[^\d\.]/g,u).split(".")[0]:f,t},this.getCPU=function(){var e={};return e[b]=f,s.call(e,n,r.cpu),e},this.getDevice=function(){var e={};return e[m]=f,e[y]=f,e.type=f,s.call(e,n,r.device),e},this.getEngine=function(){var e={};return e.name=f,e[v]=f,s.call(e,n,r.engine),e},this.getOS=function(){var e={};return e.name=f,e[v]=f,s.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===h&&255<e.length?a(e,255):e,this},this.setUA(n),this}var r,u="",p="function",l="undefined",d="object",h="string",y="model",n="name",g="type",m="vendor",v="version",b="architecture",_="console",w="mobile",S="tablet",E="smarttv",C="wearable",O="Amazon",x="BlackBerry",k="Browser",D="Chrome",T="Firefox",j="Google",I="Microsoft",M="Opera",N="Samsung",A=function(e){return e.toLowerCase()},R={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},L={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[n,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[n,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[n,v],[/opios[\/ ]+([\w\.]+)/i],[v,[n,M+" Mini"]],[/\bopr\/([\w\.]+)/i],[v,[n,M]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[n,v],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[n,"UC"+k]],[/\bqbcore\/([\w\.]+)/i],[v,[n,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[v,[n,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[n,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[n,"IE"]],[/yabrowser\/([\w\.]+)/i],[v,[n,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[n,/(.+)/,"$1 Secure "+k],v],[/\bfocus\/([\w\.]+)/i],[v,[n,T+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[n,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[n,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[n,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[n,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[n,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[v,[n,T]],[/\bqihu|(qi?ho?o?|360)browser/i],[[n,"360 "+k]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[n,/(.+)/,"$1 "+k],v],[/(comodo_dragon)\/([\w\.]+)/i],[[n,/_/g," "],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[n,v],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[n],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[n,"Facebook"],v],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[n,v],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[n,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[n,D+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[n,D+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[n,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[n,v],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[v,[n,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[v,n],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[n,[v,t,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[n,v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[n,"Netscape"],v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[n,T+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[n,v]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[b,"amd64"]],[/(ia32(?=;))/i],[[b,A]],[/((?:i[346]|x)86)[;\)]/i],[[b,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[b,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b,"armhf"]],[/windows (ce|mobile); ppc;/i],[[b,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[b,/ower/,u,A]],[/(sun4\w)[;\)]/i],[[b,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b,A]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[y,[m,N],[g,S]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[y,[m,N],[g,w]],[/\((ip(?:hone|od)[\w ]*);/i],[y,[m,"Apple"],[g,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[y,[m,"Apple"],[g,S]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[y,[m,"Huawei"],[g,S]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[y,[m,"Huawei"],[g,w]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[y,/_/g," "],[m,"Xiaomi"],[g,w]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[y,/_/g," "],[m,"Xiaomi"],[g,S]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[y,[m,"OPPO"],[g,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[y,[m,"Vivo"],[g,w]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[y,[m,"Realme"],[g,w]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[y,[m,"Motorola"],[g,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[y,[m,"Motorola"],[g,S]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[y,[m,"LG"],[g,S]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[y,[m,"LG"],[g,w]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[y,[m,"Lenovo"],[g,S]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[y,/_/g," "],[m,"Nokia"],[g,w]],[/(pixel c)\b/i],[y,[m,j],[g,S]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[y,[m,j],[g,w]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[y,[m,"Sony"],[g,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[y,"Xperia Tablet"],[m,"Sony"],[g,S]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[y,[m,"OnePlus"],[g,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[y,[m,O],[g,S]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[y,/(.+)/g,"Fire Phone $1"],[m,O],[g,w]],[/(playbook);[-\w\),; ]+(rim)/i],[y,m,[g,S]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[y,[m,x],[g,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[y,[m,"ASUS"],[g,S]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[y,[m,"ASUS"],[g,w]],[/(nexus 9)/i],[y,[m,"HTC"],[g,S]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[m,[y,/_/g," "],[g,w]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[y,[m,"Acer"],[g,S]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[y,[m,"Meizu"],[g,w]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[y,[m,"Sharp"],[g,w]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[m,y,[g,w]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[m,y,[g,S]],[/(surface duo)/i],[y,[m,I],[g,S]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[y,[m,"Fairphone"],[g,w]],[/(u304aa)/i],[y,[m,"AT&T"],[g,w]],[/\bsie-(\w*)/i],[y,[m,"Siemens"],[g,w]],[/\b(rct\w+) b/i],[y,[m,"RCA"],[g,S]],[/\b(venue[\d ]{2,7}) b/i],[y,[m,"Dell"],[g,S]],[/\b(q(?:mv|ta)\w+) b/i],[y,[m,"Verizon"],[g,S]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[y,[m,"Barnes & Noble"],[g,S]],[/\b(tm\d{3}\w+) b/i],[y,[m,"NuVision"],[g,S]],[/\b(k88) b/i],[y,[m,"ZTE"],[g,S]],[/\b(nx\d{3}j) b/i],[y,[m,"ZTE"],[g,w]],[/\b(gen\d{3}) b.+49h/i],[y,[m,"Swiss"],[g,w]],[/\b(zur\d{3}) b/i],[y,[m,"Swiss"],[g,S]],[/\b((zeki)?tb.*\b) b/i],[y,[m,"Zeki"],[g,S]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[m,"Dragon Touch"],y,[g,S]],[/\b(ns-?\w{0,9}) b/i],[y,[m,"Insignia"],[g,S]],[/\b((nxa|next)-?\w{0,9}) b/i],[y,[m,"NextBook"],[g,S]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[m,"Voice"],y,[g,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[m,"LvTel"],y,[g,w]],[/\b(ph-1) /i],[y,[m,"Essential"],[g,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[y,[m,"Envizen"],[g,S]],[/\b(trio[-\w\. ]+) b/i],[y,[m,"MachSpeed"],[g,S]],[/\btu_(1491) b/i],[y,[m,"Rotor"],[g,S]],[/(shield[\w ]+) b/i],[y,[m,"Nvidia"],[g,S]],[/(sprint) (\w+)/i],[m,y,[g,w]],[/(kin\.[onetw]{3})/i],[[y,/\./g," "],[m,I],[g,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[y,[m,"Zebra"],[g,S]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[y,[m,"Zebra"],[g,w]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[m,y,[g,_]],[/droid.+; (shield) bui/i],[y,[m,"Nvidia"],[g,_]],[/(playstation [345portablevi]+)/i],[y,[m,"Sony"],[g,_]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[y,[m,I],[g,_]],[/smart-tv.+(samsung)/i],[m,[g,E]],[/hbbtv.+maple;(\d+)/i],[[y,/^/,"SmartTV"],[m,N],[g,E]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[m,"LG"],[g,E]],[/(apple) ?tv/i],[m,[y,"Apple TV"],[g,E]],[/crkey/i],[[y,D+"cast"],[m,j],[g,E]],[/droid.+aft(\w)( bui|\))/i],[y,[m,O],[g,E]],[/\(dtv[\);].+(aquos)/i],[y,[m,"Sharp"],[g,E]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[m,a],[y,a],[g,E]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[g,E]],[/((pebble))app/i],[m,y,[g,C]],[/droid.+; (glass) \d/i],[y,[m,j],[g,C]],[/droid.+; (wt63?0{2,3})\)/i],[y,[m,"Zebra"],[g,C]],[/(quest( 2)?)/i],[y,[m,"Facebook"],[g,C]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[m,[g,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[y,[g,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[y,[g,S]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,S]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[g,w]],[/(android[-\w\. ]{0,9});.+buil/i],[y,[m,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[n,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[n,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[n,v],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,n]],os:[[/microsoft (windows) (vista|xp)/i],[n,v],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[n,[v,t,R]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[n,"Windows"],[v,t,R]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[n,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[n,"Mac OS"],[v,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[v,n],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[n,v],[/\(bb(10);/i],[v,[n,x]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[v,[n,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[n,T+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[n,"webOS"]],[/crkey\/([\d\.]+)/i],[v,[n,D+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[n,"Chromium OS"],v],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[n,v],[/(sunos) ?([\w\.\d]*)/i],[[n,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[n,v]]},P=(c.VERSION="0.7.31",c.BROWSER=e([n,v,"major"]),c.CPU=e([b]),c.DEVICE=e([y,m,g,_,w,E,S,C,"embedded"]),c.ENGINE=c.OS=e([n,v]),typeof B!=l?(B=typeof F!=l&&F.exports?F.exports=c:B).UAParser=c:"function"===p&&z(125)?(K=function(){return c}.call(B,z,B,F))!==f&&(F.exports=K):typeof o!=l&&(o.UAParser=c),typeof o!=l&&(o.jQuery||o.Zepto));P&&!P.ua&&(r=new c,P.ua=r.getResult(),P.ua.get=function(){return r.getUA()},P.ua.set=function(e){r.setUA(e);var t,n=r.getResult();for(t in n)P.ua[t]=n[t]})}("object"==typeof window?window:this)},function(t,e){!function(e){t.exports=e}.call(this,{})},function(e,t,n){"use strict";var o=n(7),u=/\./,i=/\|\|/,a=/\s+\-\s+/,r=/^(<=|<|=|>=|~>|~|>|)?\s*(.+)/,l=/^(\d*)(.*)/;function s(e,t){var n,r=e.split(i);return 1<r.length?r.some(function(e){return b.contains(e,t)}):(r=e=r[0].trim(),e=t,0<(r=r.split(a)).length&&r.length<=2||o(!1),1===r.length?c(r[0],e):(n=r[0],r=r[1],y(n)&&y(r)||o(!1),c(">="+n,e)&&c("<="+r,e)))}function c(e,t){if(""===(e=e.trim()))return!0;var n=t.split(u),t=d(e),e=t.modifier,r=t.rangeComponents;switch(e){case"<":return f(n,r);case"<=":var o=n;return-1===(o=v(o,r))||0===o;case">=":return p(n,r);case">":return 1===v(n,r);case"~":case"~>":var o=n,i=r,a=i.slice(),s=(1<(i=i.slice()).length&&i.pop(),i.length-1),c=parseInt(i[s],10);return h(c)&&(i[s]=c+1+""),p(o,a)&&f(o,i);default:return 0===v(n,r)}}function f(e,t){return-1===v(e,t)}function p(e,t){e=v(e,t);return 1===e||0===e}function d(e){var e=e.split(u),t=e[0].match(r);return t||o(!1),{modifier:t[1],rangeComponents:[t[2]].concat(e.slice(1))}}function h(e){return!isNaN(e)&&isFinite(e)}function y(e){return!d(e).modifier}function g(e,t){for(var n=e.length;n<t;n++)e[n]="0"}function m(e,t){return typeof e!=typeof t&&o(!1),t<e?1:e<t?-1:0}function v(e,t){for(var n,r,o,e=function(e,t){g(e=e.slice(),(t=t.slice()).length);for(var n=0;n<t.length;n++){var r=t[n].match(/^[x*]$/i);if(r&&(t[n]=e[n]="0","*"===r[0]&&n===t.length-1))for(var o=n;o<e.length;o++)e[o]="0"}return g(t,e.length),[e,t]}(e,t),i=e[0],a=e[1],s=0;s<a.length;s++){n=i[s],r=a[s],o=c=o=c=void 0,c=n.match(l)[1],o=r.match(l)[1],c=parseInt(c,10),o=parseInt(o,10);var c=h(c)&&h(o)&&c!==o?m(c,o):m(n,r);if(c)return c}return 0}var b={contains:function(e,t){return s(e.trim(),t.trim())}};e.exports=b},function(e,t,n){"use strict";var i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){if(!e)return null;var r,o={};for(r in e)i.call(e,r)&&(o[r]=t.call(n,e[r],r,e));return o}},function(e,t,n){"use strict";e.exports=function(t){var n={};return function(e){return n.hasOwnProperty(e)||(n[e]=t.call(this,e)),n[e]}}},function(e,t,n){"use strict";var r=n(16)("draft_tree_data_support");e.exports=n(r?130:144)},function(e,t,n){"use strict";var r=n(17);function C(){return(C=r||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var O=n(131),x=n(15),k=n(0),D=n(10),n=function(e){var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.shouldComponentUpdate=function(e){var t=this.props.editorState,e=e.editorState;if(t.getDirectionMap()!==e.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==e.getSelection().getHasFocus())return!0;var n=e.getNativelyRenderedContent(),r=t.isInCompositionMode(),o=e.isInCompositionMode();if(t===e||null!==n&&e.getCurrentContent()===n||r&&o)return!1;var n=t.getCurrentContent(),i=e.getCurrentContent(),t=t.getDecorator(),a=e.getDecorator();return r!==o||n!==i||t!==a||e.mustForceSelection()},r.render=function(){for(var e=this.props,t=e.blockRenderMap,n=e.blockRendererFn,r=e.blockStyleFn,o=e.customStyleMap,i=e.customStyleFn,a=e.editorState,s=e.editorKey,c=e.textDirectionality,u=a.getCurrentContent(),l=a.getSelection(),f=a.mustForceSelection(),p=a.getDecorator(),d=D(a.getDirectionMap()),h=[],y=u.getBlocksAsArray()[0];y;)var g=y.getKey(),m={blockRenderMap:t,blockRendererFn:n,blockStyleFn:r,contentState:u,customStyleFn:i,customStyleMap:o,decorator:p,editorKey:s,editorState:a,forceSelection:f,selection:l,block:y,direction:c||d.get(g),tree:a.getBlockTree(g)},v=(t.get(y.getType())||t.get("unstyled")).wrapper,m=(h.push({block:k.createElement(O,C({key:g},m)),wrapperTemplate:v,key:g,offsetKey:x.encode(g,0,0)}),y.getNextSiblingKey()),y=m?u.getBlockForKey(m):null;for(var b=[],_=0;_<h.length;){var w=h[_];if(w.wrapperTemplate){for(var S=[];S.push(h[_].block),++_<h.length&&h[_].wrapperTemplate===w.wrapperTemplate;);var E=k.cloneElement(w.wrapperTemplate,{key:w.key+"-wrap","data-offset-key":w.offsetKey},S);b.push(E)}else b.push(w.block),_++}return k.createElement("div",{"data-contents":"true"},b)},n}(k.Component);e.exports=n},function(e,t,n){"use strict";var r=n(17);function d(){return(d=r||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function E(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);(r="function"==typeof Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})):r).forEach(function(e){i(t,e,n[e])})}return t}function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function h(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t}function C(e,t){var n=(e=t.get(e.getType())||t.get("unstyled")).wrapper;return{Element:e.element||t.get("unstyled").element,wrapperTemplate:n}}function O(e,t){return(t=t(e))?{CustomComponent:t.component,customProps:t.props,customEditable:t.editable}:{}}function x(e,t,n,r,o,i){return t={"data-block":!0,"data-editor":t,"data-offset-key":n,key:e.getKey(),ref:i},(n=r(e))&&(t.className=n),t=void 0!==o.customEditable?E({},t,{contentEditable:o.customEditable,suppressContentEditableWarning:!0}):t}var k=n(132),D=n(15),T=n(0),a=n(45),s=n(36),c=n(73),u=n(37),l=n(74),o=n(6),f=n(7),p=n(27),n=(o.List,function(o){var e;function S(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e=o.call.apply(o,[this].concat(n))||this),"wrapperRef",T.createRef()),e}e=o,(t=S).prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e;var t=S.prototype;return t.shouldComponentUpdate=function(e){var t=this.props,n=t.block,r=t.direction,t=t.tree,o=!n.getChildKeys().isEmpty(),n=n!==e.block||t!==e.tree||r!==e.direction||h(e.selection,e.block.getKey())&&e.forceSelection;return o||n},t.componentDidMount=function(){var e,t,n=this.props.selection,r=n.getEndKey();!n.getHasFocus()||r!==this.props.block.getKey()||(n=this.wrapperRef.current)&&(r=s.getScrollParent(n),e=u(r),r===window?0<(t=(t=c(n)).y+t.height-l().height)&&window.scrollTo(e.x,e.y+t+10):(p(n)||f(!1),0<(t=n.offsetHeight+n.offsetTop-(r.offsetHeight+e.y))&&a.setTop(r,a.getTop(r)+t+10)))},t.render=function(){var y=this,e=this.props,t=e.block,g=e.blockRenderMap,m=e.blockRendererFn,v=e.blockStyleFn,b=e.contentState,n=e.decorator,_=e.editorKey,w=e.editorState,r=e.customStyleFn,o=e.customStyleMap,i=e.direction,a=e.forceSelection,s=e.selection,e=e.tree,c=null,u=(t.children.size&&(c=t.children.reduce(function(e,t){var n=D.encode(t,0,0),r=b.getBlockForKey(t),o=O(r,m),i=o.CustomComponent||S,a=C(r,g),s=a.Element,a=a.wrapperTemplate,c=x(r,_,n,v,o,null),t=E({},y.props,{tree:w.getBlockTree(t),blockProps:o.customProps,offsetKey:n,block:r});if(e.push(T.createElement(s,c,T.createElement(i,t))),!a||(o=b,!!(c=(n=r).getNextSiblingKey())&&o.getBlockForKey(c).getType()===n.getType()))return e;var i=a,u=s,t=e,l=[],f=!0,r=!1,o=void 0;try{for(var p,d=t.reverse()[Symbol.iterator]();!(f=(p=d.next()).done);f=!0){var h=p.value;if(h.type!==u)break;l.push(h)}}catch(e){r=!0,o=e}finally{try{f||null==d.return||d.return()}finally{if(r)throw o}}return t.splice(t.indexOf(l[0]),l.length+1),r=l.reverse(),o=r[0].key,t.push(T.cloneElement(i,{key:"".concat(o,"-wrap"),"data-offset-key":D.encode(o,0,0)},r)),e},[])),t.getKey()),l=D.encode(u,0,0),f=O(t,m),p=f.CustomComponent,p=null!=p?T.createElement(p,d({},this.props,{tree:w.getBlockTree(u),blockProps:f.customProps,offsetKey:l,block:t})):T.createElement(k,{block:t,children:c,contentState:b,customStyleFn:r,customStyleMap:o,decorator:n,direction:i,forceSelection:a,hasSelection:h(s,u),selection:s,tree:e});if(t.getParentKey())return p;c=C(t,g).Element,r=x(t,_,l,v,f,this.wrapperRef);return T.createElement(c,r,p)},S}(T.Component));e.exports=n},function(e,t,n){"use strict";var m=n(133),v=n(69),b=n(15),r=n(6),_=n(0),o=n(19),n=(r.List,function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),(t.prototype.constructor=t).__proto__=n,r.prototype.render=function(){var e=this.props,s=e.block,n=e.contentState,c=e.customStyleFn,u=e.customStyleMap,r=e.decorator,l=e.direction,f=e.forceSelection,p=e.hasSelection,d=e.selection,e=e.tree,h=s.getKey(),y=s.getText(),g=e.size-1,e=this.props.children||e.map(function(e,o){var i=e.get("decoratorKey"),t=e.get("leaves"),a=t.size-1,t=t.map(function(e,t){var n=b.encode(h,o,t),r=e.get("start"),e=e.get("end");return _.createElement(v,{key:n,offsetKey:n,block:s,start:r,selection:p?d:null,forceSelection:f,text:y.slice(r,e),styleSet:s.getInlineStyleAt(r),customStyleMap:u,customStyleFn:c,isLast:i===g&&t===a})}).toArray();return i&&r?_.createElement(m,{block:s,children:t,contentState:n,decorator:r,decoratorKey:i,direction:l,leafSet:e,text:y,key:o}):t}).toArray();return _.createElement("div",{"data-offset-key":b.encode(h,0,0),className:o({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===l,"public/DraftStyleDefault/rtl":"RTL"===l})},e)},r}(_.Component));e.exports=n},function(e,t,n){"use strict";var r=n(17);function f(){return(f=r||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var p=n(15),d=n(0),h=n(41),y=n(32),n=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),(t.prototype.constructor=t).__proto__=n,r.prototype.render=function(){var e=this.props,t=e.block,n=e.children,r=e.contentState,o=e.decorator,i=e.decoratorKey,a=e.direction,s=e.leafSet,e=e.text,c=t.getKey(),u=s.get("leaves"),l=o.getComponentForKey(i),o=o.getPropsForKey(i),c=p.encode(c,parseInt(i,10),0),i=e.slice(u.first().get("start"),u.last().get("end")),e=y.getHTMLDirIfDifferent(h.getDirection(i),a);return d.createElement(l,f({},o,{contentState:r,decoratedText:i,dir:e,key:c,entityKey:t.getEntityAt(s.get("start")),offsetKey:c}),n)},r}(d.Component);e.exports=n},function(e,t,n){"use strict";function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}var a=n(0),r=n(11),s=n(7),c=n(20),u=r.isBrowser("IE <= 11");n=function(t){var e;function n(e){e=t.call(this,e)||this;return i(o(e),"_forceFlag",void 0),i(o(e),"_node",void 0),e._forceFlag=!1,e}e=t,(r=n).prototype=Object.create(e.prototype),(r.prototype.constructor=r).__proto__=e;var r=n.prototype;return r.shouldComponentUpdate=function(e){var t=this._node,n=""===e.children;c(t)||s(!1);return n?(n=t,!(u?"\n"===n.textContent:"BR"===n.tagName)):t.textContent!==e.children},r.componentDidMount=function(){this._forceFlag=!this._forceFlag},r.componentDidUpdate=function(){this._forceFlag=!this._forceFlag},r.render=function(){var e,t=this;return""===this.props.children?this._forceFlag?(e=function(e){return t._node=e},u?a.createElement("span",{key:"A","data-text":"true",ref:e},"\n"):a.createElement("br",{key:"A","data-text":"true",ref:e})):(e=function(e){return t._node=e},u?a.createElement("span",{key:"B","data-text":"true",ref:e},"\n"):a.createElement("br",{key:"B","data-text":"true",ref:e})):a.createElement("span",{key:this._forceFlag?"A":"B","data-text":"true",ref:function(e){return t._node=e}},this.props.children)},n}(a.Component);e.exports=n},function(e,t,n){"use strict";var i=n(71),s=n(63),r=n(11),d=n(44),c=n(72),h=n(34),o=n(7),a=n(20),u=r.isBrowser("IE");function l(e,t){if(!e)return"[empty]";e=function e(t,n){var r=void 0!==n?n(t):[];{var o;if(t.nodeType===Node.TEXT_NODE)return o=t.textContent.length,h(t).createTextNode("[text "+o+(r.length?" | "+r.join(", "):"")+"]")}var i=t.cloneNode();1===i.nodeType&&r.length&&i.setAttribute("data-labels",r.join(", "));var a=t.childNodes;for(var s=0;s<a.length;s++)i.appendChild(e(a[s],n));return i}(e,t);return e.nodeType===Node.TEXT_NODE?e.textContent:(a(e)||o(!1),e.outerHTML)}function f(e,t){for(var n=e,r=n;n;){if(a(n)&&r.hasAttribute("contenteditable"))return l(n,t);r=n=n.parentNode}return"Could not find contentEditable parent of node"}function p(e){return(null===e.nodeValue?e.childNodes:e.nodeValue).length}function y(n,t,r,o){var i=c();if(n.extend&&null!=t&&d(i,t)){r>p(t)&&s.logSelectionStateFailure({anonymizedDom:f(t),extraParams:JSON.stringify({offset:r}),selectionState:JSON.stringify(o.toJS())});var a=t===n.focusNode;try{0<n.rangeCount&&n.extend&&n.extend(t,r)}catch(e){throw s.logSelectionStateFailure({anonymizedDom:f(t,function(e){var t=[];return e===i&&t.push("active element"),e===n.anchorNode&&t.push("selection anchor node"),e===n.focusNode&&t.push("selection focus node"),t}),extraParams:JSON.stringify({activeElementName:i?i.nodeName:null,nodeIsFocus:t===n.focusNode,nodeWasFocus:a,selectionRangeCount:n.rangeCount,selectionAnchorNodeName:n.anchorNode?n.anchorNode.nodeName:null,selectionAnchorOffset:n.anchorOffset,selectionFocusNodeName:n.focusNode?n.focusNode.nodeName:null,selectionFocusOffset:n.focusOffset,message:e?""+e:null,offset:r},null,2),selectionState:JSON.stringify(o.toJS(),null,2)}),e}}else t&&0<n.rangeCount&&((a=n.getRangeAt(0)).setEnd(t,r),n.addRange(a.cloneRange()))}function g(e,t,n,r){var o=h(t).createRange();if(n>p(t)&&(s.logSelectionStateFailure({anonymizedDom:f(t),extraParams:JSON.stringify({offset:n}),selectionState:JSON.stringify(r.toJS())}),i.handleExtensionCausedError()),o.setStart(t,n),u)try{e.addRange(o)}catch(e){}else e.addRange(o)}e.exports={setDraftEditorSelection:function(e,t,n,r,o){var i=h(t);if(d(i.documentElement,t)){var i=i.defaultView.getSelection(),a=e.getAnchorKey(),s=e.getAnchorOffset(),c=e.getFocusKey(),u=e.getFocusOffset(),l=e.getIsBackward(),f=(!i.extend&&l&&(f=a,p=s,a=c,s=u,c=f,u=p,l=!1),a===n&&r<=s&&s<=o),p=c===n&&r<=u&&u<=o;if(f&&p)return i.removeAllRanges(),g(i,t,s-r,e),void y(i,t,u-r,e);l?(p&&(i.removeAllRanges(),g(i,t,u-r,e)),f&&(a=i.focusNode,c=i.focusOffset,i.removeAllRanges(),g(i,t,s-r,e),y(i,a,c,e))):(f&&(i.removeAllRanges(),g(i,t,s-r,e)),p&&y(i,t,u-r,e))}},addFocusToSelection:y}},function(e,t,n){"use strict";var r=n(137);e.exports=function(e){return r(e)&&3==e.nodeType}},function(e,t,n){"use strict";e.exports=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}},function(e,t,n){"use strict";var r=n(139),o=n(140);function i(e){return null==e?e:String(e)}e.exports=function(e,t){var n;if(window.getComputedStyle&&(n=window.getComputedStyle(e,null)))return i(n.getPropertyValue(o(t)));if(document.defaultView&&document.defaultView.getComputedStyle){if(n=document.defaultView.getComputedStyle(e,null))return i(n.getPropertyValue(o(t)));if("display"===t)return"none"}return e.currentStyle?i("float"===t?e.currentStyle.cssFloat||e.currentStyle.styleFloat:e.currentStyle[r(t)]):i(e.style&&e.style[r(t)])}},function(e,t,n){"use strict";var r=/-(.)/g;e.exports=function(e){return e.replace(r,function(e,t){return t.toUpperCase()})}},function(e,t,n){"use strict";var r=/([A-Z])/g;e.exports=function(e){return e.replace(r,"-$1").toLowerCase()}},function(e,t,n){"use strict";var r=n(44);e.exports=function(e){var t=e.ownerDocument.documentElement;return"getBoundingClientRect"in e&&r(t,e)?(e=e.getBoundingClientRect(),{left:Math.round(e.left)-t.clientLeft,right:Math.round(e.right)-t.clientLeft,top:Math.round(e.top)-t.clientTop,bottom:Math.round(e.bottom)-t.clientTop}):{left:0,right:0,top:0,bottom:0}}},function(e,t,n){"use strict";var r="undefined"!=typeof navigator&&-1<navigator.userAgent.indexOf("AppleWebKit");e.exports=function(e){return(e=e||document).scrollingElement?e.scrollingElement:r||"CSS1Compat"!==e.compatMode?e.body:e.documentElement}},function(e,t,n){"use strict";e.exports=function(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}},function(e,t,n){"use strict";var r=n(17);function L(){return(L=r||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function F(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}var B=n(75),z=n(15),K=n(0),H=n(19),U=n(145),q=n(10),n=function(e){var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.shouldComponentUpdate=function(e){var t=this.props.editorState,e=e.editorState;if(t.getDirectionMap()!==e.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==e.getSelection().getHasFocus())return!0;var n=e.getNativelyRenderedContent(),r=t.isInCompositionMode(),o=e.isInCompositionMode();if(t===e||null!==n&&e.getCurrentContent()===n||r&&o)return!1;var n=t.getCurrentContent(),i=e.getCurrentContent(),t=t.getDecorator(),a=e.getDecorator();return r!==o||n!==i||t!==a||e.mustForceSelection()},r.render=function(){for(var e=this.props,t=e.blockRenderMap,n=e.blockRendererFn,r=e.blockStyleFn,o=e.customStyleMap,i=e.customStyleFn,a=e.editorState,s=e.editorKey,c=e.preventScroll,u=e.textDirectionality,l=a.getCurrentContent(),f=a.getSelection(),p=a.mustForceSelection(),d=a.getDecorator(),h=q(a.getDirectionMap()),y=l.getBlocksAsArray(),g=[],m=null,v=null,b=0;b<y.length;b++){var _=y[b],w=_.getKey(),S=_.getType(),E=n(_),C=void 0,O=void 0,x=void 0,E=(E&&(C=E.component,O=E.props,x=E.editable),u||h.get(w)),k=z.encode(w,0,0),O={contentState:l,block:_,blockProps:O,blockStyleFn:r,customStyleMap:o,customStyleFn:i,decorator:d,direction:E,forceSelection:p,offsetKey:k,preventScroll:c,selection:f,tree:a.getBlockTree(w)},D=t.get(S)||t.get("unstyled"),T=D.wrapper,D=D.element||t.get("unstyled").element,j=_.getDepth(),I="",S=(r&&(I=r(_)),"li"===D&&(I=U(I,H({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===S,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===S,"public/DraftStyleDefault/reset":v!==T||null===m||m<j,"public/DraftStyleDefault/depth0":0===j,"public/DraftStyleDefault/depth1":1===j,"public/DraftStyleDefault/depth2":2===j,"public/DraftStyleDefault/depth3":3===j,"public/DraftStyleDefault/depth4":4<=j,"public/DraftStyleDefault/listLTR":"LTR"===E,"public/DraftStyleDefault/listRTL":"RTL"===E}))),C||B),j={className:I,"data-block":!0,"data-editor":s,"data-offset-key":k,key:w},E=(void 0!==x&&(j=F({},j,{contentEditable:x,suppressContentEditableWarning:!0})),K.createElement(D,j,K.createElement(S,L({},O,{key:w}))));g.push({block:E,wrapperTemplate:T,key:w,offsetKey:k}),m=T?_.getDepth():null,v=T}for(var M=[],N=0;N<g.length;){var A=g[N];if(A.wrapperTemplate){for(var P=[];P.push(g[N].block),++N<g.length&&g[N].wrapperTemplate===A.wrapperTemplate;);var R=K.cloneElement(A.wrapperTemplate,{key:A.key+"-wrap","data-offset-key":A.offsetKey},P);M.push(R)}else M.push(A.block),N++}return K.createElement("div",{"data-contents":"true"},M)},n}(K.Component);e.exports=n},function(e,t,n){"use strict";e.exports=function(e){var t=e||"",n=arguments.length;if(1<n)for(var r=1;r<n;r++){var o=arguments[r];o&&(t=(t?t+" ":"")+o)}return t}},function(e,t,n){"use strict";var i=n(76),a=n(9),s=n(8),c=n(33),u=n(34),l=n(78),f=n(67),r=n(61),p=n(38),d=n(10);function h(e){e._internalDrag=!1;var t,e=e.editorContainer;e&&(t=new MouseEvent("mouseup",{view:r(e),bubbles:!0,cancelable:!0}),e.dispatchEvent(t))}function y(e,t,n){t=a.insertText(e.getCurrentContent(),t,n,e.getCurrentInlineStyle());return s.push(e,t,"insert-fragment")}e.exports={onDragEnd:function(e){e.exitCurrentMode(),h(e)},onDrop:function(t,e){var n=new i(e.nativeEvent.dataTransfer),r=t._latestEditorState,o=function(e,t){var n=null,r=null,o=u(e.currentTarget);if("function"==typeof o.caretRangeFromPoint)o=o.caretRangeFromPoint(e.x,e.y),n=o.startContainer,r=o.startOffset;else{if(!e.rangeParent)return null;n=e.rangeParent,r=e.rangeOffset}return n=d(n),r=d(r),o=d(c(n)),f(t,o,r,o,r)}(e.nativeEvent,r);if(e.preventDefault(),t._dragCount=0,t.exitCurrentMode(),null!=o){e=n.getFiles();if(0<e.length)return t.props.handleDroppedFiles&&p(t.props.handleDroppedFiles(o,e))?void 0:void l(e,function(e){e&&t.update(y(r,o,e))});e=t._internalDrag?"internal":"external";t.props.handleDrop&&p(t.props.handleDrop(o,n,e))||(t._internalDrag?t.update(function(e,t){t=a.moveText(e.getCurrentContent(),e.getSelection(),t);return s.push(e,t,"insert-fragment")}(r,o)):t.update(y(r,o,n.getText()))),h(t)}}}},function(e,t,n){"use strict";var r={isImage:function(e){return"image"===o(e)[0]},isJpeg:function(e){var t=o(e);return r.isImage(e)&&("jpeg"===t[1]||"pjpeg"===t[1])}};function o(e){return e.split("/")}e.exports=r},function(e,t,n){"use strict";var a=n(7);e.exports=function(e){if(!(r=e)||"object"!=typeof r&&"function"!=typeof r||!("length"in r)||"setInterval"in r||"number"==typeof r.nodeType||!(Array.isArray(r)||"callee"in r||"item"in r))return[e];if(Array.isArray(e))return e.slice();var t=e,n=t.length;if((Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t)&&a(!1),"number"!=typeof n&&a(!1),0===n||n-1 in t||a(!1),"function"==typeof t.callee&&a(!1),t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(e){}for(var r,o=Array(n),i=0;i<n;i++)o[i]=t[i];return o}},function(e,t,n){"use strict";var r=n(11),o=n(150),i=n(155),a=n(156),s=n(157),c=n(158),u=n(160),l=n(161),f=n(162),p=n(163),d=n(164),h=n(178),n=n(62),y=r.isBrowser("Chrome"),r=r.isBrowser("Firefox"),y=y||r?n:function(e){};e.exports={onBeforeInput:o,onBlur:i,onCompositionStart:a,onCopy:s,onCut:c,onDragOver:u,onDragStart:l,onFocus:f,onInput:p,onKeyDown:d,onPaste:h,onSelect:n,onMouseUp:y,onKeyUp:y}},function(e,t,n){"use strict";var i=n(9),c=n(8),r=n(11),f=n(43),p=n(38),d=n(151),h=n(10),y=n(152),g="'",m="/",v=r.isBrowser("Firefox");function b(e,t,n,r,o){t=i.replaceText(e.getCurrentContent(),e.getSelection(),t,n,r);return c.push(e,t,"insert-characters",o)}e.exports=function(e,t){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var n=e._latestEditorState,u=t.data;if(u)if(e.props.handleBeforeInput&&p(e.props.handleBeforeInput(u,n,t.timeStamp)))t.preventDefault();else{var r,o,i,a=n.getSelection(),l=a.getStartOffset(),s=a.getAnchorKey();if(a.isCollapsed())return a=b(n,u,n.getCurrentInlineStyle(),f(n.getCurrentContent(),n.getSelection()),!1),(o=(o=!1)||d(e._latestCommittedEditorState))||(i=n.getBlockTree(s),r=a.getBlockTree(s),o=i.size!==r.size||i.zip(r).some(function(e){var t=e[0],e=e[1],n=t.get("start"),r=n+(l<=n?u.length:0),o=t.get("end"),i=o+(l<=o?u.length:0),a=e.get("start"),s=e.get("end"),c=e.get("decoratorKey");return t.get("decoratorKey")!==c||t.get("leaves").size!==e.get("leaves").size||r!==a||i!==s||null!=c&&s-a!=o-n})),o||(i=u,o=v&&(i==g||i==m)),(o=o||h(a.getDirectionMap()).get(s)!==h(n.getDirectionMap()).get(s))?(t.preventDefault(),a=c.set(a,{forceSelection:!0}),void e.update(a)):(a=c.set(a,{nativelyRenderedContent:a.getCurrentContent()}),e._pendingStateFromBeforeInput=a,void y(function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)}));t.preventDefault(),void e.update(b(n,u,n.getCurrentInlineStyle(),f(n.getCurrentContent(),n.getSelection()),!0))}}},function(e,t,n){"use strict";e.exports=function(e){var t=e.getSelection(),n=t.getAnchorKey(),e=e.getBlockTree(n),r=t.getStartOffset(),o=!1;return e.some(function(e){return r===e.get("start")?o=!0:r<e.get("end")&&e.get("leaves").some(function(e){e=e.get("start");return r===e&&(o=!0)})}),o}},function(t,e,n){"use strict";!function(e){n(153),t.exports=e.setImmediate}.call(this,n(23))},function(e,t,n){!function(e,d){!function(n,i){"use strict";var r,a,s,o,c,u,t,e;function l(e){delete a[e]}function f(e){if(s)setTimeout(f,0,e);else{var t=a[e];if(t){s=!0;try{var n=t,r=n.callback,o=n.args;switch(o.length){case 0:r();break;case 1:r(o[0]);break;case 2:r(o[0],o[1]);break;case 3:r(o[0],o[1],o[2]);break;default:r.apply(i,o)}}finally{l(e),s=!1}}}}function p(){function e(e){e.source===n&&"string"==typeof e.data&&0===e.data.indexOf(t)&&f(+e.data.slice(t.length))}var t="setImmediate$"+Math.random()+"$";n.addEventListener?n.addEventListener("message",e,!1):n.attachEvent("onmessage",e),c=function(e){n.postMessage(t+e,"*")}}n.setImmediate||(r=1,s=!(a={}),o=n.document,e=(e=Object.getPrototypeOf&&Object.getPrototypeOf(n))&&e.setTimeout?e:n,"[object process]"==={}.toString.call(n.process)?c=function(e){d.nextTick(function(){f(e)})}:!function(){var e,t;if(n.postMessage&&!n.importScripts)return e=!0,t=n.onmessage,n.onmessage=function(){e=!1},n.postMessage("","*"),n.onmessage=t,e}()?c=n.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){t.port2.postMessage(e)}):o&&"onreadystatechange"in o.createElement("script")?(u=o.documentElement,function(e){var t=o.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,u.removeChild(t),t=null},u.appendChild(t)}):function(e){setTimeout(f,0,e)}:p(),e.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];return a[r]={callback:e,args:t},c(r),r++},e.clearImmediate=l)}("undefined"==typeof self?void 0===e?this:e:self)}.call(this,n(23),n(154))},function(e,t){var n,r,e=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return(n=setTimeout)(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}var s,c=[],u=!1,l=-1;function f(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&p())}function p(){if(!u){for(var e=a(f),t=(u=!0,c.length);t;){for(s=c,c=[];++l<t;)s&&s[l].run();l=-1,t=c.length}s=null,u=!1,!function(t){if(r===clearTimeout)return clearTimeout(t);if((r===i||!r)&&clearTimeout)return(r=clearTimeout)(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function h(){}e.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new d(e,t)),1!==c.length||u||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=h,e.addListener=h,e.once=h,e.off=h,e.removeListener=h,e.removeAllListeners=h,e.emit=h,e.prependListener=h,e.prependOnceListener=h,e.listeners=function(e){return[]},e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}},function(e,t,n){"use strict";var o=n(8),i=n(44),a=n(72);e.exports=function(e,t){var n=t.currentTarget.ownerDocument,r=(Boolean(e.props.preserveSelectionOnBlur)||a(n)!==n.body||(n=n.defaultView.getSelection(),r=e.editor,1===n.rangeCount&&i(r,n.anchorNode)&&i(r,n.focusNode)&&n.removeAllRanges()),e._latestEditorState);(n=r.getSelection()).getHasFocus()&&(n=n.set("hasFocus",!1),e.props.onBlur&&e.props.onBlur(t),e.update(o.acceptSelection(r,n)))}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e,t){e.setMode("composite"),e.update(r.set(e._latestEditorState,{inCompositionMode:!0})),e._onCompositionStart(t)}},function(e,t,n){"use strict";var r=n(79);e.exports=function(e,t){e._latestEditorState.getSelection().isCollapsed()?t.preventDefault():e.setClipboard(r(e._latestEditorState))}},function(e,t,n){"use strict";var a=n(9),s=n(8),c=n(36),u=n(79),l=n(37),f=n(159);e.exports=function(n,e){var r,o=n._latestEditorState,t=o.getSelection(),i=e.target;t.isCollapsed()?e.preventDefault():(f(i)&&(r=l(c.getScrollParent(i))),t=u(o),n.setClipboard(t),n.setMode("cut"),setTimeout(function(){var e,t;n.restoreEditorDOM(r),n.exitCurrentMode(),n.update((e=o,t=a.removeRange(e.getCurrentContent(),e.getSelection(),"forward"),s.push(e,t,"remove-range")))},0))}},function(e,t,n){"use strict";e.exports=function(e){if(!(e&&"ownerDocument"in e))return!1;if("ownerDocument"in e){if(!e.ownerDocument.defaultView)return e instanceof Node;if(e instanceof e.ownerDocument.defaultView.Node)return!0}return!1}},function(e,t,n){"use strict";e.exports=function(e,t){e.setMode("drag"),t.preventDefault()}},function(e,t,n){"use strict";e.exports=function(e){e._internalDrag=!0,e.setMode("drag")}},function(e,t,n){"use strict";var o=n(8),i=n(11);e.exports=function(e,t){var n=e._latestEditorState,r=n.getSelection();r.getHasFocus()||(r=r.set("hasFocus",!0),e.props.onFocus&&e.props.onFocus(t),i.isBrowser("Chrome < 60.0.3081.0")?e.update(o.forceSelection(n,r)):e.update(o.acceptSelection(n,r)))}},function(e,t,n){"use strict";var _=n(9),w=n(15),S=n(8),r=n(11),E=n(68).notEmptyKey,C=n(33),O=n(80),x=n(10),k=r.isEngine("Gecko");e.exports=function(e,t){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var n=e.editor.ownerDocument.defaultView.getSelection(),r=n.anchorNode,o=n.isCollapsed,i=(null==r?void 0:r.nodeType)!==Node.TEXT_NODE&&(null==r?void 0:r.nodeType)!==Node.ELEMENT_NODE;if(null!=r&&!i){if(r.nodeType===Node.TEXT_NODE&&(null!==r.previousSibling||null!==r.nextSibling)){var a=r.parentNode;if(null==a)return;r.nodeValue=a.textContent;for(var s=a.firstChild;null!=s;s=s.nextSibling)s!==r&&a.removeChild(s)}var i=r.textContent,c=e._latestEditorState,u=x(C(r)),u=w.decode(u),l=u.blockKey,f=u.decoratorKey,u=u.leafKey,f=c.getBlockTree(l).getIn([f,"leaves",u]),u=f.start,f=f.end,p=c.getCurrentContent(),l=p.getBlockForKey(l),d=l.getText().slice(u,f);if((i=i.endsWith("\n\n")?i.slice(0,-1):i)===d){t=t.nativeEvent.inputType;if(t){v=c;t="deleteContentBackward"===t?O(v):v;if(t!==c)return e.restoreEditorDOM(),void e.update(t)}}else{var h,y,g,m,v=c.getSelection(),t=v.merge({anchorOffset:u,focusOffset:f,isBackward:!1}),f=l.getEntityAt(u),f=E(f)?p.getEntity(f):null,f="MUTABLE"===(null!=f?f.getMutability():null),b=f?"spellcheck-change":"apply-entity",t=_.replaceText(p,t,i,l.getInlineStyleAt(u),f?l.getEntityAt(u):null),l=(m=k?(g=n.anchorOffset,m=n.focusOffset,y=(h=u+Math.min(g,m))+Math.abs(g-m),g=h,y):(f=i.length-d.length,h=v.getStartOffset(),y=v.getEndOffset(),g=o?y+f:h,y+f),t.merge({selectionBefore:p.getSelectionAfter(),selectionAfter:v.merge({anchorOffset:g,focusOffset:m})}));e.update(S.push(c,l,b))}}}},function(e,t,n){"use strict";var a=n(9),s=n(8),r=n(48),c=n(35),u=n(166),o=n(11),l=n(38),f=n(167),p=n(169),d=n(171),h=n(172),y=n(173),g=n(174),m=n(80),v=n(175),b=n(176),_=n(177),w=r.isOptionKeyCommand,S=o.isBrowser("Chrome");e.exports=function(t,n){var e=n.which,r=t._latestEditorState;function o(e){e=t.props[e];return e&&(e(n),1)}switch(e){case c.RETURN:if(n.preventDefault(),t.props.handleReturn&&l(t.props.handleReturn(n,r)))return;break;case c.ESC:if(n.preventDefault(),o("onEscape"))return;break;case c.TAB:if(o("onTab"))return;break;case c.UP:if(o("onUpArrow"))return;break;case c.RIGHT:if(o("onRightArrow"))return;break;case c.DOWN:if(o("onDownArrow"))return;break;case c.LEFT:if(o("onLeftArrow"))return;break;case c.SPACE:S&&w(n)&&n.preventDefault()}var i=t.props.keyBindingFn(n);null==i||""===i?e===c.SPACE&&S&&w(n)&&(e=a.replaceText(r.getCurrentContent(),r.getSelection()," "),t.update(s.push(r,e,"insert-characters"))):"undo"===i?_(n,r,t.update):(n.preventDefault(),t.props.handleKeyCommand&&l(t.props.handleKeyCommand(i,r,n.timeStamp))||(e=function(e,t,n){switch(e){case"redo":return s.redo(t);case"delete":return v(t);case"delete-word":return d(t);case"backspace":return m(t);case"backspace-word":return p(t);case"backspace-to-start-of-line":return f(t,n);case"split-block":return h(t);case"transpose-characters":return b(t);case"move-selection-to-start-of-block":return g(t);case"move-selection-to-end-of-block":return y(t);case"secondary-cut":return u.cut(t);case"secondary-paste":return u.paste(t);default:return t}}(i,r,n))!==r&&t.update(e))}},function(e,t,n){"use strict";var r=n(35);e.exports=function(e){return e.which===r.RETURN&&(e.getModifierState("Shift")||e.getModifierState("Alt")||e.getModifierState("Control"))}},function(e,t,n){"use strict";var a=n(9),s=n(8),c=n(29),u=n(10),l=null;e.exports={cut:function(e){var t=e.getCurrentContent(),n=e.getSelection(),r=null;if(n.isCollapsed()){var o=n.getAnchorKey(),i=t.getBlockForKey(o).getLength();if(i===n.getAnchorOffset()){o=t.getKeyAfter(o);if(null==o)return e;r=n.set("focusKey",o).set("focusOffset",0)}else r=n.set("focusOffset",i)}else r=n;r=u(r),l=c(t,r);o=a.removeRange(t,r,"forward");return o===t?e:s.push(e,o,"remove-range")},paste:function(e){if(!l)return e;var t=a.replaceWithFragment(e.getCurrentContent(),e.getSelection(),l);return s.push(e,t,"insert-fragment")}}},function(e,t,n){"use strict";var r=n(8),o=n(168),i=n(66),a=n(46),s=n(28);e.exports=function(e,n){var t=s(e,function(e){var t=e.getSelection();if(t.isCollapsed()&&0===t.getAnchorOffset())return a(e,1);t=n.currentTarget.ownerDocument.defaultView.getSelection().getRangeAt(0),t=o(t);return i(e,null,t.endContainer,t.endOffset,t.startContainer,t.startOffset).selectionState},"backward");return t===e.getCurrentContent()?e:r.push(e,t,"remove-range")}},function(e,t,n){"use strict";var u=n(21),l=n(34),f=n(81),p=n(7);function d(e,t){for(var n=1/0,r=1/0,o=-1/0,i=-1/0,a=0;a<e.length;a++){var s=e[a];0!==s.width&&1!==s.width&&(n=Math.min(n,s.top),r=Math.min(r,s.bottom),o=Math.max(o,s.top),i=Math.max(i,s.bottom))}return o<=r&&o-n<t&&i-r<t}e.exports=function(e){e.collapsed||p(!1);var t=(e=e.cloneRange()).startContainer,n=function(e){var t=getComputedStyle(e),n=(e=l(e)).createElement("div");n.style.fontFamily=t.fontFamily,n.style.fontSize=t.fontSize,n.style.fontStyle=t.fontStyle,n.style.fontWeight=t.fontWeight,n.style.lineHeight=t.lineHeight,n.style.position="absolute",n.textContent="M";(t=e.body)||p(!1),t.appendChild(n),e=n.getBoundingClientRect();return t.removeChild(n),e.height}(t=1!==t.nodeType?t.parentNode:t),r=e.endContainer,o=e.endOffset;for(e.setStart(e.startContainer,0);d(f(e),n)&&(r=e.startContainer,o=e.startOffset,r.parentNode||p(!1),e.setStartBefore(r),1!==r.nodeType||"inline"===getComputedStyle(r).display););for(var i=r,a=o-1;;){for(var s=i.nodeValue,c=a;0<=c;c--)if(!(null!=s&&0<c&&u.isSurrogatePair(s,c-1))){if(e.setStart(i,c),!d(f(e),n))break;r=i,o=c}if(-1===c||0===i.childNodes.length)break;a=function(e){switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:return 0;case Node.TEXT_NODE:case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:return e.length;default:return e.childNodes.length}}(i=i.childNodes[c])}return e.setStart(r,o),e}},function(e,t,n){"use strict";var r=n(82),o=n(8),i=n(46),a=n(28);e.exports=function(e){var t=a(e,function(e){var t=e.getSelection(),n=t.getStartOffset();if(0===n)return i(e,1);t=t.getStartKey(),t=e.getCurrentContent().getBlockForKey(t).getText().slice(0,n),n=r.getBackward(t);return i(e,n.length||1)},"backward");return t===e.getCurrentContent()?e:o.push(e,t,"remove-range")}},function(e,t,n){"use strict";e.exports={getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:-?!-/[-`{-・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"}}},function(e,t,n){"use strict";var r=n(82),o=n(8),i=n(83),a=n(28);e.exports=function(e){var t=a(e,function(e){var t=e.getSelection(),n=t.getStartOffset(),t=t.getStartKey(),t=e.getCurrentContent().getBlockForKey(t).getText().slice(n),n=r.getForward(t);return i(e,n.length||1)},"forward");return t===e.getCurrentContent()?e:o.push(e,t,"remove-range")}},function(e,t,n){"use strict";var r=n(9),o=n(8);e.exports=function(e){var t=r.splitBlock(e.getCurrentContent(),e.getSelection());return o.push(e,t,"split-block")}},function(e,t,n){"use strict";var o=n(8);e.exports=function(e){var t=e.getSelection(),n=t.getEndKey(),r=e.getCurrentContent().getBlockForKey(n).getLength();return o.set(e,{selection:t.merge({anchorKey:n,anchorOffset:r,focusKey:n,focusOffset:r,isBackward:!1}),forceSelection:!0})}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e){var t=e.getSelection(),n=t.getStartKey();return r.set(e,{selection:t.merge({anchorKey:n,anchorOffset:0,focusKey:n,focusOffset:0,isBackward:!1}),forceSelection:!0})}},function(e,t,n){"use strict";var r=n(8),o=n(21),i=n(83),a=n(28);e.exports=function(e){var t=a(e,function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),t=t.getAnchorOffset(),n=n.getBlockForKey(r).getText()[t];return i(e,n?o.getUTF16Length(n,0):1)},"forward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return r.push(e,t.set("selectionBefore",n),n.isCollapsed()?"delete-character":"remove-range")}},function(e,t,n){"use strict";var a=n(9),s=n(8),c=n(29);e.exports=function(e){if(!(r=e.getSelection()).isCollapsed())return e;if(0===(o=r.getAnchorOffset()))return e;var t=r.getAnchorKey(),n=e.getCurrentContent();if((t=n.getBlockForKey(t).getLength())<=1)return e;var t=o===t?(i=r.set("anchorOffset",o-1),r):(i=r.set("focusOffset",o+1)).set("anchorOffset",o+1),r=c(n,i),o=a.removeRange(n,i,"backward"),i=(n=o.getSelectionAfter()).getAnchorOffset()-1,n=n.merge({anchorOffset:i,focusOffset:i}),i=a.replaceWithFragment(o,n,r),o=s.push(e,i,"insert-fragment");return s.acceptSelection(o,t)}},function(e,t,n){"use strict";var i=n(8);e.exports=function(e,t,n){var r,o=i.undo(t);if("spellcheck-change"===t.getLastChangeType())return r=o.getCurrentContent(),void n(i.set(o,{nativelyRenderedContent:r}));e.preventDefault(),t.getNativelyRenderedContent()?(n(i.set(t,{nativelyRenderedContent:null})),setTimeout(function(){n(o)},0)):n(o)}},function(e,t,n){"use strict";var l=n(25),f=n(12),p=n(76),d=n(9),h=n(179),y=n(8),g=n(86),m=n(43),v=n(78),b=n(38),_=n(184);function w(e,t,n){t=d.replaceWithFragment(e.getCurrentContent(),e.getSelection(),t);return y.push(e,t.set("entityMap",n),"insert-fragment")}e.exports=function(o,e){if(e.preventDefault(),!(e=new p(e.clipboardData)).isRichText()){var t=e.getFiles(),i=e.getText();if(0<t.length)return o.props.handlePastedFiles&&b(o.props.handlePastedFiles(t))?void 0:void v(t,function(e){var t,n,r;(e=e||i)&&(t=o._latestEditorState,e=_(e),n=f.create({style:t.getCurrentInlineStyle(),entity:m(t.getCurrentContent(),t.getSelection())}),r=g.getCurrentBlockType(t),e=h.processText(e,n,r),n=l.createFromArray(e),r=d.replaceWithFragment(t.getCurrentContent(),t.getSelection(),n),o.update(y.push(t,r,"insert-fragment")))})}var n,t=[],r=e.getText(),a=e.getHTML(),s=o._latestEditorState;if(o.props.formatPastedText&&(r=(u=o.props.formatPastedText(r,a)).text,a=u.html),!o.props.handlePastedText||!b(o.props.handlePastedText(r,a,s))){if(r&&(t=_(r)),!o.props.stripPastedStyles){var c,u=o.getClipboard();if(!o.props.formatPastedText&&e.isRichText()&&u){if(-1!==(null==(c=a)?void 0:c.indexOf(o.getEditorKey()))||1===t.length&&1===u.size&&u.first().getText()===r)return void o.update(w(o._latestEditorState,u))}else if(u&&e.types.includes("com.apple.webarchive")&&!e.types.includes("text/html")&&(c=u,(n=t).length===c.size&&c.valueSeq().every(function(e,t){return e.getText()===n[t]})))return void o.update(w(o._latestEditorState,u));if(a){var r=h.processHTML(a,o.props.blockRenderMap);if(r){var e=r.contentBlocks,u=r.entityMap;if(e)return a=l.createFromArray(e),void o.update(w(o._latestEditorState,a,u))}}o.setClipboard(null)}t.length&&(r=f.create({style:s.getCurrentInlineStyle(),entity:m(s.getCurrentContent(),s.getSelection())}),e=g.getCurrentBlockType(s),a=h.processText(t,r,e),u=l.createFromArray(a),o.update(w(o._latestEditorState,u)))}}},function(e,t,n){"use strict";function a(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}var r=n(18),o=n(13),i=n(84),s=n(14),c=n(85),u=n(16),l=n(6),f=n(58),p=l.List,d=l.Repeat,h=u("draft_tree_data_support"),y=h?o:r;e.exports={processHTML:function(e,t){return i(e,c,t)},processText:function(e,o,i){return e.reduce(function(e,t,n){t=f(t);var r=s(),t={key:r,type:i,text:t,characterList:p(d(o,t.length))};return h&&0!==n&&(t=a({},t,{prevSibling:(e[n=n-1]=e[n].merge({nextSibling:r})).getKey()})),e.push(new y(t)),e},[])}}},function(e,t,n){"use strict";var r=function(){function e(e){var t,n,r;r=void 0,(n="_uri")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this._uri=e}return e.prototype.toString=function(){return this._uri},e}();e.exports=r},function(e,t,n){"use strict";var r=n(20);e.exports=function(e){return!(!e||!e.ownerDocument)&&(r(e)&&"A"===e.nodeName)}},function(e,t,n){"use strict";var r=n(20);e.exports=function(e){return!(!e||!e.ownerDocument)&&(r(e)&&"IMG"===e.nodeName)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var o=t.getStartKey(),i=t.getEndKey(),a=(s=e.getBlockMap()).toSeq().skipUntil(function(e,t){return t===o}).takeUntil(function(e,t){return t===i}).concat([[i,s.get(i)]]).map(function(e){var t=e.getDepth()+n,t=Math.max(0,Math.min(t,r));return e.set("depth",t)}),s=s.merge(a);return e.merge({blockMap:s,selectionBefore:t,selectionAfter:t})}},function(e,t,n){"use strict";var r=/\r\n?|\n/g;e.exports=function(e){return e.split(r)}},function(e,t,n){"use strict";n=n(22).unstable_flushControlled;e.exports=n},function(e,t,n){"use strict";var o=n(0),i=n(19),n=function(e){var t;function n(){return e.apply(this,arguments)||this}t=e,(r=n).prototype=Object.create(t.prototype),(r.prototype.constructor=r).__proto__=t;var r=n.prototype;return r.shouldComponentUpdate=function(e){return this.props.text!==e.text||this.props.editorState.getSelection().getHasFocus()!==e.editorState.getSelection().getHasFocus()},r.render=function(){var e=this.props.editorState.getSelection().getHasFocus(),e=i({"public/DraftEditorPlaceholder/root":!0,"public/DraftEditorPlaceholder/hasFocus":e});return o.createElement("div",{className:e},o.createElement("div",{className:i("public/DraftEditorPlaceholder/inner"),id:this.props.accessibilityID,style:{whiteSpace:"pre-wrap"}},this.props.text))},n}(o.Component);e.exports=n},function(e,t,n){},function(e,t,n){"use strict";function i(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}function a(e,t){return{key:e.getKey(),text:e.getText(),type:e.getType(),depth:e.getDepth(),inlineStyleRanges:o(e),entityRanges:r(e,t),data:e.getData().toObject()}}var s=n(18),c=n(13),l=n(88),r=n(189),o=n(190),u=n(7),f=function(e,t,n,r){var o;e instanceof s?n.push(a(e,t)):(e instanceof c||u(!1),o=e.getParentKey(),e=r[e.getKey()]=i({},a(e,t),{children:[]}),(o?r[o].children:n).push(e))};e.exports=function(e){var r,t,o,i,a,n,s,c,u={entityMap:{},blocks:[]};return r=u.entityMap,t=[],o={},i={},a=0,e.getBlockMap().forEach(function(n){n.findEntityRanges(function(e){return null!==e.getEntity()},function(e){var e=n.getEntityAt(e),t=l.stringify(e);i[t]||(i[t]=e,r[t]="".concat(a),a++)}),f(n,r,t,o)}),n=e,e=u={blocks:t,entityMap:r},s=u.blocks,e=u.entityMap,c={},Object.keys(e).forEach(function(e,t){e=n.getEntity(l.unstringify(e));c[t]={type:e.getType(),mutability:e.getMutability(),data:e.getData()}}),u={blocks:s,entityMap:c}}},function(e,t,n){"use strict";var s=n(88),c=n(21).strlen;e.exports=function(o,i){var a=[];return o.findEntityRanges(function(e){return!!e.getEntity()},function(e,t){var n=o.getText(),r=o.getEntityAt(e);a.push({offset:c(n.slice(0,e)),length:c(n.slice(e,t)),key:Number(i[s.stringify(r)])})}),a}},function(e,t,n){"use strict";var a=n(21),s=n(26),c=function(e,t){return e===t},u=function(e){return!!e},r=[];e.exports=function(t){var n=t.getCharacterList().map(function(e){return e.getStyle()}).toList(),e=n.flatten().toSet().map(function(e){return r=t,o=e,i=[],e=(e=n).map(function(e){return e.has(o)}).toList(),s(e,c,u,function(e,t){var n=r.getText();i.push({offset:a.strlen(n.slice(0,e)),length:a.strlen(n.slice(e,t)),style:o})}),i;var r,o,i});return Array.prototype.concat.apply(r,e.toJS())}},function(e,t,n){"use strict";function p(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}function d(e,t){var n=e.key,r=e.type,o=e.data;return{text:e.text,depth:e.depth||0,type:r||"unstyled",key:n||m(),data:E(o),characterList:i(e,t)}}function i(e,t){var n=e.text,r=e.entityRanges,e=e.inlineStyleRanges,r=r||[];return o(f(n,e||[]),a(n,r.filter(function(e){return t.hasOwnProperty(e.key)}).map(function(e){return p({},e,{key:t[e.key]})})))}function h(e){return p({},e,{key:e.key||m()})}function y(e,t,n){return t=t.map(function(e){return p({},e,{parentRef:n})}),e.concat(t.reverse())}var r=n(18),g=n(13),s=n(40),c=n(30),u=n(192),l=(n(193),n(31)),o=n(194),a=n(195),f=n(196),m=n(14),v=n(16),b=n(6),_=n(7),w=v("draft_tree_data_support"),S=b.List,E=b.Map,C=b.OrderedMap,O=function(l,f){return l.map(h).reduce(function(e,t,n){Array.isArray(t.children)||_(!1);for(var r=t.children.map(h),t=new g(p({},d(t,f),{prevSibling:0===n?null:l[n-1].key,nextSibling:n===l.length-1?null:l[n+1].key,children:S(r.map(function(e){return e.key}))})),o=(e=e.set(t.getKey(),t),y([],r,t));0<o.length;){var i=o.pop(),a=i.parentRef,s=a.getChildKeys(),c=s.indexOf(i.key),u=Array.isArray(i.children);if(!u){_(!1);break}u=i.children.map(h),i=new g(p({},d(i,f),{parent:a.getKey(),children:S(u.map(function(e){return e.key})),prevSibling:0===c?null:s.get(c-1),nextSibling:c===s.size-1?null:s.get(c+1)}));e=e.set(i.getKey(),i),o=y(o,u,i)}return e},C())},x=function(e,t){return C(e.map(function(e){e=new r(d(e,t));return[e.getKey(),e]}))};e.exports=function(e){Array.isArray(e.blocks)||_(!1);o=e.entityMap,i={},Object.keys(o).forEach(function(e){var t=o[e],n=t.type,r=t.mutability,t=t.data;i[e]=c.__create(n,r,t||{})});var o,i,t,n,r=i,a=(t=r,a=(e=e).blocks.find(function(e){return Array.isArray(e.children)&&0<e.children.length}),n=(w&&!a?u.fromRawStateToRawTreeState(e):e).blocks,w?O(n,t):x(a?u.fromRawTreeStateToRawState(e).blocks:n,t)),e=a.isEmpty()?new l:l.createEmpty(a.first().getKey());return new s({blockMap:a,entityMap:r,selectionBefore:e,selectionAfter:e})}},function(e,t,n){"use strict";function s(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}function c(e){return!(!e||!e.type)&&("unordered-list-item"===(e=e.type)||"ordered-list-item"===e)}var u=n(14),a=n(7);e.exports={fromRawTreeStateToRawState:function(e){var t=e.blocks,r=[];if(Array.isArray(t)||a(!1),!Array.isArray(t)||!t.length)return e;for(var n=function(e){var t,n=s({},e);c(e)&&(n.depth=n.depth||0,t=e,Array.isArray(t.children)&&(t.children=t.children.map(function(e){return e.type===t.type?s({},e,{depth:(t.depth||0)+1}):e})),null!=e.children&&0<e.children.length)||(delete n.children,r.push(n))},o=[].concat(t).reverse();o.length;){var i=o.pop(),i=(n(i),i.children);Array.isArray(i)||a(!1),o=o.concat([].concat(i.reverse()))}return e.blocks=r,s({},e,{blocks:r})},fromRawStateToRawTreeState:function(e){var i=[],a=[];return e.blocks.forEach(function(e){var t=c(e),n=e.depth||0,r=s({},e,{children:[]});if(t){var o=a[0];if(null==o&&0===n)i.push(r);else if(null==o||o.depth<n-1){t={key:u(),text:"",depth:n-1,type:e.type,children:[],entityRanges:[],inlineStyleRanges:[]};a.unshift(t),1===n?i.push(t):null!=o&&o.children.push(t),t.children.push(r)}else if(o.depth===n-1)o.children.push(r);else{for(;null!=o&&o.depth>=n;)a.shift(),o=a[0];(0<n?o.children:i).push(r)}}else i.push(r)}),s({},e,{blocks:i})}}},function(e,t,n){"use strict";n(47);e.exports={isValidBlock:function(e,t){var n=e.getKey(),r=e.getParentKey();if(null!=r&&!t.get(r).getChildKeys().includes(n))return!1;if(!e.getChildKeys().map(function(e){return t.get(e)}).every(function(e){return e.getParentKey()===n}))return!1;r=e.getPrevSiblingKey();if(null!=r&&t.get(r).getNextSiblingKey()!==n)return!1;var o=e.getNextSiblingKey();if(null!=o&&t.get(o).getPrevSiblingKey()!==n)return!1;return(null===o||null===r||r!==o)&&!(""!=e.text&&0<e.getChildKeys().size)},isConnectedTree:function(t){var e=t.toArray().filter(function(e){return null==e.getParentKey()&&null==e.getPrevSiblingKey()});if(1!==e.length)return!1;for(var n=0,r=e.shift().getKey(),o=[];null!=r;){var i=t.get(r),a=i.getChildKeys(),s=i.getNextSiblingKey();if(0<a.size){null!=s&&o.unshift(s);s=a.map(function(e){return t.get(e)}).find(function(e){return null==e.getPrevSiblingKey()});if(null==s)return!1;r=s.getKey()}else r=null!=i.getNextSiblingKey()?i.getNextSiblingKey():o.shift();n++}return n===t.size},isValidTree:function(t){var n=this;return!!t.toArray().every(function(e){return n.isValidBlock(e,t)})&&this.isConnectedTree(t)}}},function(e,t,n){"use strict";var r=n(12),o=n(6).List;e.exports=function(e,n){return e=e.map(function(e,t){t=n[t];return r.create({style:e,entity:t})}),o(e)}},function(e,t,n){"use strict";var a=n(21).substr;e.exports=function(o,e){var i=Array(o.length).fill(null);return e&&e.forEach(function(e){for(var t=a(o,0,e.offset).length,n=t+a(o,e.offset,e.length).length,r=t;r<n;r++)i[r]=e.key}),i}},function(e,t,n){"use strict";var r=n(21),n=n(6).OrderedSet,i=r.substr,a=n();e.exports=function(r,e){var o=Array(r.length).fill(a);return e&&e.forEach(function(e){for(var t=i(r,0,e.offset).length,n=t+i(r,e.offset,e.length).length;t<n;)o[t]=o[t].add(e.style),t++}),o}},function(e,t,n){"use strict";var i=n(198);e.exports=function(e){if(!(e=e.getSelection()).rangeCount)return null;var e=e.getRangeAt(0),t=(e=i(e)).top,n=e.right,r=e.bottom,o=e.left;return 0===t&&0===n&&0===r&&0===o?null:e}},function(e,t,n){"use strict";var c=n(81);e.exports=function(e){var t=c(e),n=0,r=0,o=0,i=0;if(t.length){i=1<t.length&&0===t[0].width?(n=(e=t[1]).top,r=e.right,o=e.bottom,e.left):(n=(e=t[0]).top,r=e.right,o=e.bottom,e.left);for(var a=1;a<t.length;a++){var s=t[a];0!==s.height&&0!==s.width&&(n=Math.min(n,s.top),r=Math.max(r,s.right),o=Math.max(o,s.bottom),i=Math.min(i,s.left))}}return{top:n,right:r,bottom:o,left:i,width:r-i,height:o-n}}},function(e,t,n){"use strict";var a=n(200);function r(){}function o(){}o.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,o,i){if(i!==a)throw i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"),i.name="Invariant Violation",i}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,r){"use strict";e.exports=function(e){var t={},n=(t.src_Any=r(205).source,t.src_Cc=r(206).source,t.src_Z=r(207).source,t.src_P=r(208).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|"),"[><|]");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e};function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var n=n(216),i=(n=n)&&n.__esModule?n:{default:n};function a(e){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this.content=e.content||[],this.start=void 0!==e.start?e.start:null,this.end=void 0!==e.end?e.end:null,this.entity=void 0!==e.entity?e.entity:null,this.decorator=void 0!==e.decorator?e.decorator:null,this.decoratorProps=e.decoratorProps||null,this.decoratedText=void 0!==e.decoratedText?e.decoratedText:null,this.contentState=e.contentState,this.style=e.style||null,this.styles=e.styles||null,this.block=e.block||{}}r(a,[{key:"getCurrentContent",value:function(){return this.content[this.content.length-1]}},{key:"addToCurrentContent",value:function(e){this.content[this.content.length-1]=this.content[this.content.length-1]+e}},{key:"handleFlatPush",value:function(e,t){var n=this.getCurrentContent();n instanceof a&&(0,i.default)(t,n.styles)?n.addToCurrentContent(e):(n=new a({styles:[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t)),content:[e]}),this.content.push(n))}},{key:"pushContent",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];if(!t||t.length<1)return"string"==typeof e&&"string"==typeof this.getCurrentContent()?this.addToCurrentContent(e):this.content.push(e),this;if(n)return this.handleFlatPush(e,t),this;t=t;var t=Array.isArray(t)?t:Array.from(t),r=t[0],t=t.slice(1),o=this.getCurrentContent();return o instanceof a&&o.style===r?o.pushContent(e,t,n):((o=new a({style:r})).pushContent(e,t,n),this.content.push(o)),this}}]),t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(o,i){return function(e,t,n){r=i;var r,t=t.map(function(e){return r[e]}).reduce(function(e,t){var n,r={};return void 0!==t&&t[n="text-decoration"in t?"text-decoration":"textDecoration"]!==e[n]&&(r[n]=[e[n],t[n]].join(" ").trim()),Object.assign(e,t,r)},{});return o(Object.assign({},{children:e},n,{style:t}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.render=t.renderNode=void 0;var m=r(n(89)),s=r(n(219)),v=r(n(220)),b=r(n(221)),_=r(n(222)),f=r(n(223)),w=r(n(224)),c=r(n(225));function r(e){return e&&e.__esModule?e:{default:e}}function u(e){function t(e){var t=i-e;for(o.length<t&&(t=o.length);0<t;--t){var n=r;(r=o.pop())[r.length-1].children=n}}var r=[],o=[],i=0;return e.forEach(function(e){i<e.depth?(o.push(r),r=[]):i>e.depth&&t(e.depth),i=e.depth,r.push(Object.assign({},e))}),0!==i&&t(0),r}function S(e,t,n,r,o){var i=r.prevType,a=r.prevDepth,s=r.prevKeys,r=r.prevData;if(0!==e.length)(i=t[i]||t[o.blockFallback])?(t={depth:a,keys:s},r&&r.some(function(e){return!!e})&&(t.data=r),n.push(i(e,t))):n.push(e)}function E(e){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},a=arguments[4],s=5<arguments.length&&void 0!==arguments[5]?arguments[5]:{},c=Object.assign({},w.default,6<arguments.length&&void 0!==arguments[6]?arguments[6]:{}),u=[],l=[],f=null,p=0,d=[],h=[],y=!1,g=new m.default({flat:!!a});return e.forEach(function(e){var t,n;(0,v.default)(e,f,c)?!0===c.cleanup.split&&(y=!0):(t=g.parse(e),t=C(t,r,i,a,s,c,(0,b.default)()),(f&&f!==e.type||y)&&(S(l,o,u,{prevType:f,prevDepth:p,prevKeys:d,prevData:h},c),h=[],d=[],y=!(l=[])),e.children&&(n=E(e.children,r,o,i,a,s,c),t.push(n)),l.push(t),f=e.type,p=e.depth,d.push(e.key),h.push(e.data))}),S(l,o,u,{prevType:f,prevDepth:p,prevKeys:d,prevData:h},c),(0,_.default)(u,c)}var C=t.renderNode=function t(e,n,r,o,i,a,s){if(e.styles&&o)return o((0,_.default)(e.content,a),e.styles,{key:s()});var c=[],u=0;if(e.content.forEach(function(e){"string"==typeof e?c=(0,f.default)(e,c,u):(c[u+=1]=t(e,n,r,o,i,a,s),u+=1)}),e.style&&n[e.style])return n[e.style]((0,_.default)(c,a),{key:s()});if(null!==e.entity){var l=i[e.entity];if(l&&r[l.type])return r[l.type]((0,_.default)(c,a),l.data,{key:e.entity})}return null!==e.decorator?(l=[e.block.key,e.start,0].join("."),e.decorator(Object.assign({children:(0,_.default)(c,a),decoratedText:e.decoratedText,contentState:e.contentState,entityKey:e.entity,offsetKey:l,key:l},e.decoratorProps))):c};t.render=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(!e||!Array.isArray(e.blocks))return(0,s.default)("invalid raw object"),null;if(!e.blocks.length)return null;var r=t.inline,o=t.blocks,i=t.entities,a=t.styles,t=t.decorators,t=t?(0,c.default)(e,t,n):e.blocks,t=u(t);return E(t,r,o,i,a,e.entityMap,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e,t){return!!(t.trim?e.trim():e)};t.default=function(e,t,n){var r,n=n.cleanup;return!(!n||o((r=e).text,n)||r.data&&Object.keys(r.data).length||r.entityRanges&&r.entityRanges.length)&&((!n.after||"all"===n.after||-1!==n.after.indexOf(t))&&(!(!n.except||-1!==n.except.indexOf(e.type))||!(!n.types||"all"!==n.types&&-1===n.types.indexOf(e.type))))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){var t=0;return function(){var e=t;return t+=1,e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){return Array.isArray(e)&&t.joinOutput?e.join(""):e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t,n){var r=t;return t[n]?r[n]+=e:r[n]=e,r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={joinOutput:!1,cleanup:{after:["atomic"],types:["unstyled"],trim:!1,split:!0},blockFallback:"unstyled"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(90)),r=a(n(91)),i=a(n(226)),f=a(n(227));function a(e){return e&&e.__esModule?e:{default:e}}function s(e){return"function"==typeof e.getDecorations&&"function"==typeof e.getComponentForKey&&"function"==typeof e.getPropsForKey}var p=function(e,r){return e.forEach(function(e){var t=r.text.substring(0,e.offset),n=r.text.substring(e.offset,e.offset+e.length);e.offset=o.default.ucs2.decode(t).length,e.length=o.default.ucs2.decode(n).length}),e},d=function(e){var t=new r.default(e.filter(function(e){return!s(e)})),e=e.filter(s),e=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(e),[t]);return new i.default(e)};t.default=function(e,c,u){var l=u.convertFromRaw&&u.convertFromRaw(e);return e.blocks.map(function(e){return e=e,t=c,r=l,n=(n=u||{}).createContentBlock,o=[],i=d(t),t=(n||f.default)(e),a=i.getDecorations(t,r),s=0,a.forEach(function(e,t){var n;e?(n=a[t=t+1])&&n===e||(o.push({offset:s,length:t-s,component:i.getComponentForKey(e),decoratorProps:i.getPropsForKey(e)||{},contentState:r}),s=t):s+=1}),Object.assign({},e,{decoratorRanges:p(o,e)});var t,r,n,o,i,a,s})}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});function o(e){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");this.decorators=e}(function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)})(o,[{key:"getDecorations",value:function(t,r){var o=new Array(t.getText().length).fill(null);return this.decorators.forEach(function(e,n){e.getDecorations(t,r).forEach(function(e,t){e&&(o[t]=n+"-"+e)})}),o}},{key:"getComponentForKey",value:function(e){return this.getDecoratorForKey(e).getComponentForKey(o.getInnerKey(e))}},{key:"getPropsForKey",value:function(e){return this.getDecoratorForKey(e).getPropsForKey(o.getInnerKey(e))}},{key:"getDecoratorForKey",value:function(e){e=e.split("-"),e=Number(e[0]);return this.decorators[e]}}],[{key:"getInnerKey",value:function(e){return e.split("-").slice(1).join("-")}}]),t.default=o},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});(function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)})(i,[{key:"get",value:function(e){return this[e]}},{key:"getText",value:function(){return this.text}},{key:"getType",value:function(){return this.type}},{key:"getKey",value:function(){return this.key}},{key:"getLength",value:function(){return this.text.length}},{key:"getDepth",value:function(){return this.depth}},{key:"getData",value:function(){return this.data}}]);var o=i;function i(e){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");Object.assign(this,e)}t.default=function(e){return new o(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e,t){e=e.keys;return t||(e?e.join(","):void 0)},u=function(r,o){return function(e,t,n){t=Object.assign({},t),n=i(t,n);return delete t.depth,delete t.keys,o.apply(void 0,[r,Object.assign({},t,{key:n})].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(e)))}};t.default=function(c,t){var n={};return Object.keys(t).forEach(function(e){var s=t[e];s.wrapper?n[e]=function(e,t,n){return r=c,o=s,t=(e={children:e,props:t,key:n}).children,i=e.props,e=e.key,n=u(o.wrapper,r),a=u(o.element,r,!0),n(t.map(function(e,t){return a(e,{depth:i.depth},i.keys&&i.keys[t])}),i,e);var r,o,i,a}:n[e]=u(s.element,c)}),n}},function(R,L,e){"use strict";
|
|
50
50
|
/** @license React v16.14.0
|
|
51
51
|
* react-dom-server.browser.production.min.js
|
|
52
52
|
*
|
|
@@ -54,4 +54,4 @@ object-assign
|
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the MIT license found in the
|
|
56
56
|
* LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/var S=e(17),E=e(0);function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var e="function"==typeof Symbol&&Symbol.for,s=e?Symbol.for("react.portal"):60106,c=e?Symbol.for("react.fragment"):60107,u=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,d=e?Symbol.for("react.provider"):60109,f=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.concurrent_mode"):60111,y=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,_=e?Symbol.for("react.lazy"):60116,a=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.scope"):60119;function k(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case c:return"Fragment";case s:return"Portal";case l:return"Profiler";case u:return"StrictMode";case m:return"Suspense";case v:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case f:return"Context.Consumer";case d:return"Context.Provider";case y:var t=(t=e.render).displayName||t.name||"";return e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case b:return k(e.type);case a:return k(e.render);case _:if(e=1===e._status?e._result:null)return k(e)}return null}var e=E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,D=(e.hasOwnProperty("ReactCurrentDispatcher")||(e.ReactCurrentDispatcher={current:null}),e.hasOwnProperty("ReactCurrentBatchConfig")||(e.ReactCurrentBatchConfig={suspense:null}),{});function T(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var p=new Uint16Array(16),j=0;j<15;j++)p[j]=j+1;p[15]=0;var I=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,M=Object.prototype.hasOwnProperty,N={},A={};function P(e){return M.call(A,e)||!M.call(N,e)&&(I.test(e)?A[e]=!0:void(N[e]=!0))}function R(e,t,n,r){if(null==t||function(e,t,n,r){if(null===n||0!==n.type)switch(typeof t){case"function":case"symbol":return 1;case"boolean":return r?void 0:null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e;default:return}}(e,t,n,r))return 1;if(!r&&null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||t<1}}function n(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var O={},L=("children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){O[e]=new n(e,0,!1,e,null,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];O[t]=new n(t,1,!1,e[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){O[e]=new n(e,2,!1,e.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){O[e]=new n(e,2,!1,e,null,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){O[e]=new n(e,3,!1,e.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(e){O[e]=new n(e,3,!0,e,null,!1)}),["capture","download"].forEach(function(e){O[e]=new n(e,4,!1,e,null,!1)}),["cols","rows","size","span"].forEach(function(e){O[e]=new n(e,6,!1,e,null,!1)}),["rowSpan","start"].forEach(function(e){O[e]=new n(e,5,!1,e.toLowerCase(),null,!1)}),/[\-:]([a-z])/g);function F(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(L,F);O[t]=new n(t,1,!1,e,null,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(L,F);O[t]=new n(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(L,F);O[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(e){O[e]=new n(e,1,!1,e.toLowerCase(),null,!1)}),O.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(e){O[e]=new n(e,1,!1,e.toLowerCase(),null,!0)});var B=/["'&<>]/;function z(e){if("boolean"==typeof e||"number"==typeof e)return""+e;var t=B.exec(e=""+e);if(t){for(var n="",r=0,o=t.index;o<e.length;o++){switch(e.charCodeAt(o)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}r!==o&&(n+=e.substring(r,o)),r=o+1,n+=t}e=r!==o?n+e.substring(r,o):n}return e}var K="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},g=null,H=null,i=null,U=!1,q=!1,o=null,W=0;function V(){if(null===g)throw Error(C(321));return g}function G(){if(0<W)throw Error(C(312));return{memoizedState:null,queue:null,next:null}}function Y(){return null===i?null===H?(U=!1,H=i=G()):(U=!0,i=H):i=null===i.next?(U=!1,i.next=G()):(U=!0,i.next),i}function $(e,t,n,r){for(;q;)q=!1,W+=1,i=null,n=e(t,r);return H=g=null,W=0,i=o=null,n}function Z(e,t){return"function"==typeof t?t(e):t}function J(e,t,n){if(g=V(),i=Y(),U){var r=i.queue;if(t=r.dispatch,null===o||void 0===(n=o.get(r)))return[i.memoizedState,t];for(o.delete(r),r=i.memoizedState;r=e(r,n.action),null!==(n=n.next););return[i.memoizedState=r,t]}return e=e===Z?"function"==typeof t?t():t:void 0!==n?n(t):t,i.memoizedState=e,e=(e=i.queue={last:null,dispatch:null}).dispatch=function(e,t,n){if(!(W<25))throw Error(C(301));if(e===g)if(q=!0,e={action:n,next:null},null===o&&(o=new Map),void 0===(n=o.get(t)))o.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}.bind(null,g,e),[i.memoizedState,e]}function X(){}var Q=0,ee={readContext:function(e){var t=Q;return T(e,t),e[t]},useContext:function(e){V();var t=Q;return T(e,t),e[t]},useMemo:function(e,t){if(g=V(),t=void 0===t?null:t,null!==(i=Y())){var n=i.memoizedState;if(null!==n&&null!==t){e:{var r=n[1];if(null===r)r=!1;else{for(var o=0;o<r.length&&o<t.length;o++)if(!K(t[o],r[o])){r=!1;break e}r=!0}}if(r)return n[0]}}return e=e(),i.memoizedState=[e,t],e},useReducer:J,useRef:function(e){g=V();var t=(i=Y()).memoizedState;return null===t?i.memoizedState=e={current:e}:t},useState:function(e){return J(Z,e)},useLayoutEffect:function(){},useCallback:function(e){return e},useImperativeHandle:X,useEffect:X,useDebugValue:X,useResponder:function(e,t){return{props:t,responder:e}},useDeferredValue:function(e){return V(),e},useTransition:function(){return V(),[function(e){e()},!1]}},te="http://www.w3.org/1999/xhtml";function ne(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var re={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},oe=S({menuitem:!0},re),ie={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ae=["Webkit","ms","Moz","O"],se=(Object.keys(ie).forEach(function(t){ae.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ie[e]=ie[t]})}),/([A-Z])/g),ce=/^ms-/,ue=E.Children.toArray,le=e.ReactCurrentDispatcher,fe={listing:!0,pre:!0,textarea:!0},pe=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,de={},he={};var ye=Object.prototype.hasOwnProperty,ge={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function me(e,t){if(void 0===e)throw Error(C(152,k(t)||"Component"))}function ve(d,h,y){function e(e,t){var n=t.prototype&&t.prototype.isReactComponent,r=function(e,t,n,r){if(r&&("object"==typeof(r=e.contextType)&&null!==r))return T(r,n),r[n];if(e=e.contextTypes){for(var o in n={},e)n[o]=t[o];t=n}else t=D;return t}(t,h,y,n),o=[],l=!1,i={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===o)return null},enqueueReplaceState:function(e,t){l=!0,o=[t]},enqueueSetState:function(e,t){if(null===o)return null;o.push(t)}};if(n){n=new t(e.props,r,i);"function"==typeof t.getDerivedStateFromProps&&null!=(s=t.getDerivedStateFromProps.call(null,e.props,n.state))&&(n.state=S({},n.state,s))}else if(g={},n=t(e.props,r,i),null==(n=$(t,e.props,n,r))||null==n.render)return void me(d=n,t);if(n.props=e.props,n.context=r,n.updater=i,void 0===(i=n.state)&&(n.state=i=null),"function"==typeof n.UNSAFE_componentWillMount||"function"==typeof n.componentWillMount)if("function"==typeof n.componentWillMount&&"function"!=typeof t.getDerivedStateFromProps&&n.componentWillMount(),"function"==typeof n.UNSAFE_componentWillMount&&"function"!=typeof t.getDerivedStateFromProps&&n.UNSAFE_componentWillMount(),o.length){var i=o,a=l,o=null,l=!1;if(a&&1===i.length)n.state=i[0];else{for(var s=a?i[0]:n.state,f=!0,a=a?1:0;a<i.length;a++){var c=i[a];null!=(c="function"==typeof c?c.call(n,s,e.props,r):c)&&(f?(f=!1,s=S({},s,c)):S(s,c))}n.state=s}}else o=null;if(me(d=n.render(),t),"function"==typeof n.getChildContext&&"object"==typeof(e=t.childContextTypes)){var u,p=n.getChildContext();for(u in p)if(!(u in e))throw Error(C(108,k(t)||"Unknown",u))}p&&(h=S({},h,p))}for(;E.isValidElement(d);){var t=d,n=t.type;if("function"!=typeof n)break;e(t,n)}return{child:d,context:h}}(e=_e.prototype).destroy=function(){var e;this.exhausted||(this.exhausted=!0,this.clearProviders(),e=this.threadID,p[e]=p[0],p[0]=e)},e.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,r=this.threadID,o=(T(n,r),n[r]);this.contextStack[t]=n,this.contextValueStack[t]=o,n[r]=e.props.value},e.popProvider=function(){var e=this.contextIndex,t=this.contextStack[e],n=this.contextValueStack[e];this.contextStack[e]=null,this.contextValueStack[e]=null,this.contextIndex--,t[this.threadID]=n},e.clearProviders=function(){for(var e=this.contextIndex;0<=e;e--)this.contextStack[e][this.threadID]=this.contextValueStack[e]},e.read=function(e){if(this.exhausted)return null;var t=Q,n=(Q=this.threadID,le.current);le.current=ee;try{for(var r=[""],o=!1;r[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var i=this.threadID;p[i]=p[0],p[0]=i;break}var a=this.stack[this.stack.length-1];if(o||a.childIndex>=a.children.length){var s=a.footer;if(""!==s&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===a.type)this.currentSelectValue=null;else if(null!=a.type&&null!=a.type.type&&a.type.type.$$typeof===d)this.popProvider(a.type);else if(a.type===m){this.suspenseDepth--;var l=r.pop();if(o){var o=!1,c=a.fallbackFrame;if(!c)throw Error(C(303));this.stack.push(c),r[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}r[this.suspenseDepth]+=l}r[this.suspenseDepth]+=s}else{var f=a.children[a.childIndex++],u="";try{u+=this.render(f,a.context,a.domNamespace)}catch(e){if(null!=e&&"function"==typeof e.then)throw Error(C(294));throw e}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=u}}return r[0]}finally{le.current=n,Q=t}},e.render=function(e,t,n){if("string"==typeof e||"number"==typeof e)return""===(n=""+e)?"":this.makeStaticMarkup?z(n):this.previousWasTextNode?"\x3c!-- --\x3e"+z(n):(this.previousWasTextNode=!0,z(n));if(e=(t=ve(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!E.isValidElement(e)){if(null==e||null==e.$$typeof)return e=ue(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";if((n=e.$$typeof)===s)throw Error(C(257));throw Error(C(258,n.toString()))}var r,o=e.type;if("string"==typeof o)return this.renderDOM(e,t,n);switch(o){case u:case h:case l:case v:case c:return e=ue(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case m:throw Error(C(294))}if("object"==typeof o&&null!==o)switch(o.$$typeof){case y:g={};var i=o.render(e.props,e.ref),i=$(o.render,e.props,i,e.ref);return i=ue(i),this.stack.push({type:null,domNamespace:n,children:i,childIndex:0,context:t,footer:""}),"";case b:return e=[E.createElement(o.type,S({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case d:return n={type:e,domNamespace:n,children:o=ue(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case f:o=e.type,i=e.props;var a=this.threadID;return T(o,a),o=ue(i.children(o[a])),this.stack.push({type:e,domNamespace:n,children:o,childIndex:0,context:t,footer:""}),"";case w:throw Error(C(338));case _:switch(o=e.type,-1===(r=o)._status&&(r._status=0,i=(i=r._ctor)(),(r._result=i).then(function(e){0===r._status&&(e=e.default,r._status=1,r._result=e)},function(e){0===r._status&&(r._status=2,r._result=e)})),o._status){case 1:return e=[E.createElement(o._result,S({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case 2:throw o._result;default:throw Error(C(295))}case x:throw Error(C(343))}throw Error(C(130,null==o?o:typeof o,""))},e.renderDOM=function(l,f,p){var e=l.type.toLowerCase();if(p===te&&ne(e),!de.hasOwnProperty(e)){if(!pe.test(e))throw Error(C(65,e));de[e]=!0}var t,d,h,n,r=l.props;if("input"===e)r=S({type:void 0},r,{defaultChecked:void 0,defaultValue:void 0,value:null!=r.value?r.value:r.defaultValue,checked:null!=r.checked?r.checked:r.defaultChecked});else if("textarea"===e){if(null==(o=r.value)){var o=r.defaultValue,i=r.children;if(null!=i){if(null!=o)throw Error(C(92));if(Array.isArray(i)){if(!(i.length<=1))throw Error(C(93));i=i[0]}o=""+i}null==o&&(o="")}r=S({},r,{value:void 0,children:""+o})}else if("select"===e)this.currentSelectValue=null!=r.value?r.value:r.defaultValue,r=S({},r,{value:void 0});else if("option"===e){var i=this.currentSelectValue,y=function(e){if(null==e)return e;var t="";return E.Children.forEach(e,function(e){null!=e&&(t+=e)}),t}(r.children);if(null!=i){var g=null!=r.value?r.value+"":y;if(o=!1,Array.isArray(i)){for(var a=0;a<i.length;a++)if(""+i[a]===g){o=!0;break}}else o=""+i===g;r=S({selected:void 0,children:void 0},r,{selected:o,children:y})}}if(o=r){if(oe[e]&&(null!=o.children||null!=o.dangerouslySetInnerHTML))throw Error(C(137,e,""));if(null!=o.dangerouslySetInnerHTML){if(null!=o.children)throw Error(C(60));if(!("object"==typeof o.dangerouslySetInnerHTML&&"__html"in o.dangerouslySetInnerHTML))throw Error(C(61))}if(null!=o.style&&"object"!=typeof o.style)throw Error(C(62,""))}for(u in o=r,i=this.makeStaticMarkup,y=1===this.stack.length,g="<"+l.type,o)if(ye.call(o,u)){var m=o[u];if(null!=m){if("style"===u){var s,c,v,b,a=void 0,_="",w="";for(a in m)m.hasOwnProperty(a)&&(s=0===a.indexOf("--"),null!=(c=m[a])&&(_+=w+(b=s?a:(b=a,he.hasOwnProperty(b)?he[b]:(v=b.replace(se,"-$1").toLowerCase().replace(ce,"-ms-"),he[b]=v)))+":",w=a,_+=s=null==c||"boolean"==typeof c||""===c?"":s||"number"!=typeof c||0===c||ie.hasOwnProperty(w)&&ie[w]?(""+c).trim():c+"px",w=";"));m=_||null}a=null;e:if(s=e,c=o,-1===s.indexOf("-"))s="string"==typeof c.is;else switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":s=!1;break e;default:s=!0}s?ge.hasOwnProperty(u)||(a=P(a=u)&&null!=m?a+'="'+z(m)+'"':""):(t=u,d=m,n=h=void 0,n=O.hasOwnProperty(t)?O[t]:null,a=(h=(h="style"!==t)?null!==n?0===n.type:2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1]):h)||R(t,d,n,!1)?"":null!==n?(t=n.attributeName,3===(h=n.type)||4===h&&!0===d?t+'=""':t+'="'+z(d=n.sanitizeURL?""+d:d)+'"'):P(t)?t+'="'+z(d)+'"':""),a&&(g+=" "+a)}}i||y&&(g+=' data-reactroot=""');var u=g;o="",re.hasOwnProperty(e)?u+="/>":(u+=">",o="</"+l.type+">");e:{if(null!=(i=r.dangerouslySetInnerHTML)){if(null!=i.__html){i=i.__html;break e}}else if("string"==typeof(i=r.children)||"number"==typeof i){i=z(i);break e}i=null}return null!=i?(r=[],fe.hasOwnProperty(e)&&"\n"===i.charAt(0)&&(u+="\n"),u+=i):r=ue(r.children),l=l.type,p=null==p||"http://www.w3.org/1999/xhtml"===p?ne(l):"http://www.w3.org/2000/svg"===p&&"foreignObject"===l?"http://www.w3.org/1999/xhtml":p,this.stack.push({domNamespace:p,type:e,children:r,childIndex:0,context:f,footer:o}),this.previousWasTextNode=!1,u};var be=_e,e={renderToString:function(e){e=new be(e,!1);try{return e.read(1/0)}finally{e.destroy()}},renderToStaticMarkup:function(e){e=new be(e,!0);try{return e.read(1/0)}finally{e.destroy()}},renderToNodeStream:function(){throw Error(C(207))},renderToStaticNodeStream:function(){throw Error(C(208))},version:"16.14.0"};function _e(e,t){if(e=E.isValidElement(e)?e.type!==c?[e]:(e=e.props.children,E.isValidElement(e)?[e]:ue(e)):ue(e),e={type:null,domNamespace:te,children:e,childIndex:0,context:D,footer:""},0===(n=p[0])){var n,r=p,o=2*(n=r.length);if(!(o<=65536))throw Error(C(304));var i=new Uint16Array(o);for(i.set(r),(p=i)[0]=n+1,r=n;r<o-1;r++)p[r]=r+1;p[o-1]=0}else p[0]=p[n];this.threadID=n,this.stack=[e],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=t,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}t.exports=e.default||e},function(e){e.exports=JSON.parse('{"name":"@innovaccer/rich-text-editor","version":"2.0.0","description":"A rich text on top of DraftJS.","main":"dist/rich-text-editor.js","module":"dist/rich-text-editor.js","author":"Innovaccer","devDependencies":{"@babel/core":"^7.7.4","@babel/plugin-proposal-class-properties":"^7.12.1","@babel/preset-env":"^7.7.4","@babel/preset-react":"^7.7.4","@babel/register":"^7.7.4","@innovaccer/design-system":"^2.7.0-0","@storybook/addon-docs":"^6.1.6","@storybook/addon-essentials":"^6.1.5","@storybook/react":"^6.1.5","@storybook/storybook-deployer":"^2.8.7","autoprefixer":"^9.7.3","babel-eslint":"^10.0.3","babel-loader":"^8.0.6","babel-plugin-transform-flow-strip-types":"^6.22.0","chai":"^4.2.0","cross-env":"^6.0.3","css-loader":"^3.2.1","draftjs-to-markdown":"^0.6.0","embed-video":"^2.0.4","enzyme":"^3.10.0","enzyme-adapter-react-16":"^1.15.1","eslint":"^6.7.2","eslint-config-airbnb":"^18.0.1","eslint-plugin-import":"^2.18.2","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-mocha":"^6.2.2","eslint-plugin-react":"^7.17.0","file-loader":"^5.0.2","flow-bin":"^0.113.0","gulp":"^4.0.2","gulp-clean":"^0.4.0","gulp-concat":"^2.6.1","gulp-postcss":"^9.0.0","gulp-sourcemaps":"^3.0.0","install":"^0.13.0","jsdom":"^15.2.1","mini-css-extract-plugin":"^0.8.0","mocha":"^6.2.2","postcss-color-mod-function":"^3.0.3","postcss-loader":"^3.0.0","precss":"^4.0.0","prettier":"^2.5.1","react":"^16.12.0","react-addons-test-utils":"^15.6.2","react-dom":"^16.12.0","react-test-renderer":"^16.12.0","rimraf":"^3.0.0","sinon":"^7.5.0","style-loader":"^1.0.1","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^3.0.0","webpack":"^4.41.2","webpack-bundle-analyzer":"^3.6.0","webpack-cli":"^3.3.10","webpack-s3-plugin":"^1.2.0-rc.0"},"dependencies":{"classnames":"^2.2.6","draft-js":"^0.11.7","draftjs-to-html":"^0.9.0","draftjs-utils":"^0.10.2","html-to-draftjs":"^1.5.0","immutable":"^4.0.0-rc.12","linkify-it":"^2.2.0","prop-types":"^15.7.2","redraft":"^0.10.2"},"peerDependencies":{"@innovaccer/design-system":"^1.4.0-0","react":"0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x","react-dom":"0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x"},"scripts":{"build:css":"cp ./node_modules/@innovaccer/design-system/css/dist/* dist/","build-css":"gulp --gulpfile config/gulpfile.js build","clean":"rimraf dist && rimraf public","build:webpack":"cross-env NODE_ENV=production webpack --mode production --config config/webpack.config.js","build":"npm run clean && npm run build-css && npm run build:webpack","test":"cross-env BABEL_ENV=test mocha --require config/test-compiler.js config/test-setup.js src/**/*Test.js","lint":"eslint src","lintdocs":"eslint docs/src","flow":"flow; test $? -eq 0 -o $? -eq 2","check":"npm run lint && npm run flow","storybook":"start-storybook -p 6006","build-storybook":"build-storybook","deploy-storybook":"storybook-to-ghpages","version":"./scripts/version.sh","prettier":"prettier --write \\"**/*.{js,jsx,ts,tsx,json,css}\\""},"license":"MIT"}')},function(e,t,o){"use strict";o.r(t),o.d(t,"Editor",function(){return to}),o.d(t,"EditorPreview",function(){return Eo});var d=o(0),g=o.n(d),t=o(1),h=o.n(t),y=o(2),m=o(4),t=o(39),s=o.n(t),t=o(92),n=o.n(t),c=o(24),t=o(5),v=o.n(t);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var l=i(function e(){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(t){n.callBacks.forEach(function(e){e(t)})},this.init=function(e){e=document.getElementById(e);e&&e.addEventListener("click",function(){n.editorFlag=!0}),document&&(document.addEventListener("click",function(){n.editorFlag?n.editorFlag=!1:(n.closeAllModals(),n.suggestionCallback&&n.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&n.closeAllModals()}))},this.onEditorClick=function(){n.closeModals(),!n.suggestionFlag&&n.suggestionCallback?n.suggestionCallback():n.suggestionFlag=!1},this.closeModals=function(e){n.closeAllModals(e)},this.registerCallBack=function(e){n.callBacks.push(e)},this.deregisterCallBack=function(t){n.callBacks=n.callBacks.filter(function(e){return e!==t})},this.setSuggestionCallback=function(e){n.suggestionCallback=e},this.removeSuggestionCallback=function(){n.suggestionCallback=void 0},this.onSuggestionClick=function(){n.suggestionFlag=!0}});function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var p,w=f(function e(){var t=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused)&&!(t.editorFocused=!1):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}}),S=[],E={onKeyDown:function(t){S.forEach(function(e){e(t)})},registerCallBack:function(e){S.push(e)},deregisterCallBack:function(t){S=S.filter(function(e){return e!==t})}},C=function(){p=!0},O=function(){p=!1},x=function(){return p};function k(e){e=e.getData()&&e.getData().get("text-align");return e?"rdw-".concat(e,"-aligned-block"):""}function D(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function T(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function j(e){e.stopPropagation()}function I(e,t,n){return e&&e.filter(function(e){return!t||0===t.length||(n?0<=e.value.indexOf(t):0<=e.value.toLowerCase().indexOf(t&&t.toLowerCase()))})}function M(e){return e[e.options[0]].icon}function N(e,n){if(e&&void 0===n)return e;var r={};return D(e,function(e,t){"[object Object]"===Object.prototype.toString.call(t)?r[e]=N(t,n[e]):r[e]=void 0!==n[e]?n[e]:t}),r}function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L(e,t){return(L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=B(n),t=(e=r?(e=B(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===A(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&L(t,e);var n,a=F(s);function s(){var i,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(i=a.call.apply(a,[this].concat(r))).onClick=function(){var e=i.props,t=e.disabled,n=e.onClick,e=e.value;t||n(e)},i.handleKeyDown=function(e){var t=new Set(["Enter","Space","Spacebar"," "]),n=i.props,r=n.disabled,o=n.onClick,n=n.value;r||t.has(e.key)&&(e.preventDefault(),o(n,e))},i}return t=s,(e=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,o=t.activeClassName,i=t.active,a=t.disabled,t=t["aria-label"],o=v()((P(e={},"Editor-option",!0),P(e,"Editor-option--active",i&&!o),P(e,"".concat(o),i&&o),P(e,"Editor-option--disabled",a),e),r);return g.a.createElement("div",{"aria-label":t,onKeyDown:this.handleKeyDown,tabIndex:0,className:o,onClick:this.onClick,"aria-selected":i},n)}}])&&R(t.prototype,e),n&&R(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component),b=(u.propTypes={onClick:h.a.func.isRequired,children:h.a.any,value:h.a.string,className:h.a.string,activeClassName:h.a.string,active:h.a.bool,disabled:h.a.bool,title:h.a.string,tabIndex:h.a.number},u.defaultProps={activeClassName:""},o(3));function z(e){return(z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function U(e,t){return(U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function q(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=W(n),t=(e=r?(e=W(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===z(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function W(e){return(W=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var V=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&U(t,e);var n,r=q(o);function o(e){var i;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");return(i=r.call(this,e)).buttonRef=null,i.listRef=null,i.handleOutsideClick=function(e){i.listRef.current&&!i.listRef.current.contains(e.target)&&i.toggleExpansion()},i.onChange=function(e){var t=i.props.onChange;t&&t(e),i.toggleExpansion()},i.setHighlighted=function(e){i.setState({highlighted:e})},i.focusTrigger=function(){var e;null!==(e=i.buttonRef.current)&&void 0!==e&&e.focus()},i.focusTriggerOnClose=function(e){"Escape"!==e.key&&"Enter"!==e.key||(i.toggleExpansion(),i.focusTrigger())},i.toggleExpansion=function(){var e=i.props,t=e.doExpand,n=e.doCollapse;(e.expanded?n:t)()},i.handleExpand=function(e){i.props.onExpandEvent(e)},i.handleListKeyDown=function(e){e.preventDefault();var t,n=i.state.highlighted,r=i.props.children[1],o=e.key;"ArrowDown"===o||"ArrowUp"===o?(t=r.length-1,i.setState(function(e){return{highlighted:"ArrowDown"===o?Math.min(e.highlighted+1,t):Math.max(e.highlighted-1,0)}})):"Enter"===o&&(e=r[n].props.value,(r=i.props.onChange)&&r(e))},i.buttonRef=g.a.createRef(),i.listRef=g.a.createRef(),i.state={highlighted:-1},i}return t=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&(this.setState({highlighted:-1}),document.removeEventListener("keydown",this.focusTriggerOnClose),document.removeEventListener("click",this.handleOutsideClick)),!e.expanded&&t&&(document.addEventListener("keydown",this.focusTriggerOnClose),document.addEventListener("click",this.handleOutsideClick),this.setState({highlighted:0}),this.listRef.current.focus())}},{key:"render",value:function(){var n=this,e=this.props,t=e.expanded,r=e.children,o=e.className,i=e.optionWrapperClassName,a=e.triggerClassName,s=e.ariaLabel,e=(e.onExpandEvent,e.menu),c=this.state.highlighted,l=r.slice(1,r.length),u=v()((K(u={},"Editor-dropdown",!0),K(u,"Editor-dropdown--expanded",t),u),o);return g.a.createElement("div",{className:u},g.a.createElement(b.a,{ref:this.buttonRef,appearance:"transparent","aria-expanded":t,"aria-label":s||"Editor-dropdown",className:a,onClick:this.handleExpand},r[0],!e&&g.a.createElement(b.f,{name:"keyboard_arrow_down"})),t&&g.a.createElement("ul",{tabIndex:1,ref:this.listRef,onKeyDown:this.handleListKeyDown,className:v()("Editor-dropdown-optionWrapper",i),onClick:j},g.a.Children.map(l,function(e,t){return e&&g.a.cloneElement(e,{onSelect:n.onChange,highlighted:c===t,setHighlighted:n.setHighlighted,highlightedClassName:"Editor-dropdown-option--highlight",index:t})})))}}])&&H(t.prototype,e),n&&H(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component);function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=X(n),t=(e=r?(e=X(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===G(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function X(e){return(X=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}V.propTypes={children:h.a.any,onChange:h.a.func,className:h.a.string,expanded:h.a.bool,menu:h.a.bool,doExpand:h.a.func,doCollapse:h.a.func,onExpandEvent:h.a.func,optionWrapperClassName:h.a.string,triggerClassName:h.a.string,ariaLabel:h.a.string,title:h.a.string};var _=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Z(t,e);var n,a=J(s);function s(){var i,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(i=a.call.apply(a,[this].concat(r))).onClick=function(e){var t=i.props,n=t.onSelect,r=t.onClick,o=t.value;t.disabled||(n&&n(o),r&&(e.stopPropagation(),r(o)))},i.setHighlighted=function(){i.props.setHighlighted(i.props.index)},i.resetHighlighted=function(){(0,i.props.setHighlighted)(-1)},i}return t=s,(e=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,o=t.disabled,i=t.highlighted,a=t.className,s=t.isCheckbox,c=t.activeClassName,u=t.disabledClassName,t=t.highlightedClassName,c=v()((Y(e={},"Editor-dropdown-option",!0),Y(e,"Editor-dropdown-option--active ".concat(c),r&&!s),Y(e,"".concat(t),i),Y(e,"".concat(u),o),e),a);return g.a.createElement("li",{tabIndex:1,className:c,onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick},n)}}])&&$(t.prototype,e),n&&$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component);function Q(e){return(Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ne(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=re(n),t=(e=r?(e=re(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Q(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function re(e){return(re=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}_.propTypes={children:h.a.any,value:h.a.any,onClick:h.a.func,onSelect:h.a.func,setHighlighted:h.a.func,index:h.a.number,disabled:h.a.bool,active:h.a.bool,highlighted:h.a.bool,className:h.a.string,activeClassName:h.a.string,disabledClassName:h.a.string,highlightedClassName:h.a.string,title:h.a.string,isCheckbox:h.a.bool},_.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""};var oe=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&te(t,e);var n,r=ne(o);function o(){var e=this,t=o;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");return r.apply(this,arguments)}return t=o,(e=[{key:"renderInDropdown",value:function(){var e=this.props,i=e.config,t=e.expanded,n=e.doExpand,r=e.onExpandEvent,o=e.doCollapse,a=e.currentState,e=e.onChange,s=i.options.length-i.max;return g.a.createElement(V,{onChange:e,expanded:t,doExpand:n,doCollapse:o,onExpandEvent:r,triggerClassName:"Editor-textDecoration-moreIcon",menu:!0},g.a.createElement(b.f,{name:"more_horizon",size:20}),i.options.slice(i.max,i.options.length).map(function(e,t){var n=!0===a[e]||"MONOSPACE"===e&&a.CODE,r=i[e],o=r.icon,r=(r.title,r.label);return g.a.createElement(_,{key:t,value:e,active:n,isCheckbox:1<s},1<s?g.a.createElement(b.b,{checked:n,label:r}):g.a.createElement(g.a.Fragment,null,g.a.createElement(b.f,{size:20,name:o,className:"mr-4",appearance:n?"white":"default"}),g.a.createElement(b.m,{appearance:n?"white":"default"},r)))}))}},{key:"render",value:function(){var e,t,n=this.props,i=n.config,a=n.currentState,s=n.onChange,n=n.className,r=i.options.length-i.max,o=i.max,c=v()((t=!0,(c="Editor-textDecoration")in(e={})?Object.defineProperty(e,c,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[c]=t,e),n);return g.a.createElement("div",{className:c},i.options.slice(0,o).map(function(e,t){var n=!0===a[e]||"MONOSPACE"===e&&a.CODE,r=i[e],o=r.title,r=r.icon;return g.a.createElement(b.n,{tooltip:o},g.a.createElement(u,{"aria-label":"".concat(e," button"),role:"button",tabIndex:0,key:t,value:e,onClick:s,active:n,className:"mr-2"},g.a.createElement(b.f,{name:r,size:20,appearance:n?"info":"default"})))}),0<r&&this.renderInDropdown())}}])&&ee(t.prototype,e),n&&ee(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component);function ie(e){return(ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ae(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function se(e,t){return(se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ce(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=ue(n),t=(e=r?(e=ue(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===ie(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function ue(e){return(ue=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}oe.propTypes={expanded:h.a.bool,doExpand:h.a.func,doCollapse:h.a.func,onExpandEvent:h.a.func,config:h.a.object,onChange:h.a.func,currentState:h.a.object,className:h.a.string};t=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&se(t,e);var n,r=ce(i);function i(e){var o;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(o=r.call(this,e)).expandCollapse=function(){o.setState(function(e){return{expanded:!e.expanded}})},o.toggleInlineStyle=function(e){var t=o.props,n=t.editorState,t=t.onChange,e=e.toUpperCase(),r=Object(m.getSelectionEntity)(n);if(r){r=n.getCurrentContent().getEntity(r).getType();if("MENTION"===r||"LINK"===r)return}r=y.RichUtils.toggleInlineStyle(n,e);r&&t(r)},o.changeKeys=function(e){var n;if(e)return n={},D(e,function(e,t){n["CODE"===e?"monospace":e.toLowerCase()]=t}),n},o.doExpand=function(){o.setState({expanded:!0})},o.doCollapse=function(){o.setState({expanded:!1})};var e=o.props,t=e.editorState;e.modalHandler;return o.state={currentStyles:t?o.changeKeys(Object(m.getSelectionInlineStyle)(t)):{}},o}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(m.getSelectionInlineStyle)(t))})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.expanded,n=n.currentStyles,o=t.component||oe;return g.a.createElement(o,{config:t,currentState:n,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle,className:e})}}])&&ae(t.prototype,e),n&&ae(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component);function le(e){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pe(e,t){return(pe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function de(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=he(n),t=(e=r?(e=he(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===le(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function he(e){return(he=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}t.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object.isRequired,modalHandler:h.a.object,config:h.a.object,className:h.a.string};var ye=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pe(t,e);var n,r=de(o);function o(e){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");return(e=r.call(this,e)).getBlockTypes=function(){return[{label:"H1",size:"xxl",displayName:"Heading 1"},{label:"H2",size:"xl",displayName:"Heading 2"},{label:"H3",size:"l",displayName:"Heading 3"},{label:"H4",size:"m",displayName:"Heading 4"}]},e.state={blockTypes:e.getBlockTypes()},e}return t=o,(e=[{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config.icon,r=t.currentState.blockType,o=t.expanded,i=t.doExpand,a=t.onExpandEvent,s=t.doCollapse,c=t.onChange,t=t.className;return g.a.createElement("div",{className:t,"aria-label":"Editor-block-control"},g.a.createElement(V,{onChange:c,expanded:o,doExpand:i,doCollapse:s,onExpandEvent:a,triggerClassName:"Editor-heading-trigger"},g.a.createElement(b.f,{name:n,size:20}),e.map(function(e,t){return g.a.createElement(_,{index:t,active:r===e.label,value:e.label,key:t},g.a.createElement(b.e,{size:e.size,className:"Editor-heading-option",appearance:r===e.label?"white":"default"},e.displayName))})))}},{key:"render",value:function(){var t=this.props.config,e=this.state.blockTypes.filter(function(e){e=e.label;return-1<t.options.indexOf(e)});return this.renderInDropdown(e)}}])&&fe(t.prototype,e),n&&fe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),ge=(ye.propTypes={expanded:h.a.bool,onExpandEvent:h.a.func,doExpand:h.a.func,doCollapse:h.a.func,onChange:h.a.func,config:h.a.object,currentState:h.a.object,className:h.a.string},ye);function me(e){return(me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function be(e,t){return(be=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _e(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=we(n),t=(e=r?(e=we(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===me(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function we(e){return(we=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ye=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&be(t,e);var n,r=_e(i);function i(e){var o;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(o=r.call(this,e)).expandCollapse=function(){o.setState(function(e){return{expanded:!e.expanded}})},o.blocksTypes=[{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"}],o.doExpand=function(){o.setState({expanded:!0})},o.doCollapse=function(){o.setState({expanded:!1})},o.toggleBlockType=function(t){var e=o.blocksTypes.find(function(e){return e.label===t}).style,n=o.props,r=n.editorState,n=n.onChange,r=y.RichUtils.toggleBlockType(r,e);r&&n(r)};e=e.editorState;return o.state={expanded:!1,currentBlockType:e?Object(m.getSelectedBlocksType)(e):"unstyled"},o}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(m.getSelectedBlocksType)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.expanded,o=n.currentBlockType,n=this.blocksTypes.find(function(e){return e.style===o});return g.a.createElement(ge,{config:t,currentState:{blockType:n&&n.label},onChange:this.toggleBlockType,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,className:e})}}])&&ve(t.prototype,e),n&&ve(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component),ye.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object,config:h.a.object,className:h.a.string};o(201);function Se(e){return(Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ce(e,t){return(Ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oe(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=xe(n),t=(e=r?(e=xe(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Se(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function xe(e){return(xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ke=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ce(t,e);var n,i=Oe(a);function a(){var e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=i.call.apply(i,[this].concat(r))).state={defaultFontSize:void 0},e}return t=a,(e=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");e&&0<e.length&&(e=(e=window.getComputedStyle(e[0]).getPropertyValue("font-size")).substring(0,e.length-2),this.setState({defaultFontSize:e}))}},{key:"renderCustomTrigger",value:function(){return g.a.createElement("div",null,"Riya")}},{key:"render",value:function(){var e=this.props,t=e.config,n=(t.icon,t.className),r=(t.dropdownClassName,t.options),t=(t.title,e.onChange),e=(e.expanded,e.doCollapse,e.onExpandEvent,e.doExpand,e.translations,this.props.currentState.fontSize),o=this.state.defaultFontSize,o=Number(o);e||r&&r.indexOf(o);return g.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},g.a.createElement(b.d,{className:v()("rdw-fontsize-dropdown",n),onChange:t,customTrigger:this.renderCustomTrigger,icon:"text_fields",placeholder:"",options:r.map(function(e){return{label:e,value:e,selected:14===e}})}))}}])&&Ee(t.prototype,e),n&&Ee(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(d.Component);function De(e){return(De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function je(e,t){return(je=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ie(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Me(n),t=(e=r?(e=Me(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===De(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Me(e){return(Me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ke.propTypes={expanded:h.a.bool,onExpandEvent:h.a.func,doExpand:h.a.func,doCollapse:h.a.func,onChange:h.a.func,config:h.a.object,currentState:h.a.object,translations:h.a.object};var Ne=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&je(t,e);var n,o=Ie(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,e)).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.toggleFontSize=function(e){var t=r.props,n=t.editorState,t=t.onChange,n=Object(m.toggleCustomInlineStyle)(n,"fontSize",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontSize:t?Object(m.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE:void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(m.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.expanded,n=n.currentFontSize,o=t.component||ke,n=n&&Number(n.substring(9));return g.a.createElement(o,{config:t,fontSize:!0,translations:e,currentState:{fontSize:n},onChange:this.toggleFontSize,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Te(t.prototype,e),n&&Te(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component);Ne.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object,modalHandler:h.a.object,config:h.a.object,translations:h.a.object},o(202);function Ae(e){return(Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Re(e,t){return(Re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Le(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Fe(n),t=(e=r?(e=Fe(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Ae(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Fe(e){return(Fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Be=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Re(t,e);var n,i=Le(a);function a(){var e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=i.call.apply(i,[this].concat(r))).state={defaultFontFamily:void 0},e}return t=a,(e=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");e&&0<e.length&&(e=window.getComputedStyle(e[0]).getPropertyValue("font-family"),this.setState({defaultFontFamily:e}))}},{key:"render",value:function(){var t=this.state.defaultFontFamily,e=this.props,n=e.config,r=n.className,o=n.dropdownClassName,i=n.options,n=n.title,a=e.translations,s=e.onChange,c=e.expanded,l=e.doCollapse,f=e.onExpandEvent,e=e.doExpand,u=this.props.currentState.fontFamily||i&&t&&i.some(function(e){return e.toLowerCase()===t.toLowerCase()})&&t;return g.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},g.a.createElement(V,{className:v()("rdw-fontfamily-dropdown",r),optionWrapperClassName:v()("rdw-fontfamily-optionwrapper",o),onChange:s,expanded:c,doExpand:e,doCollapse:l,onExpandEvent:f,title:n||a["components.controls.fontfamily.fontfamily"]},g.a.createElement("span",{className:"rdw-fontfamily-placeholder"},u||a["components.controls.fontfamily.fontfamily"]),i.map(function(e,t){return g.a.createElement(_,{active:u===e,value:e,key:t},e)})))}}])&&Pe(t.prototype,e),n&&Pe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(d.Component),ze=(Be.propTypes={expanded:h.a.bool,onExpandEvent:h.a.func,doExpand:h.a.func,doCollapse:h.a.func,onChange:h.a.func,config:h.a.object,currentState:h.a.object,translations:h.a.object},Be);function Ke(e){return(Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function He(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ue(e,t){return(Ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qe(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=We(n),t=(e=r?(e=We(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Ke(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function We(e){return(We=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Be=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ue(t,e);var n,o=qe(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,e)).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.toggleFontFamily=function(e){var t=r.props,n=t.editorState,t=t.onChange,n=Object(m.toggleCustomInlineStyle)(n,"fontFamily",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontFamily:t?Object(m.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY:void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(m.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.expanded,n=n.currentFontFamily,o=t.component||ze,n=n&&n.substring(11);return g.a.createElement(o,{translations:e,config:t,currentState:{fontFamily:n},onChange:this.toggleFontFamily,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&He(t.prototype,e),n&&He(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component);function Ve(e){return(Ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ye(e,t){return(Ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $e(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Ze(n),t=(e=r?(e=Ze(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Ve(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Be.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object,modalHandler:h.a.object,config:h.a.object,translations:h.a.object};var Je=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ye(t,e);var n,a=$e(s);function s(){var t,e=this,n=s;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(t=a.call.apply(a,[this].concat(o))).options=["unordered","ordered"],t.toggleBlockType=function(e){(0,t.props.onChange)(e)},t}return t=s,(e=[{key:"render",value:function(){var e,t,n=this.props,r=n.config,o=n.currentState.listType,n=n.className,i=(r.options,r.unordered),r=r.ordered,a=v()((t=!0,(a="d-flex")in(e={})?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e),n);return g.a.createElement("div",{className:a},g.a.createElement(b.n,{tooltip:i.title},g.a.createElement(u,{value:"unordered",onClick:this.toggleBlockType,active:"unordered"===o,className:"mr-2"},g.a.createElement(b.f,{appearance:"unordered"===o?"info":"default",name:i.icon,size:20}))),g.a.createElement(b.n,{tooltip:r.title},g.a.createElement(u,{value:"ordered",onClick:this.toggleBlockType,active:"ordered"===o},g.a.createElement(b.f,{appearance:"ordered"===o?"info":"default",name:r.icon,size:20}))))}}])&&Ge(t.prototype,e),n&&Ge(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component);function Xe(e){return(Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function et(e,t){return(et=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=nt(n),t=(e=r?(e=nt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Xe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function nt(e){return(nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Je.propTypes={expanded:h.a.bool,doExpand:h.a.func,doCollapse:h.a.func,onExpandEvent:h.a.func,config:h.a.object,onChange:h.a.func,currentState:h.a.object,className:h.a.string};var rt=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&et(t,e);var n,o=tt(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,e)).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.onChange=function(e){"unordered"===e?r.toggleBlockType("unordered-list-item"):"ordered"===e?r.toggleBlockType("ordered-list-item"):"indent"===e?r.adjustDepth(1):r.adjustDepth(-1)},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.toggleBlockType=function(e){var t=r.props,n=t.onChange,t=t.editorState,t=y.RichUtils.toggleBlockType(t,e);t&&n(t)},r.adjustDepth=function(e){var t=r.props,n=t.onChange,t=t.editorState,t=Object(m.changeDepth)(t,e,4);t&&n(t)},r.isIndentDisabled=function(){var e=r.props.editorState,t=r.state.currentBlock,e=Object(m.getBlockBeforeSelectedBlock)(e);return!e||!Object(m.isListBlock)(t)||e.get("type")!==t.get("type")||e.get("depth")<t.get("depth")},r.isOutdentDisabled=function(){var e=r.state.currentBlock;return!e||!Object(m.isListBlock)(e)||e.get("depth")<=0};var e=r.props,t=e.editorState,e=e.modalHandler;return r.state={expanded:!1,currentBlock:t?Object(m.getSelectedBlock)(t):void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(m.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,t=t.className,o=this.state,i=o.expanded,o=o.currentBlock;return"unordered-list-item"===o.get("type")?e="unordered":"ordered-list-item"===o.get("type")&&(e="ordered"),g.a.createElement(Je,{config:n,translations:r,currentState:{listType:e},expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,className:t})}}])&&Qe(t.prototype,e),n&&Qe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component);rt.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object.isRequired,modalHandler:h.a.object,config:h.a.object,translations:h.a.object,className:h.a.string},o(203);function ot(e){return(ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function it(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function at(e,t){return(at=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function st(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=ct(n),t=(e=r?(e=ct(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===ot(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function ct(e){return(ct=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ut=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&at(t,e);var n,r=st(o);function o(){var e=this,t=o;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");return r.apply(this,arguments)}return t=o,(e=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,o=t.center,i=t.right,a=t.justify,t=t.className,s=e.onChange,c=e.currentState.textAlignment,e=e.translations;return g.a.createElement("div",{className:v()("rdw-text-align-wrapper",t),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&g.a.createElement(u,{value:"left",className:v()(r.className),active:"left"===c,onClick:s,title:r.title||e["components.controls.textalign.left"]},g.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&g.a.createElement(u,{value:"center",className:v()(o.className),active:"center"===c,onClick:s,title:o.title||e["components.controls.textalign.center"]},g.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&g.a.createElement(u,{value:"right",className:v()(i.className),active:"right"===c,onClick:s,title:i.title||e["components.controls.textalign.right"]},g.a.createElement("img",{src:i.icon,alt:""})),0<=n.indexOf("justify")&&g.a.createElement(u,{value:"justify",className:v()(a.className),active:"justify"===c,onClick:s,title:a.title||e["components.controls.textalign.justify"]},g.a.createElement("img",{src:a.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,l=e.onExpandEvent,f=e.doCollapse,o=e.currentState.textAlignment,p=e.onChange,e=e.translations,i=t.options,a=t.left,s=t.center,c=t.right,u=t.justify,d=t.className,h=t.dropdownClassName,y=t.title;return g.a.createElement(V,{className:v()("rdw-text-align-dropdown",d),optionWrapperClassName:v()(h),onChange:p,expanded:n,doExpand:r,doCollapse:f,onExpandEvent:l,"aria-label":"rdw-textalign-control",title:y||e["components.controls.textalign.textalign"]},g.a.createElement("img",{src:o&&t[o]&&t[o].icon||M(t),alt:""}),0<=i.indexOf("left")&&g.a.createElement(_,{value:"left",active:"left"===o,className:v()("rdw-text-align-dropdownOption",a.className),title:a.title||e["components.controls.textalign.left"]},g.a.createElement("img",{src:a.icon,alt:""})),0<=i.indexOf("center")&&g.a.createElement(_,{value:"center",active:"center"===o,className:v()("rdw-text-align-dropdownOption",s.className),title:s.title||e["components.controls.textalign.center"]},g.a.createElement("img",{src:s.icon,alt:""})),0<=i.indexOf("right")&&g.a.createElement(_,{value:"right",active:"right"===o,className:v()("rdw-text-align-dropdownOption",c.className),title:c.title||e["components.controls.textalign.right"]},g.a.createElement("img",{src:c.icon,alt:""})),0<=i.indexOf("justify")&&g.a.createElement(_,{value:"justify",active:"justify"===o,className:v()("rdw-text-align-dropdownOption",u.className),title:u.title||e["components.controls.textalign.justify"]},g.a.createElement("img",{src:u.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&it(t.prototype,e),n&&it(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component);function lt(e){return(lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ft(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pt(e,t){return(pt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=ht(n),t=(e=r?(e=ht(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===lt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function ht(e){return(ht=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ut.propTypes={expanded:h.a.bool,doExpand:h.a.func,doCollapse:h.a.func,onExpandEvent:h.a.func,config:h.a.object,onChange:h.a.func,currentState:h.a.object,translations:h.a.object};var yt=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pt(t,e);var n,o=dt(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,e)).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.addBlockAlignmentData=function(e){var t=r.props,n=t.editorState,t=t.onChange;t(r.state.currentTextAlignment!==e?Object(m.setBlockData)(n,{"text-align":e}):Object(m.setBlockData)(n,{"text-align":void 0}))};e=r.props.modalHandler;return r.state={currentTextAlignment:void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(m.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.expanded,n=n.currentTextAlignment,o=t.component||ut;return g.a.createElement(o,{config:t,translations:e,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:n},onChange:this.addBlockAlignmentData})}}])&&ft(t.prototype,e),n&&ft(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component);function gt(e){return(gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vt(e,t){return(vt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=_t(n),t=(e=r?(e=_t(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===gt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function _t(e){return(_t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}yt.propTypes={editorState:h.a.object.isRequired,onChange:h.a.func.isRequired,modalHandler:h.a.object,config:h.a.object,translations:h.a.object};var wt=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vt(t,e);var n,r=bt(i);function i(e){var o;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");return(o=r.call(this,e)).onChange=function(e){var t=o.props,n=t.onChange;t.expanded&&n(o.state.currentStyle,e)},o.handleClick=function(e){var t=e.target.getAttribute("data-color");t&&(e.preventDefault(),e.stopPropagation(),o.onChange(t))},o.handleKeyDown=function(e){var t=e.target.getAttribute("data-color");t&&"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),o.onChange(t))},o.renderModal=function(){var e=o.props,t=e.config.colors,e=e.currentState,n=e.color,e=e.bgColor,r="color"===o.state.currentStyle?n:e;return g.a.createElement("div",{className:"Editor-colorPicker",onClick:o.handleClick,onKeyDown:o.handleKeyDown},t.map(function(e,t){return g.a.createElement("div",{className:"Editor-colorPicker-circleWrapper"},g.a.createElement("div",{ref:0===t?o.ref:null,"data-color":e,tabIndex:0,key:t,style:{backgroundColor:e},className:"Editor-colorPicker-circle","aria-selected":r===e}),r===e&&g.a.createElement(b.f,{name:"check",appearance:"white",className:"Editor-colorPicker-selectedCircle"}))}))},o.state={currentStyle:"color"},o.ref=g.a.createRef(),o}return t=i,(e=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&(this.ref.current,this.setState({currentStyle:"color"}))}},{key:"render",value:function(){var e=this.props,t=e.expanded,n=e.onToggle,e=e.className,n=g.a.createElement(u,{tabIndex:0,"aria-label":"Font colors",onClick:n,active:t,activeClassName:"bg-secondary"},g.a.createElement(b.f,{name:"text_format",size:20}));return g.a.createElement("div",{className:e,"aria-haspopup":"true","aria-expanded":t},g.a.createElement(b.l,{trigger:n,position:"bottom-start",open:t},this.renderModal()))}}])&&mt(t.prototype,e),n&&mt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component),St=(wt.propTypes={expanded:h.a.bool,onToggle:h.a.func,onChange:h.a.func,config:h.a.object,currentState:h.a.object,className:h.a.className},wt);function Et(e){return(Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ct(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ot(e,t){return(Ot=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=kt(n),t=(e=r?(e=kt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Et(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function kt(e){return(kt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wt=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ot(t,e);var n,r=xt(o);function o(e){var i;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(i=r.call(this,e)).state={expanded:!1,currentColor:"var(--text)",currentBgColor:void 0},i.expandCollapse=function(){i.setState({expanded:!1})},i.toggleColorPicker=function(){i.setState(function(e){return{expanded:!e.expanded}})},i.toggleColor=function(t,n){var e=i.props,r=e.editorState,o=e.onChange,e=Object(m.getSelectionEntity)(r);if(e){e=r.getCurrentContent().getEntity(e).getType();if("MENTION"===e||"LINK"===e)return}i.setState(function(){return{currentColor:n?"color-".concat(n):"color-var(--text)",currentBgColor:Object(m.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR,expanded:!1}},function(){var e=Object(m.toggleCustomInlineStyle)(r,t,n);e&&o(e)})};var t=e.editorState,e=e.modalHandler,n={expanded:!1,currentColor:void 0,currentBgColor:void 0};return t&&(n.currentColor=Object(m.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR||"color-var(--text)",n.currentBgColor=Object(m.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR),i.state=n,e.registerCallBack(i.expandCollapse),i}return t=o,(e=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.currentColor,o=n.currentBgColor,n=n.expanded,i=t.component||St,r=r&&r.substring(6),o=o&&o.substring(8);return g.a.createElement(i,{config:t,className:e,onChange:this.toggleColor,expanded:n,onToggle:this.toggleColorPicker,currentState:{color:r,bgColor:o}})}}])&&Ct(t.prototype,e),n&&Ct(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),Dt=(wt.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object.isRequired,modalHandler:h.a.object,config:h.a.object,className:h.a.string},o(93)),Dt=o.n(Dt);function Tt(e){return(Tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function It(e,t){return(It=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Nt(n),t=(e=r?(e=Nt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Tt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Nt(e){return(Nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var At=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&It(t,e);var n,a=Mt(s);function s(){var r,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=a.call.apply(a,[this].concat(o))).state={showModal:!1,editing:!1,linkTarget:"",linkTitle:"",linkTargetOption:r.props.config.defaultTargetOption},r.addLink=function(){var e=r.props.onChange,t=r.state;e("link",t.linkTitle,t.linkTarget,t.linkTargetOption)},r.updateValue=function(e){var t,n;r.setState((t={},n="".concat(e.target.name),e=e.target.value,n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t))},r.updateTargetOption=function(e){r.setState({linkTargetOption:e.target.checked?"_blank":"_self"})},r}return t=s,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.currentState,n=t.link,t=t.selectionText;e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption}),!e.expanded&&this.props.expanded&&this.setState({showModal:!1,linkTarget:n&&n.target,linkTitle:n&&n.title||t,linkTargetOption:this.props.config.defaultTargetOption,editing:void 0!==n})}},{key:"renderAddLinkModal",value:function(){var e=this.props.onExpandEvent,t=this.state,n=t.linkTitle,r=t.linkTarget,t=t.editing?"Edit":"Add";return g.a.createElement("div",{className:"px-6 mt-6 mb-5",onClick:j},g.a.createElement(b.m,{weight:"strong",size:"large"},t," a link"),g.a.createElement(b.g,{icon:"insert_link",className:"mt-4",placeholder:"Paste a link to insert",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:r,autoComplete:"off",autoFocus:!0,onClick:j}),g.a.createElement(b.g,{icon:"text_fields",className:"my-5",placeholder:"Text to display",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:n,autoComplete:"off",onClick:j}),g.a.createElement("div",{className:"d-flex justify-content-end"},g.a.createElement(b.a,{onClick:e,className:"mr-4"},"Cancel"),g.a.createElement(b.a,{onClick:this.addLink,disabled:!r||!n,appearance:"primary"},t)))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,t=t.title,r=e.inDropdown,o=e.onExpandEvent,e=e.expanded,t=r?g.a.createElement(_,null,g.a.createElement(b.f,{size:20,name:n,className:"mr-4"}),g.a.createElement(b.m,null,t)):g.a.createElement(u,{value:"unordered-list-item",onClick:o,"aria-haspopup":"true","aria-expanded":e,active:e,activeClassName:"bg-secondary"},g.a.createElement(b.f,{name:n,size:20}));return g.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e},g.a.createElement(b.l,{trigger:t,position:r?"right":"bottom",open:e,onToggle:o},this.renderAddLinkModal()))}}])&&jt(t.prototype,e),n&&jt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component),Pt=(At.propTypes={expanded:h.a.bool,doExpand:h.a.func,doCollapse:h.a.func,onExpandEvent:h.a.func,config:h.a.object,onChange:h.a.func,currentState:h.a.object,inDropdown:h.a.boolean},At);function Rt(e){return(Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ft(e,t){return(Ft=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=zt(n),t=(e=r?(e=zt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Rt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function zt(e){return(zt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Kt(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Ht(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Kt(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Kt(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function Ut(e){var t=qt.match(e.target);return Ht(Ht({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var qt=Dt()(),At=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ft(t,e);var n,r=Bt(o);function o(e){var s;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(s=r.call(this,e)).onExpandEvent=function(){var e=!s.state.expanded;s.setState({expanded:e}),e||s.props.onCloseLinkPopover()},s.onChange=function(e,t,n,r){var o=s.props.config.linkCallback;"link"===e?(e=(o||Ut)({title:t,target:n,targetOption:r}),s.addLink(e.title,e.target,e.targetOption)):s.removeLink()},s.getCurrentValues=function(){var e,t=s.props.editorState,n=s.state,r=n.currentEntity,n=(n.link,t.getCurrentContent()),o={};return r&&"LINK"===n.getEntity(r).get("type")&&(o.link={},e=r&&Object(m.getEntityRange)(t,r),o.link.target=r&&n.getEntity(r).get("data").url,o.link.targetOption=r&&n.getEntity(r).get("data").targetOption,o.link.title=e&&e.text),o.selectionText=Object(m.getSelectionText)(t),o},s.doExpand=function(){s.setState({expanded:!0})},s.expandCollapse=function(){s.setState({expanded:s.signalExpanded}),s.signalExpanded=!1},s.doCollapse=function(){s.setState({expanded:!1})},s.removeLink=function(){var e=s.props,t=e.editorState,e=e.onChange,n=s.state.currentEntity,r=t.getSelection();n&&(n=Object(m.getEntityRange)(t,n),r=r.getIsBackward()?r.merge({anchorOffset:n.end,focusOffset:n.start}):r.merge({anchorOffset:n.start,focusOffset:n.end}),e(y.RichUtils.toggleLink(t,r,null)))},s.addLink=function(e,t,n){var r=s.props,o=r.editorState,r=r.onChange,i=s.state.currentEntity,a=o.getSelection(),i=(i&&(i=Object(m.getEntityRange)(o,i),a=a.getIsBackward()?a.merge({anchorOffset:i.end,focusOffset:i.start}):a.merge({anchorOffset:i.start,focusOffset:i.end})),o.getCurrentContent().createEntity("LINK","MUTABLE",{url:t,targetOption:n,targetText:e}).getLastCreatedEntityKey()),t=y.Modifier.replaceText(o.getCurrentContent(),a,"".concat(e),null,i),n=y.EditorState.push(o,t,"insert-characters");a=n.getSelection().merge({anchorOffset:a.get("anchorOffset")+e.length,focusOffset:a.get("anchorOffset")+e.length}),n=y.EditorState.acceptSelection(n,a),t=y.Modifier.insertText(n.getCurrentContent(),a," ",n.getCurrentInlineStyle(),void 0),r(y.EditorState.push(n,t,"insert-characters")),s.props.onCloseLinkPopover(),s.doCollapse()};var e=s.props,t=e.editorState,e=e.linkPopoverOpen;return s.state={expanded:e,selectionText:void 0,link:void 0,currentEntity:t?Object(m.getSelectionEntity)(t):void 0},s}return t=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.editorState,t=t.linkPopoverOpen;n&&n!==e.editorState&&this.setState({currentEntity:Object(m.getSelectionEntity)(n)}),e.linkPopoverOpen!==t&&t&&this.setState({expanded:t})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.inDropdown,n=this.state.expanded,r=this.getCurrentValues(),o=r.link,r=r.selectionText;return g.a.createElement(Pt,{config:t,expanded:n,inDropdown:e,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:o,selectionText:r},onChange:this.onChange})}}])&&Lt(t.prototype,e),n&&Lt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),Dt=(At.propTypes={editorState:h.a.object.isRequired,onChange:h.a.func.isRequired,onCloseLinkPopover:h.a.func.isRequired,modalHandler:h.a.object,config:h.a.object,inDropdown:h.a.boolean,linkPopoverOpen:h.a.bool},At);function Wt(e){return(Wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gt(e,t){return(Gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=$t(n),t=(e=r?(e=$t(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Wt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function $t(e){return($t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}At=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gt(t,e);var n,r=Yt(o);function o(e){var i;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(i=r.call(this,e)).addLink=function(){var e=i.props,t=e.editorState,n=e.onChange,e=e.mention.trigger,e=void 0===e?"@":e,r=i.state.currentEntity,o=t.getSelection(),r=(r&&(r=Object(m.getEntityRange)(t,r),o=o.getIsBackward()?o.merge({anchorOffset:r.end,focusOffset:r.start}):o.merge({anchorOffset:r.start,focusOffset:r.end})),y.Modifier.replaceText(t.getCurrentContent(),o,"".concat(e),t.getCurrentInlineStyle(),void 0)),o=y.EditorState.push(t,r,"insert-characters");n(y.EditorState.push(o,r,"insert-characters"))};e=i.props.editorState;return i.state={selectionText:void 0,link:void 0,currentEntity:e?Object(m.getSelectionEntity)(e):void 0},i}return t=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(m.getSelectionEntity)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,t=t.title;e.inDropdown;return g.a.createElement(b.n,{tooltip:t},g.a.createElement(u,{value:"unordered-list-item",onClick:this.addLink,className:"mr-2"},g.a.createElement(b.f,{name:n,size:20})))}}])&&Vt(t.prototype,e),n&&Vt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),At.propTypes={editorState:h.a.object.isRequired,onChange:h.a.func.isRequired,config:h.a.object,inDropdown:h.a.boolean};o(209);function Zt(e){return(Zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xt(e,t){return(Xt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=en(n),t=(e=r?(e=en(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Zt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function en(e){return(en=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xt(t,e);var n,a=Qt(s);function s(){var r,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=a.call.apply(a,[this].concat(o))).state={embeddedLink:"",height:r.props.config.defaultSize.height,width:r.props.config.defaultSize.width},r.onChange=function(){var e=r.props.onChange,t=r.state;e(t.embeddedLink,t.height,t.width)},r.updateValue=function(e){var t,n;r.setState((t={},n="".concat(e.target.name),e=e.target.value,n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t))},r}return t=s,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,t=t.config;!n&&e.expanded&&(e=(n=t.defaultSize).height,t=n.width,this.setState({embeddedLink:"",height:e,width:t}))}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,e=e.width,r=this.props,o=r.config.popupClassName,i=r.doCollapse,r=r.translations;return g.a.createElement("div",{className:v()("rdw-embedded-modal",o),onClick:j},g.a.createElement("div",{className:"rdw-embedded-modal-header"},g.a.createElement("span",{className:"rdw-embedded-modal-header-option"},r["components.controls.embedded.embeddedlink"],g.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),g.a.createElement("div",{className:"rdw-embedded-modal-link-section"},g.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},g.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:r["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.a.createElement("div",{className:"rdw-embedded-modal-size"},g.a.createElement("span",null,g.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.a.createElement("span",null,g.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:e,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),g.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},g.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!e},r["generic.add"]),g.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:i},r["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,t=t.title,o=e.expanded,i=e.onExpandEvent,e=e.translations;return g.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-embedded-control"},g.a.createElement(u,{className:v()(r),value:"unordered-list-item",onClick:i,title:t||e["components.controls.embedded.embedded"]},g.a.createElement("img",{src:n,alt:""})),o?this.rendeEmbeddedLinkModal():void 0)}}])&&Jt(t.prototype,e),n&&Jt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component),nn=(tn.propTypes={expanded:h.a.bool,onExpandEvent:h.a.func,onChange:h.a.func,config:h.a.object,translations:h.a.object,doCollapse:h.a.func},tn);function rn(e){return(rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function on(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function an(e,t){return(an=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=cn(n),t=(e=r?(e=cn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===rn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function cn(e){return(cn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}tn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&an(t,e);var n,i=sn(s);function s(){var a,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=i.call.apply(i,[this].concat(r))).state={expanded:!1},a.onExpandEvent=function(){a.signalExpanded=!a.state.expanded},a.expandCollapse=function(){a.setState({expanded:a.signalExpanded}),a.signalExpanded=!1},a.doExpand=function(){a.setState({expanded:!0})},a.doCollapse=function(){a.setState({expanded:!1})},a.addEmbeddedLink=function(e,t,n){var r=a.props,o=r.editorState,i=r.onChange,r=r.config.embedCallback,r=r?r(e):e,e=o.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:r,height:t,width:n}).getLastCreatedEntityKey();i(y.AtomicBlockUtils.insertAtomicBlock(o,e," ")),a.doCollapse()},a}return t=s,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state.expanded,r=t.component||nn;return g.a.createElement(r,{config:t,translations:e,onChange:this.addEmbeddedLink,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&on(t.prototype,e),n&&on(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component),tn.propTypes={editorState:h.a.object.isRequired,onChange:h.a.func.isRequired,modalHandler:h.a.object,config:h.a.object,translations:h.a.object};o(210);function un(e){return(un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ln(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fn(e,t){return(fn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=dn(n),t=(e=r?(e=dn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===un(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function dn(e){return(dn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fn(t,e);var n,a=pn(s);function s(){var t,e=this,n=s;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(t=a.call.apply(a,[this].concat(o))).onChange=function(e){(0,t.props.onChange)(e.target.innerHTML)},t}return t=s,(e=[{key:"renderEmojiModal",value:function(){var n=this,e=this.props.config,t=e.popupClassName,e=e.emojis;return g.a.createElement("div",{className:v()("rdw-emoji-modal",t),onClick:j},e.map(function(e,t){return g.a.createElement("span",{key:t,className:"rdw-emoji-icon",alt:"",onClick:n.onChange},e)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,t=t.title,o=e.expanded,i=e.onExpandEvent,e=e.translations;return g.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":o,title:t||e["components.controls.emoji.emoji"]},g.a.createElement(u,{className:v()(r),value:"unordered-list-item",onClick:i},g.a.createElement("img",{src:n,alt:""})),o?this.renderEmojiModal():void 0)}}])&&ln(t.prototype,e),n&&ln(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component),yn=(hn.propTypes={expanded:h.a.bool,onExpandEvent:h.a.func,onChange:h.a.func,config:h.a.object,translations:h.a.object},hn);function gn(e){return(gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vn(e,t){return(vn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=_n(n),t=(e=r?(e=_n(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===gn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function _n(e){return(_n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}hn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vn(t,e);var n,a=bn(s);function s(){var r,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=a.call.apply(a,[this].concat(o))).state={expanded:!1},r.onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.addEmoji=function(e){var t=r.props,n=t.editorState,t=t.onChange,e=y.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());t(y.EditorState.push(n,e,"insert-characters")),r.doCollapse()},r}return t=s,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state.expanded,r=t.component||yn;return g.a.createElement(r,{config:t,translations:e,onChange:this.addEmoji,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&mn(t.prototype,e),n&&mn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component);function wn(e){return(wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function En(e,t){return(En=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=On(n),t=(e=r?(e=On(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===wn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function On(e){return(On=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}hn.propTypes={editorState:h.a.object.isRequired,onChange:h.a.func.isRequired,modalHandler:h.a.object,config:h.a.object,translations:h.a.object};var xn=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&En(t,e);var n,r=Cn(o);function o(e){var i;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");return(i=r.call(this,e)).inputRef=null,i.showImageUploadOption=function(){i.setState({uploadHighlighted:!0})},i.addImageFromState=function(){var e=i.state,t=e.imgSrc,e=e.alt,n=i.state,r=n.height,n=n.width,o=i.props.onChange;isNaN(r)||(r+="px"),isNaN(n)||(n+="px"),o(t,r,n,e)},i.showImageURLOption=function(){i.setState({uploadHighlighted:!1})},i.toggleShowImageLoading=function(){var e=!i.state.showImageLoading;i.setState({showImageLoading:e})},i.updateValue=function(e){var t,n;i.setState((t={},n="".concat(e.target.name),e=e.target.value,n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t))},i.selectImage=function(e){e.target.files&&0<e.target.files.length&&i.uploadImage(e.target.files[0])},i.uploadImage=function(e){i.toggleShowImageLoading(),(0,i.props.config.uploadCallback)(e).then(function(e){e=e.data;i.setState({showImageLoading:!1,dragEnter:!1,imgSrc:e.link||e.url},i.addImageFromState),i.fileUpload=!1}).catch(function(){i.setState({showImageLoading:!1,dragEnter:!1})})},i.fileUploadClick=function(e,t){i.inputRef.current&&t&&t.key&&i.inputRef.current.click(),i.fileUpload=!0},i.stopPropagation=function(e){i.fileUpload?i.fileUpload=!1:(e.preventDefault(),e.stopPropagation())},i.handleButtonClick=function(){i.inputRef&&i.inputRef.current&&i.inputRef.current.click()},i.inputRef=g.a.createRef(),i.state={imgSrc:"",dragEnter:!1,uploadHighlighted:i.props.config.uploadEnabled&&!!i.props.config.uploadCallback,showImageLoading:!1,height:i.props.config.defaultSize.height,width:i.props.config.defaultSize.width,alt:""},i}return t=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=(t.className,t.title),t=t.inputAccept,o=e.expanded;return e.inDropdown?g.a.createElement(_,null,g.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},g.a.createElement(b.f,{name:n,size:20,className:"mr-4"}),g.a.createElement(b.m,null,r)),g.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"})):g.a.createElement("div",{"aria-haspopup":"true","aria-expanded":o},g.a.createElement(b.n,{tooltip:r},g.a.createElement(u,{"aria-label":"add image",className:"mr-2",value:"unordered-list-item",onClick:this.fileUploadClick},g.a.createElement("span",null,g.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},g.a.createElement(b.f,{name:n,size:20}))),g.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"}))))}}])&&Sn(t.prototype,e),n&&Sn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),kn=(xn.propTypes={expanded:h.a.bool,onExpandEvent:h.a.func,doCollapse:h.a.func,onChange:h.a.func,config:h.a.object,translations:h.a.object,inDropdown:h.a.bool},xn);function Dn(e){return(Dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Tn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jn(e,t){return(jn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function In(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Mn(n),t=(e=r?(e=Mn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Dn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Mn(e){return(Mn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Nn(e){var t=e.config,n=e.onChange,e=e.translations,r=t.icon,o=t.className,t=t.title;return g.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},g.a.createElement(u,{className:v()(o),onClick:n,title:t||e["components.controls.remove.remove"]},g.a.createElement("img",{src:r,alt:""})))}var xn=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jn(t,e);var n,r=In(o);function o(e){var s;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");return(s=r.call(this,e)).addImage=function(e,t,n,r){var o=s.props,i=o.editorState,a=o.onChange,e={src:e,height:t,width:n},t=(o.config.alt&&(e.alt=r),i.getCurrentContent().createEntity("IMAGE","MUTABLE",e).getLastCreatedEntityKey());a(y.AtomicBlockUtils.insertAtomicBlock(i,t," "))},s.state={expanded:!1},s}return t=o,(e=[{key:"componentWillUnmount",value:function(){}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.inDropdown;return g.a.createElement(kn,{config:t,inDropdown:e,onChange:this.addImage})}}])&&Tn(t.prototype,e),n&&Tn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),An=(xn.propTypes={editorState:h.a.object.isRequired,onChange:h.a.func.isRequired,config:h.a.object,inDropdown:h.a.bool},o(211),Nn.propTypes={onChange:h.a.func,config:h.a.object,translations:h.a.object},Nn);function Pn(e){return(Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ln(e,t){return(Ln=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Bn(n),t=(e=r?(e=Bn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Bn(e){return(Bn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ln(t,e);var n,a=Fn(s);function s(){var n,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(n=a.call.apply(a,[this].concat(o))).state={expanded:!1},n.onExpandEvent=function(){n.signalExpanded=!n.state.expanded},n.expandCollapse=function(){n.setState({expanded:n.signalExpanded}),n.signalExpanded=!1},n.removeInlineStyles=function(){var e=n.props,t=e.editorState;(0,e.onChange)(n.removeAllInlineStyles(t))},n.removeAllInlineStyles=function(n){var r=n.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){r=y.Modifier.removeInlineStyle(r,n.getSelection(),e)}),D(Object(m.getSelectionCustomInlineStyle)(n,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(e,t){t&&(r=y.Modifier.removeInlineStyle(r,n.getSelection(),t))}),y.EditorState.push(n,r,"change-inline-style")},n.doExpand=function(){n.setState({expanded:!0})},n.doCollapse=function(){n.setState({expanded:!1})},n}return t=s,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state.expanded,r=t.component||An;return g.a.createElement(r,{config:t,translations:e,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Rn(t.prototype,e),n&&Rn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component);zn.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object.isRequired,config:h.a.object,translations:h.a.object,modalHandler:h.a.object},o(212);function Kn(e){return(Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Un(e,t){return(Un=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Wn(n),t=(e=r?(e=Wn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Kn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Wn(e){return(Wn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Un(t,e);var n,a=qn(s);function s(){var t,e=this,n=s;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(t=a.call.apply(a,[this].concat(o))).onChange=function(e){(0,t.props.onChange)(e)},t}return t=s,(e=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,i=e.doCollapse,a=e.currentState,l=a.undoDisabled,a=a.redoDisabled,e=e.translations,s=t.options,c=t.undo,u=t.redo,f=t.className,p=t.dropdownClassName,d=t.title;return g.a.createElement(V,{className:v()("rdw-history-dropdown",f),optionWrapperClassName:v()(p),expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-history-control",title:d||e["components.controls.history.history"]},g.a.createElement("img",{src:M(t),alt:""}),0<=s.indexOf("undo")&&g.a.createElement(_,{value:"undo",onClick:this.onChange,disabled:l,className:v()("rdw-history-dropdownoption",c.className),title:c.title||e["components.controls.history.undo"]},g.a.createElement("img",{src:c.icon,alt:""})),0<=s.indexOf("redo")&&g.a.createElement(_,{value:"redo",onClick:this.onChange,disabled:a,className:v()("rdw-history-dropdownoption",u.className),title:u.title||e["components.controls.history.redo"]},g.a.createElement("img",{src:u.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,o=t.redo,t=t.className,i=e.currentState,a=i.undoDisabled,i=i.redoDisabled,e=e.translations;return g.a.createElement("div",{className:v()("rdw-history-wrapper",t),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&g.a.createElement(u,{value:"undo",onClick:this.onChange,className:v()(r.className),disabled:a,title:r.title||e["components.controls.history.undo"]},g.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&g.a.createElement(u,{value:"redo",onClick:this.onChange,className:v()(o.className),disabled:i,title:o.title||e["components.controls.history.redo"]},g.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Hn(t.prototype,e),n&&Hn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component);function Gn(e){return(Gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $n(e,t){return($n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Jn(n),t=(e=r?(e=Jn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Gn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Jn(e){return(Jn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Vn.propTypes={expanded:h.a.bool,doExpand:h.a.func,doCollapse:h.a.func,onExpandEvent:h.a.func,config:h.a.object,onChange:h.a.func,currentState:h.a.object,translations:h.a.object};var Xn=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$n(t,e);var n,o=Zn(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,e)).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.onChange=function(e){var t=r.props,n=t.editorState,t=t.onChange,e=y.EditorState[e](n);e&&t(e)},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})};var t={expanded:!(r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},n=e.editorState,e=e.modalHandler;return n&&(t.undoDisabled=0===n.getUndoStack().size,t.redoDisabled=0===n.getRedoStack().size),r.state=t,e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.undoDisabled,o=n.redoDisabled,n=n.expanded,i=t.component||Vn;return g.a.createElement(i,{config:t,translations:e,currentState:{undoDisabled:r,redoDisabled:o},expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&Yn(t.prototype,e),n&&Yn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component);function Qn(e){return(Qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Xn.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object,modalHandler:h.a.object,config:h.a.object,translations:h.a.object};var er=["config","currentState","onChange"],tr=["config"];function nr(){return(nr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function rr(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ir(e,t){return(ir=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ar(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=sr(n),t=(e=r?(e=sr(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Qn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function sr(e){return(sr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cr=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ir(t,e);var n,r=ar(o);function o(e){var t;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(t=r.call(this,e)).onExpandEvent=function(){t.setState({expanded:!t.state.expanded})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.onChange=function(e){t.doCollapse(),t.props.onChange(e)};e=t.props;e.editorState,e.modalHandler;return t.state={expanded:!1},t}return t=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler}},{key:"renderInDropdown",value:function(){var r=this,e=this.props,o=e.config,i=(e.currentState,e.onChange,rr(e,er));this.state.expanded;return g.a.createElement(V,{expanded:this.state.expanded,doExpand:this.doExpand,doCollapse:this.doCollapse,onExpandEvent:this.onExpandEvent,menu:!0},g.a.createElement(b.f,{name:"more_horizon"}),o.options.slice(o.max,o.options.length).map(function(e,t){var n=o[e],e=ur[e];return g.a.createElement(e,nr({key:t,config:n,inDropdown:!0,onChange:r.onChange},i))}))}},{key:"render",value:function(){var o=this,e=this.props,i=e.config,a=rr(e,tr),e=i.max;return g.a.createElement("div",{className:"Editor-toolbar-insert"},i.options.slice(0,e).map(function(e,t){var n=i[e],r=ur[e];return(o.props.mention||"mention"!==e)&&n.isVisible?g.a.createElement(r,nr({key:t,config:n,inDropdown:!1},a)):null}))}}])&&or(t.prototype,e),n&&or(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),ur=(cr.propTypes={onChange:h.a.func.isRequired,onCloseLinkPopover:h.a.func.isRequired,editorState:h.a.object.isRequired,modalHandler:h.a.object,config:h.a.object,mention:h.a.object,linkPopoverOpen:h.a.bool,translations:h.a.object},{textDecoration:t,heading:ye,fontSize:Ne,insert:cr,fontFamily:Be,list:rt,textAlign:yt,colorPicker:wt,link:Dt,mention:At,embedded:tn,emoji:hn,image:xn,remove:zn,history:Xn});function lr(e){return(lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pr(e,t){return(pr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dr(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=hr(n),t=(e=r?(e=hr(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===lr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function hr(e){return(hr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function yr(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"LINK"===n.getEntity(e).getType()},t)}function gr(c){var e,t=e=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pr(t,e);var n,a=dr(s);function s(){var o,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(o=a.call.apply(a,[this].concat(r))).state={open:!1},o.onDeleteLink=function(e){e.preventDefault(),e.stopPropagation();var e=c.getEditorState(),t=e.getSelection(),n=o.props,r=n.contentState,n=n.entityKey,e=Object(m.getEntityRange)(e,n),t=t.getIsBackward()?t.merge({anchorOffset:e.end,focusOffset:e.start}):t.merge({anchorOffset:e.start,focusOffset:e.end}),n=y.Modifier.setBlockType(r,t,"unstyled"),n=y.Modifier.removeRange(n,t,"backward");c.onChange(y.EditorState.push(c.getEditorState(),n,"remove-range"))},o.onEditLink=function(e){e.preventDefault(),e.stopPropagation(),c.onEditLink(),o.setState({open:!1})},o.onToggle=function(e){o.setState({open:e})},o}return t=s,(e=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.entityKey,e=e.contentState.getEntity(n).getData().url,n=this.state.open,t=g.a.createElement("span",{contentEditable:"false",suppressContentEditableWarning:!0},g.a.createElement(b.m,{appearance:"link"},t));return g.a.createElement(b.l,{trigger:t,appendToBody:!0,open:n,onToggle:this.onToggle},g.a.createElement("div",{contentEditable:"false",suppressContentEditableWarning:!0,className:"d-flex pl-5 py-5 pr-4 align-items-center"},g.a.createElement(b.h,{href:e,target:"_new",className:"Editor-link"},e),g.a.createElement("span",{className:"Editor-seperator"}),g.a.createElement("span",{className:"Editor-linkButtons",onClick:this.onEditLink},g.a.createElement(b.f,{name:"edit",size:20})),g.a.createElement("span",{className:"Editor-seperator"}),g.a.createElement("span",{className:"Editor-linkButtons",onClick:this.onDeleteLink},g.a.createElement(b.f,{name:"delete",size:20}))))}}])&&fr(t.prototype,e),n&&fr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component);return e.propTypes={entityKey:h.a.string.isRequired,children:h.a.array,contentState:h.a.object},t}function mr(){return(mr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function vr(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function br(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?vr(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):vr(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function _r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wr(e,t,n){return t&&_r(e.prototype,t),n&&_r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var t=wr(function e(t){var i=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.first=function(e){return null!=e&&e.length?e[0]:void 0},this.getMentionComponent=function(){function e(e){var o=e.entityKey,t=e.children,e=e.contentState.getEntity(o).getData().value;return i.renderer?i.renderer(t):(e=br(br({type:"input",name:e,clearButton:!1},i.chipOptions),{},{label:t,className:"Editor-mention-chip"}),g.a.createElement(b.c,mr({},e,{onClose:function(){var e=i.config,t=e.getEditorState(),n=t.getCurrentContent(),r=t.getSelection(),t=Object(m.getEntityRange)(t,o),r=r.getIsBackward()?r.merge({anchorOffset:t.end,focusOffset:t.start}):r.merge({anchorOffset:t.start,focusOffset:t.end+1}),t=y.Modifier.setBlockType(n,r,"unstyled"),t=y.Modifier.removeRange(t,r,"backward");e.onChange(y.EditorState.push(e.getEditorState(),t,"remove-range"))}})))}return e.propTypes={entityKey:h.a.number,children:h.a.array,contentState:h.a.object},e},this.getMentionDecorator=function(){return{strategy:i.findMentionEntities,component:i.getMentionComponent()}},this.config=t,this.chipOptions=t.chipOptions,this.renderer=t.renderer}),Sr=(t.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"MENTION"===n.getEntity(e).getType()},t)},t);function Er(e){return(Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Or(e,t){return(Or=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xr(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=kr(n),t=(e=r?(e=kr(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Er(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function kr(e){return(kr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Dr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tr(e,t,n){return t&&Dr(e.prototype,t),n&&Dr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ir(e){var t=e.block,t=(e=e.contentState.getEntity(t.getEntityAt(0)).getData()).src,n=e.height,e=e.width;return g.a.createElement("iframe",{height:n,width:e,src:t,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}var Mr=Tr(function e(t){var c=this,n=(jr(this,e),this.findSuggestionEntities=function(e,t){var n,r,o,i,a,s;c.config.getEditorState()&&(n=(i=c.config).separator,r=i.trigger,o=i.getSuggestions,a=i.getEditorState,i=i.fetchSuggestions,(a=a().getSelection()).get("anchorKey")===e.get("key")&&a.get("anchorKey")===a.get("focusKey")&&(s=n+r,(void 0===(a=(e=(e=e.getText()).substr(0,a.get("focusOffset")===e.length-1?e.length:a.get("focusOffset")+1)).lastIndexOf(n+r))||a<0)&&e[0]===r&&(a=0,s=r),0<=a&&(i||0<I(o(),e.substr(a+s.length,e.length),c.config.caseSensitive).length)&&t(0===a?0:a+1,e.length)))},this.getSuggestionComponent=function(){var e,t,c=this.config;return t=e=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Or(t,e);var r=xr(o);function o(){var s;jr(this,o);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(s=r.call.apply(r,[this].concat(t))).state={style:{left:15},activeOption:-1,showSuggestions:!0,showLoader:!1},s.onEditorKeyDown=function(e){var t=s.state.activeOption,n={};"ArrowDown"===e.key?(e.preventDefault(),t===s.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=Number(t)+1):"ArrowUp"===e.key?n.activeOption=t<=0?s.filteredSuggestions.length-1:Number(t)-1:"Escape"===e.key?(n.showSuggestions=!1,O()):"Enter"===e.key&&s.addMention(),s.setState(n)},s.onOptionMouseEnter=function(e){e=e.target.getAttribute("data-index");s.setState({activeOption:e})},s.onOptionMouseLeave=function(){s.setState({activeOption:-1})},s.setSuggestionReference=function(e){s.suggestion=e},s.setDropdownReference=function(e){s.dropdown=e},s.closeSuggestionDropdown=function(){s.setState({showSuggestions:!1})},s.filteredSuggestions=[],s.filterSuggestions=function(e){var t=c.getSuggestions?c.getSuggestions():[];s.filteredSuggestions=I(t,e,c.caseSensitive)},s.debouncedFetchSuggestion=function(n,e){var r,o=1<arguments.length&&void 0!==e?e:500;return function(){var e=arguments,t=this;clearTimeout(r),r=setTimeout(function(){return n.apply(t,e)},o)}}(function(e){c.fetchSuggestions(e).then(function(e){s.filteredSuggestions=e,s.setState({showSuggestions:0<e.length,showLoader:!1})})}),s.updateSuggestions=function(e){e=e.children[0].props.text.substr(1);c.fetchSuggestions?(s.setState({showLoader:!0}),s.debouncedFetchSuggestion(e)):s.filterSuggestions(e)},s.addMention=function(){var e,t,n=s.state.activeOption,r=c.getEditorState(),o=c.onChange,i=c.separator,a=c.trigger,n=s.filteredSuggestions[n];n&&(r=r,o=o,i=i,a=a,e=(n=n).label,t=n.value,n=n.url,t=r.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(a).concat(t),value:t,url:n}).getLastCreatedEntityKey(),n=Object(m.getSelectedBlock)(r).getText(),a=(i=(n.lastIndexOf(i+a)||0)+1)+e.length,n.length===i+1&&(a=n.length),n=r.getSelection().merge({anchorOffset:i,focusOffset:a}),a=y.EditorState.acceptSelection(r,n),r=y.Modifier.replaceText(a.getCurrentContent(),n,"".concat(e),null,t),n=(a=y.EditorState.push(a,r,"insert-characters")).getSelection().merge({anchorOffset:i+e.length,focusOffset:i+e.length}),a=y.EditorState.acceptSelection(a,n),r=y.Modifier.insertText(a.getCurrentContent(),n," ",a.getCurrentInlineStyle(),void 0),o(y.EditorState.push(a,r,"insert-characters")))},s.getOptionClass=function(e){var t,n=s.state.activeOption;return v()((Cr(t={},"Editor-dropdown-option",!0),Cr(t,"Editor-dropdown-option--highlight",e===n),t))},s.renderOption=function(e,t){var n,r=c.dropdownOptions,r=(void 0===r?{}:r).customOptionRenderer,o=e.icon,i=e.label;return r?(n=r(e,s.state.activeOption,t),g.a.cloneElement(n,{key:t,spellCheck:!1,onClick:function(e){s.addMention(e),n.props.onClick&&n.props.onClick()},"data-index":t,onMouseEnter:s.onOptionMouseEnter,onMouseLeave:s.onOptionMouseLeave})):g.a.createElement("span",{key:t,spellCheck:!1,onClick:s.addMention,"data-index":t,onMouseEnter:s.onOptionMouseEnter,onMouseLeave:s.onOptionMouseLeave,className:s.getOptionClass(t)},o&&g.a.createElement(b.f,{name:o,className:"mr-4"}),g.a.createElement(b.m,null,i))},s}return Tr(o,[{key:"componentDidMount",value:function(){E.registerCallBack(this.onEditorKeyDown),C(),c.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.updateSuggestions(this.props),this.setState({showSuggestions:!0})}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.updateSuggestions(this.props),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){E.deregisterCallBack(this.onEditorKeyDown),O(),c.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e,n=this,t=this.props.children,r=this.state.showSuggestions,o=c.dropdownOptions,o=(void 0===o?{}:o).dropdownClassName,o=v()((Cr(e={},"Popover",!0),Cr(e,"".concat(o),void 0!==o),Cr(e,"Editor-mention-dropdown",!0),e));return g.a.createElement("span",{className:"Editor-mention-suggestion",ref:this.setSuggestionReference,onClick:c.modalHandler.onSuggestionClick,"aria-haspopup":"true"},g.a.createElement("span",null,t),r&&g.a.createElement(b.l,{position:"bottom-start",open:!0,appendToBody:!0,className:o,contentEditable:"false",suppressContentEditableWarning:!0,ref:this.setDropdownReference},this.state.showLoader?g.a.createElement("span",{className:"Editor-dropdown-option"},g.a.createElement(b.j,{withImage:!1},g.a.createElement(b.k,{length:"large"}),g.a.createElement(b.k,{length:"large"}),g.a.createElement(b.k,{length:"large"}))):this.filteredSuggestions.map(function(e,t){return n.renderOption(e,t)})))}}]),o}(d.Component),e.propTypes={children:h.a.array},t}.bind(this),this.getSuggestionDecorator=function(){return{strategy:c.findSuggestionEntities,component:c.getSuggestionComponent()}},t.separator),r=t.trigger,o=t.getSuggestions,i=t.onChange,a=t.getEditorState,s=t.getWrapperRef,u=t.caseSensitive,l=t.optionClassName,f=t.modalHandler,p=t.dropdownOptions,t=t.fetchSuggestions;this.config={separator:void 0===n?" ":n,trigger:void 0===r?"@":r,getSuggestions:o,onChange:i,getEditorState:a,getWrapperRef:s,caseSensitive:u,dropdownOptions:p,optionClassName:l,modalHandler:f,fetchSuggestions:t}}),Nr=function(e){return[new Sr(e).getMentionDecorator(),new Mr(e).getSuggestionDecorator()]},Ar=(Ir.propTypes={block:h.a.object,contentState:h.a.object},Ir);function Pr(e){return(Pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lr(e,t){return(Lr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fr(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Br(n),t=(e=r?(e=Br(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Pr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Br(e){return(Br=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zr=function(c){var e,t=e=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lr(t,e);var n,a=Fr(s);function s(){var r,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=a.call.apply(a,[this].concat(o))).state={hovered:!1},r.setEntityAlignmentLeft=function(){r.setEntityAlignment("left")},r.setEntityAlignmentRight=function(){r.setEntityAlignment("right")},r.setEntityAlignmentCenter=function(){r.setEntityAlignment("none")},r.setEntityAlignment=function(e){var t=r.props,n=t.block,t=t.contentState,n=n.getEntityAt(0);t.mergeEntityData(n,{alignment:e}),c.onChange(y.EditorState.push(c.getEditorState(),t,"change-block-data"))},r.removeEntity=function(e){e.preventDefault(),e.stopPropagation();var e=r.props,t=e.block,e=e.contentState,t=t.getKey(),n=e.getKeyAfter(t),t=new y.SelectionState({anchorKey:t,anchorOffset:0,focusKey:n,focusOffset:0}),n=y.Modifier.setBlockType(e,t,"unstyled"),n=y.Modifier.removeRange(n,t,"backward");c.onChange(y.EditorState.push(c.getEditorState(),n,"remove-range"))},r.toggleHovered=function(){r.setState({hovered:!0})},r}return t=s,(e=[{key:"renderAlignmentOptions",value:function(){return g.a.createElement(b.l,{position:"bottom-end",appendToBody:!1,open:!0},g.a.createElement("div",{className:"d-flex"},g.a.createElement("div",{onClick:this.setEntityAlignmentLeft,className:"Editor-image-options"},g.a.createElement(b.f,{name:"format_align_left",size:20})),g.a.createElement("div",{onClick:this.setEntityAlignmentCenter,className:"Editor-image-options"},g.a.createElement(b.f,{name:"format_align_center",size:20})),g.a.createElement("div",{onClick:this.setEntityAlignmentRight,className:"Editor-image-options"},g.a.createElement(b.f,{name:"format_align_right",size:20})),g.a.createElement("div",{onClick:this.removeEntity,className:"Editor-image-options"},g.a.createElement(b.f,{name:"delete",size:20}))))}},{key:"render",value:function(){var e=this.props,t=e.block,e=e.contentState,n=this.state.hovered,r=c.isImageAlignmentEnabled,e=e.getEntity(t.getEntityAt(0)).getData(),t=e.src,o=e.alignment,i=e.height,a=e.width,e=e.alt,s=v()({"d-flex":!0,"justify-content-end":"right"===o,"justify-content-center":!o||"none"===o});return g.a.createElement("div",{onClick:this.toggleHovered,className:s},g.a.createElement("span",{className:"position-relative"},g.a.createElement("img",{src:t,alt:e,style:{height:i,width:a}}),n&&r()&&this.renderAlignmentOptions(o)))}}])&&Rr(t.prototype,e),n&&Rr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component);return e.propTypes={block:h.a.object,contentState:h.a.object},t},Kr=function(n,r){return function(e){if("function"==typeof r){var t=r(e,n,n.getEditorState);if(t)return t}if("atomic"===e.getType()){t=n.getEditorState().getCurrentContent().getEntity(e.getEntityAt(0));if(t&&"IMAGE"===t.type)return{component:zr(n),editable:!1};if(t&&"EMBEDDED_LINK"===t.type)return{component:Ar,editable:!1}}}},Hr=["var(--text)","var(--secondary)","var(--success)","var(--primary)","var(--alert)","var(--accent1)"],Ur={options:["heading","textDecoration","colorPicker","list","insert"],textDecoration:{max:3,options:["bold","italic","underline","strikethrough"],bold:{icon:"format_bold",title:"Bold (cmd+B)",label:"Bold"},italic:{icon:"format_italic",title:"Italic (cmd+I)",label:"Italic"},underline:{icon:"format_underlined",title:"Underline (cmd+U)",label:"Underline"},strikethrough:{icon:"strikethrough_s",title:"Strikethrough",label:"Strikethrough"}},heading:{icon:"format_size",options:["H1","H2","H3","H4"]},list:{options:["unordered","ordered"],unordered:{icon:"format_list_bulleted",title:"Unordered"},ordered:{icon:"format_list_numbered",title:"Ordered"}},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",colors:Hr},insert:{max:3,options:["image","mention","link"],image:{icon:"insert_photo",isVisible:!0,title:"Image",alt:"",defaultSize:{height:"100px",width:"300px"},inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",uploadCallback:function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(e){return t({data:{link:r.result}})},r.onerror=function(e){return n(e)},r.readAsDataURL(e)})}},link:{isVisible:!0,icon:"insert_link",linkCallback:void 0,title:"Link"},mention:{isVisible:!0,icon:"alternate_email",title:"Personalization"}},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0}},ye={title:h.a.string,label:h.a.string},Ne={isVisible:h.a.bool,title:h.a.string,alt:h.a.string,uploadCallback:h.a.func,defaultSize:h.a.shape({height:h.a.string,width:h.a.string})},cr={isVisible:h.a.bool,title:h.a.string},Be=h.a.shape({textDecoration:h.a.shape({max:h.a.number,bold:h.a.shape(ye),italic:h.a.shape(ye),underline:h.a.shape(ye),strikethrough:h.a.shape(ye)}),colorPicker:h.a.shape({colors:h.a.arrayOf(h.a.string)}),insert:h.a.shape({max:h.a.number,image:h.a.shape(Ne),link:h.a.shape(cr)})});o(213),o(94),o(95),o(96),o(97),o(98);o(99),o(100),o(101);function qr(e){return(qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wr(){return(Wr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Vr(e){return function(e){if(Array.isArray(e))return Gr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Gr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yr(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function $r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Yr(Object(n),!0).forEach(function(e){Zr(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Zr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xr(e,t){return(Xr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qr(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=eo(n),t=(e=r?(e=eo(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===qr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function eo(e){return(eo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rt=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xr(t,e);var n,r=Qr(o);function o(e){var a;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(a=r.call(this,e)).onEditorBlur=function(){a.setState({editorFocused:!1})},a.onEditorFocus=function(e){var t=a.props.onFocus,n=(a.setState({editorFocused:!0}),a.focusHandler.isEditorFocused());t&&n&&t(e)},a.onEditorMouseDown=function(){a.focusHandler.onEditorMouseDown()},a.keyBindingFn=function(e){var t;if("Tab"===e.key)return n=a.props.onTab,(t=Object(m.changeDepth)(a.state.editorState,e.shiftKey?-1:1,4))&&t!==a.state.editorState&&(a.onChange(t),e.preventDefault()),n&&n(e,t),null;if("ArrowUp"!==e.key&&"ArrowDown"!==e.key||x()&&e.preventDefault(),"Backspace"===e.key&&a.isEmptyListBlock()){var n=y.RichUtils.toggleBlockType(a.state.editorState);if(n)return a.onChange(n),a.setState({editorState:y.EditorState.moveFocusToEnd(y.EditorState.createEmpty())}),!0}return Object(y.getDefaultKeyBinding)(e)},a.onToolbarFocus=function(e){var t=a.props.onFocus;t&&a.focusHandler.isToolbarFocused()&&t(e)},a.onWrapperBlur=function(e){var t=a.props.onBlur;t&&a.focusHandler.isEditorBlur(e)&&t(e,a.getEditorState())},a.onChange=function(e,t){var n=a.props,r=n.readOnly,n=n.onEditorStateChange;r||"atomic"===Object(m.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(n&&n(e,a.props.wrapperId),T(a.props,"editorState")?a.afterChange(e):a.setState({editorState:e},a.afterChange(e)))},a.setWrapperReference=function(e){a.wrapper=e},a.setEditorReference=function(e){a.props.editorRef&&a.props.editorRef(e),a.editor=e},a.onCloseLinkPopover=function(){a.setState({linkPopoverOpen:!1})},a.onEditLink=function(){a.setState($r($r({},a.state),{},{linkPopoverOpen:!0}))},a.getCompositeDecorator=function(e){var t=[{strategy:yr,component:gr({focusHandler:a.focusHandler,getEditorState:a.getEditorState,onChange:a.onChange,onEditLink:a.onEditLink})}];return a.props.mention&&t.push.apply(t,Vr(Nr($r($r({},a.props.mention),{},{onChange:a.onChange,getEditorState:a.getEditorState,getSuggestions:a.getSuggestions,getWrapperRef:a.getWrapperRef,modalHandler:a.modalHandler})))),new y.CompositeDecorator(t)},a.getWrapperRef=function(){return a.wrapper},a.getEditorState=function(){return a.state?a.state.editorState:null},a.getSuggestions=function(){return a.props.mention&&a.props.mention.suggestions},a.afterChange=function(t){setTimeout(function(){var e=a.props.onContentStateChange;e&&e(Object(y.convertToRaw)(t.getCurrentContent()))})},a.isReadOnly=function(){return a.props.readOnly},a.isImageAlignmentEnabled=function(){return a.state.toolbar.image.alignmentEnabled},a.createEditorState=function(e){var t,n;return T(a.props,"editorState")?a.props.editorState&&(t=y.EditorState.set(a.props.editorState,{decorator:e})):T(a.props,"defaultEditorState")?a.props.defaultEditorState&&(t=y.EditorState.set(a.props.defaultEditorState,{decorator:e})):T(a.props,"contentState")?a.props.contentState&&(n=Object(y.convertFromRaw)(a.props.contentState),t=y.EditorState.createWithContent(n,e),t=y.EditorState.moveSelectionToEnd(t)):!T(a.props,"defaultContentState")||(n=a.props.defaultContentState)&&(n=Object(y.convertFromRaw)(n),t=y.EditorState.createWithContent(n,e),t=y.EditorState.moveSelectionToEnd(t)),t=t||y.EditorState.createEmpty(e)},a.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","wrapperClassName","editorStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],e=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),r={},e&&0<e.length&&e.forEach(function(e){r[e]=t[e]}),r;var t,n,r},a.getStyleMap=function(e){return $r($r({},Object(m.getCustomStyleMap)()),e.customStyleMap)},a.changeEditorState=function(e){var e=Object(y.convertFromRaw)(e),t=a.state.editorState,t=y.EditorState.push(t,e,"insert-characters");return y.EditorState.moveSelectionToEnd(t)},a.focusEditor=function(){setTimeout(function(){a.editor.focus()})},a.handleKeyCommand=function(e){var t=a.state,n=t.editorState,t=t.toolbar.textDecoration;if(t&&0<=t.options.indexOf(e)){t=y.RichUtils.handleKeyCommand(n,e);if(t)return a.onChange(t),!0}return!1},a.handleReturn=function(e){if(x())return!0;var t=a.state.editorState,t=Object(m.handleNewLine)(t,e);return!!t&&(a.onChange(t),!0)},a.handlePastedTextFn=function(e,t){var n,r,o=a.state.editorState,i=a.props.handlePastedText;return i?i(e,t,o,a.onChange):(i=e,e=t,t=o,o=a.onChange,(r=Object(m.getSelectedBlock)(t))&&"code"===r.type?(r=y.Modifier.replaceText(t.getCurrentContent(),t.getSelection(),i,t.getCurrentInlineStyle()),o(y.EditorState.push(t,r,"insert-characters")),!0):!!e&&(i=s()(e),n=t.getCurrentContent(),i.entityMap.forEach(function(e,t){n=n.mergeEntityData(t,e)}),n=y.Modifier.replaceWithFragment(n,t.getSelection(),new c.List(i.contentBlocks)),o(y.EditorState.push(t,n,"insert-characters")),!0))},a.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?a.focusHandler.onInputMouseDown():e.preventDefault()},a.isEmptyListBlock=function(){var e=a.state.editorState.getCurrentContent();return!e.hasText()&&"unstyled"!==e.getBlockMap().first().getType()},a.blockRenderMap=y.DefaultDraftBlockRenderMap.merge(Object(c.Map)({"header-one":{wrapper:g.a.createElement(b.e,{size:"xxl"},a.props.children)},"header-two":{wrapper:g.a.createElement(b.e,{size:"xl"},a.props.children)},"header-three":{wrapper:g.a.createElement(b.e,{size:"l"},a.props.children)},"header-four":{wrapper:g.a.createElement(b.e,{size:"m"},a.props.children)},unstyled:{element:"p",wrapper:g.a.createElement("div",null,a.props.children)}}));var t=N(Ur,e.toolbar),n=e.wrapperId||Math.floor(1e4*Math.random()),n=(a.wrapperId="Editor-wrapper-".concat(n),a.modalHandler=new l,a.focusHandler=new w,a.blockRendererFn=Kr({isReadOnly:!0,isImageAlignmentEnabled:a.isImageAlignmentEnabled,getEditorState:a.getEditorState,onChange:a.onChange}),a.editorProps=a.filterEditorProps(e),a.customStyleMap=a.getStyleMap(e),a.compositeDecorator=a.getCompositeDecorator(t),a.createEditorState(a.compositeDecorator));return Object(m.extractInlineStyle)(n),a.state={editorState:n,toolbar:t,editorFocused:!1,linkPopoverOpen:!1},a}return t=o,(e=[{key:"componentDidMount",value:function(){this.props.autoFocus&&this.editor.focus(),this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o;e!==this.props&&(t={},n=(r=this.props).editorState,r=r.contentState,this.state.toolbar||(o=N(Ur,o),t.toolbar=o),T(this.props,"editorState")&&n!==e.editorState?t.editorState=n?y.EditorState.set(n,{decorator:this.compositeDecorator}):y.EditorState.createEmpty(this.compositeDecorator):T(this.props,"contentState")&&r!==e.contentState&&(r?(o=this.changeEditorState(r))&&(t.editorState=o):t.editorState=y.EditorState.createEmpty(this.compositeDecorator)),e.editorState===n&&e.contentState===r||Object(m.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props))}},{key:"render",value:function(){var e=this.state,t=e.editorState,r=(e.editorFocused,e.toolbar),e=this.props,n=e.toolbarClassName,o=e.editorClassName,i=e.wrapperClassName,a=e.editorStyle,s=e.ariaLabel,c=e.mention,u={linkPopoverOpen:this.state.linkPopoverOpen,onCloseLinkPopover:this.onCloseLinkPopover,modalHandler:this.modalHandler,editorState:t,onChange:this.onChange},e=v()(Zr({},"Editor-toolbar",!0),n),n=v()(Zr({},"Editor-wrapper",!0),i),i=v()((Zr(i={},"Editor",!0),Zr(i,"hide-placeholder",this.isEmptyListBlock()),i),o);return g.a.createElement("div",{id:this.wrapperId,className:n,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur},this.props.showToolbar&&g.a.createElement("div",{className:e,onMouseDown:this.preventDefault,"aria-label":"Editor-toolbar",onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=ur[e],e=r[e];return g.a.createElement(n,Wr({key:t},u,{config:e,mention:c,className:"Editor-toolbar-options"}))})),g.a.createElement("div",{ref:this.setWrapperReference,className:i,style:a,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:E.onKeyDown,onMouseDown:this.onEditorMouseDown},g.a.createElement(y.Editor,Wr({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:k,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:s,blockRenderMap:this.blockRenderMap},this.editorProps))))}}])&&Jr(t.prototype,e),n&&Jr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),to=(rt.utils={EditorState:y.EditorState,ContentState:y.ContentState,RichUtils:y.RichUtils,convertFromRaw:y.convertFromRaw,convertToRaw:y.convertToRaw,htmlToState:function(e){var e=s()(e);if(e)return{contentState:e=y.ContentState.createFromBlockArray(e.contentBlocks),editorState:y.EditorState.createWithContent(e)}},stateToHTML:function(e){e=Object(y.convertToRaw)(e.getCurrentContent());return n()(e,{},!1,function(e){var t=e.type,e=e.data;if("IMAGE"===t)return t=e.alignment||"center",'\n <p style="justify-content:'.concat(t,'; display:flex">\n <img src="').concat(e.src,'" alt="').concat(e.alt,'" style="height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n ')})}},rt.propTypes={mention:h.a.shape({separator:h.a.string,trigger:h.a.string,chipOptions:h.a.object,dropdownOptions:h.a.shape({dropdownClassName:h.a.string,customOptionRenderer:h.a.func}),renderer:h.a.func,suggestions:h.a.shape({label:h.a.string,value:h.a.string,icon:h.a.string}),fetchSuggestions:h.a.func}),editorState:h.a.object,onEditorStateChange:h.a.func,defaultEditorState:h.a.object,onContentStateChange:h.a.func,defaultContentState:h.a.object,contentState:h.a.object,spellCheck:h.a.bool,toolbar:Be,showToolbar:h.a.bool,editorClassName:h.a.string,wrapperClassName:h.a.string,toolbarClassName:h.a.string,editorStyle:h.a.object,onFocus:h.a.func,onBlur:h.a.func,onTab:h.a.func,textAlignment:h.a.oneOf(["left","right","center"]),readOnly:h.a.bool,autoFocus:h.a.bool,placeholder:h.a.string,ariaLabel:h.a.string,wrapperId:h.a.number,editorRef:h.a.func,handlePastedText:h.a.func},rt.defaultProps={autoFocus:!0,showToolbar:!0},rt),no=o(49),ro=o.n(no),oo=o(50);function io(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function ao(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?io(Object(n),!0).forEach(function(e){so(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):io(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function so(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function co(e){return function(e){if(Array.isArray(e))return uo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return uo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uo(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lo(e){return e.map(function(e){return[e,g.a.createElement("br",null)]})}function fo(e,n){return g.a.createElement(g.a.Fragment,null,e.map(function(e,t){return g.a.createElement("li",{key:n[t]},e)}))}function po(e,t){var n=void 0===(n=t.entities)?{}:n,r=void 0===(r=t.headings)?{}:r,o=void 0===(o=t.list)?{}:o,t=void 0===(t=t.colors)?[]:t,n=ao(ao({},_o),n),r=ao(ao({},vo),r),o=ao(ao({},bo),o),r=ao(ao(ao({},wo),r),o),o=ao(ao({},go),So(t)),t={blocks:r,entities:n,styles:Object(no.createStylesRenderer)(mo,o)};return ro()(e,t,!1)}function ho(e){var t=e.raw,n=e.entities,r=e.headings,o=e.list,e=e.colors;return(t=t&&po(t,{entities:n,headings:r,list:o,colors:e}))?g.a.createElement(g.a.Fragment,null,t):null}var yo={padding:"0px",margin:"0px"},go={BOLD:{fontWeight:"bold"},ITALIC:{fontStyle:"italic"},UNDERLINE:{textDecoration:"underline"},STRIKETHROUGH:{textDecoration:"line-through"}},mo=function(e){var t=e.children,n=e.style,e=e.key;return g.a.createElement("span",{key:e,style:n},t)},vo={"header-one":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(b.e,{size:"xxl",key:n[t]},e)})},"header-two":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(b.e,{size:"xl",key:n[t]},e)})},"header-three":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(b.e,{size:"l",key:n[t]},e)})},"header-four":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(b.e,{size:"m",key:n[t]},e)})}},bo={"unordered-list-item":function(e,t){t=t.keys;return g.a.createElement("ul",{style:yo},fo(e,t))},"ordered-list-item":function(e,t){t=t.keys;return g.a.createElement("ol",{style:yo},fo(e,t))}},_o={LINK:function(e,t,n){n=n.key;return g.a.createElement(b.h,{key:n,href:t.url},e)},IMAGE:function(e,t){var n=t.src,r=t.alt,o=t.height,i=t.width,t=t.alignment;return g.a.createElement("p",{style:{justifyContent:t||"center",display:"flex"}},g.a.createElement("img",{src:n,alt:r,height:o,width:i}))},MENTION:function(e,t,n){n=n.key;return g.a.createElement(b.c,{label:e,name:t.value,key:n,type:"input"})}},wo={unstyled:function(e,t,n){var r,t=t.keys;return r=t,g.a.createElement(g.a.Fragment,null,e.map(function(e,t){var n=1<e.length&&e[1][0];return n&&n.includes("\n")?(n=n.split("\n"),g.a.createElement(b.i,{key:r[t]},lo(n))):g.a.createElement(b.i,{key:r[t]},lo(e))}))},atomic:function(e,t){return e[0]}},So=function(e){return[].concat(co(Hr),co(e)).reduce(function(e,t){var n="color-".concat(t),t={color:t};return ao(ao({},e),{},so({},n,t))},{})},Eo=(ho.utils={convertToHTML:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!e)return"";var n,r,e=po(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{});return e&&Object(oo.renderToStaticMarkup)(e)?(n=(r=o(230)).name,r=r.version,n="https://s3.us-east-1.amazonaws.com/webui-assets/".concat(n,"/v").concat(r,"/design-system.css"),r=t?'<link rel="stylesheet" href="'.concat(n,'">'):"","".concat(r," ").concat(Object(oo.renderToStaticMarkup)(e))):""}},ho.propTypes={raw:h.a.object.isRequired,colors:h.a.arrayOf(h.a.string),list:h.a.object,headings:h.a.object,entities:h.a.object},ho.defaultProps={entities:{},headings:{},list:{},colors:[]},ho)}]);
|
|
57
|
+
*/var S=e(17),E=e(0);function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var e="function"==typeof Symbol&&Symbol.for,s=e?Symbol.for("react.portal"):60106,c=e?Symbol.for("react.fragment"):60107,u=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,p=e?Symbol.for("react.provider"):60109,f=e?Symbol.for("react.context"):60110,F=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,B=e?Symbol.for("react.suspense_list"):60120,z=e?Symbol.for("react.memo"):60115,K=e?Symbol.for("react.lazy"):60116,H=e?Symbol.for("react.block"):60121,U=e?Symbol.for("react.fundamental"):60117,q=e?Symbol.for("react.scope"):60119;function g(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case c:return"Fragment";case s:return"Portal";case l:return"Profiler";case u:return"StrictMode";case h:return"Suspense";case B:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case f:return"Context.Consumer";case p:return"Context.Provider";case d:var t=(t=e.render).displayName||t.name||"";return e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case z:return g(e.type);case H:return g(e.render);case K:if(e=1===e._status?e._result:null)return g(e)}return null}var e=E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=(e.hasOwnProperty("ReactCurrentDispatcher")||(e.ReactCurrentDispatcher={current:null}),e.hasOwnProperty("ReactCurrentBatchConfig")||(e.ReactCurrentBatchConfig={suspense:null}),{});function m(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var y=new Uint16Array(16),t=0;t<15;t++)y[t]=t+1;y[15]=0;var V=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,G=Object.prototype.hasOwnProperty,Y={},$={};function Z(e){return G.call($,e)||!G.call(Y,e)&&(V.test(e)?$[e]=!0:void(Y[e]=!0))}function J(e,t,n,r){if(null==t||function(e,t,n,r){if(null===n||0!==n.type)switch(typeof t){case"function":case"symbol":return 1;case"boolean":return r?void 0:null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e;default:return}}(e,t,n,r))return 1;if(!r&&null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||t<1}}function n(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var O={},r=("children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){O[e]=new n(e,0,!1,e,null,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];O[t]=new n(t,1,!1,e[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){O[e]=new n(e,2,!1,e.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){O[e]=new n(e,2,!1,e,null,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){O[e]=new n(e,3,!1,e.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(e){O[e]=new n(e,3,!0,e,null,!1)}),["capture","download"].forEach(function(e){O[e]=new n(e,4,!1,e,null,!1)}),["cols","rows","size","span"].forEach(function(e){O[e]=new n(e,6,!1,e,null,!1)}),["rowSpan","start"].forEach(function(e){O[e]=new n(e,5,!1,e.toLowerCase(),null,!1)}),/[\-:]([a-z])/g);function o(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(r,o);O[t]=new n(t,1,!1,e,null,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(r,o);O[t]=new n(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(r,o);O[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(e){O[e]=new n(e,1,!1,e.toLowerCase(),null,!1)}),O.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(e){O[e]=new n(e,1,!1,e.toLowerCase(),null,!0)});var X=/["'&<>]/;function x(e){if("boolean"==typeof e||"number"==typeof e)return""+e;var t=X.exec(e=""+e);if(t){for(var n="",r=0,o=t.index;o<e.length;o++){switch(e.charCodeAt(o)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}r!==o&&(n+=e.substring(r,o)),r=o+1,n+=t}e=r!==o?n+e.substring(r,o):n}return e}var Q="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},v=null,i=null,a=null,b=!1,_=!1,w=null,k=0;function D(){if(null===v)throw Error(C(321));return v}function ee(){if(0<k)throw Error(C(312));return{memoizedState:null,queue:null,next:null}}function T(){return null===a?null===i?(b=!1,i=a=ee()):(b=!0,a=i):a=null===a.next?(b=!1,a.next=ee()):(b=!0,a.next),a}function te(e,t,n,r){for(;_;)_=!1,k+=1,a=null,n=e(t,r);return i=v=null,k=0,a=w=null,n}function ne(e,t){return"function"==typeof t?t(e):t}function re(e,t,n){if(v=D(),a=T(),b){var r=a.queue;if(t=r.dispatch,null===w||void 0===(n=w.get(r)))return[a.memoizedState,t];for(w.delete(r),r=a.memoizedState;r=e(r,n.action),null!==(n=n.next););return[a.memoizedState=r,t]}return e=e===ne?"function"==typeof t?t():t:void 0!==n?n(t):t,a.memoizedState=e,e=(e=a.queue={last:null,dispatch:null}).dispatch=function(e,t,n){if(!(k<25))throw Error(C(301));if(e===v)if(_=!0,e={action:n,next:null},null===w&&(w=new Map),void 0===(n=w.get(t)))w.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}.bind(null,v,e),[a.memoizedState,e]}function j(){}var I=0,oe={readContext:function(e){var t=I;return m(e,t),e[t]},useContext:function(e){D();var t=I;return m(e,t),e[t]},useMemo:function(e,t){if(v=D(),t=void 0===t?null:t,null!==(a=T())){var n=a.memoizedState;if(null!==n&&null!==t){e:{var r=n[1];if(null===r)r=!1;else{for(var o=0;o<r.length&&o<t.length;o++)if(!Q(t[o],r[o])){r=!1;break e}r=!0}}if(r)return n[0]}}return e=e(),a.memoizedState=[e,t],e},useReducer:re,useRef:function(e){v=D();var t=(a=T()).memoizedState;return null===t?a.memoizedState=e={current:e}:t},useState:function(e){return re(ne,e)},useLayoutEffect:function(){},useCallback:function(e){return e},useImperativeHandle:j,useEffect:j,useDebugValue:j,useResponder:function(e,t){return{props:t,responder:e}},useDeferredValue:function(e){return D(),e},useTransition:function(){return D(),[function(e){e()},!1]}},ie="http://www.w3.org/1999/xhtml";function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var se={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},ce=S({menuitem:!0},se),M={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ue=["Webkit","ms","Moz","O"],le=(Object.keys(M).forEach(function(t){ue.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),M[e]=M[t]})}),/([A-Z])/g),fe=/^ms-/,N=E.Children.toArray,A=e.ReactCurrentDispatcher,pe={listing:!0,pre:!0,textarea:!0},de=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,he={},P={};var ye=Object.prototype.hasOwnProperty,ge={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function me(e,t){if(void 0===e)throw Error(C(152,g(t)||"Component"))}function ve(d,h,y){function e(e,t){var n=t.prototype&&t.prototype.isReactComponent,r=function(e,t,n,r){if(r&&("object"==typeof(r=e.contextType)&&null!==r))return m(r,n),r[n];if(e=e.contextTypes){for(var o in n={},e)n[o]=t[o];t=n}else t=W;return t}(t,h,y,n),o=[],i=!1,a={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===o)return null},enqueueReplaceState:function(e,t){i=!0,o=[t]},enqueueSetState:function(e,t){if(null===o)return null;o.push(t)}};if(n){n=new t(e.props,r,a);"function"==typeof t.getDerivedStateFromProps&&null!=(c=t.getDerivedStateFromProps.call(null,e.props,n.state))&&(n.state=S({},n.state,c))}else if(v={},n=t(e.props,r,a),null==(n=te(t,e.props,n,r))||null==n.render)return void me(d=n,t);if(n.props=e.props,n.context=r,n.updater=a,void 0===(a=n.state)&&(n.state=a=null),"function"==typeof n.UNSAFE_componentWillMount||"function"==typeof n.componentWillMount)if("function"==typeof n.componentWillMount&&"function"!=typeof t.getDerivedStateFromProps&&n.componentWillMount(),"function"==typeof n.UNSAFE_componentWillMount&&"function"!=typeof t.getDerivedStateFromProps&&n.UNSAFE_componentWillMount(),o.length){var a=o,s=i,o=null,i=!1;if(s&&1===a.length)n.state=a[0];else{for(var c=s?a[0]:n.state,u=!0,s=s?1:0;s<a.length;s++){var l=a[s];null!=(l="function"==typeof l?l.call(n,c,e.props,r):l)&&(u?(u=!1,c=S({},c,l)):S(c,l))}n.state=c}}else o=null;if(me(d=n.render(),t),"function"==typeof n.getChildContext&&"object"==typeof(e=t.childContextTypes)){var f,p=n.getChildContext();for(f in p)if(!(f in e))throw Error(C(108,g(t)||"Unknown",f))}p&&(h=S({},h,p))}for(;E.isValidElement(d);){var t=d,n=t.type;if("function"!=typeof n)break;e(t,n)}return{child:d,context:h}}(e=_e.prototype).destroy=function(){var e;this.exhausted||(this.exhausted=!0,this.clearProviders(),e=this.threadID,y[e]=y[0],y[0]=e)},e.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,r=this.threadID,o=(m(n,r),n[r]);this.contextStack[t]=n,this.contextValueStack[t]=o,n[r]=e.props.value},e.popProvider=function(){var e=this.contextIndex,t=this.contextStack[e],n=this.contextValueStack[e];this.contextStack[e]=null,this.contextValueStack[e]=null,this.contextIndex--,t[this.threadID]=n},e.clearProviders=function(){for(var e=this.contextIndex;0<=e;e--)this.contextStack[e][this.threadID]=this.contextValueStack[e]},e.read=function(e){if(this.exhausted)return null;var t=I,n=(I=this.threadID,A.current);A.current=oe;try{for(var r=[""],o=!1;r[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var i=this.threadID;y[i]=y[0],y[0]=i;break}var a=this.stack[this.stack.length-1];if(o||a.childIndex>=a.children.length){var s=a.footer;if(""!==s&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===a.type)this.currentSelectValue=null;else if(null!=a.type&&null!=a.type.type&&a.type.type.$$typeof===p)this.popProvider(a.type);else if(a.type===h){this.suspenseDepth--;var c=r.pop();if(o){var o=!1,u=a.fallbackFrame;if(!u)throw Error(C(303));this.stack.push(u),r[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}r[this.suspenseDepth]+=c}r[this.suspenseDepth]+=s}else{var l=a.children[a.childIndex++],f="";try{f+=this.render(l,a.context,a.domNamespace)}catch(e){if(null!=e&&"function"==typeof e.then)throw Error(C(294));throw e}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=f}}return r[0]}finally{A.current=n,I=t}},e.render=function(e,t,n){if("string"==typeof e||"number"==typeof e)return""===(n=""+e)?"":this.makeStaticMarkup?x(n):this.previousWasTextNode?"\x3c!-- --\x3e"+x(n):(this.previousWasTextNode=!0,x(n));if(e=(t=ve(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!E.isValidElement(e)){if(null==e||null==e.$$typeof)return e=N(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";if((n=e.$$typeof)===s)throw Error(C(257));throw Error(C(258,n.toString()))}var r,o=e.type;if("string"==typeof o)return this.renderDOM(e,t,n);switch(o){case u:case F:case l:case B:case c:return e=N(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case h:throw Error(C(294))}if("object"==typeof o&&null!==o)switch(o.$$typeof){case d:v={};var i=o.render(e.props,e.ref),i=te(o.render,e.props,i,e.ref);return i=N(i),this.stack.push({type:null,domNamespace:n,children:i,childIndex:0,context:t,footer:""}),"";case z:return e=[E.createElement(o.type,S({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case p:return n={type:e,domNamespace:n,children:o=N(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case f:o=e.type,i=e.props;var a=this.threadID;return m(o,a),o=N(i.children(o[a])),this.stack.push({type:e,domNamespace:n,children:o,childIndex:0,context:t,footer:""}),"";case U:throw Error(C(338));case K:switch(o=e.type,-1===(r=o)._status&&(r._status=0,i=(i=r._ctor)(),(r._result=i).then(function(e){0===r._status&&(e=e.default,r._status=1,r._result=e)},function(e){0===r._status&&(r._status=2,r._result=e)})),o._status){case 1:return e=[E.createElement(o._result,S({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case 2:throw o._result;default:throw Error(C(295))}case q:throw Error(C(343))}throw Error(C(130,null==o?o:typeof o,""))},e.renderDOM=function(e,t,n){var r=e.type.toLowerCase();if(n===ie&&ae(r),!he.hasOwnProperty(r)){if(!de.test(r))throw Error(C(65,r));he[r]=!0}var o,i,a,s,c=e.props;if("input"===r)c=S({type:void 0},c,{defaultChecked:void 0,defaultValue:void 0,value:null!=c.value?c.value:c.defaultValue,checked:null!=c.checked?c.checked:c.defaultChecked});else if("textarea"===r){if(null==(u=c.value)){var u=c.defaultValue,l=c.children;if(null!=l){if(null!=u)throw Error(C(92));if(Array.isArray(l)){if(!(l.length<=1))throw Error(C(93));l=l[0]}u=""+l}null==u&&(u="")}c=S({},c,{value:void 0,children:""+u})}else if("select"===r)this.currentSelectValue=null!=c.value?c.value:c.defaultValue,c=S({},c,{value:void 0});else if("option"===r){var l=this.currentSelectValue,f=function(e){if(null==e)return e;var t="";return E.Children.forEach(e,function(e){null!=e&&(t+=e)}),t}(c.children);if(null!=l){var p=null!=c.value?c.value+"":f;if(u=!1,Array.isArray(l)){for(var d=0;d<l.length;d++)if(""+l[d]===p){u=!0;break}}else u=""+l===p;c=S({selected:void 0,children:void 0},c,{selected:u,children:f})}}if(u=c){if(ce[r]&&(null!=u.children||null!=u.dangerouslySetInnerHTML))throw Error(C(137,r,""));if(null!=u.dangerouslySetInnerHTML){if(null!=u.children)throw Error(C(60));if(!("object"==typeof u.dangerouslySetInnerHTML&&"__html"in u.dangerouslySetInnerHTML))throw Error(C(61))}if(null!=u.style&&"object"!=typeof u.style)throw Error(C(62,""))}for(w in u=c,l=this.makeStaticMarkup,f=1===this.stack.length,p="<"+e.type,u)if(ye.call(u,w)){var h=u[w];if(null!=h){if("style"===w){var y,g,m,v,d=void 0,b="",_="";for(d in h)h.hasOwnProperty(d)&&(y=0===d.indexOf("--"),null!=(g=h[d])&&(b+=_+(v=y?d:(v=d,P.hasOwnProperty(v)?P[v]:(m=v.replace(le,"-$1").toLowerCase().replace(fe,"-ms-"),P[v]=m)))+":",_=d,b+=y=null==g||"boolean"==typeof g||""===g?"":y||"number"!=typeof g||0===g||M.hasOwnProperty(_)&&M[_]?(""+g).trim():g+"px",_=";"));h=b||null}d=null;e:if(y=r,g=u,-1===y.indexOf("-"))y="string"==typeof g.is;else switch(y){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":y=!1;break e;default:y=!0}y?ge.hasOwnProperty(w)||(d=Z(d=w)&&null!=h?d+'="'+x(h)+'"':""):(o=w,i=h,s=a=void 0,s=O.hasOwnProperty(o)?O[o]:null,d=(a=(a="style"!==o)?null!==s?0===s.type:2<o.length&&("o"===o[0]||"O"===o[0])&&("n"===o[1]||"N"===o[1]):a)||J(o,i,s,!1)?"":null!==s?(o=s.attributeName,3===(a=s.type)||4===a&&!0===i?o+'=""':o+'="'+x(i=s.sanitizeURL?""+i:i)+'"'):Z(o)?o+'="'+x(i)+'"':""),d&&(p+=" "+d)}}l||f&&(p+=' data-reactroot=""');var w=p;u="",se.hasOwnProperty(r)?w+="/>":(w+=">",u="</"+e.type+">");e:{if(null!=(l=c.dangerouslySetInnerHTML)){if(null!=l.__html){l=l.__html;break e}}else if("string"==typeof(l=c.children)||"number"==typeof l){l=x(l);break e}l=null}return null!=l?(c=[],pe.hasOwnProperty(r)&&"\n"===l.charAt(0)&&(w+="\n"),w+=l):c=N(c.children),e=e.type,n=null==n||"http://www.w3.org/1999/xhtml"===n?ae(e):"http://www.w3.org/2000/svg"===n&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":n,this.stack.push({domNamespace:n,type:r,children:c,childIndex:0,context:t,footer:u}),this.previousWasTextNode=!1,w};var be=_e,e={renderToString:function(e){e=new be(e,!1);try{return e.read(1/0)}finally{e.destroy()}},renderToStaticMarkup:function(e){e=new be(e,!0);try{return e.read(1/0)}finally{e.destroy()}},renderToNodeStream:function(){throw Error(C(207))},renderToStaticNodeStream:function(){throw Error(C(208))},version:"16.14.0"};function _e(e,t){if(e=E.isValidElement(e)?e.type!==c?[e]:(e=e.props.children,E.isValidElement(e)?[e]:N(e)):N(e),e={type:null,domNamespace:ie,children:e,childIndex:0,context:W,footer:""},0===(n=y[0])){var n,r=y,o=2*(n=r.length);if(!(o<=65536))throw Error(C(304));var i=new Uint16Array(o);for(i.set(r),(y=i)[0]=n+1,r=n;r<o-1;r++)y[r]=r+1;y[o-1]=0}else y[0]=y[n];this.threadID=n,this.stack=[e],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=t,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}R.exports=e.default||e},function(e){e.exports=JSON.parse('{"name":"@innovaccer/rich-text-editor","version":"2.0.1","description":"A rich text on top of DraftJS.","main":"dist/rich-text-editor.js","module":"dist/rich-text-editor.js","author":"Innovaccer","devDependencies":{"@babel/core":"^7.7.4","@babel/plugin-proposal-class-properties":"^7.12.1","@babel/preset-env":"^7.7.4","@babel/preset-react":"^7.7.4","@babel/register":"^7.7.4","@innovaccer/design-system":"^2.7.0-0","@storybook/addon-docs":"^6.1.6","@storybook/addon-essentials":"^6.1.5","@storybook/react":"^6.1.5","@storybook/storybook-deployer":"^2.8.7","autoprefixer":"^9.7.3","babel-eslint":"^10.0.3","babel-loader":"^8.0.6","babel-plugin-transform-flow-strip-types":"^6.22.0","chai":"^4.2.0","cross-env":"^6.0.3","css-loader":"^3.2.1","draftjs-to-markdown":"^0.6.0","embed-video":"^2.0.4","enzyme":"^3.10.0","enzyme-adapter-react-16":"^1.15.1","eslint":"^6.7.2","eslint-config-airbnb":"^18.0.1","eslint-plugin-import":"^2.18.2","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-mocha":"^6.2.2","eslint-plugin-react":"^7.17.0","file-loader":"^5.0.2","flow-bin":"^0.113.0","gulp":"^4.0.2","gulp-clean":"^0.4.0","gulp-concat":"^2.6.1","gulp-postcss":"^9.0.0","gulp-sourcemaps":"^3.0.0","install":"^0.13.0","jsdom":"^15.2.1","mini-css-extract-plugin":"^0.8.0","mocha":"^6.2.2","postcss-color-mod-function":"^3.0.3","postcss-loader":"^3.0.0","precss":"^4.0.0","prettier":"^2.5.1","react":"^16.12.0","react-addons-test-utils":"^15.6.2","react-dom":"^16.12.0","react-test-renderer":"^16.12.0","rimraf":"^3.0.0","sinon":"^7.5.0","style-loader":"^1.0.1","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^3.0.0","webpack":"^4.41.2","webpack-bundle-analyzer":"^3.6.0","webpack-cli":"^3.3.10","webpack-s3-plugin":"^1.2.0-rc.0"},"dependencies":{"classnames":"^2.2.6","draft-js":"^0.11.7","draftjs-to-html":"^0.9.0","draftjs-utils":"^0.10.2","html-to-draftjs":"^1.5.0","immutable":"^4.0.0-rc.12","linkify-it":"^2.2.0","prop-types":"^15.7.2","redraft":"^0.10.2"},"peerDependencies":{"@innovaccer/design-system":"^1.4.0-0","react":"0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x","react-dom":"0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x"},"scripts":{"build:css":"cp ./node_modules/@innovaccer/design-system/css/dist/* dist/","build-css":"gulp --gulpfile config/gulpfile.js build","clean":"rimraf dist && rimraf public","build:webpack":"cross-env NODE_ENV=production webpack --mode production --config config/webpack.config.js","build":"npm run clean && npm run build-css && npm run build:webpack","test":"cross-env BABEL_ENV=test mocha --require config/test-compiler.js config/test-setup.js src/**/*Test.js","lint":"eslint src","lintdocs":"eslint docs/src","flow":"flow; test $? -eq 0 -o $? -eq 2","check":"npm run lint && npm run flow","storybook":"start-storybook -p 6006","build-storybook":"build-storybook","deploy-storybook":"storybook-to-ghpages","version":"./scripts/version.sh","prettier":"prettier --write \\"**/*.{js,jsx,ts,tsx,json,css}\\""},"license":"MIT"}')},function(R,e,o){"use strict";o.r(e),o.d(e,"Editor",function(){return ro}),o.d(e,"EditorPreview",function(){return Eo});var d=o(0),g=o.n(d),e=o(1),h=o.n(e),y=o(2),m=o(4),e=o(39),L=o.n(e),e=o(92),F=o.n(e),B=o(24),e=o(5),v=o.n(e);function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function K(e,t,n){return t&&z(e.prototype,t),n&&z(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var H=K(function e(){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(t){n.callBacks.forEach(function(e){e(t)})},this.init=function(e){e=document.getElementById(e);e&&e.addEventListener("click",function(){n.editorFlag=!0}),document&&(document.addEventListener("click",function(){n.editorFlag?n.editorFlag=!1:(n.closeAllModals(),n.suggestionCallback&&n.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&n.closeAllModals()}))},this.onEditorClick=function(){n.closeModals(),!n.suggestionFlag&&n.suggestionCallback?n.suggestionCallback():n.suggestionFlag=!1},this.closeModals=function(e){n.closeAllModals(e)},this.registerCallBack=function(e){n.callBacks.push(e)},this.deregisterCallBack=function(t){n.callBacks=n.callBacks.filter(function(e){return e!==t})},this.setSuggestionCallback=function(e){n.suggestionCallback=e},this.removeSuggestionCallback=function(){n.suggestionCallback=void 0},this.onSuggestionClick=function(){n.suggestionFlag=!0}});function U(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function q(e,t,n){return t&&U(e.prototype,t),n&&U(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var t,W=q(function e(){var t=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused)&&!(t.editorFocused=!1):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}}),n=[],b={onKeyDown:function(t){n.forEach(function(e){e(t)})},registerCallBack:function(e){n.push(e)},deregisterCallBack:function(t){n=n.filter(function(e){return e!==t})}},V=function(){t=!0},G=function(){t=!1},Y=function(){return t};function $(e){e=e.getData()&&e.getData().get("text-align");return e?"rdw-".concat(e,"-aligned-block"):""}function c(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function i(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function f(e){e.stopPropagation()}function Z(e,t,n){return e&&e.filter(function(e){return!t||0===t.length||(n?0<=e.value.indexOf(t):0<=e.value.toLowerCase().indexOf(t&&t.toLowerCase()))})}function J(e){return e[e.options[0]].icon}function s(e,n){if(e&&void 0===n)return e;var r={};return c(e,function(e,t){"[object Object]"===Object.prototype.toString.call(t)?r[e]=s(t,n[e]):r[e]=void 0!==n[e]?n[e]:t}),r}function X(e){return(X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ee(e,t){return(ee=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function te(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=a(n),t=(e=r?(e=a(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===X(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ee(t,e);var n,a=te(s);function s(){var i,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(i=a.call.apply(a,[this].concat(r))).onClick=function(){var e=i.props,t=e.disabled,n=e.onClick,e=e.value;t||n(e)},i.handleKeyDown=function(e){var t=new Set(["Enter","Space","Spacebar"," "]),n=i.props,r=n.disabled,o=n.onClick,n=n.value;r||t.has(e.key)&&(e.preventDefault(),o(n,e))},i}return t=s,(e=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,o=t.activeClassName,i=t.active,a=t.disabled,t=t["aria-label"],o=v()((u(e={},"Editor-option",!0),u(e,"Editor-option--active",i&&!o),u(e,"".concat(o),i&&o),u(e,"Editor-option--disabled",a),e),r);return g.a.createElement("div",{"aria-label":t,onKeyDown:this.handleKeyDown,tabIndex:0,className:o,onClick:this.onClick,"aria-selected":i},n)}}])&&Q(t.prototype,e),n&&Q(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component),_=(l.propTypes={onClick:h.a.func.isRequired,children:h.a.any,value:h.a.string,className:h.a.string,activeClassName:h.a.string,active:h.a.bool,disabled:h.a.bool,title:h.a.string,tabIndex:h.a.number},l.defaultProps={activeClassName:""},o(3));function ne(e){return(ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function re(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function oe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ie(e,t){return(ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ae(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=p(n),t=(e=r?(e=p(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===ne(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ie(t,e);var n,r=ae(o);function o(e){var i;if(this instanceof o)return(i=r.call(this,e)).buttonRef=null,i.listRef=null,i.handleOutsideClick=function(e){i.listRef.current&&!i.listRef.current.contains(e.target)&&i.toggleExpansion()},i.onChange=function(e){var t=i.props.onChange;t&&t(e),i.toggleExpansion()},i.setHighlighted=function(e){i.setState({highlighted:e})},i.focusTrigger=function(){var e;null!=(e=i.buttonRef.current)&&e.focus()},i.focusTriggerOnClose=function(e){"Escape"!==e.key&&"Enter"!==e.key||(i.toggleExpansion(),i.focusTrigger())},i.toggleExpansion=function(){var e=i.props,t=e.doExpand,n=e.doCollapse;(e.expanded?n:t)()},i.handleExpand=function(e){i.props.onExpandEvent(e)},i.handleListKeyDown=function(e){e.preventDefault();var t,n=i.state.highlighted,r=i.props.children[1],o=e.key;"ArrowDown"===o||"ArrowUp"===o?(t=r.length-1,i.setState(function(e){return{highlighted:"ArrowDown"===o?Math.min(e.highlighted+1,t):Math.max(e.highlighted-1,0)}})):"Enter"===o&&(e=r[n].props.value,(r=i.props.onChange)&&r(e))},i.buttonRef=g.a.createRef(),i.listRef=g.a.createRef(),i.state={highlighted:-1},i;throw new TypeError("Cannot call a class as a function")}return t=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&(this.setState({highlighted:-1}),document.removeEventListener("keydown",this.focusTriggerOnClose),document.removeEventListener("click",this.handleOutsideClick)),!e.expanded&&t&&(document.addEventListener("keydown",this.focusTriggerOnClose),document.addEventListener("click",this.handleOutsideClick),this.setState({highlighted:0}),this.listRef.current.focus())}},{key:"render",value:function(){var n=this,e=this.props,t=e.expanded,r=e.children,o=e.className,i=e.optionWrapperClassName,a=e.triggerClassName,s=e.ariaLabel,e=(e.onExpandEvent,e.menu),c=this.state.highlighted,u=r.slice(1,r.length),l=v()((re(l={},"Editor-dropdown",!0),re(l,"Editor-dropdown--expanded",t),l),o);return g.a.createElement("div",{className:l},g.a.createElement(_.a,{ref:this.buttonRef,appearance:"transparent","aria-expanded":t,"aria-label":s||"Editor-dropdown",className:a,onClick:this.handleExpand},r[0],!e&&g.a.createElement(_.f,{name:"keyboard_arrow_down"})),t&&g.a.createElement("ul",{tabIndex:1,ref:this.listRef,onKeyDown:this.handleListKeyDown,className:v()("Editor-dropdown-optionWrapper",i),onClick:f},g.a.Children.map(u,function(e,t){return e&&g.a.cloneElement(e,{onSelect:n.onChange,highlighted:c===t,setHighlighted:n.setHighlighted,highlightedClassName:"Editor-dropdown-option--highlight",index:t})})))}}])&&oe(t.prototype,e),n&&oe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component);function se(e){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ue(e,t){return(ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function le(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=fe(n),t=(e=r?(e=fe(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===se(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}w.propTypes={children:h.a.any,onChange:h.a.func,className:h.a.string,expanded:h.a.bool,menu:h.a.bool,doExpand:h.a.func,doCollapse:h.a.func,onExpandEvent:h.a.func,optionWrapperClassName:h.a.string,triggerClassName:h.a.string,ariaLabel:h.a.string,title:h.a.string};var E=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ue(t,e);var n,a=le(s);function s(){var i,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(i=a.call.apply(a,[this].concat(r))).onClick=function(e){var t=i.props,n=t.onSelect,r=t.onClick,o=t.value;t.disabled||(n&&n(o),r&&(e.stopPropagation(),r(o)))},i.setHighlighted=function(){i.props.setHighlighted(i.props.index)},i.resetHighlighted=function(){(0,i.props.setHighlighted)(-1)},i}return t=s,(e=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,o=t.disabled,i=t.highlighted,a=t.className,s=t.isCheckbox,c=t.activeClassName,u=t.disabledClassName,t=t.highlightedClassName,c=v()((S(e={},"Editor-dropdown-option",!0),S(e,"Editor-dropdown-option--active ".concat(c),r&&!s),S(e,"".concat(t),i),S(e,"".concat(u),o),e),a);return g.a.createElement("li",{tabIndex:1,className:c,onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick},n)}}])&&ce(t.prototype,e),n&&ce(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component);function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function de(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ye(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=ge(n),t=(e=r?(e=ge(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===pe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function ge(e){return(ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}E.propTypes={children:h.a.any,value:h.a.any,onClick:h.a.func,onSelect:h.a.func,setHighlighted:h.a.func,index:h.a.number,disabled:h.a.bool,active:h.a.bool,highlighted:h.a.bool,className:h.a.string,activeClassName:h.a.string,disabledClassName:h.a.string,highlightedClassName:h.a.string,title:h.a.string,isCheckbox:h.a.bool},E.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""};var me=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&he(t,e);var n,r=ye(o);function o(){var e=this,t=o;if(e instanceof t)return r.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return t=o,(e=[{key:"renderInDropdown",value:function(){var e=this.props,i=e.config,t=e.expanded,n=e.doExpand,r=e.onExpandEvent,o=e.doCollapse,a=e.currentState,e=e.onChange,s=i.options.length-i.max;return g.a.createElement(w,{onChange:e,expanded:t,doExpand:n,doCollapse:o,onExpandEvent:r,triggerClassName:"Editor-textDecoration-moreIcon",menu:!0},g.a.createElement(_.f,{name:"more_horizon",size:20}),i.options.slice(i.max,i.options.length).map(function(e,t){var n=!0===a[e]||"MONOSPACE"===e&&a.CODE,r=i[e],o=r.icon,r=(r.title,r.label);return g.a.createElement(E,{key:t,value:e,active:n,isCheckbox:1<s},1<s?g.a.createElement(_.b,{checked:n,label:r}):g.a.createElement(g.a.Fragment,null,g.a.createElement(_.f,{size:20,name:o,className:"mr-4",appearance:n?"white":"default"}),g.a.createElement(_.m,{appearance:n?"white":"default"},r)))}))}},{key:"render",value:function(){var e,t,n=this.props,i=n.config,a=n.currentState,s=n.onChange,n=n.className,r=i.options.length-i.max,o=i.max,c=v()((t=!0,(c="Editor-textDecoration")in(e={})?Object.defineProperty(e,c,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[c]=t,e),n);return g.a.createElement("div",{className:c},i.options.slice(0,o).map(function(e,t){var n=!0===a[e]||"MONOSPACE"===e&&a.CODE,r=i[e],o=r.title,r=r.icon;return g.a.createElement(_.n,{tooltip:o},g.a.createElement(l,{"aria-label":"".concat(e," button"),role:"button",tabIndex:0,key:t,value:e,onClick:s,active:n,className:"mr-2"},g.a.createElement(_.f,{name:r,size:20,appearance:n?"info":"default"})))}),0<r&&this.renderInDropdown())}}])&&de(t.prototype,e),n&&de(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component);function ve(e){return(ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function be(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _e(e,t){return(_e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function we(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Se(n),t=(e=r?(e=Se(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===ve(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Se(e){return(Se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}me.propTypes={expanded:h.a.bool,doExpand:h.a.func,doCollapse:h.a.func,onExpandEvent:h.a.func,config:h.a.object,onChange:h.a.func,currentState:h.a.object,className:h.a.string};e=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_e(t,e);var n,r=we(i);function i(e){var o;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(o=r.call(this,e)).expandCollapse=function(){o.setState(function(e){return{expanded:!e.expanded}})},o.toggleInlineStyle=function(e){var t=o.props,n=t.editorState,t=t.onChange,e=e.toUpperCase(),r=Object(m.getSelectionEntity)(n);if(r){r=n.getCurrentContent().getEntity(r).getType();if("MENTION"===r||"LINK"===r)return}r=y.RichUtils.toggleInlineStyle(n,e);r&&t(r)},o.changeKeys=function(e){var n;if(e)return n={},c(e,function(e,t){n["CODE"===e?"monospace":e.toLowerCase()]=t}),n},o.doExpand=function(){o.setState({expanded:!0})},o.doCollapse=function(){o.setState({expanded:!1})};var e=o.props,t=e.editorState;e.modalHandler;return o.state={currentStyles:t?o.changeKeys(Object(m.getSelectionInlineStyle)(t)):{}},o}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(m.getSelectionInlineStyle)(t))})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.expanded,n=n.currentStyles,o=t.component||me;return g.a.createElement(o,{config:t,currentState:n,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle,className:e})}}])&&be(t.prototype,e),n&&be(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component);function Ee(e){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oe(e,t){return(Oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xe(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=ke(n),t=(e=r?(e=ke(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Ee(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function ke(e){return(ke=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object.isRequired,modalHandler:h.a.object,config:h.a.object,className:h.a.string};var r=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oe(t,e);var n,r=xe(o);function o(e){if(this instanceof o)return(e=r.call(this,e)).getBlockTypes=function(){return[{label:"H1",size:"xxl",displayName:"Heading 1"},{label:"H2",size:"xl",displayName:"Heading 2"},{label:"H3",size:"l",displayName:"Heading 3"},{label:"H4",size:"m",displayName:"Heading 4"}]},e.state={blockTypes:e.getBlockTypes()},e;throw new TypeError("Cannot call a class as a function")}return t=o,(e=[{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config.icon,r=t.currentState.blockType,o=t.expanded,i=t.doExpand,a=t.onExpandEvent,s=t.doCollapse,c=t.onChange,t=t.className;return g.a.createElement("div",{className:t,"aria-label":"Editor-block-control"},g.a.createElement(w,{onChange:c,expanded:o,doExpand:i,doCollapse:s,onExpandEvent:a,triggerClassName:"Editor-heading-trigger"},g.a.createElement(_.f,{name:n,size:20}),e.map(function(e,t){return g.a.createElement(E,{index:t,active:r===e.label,value:e.label,key:t},g.a.createElement(_.e,{size:e.size,className:"Editor-heading-option",appearance:r===e.label?"white":"default"},e.displayName))})))}},{key:"render",value:function(){var t=this.props.config,e=this.state.blockTypes.filter(function(e){e=e.label;return-1<t.options.indexOf(e)});return this.renderInDropdown(e)}}])&&Ce(t.prototype,e),n&&Ce(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),De=(r.propTypes={expanded:h.a.bool,onExpandEvent:h.a.func,doExpand:h.a.func,doCollapse:h.a.func,onChange:h.a.func,config:h.a.object,currentState:h.a.object,className:h.a.string},r);function Te(e){return(Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ie(e,t){return(Ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Me(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Ne(n),t=(e=r?(e=Ne(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Te(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Ne(e){return(Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ie(t,e);var n,r=Me(i);function i(e){var o;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(o=r.call(this,e)).expandCollapse=function(){o.setState(function(e){return{expanded:!e.expanded}})},o.blocksTypes=[{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"}],o.doExpand=function(){o.setState({expanded:!0})},o.doCollapse=function(){o.setState({expanded:!1})},o.toggleBlockType=function(t){var e=o.blocksTypes.find(function(e){return e.label===t}).style,n=o.props,r=n.editorState,n=n.onChange,r=y.RichUtils.toggleBlockType(r,e);r&&n(r)};e=e.editorState;return o.state={expanded:!1,currentBlockType:e?Object(m.getSelectedBlocksType)(e):"unstyled"},o}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(m.getSelectedBlocksType)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.expanded,o=n.currentBlockType,n=this.blocksTypes.find(function(e){return e.style===o});return g.a.createElement(De,{config:t,currentState:{blockType:n&&n.label},onChange:this.toggleBlockType,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,className:e})}}])&&je(t.prototype,e),n&&je(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component),r.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object,config:h.a.object,className:h.a.string};o(201);function Ae(e){return(Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Re(e,t){return(Re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Le(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Fe(n),t=(e=r?(e=Fe(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Ae(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Fe(e){return(Fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Be=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Re(t,e);var n,i=Le(a);function a(){var e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=i.call.apply(i,[this].concat(r))).state={defaultFontSize:void 0},e}return t=a,(e=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");e&&0<e.length&&(e=(e=window.getComputedStyle(e[0]).getPropertyValue("font-size")).substring(0,e.length-2),this.setState({defaultFontSize:e}))}},{key:"renderCustomTrigger",value:function(){return g.a.createElement("div",null,"Riya")}},{key:"render",value:function(){var e=this.props,t=e.config,n=(t.icon,t.className),r=(t.dropdownClassName,t.options),t=(t.title,e.onChange),e=(e.expanded,e.doCollapse,e.onExpandEvent,e.doExpand,e.translations,this.props.currentState.fontSize),o=this.state.defaultFontSize,o=Number(o);e||r&&r.indexOf(o);return g.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},g.a.createElement(_.d,{className:v()("rdw-fontsize-dropdown",n),onChange:t,customTrigger:this.renderCustomTrigger,icon:"text_fields",placeholder:"",options:r.map(function(e){return{label:e,value:e,selected:14===e}})}))}}])&&Pe(t.prototype,e),n&&Pe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(d.Component);function ze(e){return(ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function He(e,t){return(He=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ue(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=qe(n),t=(e=r?(e=qe(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===ze(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Be.propTypes={expanded:h.a.bool,onExpandEvent:h.a.func,doExpand:h.a.func,doCollapse:h.a.func,onChange:h.a.func,config:h.a.object,currentState:h.a.object,translations:h.a.object};var We=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&He(t,e);var n,o=Ue(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,e)).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.toggleFontSize=function(e){var t=r.props,n=t.editorState,t=t.onChange,n=Object(m.toggleCustomInlineStyle)(n,"fontSize",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontSize:t?Object(m.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE:void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(m.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.expanded,n=n.currentFontSize,o=t.component||Be,n=n&&Number(n.substring(9));return g.a.createElement(o,{config:t,fontSize:!0,translations:e,currentState:{fontSize:n},onChange:this.toggleFontSize,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Ke(t.prototype,e),n&&Ke(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component);We.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object,modalHandler:h.a.object,config:h.a.object,translations:h.a.object},o(202);function Ve(e){return(Ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ye(e,t){return(Ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $e(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Ze(n),t=(e=r?(e=Ze(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Ve(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ye(t,e);var n,i=$e(a);function a(){var e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=i.call.apply(i,[this].concat(r))).state={defaultFontFamily:void 0},e}return t=a,(e=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");e&&0<e.length&&(e=window.getComputedStyle(e[0]).getPropertyValue("font-family"),this.setState({defaultFontFamily:e}))}},{key:"render",value:function(){var t=this.state.defaultFontFamily,e=this.props,n=e.config,r=n.className,o=n.dropdownClassName,i=n.options,n=n.title,a=e.translations,s=e.onChange,c=e.expanded,u=e.doCollapse,l=e.onExpandEvent,e=e.doExpand,f=this.props.currentState.fontFamily||i&&t&&i.some(function(e){return e.toLowerCase()===t.toLowerCase()})&&t;return g.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},g.a.createElement(w,{className:v()("rdw-fontfamily-dropdown",r),optionWrapperClassName:v()("rdw-fontfamily-optionwrapper",o),onChange:s,expanded:c,doExpand:e,doCollapse:u,onExpandEvent:l,title:n||a["components.controls.fontfamily.fontfamily"]},g.a.createElement("span",{className:"rdw-fontfamily-placeholder"},f||a["components.controls.fontfamily.fontfamily"]),i.map(function(e,t){return g.a.createElement(E,{active:f===e,value:e,key:t},e)})))}}])&&Ge(t.prototype,e),n&&Ge(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(d.Component),Je=(C.propTypes={expanded:h.a.bool,onExpandEvent:h.a.func,doExpand:h.a.func,doCollapse:h.a.func,onChange:h.a.func,config:h.a.object,currentState:h.a.object,translations:h.a.object},C);function Xe(e){return(Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function et(e,t){return(et=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=nt(n),t=(e=r?(e=nt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Xe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function nt(e){return(nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}C=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&et(t,e);var n,o=tt(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,e)).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.toggleFontFamily=function(e){var t=r.props,n=t.editorState,t=t.onChange,n=Object(m.toggleCustomInlineStyle)(n,"fontFamily",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontFamily:t?Object(m.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY:void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(m.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.expanded,n=n.currentFontFamily,o=t.component||Je,n=n&&n.substring(11);return g.a.createElement(o,{translations:e,config:t,currentState:{fontFamily:n},onChange:this.toggleFontFamily,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Qe(t.prototype,e),n&&Qe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component);function rt(e){return(rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ot(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function it(e,t){return(it=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function at(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=st(n),t=(e=r?(e=st(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===rt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function st(e){return(st=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}C.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object,modalHandler:h.a.object,config:h.a.object,translations:h.a.object};var ct=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&it(t,e);var n,a=at(s);function s(){var t,e=this,n=s;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(t=a.call.apply(a,[this].concat(o))).options=["unordered","ordered"],t.toggleBlockType=function(e){(0,t.props.onChange)(e)},t}return t=s,(e=[{key:"render",value:function(){var e,t,n=this.props,r=n.config,o=n.currentState.listType,n=n.className,i=(r.options,r.unordered),r=r.ordered,a=v()((t=!0,(a="d-flex")in(e={})?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e),n);return g.a.createElement("div",{className:a},g.a.createElement(_.n,{tooltip:i.title},g.a.createElement(l,{value:"unordered",onClick:this.toggleBlockType,active:"unordered"===o,className:"mr-2"},g.a.createElement(_.f,{appearance:"unordered"===o?"info":"default",name:i.icon,size:20}))),g.a.createElement(_.n,{tooltip:r.title},g.a.createElement(l,{value:"ordered",onClick:this.toggleBlockType,active:"ordered"===o},g.a.createElement(_.f,{appearance:"ordered"===o?"info":"default",name:r.icon,size:20}))))}}])&&ot(t.prototype,e),n&&ot(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component);function ut(e){return(ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ft(e,t){return(ft=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=dt(n),t=(e=r?(e=dt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===ut(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function dt(e){return(dt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ct.propTypes={expanded:h.a.bool,doExpand:h.a.func,doCollapse:h.a.func,onExpandEvent:h.a.func,config:h.a.object,onChange:h.a.func,currentState:h.a.object,className:h.a.string};var O=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ft(t,e);var n,o=pt(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,e)).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.onChange=function(e){"unordered"===e?r.toggleBlockType("unordered-list-item"):"ordered"===e?r.toggleBlockType("ordered-list-item"):"indent"===e?r.adjustDepth(1):r.adjustDepth(-1)},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.toggleBlockType=function(e){var t=r.props,n=t.onChange,t=t.editorState,t=y.RichUtils.toggleBlockType(t,e);t&&n(t)},r.adjustDepth=function(e){var t=r.props,n=t.onChange,t=t.editorState,t=Object(m.changeDepth)(t,e,4);t&&n(t)},r.isIndentDisabled=function(){var e=r.props.editorState,t=r.state.currentBlock,e=Object(m.getBlockBeforeSelectedBlock)(e);return!e||!Object(m.isListBlock)(t)||e.get("type")!==t.get("type")||e.get("depth")<t.get("depth")},r.isOutdentDisabled=function(){var e=r.state.currentBlock;return!e||!Object(m.isListBlock)(e)||e.get("depth")<=0};var e=r.props,t=e.editorState,e=e.modalHandler;return r.state={expanded:!1,currentBlock:t?Object(m.getSelectedBlock)(t):void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(m.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,t=t.className,o=this.state,i=o.expanded,o=o.currentBlock;return"unordered-list-item"===o.get("type")?e="unordered":"ordered-list-item"===o.get("type")&&(e="ordered"),g.a.createElement(ct,{config:n,translations:r,currentState:{listType:e},expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,className:t})}}])&<(t.prototype,e),n&<(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component);O.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object.isRequired,modalHandler:h.a.object,config:h.a.object,translations:h.a.object,className:h.a.string},o(203);function ht(e){return(ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gt(e,t){return(gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=vt(n),t=(e=r?(e=vt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===ht(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function vt(e){return(vt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bt=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&>(t,e);var n,r=mt(o);function o(){var e=this,t=o;if(e instanceof t)return r.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return t=o,(e=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,o=t.center,i=t.right,a=t.justify,t=t.className,s=e.onChange,c=e.currentState.textAlignment,e=e.translations;return g.a.createElement("div",{className:v()("rdw-text-align-wrapper",t),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&g.a.createElement(l,{value:"left",className:v()(r.className),active:"left"===c,onClick:s,title:r.title||e["components.controls.textalign.left"]},g.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&g.a.createElement(l,{value:"center",className:v()(o.className),active:"center"===c,onClick:s,title:o.title||e["components.controls.textalign.center"]},g.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&g.a.createElement(l,{value:"right",className:v()(i.className),active:"right"===c,onClick:s,title:i.title||e["components.controls.textalign.right"]},g.a.createElement("img",{src:i.icon,alt:""})),0<=n.indexOf("justify")&&g.a.createElement(l,{value:"justify",className:v()(a.className),active:"justify"===c,onClick:s,title:a.title||e["components.controls.textalign.justify"]},g.a.createElement("img",{src:a.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,i=e.doCollapse,a=e.currentState.textAlignment,s=e.onChange,e=e.translations,c=t.options,u=t.left,l=t.center,f=t.right,p=t.justify,d=t.className,h=t.dropdownClassName,y=t.title;return g.a.createElement(w,{className:v()("rdw-text-align-dropdown",d),optionWrapperClassName:v()(h),onChange:s,expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:y||e["components.controls.textalign.textalign"]},g.a.createElement("img",{src:a&&t[a]&&t[a].icon||J(t),alt:""}),0<=c.indexOf("left")&&g.a.createElement(E,{value:"left",active:"left"===a,className:v()("rdw-text-align-dropdownOption",u.className),title:u.title||e["components.controls.textalign.left"]},g.a.createElement("img",{src:u.icon,alt:""})),0<=c.indexOf("center")&&g.a.createElement(E,{value:"center",active:"center"===a,className:v()("rdw-text-align-dropdownOption",l.className),title:l.title||e["components.controls.textalign.center"]},g.a.createElement("img",{src:l.icon,alt:""})),0<=c.indexOf("right")&&g.a.createElement(E,{value:"right",active:"right"===a,className:v()("rdw-text-align-dropdownOption",f.className),title:f.title||e["components.controls.textalign.right"]},g.a.createElement("img",{src:f.icon,alt:""})),0<=c.indexOf("justify")&&g.a.createElement(E,{value:"justify",active:"justify"===a,className:v()("rdw-text-align-dropdownOption",p.className),title:p.title||e["components.controls.textalign.justify"]},g.a.createElement("img",{src:p.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&yt(t.prototype,e),n&&yt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component);function _t(e){return(_t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function St(e,t){return(St=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Et(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Ct(n),t=(e=r?(e=Ct(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===_t(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Ct(e){return(Ct=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}bt.propTypes={expanded:h.a.bool,doExpand:h.a.func,doCollapse:h.a.func,onExpandEvent:h.a.func,config:h.a.object,onChange:h.a.func,currentState:h.a.object,translations:h.a.object};var Ot=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&St(t,e);var n,o=Et(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,e)).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.addBlockAlignmentData=function(e){var t=r.props,n=t.editorState,t=t.onChange;t(r.state.currentTextAlignment!==e?Object(m.setBlockData)(n,{"text-align":e}):Object(m.setBlockData)(n,{"text-align":void 0}))};e=r.props.modalHandler;return r.state={currentTextAlignment:void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(m.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.expanded,n=n.currentTextAlignment,o=t.component||bt;return g.a.createElement(o,{config:t,translations:e,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:n},onChange:this.addBlockAlignmentData})}}])&&wt(t.prototype,e),n&&wt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component);function xt(e){return(xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dt(e,t){return(Dt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=jt(n),t=(e=r?(e=jt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===xt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function jt(e){return(jt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ot.propTypes={editorState:h.a.object.isRequired,onChange:h.a.func.isRequired,modalHandler:h.a.object,config:h.a.object,translations:h.a.object};var x=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dt(t,e);var n,r=Tt(i);function i(e){var o;if(this instanceof i)return(o=r.call(this,e)).onChange=function(e){var t=o.props,n=t.onChange;t.expanded&&n(o.state.currentStyle,e)},o.handleClick=function(e){var t=e.target.getAttribute("data-color");t&&(e.preventDefault(),e.stopPropagation(),o.onChange(t))},o.handleKeyDown=function(e){var t=e.target.getAttribute("data-color");t&&"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),o.onChange(t))},o.renderModal=function(){var e=o.props,t=e.config.colors,e=e.currentState,n=e.color,e=e.bgColor,r="color"===o.state.currentStyle?n:e;return g.a.createElement("div",{className:"Editor-colorPicker",onClick:o.handleClick,onKeyDown:o.handleKeyDown},t.map(function(e,t){return g.a.createElement("div",{className:"Editor-colorPicker-circleWrapper"},g.a.createElement("div",{ref:0===t?o.ref:null,"data-color":e,tabIndex:0,key:t,style:{backgroundColor:e},className:"Editor-colorPicker-circle","aria-selected":r===e}),r===e&&g.a.createElement(_.f,{name:"check",appearance:"white",className:"Editor-colorPicker-selectedCircle"}))}))},o.state={currentStyle:"color"},o.ref=g.a.createRef(),o;throw new TypeError("Cannot call a class as a function")}return t=i,(e=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&(this.ref.current,this.setState({currentStyle:"color"}))}},{key:"render",value:function(){var e=this.props,t=e.expanded,n=e.onToggle,e=e.className,n=g.a.createElement(l,{tabIndex:0,"aria-label":"Font colors",onClick:n,active:t,activeClassName:"bg-secondary"},g.a.createElement(_.f,{name:"text_format",size:20}));return g.a.createElement("div",{className:e,"aria-haspopup":"true","aria-expanded":t},g.a.createElement(_.l,{trigger:n,position:"bottom-start",open:t},this.renderModal()))}}])&&kt(t.prototype,e),n&&kt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component),It=(x.propTypes={expanded:h.a.bool,onToggle:h.a.func,onChange:h.a.func,config:h.a.object,currentState:h.a.object,className:h.a.className},x);function Mt(e){return(Mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function At(e,t){return(At=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Rt(n),t=(e=r?(e=Rt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Mt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Rt(e){return(Rt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&At(t,e);var n,r=Pt(o);function o(e){var i;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(i=r.call(this,e)).state={expanded:!1,currentColor:"var(--text)",currentBgColor:void 0},i.expandCollapse=function(){i.setState({expanded:!1})},i.toggleColorPicker=function(){i.setState(function(e){return{expanded:!e.expanded}})},i.toggleColor=function(t,n){var e=i.props,r=e.editorState,o=e.onChange,e=Object(m.getSelectionEntity)(r);if(e){e=r.getCurrentContent().getEntity(e).getType();if("MENTION"===e||"LINK"===e)return}i.setState(function(){return{currentColor:n?"color-".concat(n):"color-var(--text)",currentBgColor:Object(m.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR,expanded:!1}},function(){var e=Object(m.toggleCustomInlineStyle)(r,t,n);e&&o(e)})};var t=e.editorState,e=e.modalHandler,n={expanded:!1,currentColor:void 0,currentBgColor:void 0};return t&&(n.currentColor=Object(m.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR||"color-var(--text)",n.currentBgColor=Object(m.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR),i.state=n,e.registerCallBack(i.expandCollapse),i}return t=o,(e=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.currentColor,o=n.currentBgColor,n=n.expanded,i=t.component||It,r=r&&r.substring(6),o=o&&o.substring(8);return g.a.createElement(i,{config:t,className:e,onChange:this.toggleColor,expanded:n,onToggle:this.toggleColorPicker,currentState:{color:r,bgColor:o}})}}])&&Nt(t.prototype,e),n&&Nt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),Lt=(x.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object.isRequired,modalHandler:h.a.object,config:h.a.object,className:h.a.string},o(93)),Lt=o.n(Lt);function Ft(e){return(Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zt(e,t){return(zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Kt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Ht(n),t=(e=r?(e=Ht(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Ft(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zt(t,e);var n,a=Kt(s);function s(){var r,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=a.call.apply(a,[this].concat(o))).state={showModal:!1,editing:!1,linkTarget:"",linkTitle:"",linkTargetOption:r.props.config.defaultTargetOption},r.addLink=function(){var e=r.props.onChange,t=r.state;e("link",t.linkTitle,t.linkTarget,t.linkTargetOption)},r.updateValue=function(e){var t,n;r.setState((t={},n="".concat(e.target.name),e=e.target.value,n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t))},r.updateTargetOption=function(e){r.setState({linkTargetOption:e.target.checked?"_blank":"_self"})},r}return t=s,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.currentState,n=t.link,t=t.selectionText;e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption}),!e.expanded&&this.props.expanded&&this.setState({showModal:!1,linkTarget:n&&n.target,linkTitle:n&&n.title||t,linkTargetOption:this.props.config.defaultTargetOption,editing:void 0!==n})}},{key:"renderAddLinkModal",value:function(){var e=this.props.onExpandEvent,t=this.state,n=t.linkTitle,r=t.linkTarget,t=t.editing?"Edit":"Add";return g.a.createElement("div",{className:"px-6 mt-6 mb-5",onClick:f},g.a.createElement(_.m,{weight:"strong",size:"large"},t," a link"),g.a.createElement(_.g,{icon:"insert_link",className:"mt-4",placeholder:"Paste a link to insert",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:r,autoComplete:"off",autoFocus:!0,onClick:f}),g.a.createElement(_.g,{icon:"text_fields",className:"my-5",placeholder:"Text to display",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:n,autoComplete:"off",onClick:f}),g.a.createElement("div",{className:"d-flex justify-content-end"},g.a.createElement(_.a,{onClick:e,className:"mr-4"},"Cancel"),g.a.createElement(_.a,{onClick:this.addLink,disabled:!r||!n,appearance:"primary"},t)))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,t=t.title,r=e.inDropdown,o=e.onExpandEvent,e=e.expanded,t=r?g.a.createElement(E,null,g.a.createElement(_.f,{size:20,name:n,className:"mr-4"}),g.a.createElement(_.m,null,t)):g.a.createElement(l,{value:"unordered-list-item",onClick:o,"aria-haspopup":"true","aria-expanded":e,active:e,activeClassName:"bg-secondary"},g.a.createElement(_.f,{name:n,size:20}));return g.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e},g.a.createElement(_.l,{trigger:t,position:r?"right":"bottom",open:e,onToggle:o},this.renderAddLinkModal()))}}])&&Bt(t.prototype,e),n&&Bt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component),Ut=(k.propTypes={expanded:h.a.bool,doExpand:h.a.func,doCollapse:h.a.func,onExpandEvent:h.a.func,config:h.a.object,onChange:h.a.func,currentState:h.a.object,inDropdown:h.a.boolean},k);function qt(e){return(qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vt(e,t){return(Vt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Yt(n),t=(e=r?(e=Yt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===qt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Yt(e){return(Yt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $t(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Zt(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?$t(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):$t(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function Jt(e){var t=Xt.match(e.target);return Zt(Zt({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var Xt=Lt()(),k=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vt(t,e);var n,r=Gt(o);function o(e){var s;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(s=r.call(this,e)).onExpandEvent=function(){var e=!s.state.expanded;s.setState({expanded:e}),e||s.props.onCloseLinkPopover()},s.onChange=function(e,t,n,r){var o=s.props.config.linkCallback;"link"===e?(e=(o||Jt)({title:t,target:n,targetOption:r}),s.addLink(e.title,e.target,e.targetOption)):s.removeLink()},s.getCurrentValues=function(){var e,t=s.props.editorState,n=s.state,r=n.currentEntity,n=(n.link,t.getCurrentContent()),o={};return r&&"LINK"===n.getEntity(r).get("type")&&(o.link={},e=r&&Object(m.getEntityRange)(t,r),o.link.target=r&&n.getEntity(r).get("data").url,o.link.targetOption=r&&n.getEntity(r).get("data").targetOption,o.link.title=e&&e.text),o.selectionText=Object(m.getSelectionText)(t),o},s.doExpand=function(){s.setState({expanded:!0})},s.expandCollapse=function(){s.setState({expanded:s.signalExpanded}),s.signalExpanded=!1},s.doCollapse=function(){s.setState({expanded:!1})},s.removeLink=function(){var e=s.props,t=e.editorState,e=e.onChange,n=s.state.currentEntity,r=t.getSelection();n&&(n=Object(m.getEntityRange)(t,n),r=r.getIsBackward()?r.merge({anchorOffset:n.end,focusOffset:n.start}):r.merge({anchorOffset:n.start,focusOffset:n.end}),e(y.RichUtils.toggleLink(t,r,null)))},s.addLink=function(e,t,n){var r=s.props,o=r.editorState,r=r.onChange,i=s.state.currentEntity,a=o.getSelection(),i=(i&&(i=Object(m.getEntityRange)(o,i),a=a.getIsBackward()?a.merge({anchorOffset:i.end,focusOffset:i.start}):a.merge({anchorOffset:i.start,focusOffset:i.end})),o.getCurrentContent().createEntity("LINK","MUTABLE",{url:t,targetOption:n,targetText:e}).getLastCreatedEntityKey()),t=y.Modifier.replaceText(o.getCurrentContent(),a,"".concat(e),null,i),n=y.EditorState.push(o,t,"insert-characters");a=n.getSelection().merge({anchorOffset:a.get("anchorOffset")+e.length,focusOffset:a.get("anchorOffset")+e.length}),n=y.EditorState.acceptSelection(n,a),t=y.Modifier.insertText(n.getCurrentContent(),a," ",n.getCurrentInlineStyle(),void 0),r(y.EditorState.push(n,t,"insert-characters")),s.props.onCloseLinkPopover(),s.doCollapse()};var e=s.props,t=e.editorState,e=e.linkPopoverOpen;return s.state={expanded:e,selectionText:void 0,link:void 0,currentEntity:t?Object(m.getSelectionEntity)(t):void 0},s}return t=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.editorState,t=t.linkPopoverOpen;n&&n!==e.editorState&&this.setState({currentEntity:Object(m.getSelectionEntity)(n)}),e.linkPopoverOpen!==t&&t&&this.setState({expanded:t})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.inDropdown,n=this.state.expanded,r=this.getCurrentValues(),o=r.link,r=r.selectionText;return g.a.createElement(Ut,{config:t,expanded:n,inDropdown:e,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:o,selectionText:r},onChange:this.onChange})}}])&&Wt(t.prototype,e),n&&Wt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),Lt=(k.propTypes={editorState:h.a.object.isRequired,onChange:h.a.func.isRequired,onCloseLinkPopover:h.a.func.isRequired,modalHandler:h.a.object,config:h.a.object,inDropdown:h.a.boolean,linkPopoverOpen:h.a.bool},k);function Qt(e){return(Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function en(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tn(e,t){return(tn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=rn(n),t=(e=r?(e=rn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Qt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function rn(e){return(rn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}k=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tn(t,e);var n,r=nn(o);function o(e){var i;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(i=r.call(this,e)).addLink=function(){var e=i.props,t=e.editorState,n=e.onChange,e=e.mention.trigger,e=void 0===e?"@":e,r=i.state.currentEntity,o=t.getSelection(),r=(r&&(r=Object(m.getEntityRange)(t,r),o=o.getIsBackward()?o.merge({anchorOffset:r.end,focusOffset:r.start}):o.merge({anchorOffset:r.start,focusOffset:r.end})),y.Modifier.replaceText(t.getCurrentContent(),o,"".concat(e),t.getCurrentInlineStyle(),void 0)),o=y.EditorState.push(t,r,"insert-characters");n(y.EditorState.push(o,r,"insert-characters"))};e=i.props.editorState;return i.state={selectionText:void 0,link:void 0,currentEntity:e?Object(m.getSelectionEntity)(e):void 0},i}return t=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(m.getSelectionEntity)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,t=t.title;e.inDropdown;return g.a.createElement(_.n,{tooltip:t},g.a.createElement(l,{value:"unordered-list-item",onClick:this.addLink,className:"mr-2"},g.a.createElement(_.f,{name:n,size:20})))}}])&&en(t.prototype,e),n&&en(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),k.propTypes={editorState:h.a.object.isRequired,onChange:h.a.func.isRequired,config:h.a.object,inDropdown:h.a.boolean};o(209);function on(e){return(on="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function an(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sn(e,t){return(sn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function cn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=un(n),t=(e=r?(e=un(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===on(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function un(e){return(un=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var D=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sn(t,e);var n,a=cn(s);function s(){var r,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=a.call.apply(a,[this].concat(o))).state={embeddedLink:"",height:r.props.config.defaultSize.height,width:r.props.config.defaultSize.width},r.onChange=function(){var e=r.props.onChange,t=r.state;e(t.embeddedLink,t.height,t.width)},r.updateValue=function(e){var t,n;r.setState((t={},n="".concat(e.target.name),e=e.target.value,n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t))},r}return t=s,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,t=t.config;!n&&e.expanded&&(e=(n=t.defaultSize).height,t=n.width,this.setState({embeddedLink:"",height:e,width:t}))}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,e=e.width,r=this.props,o=r.config.popupClassName,i=r.doCollapse,r=r.translations;return g.a.createElement("div",{className:v()("rdw-embedded-modal",o),onClick:f},g.a.createElement("div",{className:"rdw-embedded-modal-header"},g.a.createElement("span",{className:"rdw-embedded-modal-header-option"},r["components.controls.embedded.embeddedlink"],g.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),g.a.createElement("div",{className:"rdw-embedded-modal-link-section"},g.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},g.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:r["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.a.createElement("div",{className:"rdw-embedded-modal-size"},g.a.createElement("span",null,g.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.a.createElement("span",null,g.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:e,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),g.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},g.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!e},r["generic.add"]),g.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:i},r["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,t=t.title,o=e.expanded,i=e.onExpandEvent,e=e.translations;return g.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-embedded-control"},g.a.createElement(l,{className:v()(r),value:"unordered-list-item",onClick:i,title:t||e["components.controls.embedded.embedded"]},g.a.createElement("img",{src:n,alt:""})),o?this.rendeEmbeddedLinkModal():void 0)}}])&&an(t.prototype,e),n&&an(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component),ln=(D.propTypes={expanded:h.a.bool,onExpandEvent:h.a.func,onChange:h.a.func,config:h.a.object,translations:h.a.object,doCollapse:h.a.func},D);function fn(e){return(fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dn(e,t){return(dn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=yn(n),t=(e=r?(e=yn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===fn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function yn(e){return(yn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}D=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dn(t,e);var n,i=hn(s);function s(){var a,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=i.call.apply(i,[this].concat(r))).state={expanded:!1},a.onExpandEvent=function(){a.signalExpanded=!a.state.expanded},a.expandCollapse=function(){a.setState({expanded:a.signalExpanded}),a.signalExpanded=!1},a.doExpand=function(){a.setState({expanded:!0})},a.doCollapse=function(){a.setState({expanded:!1})},a.addEmbeddedLink=function(e,t,n){var r=a.props,o=r.editorState,i=r.onChange,r=r.config.embedCallback,r=r?r(e):e,e=o.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:r,height:t,width:n}).getLastCreatedEntityKey();i(y.AtomicBlockUtils.insertAtomicBlock(o,e," ")),a.doCollapse()},a}return t=s,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state.expanded,r=t.component||ln;return g.a.createElement(r,{config:t,translations:e,onChange:this.addEmbeddedLink,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&pn(t.prototype,e),n&&pn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component),D.propTypes={editorState:h.a.object.isRequired,onChange:h.a.func.isRequired,modalHandler:h.a.object,config:h.a.object,translations:h.a.object};o(210);function gn(e){return(gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vn(e,t){return(vn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=_n(n),t=(e=r?(e=_n(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===gn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function _n(e){return(_n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vn(t,e);var n,a=bn(s);function s(){var t,e=this,n=s;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(t=a.call.apply(a,[this].concat(o))).onChange=function(e){(0,t.props.onChange)(e.target.innerHTML)},t}return t=s,(e=[{key:"renderEmojiModal",value:function(){var n=this,e=this.props.config,t=e.popupClassName,e=e.emojis;return g.a.createElement("div",{className:v()("rdw-emoji-modal",t),onClick:f},e.map(function(e,t){return g.a.createElement("span",{key:t,className:"rdw-emoji-icon",alt:"",onClick:n.onChange},e)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,t=t.title,o=e.expanded,i=e.onExpandEvent,e=e.translations;return g.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":o,title:t||e["components.controls.emoji.emoji"]},g.a.createElement(l,{className:v()(r),value:"unordered-list-item",onClick:i},g.a.createElement("img",{src:n,alt:""})),o?this.renderEmojiModal():void 0)}}])&&mn(t.prototype,e),n&&mn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component),wn=(T.propTypes={expanded:h.a.bool,onExpandEvent:h.a.func,onChange:h.a.func,config:h.a.object,translations:h.a.object},T);function Sn(e){return(Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function En(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cn(e,t){return(Cn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function On(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=xn(n),t=(e=r?(e=xn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Sn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function xn(e){return(xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}T=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cn(t,e);var n,a=On(s);function s(){var r,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=a.call.apply(a,[this].concat(o))).state={expanded:!1},r.onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.addEmoji=function(e){var t=r.props,n=t.editorState,t=t.onChange,e=y.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());t(y.EditorState.push(n,e,"insert-characters")),r.doCollapse()},r}return t=s,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state.expanded,r=t.component||wn;return g.a.createElement(r,{config:t,translations:e,onChange:this.addEmoji,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&En(t.prototype,e),n&&En(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component);function kn(e){return(kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tn(e,t){return(Tn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=In(n),t=(e=r?(e=In(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===kn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function In(e){return(In=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}T.propTypes={editorState:h.a.object.isRequired,onChange:h.a.func.isRequired,modalHandler:h.a.object,config:h.a.object,translations:h.a.object};var j=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tn(t,e);var n,r=jn(o);function o(e){var i;if(this instanceof o)return(i=r.call(this,e)).inputRef=null,i.showImageUploadOption=function(){i.setState({uploadHighlighted:!0})},i.addImageFromState=function(){var e=i.state,t=e.imgSrc,e=e.alt,n=i.state,r=n.height,n=n.width,o=i.props.onChange;isNaN(r)||(r+="px"),isNaN(n)||(n+="px"),o(t,r,n,e)},i.showImageURLOption=function(){i.setState({uploadHighlighted:!1})},i.toggleShowImageLoading=function(){var e=!i.state.showImageLoading;i.setState({showImageLoading:e})},i.updateValue=function(e){var t,n;i.setState((t={},n="".concat(e.target.name),e=e.target.value,n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t))},i.selectImage=function(e){e.target.files&&0<e.target.files.length&&i.uploadImage(e.target.files[0])},i.uploadImage=function(e){i.toggleShowImageLoading(),(0,i.props.config.uploadCallback)(e).then(function(e){e=e.data;i.setState({showImageLoading:!1,dragEnter:!1,imgSrc:e.link||e.url},i.addImageFromState),i.fileUpload=!1}).catch(function(){i.setState({showImageLoading:!1,dragEnter:!1})})},i.fileUploadClick=function(e,t){i.inputRef.current&&t&&t.key&&i.inputRef.current.click(),i.fileUpload=!0},i.stopPropagation=function(e){i.fileUpload?i.fileUpload=!1:(e.preventDefault(),e.stopPropagation())},i.handleButtonClick=function(){i.inputRef&&i.inputRef.current&&i.inputRef.current.click()},i.inputRef=g.a.createRef(),i.state={imgSrc:"",dragEnter:!1,uploadHighlighted:i.props.config.uploadEnabled&&!!i.props.config.uploadCallback,showImageLoading:!1,height:i.props.config.defaultSize.height,width:i.props.config.defaultSize.width,alt:""},i;throw new TypeError("Cannot call a class as a function")}return t=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=(t.className,t.title),t=t.inputAccept,o=e.expanded;return e.inDropdown?g.a.createElement(E,null,g.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},g.a.createElement(_.f,{name:n,size:20,className:"mr-4"}),g.a.createElement(_.m,null,r)),g.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"})):g.a.createElement("div",{"aria-haspopup":"true","aria-expanded":o},g.a.createElement(_.n,{tooltip:r},g.a.createElement(l,{"aria-label":"add image",className:"mr-2",value:"unordered-list-item",onClick:this.fileUploadClick},g.a.createElement("span",null,g.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},g.a.createElement(_.f,{name:n,size:20}))),g.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"}))))}}])&&Dn(t.prototype,e),n&&Dn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),Mn=(j.propTypes={expanded:h.a.bool,onExpandEvent:h.a.func,doCollapse:h.a.func,onChange:h.a.func,config:h.a.object,translations:h.a.object,inDropdown:h.a.bool},j);function Nn(e){return(Nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function An(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pn(e,t){return(Pn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Ln(n),t=(e=r?(e=Ln(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Nn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Ln(e){return(Ln=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Fn(e){var t=e.config,n=e.onChange,e=e.translations,r=t.icon,o=t.className,t=t.title;return g.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},g.a.createElement(l,{className:v()(o),onClick:n,title:t||e["components.controls.remove.remove"]},g.a.createElement("img",{src:r,alt:""})))}var j=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pn(t,e);var n,r=Rn(o);function o(e){var s;if(this instanceof o)return(s=r.call(this,e)).addImage=function(e,t,n,r){var o=s.props,i=o.editorState,a=o.onChange,e={src:e,height:t,width:n},t=(o.config.alt&&(e.alt=r),i.getCurrentContent().createEntity("IMAGE","MUTABLE",e).getLastCreatedEntityKey());a(y.AtomicBlockUtils.insertAtomicBlock(i,t," "))},s.state={expanded:!1},s;throw new TypeError("Cannot call a class as a function")}return t=o,(e=[{key:"componentWillUnmount",value:function(){}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.inDropdown;return g.a.createElement(Mn,{config:t,inDropdown:e,onChange:this.addImage})}}])&&An(t.prototype,e),n&&An(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),Bn=(j.propTypes={editorState:h.a.object.isRequired,onChange:h.a.func.isRequired,config:h.a.object,inDropdown:h.a.bool},o(211),Fn.propTypes={onChange:h.a.func,config:h.a.object,translations:h.a.object},Fn);function zn(e){return(zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hn(e,t){return(Hn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Un(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=qn(n),t=(e=r?(e=qn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===zn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function qn(e){return(qn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hn(t,e);var n,a=Un(s);function s(){var n,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(n=a.call.apply(a,[this].concat(o))).state={expanded:!1},n.onExpandEvent=function(){n.signalExpanded=!n.state.expanded},n.expandCollapse=function(){n.setState({expanded:n.signalExpanded}),n.signalExpanded=!1},n.removeInlineStyles=function(){var e=n.props,t=e.editorState;(0,e.onChange)(n.removeAllInlineStyles(t))},n.removeAllInlineStyles=function(n){var r=n.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){r=y.Modifier.removeInlineStyle(r,n.getSelection(),e)}),c(Object(m.getSelectionCustomInlineStyle)(n,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(e,t){t&&(r=y.Modifier.removeInlineStyle(r,n.getSelection(),t))}),y.EditorState.push(n,r,"change-inline-style")},n.doExpand=function(){n.setState({expanded:!0})},n.doCollapse=function(){n.setState({expanded:!1})},n}return t=s,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state.expanded,r=t.component||Bn;return g.a.createElement(r,{config:t,translations:e,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Kn(t.prototype,e),n&&Kn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component);Wn.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object.isRequired,config:h.a.object,translations:h.a.object,modalHandler:h.a.object},o(212);function Vn(e){return(Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yn(e,t){return(Yn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $n(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Zn(n),t=(e=r?(e=Zn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Vn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Zn(e){return(Zn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Jn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yn(t,e);var n,a=$n(s);function s(){var t,e=this,n=s;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(t=a.call.apply(a,[this].concat(o))).onChange=function(e){(0,t.props.onChange)(e)},t}return t=s,(e=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,i=e.doCollapse,a=e.currentState,s=a.undoDisabled,a=a.redoDisabled,e=e.translations,c=t.options,u=t.undo,l=t.redo,f=t.className,p=t.dropdownClassName,d=t.title;return g.a.createElement(w,{className:v()("rdw-history-dropdown",f),optionWrapperClassName:v()(p),expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-history-control",title:d||e["components.controls.history.history"]},g.a.createElement("img",{src:J(t),alt:""}),0<=c.indexOf("undo")&&g.a.createElement(E,{value:"undo",onClick:this.onChange,disabled:s,className:v()("rdw-history-dropdownoption",u.className),title:u.title||e["components.controls.history.undo"]},g.a.createElement("img",{src:u.icon,alt:""})),0<=c.indexOf("redo")&&g.a.createElement(E,{value:"redo",onClick:this.onChange,disabled:a,className:v()("rdw-history-dropdownoption",l.className),title:l.title||e["components.controls.history.redo"]},g.a.createElement("img",{src:l.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,o=t.redo,t=t.className,i=e.currentState,a=i.undoDisabled,i=i.redoDisabled,e=e.translations;return g.a.createElement("div",{className:v()("rdw-history-wrapper",t),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&g.a.createElement(l,{value:"undo",onClick:this.onChange,className:v()(r.className),disabled:a,title:r.title||e["components.controls.history.undo"]},g.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&g.a.createElement(l,{value:"redo",onClick:this.onChange,className:v()(o.className),disabled:i,title:o.title||e["components.controls.history.redo"]},g.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Gn(t.prototype,e),n&&Gn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component);function Xn(e){return(Xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function er(e,t){return(er=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tr(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=nr(n),t=(e=r?(e=nr(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Xn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function nr(e){return(nr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Jn.propTypes={expanded:h.a.bool,doExpand:h.a.func,doCollapse:h.a.func,onExpandEvent:h.a.func,config:h.a.object,onChange:h.a.func,currentState:h.a.object,translations:h.a.object};var rr=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&er(t,e);var n,o=tr(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,e)).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.onChange=function(e){var t=r.props,n=t.editorState,t=t.onChange,e=y.EditorState[e](n);e&&t(e)},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})};var t={expanded:!(r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},n=e.editorState,e=e.modalHandler;return n&&(t.undoDisabled=0===n.getUndoStack().size,t.redoDisabled=0===n.getRedoStack().size),r.state=t,e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.undoDisabled,o=n.redoDisabled,n=n.expanded,i=t.component||Jn;return g.a.createElement(i,{config:t,translations:e,currentState:{undoDisabled:r,redoDisabled:o},expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&Qn(t.prototype,e),n&&Qn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component);function or(e){return(or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}rr.propTypes={onChange:h.a.func.isRequired,editorState:h.a.object,modalHandler:h.a.object,config:h.a.object,translations:h.a.object};var ir=["config","currentState","onChange"],ar=["config"];function sr(){return(sr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function cr(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function ur(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lr(e,t){return(lr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fr(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=pr(n),t=(e=r?(e=pr(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===or(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function pr(e){return(pr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dr=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lr(t,e);var n,r=fr(o);function o(e){var t;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(t=r.call(this,e)).onExpandEvent=function(){t.setState({expanded:!t.state.expanded})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.onChange=function(e){t.doCollapse(),t.props.onChange(e)};e=t.props;e.editorState,e.modalHandler;return t.state={expanded:!1},t}return t=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler}},{key:"renderInDropdown",value:function(){var r=this,e=this.props,o=e.config,i=(e.currentState,e.onChange,cr(e,ir));this.state.expanded;return g.a.createElement(w,{expanded:this.state.expanded,doExpand:this.doExpand,doCollapse:this.doCollapse,onExpandEvent:this.onExpandEvent,menu:!0},g.a.createElement(_.f,{name:"more_horizon"}),o.options.slice(o.max,o.options.length).map(function(e,t){var n=o[e],e=hr[e];return g.a.createElement(e,sr({key:t,config:n,inDropdown:!0,onChange:r.onChange},i))}))}},{key:"render",value:function(){var o=this,e=this.props,i=e.config,a=cr(e,ar),e=i.max;return g.a.createElement("div",{className:"Editor-toolbar-insert"},i.options.slice(0,e).map(function(e,t){var n=i[e],r=hr[e];return(o.props.mention||"mention"!==e)&&n.isVisible?g.a.createElement(r,sr({key:t,config:n,inDropdown:!1},a)):null}))}}])&&ur(t.prototype,e),n&&ur(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),hr=(dr.propTypes={onChange:h.a.func.isRequired,onCloseLinkPopover:h.a.func.isRequired,editorState:h.a.object.isRequired,modalHandler:h.a.object,config:h.a.object,mention:h.a.object,linkPopoverOpen:h.a.bool,translations:h.a.object},{textDecoration:e,heading:r,fontSize:We,insert:dr,fontFamily:C,list:O,textAlign:Ot,colorPicker:x,link:Lt,mention:k,embedded:D,emoji:T,image:j,remove:Wn,history:rr});function yr(e){return(yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mr(e,t){return(mr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vr(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=br(n),t=(e=r?(e=br(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===yr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function br(e){return(br=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _r(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"LINK"===n.getEntity(e).getType()},t)}function wr(c){var e=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mr(t,e);var n,a=vr(s);function s(){var o,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(o=a.call.apply(a,[this].concat(r))).state={open:!1},o.onDeleteLink=function(e){e.preventDefault(),e.stopPropagation();var e=c.getEditorState(),t=e.getSelection(),n=o.props,r=n.contentState,n=n.entityKey,e=Object(m.getEntityRange)(e,n),t=t.getIsBackward()?t.merge({anchorOffset:e.end,focusOffset:e.start}):t.merge({anchorOffset:e.start,focusOffset:e.end}),n=y.Modifier.setBlockType(r,t,"unstyled"),n=y.Modifier.removeRange(n,t,"backward");c.onChange(y.EditorState.push(c.getEditorState(),n,"remove-range"))},o.onEditLink=function(e){e.preventDefault(),e.stopPropagation(),c.onEditLink(),o.setState({open:!1})},o.onToggle=function(e){o.setState({open:e})},o}return t=s,(e=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.entityKey,e=e.contentState.getEntity(n).getData().url,n=this.state.open,t=g.a.createElement("span",{contentEditable:"false",suppressContentEditableWarning:!0},g.a.createElement(_.m,{appearance:"link"},t));return g.a.createElement(_.l,{trigger:t,appendToBody:!0,open:n,onToggle:this.onToggle},g.a.createElement("div",{contentEditable:"false",suppressContentEditableWarning:!0,className:"d-flex pl-5 py-5 pr-4 align-items-center"},g.a.createElement(_.h,{href:e,target:"_new",className:"Editor-link"},e),g.a.createElement("span",{className:"Editor-seperator"}),g.a.createElement(_.a,{"aria-label":"Edit",onClick:this.onEditLink,appearance:"transparent",icon:"edit"}),g.a.createElement("span",{className:"Editor-seperator"}),g.a.createElement(_.a,{"aria-label":"Delete",onClick:this.onDeleteLink,appearance:"transparent",icon:"delete"})))}}])&&gr(t.prototype,e),n&&gr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component);return e.propTypes={entityKey:h.a.string.isRequired,children:h.a.array,contentState:h.a.object},e}function Sr(){return(Sr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Er(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Cr(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Er(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Er(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function Or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xr(e,t,n){return t&&Or(e.prototype,t),n&&Or(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var e=xr(function e(t){var i=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.first=function(e){return null!=e&&e.length?e[0]:void 0},this.getMentionComponent=function(){function e(e){var o=e.entityKey,t=e.children,e=e.contentState.getEntity(o).getData().value;return i.renderer?i.renderer(t):(e=Cr(Cr({type:"input",name:e,clearButton:!1},i.chipOptions),{},{label:t,className:"Editor-mention-chip"}),g.a.createElement(_.c,Sr({},e,{onClose:function(){var e=i.config,t=e.getEditorState(),n=t.getCurrentContent(),r=t.getSelection(),t=Object(m.getEntityRange)(t,o),r=r.getIsBackward()?r.merge({anchorOffset:t.end,focusOffset:t.start}):r.merge({anchorOffset:t.start,focusOffset:t.end+1}),t=y.Modifier.setBlockType(n,r,"unstyled"),t=y.Modifier.removeRange(t,r,"backward");e.onChange(y.EditorState.push(e.getEditorState(),t,"remove-range"))}})))}return e.propTypes={entityKey:h.a.number,children:h.a.array,contentState:h.a.object},e},this.getMentionDecorator=function(){return{strategy:i.findMentionEntities,component:i.getMentionComponent()}},this.config=t,this.chipOptions=t.chipOptions,this.renderer=t.renderer}),kr=(e.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"MENTION"===n.getEntity(e).getType()},t)},e);function Dr(e){return(Dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Tr(e,t){return(Tr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jr(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Ir(n),t=(e=r?(e=Ir(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Dr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Ir(e){return(Ir=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Mr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nr(e,t,n){return t&&Mr(e.prototype,t),n&&Mr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ar(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pr(e){var t=e.block,t=(e=e.contentState.getEntity(t.getEntityAt(0)).getData()).src,n=e.height,e=e.width;return g.a.createElement("iframe",{height:n,width:e,src:t,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}var Rr=Nr(function e(t){var c=this,n=(Ar(this,e),this.findSuggestionEntities=function(e,t){var n,r,o,i,a,s;c.config.getEditorState()&&(n=(i=c.config).separator,r=i.trigger,o=i.getSuggestions,a=i.getEditorState,i=i.fetchSuggestions,(a=a().getSelection()).get("anchorKey")===e.get("key")&&a.get("anchorKey")===a.get("focusKey")&&(s=n+r,(void 0===(a=(e=(e=e.getText()).substr(0,a.get("focusOffset")===e.length-1?e.length:a.get("focusOffset")+1)).lastIndexOf(n+r))||a<0)&&e[0]===r&&(a=0,s=r),0<=a&&(i||0<Z(o(),e.substr(a+s.length,e.length),c.config.caseSensitive).length)&&t(0===a?0:a+1,e.length)))},this.getSuggestionComponent=function(){var e,u=this.config;return(e=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tr(t,e);var r=jr(o);function o(){var c;Ar(this,o);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(c=r.call.apply(r,[this].concat(t))).state={style:{left:15},activeOption:-1,showSuggestions:!0,showLoader:!1},c.onEditorKeyDown=function(e){var t=c.state.activeOption,n={};"ArrowDown"===e.key?(e.preventDefault(),t===c.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=Number(t)+1):"ArrowUp"===e.key?n.activeOption=t<=0?c.filteredSuggestions.length-1:Number(t)-1:"Escape"===e.key?(n.showSuggestions=!1,G()):"Enter"===e.key&&c.addMention(),c.setState(n)},c.onOptionMouseEnter=function(e){e=e.target.getAttribute("data-index");c.setState({activeOption:e})},c.onOptionMouseLeave=function(){c.setState({activeOption:-1})},c.setSuggestionReference=function(e){c.suggestion=e},c.setDropdownReference=function(e){c.dropdown=e},c.closeSuggestionDropdown=function(){c.setState({showSuggestions:!1})},c.filteredSuggestions=[],c.filterSuggestions=function(e){var t=u.getSuggestions?u.getSuggestions():[];c.filteredSuggestions=Z(t,e,u.caseSensitive)},c.debouncedFetchSuggestion=function(n,e){var r,o=1<arguments.length&&void 0!==e?e:500;return function(){var e=arguments,t=this;clearTimeout(r),r=setTimeout(function(){return n.apply(t,e)},o)}}(function(e){u.fetchSuggestions(e).then(function(e){c.filteredSuggestions=e,c.setState({showSuggestions:0<e.length,showLoader:!1})})}),c.updateSuggestions=function(e){e=e.children[0].props.text.substr(1);u.fetchSuggestions?(c.setState({showLoader:!0}),c.debouncedFetchSuggestion(e)):c.filterSuggestions(e)},c.addMention=function(){var e,t,n,r=c.state.activeOption,o=u.getEditorState(),i=u.onChange,a=u.separator,s=u.trigger,r=c.filteredSuggestions[r];r&&(o=o,i=i,a=a,s=s,e=(r=r).label,t=r.value,r=r.url,t=o.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(s).concat(t),value:t,url:r}).getLastCreatedEntityKey(),r=Object(m.getSelectedBlock)(o).getText(),n=o.getSelection().focusOffset,a=(r.lastIndexOf(a+s,n)||0)+1,s=!1," "===r[n=r.length===a+1?r.length:n]&&(s=!0),r=o.getSelection().merge({anchorOffset:a,focusOffset:n}),n=y.EditorState.acceptSelection(o,r),o=y.Modifier.replaceText(n.getCurrentContent(),r,"".concat(e),null,t),n=y.EditorState.push(n,o,"insert-characters"),s||(r=n.getSelection().merge({anchorOffset:a+e.length,focusOffset:a+e.length}),n=y.EditorState.acceptSelection(n,r),o=y.Modifier.insertText(n.getCurrentContent(),r," ",n.getCurrentInlineStyle(),void 0)),i(y.EditorState.push(n,o,"insert-characters")))},c.getOptionClass=function(e){var t,n=c.state.activeOption;return v()((I(t={},"Editor-dropdown-option",!0),I(t,"Editor-dropdown-option--highlight",e===n),t))},c.renderOption=function(e,t){var n,r=u.dropdownOptions,r=(void 0===r?{}:r).customOptionRenderer,o=e.icon,i=e.label;return r?(n=r(e,c.state.activeOption,t),g.a.cloneElement(n,{key:t,spellCheck:!1,onClick:function(e){c.addMention(e),n.props.onClick&&n.props.onClick()},"data-index":t,onMouseEnter:c.onOptionMouseEnter,onMouseLeave:c.onOptionMouseLeave})):g.a.createElement("span",{key:t,spellCheck:!1,onClick:c.addMention,"data-index":t,onMouseEnter:c.onOptionMouseEnter,onMouseLeave:c.onOptionMouseLeave,className:c.getOptionClass(t)},o&&g.a.createElement(_.f,{name:o,className:"mr-4"}),g.a.createElement(_.m,null,i))},c}return Nr(o,[{key:"componentDidMount",value:function(){var e=this.suggestion.getBoundingClientRect(),t=e.left,e=e.top+25;this.setState({style:{left:t,top:e}}),b.registerCallBack(this.onEditorKeyDown),V(),u.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.updateSuggestions(this.props),this.setState({showSuggestions:!0})}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.updateSuggestions(this.props),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){b.deregisterCallBack(this.onEditorKeyDown),G(),u.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e,n=this,t=this.props.children,r=this.state.showSuggestions,o=u.dropdownOptions,o=(void 0===o?{}:o).dropdownClassName,o=v()((I(e={},"Popover",!0),I(e,"".concat(o),void 0!==o),I(e,"Editor-mention-dropdown",!0),I(e,"position-fixed",!0),e));return g.a.createElement("span",{className:"Editor-mention-suggestion",ref:this.setSuggestionReference,onClick:u.modalHandler.onSuggestionClick,"aria-haspopup":"true"},g.a.createElement("span",null,t),r&&g.a.createElement("span",{className:o,style:this.state.style,contentEditable:"false",suppressContentEditableWarning:!0,ref:this.setDropdownReference},this.state.showLoader?g.a.createElement("span",{className:"Editor-dropdown-option"},g.a.createElement(_.j,{withImage:!1},g.a.createElement(_.k,{length:"large"}),g.a.createElement(_.k,{length:"large"}),g.a.createElement(_.k,{length:"large"}))):this.filteredSuggestions.map(function(e,t){return n.renderOption(e,t)})))}}]),o}(d.Component)).propTypes={children:h.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:c.findSuggestionEntities,component:c.getSuggestionComponent()}},t.separator),r=t.trigger,o=t.getSuggestions,i=t.onChange,a=t.getEditorState,s=t.getWrapperRef,u=t.caseSensitive,l=t.optionClassName,f=t.modalHandler,p=t.dropdownOptions,t=t.fetchSuggestions;this.config={separator:void 0===n?" ":n,trigger:void 0===r?"@":r,getSuggestions:o,onChange:i,getEditorState:a,getWrapperRef:s,caseSensitive:u,dropdownOptions:p,optionClassName:l,modalHandler:f,fetchSuggestions:t}}),Lr=function(e){return[new kr(e).getMentionDecorator(),new Rr(e).getSuggestionDecorator()]},Fr=(Pr.propTypes={block:h.a.object,contentState:h.a.object},Pr);function Br(e){return(Br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kr(e,t){return(Kr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hr(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Ur(n),t=(e=r?(e=Ur(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Br(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Ur(e){return(Ur=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qr=function(c){var e=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kr(t,e);var n,a=Hr(s);function s(){var r,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=a.call.apply(a,[this].concat(o))).state={hovered:!1},r.setEntityAlignmentLeft=function(){r.setEntityAlignment("left")},r.setEntityAlignmentRight=function(){r.setEntityAlignment("right")},r.setEntityAlignmentCenter=function(){r.setEntityAlignment("none")},r.setEntityAlignment=function(e){var t=r.props,n=t.block,t=t.contentState,n=n.getEntityAt(0);t.mergeEntityData(n,{alignment:e}),c.onChange(y.EditorState.push(c.getEditorState(),t,"change-block-data"))},r.removeEntity=function(e){e.preventDefault(),e.stopPropagation();var e=r.props,t=e.block,e=e.contentState,t=t.getKey(),n=e.getKeyAfter(t),t=new y.SelectionState({anchorKey:t,anchorOffset:0,focusKey:n,focusOffset:0}),n=y.Modifier.setBlockType(e,t,"unstyled"),n=y.Modifier.removeRange(n,t,"backward");c.onChange(y.EditorState.push(c.getEditorState(),n,"remove-range"))},r.toggleHovered=function(){r.setState({hovered:!0})},r}return t=s,(e=[{key:"renderAlignmentOptions",value:function(){return g.a.createElement(_.l,{position:"bottom-end",appendToBody:!1,open:!0},g.a.createElement("div",{className:"d-flex"},g.a.createElement("div",{onClick:this.setEntityAlignmentLeft,className:"Editor-image-options"},g.a.createElement(_.f,{name:"format_align_left",size:20})),g.a.createElement("div",{onClick:this.setEntityAlignmentCenter,className:"Editor-image-options"},g.a.createElement(_.f,{name:"format_align_center",size:20})),g.a.createElement("div",{onClick:this.setEntityAlignmentRight,className:"Editor-image-options"},g.a.createElement(_.f,{name:"format_align_right",size:20})),g.a.createElement("div",{onClick:this.removeEntity,className:"Editor-image-options"},g.a.createElement(_.f,{name:"delete",size:20}))))}},{key:"render",value:function(){var e=this.props,t=e.block,e=e.contentState,n=this.state.hovered,r=c.isImageAlignmentEnabled,e=e.getEntity(t.getEntityAt(0)).getData(),t=e.src,o=e.alignment,i=e.height,a=e.width,e=e.alt,s=v()({"d-flex":!0,"justify-content-end":"right"===o,"justify-content-center":!o||"none"===o});return g.a.createElement("div",{onClick:this.toggleHovered,className:s},g.a.createElement("span",{className:"position-relative"},g.a.createElement("img",{src:t,alt:e,style:{height:i,width:a}}),n&&r()&&this.renderAlignmentOptions(o)))}}])&&zr(t.prototype,e),n&&zr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(d.Component);return e.propTypes={block:h.a.object,contentState:h.a.object},e},Wr=function(n,r){return function(e){if("function"==typeof r){var t=r(e,n,n.getEditorState);if(t)return t}if("atomic"===e.getType()){t=n.getEditorState().getCurrentContent().getEntity(e.getEntityAt(0));if(t&&"IMAGE"===t.type)return{component:qr(n),editable:!1};if(t&&"EMBEDDED_LINK"===t.type)return{component:Fr,editable:!1}}}},Vr=["var(--text)","var(--secondary)","var(--success)","var(--primary)","var(--alert)","var(--accent1)"],Gr={options:["heading","textDecoration","colorPicker","list","insert"],textDecoration:{max:3,options:["bold","italic","underline","strikethrough"],bold:{icon:"format_bold",title:"Bold (cmd+B)",label:"Bold"},italic:{icon:"format_italic",title:"Italic (cmd+I)",label:"Italic"},underline:{icon:"format_underlined",title:"Underline (cmd+U)",label:"Underline"},strikethrough:{icon:"strikethrough_s",title:"Strikethrough",label:"Strikethrough"}},heading:{icon:"format_size",options:["H1","H2","H3","H4"]},list:{options:["unordered","ordered"],unordered:{icon:"format_list_bulleted",title:"Unordered"},ordered:{icon:"format_list_numbered",title:"Ordered"}},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",colors:Vr},insert:{max:3,options:["image","mention","link"],image:{icon:"insert_photo",isVisible:!0,title:"Image",alt:"",defaultSize:{height:"100px",width:"300px"},inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",uploadCallback:function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(e){return t({data:{link:r.result}})},r.onerror=function(e){return n(e)},r.readAsDataURL(e)})}},link:{isVisible:!0,icon:"insert_link",linkCallback:void 0,title:"Link"},mention:{isVisible:!0,icon:"alternate_email",title:"Personalization"}},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0}},r={title:h.a.string,label:h.a.string},We={isVisible:h.a.bool,title:h.a.string,alt:h.a.string,uploadCallback:h.a.func,defaultSize:h.a.shape({height:h.a.string,width:h.a.string})},dr={isVisible:h.a.bool,title:h.a.string},C=h.a.shape({textDecoration:h.a.shape({max:h.a.number,bold:h.a.shape(r),italic:h.a.shape(r),underline:h.a.shape(r),strikethrough:h.a.shape(r)}),colorPicker:h.a.shape({colors:h.a.arrayOf(h.a.string)}),insert:h.a.shape({max:h.a.number,image:h.a.shape(We),link:h.a.shape(dr)})});o(213),o(94),o(95),o(96),o(97),o(98);o(99),o(100),o(101);function Yr(e){return(Yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $r(){return($r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Zr(e){return function(e){if(Array.isArray(e))return Jr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Jr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xr(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function M(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Xr(Object(n),!0).forEach(function(e){N(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function eo(e,t){return(eo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function to(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=no(n),t=(e=r?(e=no(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Yr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function no(e){return(no=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&eo(t,e);var n,r=to(o);function o(e){var a;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(a=r.call(this,e)).onEditorBlur=function(){a.setState({editorFocused:!1})},a.onEditorFocus=function(e){var t=a.props.onFocus,n=(a.setState({editorFocused:!0}),a.focusHandler.isEditorFocused());t&&n&&t(e)},a.onEditorMouseDown=function(){a.focusHandler.onEditorMouseDown()},a.keyBindingFn=function(e){var t;if("Tab"===e.key)return n=a.props.onTab,(t=Object(m.changeDepth)(a.state.editorState,e.shiftKey?-1:1,4))&&t!==a.state.editorState&&(a.onChange(t),e.preventDefault()),n&&n(e,t),null;if("ArrowUp"!==e.key&&"ArrowDown"!==e.key||Y()&&e.preventDefault(),"Backspace"===e.key&&a.isEmptyListBlock()){var n=y.RichUtils.toggleBlockType(a.state.editorState);if(n)return a.onChange(n),a.setState({editorState:y.EditorState.moveFocusToEnd(y.EditorState.createEmpty())}),!0}return Object(y.getDefaultKeyBinding)(e)},a.onToolbarFocus=function(e){var t=a.props.onFocus;t&&a.focusHandler.isToolbarFocused()&&t(e)},a.onWrapperBlur=function(e){var t=a.props.onBlur;t&&a.focusHandler.isEditorBlur(e)&&t(e,a.getEditorState())},a.onChange=function(e,t){var n=a.props,r=n.readOnly,n=n.onEditorStateChange;r||"atomic"===Object(m.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(n&&n(e,a.props.wrapperId),i(a.props,"editorState")?a.afterChange(e):a.setState({editorState:e},a.afterChange(e)))},a.setWrapperReference=function(e){a.wrapper=e},a.setEditorReference=function(e){a.props.editorRef&&a.props.editorRef(e),a.editor=e},a.onCloseLinkPopover=function(){a.setState({linkPopoverOpen:!1})},a.onEditLink=function(){a.setState(M(M({},a.state),{},{linkPopoverOpen:!0}))},a.getCompositeDecorator=function(e){var t=[{strategy:_r,component:wr({focusHandler:a.focusHandler,getEditorState:a.getEditorState,onChange:a.onChange,onEditLink:a.onEditLink})}];return a.props.mention&&t.push.apply(t,Zr(Lr(M(M({},a.props.mention),{},{onChange:a.onChange,getEditorState:a.getEditorState,getSuggestions:a.getSuggestions,getWrapperRef:a.getWrapperRef,modalHandler:a.modalHandler})))),new y.CompositeDecorator(t)},a.getWrapperRef=function(){return a.wrapper},a.getEditorState=function(){return a.state?a.state.editorState:null},a.getSuggestions=function(){return a.props.mention&&a.props.mention.suggestions},a.afterChange=function(t){setTimeout(function(){var e=a.props.onContentStateChange;e&&e(Object(y.convertToRaw)(t.getCurrentContent()))})},a.isReadOnly=function(){return a.props.readOnly},a.isImageAlignmentEnabled=function(){return a.state.toolbar.image.alignmentEnabled},a.createEditorState=function(e){var t,n;return i(a.props,"editorState")?a.props.editorState&&(t=y.EditorState.set(a.props.editorState,{decorator:e})):i(a.props,"defaultEditorState")?a.props.defaultEditorState&&(t=y.EditorState.set(a.props.defaultEditorState,{decorator:e})):i(a.props,"contentState")?a.props.contentState&&(n=Object(y.convertFromRaw)(a.props.contentState),t=y.EditorState.createWithContent(n,e),t=y.EditorState.moveSelectionToEnd(t)):i(a.props,"defaultContentState")&&(n=a.props.defaultContentState)&&(n=Object(y.convertFromRaw)(n),t=y.EditorState.createWithContent(n,e),t=y.EditorState.moveSelectionToEnd(t)),t=t||y.EditorState.createEmpty(e)},a.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","wrapperClassName","editorStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],e=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),r={},e&&0<e.length&&e.forEach(function(e){r[e]=t[e]}),r;var t,n,r},a.getStyleMap=function(e){return M(M({},Object(m.getCustomStyleMap)()),e.customStyleMap)},a.changeEditorState=function(e){var e=Object(y.convertFromRaw)(e),t=a.state.editorState,t=y.EditorState.push(t,e,"insert-characters");return y.EditorState.moveSelectionToEnd(t)},a.focusEditor=function(){setTimeout(function(){a.editor.focus()})},a.handleKeyCommand=function(e){var t=a.state,n=t.editorState,t=t.toolbar.textDecoration;if(t&&0<=t.options.indexOf(e)){t=y.RichUtils.handleKeyCommand(n,e);if(t)return a.onChange(t),!0}return!1},a.handleReturn=function(e){if(Y())return!0;var t=a.state.editorState,t=Object(m.handleNewLine)(t,e);return!!t&&(a.onChange(t),!0)},a.handlePastedTextFn=function(e,t){var n,r,o=a.state.editorState,i=a.props.handlePastedText;return i?i(e,t,o,a.onChange):(i=e,e=t,t=o,o=a.onChange,(r=Object(m.getSelectedBlock)(t))&&"code"===r.type?(r=y.Modifier.replaceText(t.getCurrentContent(),t.getSelection(),i,t.getCurrentInlineStyle()),o(y.EditorState.push(t,r,"insert-characters")),!0):!!e&&(i=L()(e),n=t.getCurrentContent(),i.entityMap.forEach(function(e,t){n=n.mergeEntityData(t,e)}),n=y.Modifier.replaceWithFragment(n,t.getSelection(),new B.List(i.contentBlocks)),o(y.EditorState.push(t,n,"insert-characters")),!0))},a.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?a.focusHandler.onInputMouseDown():e.preventDefault()},a.isEmptyListBlock=function(){var e=a.state.editorState.getCurrentContent();return!e.hasText()&&"unstyled"!==e.getBlockMap().first().getType()},a.blockRenderMap=y.DefaultDraftBlockRenderMap.merge(Object(B.Map)({"header-one":{wrapper:g.a.createElement(_.e,{size:"xxl"},a.props.children)},"header-two":{wrapper:g.a.createElement(_.e,{size:"xl"},a.props.children)},"header-three":{wrapper:g.a.createElement(_.e,{size:"l"},a.props.children)},"header-four":{wrapper:g.a.createElement(_.e,{size:"m"},a.props.children)},unstyled:{element:"p",wrapper:g.a.createElement("div",null,a.props.children)}}));var t=s(Gr,e.toolbar),n=e.wrapperId||Math.floor(1e4*Math.random()),n=(a.wrapperId="Editor-wrapper-".concat(n),a.modalHandler=new H,a.focusHandler=new W,a.blockRendererFn=Wr({isReadOnly:!0,isImageAlignmentEnabled:a.isImageAlignmentEnabled,getEditorState:a.getEditorState,onChange:a.onChange}),a.editorProps=a.filterEditorProps(e),a.customStyleMap=a.getStyleMap(e),a.compositeDecorator=a.getCompositeDecorator(t),a.createEditorState(a.compositeDecorator));return Object(m.extractInlineStyle)(n),a.state={editorState:n,toolbar:t,editorFocused:!1,linkPopoverOpen:!1},a}return t=o,(e=[{key:"componentDidMount",value:function(){this.props.autoFocus&&this.editor.focus(),this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o;e!==this.props&&(t={},n=(r=this.props).editorState,r=r.contentState,this.state.toolbar||(o=s(Gr,o),t.toolbar=o),i(this.props,"editorState")&&n!==e.editorState?t.editorState=n?y.EditorState.set(n,{decorator:this.compositeDecorator}):y.EditorState.createEmpty(this.compositeDecorator):i(this.props,"contentState")&&r!==e.contentState&&(r?(o=this.changeEditorState(r))&&(t.editorState=o):t.editorState=y.EditorState.createEmpty(this.compositeDecorator)),e.editorState===n&&e.contentState===r||Object(m.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props))}},{key:"render",value:function(){var e=this.state,t=e.editorState,r=(e.editorFocused,e.toolbar),e=this.props,n=e.toolbarClassName,o=e.editorClassName,i=e.wrapperClassName,a=e.editorStyle,s=e.ariaLabel,c=e.mention,u={linkPopoverOpen:this.state.linkPopoverOpen,onCloseLinkPopover:this.onCloseLinkPopover,modalHandler:this.modalHandler,editorState:t,onChange:this.onChange},e=v()(N({},"Editor-toolbar",!0),n),n=v()(N({},"Editor-wrapper",!0),i),i=v()((N(i={},"Editor",!0),N(i,"hide-placeholder",this.isEmptyListBlock()),i),o);return g.a.createElement("div",{id:this.wrapperId,className:n,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur},this.props.showToolbar&&g.a.createElement("div",{className:e,onMouseDown:this.preventDefault,"aria-label":"Editor-toolbar",onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=hr[e],e=r[e];return g.a.createElement(n,$r({key:t},u,{config:e,mention:c,className:"Editor-toolbar-options"}))})),g.a.createElement("div",{ref:this.setWrapperReference,className:i,style:a,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:b.onKeyDown,onMouseDown:this.onEditorMouseDown},g.a.createElement(y.Editor,$r({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:$,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:s,blockRenderMap:this.blockRenderMap},this.editorProps))))}}])&&Qr(t.prototype,e),n&&Qr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(d.Component),ro=(O.utils={EditorState:y.EditorState,ContentState:y.ContentState,RichUtils:y.RichUtils,convertFromRaw:y.convertFromRaw,convertToRaw:y.convertToRaw,htmlToState:function(e){var e=e.replaceAll("<br/>",""),e=L()(e);if(e)return{contentState:e=y.ContentState.createFromBlockArray(e.contentBlocks),editorState:y.EditorState.createWithContent(e)}},stateToHTML:function(e){e=Object(y.convertToRaw)(e.getCurrentContent());return F()(e,{},!1,function(e){var t=e.type,e=e.data;if("IMAGE"===t)return t=e.alignment||"center",'\n <p style="justify-content:'.concat(t,'; display:flex">\n <img src="').concat(e.src,'" alt="').concat(e.alt,'" style="height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n ')})}},O.propTypes={mention:h.a.shape({separator:h.a.string,trigger:h.a.string,chipOptions:h.a.object,dropdownOptions:h.a.shape({dropdownClassName:h.a.string,customOptionRenderer:h.a.func}),renderer:h.a.func,suggestions:h.a.shape({label:h.a.string,value:h.a.string,icon:h.a.string}),fetchSuggestions:h.a.func}),editorState:h.a.object,onEditorStateChange:h.a.func,defaultEditorState:h.a.object,onContentStateChange:h.a.func,defaultContentState:h.a.object,contentState:h.a.object,spellCheck:h.a.bool,toolbar:C,showToolbar:h.a.bool,editorClassName:h.a.string,wrapperClassName:h.a.string,toolbarClassName:h.a.string,editorStyle:h.a.object,onFocus:h.a.func,onBlur:h.a.func,onTab:h.a.func,textAlignment:h.a.oneOf(["left","right","center"]),readOnly:h.a.bool,autoFocus:h.a.bool,placeholder:h.a.string,ariaLabel:h.a.string,wrapperId:h.a.number,editorRef:h.a.func,handlePastedText:h.a.func},O.defaultProps={autoFocus:!0,showToolbar:!0},O),oo=o(49),io=o.n(oo),ao=o(50);function so(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?so(Object(n),!0).forEach(function(e){co(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):so(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function co(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uo(e){return function(e){if(Array.isArray(e))return lo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return lo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lo(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fo(e){return e.map(function(e){return[e,g.a.createElement("br",null)]})}function po(e,n){return g.a.createElement(g.a.Fragment,null,e.map(function(e,t){return g.a.createElement("li",{key:n[t]},e)}))}function ho(e,t){var n=void 0===(n=t.entities)?{}:n,r=void 0===(r=t.headings)?{}:r,o=void 0===(o=t.list)?{}:o,t=void 0===(t=t.colors)?[]:t,n=A(A({},_o),n),r=A(A({},vo),r),o=A(A({},bo),o),r=A(A(A({},wo),r),o),o=A(A({},go),So(t)),t={blocks:r,entities:n,styles:Object(oo.createStylesRenderer)(mo,o)};return io()(e,t,!1)}function P(e){var t=e.raw,n=e.entities,r=e.headings,o=e.list,e=e.colors;return(t=t&&ho(t,{entities:n,headings:r,list:o,colors:e}))?g.a.createElement(g.a.Fragment,null,t):null}var yo={padding:"0px",margin:"0px"},go={BOLD:{fontWeight:"bold"},ITALIC:{fontStyle:"italic"},UNDERLINE:{textDecoration:"underline"},STRIKETHROUGH:{textDecoration:"line-through"}},mo=function(e){var t=e.children,n=e.style,e=e.key;return g.a.createElement("span",{key:e,style:n},t)},vo={"header-one":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(_.e,{size:"xxl",key:n[t]},e)})},"header-two":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(_.e,{size:"xl",key:n[t]},e)})},"header-three":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(_.e,{size:"l",key:n[t]},e)})},"header-four":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(_.e,{size:"m",key:n[t]},e)})}},bo={"unordered-list-item":function(e,t){t=t.keys;return g.a.createElement("ul",{style:yo},po(e,t))},"ordered-list-item":function(e,t){t=t.keys;return g.a.createElement("ol",{style:yo},po(e,t))}},_o={LINK:function(e,t,n){n=n.key;return g.a.createElement(_.h,{key:n,href:t.url},e)},IMAGE:function(e,t){var n=t.src,r=t.alt,o=t.height,i=t.width,t=t.alignment;return g.a.createElement("p",{style:{justifyContent:t||"center",display:"flex"}},g.a.createElement("img",{src:n,alt:r,height:o,width:i}))},MENTION:function(e,t,n){n=n.key;return g.a.createElement(_.c,{label:e,name:t.value,key:n,type:"input"})}},wo={unstyled:function(e,t,n){var r,t=t.keys;return r=t,g.a.createElement(g.a.Fragment,null,e.map(function(e,t){var n=1<e.length&&e[1][0];return n&&n.includes("\n")?(n=n.split("\n"),g.a.createElement(_.i,{key:r[t]},fo(n))):g.a.createElement(_.i,{key:r[t]},fo(e))}))},atomic:function(e,t){return e[0]}},So=function(e){return[].concat(uo(Vr),uo(e)).reduce(function(e,t){var n="color-".concat(t),t={color:t};return A(A({},e),{},co({},n,t))},{})},Eo=(P.utils={convertToHTML:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!e)return"";var n,r,e=ho(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{});return e&&Object(ao.renderToStaticMarkup)(e)?(n=(r=o(230)).name,r=r.version,n="https://s3.us-east-1.amazonaws.com/webui-assets/".concat(n,"/v").concat(r,"/design-system.css"),r=t?'<link rel="stylesheet" href="'.concat(n,'">'):"","".concat(r," ").concat(Object(ao.renderToStaticMarkup)(e))):""}},P.propTypes={raw:h.a.object.isRequired,colors:h.a.arrayOf(h.a.string),list:h.a.object,headings:h.a.object,entities:h.a.object},P.defaultProps={entities:{},headings:{},list:{},colors:[]},P)}]);
|