@innovaccer/rich-text-editor 2.1.2 → 2.1.4
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/CHANGELOG.md +1 -1
- package/dist/rich-text-editor.js +7 -7
- package/package.json +1 -1
package/dist/rich-text-editor.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
module.exports=function(n){var r={};function o(e){var t;return(r[e]||(t=r[e]={i:e,l:!1,exports:{}},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),m=n(8),g=n(48),v=n(187),b=n(86),w=n(31),S=n(188),_=n(191),E=n(14),C=n(87),O=n(197),n=n(84);e.exports={Editor:f,EditorBlock:p,EditorState:m,CompositeDecorator:a,Entity:d,EntityInstance:y,BlockMapBuilder:o,CharacterMetadata:i,ContentBlock:s,ContentState:c,RawDraftContentState:v,SelectionState:w,AtomicBlockUtils:r,KeyBindingUtil:g,Modifier:h,RichUtils:b,DefaultDraftBlockRenderMap:u,DefaultDraftInlineStyle:l,convertFromHTML:n,convertFromRaw:_,convertToRaw:S,genKey:E,getDefaultKeyBinding:C,getVisibleSelectionRect:O}},function(e,Cs,Os){"use strict";!function(p){Os.d(Cs,"a",function(){return be}),Os.d(Cs,"b",function(){return Fe}),Os.d(Cs,"c",function(){return Lt}),Os.d(Cs,"d",function(){return qe}),Os.d(Cs,"e",function(){return tn}),Os.d(Cs,"f",function(){return N}),Os.d(Cs,"g",function(){return on}),Os.d(Cs,"h",function(){return dn}),Os.d(Cs,"i",function(){return wn}),Os.d(Cs,"j",function(){return M}),Os.d(Cs,"k",function(){return I}),Os.d(Cs,"l",function(){return da}),Os.d(Cs,"m",function(){return ve}),Os.d(Cs,"n",function(){return ma});var pe=Os(0),m=Os.n(pe),v=Os(22);function b(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 q(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach(function(e){de(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}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 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,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.prototype,t),n&&_(e,n)}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function he(){return(he=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&&C(e,t)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function W(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=E(n),t=(e=r?(e=E(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 ye(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)||k(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 G(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(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 k(e,t){var n;if(e)return"string"==typeof e?D(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}function D(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 j(e,t){var n,r,o,i,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,o=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw o}}};if(Array.isArray(e)||(a=k(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},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.")}function T(e,t){var n;return t?"number"==typeof t?(n=K(e,t),U(e,n)):t:""}function P(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]}if(e)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}return!1}function A(e,t){var n=(e=H(t,e)).hours,e=e.minutes;return(z(t)?n<=12:n<24)&&e<=60}function R(e){return!("string"==typeof e&&/[^0-9]/.test(e)||"number"==typeof e&&(e<=0||e-Math.floor(e)!=0))}de(n={},"hh:mm","--:--"),de(n,"hh:mm AM","--:-- AM");var L=n,z=function(e){return"hh:mm AM"===e},F=function(e){return{hrs:e%12||12,AMPM:e<12?"AM":"PM"}},B=function(e,t){var n=e;return t?("PM"===t&&e<12?n=e+12:"AM"===t&&12===e&&(n=e-12),n):e},K=function(e,t){var t=new Date(t),n=t.getHours(),r=z(e)?F(n).hrs:n,e=z(e)?F(n).AMPM:"";return{hours:r,minutes:t.getMinutes(),seconds:t.getSeconds(),am_pm:e}},H=function(e,t){var n=0,r=0,o=e.length,i=t.length,a=e.substring(o-2,o),a="AM"===a||"PM"===a,s=a?t.substring(i-2,i):"",i=a?t.substring(0,i-3):t,t=a?e.substring(0,o-3):e,c=i.split(":");return t.split(":").forEach(function(e,t){switch(e){case"hh":n=+c[t]||0;break;case"mm":r=+c[t]||0}}),{hours:n,minutes:r,am_pm:s}},U=function(e,t){var n=t.hours,r=t.minutes,t=t.am_pm,o=e.split(" ")[0].split(":"),i="";return o.forEach(function(e,t){switch(e){case"hh":i+=n<10?"0".concat(n):n;break;case"mm":i+=r<10?"0".concat(r):r}t!==e.length-1&&(i+=":")}),i+=z(e)&&t?" ".concat(t):""},J=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)})},X={"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/]},Q={"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/]},ee=(de(n={},"hh:mm",[/[0-1-2]/,/\d/,":",/[0-5]/,/\d/]),de(n,"hh:mm AM",[/[0-1]/,/\d/,":",/[0-5]/,/\d/," ",/[APap]/,"M"]),n),te="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==p?p:"undefined"!=typeof self?self:{};function ne(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 re(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 oe(e){function t(){document.body.style.overflow=o||"",i(null)}var n=e.className,r=ge(e),o=(l=ye(se(null),2))[0],i=l[1],a=(l=ye(pe.useState(e.open),2))[0],s=l[1],c=(l=ye(pe.useState(e.open),2))[0],u=l[1],l=me({Backdrop:!0,"Backdrop--open":a,"Backdrop-animation--open":c,"Backdrop-animation--close":!c},n);return ae(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]),v.createPortal(pe.createElement("div",he({"data-test":"DesignSystem-Backdrop","data-layer":!0,"data-opened":a},r,{className:l,style:{zIndex:e.zIndex}})),document.body)}var me=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(" ")}
|
|
1
|
+
module.exports=function(n){var r={};function o(e){var t;return(r[e]||(t=r[e]={i:e,l:!1,exports:{}},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),m=n(8),g=n(48),v=n(187),b=n(86),w=n(31),S=n(188),_=n(191),E=n(14),C=n(87),O=n(197),n=n(84);e.exports={Editor:f,EditorBlock:p,EditorState:m,CompositeDecorator:a,Entity:d,EntityInstance:y,BlockMapBuilder:o,CharacterMetadata:i,ContentBlock:s,ContentState:c,RawDraftContentState:v,SelectionState:w,AtomicBlockUtils:r,KeyBindingUtil:g,Modifier:h,RichUtils:b,DefaultDraftBlockRenderMap:u,DefaultDraftInlineStyle:l,convertFromHTML:n,convertFromRaw:_,convertToRaw:S,genKey:E,getDefaultKeyBinding:C,getVisibleSelectionRect:O}},function(e,Os,xs){"use strict";!function(p){xs.d(Os,"a",function(){return we}),xs.d(Os,"b",function(){return gt}),xs.d(Os,"c",function(){return yt}),xs.d(Os,"d",function(){return Qt}),xs.d(Os,"e",function(){return nn}),xs.d(Os,"f",function(){return N}),xs.d(Os,"g",function(){return an}),xs.d(Os,"h",function(){return hn}),xs.d(Os,"i",function(){return Sn}),xs.d(Os,"j",function(){return M}),xs.d(Os,"k",function(){return I}),xs.d(Os,"l",function(){return ha}),xs.d(Os,"m",function(){return Se}),xs.d(Os,"n",function(){return ga});var de=xs(0),m=xs.n(de),v=xs(22);function b(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 W(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach(function(e){he(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(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,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.prototype,t),n&&_(e,n)}function he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ye(){return(ye=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&&C(e,t)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function q(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=E(n),t=(e=r?(e=E(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 me(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)||k(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 ge(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(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 k(e,t){var n;if(e)return"string"==typeof e?D(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}function D(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 j(e,t){var n,r,o,i,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,o=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw o}}};if(Array.isArray(e)||(a=k(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},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.")}function T(e,t){var n;return t?"number"==typeof t?(n=K(e,t),U(e,n)):t:""}function P(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]}if(e)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}return!1}function A(e,t){var n=(e=H(t,e)).hours,e=e.minutes;return(z(t)?n<=12:n<24)&&e<=60}function R(e){return!("string"==typeof e&&/[^0-9]/.test(e)||"number"==typeof e&&(e<=0||e-Math.floor(e)!=0))}he(n={},"hh:mm","--:--"),he(n,"hh:mm AM","--:-- AM");var L=n,z=function(e){return"hh:mm AM"===e},F=function(e){return{hrs:e%12||12,AMPM:e<12?"AM":"PM"}},B=function(e,t){var n=e;return t?("PM"===t&&e<12?n=e+12:"AM"===t&&12===e&&(n=e-12),n):e},K=function(e,t){var t=new Date(t),n=t.getHours(),r=z(e)?F(n).hrs:n,e=z(e)?F(n).AMPM:"";return{hours:r,minutes:t.getMinutes(),seconds:t.getSeconds(),am_pm:e}},H=function(e,t){var n=0,r=0,o=e.length,i=t.length,a=e.substring(o-2,o),a="AM"===a||"PM"===a,s=a?t.substring(i-2,i):"",i=a?t.substring(0,i-3):t,t=a?e.substring(0,o-3):e,c=i.split(":");return t.split(":").forEach(function(e,t){switch(e){case"hh":n=+c[t]||0;break;case"mm":r=+c[t]||0}}),{hours:n,minutes:r,am_pm:s}},U=function(e,t){var n=t.hours,r=t.minutes,t=t.am_pm,o=e.split(" ")[0].split(":"),i="";return o.forEach(function(e,t){switch(e){case"hh":i+=n<10?"0".concat(n):n;break;case"mm":i+=r<10?"0".concat(r):r}t!==e.length-1&&(i+=":")}),i+=z(e)&&t?" ".concat(t):""},Z=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)})},J={"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/]},X={"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/]},Q=(he(n={},"hh:mm",[/[0-1-2]/,/\d/,":",/[0-5]/,/\d/]),he(n,"hh:mm AM",[/[0-1]/,/\d/,":",/[0-5]/,/\d/," ",/[APap]/,"M"]),n),ee="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==p?p:"undefined"!=typeof self?self:{};function te(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 ne(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 re(e){function t(){document.body.style.overflow=o||"",i(null)}var n=e.className,r=be(e),o=(l=me(ae(null),2))[0],i=l[1],a=(l=me(de.useState(e.open),2))[0],s=l[1],c=(l=me(de.useState(e.open),2))[0],u=l[1],l=ve({Backdrop:!0,"Backdrop--open":a,"Backdrop-animation--open":c,"Backdrop-animation--close":!c},n);return ie(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]),v.createPortal(de.createElement("div",ye({"data-test":"DesignSystem-Backdrop","data-layer":!0,"data-opened":a},r,{className:l,style:{zIndex:e.zIndex}})),document.body)}var ve=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}),ge=function(n){return["className","data-test"].reduce(function(e,t){return n[t]?q(q({},e),{},de({},t,n[t])):q({},e)},{})},ie=function(e){function t(){return pe.createElement("span",he({"data-test":"DesignSystem-Avatar"},l,{className:p}),f&&pe.createElement(ve,{weight:"medium",appearance:"white",className:d},f),!f&&pe.createElement(N,{"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=me((de(a={Avatar:!0},"Avatar--".concat(o),o),de(a,"Avatar--".concat(i),i),de(a,"Avatar--disabled",!f||!n),a),c),d=me((de(s={},"Avatar-content--".concat(o),o),de(s,"Avatar-content--".concat(i),i),s)),h=me(de({},"Avatar-content--".concat(i),i));return n&&f?pe.createElement(ma,{tooltip:e,position:r,triggerClass:"flex-grow-0"},t()):t()},ae=(ie.displayName="Avatar",ie.defaultProps={tooltipPosition:"bottom",withTooltip:!0,size:"regular"},pe.useEffect),se=pe.useState;oe.displayName="Backdrop";function ce(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 ue(e,t,n){return void 0===n?ce(e,t,!1):ce(e,n,!1!==t)}function we(e,t){var e=Me(G(e)),n=Me(G(t));return e.length===n.length&&e.every(function(e,t){return e.value===n[t].value})}function le(e){return void 0!==e}function fe(e){return void 0!==e}function Se(e,t,n){return e&&n&&""===t}function _e(e,t,n,r){return r&&n&&0===t&&""===e}function Ee(e,t,n){return e.length?0<e.length&&0<n&&e.length===t-n?{indeterminate:!0,checked:!0}:(n=0<e.length&&e.length!==t,{checked:0<e.length&&e.length===t,indeterminate:n}):{indeterminate:!1,checked:!1}}function Ce(e,t){e=t&&(null==(t=t[e])?void 0:t.optionID),(t=document.getElementById(e))&&t.scrollIntoView&&t.scrollIntoView({block:"center"})}function Oe(e){var t=e.children,n=void 0===(n=e.componentType)?"span":n,r=e.className,e=W(e,Re);return pe.createElement(n,q(q({},e),{},{className:r}),t)}function xe(){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 ke(e){switch(e.name){case"checked--regular":return m.a.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.66667 5.56L8.72667 0.5L9.66667 1.44667L3.66667 7.44667L0.333333 4.11333L1.27333 3.17333L3.66667 5.56Z",fill:"white"}));case"checked--tiny":return m.a.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.a.createElement("path",{d:"M0.333344 4L1.27334 3.06L3.66668 5.44667L8.72668 0.386665L9.66668 1.33333L3.66668 7.33333L0.333344 4Z",fill:"white"}));case"indeterminate--regular":return m.a.createElement("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.a.createElement("path",{d:"M0 0H10V2H0V0Z",fill:"white"}));case"indeterminate--tiny":return m.a.createElement("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0H0V2H8V0Z",fill:"white"}));default:return null}}function De(e){function t(){d||i&&i(c)}var n=e.optionData,r=e.selected,o=e.onClick,i=e.updateActiveOption,a=e.onChange,s=e.active,c=e.index,u=e.checkboxes,l=e.menu,f=void 0===(f=e.id)?"":f,p=(n.optionType?n:e).optionType,d=n.disabled,h=d?"inverse-lightest":r&&!l?"primary-dark":"inverse",y=d?"disabled":r&&!l?"primary_dark":"default",m=Be[p=u?"WITH_CHECKBOX":void 0===p?"DEFAULT":p],g=me((de(g={},"Option",!0),de(g,"Option--active",s),de(g,"Option--selected",r&&!l),de(g,"Option--disabled",d),de(g,"OptionWrapper",!0),de(g,"color-".concat(h),!0),g)),v=me((de(v={},"Option-checkbox",!0),de(v,"Option-checkbox--active",s),de(v,"OptionWrapper",!0),v)),b=me((de(b={},"Option-text",!0),de(b,"Option-text--wrap",!e.truncateOption),b)),w=me((de(w={},"OptionWrapper",!0),de(w,"OptionWrapper--disabled",d),w));return e.optionRenderer?pe.createElement("div",he({"data-test":"DesignSystem-DropdownOption--Custom",className:w,"data-disabled":d,onMouseEnter:t},!u&&{onClick:o}),e.optionRenderer({optionData:n,selected:r,onChange:a,active:s,index:c})):m({selected:r,index:c,renderSubInfo:function(e){var t,n=r?"white":"disabled";return"string"==typeof e?pe.createElement(ve,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",color:d?"inverse-lightest":r&&!l?"primary-dark":"inverse-lighter",size:"small",weight:"medium",className:"Option-subInfo"},e):(t=e.list,e=e.seperator,pe.createElement(hn,{list:void 0===t?[]:t,seperator:e,iconAppearance:n,labelAppearance:d?"disabled":r&&!l?"white":"subtle",seperatorAppearance:n,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"}))},optionData:n,textClassName:b,appearance:y,color:h,onClickHandler:function(e){e.stopPropagation(),d||o&&o()},onChangeHandler:function(e){e.stopPropagation(),d||a&&a(e)},onUpdateActiveOption:t,dataTest:"DesignSystem-DropdownOption--".concat(p),className:u?v:g,id:f})}function je(e){var t,n=void 0===(n=e.size)?"small":n,r=e.round,o=e.className,e=ge(e),r=me((de(t={PlaceholderImage:!0,"Placeholder--animation":!0},"PlaceholderImage--round",r),de(t,"PlaceholderImage--".concat(n),n),t),o);return pe.createElement("span",he({},e,{className:r}))}function Te(e){var t=e.loadingType,n=["medium","large"][(e.optionIndex+2)%2];switch(t){case"DEFAULT":return pe.createElement(I,{length:n,"data-test":"DesignSystem-Dropdown--PlaceholderParagraph"});case"WITH_ICON":return pe.createElement(M,{withImage:!0,round:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},pe.createElement(I,{length:"large"}));case"WITH_META":return pe.createElement(M,{withImage:!1,"data-test":"DesignSystem-Dropdown--Placeholder"},pe.createElement(I,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),pe.createElement(I,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}));case"WITH_CHECKBOX":return pe.createElement(M,{withImage:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},pe.createElement(I,{length:"large"}));case"ICON_WITH_META":return pe.createElement(M,{withImage:!0,round:!0,imageSize:"medium","data-test":"DesignSystem-Dropdown--Placeholder"},pe.createElement(I,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),pe.createElement(I,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}))}return null}function Ie(i){function R(){var e=document.querySelector(".Dropdown-wrapper");(e=null==e?void 0:e.offsetHeight)&&ae(e)}function o(e,t){Q(e,t),se||null!=(e=C.current)&&e.focus(),D(y)}function L(){var e;X(),null!=(e=C.current)&&e.focus()}function z(){var e;J(),null!=(e=C.current)&&e.focus()}function F(){D(y),S&&v&&S("")}function B(e){D(y),S&&S(e.target.value)}function K(e,t){var n=i.onClearOptions,r=p.every(function(e){return e.disabled});return pe.createElement("div",{className:ue(t)},pe.createElement(ve,{size:"small",appearance:"subtle"},e),t&&pe.createElement(be,{onClick:n,disabled:r,appearance:"transparent",size:"tiny",type:"button"},"Clear"))}function H(t,e){var n=_e(v,h,u,w)?e+1===k:e===k,r=-1!==d.findIndex(function(e){return e.value===t.value}),o="Checkbox-option-".concat(e,"-").concat(t.value,"-").concat((new Date).getTime());return pe.createElement("label",{htmlFor:o},pe.createElement(De,{optionData:t,truncateOption:V,selected:r,index:e,updateActiveOption:fe,optionRenderer:Z,active:n,checkboxes:w,menu:g,onClick:function(){return le(t)},onChange:function(e){return i.onSelect(t,e.target.checked)},optionType:i.optionType,id:o}))}function U(e,t){for(var n,r,o,i,a,s=document.querySelectorAll(t),c="down"===e?k+1:k-1,u="down"===e?s.length:-1;c!==u;){if("true"!==s[c].getAttribute("data-disabled")){var l=s[c];l&&(n=ne.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?Ne(n,r.offsetTop-o.height+a):i.top<o.top&&n&&Ne(n,r.offsetTop-a)),void 0!==l&&D(c);break}"down"===e?c++:c--}}var q,e,s,c=void 0===(t=i.listOptions)?[]:t,W=i.inputRef,t=void 0===(t=i.align)?"right":t,n=void 0===(n=i.optionType)?"DEFAULT":n,r=void 0===(r=i.applyButtonLabel)?"Apply":r,a=void 0===(a=i.cancelButtonLabel)?"Cancel":a,V=void 0===(l=i.truncateOption)||l,u=void 0===(l=i.withSelectAll)||l,l=void 0===(l=i.maxHeight)?200:l,f=i.customTrigger,p=i.selected,d=i.tempSelected,G=i.previousSelected,h=i.remainingOptions,y=i.firstEnabledOption,m=i.dropdownOpen,g=i.menu,v=i.searchTerm,b=i.showApplyButton,w=i.withCheckbox,Y=i.withSearch,$=i.popoverOptions,S=i.onSearchChange,Z=i.optionRenderer,J=i.applyOptions,X=i.cancelOptions,Q=i.toggleDropdown,_=i.className,E=void 0===(E=i.searchPlaceholder)?"Search..":E,ee=i.scrollIndex,te=ge(i),ne=pe.createRef(),re=pe.createRef(),C=pe.createRef(),O=pe.createRef(),x=pe.createRef(),oe=(T=ye(pe.useState(),2))[0],ie=T[1],k=(T=ye(pe.useState(y),2))[0],D=T[1],j=(T=ye(pe.useState(),2))[0],ae=T[1];pe.useEffect(function(){var e,t,n,r,o;return m&&(o=i.width,t=i.minWidth,n=i.maxWidth,r=null==(r=re.current)?void 0:r.clientWidth,o={width:o||r,minWidth:t||(b?176:g?128:r),maxWidth:n||"100%"},requestAnimationFrame(R),ie(o),ee)&&0===d.length&&(e=setTimeout(function(){Ce(ee,c)},100)),function(){clearTimeout(e)}},[m]),pe.useEffect(function(){y!==k&&D(y)},[y]);var T=void 0===(T=i.triggerSize)?"regular":T,I=void 0===(I=i.placeholder)?"Select":I,M=i.icon,N=i.error,se=i.disabled,ce=i.inlineLabel,P=i.triggerLabel,A=f?f(P||I):pe.createElement(pe.Fragment,null),f=f?pe.cloneElement(A,{tabIndex:0,ref:C}):pe.createElement(Ae,{placeholder:I,triggerSize:T,open:m,icon:M,disabled:se,inlineLabel:ce,menu:g,error:N,ref:C},P),A={maxHeight:l,overflowY:"auto",overflowX:"hidden",minHeight:j},I={maxHeight:j||l,overflowY:"auto",overflowX:"hidden",minHeight:j},ue=function(e){var t;return me((de(t={},"Dropdown-section",!0),de(t,"Dropdown-section--withClear",e),t))},T=me(de({},"Dropdown",!0),_),ce=me((de(M={},"Dropdown-wrapper",!0),de(M,"Dropdown-wrapper--wrap",!V),M)),P=me((de(N={},"Option-checkbox--active",0===k),de(N,"Option-checkboxWrapper",!0),de(N,"Option-checkbox",!0),de(N,"OptionWrapper",!0),N)),le=function(e){i.onOptionSelect(e),null!=(e=C.current)&&e.focus()},fe=function(e,t){t=w&&u&&!i.async&&!t?e+1:e;D(t)};return pe.createElement("div",he({},te,{className:T,ref:re,onKeyDown:function(e){var t,n=".OptionWrapper";switch(e.key){case"ArrowDown":e.preventDefault(),m?U("down",n):o(!m);break;case"ArrowUp":e.preventDefault(),m?U("up",n):o(!m);break;case"Enter":var r=document.activeElement;m&&(W.current===r||C.current===r)&&(e.preventDefault(),r=w?"".concat(n," .Checkbox-input"):n,r=document.querySelectorAll(r)[k])&&r.click(),m||o(!m);break;case"Tab":!b&&m?(e.preventDefault(),o(!1,"onClick")):(r=document.activeElement,t=null==(t=x.current)?void 0:t.disabled,(r===O.current&&t||r===x.current)&&m?(e.preventDefault(),o(!1,"onClick")):b&&m&&(e.preventDefault(),r===O.current?null!=(t=x.current)&&t.focus():null!=(r=O.current)&&r.focus()))}}}),pe.createElement(da,he({onToggle:o,trigger:f,triggerClass:g?"":"w-100",open:m,customStyle:oe,position:Ke[t]},$,{"data-test":"DesignSystem-Dropdown--Popover"}),(Y||i.async)&&pe.createElement("div",{className:"Dropdown-inputWrapper"},pe.createElement(on,{name:"Dropdown-search",icon:"search",value:v,placeholder:E,autoFocus:!0,onChange:B,onClear:F,ref:W,autoComplete:"off",className:"Dropdown-input"})),(l=i.selectedSectionLabel,s=void 0===l?"Selected Items":l,l=void 0===(l=i.loadersCount)?10:l,j=i.loadingOptions,_=_e(v,h,u,w),l&&j?pe.createElement("div",{className:"Dropdown-loading"},pe.createElement("div",{className:"Dropdown-wrapper",style:I},(e=l,e=Array(l).fill("Loading"),q=w?"WITH_CHECKBOX":n,e.map(function(e,t){return pe.createElement("div",{className:"Option-loading",key:"".concat(e,"-").concat(t)},pe.createElement(Te,{loadingType:q,optionIndex:t}))})))):0===c.length&&!j&&p.length<=0?(l=i.noResultMessage,pe.createElement("div",{className:"Dropdown-wrapper",style:A,"data-test":"DesignSystem-Dropdown--errorWrapper"},pe.createElement("div",{className:"Option"},pe.createElement("div",{className:"Option-subinfo"},void 0===l?"No result found":l)))):pe.createElement("div",{className:ce,style:A,ref:ne},_&&(e=void 0===(e=i.selectAllLabel)?"Select All":e,j=i.selectAll,l=i.onSelectAll,e=e.trim()?e.trim():"Select All",_="Checkbox-option-".concat(e.toLowerCase().replace(/\s+/g,""),"-").concat((new Date).getTime()),pe.createElement("div",{className:P,onMouseEnter:function(){return fe(0,!0)}},pe.createElement("label",{htmlFor:_,className:"Checkbox-label"},pe.createElement(Fe,{label:e,onChange:l,checked:j.checked,indeterminate:j.indeterminate,tabIndex:-1,className:"OptionCheckbox",id:_})))),0<p.length&&K(s,!0),p.map(H),c.map(function(e,t){var n,r,o=0<t?c[t-1].group:p.length?s:void 0,i=e.group,o=o!==i,a=t+p.length;return pe.createElement("div",{className:(n=a,me((de(r={},"Dropdown--border",o&&0!==n),de(r,"Option-checkboxWrapper",!0),r))),key:t},o&&i&&K(i),H(e,a))}),i.async&&0<h&&(l=i.footerLabel,pe.createElement("div",{className:"Dropdown-footer"},pe.createElement(ve,{size:"small",appearance:"subtle"},void 0===l?"Search for more options":l))))),b&&w&&(M=we(G,d)||i.loadingOptions,pe.createElement("div",{className:"Dropdown-buttonWrapper"},pe.createElement(be,{ref:O,className:"mr-4",appearance:"basic",onClick:L,disabled:i.loadingOptions,size:"tiny",tabIndex:-1,"data-test":"DesignSystem-Dropdown-CancelButton",type:"button"},a),pe.createElement(be,{ref:x,appearance:"primary",disabled:M,size:"tiny",onClick:z,"data-test":"DesignSystem-Dropdown-ApplyButton",type:"button"},r)))))}var Me=function(e){return e.sort(function(e,t){return e.value>t.value?1:t.value>e.value?-1:0})},Ne=function(e,t){e.scrollTo(0,t)},Pe=["triggerSize","placeholder","menu","children","icon","disabled","open","inlineLabel","error"],Ae=pe.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=W(e,Pe),p=c?"disabled":"default",o=o.trim(),o=a||o,d=i?s||"more_horiz":"keyboard_arrow_down",r=me((de(n={},"Button",!0),de(n,"DropdownButton",!0),de(n,"DropdownButton--".concat(r),r),de(n,"DropdownButton--".concat(r,"Square"),i),de(n,"DropdownButton--placeholder",!a&&!i),de(n,"DropdownButton--icon",s),de(n,"DropdownButton--open",u),de(n,"DropdownButton--error",f),n)),f=me((de(u={},"Text",!0),de(u,"Text--regular",!0),de(u,"DropdownButton-text",!0),u));return pe.createElement("button",he({ref:t,type:"button",value:a,className:r,disabled:c,tabIndex:0,"data-test":"DesignSystem-DropdownTrigger"},e),!i&&pe.createElement("div",{className:"DropdownButton-wrapper"},l&&pe.createElement(ve,{appearance:"subtle",className:"mr-4 white-space-nowrap"},"".concat(l.trim().charAt(0).toUpperCase()).concat(l.trim().slice(1))),s&&!l&&pe.createElement(N,{appearance:p,className:"d-flex align-items-center mr-4",name:s}),o&&pe.createElement("span",{className:f},o)),pe.createElement(N,{appearance:p,name:d}))}),Re=(Ae.displayName="DropdownButton",["children","componentType","className"]),Le=["appearance","size","children","weight","small","className","color"],ve=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.weight,a=e.small,s=e.className,c=e.color,e=W(e,Le),n=me((de(t={Text:!0},"Text--".concat(n),!c&&n),de(t,"Text--".concat(i),i),de(t,"Text--".concat(r),r),de(t,"color-".concat(c),c),de(t,"Text--small","small"===r||a),t),s);return pe.createElement(Oe,he({"data-test":"DesignSystem-Text"},e,{className:n,componentType:"span"}),o)},ze=(ve.displayName="Text",ve.defaultProps={appearance:"default",size:"regular"},["size","tabIndex","defaultChecked","indeterminate","label","error","disabled","onChange","name","value","className","checked","helpText","id"]),Fe=pe.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.error,c=e.disabled,u=e.onChange,l=e.name,f=e.value,p=e.className,d=e.checked,h=e.helpText,y=e.id,y=void 0===y?"".concat(l,"-").concat(a,"-").concat(xe()):y,m=W(e,ze),g=pe.useRef(null);pe.useImperativeHandle(t,function(){return g.current});var t=ye(pe.useState(void 0===d?o:d),2),v=t[0],b=t[1],t=(pe.useEffect(function(){S(i)},[i]),pe.useEffect(function(){void 0!==d&&b(d)},[d]),me((de(t={},"Checkbox",!0),de(t,"Checkbox--disabled",c),t),p)),p=me((de(p={},"Checkbox-outerWrapper",!0),de(p,"Checkbox-outerWrapper--".concat(n),n),p)),e=me((de(w={},"Checkbox-input",!0),de(w,"Checkbox-input--checked",v),de(w,"Checkbox-input--indeterminate",e.indeterminate),w)),s=me((de(w={},"Checkbox-wrapper",!0),de(w,"Checkbox-wrapper--default",!s),de(w,"Checkbox-wrapper--error",s),w)),w=me(de({},"Checkbox-label",!0)),S=function(e){g.current.indeterminate=e},_=me((de(_={},"checked--regular",v&&"regular"===n),de(_,"checked--tiny",v&&"tiny"===n),de(_,"indeterminate--regular",i&&"regular"===n),de(_,"indeterminate--tiny",i&&"tiny"===n),_));return pe.createElement(pe.Fragment,null,pe.createElement("div",{"data-test":"DesignSystem-Checkbox",className:t},pe.createElement("div",{"data-test":"DesignSystem-Checkbox-OuterWrapper",className:p},pe.createElement("input",he({},m,{type:"checkbox",defaultChecked:o,onChange:function(e){void 0===d&&(b(e.target.checked),S(e.target.indeterminate)),u&&u(e)},checked:v,disabled:c,ref:g,name:l,value:f,className:e,tabIndex:r,id:y,"data-test":"DesignSystem-Checkbox-InputBox"})),pe.createElement("span",{className:s,"data-test":"DesignSystem-Checkbox-Icon"},_&&pe.createElement(ke,{name:_}))),pe.createElement("div",{className:"Checkbox-labelWrapper"},a&&a.trim()&&pe.createElement("label",{htmlFor:y,className:w,"data-test":"DesignSystem-Checkbox-Label"},pe.createElement(ve,{size:"tiny"===n?"small":"regular",appearance:c?"disabled":"default"},a.trim())),h&&pe.createElement(ve,{"data-test":"DesignSystem-Checkbox-HelpText",size:"small",appearance:c?"disabled":"subtle"},h.trim()))))}),Be=(Fe.displayName="Checkbox",de(n={},"DEFAULT",function(e){var t=e.className,n=e.textClassName,r=e.onClickHandler,o=e.optionData,i=e.color,a=e.onUpdateActiveOption,e=e.dataTest,s=o.label,c=o.disabled;return pe.createElement("div",{className:t,onClick:r,onMouseEnter:a,"data-test":e,"data-disabled":c},pe.createElement("div",{className:"Option-label"},pe.createElement(ve,{className:n,color:i,id:o.optionID},s)))}),de(n,"WITH_ICON",function(e){var t,n=e.className,r=e.textClassName,o=e.onClickHandler,i=e.optionData,a=e.onUpdateActiveOption,s=e.color,e=e.dataTest,c=i.label,u=i.icon,i=i.disabled,n=me((de(t={},"".concat(n),!0),de(t,"Option--icon",u),t));return pe.createElement("div",{className:n,onClick:o,onMouseEnter:a,"data-test":e,"data-disabled":i},u&&pe.createElement(N,{className:"Option-icon mr-4","data-test":"".concat(e,"--Icon"),name:u}),pe.createElement("div",{className:"Option-label"},pe.createElement(ve,{className:r,color:s},c)))}),de(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.color,e=e.dataTest,c=o.subInfo,u=o.label,o=o.disabled;return pe.createElement("div",{className:t,onClick:r,onMouseEnter:i,"data-test":e,"data-disabled":o},pe.createElement("div",{className:"Option-label"},pe.createElement(ve,{className:n,color:s},u),c&&a(c)))}),de(n,"WITH_CHECKBOX",function(e){var t=e.className,n=e.selected,r=e.optionData,o=e.onChangeHandler,i=e.onUpdateActiveOption,a=e.dataTest,e=e.id,e=void 0===e?"":e,s=r.subInfo,c=r.label,r=r.disabled;return pe.createElement("div",{className:t,onMouseEnter:i,"data-test":a,"data-disabled":r},pe.createElement(Fe,{label:c,disabled:r,checked:n,onChange:o,tabIndex:-1,className:"OptionCheckbox ".concat(s?"pb-0":""),"data-test":"".concat(a,"--Checkbox"),id:e}),s&&pe.createElement("div",{className:"pl-8 ml-3"},(t=r?"disabled":"subtle",i=n?"white":"disabled","string"==typeof(c=s)?pe.createElement(ve,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",appearance:t,size:"small",weight:"medium"},c):(o=c.list,c=c.seperator,pe.createElement(hn,{list:void 0===o?[]:o,seperator:c,iconAppearance:i,labelAppearance:t,seperatorAppearance:i,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})))))}),de(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,u=e.color,e=e.dataTest,l=a.subInfo,f=a.label,p=a.icon,a=a.disabled,n=me((de(t={},"".concat(n),!0),de(t,"Option--icon",p),t));return pe.createElement("div",{className:n,onClick:i,onMouseEnter:s,"data-test":e,"data-disabled":a},p&&pe.createElement(N,{"data-test":"".concat(e,"--Icon"),className:"Option-icon mr-4",name:p,appearance:c}),pe.createElement("div",{className:"Option-label"},pe.createElement(ve,{className:r,color:u},f),l&&o(l)))}),n),I=function(e){var t,n=e.length,r=e.size,o=e.className,e=ge(e),i=me(de({"Placeholder--animation":!0,PlaceholderParagraph:!0},"PlaceholderParagraph--".concat(r),r)),n=me((de(t={"PlaceholderParagraph-wrapper":!0},"PlaceholderParagraph-wrapper--length-".concat(n),n),de(t,"PlaceholderParagraph-wrapper--size-".concat(r),r),t),o);return pe.createElement("div",he({},e,{className:n}),pe.createElement("span",{className:i}))},M=(I.displayName="PlaceholderParagraph",I.defaultProps={length:"medium"},je.displayName="PlaceholderImage",je.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=me(de({"Placeholder-paragraph":!0},"Placeholder-paragraph--withImage",n)),i=me(de({},"Placeholder",!0),i);return pe.createElement("div",he({"data-test":"DesignSystem-Placeholder"},e,{className:i}),n&&pe.createElement(je,{round:r,size:t,"data-test":"DesignSystem-Placeholder--Image"}),o&&pe.createElement("div",{className:a,"data-test":"DesignSystem-Placeholder--Paragraph"},o))}),Ke=(M.displayName="Placeholder",M.defaultProps={withImage:!0,imageSize:"small"},{right:"bottom-start",left:"bottom-end"}),He=(Ie.displayName="DropdownList",["triggerOptions","selected","tabIndex"]),Ue=pe.createRef(),qe=function(){e(l,pe["Component"]);var u=h(l);function l(e){d(this,l),de(V(g=u.call(this,e)),"staticLimit",void 0),de(V(g),"getDisabledOptions",function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).filter(function(e){return e.disabled})}),de(V(g),"fetchOptionsFunction",function(t){var n,e=g.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})})}),de(V(g),"getUnSelectedOptions",function(e,t){var n;return e.length?t?(t=g.props.selected,n=void 0===t?[]:t,e.filter(function(t){return le(g.props.selected)?-1===n.findIndex(function(e){return e.value===t.value}):!t.selected})):e.filter(function(t){return-1===g.state.tempSelected.findIndex(function(e){return e.value===t.value})}):e}),de(V(g),"getSelectedOptions",function(e,t){var n=g.props.selected;return e.length?t?le(g.props.selected)?void 0===n?[]:n:e.filter(function(e){return e.selected}):g.state.tempSelected:[]}),de(V(g),"updateOptions",function(s,e){var t=g.state,c=t.searchTerm,u=t.selectAll,l=t.tempSelected,f=t.previousSelected,p=void 0===e?g.state.async:e,t=g.props,e=t.fetchOptions,d=t.withCheckbox,h=t.withSearch;(e||g.fetchOptionsFunction)(c).then(function(e){var t,n,r,o,i=e.options,a=e.count;e.scrollToIndex&&setTimeout(function(){Ce(e.scrollToIndex,i)},0),(!e.searchTerm||e.searchTerm&&e.searchTerm===g.state.searchTerm)&&(p=""===c?a>g.staticLimit:p,t=Se(p,c,d)?g.getUnSelectedOptions(i,s):i,n=""===c?g.getSelectedOptions(i,s):[],r=""===c?a:g.state.optionsLength,o=g.getDisabledOptions(t.slice(0,g.staticLimit)),g.setState(q(q({},g.state),{},{scrollIndex:e.scrollToIndex||0,optionsLength:r,loading:!1,async:p,searchedOptionsLength:a,options:t.slice(0,g.staticLimit),tempSelected:s?n:l,previousSelected:s?n:f,selected:Se(p,c,d)?n:[],triggerLabel:g.updateTriggerLabel(s?n:l),selectAll:!p&&s?Ee(n,r,o.length):u})),p||h)&&null!=(a=Ue.current)&&a.focus()})}),de(V(g),"updateSearchTerm",function(e){g.setState(q(q({},g.state),{},{loading:!0,searchInit:!0,searchTerm:e}))}),de(V(g),"updateOnPopperToggle",function(){var e,t=g.props,n=t.withCheckbox,r=t.showApplyButton,o=t.onClose,i=t.name,t=t.selected,t=void 0===t?[]:t,a=g.state,s=a.previousSelected,c=a.tempSelected,u=a.optionsLength,l=a.async,f=a.loading,p=a.searchTerm,a=a.options,d=(fe(g.props.open)?g.props:g.state).open,a=g.getDisabledOptions(a).length;n&&r&&(e=le(g.props.selected)?t:s,g.setState({tempSelected:e,selectAll:Ee(e,u,a),triggerLabel:g.updateTriggerLabel(e)})),fe(g.props.open)&&g.setState({open:d}),d&&(u=Se(l,p,n)&&!we(g.state.selected,c),g.setState({loading:u||f||""!==p,searchInit:""!==p,searchTerm:""}),u)&&g.updateOptions(!1),o&&!d&&(a=(n&&r?le(g.props.selected)?t:s:g.state.tempSelected).map(function(e){return e.value}),g.debounceOnClose(a,i))}),de(V(g),"debounceOnClose",ue(300,function(e,t){var n=g.props.onClose;n&&n(e,t)})),de(V(g),"updateTriggerLabel",function(){var e,t,n,r,o,i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],a=i.length;return 0===a?"":(n=(e=g.props).triggerOptions,e=e.getLabel,t=(n=void 0===n?{}:n).customLabel,n=n.labelLimit,r=g.state?g.state.optionsLength:1<arguments.length?arguments[1]:void 0,o="",o=a<=(void 0===n?2:n)?i.map(function(e){return e.label}).join(", "):t?t(a,r,i):"".concat(a," selected"),e&&e(o),o)}),de(V(g),"updateSelectedOptions",function(e,t,n){var r=g.state,o=r.optionsLength,i=r.previousSelected,a=r.selected,s=r.loading,r=r.open,c=g.props,u=c.onChange,l=c.withCheckbox,f=c.showApplyButton,p=c.closeOnSelect,d=c.name,c=c.onPopperToggle,h=l&&f&&n,y=g.getDisabledOptions(g.state.options),m=0===e.length&&0<a.length||e.every(function(e){return e.disabled})&&!a.every(function(e){return e.disabled});g.setState(q(q({},g.state),{},{tempSelected:e,triggerLabel:g.updateTriggerLabel(e),selectAll:Ee(e,o,y.length),open:fe(g.props.open)||l?r:!p,previousSelected:h?e:i,selected:m?e:a,loading:!!m||s})),m&&g.debounceClear(),!u||f&&!n||(o=e.map(function(e){return e.value}),u(t?o[0]:o,d)),!l&&p&&c&&fe(g.props.open)&&c(!1,"optionClick")}),de(V(g),"isValidOption",function(e){var t=g.props,n=t.closeOnSelect,r=t.withCheckbox,o=t.open,t=t.onPopperToggle,i=g.state.tempSelected;return!(0<i.length&&!r&&i[0].value===e.value&&(g.setState(q(q({},g.state),{},{open:fe(o)||!n})),!r&&n&&t&&fe(o)&&t(!1,"optionClick"),1))}),de(V(g),"onOptionSelect",function(e){var t=g.props,n=t.onUpdate,r=t.selected,t=t.menu;le(r)?n&&(g.isValidOption(e)||t)&&n("select-option",e):(g.isValidOption(e)||t)&&g.updateSelectedOptions([e],!0)}),de(V(g),"onSelect",function(t,e){var n=g.props,r=n.onUpdate,o=n.selected,n=n.showApplyButton;le(o)&&!n?r&&r(e?"select-option":"deselect-option",t):(o=g.state.tempSelected.slice(),e||(n=o.findIndex(function(e){return e.value===t.value}),o.splice(n,1)),o=e?o.concat(t):o,g.updateSelectedOptions(o,!1))}),de(V(g),"onSelectAll",function(e){var t=g.props,n=t.onUpdate,r=t.selected,t=t.showApplyButton,o=g.state,i=o.tempSelected,o=o.options;le(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(G(o.filter(function(e){return!e.disabled})),G(r)):r,g.updateSelectedOptions(t,!1))}),de(V(g),"debounceSearch",ue(g.props.searchDebounceDuration,function(){g.setState({searchInit:!1},function(){g.updateOptions(!1)})})),de(V(g),"debounceClear",ue(250,function(){return g.updateOptions(!1)})),de(V(g),"onClearOptions",function(){var e=g.props,t=e.selected,n=e.name,r=e.onUpdate,o=e.showApplyButton,e=e.onChange,i=g.state.tempSelected.filter(function(e){return e.disabled});le(t)&&!o?r&&r("clear-all"):(g.setState({selected:i,tempSelected:i,triggerLabel:"",loading:!0}),g.debounceClear(),e&&!o&&e(i,n))}),de(V(g),"onTogglePopper",function(e){var t=g.props.onPopperToggle;t&&fe(g.props.open)&&t(!1,e)}),de(V(g),"onCancelOptions",function(){var e=g.state,t=e.previousSelected,n=e.tempSelected,e=e.optionsLength,r=g.props,o=r.selected,i=r.onUpdate,a=r.onClose,r=r.name,s=!!fe(g.props.open)&&g.state.open,c=t.map(function(e){return e.value});le(o)?i&&i("cancel-selected",t,n):(o=g.updateTriggerLabel(t),i=g.getDisabledOptions(g.state.options),g.setState(q(q({},g.state),{},{tempSelected:t,selectAll:Ee(t,e,i.length),triggerLabel:o,open:s})),a&&!s&&a(c,r)),g.onTogglePopper("cancelClick")}),de(V(g),"onApplyOptions",function(){var e=g.state,t=e.tempSelected,e=e.previousSelected,n=g.props,r=n.onChange,o=n.selected,i=n.onUpdate,a=n.onClose,n=n.name,s=!!fe(g.props.open)&&g.state.open,c=t.map(function(e){return e.value});le(o)?i&&i("apply-selected",e,t):(g.setState(q(q({},g.state),{},{previousSelected:t,optionsApplied:!0,open:s})),r&&r(c,n),a&&!s&&a(c,n)),g.onTogglePopper("applyClick")}),de(V(g),"onToggleDropdown",function(e,t){var n;g.props.disabled||((n=g.props.onPopperToggle)&&fe(g.props.open)?n(e,t):g.setState({open:e}))});var g,t=e.selected,t=void 0===t?[]:t,n=e.totalOptions,r=e.withCheckbox,o=e.loading,i=e.open,a=e.options,e=(g.staticLimit=Math.min(100,e.staticLimit),n||a.length),n="fetchOptions"in g.props||e>g.staticLimit,s=n?[]:g.getSelectedOptions(a,!0),c=g.getDisabledOptions(a);return g.state={async:n,optionsLength:e,open:i,searchInit:!1,searchedOptionsLength:e,optionsApplied:!1,options:a||[],loading:n||o,searchTerm:"",tempSelected:s,previousSelected:s,selected:Se(n,"",r)?t:[],triggerLabel:g.updateTriggerLabel(s,e),selectAll:Ee(s,e,c.length)},g}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(q(q({},this.state),{},{options:a,loading:o,tempSelected:i,previousSelected:i,optionsLength:a.length,searchedOptionsLength:a.length,triggerLabel:this.updateTriggerLabel(i),selectAll:Ee(i,this.state.optionsLength,r)})),n&&null!=(o=Ue.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||fe(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,f=e.previousSelected,e=e.scrollIndex,p=this.props,d=p.withSelectAll,d=void 0===d||d,p=p.withCheckbox,h=this.props,y=h.triggerOptions,y=void 0===y?{}:y,m=(h.selected,h.tabIndex),h=W(h,He),s=s-t.length,m=m||(_e(o,s,d,p)?0:t.findIndex(function(e){return!e.disabled}));return pe.createElement(Ie,he({listOptions:t,inputRef:Ue,remainingOptions:s,firstEnabledOption:m,loadingOptions:a,async:n,searchInit:i,dropdownOpen:r,searchTerm:o,triggerLabel:l,tempSelected:c,previousSelected:f,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:y.customTrigger,scrollIndex:e},h))}}]),l}(),We=(de(qe,"defaultProps",{triggerOptions:{},options:[],closeOnSelect:!0,staticLimit:50,searchDebounceDuration:300}),["size","appearance","iconAlign","tabIndex","largeIcon","type","children","icon","expanded","selected","loading","disabled","className","tooltip"]),Ve={tiny:12,regular:16,large:20},Ge=pe.forwardRef(function(e,t){var n,r=e.size,r=void 0===r?"regular":r,o=e.appearance,o=void 0===o?"basic":o,i=e.iconAlign,i=void 0===i?"left":i,a=e.tabIndex,a=void 0===a?0:a,s=e.largeIcon,c=e.type,u=e.children,l=e.icon,f=e.expanded,p=e.selected,d=e.loading,h=e.disabled,y=e.className,e=(e.tooltip,W(e,We)),f=me((de(n={},"Button",!0),de(n,"Button--expanded",f),de(n,"Button--".concat(r),r),de(n,"Button--".concat(r,"Square"),!u),de(n,"Button--".concat(o),o),de(n,"Button--selected",p&&("basic"===o||"transparent"===o)),de(n,"Button--iconAlign-".concat(i),u&&i),de(n,"".concat(y),y),n)),y=me((de(p={},"Button-icon",!0),de(p,"Button-icon--".concat(i),u&&i),p));return pe.createElement("button",he({"data-test":"DesignSystem-Button",ref:t,type:c,className:f,disabled:h||d,tabIndex:a},e),d?pe.createElement(pe.Fragment,null,pe.createElement(xn,{size:"small",appearance:"basic"===o||"transparent"===o?"secondary":"white","data-test":"DesignSystem-Button--Spinner",className:"Button-spinner"}),pe.createElement(ve,{className:"Button-text Button-text--hidden"},u||"")):pe.createElement(pe.Fragment,null,l&&pe.createElement("div",{className:y},pe.createElement(N,{"data-test":"DesignSystem-Button--Icon",name:l,size:s&&!u?Ve[r]+4:Ve[r]})),u&&pe.createElement("span",{className:"Button-text"},u)))}),be=pe.forwardRef(function(e,t){var n=e.icon,r=e.tooltip,o=e.children;return n&&r&&!o?pe.createElement(ma,{tooltip:r},pe.createElement(Ge,he({},e,{ref:t}))):pe.createElement(Ge,he({},e,{ref:t}))});be.displayName="Button";function Ye(e){return["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].indexOf(e)}function $e(e,t){return new Date(e,t+1,0).getDate()}function Ze(e,t,n){if(e){var r=$(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 Y(e,t,n,r,o){if(e){var e=$(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 O(e,t){var r,o,i,a,s;return e&&t?(t=$(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 Je(e,t){var n,r,o,i,a;if(J(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]}}),y({year:r,month:o,date:i})}function Xe(e){var n=e.onClick,r=e.onKeyDown,o=void 0===(t=e.role)?"button":t,t=W(e,Pt);return q({},n?{onClick:n,role:o,tabIndex:0,"aria-label":t["aria-label"],onKeyDown:function(e){var t;r?r(e):(t=e.key,Rt(o,t)&&n&&(e.preventDefault(),n(e)))}}:{role:o,"aria-label":t["aria-label"]})}function Qe(e){function t(e){var t;return me((de(t={},"Chip-icon",!0),de(t,"Chip-icon--".concat(e),e),de(t,"Chip-icon-disabled--right","right"===e&&a),de(t,"cursor-pointer","right"===e&&!a),de(t,"Chip-icon--selected","right"===e&&c),t))}function n(e){var t;return me((de(t={},"disabled",a&&!c),de(t,"primary_dark",!a&&c),de(t,"primary_lighter",a&&c),de(t,"subtle",!a&&!c&&"right"===e),de(t,"inverse",!a&&!c&&"left"===e),t))}var 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=me((de(f={},"primary-lighter",a&&c),de(f,"inverse-lightest",a&&!c),de(f,"primary-dark",c),de(f,"inverse",!a&&!c),f));return pe.createElement("div",he({tabIndex:0,"data-test":"DesignSystem-GenericChip--GenericChipWrapper"},e,{className:"Chip-wrapper ".concat(s),onClick:function(){l&&l()}}),o&&pe.createElement(N,{"data-test":"DesignSystem-GenericChip--Icon",name:o,appearance:n("left"),className:t("left")}),"string"==typeof r?pe.createElement(ve,{"data-test":"DesignSystem-GenericChip--Text",color:f,className:"Chip-text"},r):r,i&&pe.createElement(N,{"data-test":"DesignSystem-GenericChip--clearButton",name:"clear",appearance:n("right"),className:t("right"),onClick:function(e){e.stopPropagation(),u&&u()}}))}function et(e){var o=e.inputFormat,i=e.inputOptions,a=e.validators,t=e.state,s=e.setState,e=t.init,n=t.date,t=t.error,c=void 0===(r=i.placeholderChar)?"_":r,r=i.error||i.required&&t&&e,t=void 0===i.caption?"Invalid value":i.caption,u=X[o];return pe.createElement(ln,he({icon:"events",placeholder:o},i,{error:r,mask:u,value:n?O(o,n):e?ln.utils.getDefaultValue(u,c):"",onChange:function(e,t){var n=i.onChange;s({open:!0}),t&&!t.includes(c)&&(t=Je(o,t,a),s({date:t})),n&&n(e)},onPaste:function(e,t){var n,r=i.onPaste;s({open:!0}),t&&!t.includes(c)&&(n=Je(o,t,a),s({date:n})),r&&r(e,t)},onBlur:function(e,t){var n=i.onBlur,r=(s({init:!0}),/\d/);t&&r.test(t)&&t.includes(c)?s({error:!0}):(!t||r.test(t))&&t||s({error:!1}),n&&n(e,t||"")},onClear:function(e){var t=i.onClear;s({init:!0,date:void 0}),t&&t(e)},caption:r?t:"",validators:[function(e){return J(a,e,o)}],clearOnEmptyBlur:!0,id:"parent-DatePicker"}))}function tt(e){var t=new Date;return t.setHours(e.substring(0,2)),t.setMinutes(e.substring(3,5)),t}function nt(e){return"12-Hour"===e}function rt(e){var e=e.split(":"),t=12<=(n=parseInt(e[0],10))?"PM":"AM",n=(n%12||12).toString(),n=Ht(n),e=e[1];return"".concat(n.toString(),":").concat(e," ").concat(t)}function ot(e,t,n){for(var r=[],o=tt(e),i=tt(t);o<=i;)r.push(o.toTimeString().substring(0,5)),o.setMinutes(o.getMinutes()+n);return r}function it(e,t){return e=new Date("07/07/2022 "+e),t=new Date("07/07/2022 "+t).getTime()-e.getTime(),{hour:(e=new Date(t)).getUTCHours(),minute:e.getUTCMinutes()}}function at(e){var t=parseInt(e,10);return t<10?e:((60<t?t%60:t).toString()+"0").slice(0,2)}function st(e){return(parseInt(e,10)%24).toString()}function ct(e){return/^[0-9]+$/.test(e)}function ut(e){return/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]*$/.test(e)}function lt(e){var e=e.split($t),t=st(e[0]);return{hour:Ht(t),min:((""!==e[1]?at(e[1]):"00")+"0").slice(0,2)}}function ft(e,t){var n=e.length,r=parseInt(e,10),o=e.slice(0,2),i="00",a="00";switch(n){case 1:i="0"+e;break;case 2:r<=24||t&&r<=12?i=Ht(e):(i="0"+e[0],a=at(e[1]+"0"));break;case 3:i="0"+e[0],a=at(e.slice(1));break;case 4:i=t?(parseInt(o,10)%12).toString():st(o),a=at(e.slice(2));break;default:a=i="-1"}return{hour:i,min:a}}function pt(e,t){var n,r={hour:"00",min:"00"};return ct(t)?(n=ft(t),r=parseInt(n.hour)<=12&&0<parseInt(n.hour)?ht(e,n):n):/^[0-9]+[ AaMmPp]+$/.test(t)?(r=function(e){e=e.split(/[\saAmMpP]/),e=ft(e[0],!0);return{hour:e.hour,min:e.min}}(t)).hour=dt(r.hour,t):ut(t)?(n=lt(t),r=parseInt(n.hour)<=12?ht(e,n):n):/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]+[ AaMmPp]+$/.test(t)&&(e=t.replace(/[\saApPmM]/g,""),ct(e)?r=ft(e,!0):ut(e)&&(r=lt(e)),r.hour=dt(r.hour,t)),r}function dt(e,t){return"12"===e&&Bt(t)?e="00":Kt(t)&&"12"!==e&&(e=(parseInt(e,10)+12).toString()),e}function ht(e,t){var n="".concat(t.hour,":").concat(t.min),r=Yt(),o=qt(r,n),r=Zt(e,r),e=Zt(e,n);return o&&e<r&&(n=parseInt(t.hour,10)+12,t.hour=n.toString()),t}function yt(e){var t,n,r,o,i,a,s=e.open,c=e.endTime,u=e.interval,l=e.onChange,f=e.startTime,p=e.timeFormat,d=e.showDuration,h=e.noResultMessage,y=e.disabledSlotList,m=e.fetchTimeOptions,g=ye(pe.useState(0),2),v=g[0],b=g[1],w=(g=ye(pe.useState(!1),2))[0],S=g[1],_=(g=ye(pe.useState(-1),2))[0],E=g[1],C=(g=ye(pe.useState(0),2))[0],O=g[1],x=(t=(g=e).startTime,n=e.endTime,r=e.interval,o=e.timeFormat,i=e.showDuration,a=e.disabledSlotList,g=e.id,e=t?Ut(t):"00:00",n=n?Ut(n):Gt(t),e=Wt(e,n,r),Vt(e,o,g,i,t,a));return pe.useEffect(function(){void 0!==s&&S(s)},[s]),pe.useEffect(function(){var e;return w&&-1!=_&&(b(_),e=setTimeout(function(){Ce(_,x)},100)),function(){clearTimeout(e)}},[w]),pe.useEffect(function(){O(C+1)},[f,c,u,d,y]),pe.createElement(qe,{key:C,maxHeight:160,loadersCount:0,withSearch:!0,open:w,tabIndex:v,searchPlaceholder:"Search",onChange:function(t){var e=t,n=(nt(p)&&(e=rt(t)),x.findIndex(function(e){return e.value===t}));E(n),l&&l(e)},fetchOptions:m||function(e){n=e,t=Jt(t=x);var t,n,r=""===n?(r=Yt(),Zt(t,r)):Xt(t,n);return b(t=""===e&&-1!=_?_:r),Promise.resolve({options:-1===r?[]:x,count:x.length,scrollToIndex:0===t?t+1:t,searchTerm:e})},noResultMessage:h,staticLimit:x.length,onPopperToggle:function(){S(!w)}})}function mt(e){var t=e.validators,s=e.inputOptions,c=e.inputFormat,u=e.outputFormat,l=e.onTimeChange,n=e.time,f=(e=ye(pe.useState(n),2))[0],r=e[1],o=(e=ye(pe.useState(!1),2))[0],p=e[1],d=void 0===(e=s.placeholderChar)?"_":e,e=(pe.useEffect(function(){var e=T(c,f),e=void 0===n&&e.includes(d)?f:n;r(e)},[n]),ee[c]);return pe.createElement(ln,he({placeholder:L[c],placeholderChar:d},s,{mask:e,value:f?T(c,f):o?ln.utils.getDefaultValue(e,d):"",validators:function(e){return J(t,e,c)},onChange:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",n=null==t?void 0:t.toUpperCase();r(n),s.onChange&&s.onChange(e,t)},onClear:function(e){p(!0),l&&l(""),s.onClear&&s.onClear(e)},onBlur:function(e){var t,n,r,o,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",a=T(c,f);p(!0),l&&(r=!a||(r=d,(o=a)&&o.includes(r))?void 0:(o=a,(r=c)===(a=u)?o:(o=(r=H(r,o)).hours,t=r.minutes,r=r.am_pm,n=z(a)?F(o).AMPM:"",o=z(a)?F(o).hrs:B(o,r),U(a,{minutes:t,hours:o,am_pm:n}))),l(r)),s.onBlur&&s.onBlur(e,i)},id:"parent-TimePicker"}))}function gt(e,t){for(var n="",r=0;r<e.length;r++)n+="object"===Z(e[r])?t:e[r];return n}function vt(e){var t=e.required,n=e.optional,r=e.withInput,o=e.disabled,i=e.children,a=e.className,s=e.info,c=W(e,fn),e=ge(e),r=me((de(u={Label:!0},"Label--withInput",r),de(u,"Label--optional",n),u),a),u=me({"Label-text":!0,"Label--disabled":o});return pe.createElement("div",he({"data-test":"DesignSystem-Label"},e,{className:r}),pe.createElement(Oe,he({"data-test":"DesignSystem-Label--Text",className:u,componentType:"label"},c),i),function(){return 0<arguments.length&&void 0!==arguments[0]&&arguments[0]?pe.createElement("span",{className:"Label-requiredIndicator","data-test":"DesignSystem-Label--RequiredIndicator"}):(1<arguments.length?arguments[1]:void 0)?pe.createElement(ve,{"data-test":"DesignSystem-Label--OptionalText",appearance:"subtle",className:"Label-optionalText"},"(optional)"):null}(t,n),s&&pe.createElement(ma,{tooltip:s},pe.createElement(N,{"data-test":"DesignSystem-Label--Info",name:"info",size:12,appearance:"subtle",className:"ml-3 cursor-pointer d-flex align-items-center"})))}function bt(e){var t=e.label,n=e.icon,r=e.iconAppearance,o=e.labelAppearance,e=e.size;return pe.createElement("span",{"data-test":"DesignSystem-MetaList--Meta",className:"Meta"},n&&pe.createElement(N,{"data-test":"DesignSystem-MetaList--MetaIcon",name:n,appearance:r,className:"Meta-icon",size:"regular"===e?16:12}),pe.createElement(ve,{size:e,"data-test":"DesignSystem-MetaList--MetaLabel",appearance:o},t))}function wt(e){return"".concat((100*e).toFixed(2),"%")}function St(e,t,n){return null==e?e:Math.min(Math.max(e,t),n)}var _t=12,Et=3,Ct=12,Ot=3,xt=7,kt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Dt={small:["Su","Mo","Tu","We","Th","Fr","Sa"],large:["Su","Mo","Tu","We","Th","Fr","Sa"]},jt=_t,Tt=function(e){return e-e%jt},$=function(e){var t,n,r;return(e=e&&y(e))?(t=e.getFullYear(),n=e.getMonth(),r=e.getDay(),e=e.getDate(),{decadeYear:Tt(t),year:t,month:n,day:r,date:e}):{}},y=function(e,t,n){var r;if(e)if("number"==typeof e)r=new Date(e);else{if("string"==typeof e)return t?Je(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},It=function(){e(p,pe["Component"]);var f=h(p);function p(e){d(this,p),de(V(W=f.call(this,e)),"updateState",function(e,t,n){W.setState({year:e,month:t,date:n})}),de(V(W),"getDateValue",function(e,t,n){return new Date(e,t,n)}),de(V(W),"getNavDateInfo",function(e){var t=W.state,n=t.yearBlockNav,r=t.yearNav,t=t.monthNav,o=(t+e)%Ct==-1?11:(t+e)%Ct,r=0<=e?r+(0!==e&&o<t?1:0):r-(0!==e&&t<o?1:0);return{yearBlock:n,year:r,month:o}}),de(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=$(r),a=t.year,s=t.month,t=t.date,c=$(o),u=c.year,l=c.month,c=c.date,n=$(n),f=n.year,p=n.month,n=n.date;if(r)return(i=new Date(r)).setDate(t+e),Y(i,"less",f,p,n+1)||Y(i,"less",u,l,c+1);if(o)return(i=new Date(o)).setDate(c-e),Y(i,"more",f,p,n-1)||Y(i,"more",a,s,t-1)}return!1}),de(V(W),"selectYear",function(e){return function(){W.updateState(e),W.setState({view:"month"})}}),de(V(W),"yearMouseOverHandler",function(e,t,n,r){var o=W.props.onYearHover;o&&o({value:e,year:e,isCurrentYear:t,isDisabled:n},r)}),de(V(W),"selectMonth",function(e){return function(){W.updateState(W.state.yearNav,e),W.setState({view:"date"})}}),de(V(W),"monthMouseOverHandler",function(e,t,n,r){var o=kt,i=W.props.onMonthHover,o={value:o[e],month:o[e],year:W.state.year,isCurrentMonth:t,isDisabled:n};i&&i(o,r)}),de(V(W),"selectDate",function(e,t,n,r){e=W.calculateDate(e,t,n,r,!1);W.setState({currDate:e})}),de(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)}),de(V(W),"onNavIconClickHandler",function(s){return function(){var e=W.state,t=e.view,n=e.yearBlockNav,r=e.yearNav,o=e.monthNav,i=_t,a=Ct;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}))}}}),de(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=Y(n,"more",s-1)),"next"===e&&(u=Y(r,"less",s+1));break;case"date":"prev"===e&&(u=Y(n,"more",s,c-1)),"next"===e&&(u=Y(r,"less",s,c+1))}o=me(de({"Calendar-headerIcon":!0},"Calendar-headerIcon--".concat(e),e));return pe.createElement(be,{type:"button",className:o,appearance:"basic",icon:"arrow_".concat("next"===e?"forward":"back"),disabled:u,size:"small"===t?"tiny":"regular",onClick:W.onNavIconClickHandler(e)})}),de(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"})}}),de(V(W),"renderHeaderContent",function(e){function t(e){return"small"===r?pe.createElement(pe.Fragment,null,pe.createElement(ve,{weight:"strong"},e),"year"!==a&&!i&&pe.createElement(N,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"})):pe.createElement(pe.Fragment,null,pe.createElement(tn,{size:"s"},e),"year"!==a&&!i&&pe.createElement(N,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"}))}var n=W.props,r=n.size,o=n.monthsInView,i=n.rangePicker,n=W.state,a=n.view,n=n.yearBlockNav,s=_t,c=kt,u=W.getNavDateInfo(e),l=u.year,u=u.month,o=me({"Calendar-headerContent":!0,"Calendar-headerContent--noIcon-left":e===o-1,"Calendar-headerContent--noIcon-right":0===e}),e="";"year"===a&&(e="".concat(n," - ").concat(n+(s-1))),"month"===a&&(e="".concat(l));return pe.createElement("div",{className:o},"date"!==a&&pe.createElement("div",{className:"d-flex justify-content-center align-items-center",onClick:W.onNavHeadingClickHandler(a)},t(e)),"date"===a&&pe.createElement(pe.Fragment,null,pe.createElement("div",{onClick:W.onNavHeadingClickHandler(a),className:"d-flex justify-content-center align-items-center"},t(c[u])),pe.createElement("div",{className:"ml-4 d-flex justify-content-center align-items-center",onClick:W.onNavHeadingClickHandler("month")},t(l))))}),de(V(W),"renderBodyYear",function(){var e=_t,c=Et,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 pe.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 i=!(a=Y(f,"more",n=d+a)||Y(p,"less",n))&&!l&&n===W.state.year,r=function(){return n===h},o=me((de(o={"Calendar-value":!0,"Calendar-value--active":i,"Calendar-value--disabled":a,"Calendar-yearValue":!0},"Calendar-yearValue--".concat(u),u),de(o,"Calendar-value--currDateMonthYear",r()),o)),i=me({inverse:!i&&!r()&&!a,white:i,"primary-lighter":r()&&a,primary:r(),"inverse-lightest":a}),pe.createElement("div",{key:"".concat(s,"-").concat(t),"data-test":"DesignSystem-Calendar--yearValue",className:o,onClick:W.selectYear(n),onMouseOver:W.yearMouseOverHandler.bind(V(W),n,r(),a)},pe.createElement(ve,{size:"small"===u?"small":"regular",color:i,className:"Calendar-text"},n))}))})}),de(V(W),"renderBodyMonth",function(){var e=Ct,c=Ot,u=kt,t=W.props,l=t.size,f=t.disabledBefore,p=t.disabledAfter,t=W.state,d=t.yearNav,h=t.year,y=t.currYear,m=t.currMonth,t=Math.ceil(e/c);return Array.from({length:t},function(e,s){return pe.createElement("div",{key:s,className:"Calendar-valueRow"},Array.from({length:c},function(e,t){function n(){return y===d&&m===r}var r=c*s+t,o=Y(f,"more",d,r)||Y(p,"less",d,r),i=!o&&h===d&&r===W.state.month,a=me((de(a={"Calendar-value":!0,"Calendar-value--active":i,"Calendar-value--disabled":o,"Calendar-monthValue":!0},"Calendar-monthValue--".concat(l),l),de(a,"Calendar-value--currDateMonthYear",n()),a)),i=me({inverse:!i&&!n()&&!o,white:i,"primary-lighter":n()&&o,primary:n(),"inverse-lightest":o});return pe.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)},pe.createElement(ve,{size:"small"===l?"small":"regular",color:i,className:"Calendar-text"},u[r]))}))})}),de(V(W),"onDateRowMouseLeaveHandler",function(){W.props.rangePicker&&W.setState({hoverDate:void 0})}),de(V(W),"renderBodyDate",function(e){var o=xt,i=Dt,t=W.props,a=t.size,s=t.firstDayOfWeek,c="large"===a?"regular":"small";return pe.createElement(pe.Fragment,null,pe.createElement("div",{className:"Calendar-dayValues"},Array.from({length:7},function(e,t){var n=me({"Calendar-valueWrapper":!0}),r=(t+o+Ye(s))%o;return pe.createElement(ve,{key:t,className:n,appearance:"default",weight:"strong",size:c},i[a][r])})),pe.createElement("div",{className:"Calendar-dateValues",onMouseLeave:W.onDateRowMouseLeaveHandler},W.renderDateValues(e)))}),de(V(W),"renderDateValues",function(v){function b(e){return function(){(!O||j&&T||!U)&&W.selectDate(v,e,B,K)}}function w(t){return function(){var e;O&&(e=W.getDateValue(z,F,t),j&&T||W.setState({hoverDate:e}))}}function S(e,t,n,r){var e=W.calculateDate(v,e,B,K,!0)||new Date,o=kt,i=Dt.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 _=xt,E=Ct,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,j=e.startDate,T=e.endDate,I=e.hoverDate,M=e.year,N=e.month,P=e.date,A=e.currMonth,R=e.currYear,L=e.todayDate,e=W.getNavDateInfo(v),z=e.year,F=e.month,B=$e(z,F-1),K=$e(z,F),e=new Date(z,F).getDay()-Ye(t),H=Math.abs(e),t=Math.ceil((K+H)/_),U=(6===t||1<D||(t+=1),W.getInRangeError()),q=W.props.events;return Array.from({length:t},function(e,g){return pe.createElement("div",{key:g,className:"Calendar-valueRow"},Array.from({length:_},function(e,t){function n(){var e=r<=0?R===z&&A===F-1&&L===B+r:K<r?R===z&&A===F+1&&L===r-K:R===z&&A===F&&L===r;return e}var r=_*g+t-H+1,o=r<=0||K<r,i=Y(x,"more",z,F,r)||Y(k,"less",z,F,r),a=!i&&M===z&&N===F&&P===r,s=!1,c=!1,u=!1,l=!1,f=(O&&(s=Y(j,"equal",z,F,r),c=Y(T,"equal",z,F,r),l=Y(I,"equal",z,F,r),a=!i&&(s||c),j&&T?u=!i&&(Y(j,"less",z,F,r)||s)&&(Y(T,"more",z,F,r)||c):j?u=!i&&(Y(I,"more",z,F,r)||l)&&Y(j,"less",z,F,r):T&&(u=!i&&(Y(I,"less",z,F,r)||l)&&Y(T,"more",z,F,r))),$(j)),p=f.year,d=f.month,f=f.date,h=$(T),y=h.year,m=h.month,h=h.date,s=s||T&&l&&Y(I,"less",y,m,h),y=c||j&&l&&Y(I,"more",p,d,f),m=u&&U,h="".concat(r<=0?B+r:K<r?r-K:r),c="".concat(r<=0?0===F?F+E:(F-1)%E+1:K<r?(F+1)%E+1:F+1),l="".concat(r<=0&&F+1===1?z-1:K<r&&F+1===12?z+1:z),p="".concat(2===c.length?c:"0".concat(c),"/").concat(2===h.length?h:"0".concat(h),"/").concat(l),d=q&&"object"===Z(q)&&q.hasOwnProperty(p),f=me({"Calendar-valueWrapper":!0,"Calendar-valueWrapper--inRange":u||O&&a,"Calendar-valueWrapper--inRangeError":m,"Calendar-valueWrapper--start":s&&!y,"Calendar-valueWrapper--end":y&&!s,"Calendar-valueWrapper--startEnd":s&&y,"Calendar-valueWrapper--startError":s&&m,"Calendar-valueWrapper--endError":y&&m,"Calendar-valueWrapper--dummy":o}),h=me((de(c={"Calendar-value":!0,"Calendar-inRangeValue":!s&&!y,"Calendar-value--start":s&&!y,"Calendar-value--end":y&&!s,"Calendar-value--startError":s&&m,"Calendar-value--endError":y&&m,"Calendar-value--active":a,"Calendar-value--disabled":i,"Calendar-dateValue":!0},"Calendar-dateValue--".concat(C),C),de(c,"Calendar-value--currDateMonthYear",n()),c)),l=me({inverse:!a&&!n()&&!i,white:a,"primary-lighter":n()&&i,primary:n(),"inverse-lightest":i});return pe.createElement("div",{key:"".concat(g,"-").concat(t),className:f,"data-test":"designSystem-Calendar-WrapperClass"},!o&&pe.createElement(pe.Fragment,null,pe.createElement(ve,{color:l,size:"small"===C?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:h,onClick:b(r),onMouseOver:w(r),onMouseEnter:S.bind(V(W),r,n(),i)},r),d&&W.renderEventsIndicator(C,a)),(o&&0<r&&v===D-1||o&&r<=0&&0===v)&&pe.createElement(pe.Fragment,null,pe.createElement(ve,{appearance:a?"white":i?"disabled":n()?"link":"default",size:"small"===C?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:h,onClick:b(r),onMouseOver:w(r),onMouseEnter:S.bind(V(W),r,n(),i)},r<=0?B+r:r-K),d&&W.renderEventsIndicator(C,a)))}))})}),de(V(W),"renderCalendar",function(e){var t=W.props,n=t.size,t=t.monthsInView,r=W.state.view,o=me((de(o={},"Calendar",!0),de(o,"Calendar-".concat(r,"--").concat(n),r),de(o,"Calendar--".concat(n),n),o)),n=me(de({},"Calendar-header--".concat(n),n)),i=me({"Calendar-body":!0});return pe.createElement("div",{key:e,"data-test":"DesignSystem-Calendar",className:o},pe.createElement("div",{className:n},0===e&&W.renderJumpButton("prev"),W.renderHeaderContent(e),e===t-1&&W.renderJumpButton("next")),pe.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:$(n||Date.now()).year,e=void 0!==e.monthNav?e.monthNav:$(n||Date.now()).month,s=$(n),c=s.year,u=s.month,s=s.date,l=$(new Date(Date.now()));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:Tt(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&&(i=(n=$(this.props.date)).year,o=n.month,n=n.date,this.updateState(i,o,n),i=y(this.props.date),this.setState({currDate:i})),e.startDate!==this.props.startDate&&(o=y(this.props.startDate),this.setState({startDate:o})),e.endDate!==this.props.endDate&&(n=y(this.props.endDate),this.setState({endDate:n})),e.view!==this.props.view&&1===this.props.monthsInView&&this.setState({view:this.props.view}),e.yearNav!==this.props.yearNav&&(i=this.props.yearNav)&&this.setState({yearNav:i,yearBlockNav:Tt(i)}),e.monthNav!==this.props.monthNav&&(o=this.props.monthNav)&&this.setState({monthNav:o}),t.currDate!==this.state.currDate&&(i=(n=this.props).rangePicker,e=n.onDateChange,n=(o=this.state).currDate,r=o.startDate,o=o.endDate,n)&&(e&&e(n),i?(this.setState({hoverDate:void 0}),r&&o?this.setState({startDate:n,endDate:void 0}):(i=(e=$(n)).year,a=e.month,e=e.date,r?Y(r,"more",i,a,e)?this.setState({startDate:n}):this.setState({endDate:n}):o&&Y(o,"less",i,a,e)?this.setState({endDate:n}):this.setState({startDate:n}))):this.setState({startDate:n})),(null==(r=t.startDate)?void 0:r.getTime())===(null==(o=this.state.startDate)?void 0:o.getTime())&&(null==(i=t.endDate)?void 0:i.getTime())===(null==(a=this.state.endDate)?void 0:a.getTime())||(e=this.props.onRangeChange,r=(n=this.state).startDate,o=n.endDate,e&&e(r,o)),t.year!==this.state.year&&void 0!==(i=this.state.year)&&1===s&&this.setState({year:i,yearBlockNav:Tt(i),yearNav:i}),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=me((de(n={"Calendar-eventsIndicator":!0},"Calendar-eventsIndicator--".concat(e),!0),de(n,"Calendar-eventsIndicator--active",t),n));return pe.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=me({"Calendar-wrapper":!0},e);return pe.createElement("div",he({},r,{className:e,"data-test":"DesignSystem-Calendar-Wrapper"}),Array.from({length:t},function(e,t){return n.renderCalendar(t)}))}}]),p}(),Mt=(de(It,"defaultProps",{size:"large",monthsInView:1,view:"date",firstDayOfWeek:"sunday",jumpView:!0}),["shadow","children","className"]),n=pe.forwardRef(function(e,t){var n,r=e.shadow,r=void 0===r?"shadow10":r,o=e.children,i=e.className,e=W(e,Mt),r=me((de(n={Card:!0},"Card--".concat(r),r),de(n,"".concat(i),i),n));return pe.createElement("div",he({"data-test":"DesignSystem-Card",ref:t},e,{className:r}),o)}),Nt=(n.displayName="Card",n.defaultProps={shadow:"shadow10"},["border","children","className"]),Pt=(pe.forwardRef(function(e,t){var n=e.border,r=e.children,o=e.className,e=W(e,Nt),n=me(de({CardSubdued:!0},"CardSubdued--".concat(n),n),o);return pe.createElement("div",he({"data-test":"DesignSystem-CardSubdued",ref:t},e,{className:n}),r)}).displayName="CardSubdued",["onClick","onKeyDown","role"]),At={button:new Set(["Enter","Space","Spacebar"," "]),link:new Set(["Enter"]),checkbox:new Set([]),radio:new Set([])},Rt=function(e,t){return!!At[e]&&At[e].has(t)},N=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=Xe(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=me((de(n={},"material-icons",!0),de(n,"material-icons-".concat(t(e)),e&&"filled"!==e),de(n,"Icon",!0),de(n,"Icon--".concat(l),r),de(n,"".concat(o),o),n)),a={fontSize:"".concat(a,"px"),width:"".concat(a,"px")};return s&&pe.isValidElement(s)?pe.createElement("span",he({},u,{className:o}),s):pe.createElement("i",he({},u,{className:r,style:a},c),e?"".concat(i,"_").concat(e):i)},Lt=(N.displayName="Icon",N.defaultProps={size:16,type:"round"},Qe.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=me((de(f={Chip:!0},"Chip-".concat(o,"--disabled"),i),de(f,"Chip--".concat(o),o&&!i),de(f,"Chip-".concat(o,"--selected"),a&&!i),de(f,"Chip-selection--selectedDisabled","selection"===o&&a&&i),f),l);return pe.createElement(Qe,he({"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}))}),zt=(Lt.displayName="Chip",Lt.defaultProps={type:"input"},["size","sizeXS","sizeS","sizeM","sizeL","sizeXL","className","children"]),x=pe.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=W(e,zt),r=me((de(n={},"Col",!0),de(n,"Col--".concat(r),r),de(n,"Col--xs-".concat(o),o),de(n,"Col--s-".concat(i),i),de(n,"Col--m-".concat(a),a),de(n,"Col--l-".concat(s),s),de(n,"Col--xl-".concat(c),c),de(n,"".concat(u),u),n));return pe.createElement("div",he({ref:t,"data-test":"DesignSystem-Column"},e,{className:r}),l)}),Ft=(x.displayName="Column",["date","open","position","inputFormat","outputFormat","inputOptions","validators","withInput","disabledBefore","disabledAfter","onDateChange","closeOnSelect","size","showTodayDate","children"]),n=function(){e(o,pe["Component"]);var r=h(o);function o(e){d(this,o),de(V(s=r.call(this,e)),"getError",function(e){var t=s.props,n=t.disabledBefore,t=t.disabledAfter,n=$(n),r=n.year,o=n.month,n=n.date,t=$(t),i=t.year,a=t.month,t=t.date;return!!e&&(Y(e,"less",r,o,n)||Y(e,"more",i,a,t))}),de(V(s),"onDateChangeHandler",function(e){s.setState({init:!0,date:e}),s.props.closeOnSelect&&s.setState({open:!1})}),de(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=y(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=y(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,O(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?pe.createElement(pe.Fragment,null):c,t=W(t,Ft),u=this.state.date,l=kt,f=new Date(Date.now()),l="".concat(l[f.getMonth()]," ").concat(f.getDate()),f=y(u,n,r),u=y(o,n,r),o=y(i,n,r);return pe.createElement("div",null,pe.createElement("div",{className:"d-flex"},c,pe.createElement(It,he({},t,{size:a,date:f,disabledBefore:u,disabledAfter:o,onDateChange:this.onDateChangeHandler}))),s&&pe.createElement("div",{className:"d-flex justify-content-center pb-6","data-test":"DesignSystem-Select--TodaysDate-wrapper"},pe.createElement(Lt,{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?pe.createElement(da,{trigger:pe.createElement(et,{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}(),Bt=(de(n,"defaultProps",q(q({},It.defaultProps),{},{position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[P],inputOptions:{},closeOnSelect:!0})),function(e){return e.includes("a")||e.includes("A")}),Kt=function(e){return e.includes("p")||e.includes("P")},Ht=function(e){return("0"+e).slice(-2)},Ut=function(e){var t,n,r;return Bt(r=e)||Kt(r)?(r=ye((r=e).split(" "),2),t=r[0],r=r[1],t=t.split(":"),n=t[0],t=t[1],"12"===n&&Bt(r)&&(n="00"),Kt(r)&&"12"!==n&&(n=(parseInt(n,10)+12).toString()),"".concat(n,":").concat(t)):e},qt=function(e,t){e=tt(e);return tt(t)<e},Wt=function(e,t,n){var r,o,i,a;return""===t||qt(e,t)?(r=e,o=t,i=ot("00:00","23:59",i=n),r=i.indexOf(r),a=i.indexOf(o),o=""===o?r:a+1,a=i.slice(r),r=i.slice(0,o),a.concat(r)):ot(e,t,n)},Vt=function(e,s){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"TimePicker-Option-key",u=3<arguments.length?arguments[3]:void 0,l=4<arguments.length?arguments[4]:void 0,f=5<arguments.length?arguments[5]:void 0;return e.map(function(e,t){return{label:(o=u,i=l,a=n=e,nt(r=s)&&(a=rt(n)),o&&i&&(o=(r=it(i,n)).hour,i=r.minute,a+=" (".concat(o," hr ").concat(i," min)")),a),value:e,disabled:f&&(n=f,o=r=e,nt(s)&&(o=rt(r)),!!n.includes(o)),selected:!1,optionID:c+t};var n,r,o,i,a})},Gt=function(e){return e?"":"23:59"},Yt=function(){var e=new Date;return Ht(e.getHours())+":"+Ht(e.getMinutes())},$t=/[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~]/,Zt=function(e,t){for(var n=0,r={hour:100,mins:100},o=0;o<e.length;o++){var i=it(t,e[o]),a=i.hour,i=i.minute;(a<r.hour||a===r.hour&&i<r.mins)&&(r.hour=a,r.mins=i,n=o)}return n},Jt=function(e){return e.map(function(e){return e.value})},Xt=function(e,t){var n;return function(e){e=(null==(e=(e=e).match(/\d/g))?void 0:e.length)||0;return 0<e&&e<5}(t)?(t=pt(e=e,t=t),n=t.hour,"60"===(t=t.min)&&(t="00",n=(parseInt(n,10)+1).toString()),n="".concat(n,":").concat(t),Zt(e,n)):-1},Qt=(yt.defaultProps={timeFormat:"12-Hour",interval:15},yt.displayName="TimePickerWithSearch",mt.defaultProps={inputFormat:"hh:mm AM",outputFormat:"hh:mm AM",inputOptions:{},validators:[A]},mt.displayName="TimePickerWithInput",q(q({},mt.defaultProps),yt.defaultProps),["appearance","size","children","className"]),en={s:"h5",m:"h4",l:"h3",xl:"h2",xxl:"h1"},tn=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.className,e=W(e,Qt),n=me((de(t={Heading:!0},"Heading--".concat(r),r),de(t,"Heading--".concat(n),n),t),i);return pe.createElement(Oe,he({"data-test":"DesignSystem-Heading"},e,{className:n,componentType:en[r]}),o)},nn=(tn.displayName="Heading",tn.defaultProps={appearance:"default",size:"m"},["size","type","minWidth","defaultValue","name","placeholder","value","icon","inlineLabel","required","error","info","onChange","onClick","onClear","onBlur","onFocus","onPaste","actionIcon","className","autoFocus","disabled","readOnly"]),rn={tiny:12,regular:16,large:20},on=pe.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,m=e.onClear,g=e.onBlur,v=e.onFocus,b=e.onPaste,w=e.actionIcon,S=e.className,_=e.autoFocus,E=e.disabled,C=e.readOnly,O=W(e,nn),x=pe.useRef(null),t=(pe.useImperativeHandle(t,function(){return x.current}),pe.useEffect(function(){var e;_&&null!=(e=x.current)&&e.focus({preventScroll:!0})},[]),ge(e)),p=me((de(e={},"Input",!0),de(e,"Input--".concat(n),n),de(e,"Input--disabled",E||C),de(e,"Input--error",p),e),S),S=me((de(e={},"Input-input",!0),de(e,"Input-input--".concat(n),n),e)),e=me((de(e={},"Input-icon",!0),de(e,"Input-icon--left",!0),de(e,"Input-icon--disabled",!c),e)),k=me((de(k={},"Input-icon",!0),de(k,"Input-iconWrapper--right",!0),k)),D=pe.createElement("div",{className:k,tabIndex:0},pe.createElement(N,{name:"info",size:rn[n],className:"Input-icon--right"}));return pe.createElement("div",{"data-test":"DesignSystem-InputWrapper",className:p,style:{minWidth:o},onClick:function(){var e;return null==(e=x.current)?void 0:e.focus()},role:"presentation"},l&&pe.createElement("div",{className:"Input-inlineLabel"},pe.createElement(ve,{appearance:"subtle"},l)),"tiny"!==n&&u&&pe.createElement("div",{className:e},pe.createElement(N,{name:u,size:rn[n]})),pe.createElement("input",he({"data-test":"DesignSystem-Input"},t,O,{ref:x,name:a,type:r,defaultValue:i,placeholder:s,className:S,value:c,required:f,disabled:E,readOnly:C,onChange:h,onBlur:g,onClick:y,onFocus:v,onPaste:b})),E?"":d?pe.createElement(ma,{position:"top",tooltip:d},D):w&&(c||i)?w:m&&(c||i)&&pe.createElement("div",{className:k},pe.createElement(N,{"data-test":"DesignSystem-Input--closeIcon",onClick:function(e){var t;null!=(t=x.current)&&t.focus({preventScroll:!0}),m(e)},name:"close",size:rn[n],className:"Input-icon--right"})))}),an=(on.displayName="Input",["size","defaultValue","name","placeholder","icon","prefix","suffix","error","min","max","onChange","onClick","onBlur","onFocus","className","autoFocus","disabled","readOnly","value","showActionButton"]),sn={regular:16,large:20},cn=pe.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.defaultValue,o=e.name,i=e.placeholder,a=e.icon,s=e.prefix,c=e.suffix,u=e.error,l=e.min,f=e.max,p=e.onChange,d=e.onClick,h=e.onBlur,y=e.onFocus,m=e.className,g=e.autoFocus,v=e.disabled,b=e.readOnly,w=e.value,S=e.showActionButton,_=void 0===S||S,S=W(e,an),E=pe.useRef(null),C=void 0===w,O=ye(pe.useState(w||r),2),x=O[0],k=O[1],O=(pe.useImperativeHandle(t,function(){return E.current}),pe.useEffect(function(){var e;g&&null!=(e=E.current)&&e.focus({preventScroll:!0})},[]),pe.useEffect(function(){void 0!==w&&k(w)},[w]),ge(e)),e=me((de(t={},"MetricInput",!0),de(t,"MetricInput--".concat(n),n),de(t,"MetricInput--disabled",v||b),de(t,"MetricInput--error",u),t),m),t=me((de(u={},"MetricInput-input",!0),de(u,"MetricInput-input--".concat(n),n),de(u,"mr-4",!c&&!_&&"regular"===n),de(u,"mr-6",!c&&!_&&"large"===n),u)),u=me((de(m={},"MetricInput-icon",!0),de(m,"MetricInput-icon--".concat(n),n),m)),m=me((de(m={},"mr-4","regular"===n),de(m,"mr-5","regular"!==n),m)),D=me((de(D={},"ml-4 mr-3","regular"===n),de(D,"mx-5","regular"!==n),D)),j=me((de(j={},"p-0",!0),de(j,"MetricInput-arrowIcon--".concat(n),n),de(j,"ml-3",!0),j)),T=function(e,t){var n=Number(x||0);v||b||!("down"===t?void 0!==l&&l<n||void 0===l:void 0!==f&&n<f||void 0===f)||(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)}(f,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)}(l,"down"===t?n-1:n+1)),C&&k(n),p&&(t=Object.create(e,{target:{value:{value:n}}}),p(t)))},I="large"===n?"regular":"tiny";return pe.createElement("div",{"data-test":"DesignSystem-MetricInputWrapper",className:e,onKeyDown:function(){},role:"presentation"},a&&pe.createElement(N,{"data-test":"DesignSystem-MetricInput--icon",name:a,size:sn[n],appearance:x?"subtle":"disabled",className:u}),s&&pe.createElement(ve,{"data-test":"DesignSystem-MetricInput--prefix",className:m,size:n,appearance:"subtle"},s),pe.createElement("input",he({"data-test":"DesignSystem-MetricInput"},O,S,{type:"number",ref:E,name:o,defaultValue:r,placeholder:i,className:t,value:x,disabled:v,readOnly:b,onChange:function(e){C&&k(e.target.value),p&&p(e)},onBlur:h,onClick:d,onFocus:y,onKeyDown:function(e){if(_){var t=e;switch(t.key){case"e":case"E":return void t.preventDefault();case"ArrowDown":return void(t.preventDefault(),T(t,"down"));case"ArrowUp":t.preventDefault(),T(t,"up")}}else e.preventDefault()}})),c&&pe.createElement(ve,{"data-test":"DesignSystem-MetricInput--suffix",className:D,size:n,appearance:"subtle"},c),_&&pe.createElement("div",{className:"MetricInput-arrowIcons"},pe.createElement(be,{icon:"keyboard_arrow_up",size:I,className:"".concat(j," mb-2"),onClick:function(e){return T(e,"up")},"data-test":"DesignSystem-MetricInput--upIcon"}),pe.createElement(be,{icon:"keyboard_arrow_down",size:I,className:j,onClick:function(e){return T(e,"down")},"data-test":"DesignSystem-MetricInput--downIcon"})))}),un=(cn.displayName="MetricInput",["mask","value","placeholderChar","validators","clearOnEmptyBlur","defaultValue","mask","error","caption","required","onChange","onPaste","onBlur","onFocus","onClear","className","id","helpText"]),n=pe.forwardRef(function(n,e){n.mask;var t=n.value,r=n.placeholderChar,d=void 0===r?"_":r,r=n.validators,h=void 0===r?[]:r,r=n.clearOnEmptyBlur,o=void 0===r||r,r=n.defaultValue,y=n.mask,i=n.error,a=n.caption,R=n.required,m=n.onChange,s=n.onPaste,c=n.onBlur,u=n.onFocus,l=n.onClear,f=n.className,g=n.id,L=n.helpText,z=W(n,un),v=pe.useCallback(function(e){return"object"===Z(y[e])},[y]),b=pe.useCallback(function(e,t){if("right"===e){for(var n=t;n<y.length;n++)if(v(n))return n;return y.length}if("left"!==e)return t;for(var r=t;0<=r;r--)if(v(r-1))return r;return 0},[y,v]),p=pe.useCallback(function(){var e=b("right",0);return{start:e,end:e}},[b]),w=pe.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 gt(y,d).slice(e,t+1)},[y,d]),S=pe.useMemo(function(){return w()},[w]),_=pe.useMemo(function(){return p()},[p]),E=pe.useRef(null),C=pe.useRef(),O=pe.useRef(_),x=pe.useRef(0),r=ye(pe.useState(r||t||""),2),k=r[0],D=r[1],j=(pe.useImperativeHandle(e,function(){return E.current}),pe.useEffect(function(){D(t||"")},[t]),pe.useEffect(function(){M(x.current)},[k]),pe.useCallback(function(e){return Math.abs(e.end-e.start)},[])),T=pe.useCallback(function(){var e;return{start:(null==(e=E.current)?void 0:e.selectionStart)||0,end:(null==(e=E.current)?void 0:e.selectionEnd)||0}},[E.current]),I=pe.useCallback(function(e){var t,n;E.current&&(t=E.current,n=Math.min(e.start,e.end),e=Math.max(e.start,e.end),t.setSelectionRange(n,e))},[E.current]),M=pe.useCallback(function(e){return I({start:e,end:e})},[I]),N=pe.useCallback(function(e,t){var n,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,o="",i=t+1,a=r;return t>=y.length||(r>=e.length?O.current={start:t,end:t}:(n=y[t],v(t)?(e[r].match(n)?o+=e[r]:o+=d,a++):o+=n,o+=N(e,i,a))),o},[y,d,v]),P=pe.useCallback(function(){O.current=T(),C.current=window.requestAnimationFrame(P)},[O.current,T]),A=function(e){var t=n.placeholder||"dd/mm/yyyy";return"yyyy"===t.substring(0,4)?e&&e[4]===t[4]&&e[7]===t[7]:e&&e[2]===t[2]&&e[5]===t[5]},r=pe.useCallback(function(e){for(var t,n=null==(n=e.currentTarget)?void 0:n.value,r=T(),o=Math.min(O.current.start,r.start),i=r.end,a=o,s="",c=0,i=n.slice(o,i),s=N(i,o),i=k,u=(0!==i.length||"parent-TimePicker"!==g&&"parent-DatePicker"!==g||(i=S),t=s.length,r.end>O.current.end?c=t?j(O.current):0:n.length<i.length&&(c=i.length-n.length),i.split("")),l=0;l<t;l++)u[o+l]=s[l];for(var f=0;f<c;f++){var p=o+t+f;u[p]=w(p,p)}r=u.slice(0,y.length).join(""),s!==d&&""!==s&&!s.includes(d)&&J(h,r)&&(a+=t),n=b(c?"left":"right",a),1===c&&!s.length&&!v(a)&&0<n?(a=n,u[--a]=d):1!==c&&(a=n),r=u.slice(0,y.length).join("");x.current=a,r!==i&&J(h,r)?"__:__ _M"===S?(D(r.toUpperCase()),null!=m&&m(e,r.toUpperCase())):(D(r),null!=m&&m(e,r)):window.requestAnimationFrame(function(){return M(x.current)})},[O.current,h,T,N,j,w,b,v,M,D,m]),e=pe.useCallback(function(e){var t=e.currentTarget.value;o&&t===S&&(D(""),t=""),null!=c&&c(e,t),C.current&&window.cancelAnimationFrame(C.current)},[o,C.current,w,D,c]),F=pe.useCallback(function(e){x.current=_.start,D(S),null!=l&&l(e)},[D,w,M,p,l]),B=pe.useCallback(function(e){C.current=window.requestAnimationFrame(P),k||(x.current=_.start,D(w())),null!=u&&u(e)},[C.current,k,P,D,I,u]),K=pe.useMemo(function(){return me({"d-flex flex-column flex-grow-1":!0},f)},[f]);return pe.createElement("div",{className:K,"data-test":"DesignSystem-InputMask--Wrapper"},pe.createElement(on,he({},z,{value:k,error:i,required:R,onFocus:B,onChange:r,onClear:F,onBlur:e,onPaste:function(e){e.preventDefault();var t,n=null==(n=e.clipboardData)?void 0:n.getData("Text"),r=(o=(t=n).length,t=t.substring(0,o),23===o?(r=(o=t.split(" - "))[0],o=o[1],A(r)&&A(o)):A(t)),o=J(h,n);r&&s&&o&&(s(e,n),D(n))},autoComplete:"off",ref:E})),pe.createElement(Ss,{message:i?a:L,error:i}))}),ln=(n.displayName="InputMask",n.utils={getDefaultValue:gt},n),fn=["required","optional","withInput","disabled","children","className","info"],pn=(vt.displayName="Label",["children","className","appearance","size","disabled"]),dn=function(e){var t,n=e.children,r=e.className,o=e.appearance,i=e.size,a=e.disabled,e=W(e,pn),i=me((de(t={Link:!0},"Link--".concat(i),i),de(t,"Link--".concat(o),o),de(t,"Link--".concat(o,"-disabled"),a),t),r);return pe.createElement(Oe,he({"data-test":"DesignSystem-Link",className:i,componentType:"a"},e),n)},hn=(dn.displayName="Link",dn.defaultProps={appearance:"default",size:"regular",disabled:!1},bt.displayName="Meta",function(e){var o=e.list,t=e.seperator,i=e.seperatorAppearance,a=e.iconAppearance,s=e.labelAppearance,n=e.className,c=e.size,e=ge(e),n=me(de({},"MetaList",!0),n),u=me(de({},"MetaList-seperator",!0)),r=me((de(r={},"MetaList-seperator",!0),de(r,"MetaList-seperator--left",!0),r));return pe.createElement("div",he({"data-test":"DesignSystem-MetaList"},e,{className:n}),t&&pe.createElement(N,{"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 pe.createElement("span",{key:t,className:"MetaList-item"},pe.createElement(bt,{size:c,label:void 0===n?"":n,icon:e,iconAppearance:a,labelAppearance:s}),r&&pe.createElement(N,{"data-test":"DesignSystem-MetaList--rightSeperator",name:"fiber_manual_record",size:8,className:u,appearance:i}))}))});hn.displayName="MetaList",hn.defaultProps={seperatorAppearance:"disabled",iconAppearance:"subtle",labelAppearance:"subtle",size:"regular"};function yn(e,t,n,r){for(var o=t<n?1:-1,i=t;i!==n+o;i+=o)e[i]=r}var mn=function(){e(i,pe["Component"]);var r=h(i);function i(){var o;d(this,i);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return de(V(o=r.call.apply(r,[this].concat(t))),"state",{isHandleMoving:!1,isHandleHovered:!1}),de(V(o),"handleElement",null),de(V(o),"refHandlers",{handle:function(e){return o.handleElement=e}}),de(V(o),"mouseEventClientOffset",function(e){return e.clientX}),de(V(o),"clientToValue",function(e){var t=o.props,n=t.stepSize,r=t.tickSize,t=t.value;return null==o.handleElement||(e=e-((e=o.getHandleMidpointAndOffset(o.handleElement)).handleMidpoint+e.handleOffset),isNaN(e))?t:t+Math.round(e/(r*n))*n}),de(V(o),"changeValue",function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:o.props.onChange,e=St(e,o.props.min,o.props.max);return isNaN(e)||o.props.value===e||t&&t(e),e}),de(V(o),"endHandleMovement",function(e){var e=o.mouseEventClientOffset(e),t=o.props.onRelease,e=(o.removeDocumentEventListeners(),o.setState({isHandleMoving:!1}),o.changeValue(o.clientToValue(e)));t&&t(e)}),de(V(o),"continueHandleMovement",function(e){var e=o.mouseEventClientOffset(e);o.state.isHandleMoving&&!o.props.disabled&&(e=o.clientToValue(e),o.changeValue(e))}),de(V(o),"beginHandleMovement",function(e){o.props.disabled||(document.addEventListener("mousemove",o.continueHandleMovement),document.addEventListener("mouseup",o.endHandleMovement),o.setState({isHandleMoving:!0}),e=o.clientToValue(e.clientX),o.changeValue(e))}),de(V(o),"handleKeyDown",function(e){var t,n,r;o.props.disabled||(t=(n=o.props).stepSize,n=n.value,37===(r=e.keyCode)?(o.changeValue(n-t),e.preventDefault()):39===r&&(o.changeValue(n+t),e.preventDefault()))}),de(V(o),"handleKeyUp",function(e){o.props.disabled||0<=[37,39].indexOf(e.keyCode)&&(e=o.props.onRelease)&&e(o.props.value)}),de(V(o),"getHandleMidpointAndOffset",function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return null==e?{handleMidpoint:0,handleOffset:0}:{handleOffset:(e=e.getBoundingClientRect()).left,handleMidpoint:e[t?"height":"width"]/2}}),de(V(o),"handleMouseOver",function(){o.setState({isHandleHovered:!0})}),de(V(o),"handleMouseLeave",function(){o.setState({isHandleHovered:!1})}),de(V(o),"removeDocumentEventListeners",function(){document.removeEventListener("mousemove",o.continueHandleMovement),document.removeEventListener("mouseup",o.endHandleMovement)}),o}return a(i,[{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(wt((r-t)*n)," - ").concat(e,"px)")},n=me((de(t={},"Slider-handle",!0),de(t,"Slider-handle--disabled",o),de(t,"Slider-handle--active",s),de(t,"border-0",o),t)),s=me((de(e={},"Slider-tooltip",!0),de(e,"Tooltip",!0),de(e,"d-none",!a),e));return pe.createElement(pe.Fragment,null,pe.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:0,"data-test":"DesignSystem-MultiSlider-Handle"}),pe.createElement("div",{className:s,style:r},i))}}]),i}(),n=function(){e(n,pe["Component"]);var t=h(n);function n(e){var p;return d(this,n),de(V(p=t.call(this,e)),"handleElements",[]),de(V(p),"trackElement",null),de(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}),de(V(p),"getOffsetRatio",function(e){return St((e-p.props.min)*p.state.tickSizeRatio,0,1)}),de(V(p),"addHandleRef",function(e){null!=e&&p.handleElements.push(e)}),de(V(p),"getHandleValues",function(e){e=pe.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}),de(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}))}),de(V(p),"getTrackFill",function(e,t){return void 0!==e.fillAfter?e.fillAfter:void 0!==t&&void 0!==t.fillBefore&&t.fillBefore}),de(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)}),de(V(p),"getLockedHandleIndex",function(e,t){var n=e<t?1:-1,e=e+n;return e!==t+n?e:-1}),de(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?(yn(n,t,i,n[i]),n):(yn(r,t,o,e),r)}),de(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])})}),de(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])}))}),de(V(p),"formatLabel",function(e){var t=p.props.labelRenderer,e=e.toFixed(p.state.labelPrecision);return"function"==typeof t?t(Number(e)):e}),de(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 pe.createElement(mn,{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})})}),de(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:wt(e)},t=!a&&-1!==u.indexOf(n.toFixed(p.state.labelPrecision)),r=me((de(r={},"Slider-ticks",!0),de(r,"bg-dark",t),r));s.push(pe.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"},pe.createElement("span",{className:r}),!1!==i&&pe.createElement(ve,{size:"small",appearance:t?"default":"disabled"},p.formatLabel(n))))}(l,f);return s}),de(V(p),"renderTrackFill",function(e,t,n){var r=ye([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=q({},{width:"".concat(100-r-o,"%")}),o=p.getTrackFill(t,n),n=me((de(t={},"Slider-progress",!0),de(t,"Slider-progress--disabled",p.props.disabled),de(t,"Slider-progress--inRange",o),de(t,"Slider-progress--inRangeDisabled",o&&p.props.disabled),t));return pe.createElement("div",{key:"track-".concat(e),className:n,style:r})}),de(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}),de(V(p),"handleLabelMouseOver",function(e){p.setState({hoveredLabelValue:e})}),de(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=me(de({},"Slider",!0),e),o=me((de(o={},"Slider-wrapper",!0),de(o,"Slider-wrapper--disabled",this.props.disabled),o));return pe.createElement("div",he({},r,{className:e,"data-test":"DesignSystem-MultiSlider"}),n&&pe.createElement(vt,{withInput:!0},n),pe.createElement("div",{className:o},pe.createElement("div",{className:"Slider-track",ref:function(e){return t.trackElement=e},onMouseDown:this.maybeHandleTrackClick,"data-test":"DesignSystem-MultiSlider-Slider-Track"},this.renderTracks()),pe.createElement("div",{className:"Slider-axis"},this.renderLabels()),this.renderHandles()))}}]),n}(),gn=(de(n,"defaultProps",{labelStepSize:1,max:10,min:0,stepSize:1,labelRenderer:!0}),de(n,"Handle",function(){return null}),["children","className","onOutsideClick"]),vn=pe.forwardRef(function(e,t){var n=e.children,r=e.className,o=e.onOutsideClick,e=W(e,gn),i=pe.useRef(null),a=(pe.useImperativeHandle(t,function(){return i.current},[i]),pe.useEffect(function(){return document.addEventListener("click",a,!0),function(){document.removeEventListener("click",a)}},[]),pe.useCallback(function(e){var t=i;e.target&&t.current&&(t.current.contains(e.target)||o(e))},[])),t=me(de({},"OutsideClick",!0),r);return pe.createElement("div",he({ref:i},e,{className:t}),n)}),bn=(vn.displayName="OutsideClick",["appearance","children","className"]),wn=function(e){var t=e.appearance,n=e.children,r=e.className,e=W(e,bn),t=me(de({Text:!0},"Text--".concat(t),t),r);return pe.createElement(Oe,he({"data-test":"DesignSystem-Paragraph"},e,{className:t,componentType:"p"}),n)},Sn=(wn.displayName="Paragraph",wn.defaultProps={appearance:"default"},["size","label","disabled","onChange","name","value","checked","defaultChecked","className","helpText","error"]),r=pe.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,p=e.error,e=W(e,Sn),d=pe.useRef(null),t=(pe.useImperativeHandle(t,function(){return d.current}),me((de(t={},"Radio",!0),de(t,"Radio--disabled",o),t),l)),p=me((de(l={},"Radio-wrapper",!0),de(l,"Radio-defaultWrapper",!p),de(l,"Radio-errorWrapper",p),de(l,"Radio-wrapper--".concat(n),n),l)),l=me((de(l={},"Radio-outerWrapper",!0),de(l,"Radio-outerWrapper--".concat(n),n),l)),h=me(de({},"Radio-Label",!0)),y="".concat(a,"-").concat(r,"-").concat(xe());return pe.createElement("div",{className:t,"data-test":"DesignSystem-Radio"},pe.createElement("div",{className:l,"data-test":"DesignSystem-Radio-OuterWrapper"},pe.createElement("input",he({tabIndex:-1},e,{type:"radio",disabled:o,checked:c,defaultChecked:u,ref:d,name:a,value:s,onChange:i,className:"Radio-input",id:y,"data-test":"DesignSystem-Radio-Input"})),pe.createElement("span",{tabIndex:0,"data-test":"DesignSystem-Radio-wrapper",className:p})),pe.createElement("div",{className:"Radio-labelWrapper"},r&&pe.createElement("label",{className:h,htmlFor:y,"data-test":"DesignSystem-Radio-Label"},pe.createElement(ve,{size:"tiny"===n?"small":"regular",appearance:o?"disabled":"default"},r)),f&&pe.createElement(ve,{"data-test":"DesignSystem-Radio-HelpText",size:"small",appearance:o?"disabled":"subtle"},f.trim())))}),_n=(r.displayName="Radio",["className","children"]),En=pe.forwardRef(function(e,t){var n=e.className,r=e.children,e=W(e,_n),n=me(de({Row:!0},"".concat(n),n));return pe.createElement("div",he({"data-test":"DesignSystem-Row",ref:t},e,{className:n}),r)}),Cn=(En.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=me(de({},"StatusHint",!0),s),n=me((de(t={},"StatusHint-icon",!0),de(t,"StatusHint--".concat(n),n),t));return pe.createElement("div",he({"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)}}),pe.createElement("span",{"data-test":"DesignSystem-StatusHint--Icon",className:n}),pe.createElement(ve,{"data-test":"DesignSystem-StatusHint--Text",weight:"medium"},r))}),On=(Cn.displayName="StatusHint",Cn.defaultProps={appearance:"default"},function(e){var t,n=e.appearance,r=e.children,o=e.subtle,i=e.className,e=ge(e),n=me((de(t={Pills:!0},"Badge--".concat(n),n&&!o),de(t,"Badge--subtle-".concat(n),o),t),i);return pe.createElement("span",he({"data-test":"DesignSystem-Pills"},e,{className:n}),r)}),xn=(On.displayName="Pills",On.defaultProps={appearance:"secondary"},function(e){var t=e.appearance,n=e.size,r=e.className,e=ge(e),n=me(de({Spinner:!0},"Spinner--".concat(n),n),r),r=me(de({Circle:!0},"Circle--".concat(t),t));return pe.createElement("svg",he({},e,{className:n},{viewBox:"0 0 50 50"}),pe.createElement("circle",he({className:r},{cx:25,cy:25,r:20,fill:"none",strokeMiterlimit:"10",strokeWidth:"4"})))}),kn=(xn.displayName="Spinner",xn.defaultProps={appearance:"primary",size:"medium"},q(q({},n.defaultProps),{},{defaultValue:0}),(r=o=o||{})[r.START=0]="START",r[r.END=1]="END",q(q({},n.defaultProps),{},{defaultValue:[0,10]}),["size","defaultChecked","disabled","onChange","name","value","className","appearance","checked"]),Dn=(pe.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=W(e,kn),f=ye(pe.useState(void 0===l?o:l),2),p=f[0],d=f[1],f=(pe.useEffect(function(){void 0!==l&&d(l)},[l]),me((de(f={},"Switch",!0),de(f,"Switch--disabled",i),de(f,"Switch--".concat(r),r),f),u)),r=me((de(u={},"Switch-wrapper",!0),de(u,"Switch-wrapper--disabled",i),de(u,"Switch-wrapper--".concat(r),r),de(u,"Switch-wrapper--checked",p),de(u,"Switch-wrapper--checkedDisabled",p&&i),u));return pe.createElement("div",{className:f},pe.createElement("input",he({},e,{type:"checkbox",defaultChecked:o,disabled:i,onChange:n,checked:p,ref:t,name:s,value:c,className:"Switch-input",onKeyUp:n})),pe.createElement("span",{className:r}))}).displayName="Switch",["rows","resize","disabled","name","placeholder","value","defaultValue","required","error","onChange","onClick","onBlur","onFocus","className"]);pe.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,m=e.className,e=W(e,Dn),o=me((de(n={},"Textarea",!0),de(n,"Textarea--resize",o),de(n,"Textarea--error",f),n),m);return pe.createElement("textarea",he({"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 jn(e){var t=Vn.call(e);return"[object Arguments]"===t||"[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Function]"===Vn.call(e.callee)}function Tn(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"!=typeof Symbol.iterator){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;n=Object.getOwnPropertySymbols(e);if(1!==n.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 In(){return Tn()&&!!Symbol.toStringTag}function Mn(e){try{return rr('"use strict"; return ('+e+").constructor;")()}catch(e){}}var Nn,Pn,An,Rn,Ln,zn,Fn,Bn,Kn,Hn=ne(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})),Un=ne(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})),qn=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=(ne(qn),t(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,qn(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),Wn=ne(o),i=ne(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=ne(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})),Vn=Object.prototype.toString,n=(Object.keys||(Nn=Object.prototype.hasOwnProperty,Pn=Object.prototype.toString,An=jn,r=Object.prototype.propertyIsEnumerable,Rn=!r.call({toString:null},"toString"),Ln=r.call(function(){},"prototype"),zn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Fn=function(e){var t=e.constructor;return t&&t.prototype===e},Bn={$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},Kn=function(){if("undefined"!=typeof window)for(var e in window)try{if(!Bn["$"+e]&&Nn.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{Fn(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]"===Pn.call(e),r=An(e),o=t&&"[object String]"===Pn.call(e),i=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=Ln&&n;if(o&&0<e.length&&!Nn.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||!Nn.call(e,u)||i.push(String(u));if(Rn)for(var l=function(e){if("undefined"==typeof window||!Kn)return Fn(e);try{return Fn(e)}catch(e){return!1}}(e),f=0;f<zn.length;++f)l&&"constructor"===zn[f]||!Nn.call(e,zn[f])||i.push(zn[f]);return i}),c),Gn=Array.prototype.slice,Yn=Object.keys,$n=Yn?function(e){return Yn(e)}:n,Zn=Object.keys,Jn=($n.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return jn(e)?Zn(Gn.call(e)):Zn(e)}):Object.keys=$n,Object.keys||$n},$n),o="undefined"!=typeof Symbol&&Symbol,Xn=Array.prototype.slice,Qn=Object.prototype.toString,er=Function.prototype.bind||function(t){var n=this;if("function"!=typeof n||"[object Function]"!==Qn.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,e,o=Xn.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(Xn.call(arguments))),Object(e)===e?e:this):n.apply(t,o.concat(Xn.call(arguments)))}),n.prototype&&((e=function(){}).prototype=n.prototype,r.prototype=new e,e.prototype=null),r},tr=er.call(Function.call,Object.prototype.hasOwnProperty),nr=SyntaxError,rr=Function,or=TypeError,ir=Object.getOwnPropertyDescriptor;if(ir)try{ir({},"")}catch(hi){ir=null}function ar(){throw new or}function sr(e,t){if("string"!=typeof e||0===e.length)throw new or("intrinsic name must be a non-empty string");if(1<arguments.length&&"boolean"!=typeof t)throw new or('"allowMissing" argument must be a boolean');var n=function(e){var t=Dr(e,0,1),n=Dr(e,-1);if("%"===t&&"%"!==n)throw new nr("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new nr("invalid intrinsic syntax, expected opening `%`");var o=[];return kr(e,jr,function(e,t,n,r){o[o.length]=n?kr(r,Tr,"$1"):t||e}),o}(e),r=0<n.length?n[0]:"",o=function(e,t){var n,r=e;if(tr(Cr,r)&&(r="%"+(n=Cr[r])[0]+"%"),tr(_r,r)){var o=_r[r];if(void 0!==(o=o===Sr?Er(r):o)||t)return{alias:n,name:r,value:o};throw new or("intrinsic "+e+" exists, but is not available. Please file an issue!")}throw new nr("intrinsic "+e+" does not exist!")}("%"+r+"%",t),i=(o.name,o.value),a=!1;(o=o.alias)&&(r=o[0],xr(n,Or([0,1],o)));for(var s=1,c=!0;s<n.length;s+=1){var u=n[s],l=Dr(u,0,1),f=Dr(u,-1);if(('"'===l||"'"===l||"`"===l||'"'===f||"'"===f||"`"===f)&&l!==f)throw new nr("property names with quotes must have matching quotes");if("constructor"!==u&&c||(a=!0),tr(_r,l="%"+(r+="."+u)+"%"))i=_r[l];else if(null!=i){if(!(u in i)){if(t)return;throw new or("base intrinsic for "+e+" exists, but the property is not available.")}i=ir&&s+1>=n.length?(c=!!(f=ir(i,u)))&&"get"in f&&!("originalValue"in f.get)?f.get:i[u]:(c=tr(i,u),i[u]),c&&!a&&(_r[l]=i)}}return i}function cr(e,t){return"function"==typeof(t=sr(e,!!t))&&-1<Mr(e,".prototype.")?Ir(t):t}function ur(e){return!(Nr&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===Pr(e)}function lr(e){return!!ur(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Array]"!==Pr(e)&&"[object Function]"===Pr(e.callee)}function fr(e,t){var n=2<arguments.length?arguments[2]:{},r=Jn(t);Rr&&(r=zr.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&&(!Br(s)||!s())||(Kr?Fr(o,i,{configurable:!0,enumerable:!1,value:a,writable:!0}):o[i]=a)}function pr(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!Ur(e)||!Ur(t))}function dr(){return"function"==typeof Object.is?Object.is:pr}function hr(){if(null!=this&&this!==Yr(this))throw new $r("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 yr(){if(!Zr)throw new Xr("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=Jr(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return hr}var mr,gr,vr,br,r=ir?function(){try{return ar}catch(e){try{return ir(arguments,"callee").get}catch(e){return ar}}}():ar,c="function"==typeof o&&"function"==typeof Symbol&&"symbol"==typeof o("foo")&&"symbol"==typeof Symbol("bar")&&Tn(),wr=Object.getPrototypeOf||function(e){return e.__proto__},Sr={},n="undefined"==typeof Uint8Array?u:wr(Uint8Array),_r={"%AggregateError%":"undefined"==typeof AggregateError?u:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?u:ArrayBuffer,"%ArrayIteratorPrototype%":c?wr([][Symbol.iterator]()):u,"%AsyncFromSyncIteratorPrototype%":u,"%AsyncFunction%":Sr,"%AsyncGenerator%":Sr,"%AsyncGeneratorFunction%":Sr,"%AsyncIteratorPrototype%":Sr,"%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%":rr,"%GeneratorFunction%":Sr,"%Int8Array%":"undefined"==typeof Int8Array?u:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?u:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?u:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c?wr(wr([][Symbol.iterator]())):u,"%JSON%":"object"==typeof JSON?JSON:u,"%Map%":"undefined"==typeof Map?u:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c?wr((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?wr((new Set)[Symbol.iterator]()):u,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?u:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c?wr(""[Symbol.iterator]()):u,"%Symbol%":c?Symbol:u,"%SyntaxError%":nr,"%ThrowTypeError%":r,"%TypedArray%":n,"%TypeError%":or,"%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},Er=function e(t){var n,r;return"%AsyncFunction%"===t?n=Mn("async function () {}"):"%GeneratorFunction%"===t?n=Mn("function* () {}"):"%AsyncGeneratorFunction%"===t?n=Mn("async function* () {}"):"%AsyncGenerator%"===t?(r=e("%AsyncGeneratorFunction%"))&&(n=r.prototype):"%AsyncIteratorPrototype%"===t&&(r=e("%AsyncGenerator%"))&&(n=wr(r.prototype)),_r[t]=n},Cr={"%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"]},Or=er.call(Function.call,Array.prototype.concat),xr=er.call(Function.apply,Array.prototype.splice),kr=er.call(Function.call,String.prototype.replace),Dr=er.call(Function.call,String.prototype.slice),jr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Tr=/\\(\\)?/g,Ir=t(function(e){var t=sr("%Function.prototype.apply%"),n=sr("%Function.prototype.call%"),r=sr("%Reflect.apply%",!0)||er.call(n,t),o=sr("%Object.getOwnPropertyDescriptor%",!0),i=sr("%Object.defineProperty%",!0),a=sr("%Math.max%");if(i)try{i({},"a",{value:1})}catch(e){i=null}e.exports=function(e){var t=r(er,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(er,t,arguments)}i?i(e.exports,"apply",{value:s}):e.exports.apply=s}),Mr=(Ir.apply,Ir(sr("String.prototype.indexOf"))),Nr=In(),Pr=cr("Object.prototype.toString"),o=function(){return ur(arguments)}(),Ar=(ur.isLegacyArguments=lr,o?ur:lr),Rr="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),Lr=Object.prototype.toString,zr=Array.prototype.concat,Fr=Object.defineProperty,Br=function(e){return"function"==typeof e&&"[object Function]"===Lr.call(e)},Kr=Fr&&function(){var e={};try{for(var t in Fr(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),Hr=(fr.supportsDescriptors=!!Kr,fr),Ur=function(e){return e!=e},c=Ir(dr(),Object),qr=(Hr(c,{getPolyfill:dr,implementation:pr,shim:function(){var e=dr();return Hr(Object,{is:e},{is:function(){return Object.is!==e}}),e}}),c),r=In(),Wr=(r&&(mr=cr("Object.prototype.hasOwnProperty"),gr=cr("RegExp.prototype.exec"),vr={},br={toString:n=function(){throw vr},valueOf:n},"symbol"==typeof Symbol.toPrimitive)&&(br[Symbol.toPrimitive]=n),cr("Object.prototype.toString")),Vr=Object.getOwnPropertyDescriptor,Gr=r?function(e){if(!e||"object"!=typeof e)return!1;var t=Vr(e,"lastIndex");if(!(t&&mr(t,"value")))return!1;try{gr(e,br)}catch(e){return e===vr}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===Wr(e)},Yr=Object,$r=TypeError,Zr=Hr.supportsDescriptors,Jr=Object.getOwnPropertyDescriptor,Xr=TypeError,Qr=Hr.supportsDescriptors,eo=Object.getOwnPropertyDescriptor,to=Object.defineProperty,no=TypeError,ro=Object.getPrototypeOf,oo=/a/,u=Ir(hr),io=(Hr(u,{getPolyfill:yr,implementation:hr,shim:function(){var e,t,n;if(Qr&&ro)return e=yr(),t=ro(oo),(n=eo(t,"flags"))&&n.get===e||to(t,"flags",{configurable:!0,enumerable:!1,get:e}),e;throw new no("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors")}}),u),ao=Date.prototype.getDay,so=Object.prototype.toString,co=In(),uo=function(e){if("object"!=typeof e||null===e)return!1;if(!co)return"[object Date]"===so.call(e);try{return ao.call(e),!0}catch(e){return!1}},lo=Date.prototype.getTime;function fo(e,t,n){n=n||{};if(n.strict?!qr(e,t):e!==t){if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return n.strict?qr(e,t):e==t;var r,o,i=e,a=t,s=n;if(typeof i!=typeof a)return!1;if(po(i)||po(a))return!1;if(i.prototype!==a.prototype)return!1;if(Ar(i)!==Ar(a))return!1;e=Gr(i),t=Gr(a);if(e!==t)return!1;if(e||t)return i.source===a.source&&io(i)===io(a);if(uo(i)&&uo(a))return lo.call(i)===lo.call(a);if(e=ho(i),t=ho(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}else{if(typeof i!=typeof a)return!1;try{var c=Jn(i),u=Jn(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],!fo(i[o],a[o],s))return!1}}return!0}function po(e){return null==e}function ho(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 yo=fo,mo="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,go=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(mo&&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}),be=function(n){return["className","data-test"].reduce(function(e,t){return n[t]?W(W({},e),{},he({},t,n[t])):W({},e)},{})},oe=function(e){function t(){return de.createElement("span",ye({"data-test":"DesignSystem-Avatar"},l,{className:p}),f&&de.createElement(Se,{weight:"medium",appearance:"white",className:d},f),!f&&de.createElement(N,{"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=be(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=ve((he(a={Avatar:!0},"Avatar--".concat(o),o),he(a,"Avatar--".concat(i),i),he(a,"Avatar--disabled",!f||!n),a),c),d=ve((he(s={},"Avatar-content--".concat(o),o),he(s,"Avatar-content--".concat(i),i),s)),h=ve(he({},"Avatar-content--".concat(i),i));return n&&f?de.createElement(ga,{tooltip:e,position:r,triggerClass:"flex-grow-0"},t()):t()},ie=(oe.displayName="Avatar",oe.defaultProps={tooltipPosition:"bottom",withTooltip:!0,size:"regular"},de.useEffect),ae=de.useState,se=(re.displayName="Backdrop",["size","appearance","iconAlign","tabIndex","largeIcon","type","children","icon","expanded","selected","loading","disabled","className","tooltip"]),ce={tiny:12,regular:16,large:20},ue=de.forwardRef(function(e,t){var n,r=e.size,r=void 0===r?"regular":r,o=e.appearance,o=void 0===o?"basic":o,i=e.iconAlign,i=void 0===i?"left":i,a=e.tabIndex,a=void 0===a?0:a,s=e.largeIcon,c=e.type,u=e.children,l=e.icon,f=e.expanded,p=e.selected,d=e.loading,h=e.disabled,y=e.className,e=(e.tooltip,q(e,se)),f=ve((he(n={},"Button",!0),he(n,"Button--expanded",f),he(n,"Button--".concat(r),r),he(n,"Button--".concat(r,"Square"),!u),he(n,"Button--".concat(o),o),he(n,"Button--selected",p&&("basic"===o||"transparent"===o)),he(n,"Button--iconAlign-".concat(i),u&&i),he(n,"".concat(y),y),n)),y=ve((he(p={},"Button-icon",!0),he(p,"Button-icon--".concat(i),u&&i),p));return de.createElement("button",ye({"data-test":"DesignSystem-Button",ref:t,type:c,className:f,disabled:h||d,tabIndex:a},e),d?de.createElement(de.Fragment,null,de.createElement(kn,{size:"small",appearance:"basic"===o||"transparent"===o?"secondary":"white","data-test":"DesignSystem-Button--Spinner",className:"Button-spinner"}),de.createElement(Se,{className:"Button-text Button-text--hidden"},u||"")):de.createElement(de.Fragment,null,l&&de.createElement("div",{className:y},de.createElement(N,{"data-test":"DesignSystem-Button--Icon",name:l,size:s&&!u?ce[r]+4:ce[r]})),u&&de.createElement("span",{className:"Button-text"},u)))}),we=de.forwardRef(function(e,t){var n=e.icon,r=e.tooltip,o=e.children;return n&&r&&!o?de.createElement(ga,{tooltip:r},de.createElement(ue,ye({},e,{ref:t}))):de.createElement(ue,ye({},e,{ref:t}))});we.displayName="Button";function le(e){return["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].indexOf(e)}function fe(e,t){return new Date(e,t+1,0).getDate()}function pe(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 O(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 _e(e,t){var n,r,o,i,a;if(Z(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]}}),y({year:r,month:o,date:i})}function Ee(e){var n=e.onClick,r=e.onKeyDown,o=void 0===(t=e.role)?"button":t,t=q(e,lt);return W({},n?{onClick:n,role:o,tabIndex:0,"aria-label":t["aria-label"],onKeyDown:function(e){var t;r?r(e):(t=e.key,pt(o,t)&&n&&(e.preventDefault(),n(e)))}}:{role:o,"aria-label":t["aria-label"]})}function Ce(e){var t=e.children,n=void 0===(n=e.componentType)?"span":n,r=e.className,e=q(e,dt);return de.createElement(n,W(W({},e),{},{className:r}),t)}function Oe(e){function t(e){var t;return ve((he(t={},"Chip-icon",!0),he(t,"Chip-icon--".concat(e),e),he(t,"Chip-icon-disabled--right","right"===e&&s),he(t,"cursor-pointer","right"===e&&!s),he(t,"Chip-icon--selected","right"===e&&u),t))}function n(e){e.stopPropagation(),l&&l()}function r(e){var t;return ve((he(t={},"disabled",s&&!u),he(t,"primary_dark",!s&&u),he(t,"primary_lighter",s&&u),he(t,"subtle",!s&&!u&&"right"===e),he(t,"inverse",!s&&!u&&"left"===e),t))}var o=e.label,i=e.icon,a=e.clearButton,s=e.disabled,c=e.className,u=e.selected,l=e.onClose,f=e.onClick,e=be(e),p=ve((he(p={},"primary-lighter",s&&u),he(p,"inverse-lightest",s&&!u),he(p,"primary-dark",u),he(p,"inverse",!s&&!u),p));return de.createElement("div",ye({tabIndex:s?-1:0,"data-test":"DesignSystem-GenericChip--GenericChipWrapper"},e,{className:"Chip-wrapper ".concat(c),onClick:function(){f&&f()}}),i&&de.createElement(N,{"data-test":"DesignSystem-GenericChip--Icon",name:i,appearance:r("left"),className:t("left")}),"string"==typeof o?de.createElement(Se,{"data-test":"DesignSystem-GenericChip--Text",color:p,className:"Chip-text"},o):o,a&&de.createElement("div",{role:"button",onClick:n,tabIndex:s?-1:0,onKeyDown:function(e){"Enter"===e.key&&n(e)},className:t("right"),"data-test":"DesignSystem-GenericChip--clearButton"},de.createElement(N,{name:"clear",appearance:r("right"),className:"p-2"})))}function xe(){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 ke(e){switch(e.name){case"checked--regular":return m.a.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.66667 5.56L8.72667 0.5L9.66667 1.44667L3.66667 7.44667L0.333333 4.11333L1.27333 3.17333L3.66667 5.56Z",fill:"white"}));case"checked--tiny":return m.a.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.a.createElement("path",{d:"M0.333344 4L1.27334 3.06L3.66668 5.44667L8.72668 0.386665L9.66668 1.33333L3.66668 7.33333L0.333344 4Z",fill:"white"}));case"indeterminate--regular":return m.a.createElement("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.a.createElement("path",{d:"M0 0H10V2H0V0Z",fill:"white"}));case"indeterminate--tiny":return m.a.createElement("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0H0V2H8V0Z",fill:"white"}));default:return null}}function De(e){var o=e.inputFormat,i=e.inputOptions,a=e.validators,t=e.state,s=e.setState,e=t.init,n=t.date,t=t.error,c=void 0===(r=i.placeholderChar)?"_":r,r=i.error||i.required&&t&&e,t=void 0===i.caption?"Invalid value":i.caption,u=J[o];return de.createElement(fn,ye({icon:"events",placeholder:o},i,{error:r,mask:u,value:n?O(o,n):e?fn.utils.getDefaultValue(u,c):"",onChange:function(e,t){var n=i.onChange;s({open:!0}),t&&!t.includes(c)&&(t=_e(o,t,a),s({date:t})),n&&n(e)},onPaste:function(e,t){var n,r=i.onPaste;s({open:!0}),t&&!t.includes(c)&&(n=_e(o,t,a),s({date:n})),r&&r(e,t)},onBlur:function(e,t){var n=i.onBlur,r=(s({init:!0}),/\d/);t&&r.test(t)&&t.includes(c)?s({error:!0}):(!t||r.test(t))&&t||s({error:!1}),n&&n(e,t||"")},onClear:function(e){var t=i.onClear;s({init:!0,date:void 0}),t&&t(e)},caption:r?t:"",validators:[function(e){return Z(a,e,o)}],clearOnEmptyBlur:!0,id:"parent-DatePicker"}))}function je(e){var t=new Date;return t.setHours(e.substring(0,2)),t.setMinutes(e.substring(3,5)),t}function Te(e){return"12-Hour"===e}function Ie(e){var e=e.split(":"),t=12<=(n=parseInt(e[0],10))?"PM":"AM",n=(n%12||12).toString(),n=_t(n),e=e[1];return"".concat(n.toString(),":").concat(e," ").concat(t)}function Me(e,t,n){for(var r=[],o=je(e),i=je(t);o<=i;)r.push(o.toTimeString().substring(0,5)),o.setMinutes(o.getMinutes()+n);return r}function Ne(e,t){return e=new Date("07/07/2022 "+e),t=new Date("07/07/2022 "+t).getTime()-e.getTime(),{hour:(e=new Date(t)).getUTCHours(),minute:e.getUTCMinutes()}}function Pe(e){var t=parseInt(e,10);return t<10?e:((60<t?t%60:t).toString()+"0").slice(0,2)}function Ae(e){return(parseInt(e,10)%24).toString()}function Re(e){return/^[0-9]+$/.test(e)}function Le(e){return/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]*$/.test(e)}function ze(e){var e=e.split(jt),t=Ae(e[0]);return{hour:_t(t),min:((""!==e[1]?Pe(e[1]):"00")+"0").slice(0,2)}}function Fe(e,t){var n=e.length,r=parseInt(e,10),o=e.slice(0,2),i="00",a="00";switch(n){case 1:i="0"+e;break;case 2:r<=24||t&&r<=12?i=_t(e):(i="0"+e[0],a=Pe(e[1]+"0"));break;case 3:i="0"+e[0],a=Pe(e.slice(1));break;case 4:i=t?(parseInt(o,10)%12).toString():Ae(o),a=Pe(e.slice(2));break;default:a=i="-1"}return{hour:i,min:a}}function Be(e,t){var n,r={hour:"00",min:"00"};return Re(t)?(n=Fe(t),r=parseInt(n.hour)<=12&&0<parseInt(n.hour)?He(e,n):n):/^[0-9]+[ AaMmPp]+$/.test(t)?(r=function(e){e=e.split(/[\saAmMpP]/),e=Fe(e[0],!0);return{hour:e.hour,min:e.min}}(t)).hour=Ke(r.hour,t):Le(t)?(n=ze(t),r=parseInt(n.hour)<=12?He(e,n):n):/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]+[ AaMmPp]+$/.test(t)&&(e=t.replace(/[\saApPmM]/g,""),Re(e)?r=Fe(e,!0):Le(e)&&(r=ze(e)),r.hour=Ke(r.hour,t)),r}function Ke(e,t){return"12"===e&&wt(t)?e="00":St(t)&&"12"!==e&&(e=(parseInt(e,10)+12).toString()),e}function He(e,t){var n="".concat(t.hour,":").concat(t.min),r=Dt(),o=Ct(r,n),r=Tt(e,r),e=Tt(e,n);return o&&e<r&&(n=parseInt(t.hour,10)+12,t.hour=n.toString()),t}function Ue(e,t){var e=Nt(ge(e)),n=Nt(ge(t));return e.length===n.length&&e.every(function(e,t){return e.value===n[t].value})}function We(e){return void 0!==e}function qe(e){return void 0!==e}function Ve(e,t,n){return e&&n&&""===t}function Ge(e,t,n,r){return r&&n&&0===t&&""===e}function Ye(e,t,n){return e.length?0<e.length&&0<n&&e.length===t-n?{indeterminate:!0,checked:!0}:(n=0<e.length&&e.length!==t,{checked:0<e.length&&e.length===t,indeterminate:n}):{indeterminate:!1,checked:!1}}function $e(e,t){e=t&&(null==(t=t[e])?void 0:t.optionID),(t=document.getElementById(e))&&t.scrollIntoView&&t.scrollIntoView({block:"center"})}function Ze(e){var t,n,r,o,i,a,s=e.open,c=e.endTime,u=e.interval,l=e.onChange,f=e.startTime,p=e.timeFormat,d=e.showDuration,h=e.noResultMessage,y=e.disabledSlotList,m=e.fetchTimeOptions,g=me(de.useState(0),2),v=g[0],b=g[1],w=(g=me(de.useState(!1),2))[0],S=g[1],_=(g=me(de.useState(-1),2))[0],E=g[1],C=(g=me(de.useState(0),2))[0],O=g[1],x=(t=(g=e).startTime,n=e.endTime,r=e.interval,o=e.timeFormat,i=e.showDuration,a=e.disabledSlotList,g=e.id,e=t?Et(t):"00:00",n=n?Et(n):kt(t),e=Ot(e,n,r),xt(e,o,g,i,t,a));return de.useEffect(function(){void 0!==s&&S(s)},[s]),de.useEffect(function(){var e;return w&&-1!=_&&(b(_),e=setTimeout(function(){$e(_,x)},100)),function(){clearTimeout(e)}},[w]),de.useEffect(function(){O(C+1)},[f,c,u,d,y]),de.createElement(Qt,{key:C,maxHeight:160,loadersCount:0,withSearch:!0,open:w,tabIndex:v,searchPlaceholder:"Search",onChange:function(t){var e=t,n=(Te(p)&&(e=Ie(t)),x.findIndex(function(e){return e.value===t}));E(n),l&&l(e)},fetchOptions:m||function(e){n=e,t=It(t=x);var t,n,r=""===n?(r=Dt(),Tt(t,r)):Mt(t,n);return b(t=""===e&&-1!=_?_:r),Promise.resolve({options:-1===r?[]:x,count:x.length,scrollToIndex:0===t?t+1:t,searchTerm:e})},noResultMessage:h,staticLimit:x.length,onPopperToggle:function(){S(!w)}})}function Je(e){var t=e.validators,s=e.inputOptions,c=e.inputFormat,u=e.outputFormat,l=e.onTimeChange,n=e.time,f=(e=me(de.useState(n),2))[0],r=e[1],o=(e=me(de.useState(!1),2))[0],p=e[1],d=void 0===(e=s.placeholderChar)?"_":e,e=(de.useEffect(function(){var e=T(c,f),e=void 0===n&&e.includes(d)?f:n;r(e)},[n]),Q[c]);return de.createElement(fn,ye({placeholder:L[c],placeholderChar:d},s,{mask:e,value:f?T(c,f):o?fn.utils.getDefaultValue(e,d):"",validators:function(e){return Z(t,e,c)},onChange:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",n=null==t?void 0:t.toUpperCase();r(n),s.onChange&&s.onChange(e,t)},onClear:function(e){p(!0),l&&l(""),s.onClear&&s.onClear(e)},onBlur:function(e){var t,n,r,o,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",a=T(c,f);p(!0),l&&(r=!a||(r=d,(o=a)&&o.includes(r))?void 0:(o=a,(r=c)===(a=u)?o:(o=(r=H(r,o)).hours,t=r.minutes,r=r.am_pm,n=z(a)?F(o).AMPM:"",o=z(a)?F(o).hrs:B(o,r),U(a,{minutes:t,hours:o,am_pm:n}))),l(r)),s.onBlur&&s.onBlur(e,i)},id:"parent-TimePicker"}))}var Xe=12,Qe=3,et=12,tt=3,nt=7,rt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ot={small:["Su","Mo","Tu","We","Th","Fr","Sa"],large:["Su","Mo","Tu","We","Th","Fr","Sa"]},it=Xe,at=function(e){return e-e%it},Y=function(e){var t,n,r;return(e=e&&y(e))?(t=e.getFullYear(),n=e.getMonth(),r=e.getDay(),e=e.getDate(),{decadeYear:at(t),year:t,month:n,day:r,date:e}):{}},y=function(e,t,n){var r;if(e)if("number"==typeof e)r=new Date(e);else{if("string"==typeof e)return t?_e(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},st=function(){e(p,de["Component"]);var f=h(p);function p(e){d(this,p),he(V(q=f.call(this,e)),"updateState",function(e,t,n){q.setState({year:e,month:t,date:n})}),he(V(q),"getDateValue",function(e,t,n){return new Date(e,t,n)}),he(V(q),"getNavDateInfo",function(e){var t=q.state,n=t.yearBlockNav,r=t.yearNav,t=t.monthNav,o=(t+e)%et==-1?11:(t+e)%et,r=0<=e?r+(0!==e&&o<t?1:0):r-(0!==e&&t<o?1:0);return{yearBlock:n,year:r,month:o}}),he(V(q),"getInRangeError",function(){var e=q.props,t=e.rangePicker,e=e.rangeLimit,n=q.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}),he(V(q),"selectYear",function(e){return function(){q.updateState(e),q.setState({view:"month"})}}),he(V(q),"yearMouseOverHandler",function(e,t,n,r){var o=q.props.onYearHover;o&&o({value:e,year:e,isCurrentYear:t,isDisabled:n},r)}),he(V(q),"selectMonth",function(e){return function(){q.updateState(q.state.yearNav,e),q.setState({view:"date"})}}),he(V(q),"monthMouseOverHandler",function(e,t,n,r){var o=rt,i=q.props.onMonthHover,o={value:o[e],month:o[e],year:q.state.year,isCurrentMonth:t,isDisabled:n};i&&i(o,r)}),he(V(q),"selectDate",function(e,t,n,r){e=q.calculateDate(e,t,n,r,!1);q.setState({currDate:e})}),he(V(q),"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),q.getNavDateInfo(i)),r=n.year,e=n.month;return!1===o&&(q.updateState(r,e,a),q.onNavIconClickHandler(s)()),q.getDateValue(r,e,a)}),he(V(q),"onNavIconClickHandler",function(s){return function(){var e=q.state,t=e.view,n=e.yearBlockNav,r=e.yearNav,o=e.monthNav,i=Xe,a=et;switch(t){case"year":"prev"===s&&q.setState({yearBlockNav:n-i}),"next"===s&&q.setState({yearBlockNav:n+i});break;case"month":"prev"===s&&q.setState({yearNav:r-1}),"next"===s&&q.setState({yearNav:r+1});break;case"date":"prev"===s&&(0===o&&q.setState({yearNav:r-1}),q.setState({monthNav:(a+o-1)%a})),"next"===s&&(o===a-1&&q.setState({yearNav:r+1}),q.setState({monthNav:(o+1)%a}))}}}),he(V(q),"renderJumpButton",function(e){var t=q.props,n=t.disabledBefore,r=t.disabledAfter,t=t.size,o=q.state,i=o.view,a=o.yearBlockNav,s=o.yearNav,c=o.monthNav,u=!1;switch(i){case"year":"prev"===e&&(u=pe(n,"more",a)||pe(n,"equal",a)),"next"===e&&(u=pe(r,"less",a)||pe(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=ve(he({"Calendar-headerIcon":!0},"Calendar-headerIcon--".concat(e),e));return de.createElement(we,{type:"button",className:o,appearance:"basic",icon:"arrow_".concat("next"===e?"forward":"back"),disabled:u,size:"small"===t?"tiny":"regular",onClick:q.onNavIconClickHandler(e)})}),he(V(q),"onNavHeadingClickHandler",function(n){return function(){var e=q.props.monthsInView,t=q.props.jumpView;(t=t&&1<e?!1:t)&&("year"===n&&q.setState({view:"date"}),"month"===n&&q.setState({view:"year"}),"date"===n)&&q.setState({view:"month"})}}),he(V(q),"renderHeaderContent",function(e){function t(e){return"small"===r?de.createElement(de.Fragment,null,de.createElement(Se,{weight:"strong"},e),"year"!==a&&!i&&de.createElement(N,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"})):de.createElement(de.Fragment,null,de.createElement(nn,{size:"s"},e),"year"!==a&&!i&&de.createElement(N,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"}))}var n=q.props,r=n.size,o=n.monthsInView,i=n.rangePicker,n=q.state,a=n.view,n=n.yearBlockNav,s=Xe,c=rt,u=q.getNavDateInfo(e),l=u.year,u=u.month,o=ve({"Calendar-headerContent":!0,"Calendar-headerContent--noIcon-left":e===o-1,"Calendar-headerContent--noIcon-right":0===e}),e="";"year"===a&&(e="".concat(n," - ").concat(n+(s-1))),"month"===a&&(e="".concat(l));return de.createElement("div",{className:o},"date"!==a&&de.createElement("div",{className:"d-flex justify-content-center align-items-center",onClick:q.onNavHeadingClickHandler(a)},t(e)),"date"===a&&de.createElement(de.Fragment,null,de.createElement("div",{onClick:q.onNavHeadingClickHandler(a),className:"d-flex justify-content-center align-items-center"},t(c[u])),de.createElement("div",{className:"ml-4 d-flex justify-content-center align-items-center",onClick:q.onNavHeadingClickHandler("month")},t(l))))}),he(V(q),"renderBodyYear",function(){var e=Xe,c=Qe,t=q.props,u=t.size,l=t.rangePicker,f=t.disabledBefore,p=t.disabledAfter,t=q.state,d=t.yearBlockNav,h=t.currYear,t=Math.ceil(e/c);return Array.from({length:t},function(e,s){return de.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 i=!(a=G(f,"more",n=d+a)||G(p,"less",n))&&!l&&n===q.state.year,r=function(){return n===h},o=ve((he(o={"Calendar-value":!0,"Calendar-value--active":i,"Calendar-value--disabled":a,"Calendar-yearValue":!0},"Calendar-yearValue--".concat(u),u),he(o,"Calendar-value--currDateMonthYear",r()),o)),i=ve({inverse:!i&&!r()&&!a,white:i,"primary-lighter":r()&&a,primary:r(),"inverse-lightest":a}),de.createElement("div",{key:"".concat(s,"-").concat(t),"data-test":"DesignSystem-Calendar--yearValue",className:o,onClick:q.selectYear(n),onMouseOver:q.yearMouseOverHandler.bind(V(q),n,r(),a)},de.createElement(Se,{size:"small"===u?"small":"regular",color:i,className:"Calendar-text"},n))}))})}),he(V(q),"renderBodyMonth",function(){var e=et,c=tt,u=rt,t=q.props,l=t.size,f=t.disabledBefore,p=t.disabledAfter,t=q.state,d=t.yearNav,h=t.year,y=t.currYear,m=t.currMonth,t=Math.ceil(e/c);return Array.from({length:t},function(e,s){return de.createElement("div",{key:s,className:"Calendar-valueRow"},Array.from({length:c},function(e,t){function n(){return y===d&&m===r}var r=c*s+t,o=G(f,"more",d,r)||G(p,"less",d,r),i=!o&&h===d&&r===q.state.month,a=ve((he(a={"Calendar-value":!0,"Calendar-value--active":i,"Calendar-value--disabled":o,"Calendar-monthValue":!0},"Calendar-monthValue--".concat(l),l),he(a,"Calendar-value--currDateMonthYear",n()),a)),i=ve({inverse:!i&&!n()&&!o,white:i,"primary-lighter":n()&&o,primary:n(),"inverse-lightest":o});return de.createElement("div",{key:"".concat(s,"-").concat(t),"data-test":"DesignSystem-Calendar--monthValue",className:a,onClick:q.selectMonth(r),onMouseOver:q.monthMouseOverHandler.bind(V(q),r,n(),o)},de.createElement(Se,{size:"small"===l?"small":"regular",color:i,className:"Calendar-text"},u[r]))}))})}),he(V(q),"onDateRowMouseLeaveHandler",function(){q.props.rangePicker&&q.setState({hoverDate:void 0})}),he(V(q),"renderBodyDate",function(e){var o=nt,i=ot,t=q.props,a=t.size,s=t.firstDayOfWeek,c="large"===a?"regular":"small";return de.createElement(de.Fragment,null,de.createElement("div",{className:"Calendar-dayValues"},Array.from({length:7},function(e,t){var n=ve({"Calendar-valueWrapper":!0}),r=(t+o+le(s))%o;return de.createElement(Se,{key:t,className:n,appearance:"default",weight:"strong",size:c},i[a][r])})),de.createElement("div",{className:"Calendar-dateValues",onMouseLeave:q.onDateRowMouseLeaveHandler},q.renderDateValues(e)))}),he(V(q),"renderDateValues",function(v){function b(e){return function(){(!O||j&&T||!U)&&q.selectDate(v,e,B,K)}}function w(t){return function(){var e;O&&(e=q.getDateValue(z,F,t),j&&T||q.setState({hoverDate:e}))}}function S(e,t,n,r){var e=q.calculateDate(v,e,B,K,!0)||new Date,o=rt,i=ot.large[e.getDay()],t={value:e.getDate(),isToday:t,isDisabled:n,todayDate:q.state.currDate,fullDate:e,date:e.getDate(),month:o[e.getMonth()],year:e.getFullYear(),dayName:i};a&&a(t,r)}var _=nt,E=et,e=q.props,C=e.size,O=e.rangePicker,t=e.firstDayOfWeek,x=e.disabledBefore,k=e.disabledAfter,D=e.monthsInView,a=e.onDateHover,e=q.state,j=e.startDate,T=e.endDate,I=e.hoverDate,M=e.year,N=e.month,P=e.date,A=e.currMonth,R=e.currYear,L=e.todayDate,e=q.getNavDateInfo(v),z=e.year,F=e.month,B=fe(z,F-1),K=fe(z,F),e=new Date(z,F).getDay()-le(t),H=Math.abs(e),t=Math.ceil((K+H)/_),U=(6===t||1<D||(t+=1),q.getInRangeError()),W=q.props.events;return Array.from({length:t},function(e,g){return de.createElement("div",{key:g,className:"Calendar-valueRow"},Array.from({length:_},function(e,t){function n(){var e=r<=0?R===z&&A===F-1&&L===B+r:K<r?R===z&&A===F+1&&L===r-K:R===z&&A===F&&L===r;return e}var r=_*g+t-H+1,o=r<=0||K<r,i=G(x,"more",z,F,r)||G(k,"less",z,F,r),a=!i&&M===z&&N===F&&P===r,s=!1,c=!1,u=!1,l=!1,f=(O&&(s=G(j,"equal",z,F,r),c=G(T,"equal",z,F,r),l=G(I,"equal",z,F,r),a=!i&&(s||c),j&&T?u=!i&&(G(j,"less",z,F,r)||s)&&(G(T,"more",z,F,r)||c):j?u=!i&&(G(I,"more",z,F,r)||l)&&G(j,"less",z,F,r):T&&(u=!i&&(G(I,"less",z,F,r)||l)&&G(T,"more",z,F,r))),Y(j)),p=f.year,d=f.month,f=f.date,h=Y(T),y=h.year,m=h.month,h=h.date,s=s||T&&l&&G(I,"less",y,m,h),y=c||j&&l&&G(I,"more",p,d,f),m=u&&U,h="".concat(r<=0?B+r:K<r?r-K:r),c="".concat(r<=0?0===F?F+E:(F-1)%E+1:K<r?(F+1)%E+1:F+1),l="".concat(r<=0&&F+1===1?z-1:K<r&&F+1===12?z+1:z),p="".concat(2===c.length?c:"0".concat(c),"/").concat(2===h.length?h:"0".concat(h),"/").concat(l),d=W&&"object"===$(W)&&W.hasOwnProperty(p),f=ve({"Calendar-valueWrapper":!0,"Calendar-valueWrapper--inRange":u||O&&a,"Calendar-valueWrapper--inRangeError":m,"Calendar-valueWrapper--start":s&&!y,"Calendar-valueWrapper--end":y&&!s,"Calendar-valueWrapper--startEnd":s&&y,"Calendar-valueWrapper--startError":s&&m,"Calendar-valueWrapper--endError":y&&m,"Calendar-valueWrapper--dummy":o}),h=ve((he(c={"Calendar-value":!0,"Calendar-inRangeValue":!s&&!y,"Calendar-value--start":s&&!y,"Calendar-value--end":y&&!s,"Calendar-value--startError":s&&m,"Calendar-value--endError":y&&m,"Calendar-value--active":a,"Calendar-value--disabled":i,"Calendar-dateValue":!0},"Calendar-dateValue--".concat(C),C),he(c,"Calendar-value--currDateMonthYear",n()),c)),l=ve({inverse:!a&&!n()&&!i,white:a,"primary-lighter":n()&&i,primary:n(),"inverse-lightest":i});return de.createElement("div",{key:"".concat(g,"-").concat(t),className:f,"data-test":"designSystem-Calendar-WrapperClass"},!o&&de.createElement(de.Fragment,null,de.createElement(Se,{color:l,size:"small"===C?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:h,onClick:b(r),onMouseOver:w(r),onMouseEnter:S.bind(V(q),r,n(),i)},r),d&&q.renderEventsIndicator(C,a)),(o&&0<r&&v===D-1||o&&r<=0&&0===v)&&de.createElement(de.Fragment,null,de.createElement(Se,{appearance:a?"white":i?"disabled":n()?"link":"default",size:"small"===C?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:h,onClick:b(r),onMouseOver:w(r),onMouseEnter:S.bind(V(q),r,n(),i)},r<=0?B+r:r-K),d&&q.renderEventsIndicator(C,a)))}))})}),he(V(q),"renderCalendar",function(e){var t=q.props,n=t.size,t=t.monthsInView,r=q.state.view,o=ve((he(o={},"Calendar",!0),he(o,"Calendar-".concat(r,"--").concat(n),r),he(o,"Calendar--".concat(n),n),o)),n=ve(he({},"Calendar-header--".concat(n),n)),i=ve({"Calendar-body":!0});return de.createElement("div",{key:e,"data-test":"DesignSystem-Calendar",className:o},de.createElement("div",{className:n},0===e&&q.renderJumpButton("prev"),q.renderHeaderContent(e),e===t-1&&q.renderJumpButton("next")),de.createElement("div",{className:i},"year"===r&&q.renderBodyYear(),"month"===r&&q.renderBodyMonth(),"date"===r&&q.renderBodyDate(e)))});var q,t=q.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(Date.now()));return q.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:at(a)},q}return a(p,[{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a,s=this.props.monthsInView;e.date!==this.props.date&&(i=(n=Y(this.props.date)).year,o=n.month,n=n.date,this.updateState(i,o,n),i=y(this.props.date),this.setState({currDate:i})),e.startDate!==this.props.startDate&&(o=y(this.props.startDate),this.setState({startDate:o})),e.endDate!==this.props.endDate&&(n=y(this.props.endDate),this.setState({endDate:n})),e.view!==this.props.view&&1===this.props.monthsInView&&this.setState({view:this.props.view}),e.yearNav!==this.props.yearNav&&(i=this.props.yearNav)&&this.setState({yearNav:i,yearBlockNav:at(i)}),e.monthNav!==this.props.monthNav&&(o=this.props.monthNav)&&this.setState({monthNav:o}),t.currDate!==this.state.currDate&&(i=(n=this.props).rangePicker,e=n.onDateChange,n=(o=this.state).currDate,r=o.startDate,o=o.endDate,n)&&(e&&e(n),i?(this.setState({hoverDate:void 0}),r&&o?this.setState({startDate:n,endDate:void 0}):(i=(e=Y(n)).year,a=e.month,e=e.date,r?G(r,"more",i,a,e)?this.setState({startDate:n}):this.setState({endDate:n}):o&&G(o,"less",i,a,e)?this.setState({endDate:n}):this.setState({startDate:n}))):this.setState({startDate:n})),(null==(r=t.startDate)?void 0:r.getTime())===(null==(o=this.state.startDate)?void 0:o.getTime())&&(null==(i=t.endDate)?void 0:i.getTime())===(null==(a=this.state.endDate)?void 0:a.getTime())||(e=this.props.onRangeChange,r=(n=this.state).startDate,o=n.endDate,e&&e(r,o)),t.year!==this.state.year&&void 0!==(i=this.state.year)&&1===s&&this.setState({year:i,yearBlockNav:at(i),yearNav:i}),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=ve((he(n={"Calendar-eventsIndicator":!0},"Calendar-eventsIndicator--".concat(e),!0),he(n,"Calendar-eventsIndicator--active",t),n));return de.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=be(this.props),e=ve({"Calendar-wrapper":!0},e);return de.createElement("div",ye({},r,{className:e,"data-test":"DesignSystem-Calendar-Wrapper"}),Array.from({length:t},function(e,t){return n.renderCalendar(t)}))}}]),p}(),ct=(he(st,"defaultProps",{size:"large",monthsInView:1,view:"date",firstDayOfWeek:"sunday",jumpView:!0}),["shadow","children","className"]),n=de.forwardRef(function(e,t){var n,r=e.shadow,r=void 0===r?"shadow10":r,o=e.children,i=e.className,e=q(e,ct),r=ve((he(n={Card:!0},"Card--".concat(r),r),he(n,"".concat(i),i),n));return de.createElement("div",ye({"data-test":"DesignSystem-Card",ref:t},e,{className:r}),o)}),ut=(n.displayName="Card",n.defaultProps={shadow:"shadow10"},["border","children","className"]),lt=(de.forwardRef(function(e,t){var n=e.border,r=e.children,o=e.className,e=q(e,ut),n=ve(he({CardSubdued:!0},"CardSubdued--".concat(n),n),o);return de.createElement("div",ye({"data-test":"DesignSystem-CardSubdued",ref:t},e,{className:n}),r)}).displayName="CardSubdued",["onClick","onKeyDown","role"]),ft={button:new Set(["Enter","Space","Spacebar"," "]),link:new Set(["Enter"]),checkbox:new Set([]),radio:new Set([])},pt=function(e,t){return!!ft[e]&&ft[e].has(t)},N=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=Ee(e),u=be(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=ve((he(n={},"material-icons",!0),he(n,"material-icons-".concat(t(e)),e&&"filled"!==e),he(n,"Icon",!0),he(n,"Icon--".concat(l),r),he(n,"".concat(o),o),n)),a={fontSize:"".concat(a,"px"),width:"".concat(a,"px")};return s&&de.isValidElement(s)?de.createElement("span",ye({},u,{className:o}),s):de.createElement("i",ye({},u,{className:r,style:a},c),e?"".concat(i,"_").concat(e):i)},dt=(N.displayName="Icon",N.defaultProps={size:16,type:"round"},["children","componentType","className"]),ht=["appearance","size","children","weight","small","className","color"],Se=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.weight,a=e.small,s=e.className,c=e.color,e=q(e,ht),n=ve((he(t={Text:!0},"Text--".concat(n),!c&&n),he(t,"Text--".concat(i),i),he(t,"Text--".concat(r),r),he(t,"color-".concat(c),c),he(t,"Text--small","small"===r||a),t),s);return de.createElement(Ce,ye({"data-test":"DesignSystem-Text"},e,{className:n,componentType:"span"}),o)},yt=(Se.displayName="Text",Se.defaultProps={appearance:"default",size:"regular"},Oe.displayName="GenericChip",function(e){var t,n=e.label,r=e.icon,o=e.clearButton,i=e.type,a=e.disabled,s=e.selected,c=e.onClose,u=e.onClick,l=e.name,f=e.className,e=be(e),o="action"!==i&&o,p=!("selection"!==i||!s),i=ve((he(t={Chip:!0},"Chip-".concat(i,"--disabled"),a),he(t,"Chip--".concat(i),i&&!a),he(t,"Chip-".concat(i,"--selected"),s&&!a),he(t,"Chip-selection--selectedDisabled","selection"===i&&s&&a),he(t,"Chip-icon--clear",o),t),f);return de.createElement(Oe,ye({"data-test":"DesignSystem-Chip--GenericChip"},e,{label:n,selected:p,icon:r,clearButton:o,disabled:a,className:i,onClose:function(){!a&&c&&c(l)},onClick:function(){!a&&u&&u(l)},name:l}))}),mt=(yt.displayName="Chip",yt.defaultProps={type:"input"},["size","tabIndex","defaultChecked","indeterminate","label","error","disabled","onChange","name","value","className","checked","helpText","id"]),gt=de.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.error,c=e.disabled,u=e.onChange,l=e.name,f=e.value,p=e.className,d=e.checked,h=e.helpText,y=e.id,y=void 0===y?"".concat(l,"-").concat(a,"-").concat(xe()):y,m=q(e,mt),g=de.useRef(null);de.useImperativeHandle(t,function(){return g.current});var t=me(de.useState(void 0===d?o:d),2),v=t[0],b=t[1],t=(de.useEffect(function(){S(i)},[i]),de.useEffect(function(){void 0!==d&&b(d)},[d]),ve((he(t={},"Checkbox",!0),he(t,"Checkbox--disabled",c),t),p)),p=ve((he(p={},"Checkbox-outerWrapper",!0),he(p,"Checkbox-outerWrapper--".concat(n),n),p)),e=ve((he(w={},"Checkbox-input",!0),he(w,"Checkbox-input--checked",v),he(w,"Checkbox-input--indeterminate",e.indeterminate),w)),s=ve((he(w={},"Checkbox-wrapper",!0),he(w,"Checkbox-wrapper--default",!s),he(w,"Checkbox-wrapper--error",s),w)),w=ve((he(w={},"Checkbox-label",!0),he(w,"Checkbox-label--tiny","tiny"===n),w)),S=function(e){g.current.indeterminate=e},_=ve((he(_={},"checked--regular",v&&"regular"===n),he(_,"checked--tiny",v&&"tiny"===n),he(_,"indeterminate--regular",i&&"regular"===n),he(_,"indeterminate--tiny",i&&"tiny"===n),_));return de.createElement(de.Fragment,null,de.createElement("div",{"data-test":"DesignSystem-Checkbox",className:t},de.createElement("div",{"data-test":"DesignSystem-Checkbox-OuterWrapper",className:p},de.createElement("input",ye({},m,{type:"checkbox",defaultChecked:o,onChange:function(e){void 0===d&&(b(e.target.checked),S(e.target.indeterminate)),u&&u(e)},checked:v,disabled:c,ref:g,name:l,value:f,className:e,tabIndex:r,id:y,"data-test":"DesignSystem-Checkbox-InputBox"})),de.createElement("span",{className:s,"data-test":"DesignSystem-Checkbox-Icon"},_&&de.createElement(ke,{name:_}))),de.createElement("div",{className:"Checkbox-labelWrapper"},a&&a.trim()&&de.createElement("label",{htmlFor:y,className:w,"data-test":"DesignSystem-Checkbox-Label"},de.createElement(Se,{size:"tiny"===n?"small":"regular",appearance:c?"disabled":"default"},a.trim())),h&&de.createElement(Se,{"data-test":"DesignSystem-Checkbox-HelpText",size:"small",appearance:c?"disabled":"subtle"},h.trim()))))}),vt=(gt.displayName="Checkbox",["size","sizeXS","sizeS","sizeM","sizeL","sizeXL","className","children"]),x=de.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=q(e,vt),r=ve((he(n={},"Col",!0),he(n,"Col--".concat(r),r),he(n,"Col--xs-".concat(o),o),he(n,"Col--s-".concat(i),i),he(n,"Col--m-".concat(a),a),he(n,"Col--l-".concat(s),s),he(n,"Col--xl-".concat(c),c),he(n,"".concat(u),u),n));return de.createElement("div",ye({ref:t,"data-test":"DesignSystem-Column"},e,{className:r}),l)}),bt=(x.displayName="Column",["date","open","position","inputFormat","outputFormat","inputOptions","validators","withInput","disabledBefore","disabledAfter","onDateChange","closeOnSelect","size","showTodayDate","children"]),n=function(){e(o,de["Component"]);var r=h(o);function o(e){d(this,o),he(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))}),he(V(s),"onDateChangeHandler",function(e){s.setState({init:!0,date:e}),s.props.closeOnSelect&&s.setState({open:!1})}),he(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=y(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=y(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,O(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?de.createElement(de.Fragment,null):c,t=q(t,bt),u=this.state.date,l=rt,f=new Date(Date.now()),l="".concat(l[f.getMonth()]," ").concat(f.getDate()),f=y(u,n,r),u=y(o,n,r),o=y(i,n,r);return de.createElement("div",null,de.createElement("div",{className:"d-flex"},c,de.createElement(st,ye({},t,{size:a,date:f,disabledBefore:u,disabledAfter:o,onDateChange:this.onDateChangeHandler}))),s&&de.createElement("div",{className:"d-flex justify-content-center pb-6","data-test":"DesignSystem-Select--TodaysDate-wrapper"},de.createElement(yt,{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?de.createElement(ha,{trigger:de.createElement(De,{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}(),wt=(he(n,"defaultProps",W(W({},st.defaultProps),{},{position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[P],inputOptions:{},closeOnSelect:!0})),function(e){return e.includes("a")||e.includes("A")}),St=function(e){return e.includes("p")||e.includes("P")},_t=function(e){return("0"+e).slice(-2)},Et=function(e){var t,n,r;return wt(r=e)||St(r)?(r=me((r=e).split(" "),2),t=r[0],r=r[1],t=t.split(":"),n=t[0],t=t[1],"12"===n&&wt(r)&&(n="00"),St(r)&&"12"!==n&&(n=(parseInt(n,10)+12).toString()),"".concat(n,":").concat(t)):e},Ct=function(e,t){e=je(e);return je(t)<e},Ot=function(e,t,n){var r,o,i,a;return""===t||Ct(e,t)?(r=e,o=t,i=Me("00:00","23:59",i=n),r=i.indexOf(r),a=i.indexOf(o),o=""===o?r:a+1,a=i.slice(r),r=i.slice(0,o),a.concat(r)):Me(e,t,n)},xt=function(e,s){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"TimePicker-Option-key",u=3<arguments.length?arguments[3]:void 0,l=4<arguments.length?arguments[4]:void 0,f=5<arguments.length?arguments[5]:void 0;return e.map(function(e,t){return{label:(o=u,i=l,a=n=e,Te(r=s)&&(a=Ie(n)),o&&i&&(o=(r=Ne(i,n)).hour,i=r.minute,a+=" (".concat(o," hr ").concat(i," min)")),a),value:e,disabled:f&&(n=f,o=r=e,Te(s)&&(o=Ie(r)),!!n.includes(o)),selected:!1,optionID:c+t};var n,r,o,i,a})},kt=function(e){return e?"":"23:59"},Dt=function(){var e=new Date;return _t(e.getHours())+":"+_t(e.getMinutes())},jt=/[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~]/,Tt=function(e,t){for(var n=0,r={hour:100,mins:100},o=0;o<e.length;o++){var i=Ne(t,e[o]),a=i.hour,i=i.minute;(a<r.hour||a===r.hour&&i<r.mins)&&(r.hour=a,r.mins=i,n=o)}return n},It=function(e){return e.map(function(e){return e.value})},Mt=function(e,t){var n;return function(e){e=(null==(e=(e=e).match(/\d/g))?void 0:e.length)||0;return 0<e&&e<5}(t)?(t=Be(e=e,t=t),n=t.hour,"60"===(t=t.min)&&(t="00",n=(parseInt(n,10)+1).toString()),n="".concat(n,":").concat(t),Tt(e,n)):-1},Nt=function(e){return e.sort(function(e,t){return e.value>t.value?1:t.value>e.value?-1:0})},Pt=function(e,t){e.scrollTo(0,t)};Ze.defaultProps={timeFormat:"12-Hour",interval:15},Ze.displayName="TimePickerWithSearch",Je.defaultProps={inputFormat:"hh:mm AM",outputFormat:"hh:mm AM",inputOptions:{},validators:[A]},Je.displayName="TimePickerWithInput";function At(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 Rt(e,t,n){return void 0===n?At(e,t,!1):At(e,n,!1!==t)}W(W({},Je.defaultProps),Ze.defaultProps);function Lt(e){function t(){d||i&&i(c)}var n=e.optionData,r=e.selected,o=e.onClick,i=e.updateActiveOption,a=e.onChange,s=e.active,c=e.index,u=e.checkboxes,l=e.menu,f=void 0===(f=e.id)?"":f,p=(n.optionType?n:e).optionType,d=n.disabled,h=d?"inverse-lightest":r&&!l?"primary-dark":"inverse",y=d?"disabled":r&&!l?"primary_dark":"default",m=$t[p=u?"WITH_CHECKBOX":void 0===p?"DEFAULT":p],g=ve((he(g={},"Option",!0),he(g,"Option--active",s),he(g,"Option--selected",r&&!l),he(g,"Option--disabled",d),he(g,"OptionWrapper",!0),he(g,"color-".concat(h),!0),g)),v=ve((he(v={},"Option-checkbox",!0),he(v,"Option-checkbox--active",s),he(v,"OptionWrapper",!0),v)),b=ve((he(b={},"Option-text",!0),he(b,"Option-text--wrap",!e.truncateOption),b)),w=ve((he(w={},"OptionWrapper",!0),he(w,"OptionWrapper--disabled",d),w));return e.optionRenderer?de.createElement("div",ye({"data-test":"DesignSystem-DropdownOption--Custom",className:w,"data-disabled":d,onMouseEnter:t},!u&&{onClick:o}),e.optionRenderer({optionData:n,selected:r,onChange:a,active:s,index:c})):m({selected:r,index:c,renderSubInfo:function(e){var t,n=r?"white":"disabled";return"string"==typeof e?de.createElement(Se,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",color:d?"inverse-lightest":r&&!l?"primary-dark":"inverse-lighter",size:"small",weight:"medium",className:"Option-subInfo"},e):(t=e.list,e=e.seperator,de.createElement(yn,{list:void 0===t?[]:t,seperator:e,iconAppearance:n,labelAppearance:d?"disabled":r&&!l?"white":"subtle",seperatorAppearance:n,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"}))},optionData:n,textClassName:b,appearance:y,color:h,onClickHandler:function(e){e.stopPropagation(),d||o&&o()},onChangeHandler:function(e){e.stopPropagation(),d||a&&a(e)},onUpdateActiveOption:t,dataTest:"DesignSystem-DropdownOption--".concat(p),className:u?v:g,id:f})}function zt(e){var t,n=void 0===(n=e.size)?"small":n,r=e.round,o=e.className,e=be(e),r=ve((he(t={PlaceholderImage:!0,"Placeholder--animation":!0},"PlaceholderImage--round",r),he(t,"PlaceholderImage--".concat(n),n),t),o);return de.createElement("span",ye({},e,{className:r}))}function Ft(e){var t=e.loadingType,n=["medium","large"][(e.optionIndex+2)%2];switch(t){case"DEFAULT":return de.createElement(I,{length:n,"data-test":"DesignSystem-Dropdown--PlaceholderParagraph"});case"WITH_ICON":return de.createElement(M,{withImage:!0,round:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},de.createElement(I,{length:"large"}));case"WITH_META":return de.createElement(M,{withImage:!1,"data-test":"DesignSystem-Dropdown--Placeholder"},de.createElement(I,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),de.createElement(I,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}));case"WITH_CHECKBOX":return de.createElement(M,{withImage:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},de.createElement(I,{length:"large"}));case"ICON_WITH_META":return de.createElement(M,{withImage:!0,round:!0,imageSize:"medium","data-test":"DesignSystem-Dropdown--Placeholder"},de.createElement(I,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),de.createElement(I,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}))}return null}function Bt(i){function R(){var e=document.querySelector(".Dropdown-wrapper");(e=null==e?void 0:e.offsetHeight)&&ie(e)}function o(e,t){X(e,t),ae||null!=(e=x.current)&&e.focus(),T(g)}function L(){var e;J(),null!=(e=x.current)&&e.focus()}function z(){var e;Z(),null!=(e=x.current)&&e.focus()}function F(){T(g),E&&w&&E("")}function B(e){T(g),E&&E(e.target.value)}function a(e,t){var n=i.onClearOptions,r=h.every(function(e){return e.disabled});return de.createElement("div",{className:le(t)},de.createElement(Se,{size:"small",appearance:"subtle"},e),t&&de.createElement(we,{onClick:n,disabled:r,appearance:"transparent",size:"tiny",type:"button"},"Clear"))}function K(t,e){var n=Ge(w,m,f,_)?e+1===j:e===j,r=-1!==y.findIndex(function(e){return e.value===t.value}),o="Checkbox-option-".concat(e,"-").concat(t.value,"-").concat((new Date).getTime());return de.createElement("label",{htmlFor:o},de.createElement(Lt,{optionData:t,truncateOption:q,selected:r,index:e,updateActiveOption:pe,optionRenderer:$,active:n,checkboxes:_,menu:b,onClick:function(){return fe(t)},onChange:function(e){return i.onSelect(t,e.target.checked)},optionType:i.optionType,id:o}))}function H(e,t){for(var n,r,o,i,a,s=document.querySelectorAll(t),c="down"===e?j+1:j-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?Pt(n,r.offsetTop-o.height+a):i.top<o.top&&n&&Pt(n,r.offsetTop-a)),void 0!==l&&T(c);break}"down"===e?c++:c--}}var U,e,s,c,u=void 0===(t=i.listOptions)?[]:t,W=i.inputRef,t=void 0===(t=i.align)?"right":t,n=void 0===(n=i.optionType)?"DEFAULT":n,r=void 0===(r=i.applyButtonLabel)?"Apply":r,l=void 0===(l=i.cancelButtonLabel)?"Cancel":l,q=void 0===(p=i.truncateOption)||p,f=void 0===(p=i.withSelectAll)||p,p=void 0===(p=i.maxHeight)?200:p,d=i.customTrigger,h=i.selected,y=i.tempSelected,V=i.previousSelected,m=i.remainingOptions,g=i.firstEnabledOption,v=i.dropdownOpen,b=i.menu,w=i.searchTerm,S=i.showApplyButton,_=i.withCheckbox,G=i.withSearch,Y=i.popoverOptions,E=i.onSearchChange,$=i.optionRenderer,Z=i.applyOptions,J=i.cancelOptions,X=i.toggleDropdown,C=i.className,O=void 0===(O=i.searchPlaceholder)?"Search..":O,Q=i.scrollIndex,ee=be(i),te=de.createRef(),ne=de.createRef(),x=de.createRef(),k=de.createRef(),D=de.createRef(),re=(M=me(de.useState(),2))[0],oe=M[1],j=(M=me(de.useState(g),2))[0],T=M[1],I=(M=me(de.useState(),2))[0],ie=M[1];de.useEffect(function(){var e,t,n,r,o;return v&&(o=i.width,t=i.minWidth,n=i.maxWidth,r=null==(r=ne.current)?void 0:r.clientWidth,o={width:o||r,minWidth:t||(S?176:b?128:r),maxWidth:n||"100%"},requestAnimationFrame(R),oe(o),Q)&&0===y.length&&(e=setTimeout(function(){$e(Q,u)},100)),function(){clearTimeout(e)}},[v]),de.useEffect(function(){g!==j&&T(g)},[g]);var M=void 0===(M=i.triggerSize)?"regular":M,N=void 0===(N=i.placeholder)?"Select":N,P=i.icon,A=i.error,ae=i.disabled,se=i.inlineLabel,ce=i.triggerLabel,ue=d?d(ce||N):de.createElement(de.Fragment,null),d=d?de.cloneElement(ue,{tabIndex:0,ref:x}):de.createElement(Yt,{placeholder:N,triggerSize:M,open:v,icon:P,disabled:ae,inlineLabel:se,menu:b,error:A,ref:x},ce),ue={maxHeight:p,overflowY:"auto",overflowX:"hidden",minHeight:I},N={maxHeight:I||p,overflowY:"auto",overflowX:"hidden",minHeight:I},le=function(e){var t;return ve((he(t={},"Dropdown-section",!0),he(t,"Dropdown-section--withClear",e),t))},M=ve(he({},"Dropdown",!0),C),se=ve((he(P={},"Dropdown-wrapper",!0),he(P,"Dropdown-wrapper--wrap",!q),P)),ce=ve((he(A={},"Option-checkbox--active",0===j),he(A,"Option-checkboxWrapper",!0),he(A,"Option-checkbox",!0),he(A,"OptionWrapper",!0),A)),fe=function(e){i.onOptionSelect(e),null!=(e=x.current)&&e.focus()},pe=function(e,t){t=_&&f&&!i.async&&!t?e+1:e;T(t)};return de.createElement("div",ye({},ee,{className:M,ref:ne,onKeyDown:function(e){var t,n=".OptionWrapper";switch(e.key){case"ArrowDown":e.preventDefault(),v?H("down",n):o(!v);break;case"ArrowUp":e.preventDefault(),v?H("up",n):o(!v);break;case"Enter":var r=document.activeElement;v&&(W.current===r||x.current===r)&&(e.preventDefault(),r=_?"".concat(n," .Checkbox-input"):n,r=document.querySelectorAll(r)[j])&&r.click(),v||o(!v);break;case"Tab":!S&&v?(e.preventDefault(),o(!1,"onClick")):(r=document.activeElement,t=null==(t=D.current)?void 0:t.disabled,(r===k.current&&t||r===D.current)&&v?(e.preventDefault(),o(!1,"onClick")):S&&v&&(e.preventDefault(),r===k.current?null!=(t=D.current)&&t.focus():null!=(r=k.current)&&r.focus()))}}}),de.createElement(ha,ye({onToggle:o,trigger:d,triggerClass:b?"":"w-100",open:v,customStyle:re,position:Zt[t]},Y,{"data-test":"DesignSystem-Dropdown--Popover"}),(G||i.async)&&de.createElement("div",{className:"Dropdown-inputWrapper"},de.createElement(an,{name:"Dropdown-search",icon:"search",value:w,placeholder:O,autoFocus:!0,onChange:B,onClear:F,ref:W,autoComplete:"off",className:"Dropdown-input"})),(p=i.selectedSectionLabel,s=void 0===p?"Selected Items":p,p=void 0===(p=i.allItemsSectionLabel)?"All Items":p,I=void 0===(I=i.loadersCount)?10:I,C=i.loadingOptions,P=Ge(w,m,f,_),c=function(e){e=e.reduce(function(e,t){var n=t.group||"";return e[n]||(e[n]=[]),e[n].push(t),e},{});return Object.values(e).flatMap(ge)}(u),I&&C?de.createElement("div",{className:"Dropdown-loading"},de.createElement("div",{className:"Dropdown-wrapper",style:N},(e=I,e=Array(I).fill("Loading"),U=_?"WITH_CHECKBOX":n,e.map(function(e,t){return de.createElement("div",{className:"Option-loading",key:"".concat(e,"-").concat(t)},de.createElement(Ft,{loadingType:U,optionIndex:t}))})))):0===u.length&&!C&&h.length<=0?(I=i.noResultMessage,de.createElement("div",{className:"Dropdown-wrapper",style:ue,"data-test":"DesignSystem-Dropdown--errorWrapper"},de.createElement("div",{className:"Option"},de.createElement("div",{className:"Option-subinfo"},void 0===I?"No result found":I)))):de.createElement("div",{className:se,style:ue,ref:te},P&&(e=void 0===(e=i.selectAllLabel)?"Select All":e,C=i.selectAll,I=i.onSelectAll,e=e.trim()?e.trim():"Select All",P="Checkbox-option-".concat(e.toLowerCase().replace(/\s+/g,""),"-").concat((new Date).getTime()),de.createElement("div",{className:ce,onMouseEnter:function(){return pe(0,!0)}},de.createElement("label",{htmlFor:P,className:"Checkbox-label"},de.createElement(gt,{label:e,onChange:I,checked:C.checked,indeterminate:C.indeterminate,tabIndex:-1,className:"OptionCheckbox",id:P})))),0<h.length&&a(s,!0),h.map(K),0<h.length&&0<u.length-h.length&&!(null!=(I=u[0].group)&&I.trim())&&a(p),c.map(function(e,t){var n=0<t?c[t-1].group:h.length?s:void 0,r=e.group,o=t+h.length;return de.createElement("div",{className:"Option-checkboxWrapper",key:t},n!==r&&r&&a(r),K(e,o))}),i.async&&0<m&&(C=i.footerLabel,de.createElement("div",{className:"Dropdown-footer"},de.createElement(Se,{size:"small",appearance:"subtle"},void 0===C?"Search for more options":C))))),S&&_&&(A=Ue(V,y)||i.loadingOptions,de.createElement("div",{className:"Dropdown-buttonWrapper"},de.createElement(we,{ref:k,className:"mr-4",appearance:"basic",onClick:L,disabled:i.loadingOptions,size:"tiny",tabIndex:-1,"data-test":"DesignSystem-Dropdown-CancelButton",type:"button"},l),de.createElement(we,{ref:D,appearance:"primary",disabled:A,size:"tiny",onClick:z,"data-test":"DesignSystem-Dropdown-ApplyButton",type:"button"},r)))))}function Kt(e){var t=e.className,n=e.name,r=e.size,o=e.children,i=e.type,a=Ee(e),e=be(e),t=ve((he(s={},"material-icons",!0),he(s,"material-icons-".concat(i),i&&"filled"!==i),he(s,"ActionButton",!0),he(s,"".concat(t),t),s)),s={fontSize:"".concat(r,"px"),width:"".concat(r,"px")};return o&&de.isValidElement(o)?de.createElement("span",ye({},e,{className:t,"data-test":"DesignSystem-Input-ActionButton"}),o):de.createElement("i",ye({},e,{className:t,style:s},a,{"data-test":"DesignSystem-Input-ActionButton"}),"".concat(n,"_").concat(i))}function Ht(e,t){for(var n="",r=0;r<e.length;r++)n+="object"===$(e[r])?t:e[r];return n}function Ut(e){var t=e.required,n=e.optional,r=e.withInput,o=e.disabled,i=e.children,a=e.className,s=e.info,c=q(e,pn),e=be(e),r=ve((he(u={Label:!0},"Label--withInput",r),he(u,"Label--optional",n),u),a),u=ve({"Label-text":!0,"Label--disabled":o});return de.createElement("div",ye({"data-test":"DesignSystem-Label"},e,{className:r}),de.createElement(Ce,ye({"data-test":"DesignSystem-Label--Text",className:u,componentType:"label"},c),i),function(){return 0<arguments.length&&void 0!==arguments[0]&&arguments[0]?de.createElement("span",{className:"Label-requiredIndicator","data-test":"DesignSystem-Label--RequiredIndicator"}):(1<arguments.length?arguments[1]:void 0)?de.createElement(Se,{"data-test":"DesignSystem-Label--OptionalText",appearance:"subtle",className:"Label-optionalText"},"(optional)"):null}(t,n),s&&de.createElement(ga,{tooltip:s},de.createElement(N,{"data-test":"DesignSystem-Label--Info",name:"info",size:12,appearance:"subtle",className:"ml-3 cursor-pointer d-flex align-items-center"})))}function Wt(e){var t=e.label,n=e.icon,e=e.size;return de.createElement("span",{"data-test":"DesignSystem-MetaList--Meta",className:"Meta"},n&&de.createElement(N,{"data-test":"DesignSystem-MetaList--MetaIcon",name:n,appearance:"subtle",className:"Meta-icon",size:"regular"===e?16:12}),de.createElement(Se,{size:e,"data-test":"DesignSystem-MetaList--MetaLabel",appearance:"subtle"},t))}function qt(e){return"".concat((100*e).toFixed(2),"%")}function Vt(e,t,n){return null==e?e:Math.min(Math.max(e,t),n)}var Gt=["triggerSize","placeholder","menu","children","icon","disabled","open","inlineLabel","error"],Yt=de.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=q(e,Gt),p=c?"disabled":"default",o=o.trim(),o=a||o,d=i?s||"more_horiz":"keyboard_arrow_down",r=ve((he(n={},"Button",!0),he(n,"DropdownButton",!0),he(n,"DropdownButton--".concat(r),r),he(n,"DropdownButton--".concat(r,"Square"),i),he(n,"DropdownButton--placeholder",!a&&!i),he(n,"DropdownButton--icon",s),he(n,"DropdownButton--open",u),he(n,"DropdownButton--error",f),n)),f=ve((he(u={},"Text",!0),he(u,"Text--regular",!0),he(u,"DropdownButton-text",!0),u));return de.createElement("button",ye({ref:t,type:"button",value:a,className:r,disabled:c,tabIndex:0,"data-test":"DesignSystem-DropdownTrigger"},e),!i&&de.createElement("div",{className:"DropdownButton-wrapper"},l&&de.createElement(Se,{appearance:"subtle",className:"mr-4 white-space-nowrap"},"".concat(l.trim().charAt(0).toUpperCase()).concat(l.trim().slice(1))),s&&!l&&de.createElement(N,{appearance:p,className:"d-flex align-items-center mr-4",name:s}),o&&de.createElement("span",{className:f},o)),de.createElement(N,{appearance:p,name:d}))}),$t=(Yt.displayName="DropdownButton",he(n={},"DEFAULT",function(e){var t=e.className,n=e.textClassName,r=e.onClickHandler,o=e.optionData,i=e.color,a=e.onUpdateActiveOption,e=e.dataTest,s=o.label,c=o.disabled;return de.createElement("div",{className:t,onClick:r,onMouseEnter:a,"data-test":e,"data-disabled":c},de.createElement("div",{className:"Option-label"},de.createElement(Se,{className:n,color:i,id:o.optionID},s)))}),he(n,"WITH_ICON",function(e){var t,n=e.className,r=e.textClassName,o=e.onClickHandler,i=e.optionData,a=e.onUpdateActiveOption,s=e.color,e=e.dataTest,c=i.label,u=i.icon,i=i.disabled,n=ve((he(t={},"".concat(n),!0),he(t,"Option--icon",u),t));return de.createElement("div",{className:n,onClick:o,onMouseEnter:a,"data-test":e,"data-disabled":i},u&&de.createElement(N,{className:"Option-icon mr-4","data-test":"".concat(e,"--Icon"),name:u}),de.createElement("div",{className:"Option-label"},de.createElement(Se,{className:r,color:s},c)))}),he(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.color,e=e.dataTest,c=o.subInfo,u=o.label,o=o.disabled;return de.createElement("div",{className:t,onClick:r,onMouseEnter:i,"data-test":e,"data-disabled":o},de.createElement("div",{className:"Option-label"},de.createElement(Se,{className:n,color:s},u),c&&a(c)))}),he(n,"WITH_CHECKBOX",function(e){var t=e.className,n=e.selected,r=e.optionData,o=e.onChangeHandler,i=e.onUpdateActiveOption,a=e.dataTest,e=e.id,e=void 0===e?"":e,s=r.subInfo,c=r.label,r=r.disabled;return de.createElement("div",{className:t,onMouseEnter:i,"data-test":a,"data-disabled":r},de.createElement(gt,{label:c,disabled:r,checked:n,onChange:o,tabIndex:-1,className:"OptionCheckbox ".concat(s?"pb-0":""),"data-test":"".concat(a,"--Checkbox"),id:e}),s&&de.createElement("div",{className:"pl-8 ml-3"},(t=r?"disabled":"subtle",i=n?"white":"disabled","string"==typeof(c=s)?de.createElement(Se,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",appearance:t,size:"small",weight:"medium"},c):(o=c.list,c=c.seperator,de.createElement(yn,{list:void 0===o?[]:o,seperator:c,iconAppearance:i,labelAppearance:t,seperatorAppearance:i,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})))))}),he(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,u=e.color,e=e.dataTest,l=a.subInfo,f=a.label,p=a.icon,a=a.disabled,n=ve((he(t={},"".concat(n),!0),he(t,"Option--icon",p),t));return de.createElement("div",{className:n,onClick:i,onMouseEnter:s,"data-test":e,"data-disabled":a},p&&de.createElement(N,{"data-test":"".concat(e,"--Icon"),className:"Option-icon mr-4",name:p,appearance:c}),de.createElement("div",{className:"Option-label"},de.createElement(Se,{className:r,color:u},f),l&&o(l)))}),n),I=function(e){var t,n=e.length,r=e.size,o=e.className,e=be(e),i=ve(he({"Placeholder--animation":!0,PlaceholderParagraph:!0},"PlaceholderParagraph--".concat(r),r)),n=ve((he(t={"PlaceholderParagraph-wrapper":!0},"PlaceholderParagraph-wrapper--length-".concat(n),n),he(t,"PlaceholderParagraph-wrapper--size-".concat(r),r),t),o);return de.createElement("div",ye({},e,{className:n}),de.createElement("span",{className:i}))},M=(I.displayName="PlaceholderParagraph",I.defaultProps={length:"medium"},zt.displayName="PlaceholderImage",zt.defaultProps={size:"small"},function(e){var t=e.imageSize,n=e.withImage,r=e.round,o=e.children,i=e.className,e=be(e),a=ve(he({"Placeholder-paragraph":!0},"Placeholder-paragraph--withImage",n)),i=ve(he({},"Placeholder",!0),i);return de.createElement("div",ye({"data-test":"DesignSystem-Placeholder"},e,{className:i}),n&&de.createElement(zt,{round:r,size:t,"data-test":"DesignSystem-Placeholder--Image"}),o&&de.createElement("div",{className:a,"data-test":"DesignSystem-Placeholder--Paragraph"},o))}),Zt=(M.displayName="Placeholder",M.defaultProps={withImage:!0,imageSize:"small"},{right:"bottom-start",left:"bottom-end"}),Jt=(Bt.displayName="DropdownList",["triggerOptions","selected","tabIndex"]),Xt=de.createRef(),Qt=function(){e(l,de["Component"]);var u=h(l);function l(e){d(this,l),he(V(g=u.call(this,e)),"staticLimit",void 0),he(V(g),"getDisabledOptions",function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).filter(function(e){return e.disabled})}),he(V(g),"fetchOptionsFunction",function(t){var n,e=g.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})})}),he(V(g),"getUnSelectedOptions",function(e,t){var n;return e.length?t?(t=g.props.selected,n=void 0===t?[]:t,e.filter(function(t){return We(g.props.selected)?-1===n.findIndex(function(e){return e.value===t.value}):!t.selected})):e.filter(function(t){return-1===g.state.tempSelected.findIndex(function(e){return e.value===t.value})}):e}),he(V(g),"getSelectedOptions",function(e,t){var n=g.props.selected;return e.length?t?We(g.props.selected)?void 0===n?[]:n:e.filter(function(e){return e.selected}):g.state.tempSelected:[]}),he(V(g),"updateOptions",function(s,e){var t=g.state,c=t.searchTerm,u=t.selectAll,l=t.tempSelected,f=t.previousSelected,p=void 0===e?g.state.async:e,t=g.props,e=t.fetchOptions,d=t.withCheckbox,h=t.withSearch;(e||g.fetchOptionsFunction)(c).then(function(e){var t,n,r,o,i=e.options,a=e.count;e.scrollToIndex&&setTimeout(function(){$e(e.scrollToIndex,i)},0),(!e.searchTerm||e.searchTerm&&e.searchTerm===g.state.searchTerm)&&(p=""===c?a>g.staticLimit:p,t=Ve(p,c,d)?g.getUnSelectedOptions(i,s):i,n=""===c?g.getSelectedOptions(i,s):[],r=""===c?a:g.state.optionsLength,o=g.getDisabledOptions(t.slice(0,g.staticLimit)),g.setState(W(W({},g.state),{},{scrollIndex:e.scrollToIndex||0,optionsLength:r,loading:!1,async:p,searchedOptionsLength:a,options:t.slice(0,g.staticLimit),tempSelected:s?n:l,previousSelected:s?n:f,selected:Ve(p,c,d)?n:[],triggerLabel:g.updateTriggerLabel(s?n:l),selectAll:!p&&s?Ye(n,r,o.length):u})),p||h)&&null!=(a=Xt.current)&&a.focus()})}),he(V(g),"updateSearchTerm",function(e){g.setState(W(W({},g.state),{},{loading:!0,searchInit:!0,searchTerm:e}))}),he(V(g),"updateOnPopperToggle",function(){var e,t=g.props,n=t.withCheckbox,r=t.showApplyButton,o=t.onClose,i=t.name,t=t.selected,t=void 0===t?[]:t,a=g.state,s=a.previousSelected,c=a.tempSelected,u=a.optionsLength,l=a.async,f=a.loading,p=a.searchTerm,a=a.options,d=(qe(g.props.open)?g.props:g.state).open,a=g.getDisabledOptions(a).length;n&&r&&(e=We(g.props.selected)?t:s,g.setState({tempSelected:e,selectAll:Ye(e,u,a),triggerLabel:g.updateTriggerLabel(e)})),qe(g.props.open)&&g.setState({open:d}),d&&(u=Ve(l,p,n)&&!Ue(g.state.selected,c),g.setState({loading:u||f||""!==p,searchInit:""!==p,searchTerm:""}),u)&&g.updateOptions(!1),o&&!d&&(a=(n&&r?We(g.props.selected)?t:s:g.state.tempSelected).map(function(e){return e.value}),g.debounceOnClose(a,i))}),he(V(g),"debounceOnClose",Rt(300,function(e,t){var n=g.props.onClose;n&&n(e,t)})),he(V(g),"updateTriggerLabel",function(){var e,t,n,r,o,i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],a=i.length;return 0===a?"":(n=(e=g.props).triggerOptions,e=e.getLabel,t=(n=void 0===n?{}:n).customLabel,n=n.labelLimit,r=g.state?g.state.optionsLength:1<arguments.length?arguments[1]:void 0,o="",o=a<=(void 0===n?2:n)?i.map(function(e){return e.label}).join(", "):t?t(a,r,i):"".concat(a," selected"),e&&e(o),o)}),he(V(g),"updateSelectedOptions",function(e,t,n){var r=g.state,o=r.optionsLength,i=r.previousSelected,a=r.selected,s=r.loading,r=r.open,c=g.props,u=c.onChange,l=c.withCheckbox,f=c.showApplyButton,p=c.closeOnSelect,d=c.name,c=c.onPopperToggle,h=l&&f&&n,y=g.getDisabledOptions(g.state.options),m=0===e.length&&0<a.length||e.every(function(e){return e.disabled})&&!a.every(function(e){return e.disabled});g.setState(W(W({},g.state),{},{tempSelected:e,triggerLabel:g.updateTriggerLabel(e),selectAll:Ye(e,o,y.length),open:qe(g.props.open)||l?r:!p,previousSelected:h?e:i,selected:m?e:a,loading:!!m||s})),m&&g.debounceClear(),!u||f&&!n||(o=e.map(function(e){return e.value}),u(t?o[0]:o,d)),!l&&p&&c&&qe(g.props.open)&&c(!1,"optionClick")}),he(V(g),"isValidOption",function(e){var t=g.props,n=t.closeOnSelect,r=t.withCheckbox,o=t.open,t=t.onPopperToggle,i=g.state.tempSelected;return!(0<i.length&&!r&&i[0].value===e.value&&(g.setState(W(W({},g.state),{},{open:qe(o)||!n})),!r&&n&&t&&qe(o)&&t(!1,"optionClick"),1))}),he(V(g),"onOptionSelect",function(e){var t=g.props,n=t.onUpdate,r=t.selected,t=t.menu;We(r)?n&&(g.isValidOption(e)||t)&&n("select-option",e):(g.isValidOption(e)||t)&&g.updateSelectedOptions([e],!0)}),he(V(g),"onSelect",function(t,e){var n=g.props,r=n.onUpdate,o=n.selected,n=n.showApplyButton;We(o)&&!n?r&&r(e?"select-option":"deselect-option",t):(o=g.state.tempSelected.slice(),e||(n=o.findIndex(function(e){return e.value===t.value}),o.splice(n,1)),o=e?o.concat(t):o,g.updateSelectedOptions(o,!1))}),he(V(g),"onSelectAll",function(e){var t=g.props,n=t.onUpdate,r=t.selected,t=t.showApplyButton,o=g.state,i=o.tempSelected,o=o.options;We(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(ge(o.filter(function(e){return!e.disabled})),ge(r)):r,g.updateSelectedOptions(t,!1))}),he(V(g),"debounceSearch",Rt(g.props.searchDebounceDuration,function(){g.setState({searchInit:!1},function(){g.updateOptions(!1)})})),he(V(g),"debounceClear",Rt(250,function(){return g.updateOptions(!1)})),he(V(g),"onClearOptions",function(){var e=g.props,t=e.selected,n=e.name,r=e.onUpdate,o=e.showApplyButton,e=e.onChange,i=g.state.tempSelected.filter(function(e){return e.disabled});We(t)&&!o?r&&r("clear-all"):(g.setState({selected:i,tempSelected:i,triggerLabel:"",loading:!0}),g.debounceClear(),e&&!o&&e(i,n))}),he(V(g),"onTogglePopper",function(e){var t=g.props.onPopperToggle;t&&qe(g.props.open)&&t(!1,e)}),he(V(g),"onCancelOptions",function(){var e=g.state,t=e.previousSelected,n=e.tempSelected,e=e.optionsLength,r=g.props,o=r.selected,i=r.onUpdate,a=r.onClose,r=r.name,s=!!qe(g.props.open)&&g.state.open,c=t.map(function(e){return e.value});We(o)?i&&i("cancel-selected",t,n):(o=g.updateTriggerLabel(t),i=g.getDisabledOptions(g.state.options),g.setState(W(W({},g.state),{},{tempSelected:t,selectAll:Ye(t,e,i.length),triggerLabel:o,open:s})),a&&!s&&a(c,r)),g.onTogglePopper("cancelClick")}),he(V(g),"onApplyOptions",function(){var e=g.state,t=e.tempSelected,e=e.previousSelected,n=g.props,r=n.onChange,o=n.selected,i=n.onUpdate,a=n.onClose,n=n.name,s=!!qe(g.props.open)&&g.state.open,c=t.map(function(e){return e.value});We(o)?i&&i("apply-selected",e,t):(g.setState(W(W({},g.state),{},{previousSelected:t,optionsApplied:!0,open:s})),r&&r(c,n),a&&!s&&a(c,n)),g.onTogglePopper("applyClick")}),he(V(g),"onToggleDropdown",function(e,t){var n;g.props.disabled||((n=g.props.onPopperToggle)&&qe(g.props.open)?n(e,t):g.setState({open:e}))});var g,t=e.selected,t=void 0===t?[]:t,n=e.totalOptions,r=e.withCheckbox,o=e.loading,i=e.open,a=e.options,e=(g.staticLimit=Math.min(100,e.staticLimit),n||a.length),n="fetchOptions"in g.props||e>g.staticLimit,s=n?[]:g.getSelectedOptions(a,!0),c=g.getDisabledOptions(a);return g.state={async:n,optionsLength:e,open:i,searchInit:!1,searchedOptionsLength:e,optionsApplied:!1,options:a||[],loading:n||o,searchTerm:"",tempSelected:s,previousSelected:s,selected:Ve(n,"",r)?t:[],triggerLabel:g.updateTriggerLabel(s,e),selectAll:Ye(s,e,c.length)},g}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(W(W({},this.state),{},{options:a,loading:o,tempSelected:i,previousSelected:i,optionsLength:a.length,searchedOptionsLength:a.length,triggerLabel:this.updateTriggerLabel(i),selectAll:Ye(i,this.state.optionsLength,r)})),n&&null!=(o=Xt.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||qe(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,f=e.previousSelected,e=e.scrollIndex,p=this.props,d=p.withSelectAll,d=void 0===d||d,p=p.withCheckbox,h=this.props,y=h.triggerOptions,y=void 0===y?{}:y,m=(h.selected,h.tabIndex),h=q(h,Jt),s=s-t.length,m=m||(Ge(o,s,d,p)?0:t.findIndex(function(e){return!e.disabled}));return de.createElement(Bt,ye({listOptions:t,inputRef:Xt,remainingOptions:s,firstEnabledOption:m,loadingOptions:a,async:n,searchInit:i,dropdownOpen:r,searchTerm:o,triggerLabel:l,tempSelected:c,previousSelected:f,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:y.customTrigger,scrollIndex:e},h))}}]),l}(),en=(he(Qt,"defaultProps",{triggerOptions:{},options:[],closeOnSelect:!0,staticLimit:50,searchDebounceDuration:300}),["appearance","size","children","className","color"]),tn={s:"h5",m:"h4",l:"h3",xl:"h2",xxl:"h1"},nn=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.className,a=e.color,e=q(e,en),n=ve((he(t={Heading:!0},"Heading--".concat(r),r),he(t,"Heading--".concat(n),!a&&n),he(t,"color-".concat(a),a),t),i);return de.createElement(Ce,ye({"data-test":"DesignSystem-Heading"},e,{className:n,componentType:tn[r]}),o)},rn=(nn.displayName="Heading",nn.defaultProps={appearance:"default",size:"m"},Kt.displayName="ActionButton",Kt.defaultProps={size:16,type:"round"},["size","type","minWidth","defaultValue","name","placeholder","value","icon","inlineLabel","required","error","info","onChange","onClick","onClear","onBlur","onFocus","onPaste","actionIcon","className","autoFocus","disabled","readOnly"]),on={tiny:12,regular:16,large:20},an=de.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,m=e.onClear,g=e.onBlur,v=e.onFocus,b=e.onPaste,w=e.actionIcon,S=e.className,_=e.autoFocus,E=e.disabled,C=e.readOnly,O=q(e,rn),x=de.useRef(null),k=me(de.useState(!c),2),D=k[0],j=k[1],k=(de.useImperativeHandle(t,function(){return x.current}),de.useEffect(function(){var e;_&&null!=(e=x.current)&&e.focus({preventScroll:!0})},[]),be(e)),e=ve((he(t={},"Input",!0),he(t,"Input--".concat(n),n),he(t,"Input--disabled",E||C),he(t,"Input--error",p),t),S),S=ve((he(t={},"Input-input",!0),he(t,"Input-input--".concat(n),n),t)),D=ve((he(t={},"Input-icon",!0),he(t,"Input-icon--left",!0),he(t,"Input-icon--inputBlank",D),he(t,"Input-icon--error",p),t)),t=ve((he(p={},"Input-icon",!0),he(p,"Input-iconWrapper--right",!0),p)),p=de.createElement("div",{className:t,tabIndex:0},de.createElement(N,{name:"info",size:on[n],className:"Input-icon--right"}));return de.createElement("div",{"data-test":"DesignSystem-InputWrapper",className:e,style:{minWidth:o},onClick:function(){var e;return null==(e=x.current)?void 0:e.focus()},role:"presentation",onBlur:function(){var e;return j(!(null!=(e=x.current)&&e.value))}},l&&de.createElement("div",{className:"Input-inlineLabel"},de.createElement(Se,{appearance:"subtle"},l)),"tiny"!==n&&u&&de.createElement("div",{className:D},de.createElement(N,{name:u,size:on[n]})),de.createElement("input",ye({"data-test":"DesignSystem-Input"},k,O,{ref:x,name:a,type:r,defaultValue:i,placeholder:s,className:S,value:c,required:f,disabled:E,readOnly:C,onChange:h,onBlur:g,onClick:y,onFocus:v,onPaste:b,tabIndex:C?-1:void 0})),E?"":d?de.createElement(ga,{position:"bottom",tooltip:d},p):w&&(c||i)?w:m&&(c||i)&&de.createElement("div",{className:t},de.createElement(N,{"data-test":"DesignSystem-Input--closeIcon",onClick:function(e){var t;null!=(t=x.current)&&t.focus({preventScroll:!0}),m(e)},name:"close",size:on[n],className:"Input-icon--right"})))}),sn=(an.displayName="Input",Object.assign(an,{ActionButton:Kt}),["size","defaultValue","name","placeholder","icon","prefix","suffix","error","min","max","onChange","onClick","onBlur","onFocus","className","autoFocus","disabled","readOnly","value","showActionButton","onKeyDown"]),cn={regular:16,large:20},un=de.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.defaultValue,o=e.name,i=e.placeholder,a=e.icon,s=e.prefix,c=e.suffix,u=e.error,l=e.min,f=e.max,p=e.onChange,d=e.onClick,h=e.onBlur,y=e.onFocus,m=e.className,g=e.autoFocus,v=e.disabled,b=e.readOnly,w=e.value,S=e.showActionButton,_=void 0===S||S,S=e.onKeyDown,E=q(e,sn),C=de.useRef(null),O=void 0===w,x=me(de.useState(w||r),2),k=x[0],D=x[1],x=(de.useImperativeHandle(t,function(){return C.current}),de.useEffect(function(){var e;g&&null!=(e=C.current)&&e.focus({preventScroll:!0})},[]),de.useEffect(function(){void 0!==w&&D(w)},[w]),be(e)),e=ve((he(t={},"MetricInput",!0),he(t,"MetricInput--".concat(n),n),he(t,"MetricInput--disabled",v||b),he(t,"MetricInput--error",u),t),m),t=ve((he(u={},"MetricInput-input",!0),he(u,"MetricInput-input--".concat(n),n),he(u,"mr-4",!c&&!_&&"regular"===n),he(u,"mr-6",!c&&!_&&"large"===n),u)),u=ve((he(m={},"MetricInput-icon",!0),he(m,"MetricInput-icon--".concat(n),n),m)),m=ve((he(m={},"mr-4","regular"===n),he(m,"mr-5","regular"!==n),m)),j=ve((he(j={},"ml-4 mr-3","regular"===n),he(j,"mx-5","regular"!==n),j)),T=ve((he(T={},"p-0",!0),he(T,"MetricInput-arrowIcon--".concat(n),n),he(T,"ml-3",!0),T)),I=function(e,t){var n=Number(k||0),r=(null==(r=n.toString().split(".")[1])?void 0:r.length)||0;v||b||!("down"===t?void 0!==l&&l<n||void 0===l:void 0!==f&&n<f||void 0===f)||(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)}(f,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)}(l,+(n="down"===t?n-1:n+1).toFixed(r))),O&&D(n),p&&(t=Object.create(e,{target:{value:{value:n}}}),p(t)))},M="large"===n?"regular":"tiny";return de.createElement("div",{"data-test":"DesignSystem-MetricInputWrapper",className:e,onKeyDown:S,role:"presentation"},a&&de.createElement(N,{"data-test":"DesignSystem-MetricInput--icon",name:a,size:cn[n],appearance:k?"subtle":"disabled",className:u}),s&&de.createElement(Se,{"data-test":"DesignSystem-MetricInput--prefix",className:m,size:n,appearance:"subtle"},s),de.createElement("input",ye({"data-test":"DesignSystem-MetricInput"},x,E,{type:"number",ref:C,name:o,defaultValue:r,placeholder:i,className:t,value:k,disabled:v,readOnly:b,onChange:function(e){O&&D(e.target.value),p&&p(e)},onBlur:h,onClick:d,onFocus:y,onKeyDown:function(e){if(_){var t=e;switch(t.key){case"e":case"E":return void t.preventDefault();case"ArrowDown":return void(t.preventDefault(),I(t,"down"));case"ArrowUp":t.preventDefault(),I(t,"up")}}else e.preventDefault()}})),c&&de.createElement(Se,{"data-test":"DesignSystem-MetricInput--suffix",className:j,size:n,appearance:"subtle"},c),_&&de.createElement("div",{className:"MetricInput-arrowIcons"},de.createElement(we,{icon:"keyboard_arrow_up",size:M,className:"".concat(T," mb-2"),onClick:function(e){return I(e,"up")},"data-test":"DesignSystem-MetricInput--upIcon"}),de.createElement(we,{icon:"keyboard_arrow_down",size:M,className:T,onClick:function(e){return I(e,"down")},"data-test":"DesignSystem-MetricInput--downIcon"})))}),ln=(un.displayName="MetricInput",["mask","value","placeholderChar","validators","clearOnEmptyBlur","defaultValue","mask","error","caption","required","onChange","onPaste","onBlur","onFocus","onClear","className","id","helpText"]),n=de.forwardRef(function(n,e){n.mask;var t=n.value,r=n.placeholderChar,d=void 0===r?"_":r,r=n.validators,h=void 0===r?[]:r,r=n.clearOnEmptyBlur,o=void 0===r||r,r=n.defaultValue,y=n.mask,i=n.error,a=n.caption,R=n.required,m=n.onChange,s=n.onPaste,c=n.onBlur,u=n.onFocus,l=n.onClear,f=n.className,g=n.id,L=n.helpText,z=q(n,ln),v=de.useCallback(function(e){return"object"===$(y[e])},[y]),b=de.useCallback(function(e,t){if("right"===e){for(var n=t;n<y.length;n++)if(v(n))return n;return y.length}if("left"!==e)return t;for(var r=t;0<=r;r--)if(v(r-1))return r;return 0},[y,v]),p=de.useCallback(function(){var e=b("right",0);return{start:e,end:e}},[b]),w=de.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 Ht(y,d).slice(e,t+1)},[y,d]),S=de.useMemo(function(){return w()},[w]),_=de.useMemo(function(){return p()},[p]),E=de.useRef(null),C=de.useRef(),O=de.useRef(_),x=de.useRef(0),r=me(de.useState(r||t||""),2),k=r[0],D=r[1],j=(de.useImperativeHandle(e,function(){return E.current}),de.useEffect(function(){D(t||"")},[t]),de.useEffect(function(){M(x.current)},[k]),de.useCallback(function(e){return Math.abs(e.end-e.start)},[])),T=de.useCallback(function(){var e;return{start:(null==(e=E.current)?void 0:e.selectionStart)||0,end:(null==(e=E.current)?void 0:e.selectionEnd)||0}},[E.current]),I=de.useCallback(function(e){var t,n;E.current&&(t=E.current,n=Math.min(e.start,e.end),e=Math.max(e.start,e.end),t.setSelectionRange(n,e))},[E.current]),M=de.useCallback(function(e){return I({start:e,end:e})},[I]),N=de.useCallback(function(e,t){var n,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,o="",i=t+1,a=r;return t>=y.length||(r>=e.length?O.current={start:t,end:t}:(n=y[t],v(t)?(e[r].match(n)?o+=e[r]:o+=d,a++):o+=n,o+=N(e,i,a))),o},[y,d,v]),P=de.useCallback(function(){O.current=T(),C.current=window.requestAnimationFrame(P)},[O.current,T]),A=function(e){var t=n.placeholder||"dd/mm/yyyy";return"yyyy"===t.substring(0,4)?e&&e[4]===t[4]&&e[7]===t[7]:e&&e[2]===t[2]&&e[5]===t[5]},r=de.useCallback(function(e){for(var t,n=null==(n=e.currentTarget)?void 0:n.value,r=T(),o=Math.min(O.current.start,r.start),i=r.end,a=o,s="",c=0,i=n.slice(o,i),s=N(i,o),i=k,u=(0!==i.length||"parent-TimePicker"!==g&&"parent-DatePicker"!==g||(i=S),t=s.length,r.end>O.current.end?c=t?j(O.current):0:n.length<i.length&&(c=i.length-n.length),i.split("")),l=0;l<t;l++)u[o+l]=s[l];for(var f=0;f<c;f++){var p=o+t+f;u[p]=w(p,p)}r=u.slice(0,y.length).join(""),s!==d&&""!==s&&!s.includes(d)&&Z(h,r)&&(a+=t),n=b(c?"left":"right",a),1===c&&!s.length&&!v(a)&&0<n?(a=n,u[--a]=d):1!==c&&(a=n),r=u.slice(0,y.length).join("");x.current=a,r!==i&&Z(h,r)?"__:__ _M"===S?(D(r.toUpperCase()),null!=m&&m(e,r.toUpperCase())):(D(r),null!=m&&m(e,r)):window.requestAnimationFrame(function(){return M(x.current)})},[O.current,h,T,N,j,w,b,v,M,D,m]),e=de.useCallback(function(e){var t=e.currentTarget.value;o&&t===S&&(D(""),t=""),null!=c&&c(e,t),C.current&&window.cancelAnimationFrame(C.current)},[o,C.current,w,D,c]),F=de.useCallback(function(e){x.current=_.start,D(S),null!=l&&l(e)},[D,w,M,p,l]),B=de.useCallback(function(e){C.current=window.requestAnimationFrame(P),k||(x.current=_.start,D(w())),null!=u&&u(e)},[C.current,k,P,D,I,u]),K=de.useMemo(function(){return ve({"d-flex flex-column flex-grow-1":!0},f)},[f]);return de.createElement("div",{className:K,"data-test":"DesignSystem-InputMask--Wrapper"},de.createElement(an,ye({},z,{value:k,error:i,required:R,onFocus:B,onChange:r,onClear:F,onBlur:e,onPaste:function(e){e.preventDefault();var t,n=null==(n=e.clipboardData)?void 0:n.getData("Text"),r=(o=(t=n).length,t=t.substring(0,o),23===o?(r=(o=t.split(" - "))[0],o=o[1],A(r)&&A(o)):A(t)),o=Z(h,n);r&&s&&o&&(s(e,n),D(n))},autoComplete:"off",ref:E})),de.createElement(_s,{message:i?a:L,error:i}))}),fn=(n.displayName="InputMask",n.utils={getDefaultValue:Ht},n),pn=["required","optional","withInput","disabled","children","className","info"],dn=(Ut.displayName="Label",["children","className","appearance","size","disabled"]),hn=function(e){var t,n=e.children,r=e.className,o=e.appearance,i=e.size,a=e.disabled,e=q(e,dn),i=ve((he(t={Link:!0},"Link--".concat(i),i),he(t,"Link--".concat(o),o),he(t,"Link--".concat(o,"-disabled"),a),t),r);return de.createElement(Ce,ye({"data-test":"DesignSystem-Link",className:i,componentType:"a",tabIndex:a?-1:0},e),n)},yn=(hn.displayName="Link",hn.defaultProps={appearance:"default",size:"regular",disabled:!1},Wt.displayName="Meta",function(e){var o=e.list,t=e.seperator,n=e.className,i=e.size,e=be(e),n=ve(he({},"MetaList",!0),n),a=ve(he({},"MetaList-seperator",!0)),r=ve((he(r={},"MetaList-seperator",!0),he(r,"MetaList-seperator--left",!0),r));return de.createElement("div",ye({"data-test":"DesignSystem-MetaList"},e,{className:n}),t&&de.createElement(N,{"data-test":"DesignSystem-MetaList--Seperator",name:"fiber_manual_record",size:8,className:r,appearance:"disabled"}),o.map(function(e,t){var n=e.label,e=e.icon,r=t!==o.length-1;return de.createElement("span",{key:t,className:"MetaList-item"},de.createElement(Wt,{size:i,label:void 0===n?"":n,icon:e}),r&&de.createElement(N,{"data-test":"DesignSystem-MetaList--rightSeperator",name:"fiber_manual_record",size:8,className:a,appearance:"disabled"}))}))});yn.displayName="MetaList",yn.defaultProps={seperatorAppearance:"disabled",iconAppearance:"subtle",labelAppearance:"subtle",size:"regular"};function mn(e,t,n,r){for(var o=t<n?1:-1,i=t;i!==n+o;i+=o)e[i]=r}var gn=function(){e(i,de["Component"]);var r=h(i);function i(){var o;d(this,i);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return he(V(o=r.call.apply(r,[this].concat(t))),"state",{isHandleMoving:!1,isHandleHovered:!1}),he(V(o),"handleElement",null),he(V(o),"refHandlers",{handle:function(e){return o.handleElement=e}}),he(V(o),"mouseEventClientOffset",function(e){return e.clientX}),he(V(o),"clientToValue",function(e){var t=o.props,n=t.stepSize,r=t.tickSize,t=t.value;return null==o.handleElement||(e=e-((e=o.getHandleMidpointAndOffset(o.handleElement)).handleMidpoint+e.handleOffset),isNaN(e))?t:t+Math.round(e/(r*n))*n}),he(V(o),"changeValue",function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:o.props.onChange,e=Vt(e,o.props.min,o.props.max);return isNaN(e)||o.props.value===e||t&&t(e),e}),he(V(o),"endHandleMovement",function(e){var e=o.mouseEventClientOffset(e),t=o.props.onRelease,e=(o.removeDocumentEventListeners(),o.setState({isHandleMoving:!1}),o.changeValue(o.clientToValue(e)));t&&t(e)}),he(V(o),"continueHandleMovement",function(e){var e=o.mouseEventClientOffset(e);o.state.isHandleMoving&&!o.props.disabled&&(e=o.clientToValue(e),o.changeValue(e))}),he(V(o),"beginHandleMovement",function(e){o.props.disabled||(document.addEventListener("mousemove",o.continueHandleMovement),document.addEventListener("mouseup",o.endHandleMovement),o.setState({isHandleMoving:!0}),e=o.clientToValue(e.clientX),o.changeValue(e))}),he(V(o),"handleKeyDown",function(e){var t,n,r;o.props.disabled||(t=(n=o.props).stepSize,n=n.value,37===(r=e.keyCode)?(o.changeValue(n-t),e.preventDefault()):39===r&&(o.changeValue(n+t),e.preventDefault()))}),he(V(o),"handleKeyUp",function(e){o.props.disabled||0<=[37,39].indexOf(e.keyCode)&&(e=o.props.onRelease)&&e(o.props.value)}),he(V(o),"getHandleMidpointAndOffset",function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return null==e?{handleMidpoint:0,handleOffset:0}:{handleOffset:(e=e.getBoundingClientRect()).left,handleMidpoint:e[t?"height":"width"]/2}}),he(V(o),"handleMouseOver",function(){o.setState({isHandleHovered:!0})}),he(V(o),"handleMouseLeave",function(){o.setState({isHandleHovered:!1})}),he(V(o),"removeDocumentEventListeners",function(){document.removeEventListener("mousemove",o.continueHandleMovement),document.removeEventListener("mouseup",o.endHandleMovement)}),o}return a(i,[{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(qt((r-t)*n)," - ").concat(e,"px)")},n=ve((he(t={},"Slider-handle",!0),he(t,"Slider-handle--disabled",o),he(t,"Slider-handle--active",s),he(t,"border-0",o),t)),s=ve((he(e={},"Slider-tooltip",!0),he(e,"Tooltip",!0),he(e,"d-none",!a),e));return de.createElement(de.Fragment,null,de.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:0,"data-test":"DesignSystem-MultiSlider-Handle"}),de.createElement("div",{className:s,style:r},i))}}]),i}(),n=function(){e(n,de["Component"]);var t=h(n);function n(e){var p;return d(this,n),he(V(p=t.call(this,e)),"handleElements",[]),he(V(p),"trackElement",null),he(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}),he(V(p),"getOffsetRatio",function(e){return Vt((e-p.props.min)*p.state.tickSizeRatio,0,1)}),he(V(p),"addHandleRef",function(e){null!=e&&p.handleElements.push(e)}),he(V(p),"getHandleValues",function(e){e=de.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}),he(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}))}),he(V(p),"getTrackFill",function(e,t){return void 0!==e.fillAfter?e.fillAfter:void 0!==t&&void 0!==t.fillBefore&&t.fillBefore}),he(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)}),he(V(p),"getLockedHandleIndex",function(e,t){var n=e<t?1:-1,e=e+n;return e!==t+n?e:-1}),he(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?(mn(n,t,i,n[i]),n):(mn(r,t,o,e),r)}),he(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])})}),he(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])}))}),he(V(p),"formatLabel",function(e){var t=p.props.labelRenderer,e=e.toFixed(p.state.labelPrecision);return"function"==typeof t?t(Number(e)):e}),he(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 de.createElement(gn,{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})})}),he(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:qt(e)},t=!a&&-1!==u.indexOf(n.toFixed(p.state.labelPrecision)),r=ve((he(r={},"Slider-ticks",!0),he(r,"bg-dark",t),r));s.push(de.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"},de.createElement("span",{className:r}),!1!==i&&de.createElement(Se,{size:"small",appearance:t?"default":"disabled"},p.formatLabel(n))))}(l,f);return s}),he(V(p),"renderTrackFill",function(e,t,n){var r=me([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=W({},{width:"".concat(100-r-o,"%")}),o=p.getTrackFill(t,n),n=ve((he(t={},"Slider-progress",!0),he(t,"Slider-progress--disabled",p.props.disabled),he(t,"Slider-progress--inRange",o),he(t,"Slider-progress--inRangeDisabled",o&&p.props.disabled),t));return de.createElement("div",{key:"track-".concat(e),className:n,style:r})}),he(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}),he(V(p),"handleLabelMouseOver",function(e){p.setState({hoveredLabelValue:e})}),he(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=be(this.props),e=ve(he({},"Slider",!0),e),o=ve((he(o={},"Slider-wrapper",!0),he(o,"Slider-wrapper--disabled",this.props.disabled),o));return de.createElement("div",ye({},r,{className:e,"data-test":"DesignSystem-MultiSlider"}),n&&de.createElement(Ut,{withInput:!0},n),de.createElement("div",{className:o},de.createElement("div",{className:"Slider-track",ref:function(e){return t.trackElement=e},onMouseDown:this.maybeHandleTrackClick,"data-test":"DesignSystem-MultiSlider-Slider-Track"},this.renderTracks()),de.createElement("div",{className:"Slider-axis"},this.renderLabels()),this.renderHandles()))}}]),n}(),vn=(he(n,"defaultProps",{labelStepSize:1,max:10,min:0,stepSize:1,labelRenderer:!0}),he(n,"Handle",function(){return null}),["children","className","onOutsideClick"]),bn=de.forwardRef(function(e,t){var n=e.children,r=e.className,o=e.onOutsideClick,e=q(e,vn),i=de.useRef(null),a=(de.useImperativeHandle(t,function(){return i.current},[i]),de.useEffect(function(){return document.addEventListener("click",a,!0),function(){document.removeEventListener("click",a)}},[]),de.useCallback(function(e){var t=i;e.target&&t.current&&(t.current.contains(e.target)||o(e))},[])),t=ve(he({},"OutsideClick",!0),r);return de.createElement("div",ye({ref:i},e,{className:t}),n)}),wn=(bn.displayName="OutsideClick",["appearance","children","className","color"]),Sn=function(e){var t,n=e.appearance,r=e.children,o=e.className,i=e.color,e=q(e,wn),n=ve((he(t={Text:!0},"Text--".concat(n),!i&&n),he(t,"color-".concat(i),i),t),o);return de.createElement(Ce,ye({"data-test":"DesignSystem-Paragraph"},e,{className:n,componentType:"p"}),r)},_n=(Sn.displayName="Paragraph",Sn.defaultProps={appearance:"default"},["size","label","disabled","onChange","name","value","checked","defaultChecked","className","helpText","error"]),r=de.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,p=e.error,e=q(e,_n),d=de.useRef(null),t=(de.useImperativeHandle(t,function(){return d.current}),ve((he(t={},"Radio",!0),he(t,"Radio--disabled",o),t),l)),p=ve((he(l={},"Radio-wrapper",!0),he(l,"Radio-defaultWrapper",!p),he(l,"Radio-errorWrapper",p),he(l,"Radio-wrapper--".concat(n),n),l)),l=ve((he(l={},"Radio-outerWrapper",!0),he(l,"Radio-outerWrapper--".concat(n),n),l)),h=ve(he({},"Radio-Label",!0)),y="".concat(a,"-").concat(r,"-").concat(xe());return de.createElement("div",{className:t,"data-test":"DesignSystem-Radio"},de.createElement("div",{className:l,"data-test":"DesignSystem-Radio-OuterWrapper"},de.createElement("input",ye({tabIndex:0},e,{type:"radio",disabled:o,checked:c,defaultChecked:u,ref:d,name:a,value:s,onChange:i,className:"Radio-input",id:y,"data-test":"DesignSystem-Radio-Input"})),de.createElement("span",{"data-test":"DesignSystem-Radio-wrapper",className:p})),de.createElement("div",{className:"Radio-labelWrapper"},r&&de.createElement("label",{className:h,htmlFor:y,"data-test":"DesignSystem-Radio-Label"},de.createElement(Se,{size:"tiny"===n?"small":"regular",appearance:o?"disabled":"default"},r)),f&&de.createElement(Se,{"data-test":"DesignSystem-Radio-HelpText",size:"small",appearance:o?"disabled":"subtle"},f.trim())))}),En=(r.displayName="Radio",["className","children"]),Cn=de.forwardRef(function(e,t){var n=e.className,r=e.children,e=q(e,En),n=ve(he({Row:!0},"".concat(n),n));return de.createElement("div",ye({"data-test":"DesignSystem-Row",ref:t},e,{className:n}),r)}),On=(Cn.displayName="Row",function(e){var t=e.appearance,n=e.children,r=e.onMouseEnter,o=e.onMouseLeave,i=e.onClick,a=e.truncateLabel,s=e.className,e=be(e),s=ve(he({},"StatusHint",!0),s),t=ve((he(c={},"StatusHint-icon",!0),he(c,"StatusHint--".concat(t),t),c)),c=ve(he({},"ellipsis--noWrap",a));return de.createElement("div",ye({"data-test":"DesignSystem-StatusHint"},e,{className:s,onClick:function(e){return i&&i(e)},onMouseEnter:function(e){return r&&r(e)},onMouseLeave:function(e){return o&&o(e)}}),de.createElement("span",{"data-test":"DesignSystem-StatusHint--Icon",className:t}),de.createElement(Se,{"data-test":"DesignSystem-StatusHint--Text",weight:"medium",className:c},n))}),xn=(On.displayName="StatusHint",On.defaultProps={appearance:"default"},function(e){var t,n=e.appearance,r=e.children,o=e.subtle,i=e.className,e=be(e),n=ve((he(t={Pills:!0},"Badge--".concat(n),n&&!o),he(t,"Badge--subtle-".concat(n),o),t),i);return de.createElement("span",ye({"data-test":"DesignSystem-Pills"},e,{className:n}),r)}),kn=(xn.displayName="Pills",xn.defaultProps={appearance:"secondary"},function(e){var t=e.appearance,n=e.size,r=e.className,e=be(e),n=ve(he({Spinner:!0},"Spinner--".concat(n),n),r),r=ve(he({Circle:!0},"Circle--".concat(t),t));return de.createElement("svg",ye({},e,{className:n},{viewBox:"0 0 50 50"}),de.createElement("circle",ye({className:r},{cx:25,cy:25,r:20,fill:"none",strokeMiterlimit:"10",strokeWidth:"4"})))}),Dn=(kn.displayName="Spinner",kn.defaultProps={appearance:"primary",size:"medium"},W(W({},n.defaultProps),{},{defaultValue:0}),(r=o=o||{})[r.START=0]="START",r[r.END=1]="END",W(W({},n.defaultProps),{},{defaultValue:[0,10]}),["size","defaultChecked","disabled","onChange","name","value","className","appearance","checked"]),jn=(de.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=q(e,Dn),f=me(de.useState(void 0===l?o:l),2),p=f[0],d=f[1],f=(de.useEffect(function(){void 0!==l&&d(l)},[l]),ve((he(f={},"Switch",!0),he(f,"Switch--disabled",i),he(f,"Switch--".concat(r),r),f),u)),r=ve((he(u={},"Switch-wrapper",!0),he(u,"Switch-wrapper--disabled",i),he(u,"Switch-wrapper--".concat(r),r),he(u,"Switch-wrapper--checked",p),he(u,"Switch-wrapper--checkedDisabled",p&&i),u));return de.createElement("div",{className:f},de.createElement("input",ye({},e,{type:"checkbox",defaultChecked:o,disabled:i,onChange:n,checked:p,ref:t,name:s,value:c,className:"Switch-input",onKeyUp:n})),de.createElement("span",{className:r}))}).displayName="Switch",["rows","resize","disabled","name","placeholder","value","defaultValue","required","error","onChange","onClick","onBlur","onFocus","className"]);de.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,m=e.className,e=q(e,jn),o=ve((he(n={},"Textarea",!0),he(n,"Textarea--resize",o),he(n,"Textarea--error",f),n),m);return de.createElement("textarea",ye({"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 Tn(e){var t=Gn.call(e);return"[object Arguments]"===t||"[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Function]"===Gn.call(e.callee)}function In(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"!=typeof Symbol.iterator){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;n=Object.getOwnPropertySymbols(e);if(1!==n.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 Mn(){return In()&&!!Symbol.toStringTag}function Nn(e){try{return or('"use strict"; return ('+e+").constructor;")()}catch(e){}}var Pn,An,Rn,Ln,zn,Fn,Bn,Kn,Hn,Un=te(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})),Wn=te(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})),qn=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=(te(qn),t(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,qn(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),Vn=te(o),i=te(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=te(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})),Gn=Object.prototype.toString,n=(Object.keys||(Pn=Object.prototype.hasOwnProperty,An=Object.prototype.toString,Rn=Tn,r=Object.prototype.propertyIsEnumerable,Ln=!r.call({toString:null},"toString"),zn=r.call(function(){},"prototype"),Fn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Bn=function(e){var t=e.constructor;return t&&t.prototype===e},Kn={$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},Hn=function(){if("undefined"!=typeof window)for(var e in window)try{if(!Kn["$"+e]&&Pn.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{Bn(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]"===An.call(e),r=Rn(e),o=t&&"[object String]"===An.call(e),i=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=zn&&n;if(o&&0<e.length&&!Pn.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||!Pn.call(e,u)||i.push(String(u));if(Ln)for(var l=function(e){if("undefined"==typeof window||!Hn)return Bn(e);try{return Bn(e)}catch(e){return!1}}(e),f=0;f<Fn.length;++f)l&&"constructor"===Fn[f]||!Pn.call(e,Fn[f])||i.push(Fn[f]);return i}),c),Yn=Array.prototype.slice,$n=Object.keys,Zn=$n?function(e){return $n(e)}:n,Jn=Object.keys,Xn=(Zn.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return Tn(e)?Jn(Yn.call(e)):Jn(e)}):Object.keys=Zn,Object.keys||Zn},Zn),o="undefined"!=typeof Symbol&&Symbol,Qn=Array.prototype.slice,er=Object.prototype.toString,tr=Function.prototype.bind||function(t){var n=this;if("function"!=typeof n||"[object Function]"!==er.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,e,o=Qn.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(Qn.call(arguments))),Object(e)===e?e:this):n.apply(t,o.concat(Qn.call(arguments)))}),n.prototype&&((e=function(){}).prototype=n.prototype,r.prototype=new e,e.prototype=null),r},nr=tr.call(Function.call,Object.prototype.hasOwnProperty),rr=SyntaxError,or=Function,ir=TypeError,ar=Object.getOwnPropertyDescriptor;if(ar)try{ar({},"")}catch(yi){ar=null}function sr(){throw new ir}function cr(e,t){if("string"!=typeof e||0===e.length)throw new ir("intrinsic name must be a non-empty string");if(1<arguments.length&&"boolean"!=typeof t)throw new ir('"allowMissing" argument must be a boolean');var n=function(e){var t=jr(e,0,1),n=jr(e,-1);if("%"===t&&"%"!==n)throw new rr("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new rr("invalid intrinsic syntax, expected opening `%`");var o=[];return Dr(e,Tr,function(e,t,n,r){o[o.length]=n?Dr(r,Ir,"$1"):t||e}),o}(e),r=0<n.length?n[0]:"",o=function(e,t){var n,r=e;if(nr(Or,r)&&(r="%"+(n=Or[r])[0]+"%"),nr(Er,r)){var o=Er[r];if(void 0!==(o=o===_r?Cr(r):o)||t)return{alias:n,name:r,value:o};throw new ir("intrinsic "+e+" exists, but is not available. Please file an issue!")}throw new rr("intrinsic "+e+" does not exist!")}("%"+r+"%",t),i=(o.name,o.value),a=!1;(o=o.alias)&&(r=o[0],kr(n,xr([0,1],o)));for(var s=1,c=!0;s<n.length;s+=1){var u=n[s],l=jr(u,0,1),f=jr(u,-1);if(('"'===l||"'"===l||"`"===l||'"'===f||"'"===f||"`"===f)&&l!==f)throw new rr("property names with quotes must have matching quotes");if("constructor"!==u&&c||(a=!0),nr(Er,l="%"+(r+="."+u)+"%"))i=Er[l];else if(null!=i){if(!(u in i)){if(t)return;throw new ir("base intrinsic for "+e+" exists, but the property is not available.")}i=ar&&s+1>=n.length?(c=!!(f=ar(i,u)))&&"get"in f&&!("originalValue"in f.get)?f.get:i[u]:(c=nr(i,u),i[u]),c&&!a&&(Er[l]=i)}}return i}function ur(e,t){return"function"==typeof(t=cr(e,!!t))&&-1<Nr(e,".prototype.")?Mr(t):t}function lr(e){return!(Pr&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===Ar(e)}function fr(e){return!!lr(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Array]"!==Ar(e)&&"[object Function]"===Ar(e.callee)}function pr(e,t){var n=2<arguments.length?arguments[2]:{},r=Xn(t);Lr&&(r=Fr.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&&(!Kr(s)||!s())||(Hr?Br(o,i,{configurable:!0,enumerable:!1,value:a,writable:!0}):o[i]=a)}function dr(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!Wr(e)||!Wr(t))}function hr(){return"function"==typeof Object.is?Object.is:dr}function yr(){if(null!=this&&this!==$r(this))throw new Zr("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 mr(){if(!Jr)throw new Qr("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=Xr(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return yr}var gr,vr,br,wr,r=ar?function(){try{return sr}catch(e){try{return ar(arguments,"callee").get}catch(e){return sr}}}():sr,c="function"==typeof o&&"function"==typeof Symbol&&"symbol"==typeof o("foo")&&"symbol"==typeof Symbol("bar")&&In(),Sr=Object.getPrototypeOf||function(e){return e.__proto__},_r={},n="undefined"==typeof Uint8Array?u:Sr(Uint8Array),Er={"%AggregateError%":"undefined"==typeof AggregateError?u:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?u:ArrayBuffer,"%ArrayIteratorPrototype%":c?Sr([][Symbol.iterator]()):u,"%AsyncFromSyncIteratorPrototype%":u,"%AsyncFunction%":_r,"%AsyncGenerator%":_r,"%AsyncGeneratorFunction%":_r,"%AsyncIteratorPrototype%":_r,"%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%":or,"%GeneratorFunction%":_r,"%Int8Array%":"undefined"==typeof Int8Array?u:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?u:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?u:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c?Sr(Sr([][Symbol.iterator]())):u,"%JSON%":"object"==typeof JSON?JSON:u,"%Map%":"undefined"==typeof Map?u:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c?Sr((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?Sr((new Set)[Symbol.iterator]()):u,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?u:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c?Sr(""[Symbol.iterator]()):u,"%Symbol%":c?Symbol:u,"%SyntaxError%":rr,"%ThrowTypeError%":r,"%TypedArray%":n,"%TypeError%":ir,"%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},Cr=function e(t){var n,r;return"%AsyncFunction%"===t?n=Nn("async function () {}"):"%GeneratorFunction%"===t?n=Nn("function* () {}"):"%AsyncGeneratorFunction%"===t?n=Nn("async function* () {}"):"%AsyncGenerator%"===t?(r=e("%AsyncGeneratorFunction%"))&&(n=r.prototype):"%AsyncIteratorPrototype%"===t&&(r=e("%AsyncGenerator%"))&&(n=Sr(r.prototype)),Er[t]=n},Or={"%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"]},xr=tr.call(Function.call,Array.prototype.concat),kr=tr.call(Function.apply,Array.prototype.splice),Dr=tr.call(Function.call,String.prototype.replace),jr=tr.call(Function.call,String.prototype.slice),Tr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ir=/\\(\\)?/g,Mr=t(function(e){var t=cr("%Function.prototype.apply%"),n=cr("%Function.prototype.call%"),r=cr("%Reflect.apply%",!0)||tr.call(n,t),o=cr("%Object.getOwnPropertyDescriptor%",!0),i=cr("%Object.defineProperty%",!0),a=cr("%Math.max%");if(i)try{i({},"a",{value:1})}catch(e){i=null}e.exports=function(e){var t=r(tr,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(tr,t,arguments)}i?i(e.exports,"apply",{value:s}):e.exports.apply=s}),Nr=(Mr.apply,Mr(cr("String.prototype.indexOf"))),Pr=Mn(),Ar=ur("Object.prototype.toString"),o=function(){return lr(arguments)}(),Rr=(lr.isLegacyArguments=fr,o?lr:fr),Lr="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),zr=Object.prototype.toString,Fr=Array.prototype.concat,Br=Object.defineProperty,Kr=function(e){return"function"==typeof e&&"[object Function]"===zr.call(e)},Hr=Br&&function(){var e={};try{for(var t in Br(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),Ur=(pr.supportsDescriptors=!!Hr,pr),Wr=function(e){return e!=e},c=Mr(hr(),Object),qr=(Ur(c,{getPolyfill:hr,implementation:dr,shim:function(){var e=hr();return Ur(Object,{is:e},{is:function(){return Object.is!==e}}),e}}),c),r=Mn(),Vr=(r&&(gr=ur("Object.prototype.hasOwnProperty"),vr=ur("RegExp.prototype.exec"),br={},wr={toString:n=function(){throw br},valueOf:n},"symbol"==typeof Symbol.toPrimitive)&&(wr[Symbol.toPrimitive]=n),ur("Object.prototype.toString")),Gr=Object.getOwnPropertyDescriptor,Yr=r?function(e){if(!e||"object"!=typeof e)return!1;var t=Gr(e,"lastIndex");if(!(t&&gr(t,"value")))return!1;try{vr(e,wr)}catch(e){return e===br}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===Vr(e)},$r=Object,Zr=TypeError,Jr=Ur.supportsDescriptors,Xr=Object.getOwnPropertyDescriptor,Qr=TypeError,eo=Ur.supportsDescriptors,to=Object.getOwnPropertyDescriptor,no=Object.defineProperty,ro=TypeError,oo=Object.getPrototypeOf,io=/a/,u=Mr(yr),ao=(Ur(u,{getPolyfill:mr,implementation:yr,shim:function(){var e,t,n;if(eo&&oo)return e=mr(),t=oo(io),(n=to(t,"flags"))&&n.get===e||no(t,"flags",{configurable:!0,enumerable:!1,get:e}),e;throw new ro("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors")}}),u),so=Date.prototype.getDay,co=Object.prototype.toString,uo=Mn(),lo=function(e){if("object"!=typeof e||null===e)return!1;if(!uo)return"[object Date]"===co.call(e);try{return so.call(e),!0}catch(e){return!1}},fo=Date.prototype.getTime;function po(e,t,n){n=n||{};if(n.strict?!qr(e,t):e!==t){if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return n.strict?qr(e,t):e==t;var r,o,i=e,a=t,s=n;if(typeof i!=typeof a)return!1;if(ho(i)||ho(a))return!1;if(i.prototype!==a.prototype)return!1;if(Rr(i)!==Rr(a))return!1;e=Yr(i),t=Yr(a);if(e!==t)return!1;if(e||t)return i.source===a.source&&ao(i)===ao(a);if(lo(i)&&lo(a))return fo.call(i)===fo.call(a);if(e=yo(i),t=yo(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}else{if(typeof i!=typeof a)return!1;try{var c=Xn(i),u=Xn(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],!po(i[o],a[o],s))return!1}}return!0}function ho(e){return null==e}function yo(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 mo=po,go="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,vo=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(go&&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){var t;return(r[e]||(t=r[e]={i:
|
|
|
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 vo=mo&&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()},go))}};function bo(e){return e&&"[object Function]"==={}.toString.call(e)}function wo(e,t){return 1!==e.nodeType?[]:(e=e.ownerDocument.defaultView.getComputedStyle(e,null),t?e[t]:e)}function So(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function _o(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=wo(e),n=t.overflow,r=t.overflowX,t=t.overflowY;return/(auto|scroll|overlay)/.test(n+t+r)?e:_o(So(e))}function Eo(e){return e&&e.referenceNode?e.referenceNode:e}var Co=mo&&!(!window.MSInputMethodContext||!document.documentMode),Oo=mo&&/MSIE 10/.test(navigator.userAgent);function xo(e){return 11===e?Co:10!==e&&Co||Oo}function ko(e){if(!e)return document.documentElement;for(var t=xo(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"===wo(n,"position")?ko(n):n:(e?e.ownerDocument:document).documentElement}function Do(e){return null!==e.parentNode?Do(e.parentNode):e}function jo(e,t){var n,r,o;return e&&e.nodeType&&t&&t.nodeType?(r=(o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING)?e:t,o=o?t:e,(n=document.createRange()).setStart(r,0),n.setEnd(o,0),e!==(n=n.commonAncestorContainer)&&t!==n||r.contains(o)?"BODY"===(o=(r=n).nodeName)||"HTML"!==o&&ko(r.firstElementChild)!==r?ko(n):n:(o=Do(e)).host?jo(o.host,t):jo(e,Do(t).host)):document.documentElement}function To(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):e)[t]}function Io(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 Mo(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],xo(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function No(e){var t=e.body,e=e.documentElement,n=xo(10)&&getComputedStyle(e);return{height:Mo("Height",t,e,n),width:Mo("Width",t,e,n)}}o=function(e,t,n){return t&&Po(e.prototype,t),n&&Po(e,n),e};function Po(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 Ao(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=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 Ro(e){return g({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Lo(e){var t={};try{xo(10)?(t=e.getBoundingClientRect(),n=To(e,"top"),r=To(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?No(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-=Io(e=wo(e),"x"),r-=Io(e,"y"),n.width-=t,n.height-=r),Ro(n)}function zo(e,t,n){var n=2<arguments.length&&void 0!==n&&n,r=xo(10),o="HTML"===t.nodeName,i=Lo(e),a=Lo(t),e=_o(e),s=wo(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)),Ro({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=To(t,"top"),t=To(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 Fo(e){if(!e||!e.parentElement||xo())return document.documentElement;for(var t=e.parentElement;t&&"none"===wo(t,"transform");)t=t.parentElement;return t||document.documentElement}function Bo(e,t,n,r,o){var i,o=4<arguments.length&&void 0!==o&&o,a={top:0,left:0},s=o?Fo(e):jo(e,Eo(t)),s=("viewport"===r?a=function(e,t){var t=1<arguments.length&&void 0!==t&&t,n=e.ownerDocument.documentElement,e=zo(e,n),r=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),i=t?0:To(n),t=t?0:To(n,"left");return Ro({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=_o(So(t))).nodeName&&(i=e.ownerDocument.documentElement):i="window"===r?e.ownerDocument.documentElement:r,t=zo(i,s,o),"HTML"!==i.nodeName||function e(t){var n=t.nodeName;return"BODY"!==n&&"HTML"!==n&&("fixed"===wo(t,"position")||!!(n=So(t))&&e(n))}(s)?a=t:(o=(r=No(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 Ko(e,t,n,r,o,i){var a,i=5<arguments.length&&void 0!==i?i:0;return-1===e.indexOf("auto")?e:(r=Bo(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}},(0<(o=(i=Object.keys(a).map(function(e){return g({key:e},a[e],{area:(e=a[e]).width*e.height})}).sort(function(e,t){return t.area-e.area})).filter(function(e){var t=e.width,e=e.height;return t>=n.clientWidth&&e>=n.clientHeight})).length?o:i)[0].key+((t=e.split("-")[1])?"-"+t:""))}function Ho(e,t,n,r){r=3<arguments.length&&void 0!==r?r:null;return zo(n,r?Fo(t):jo(t,Eo(n)),r)}function Uo(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 qo(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 Wo(e,t,n){n=n.split("-")[0];var e=Uo(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[qo(a)],r}function Vo(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Go(e,n,t){var r,o;return(void 0===t?e:e.slice(0,(e=e,r="name",o=t,Array.prototype.findIndex?e.findIndex(function(e){return e[r]===o}):(t=Vo(e,function(e){return e[r]===o}),e.indexOf(t))))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var t=e.function||e.fn;e.enabled&&bo(t)&&(n.offsets.popper=Ro(n.offsets.popper),n.offsets.reference=Ro(n.offsets.reference),n=t(n,e))}),n}function Yo(e,n){return e.some(function(e){var t=e.name;return e.enabled&&t===n})}function $o(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 Zo(e){e=e.ownerDocument;return e?e.defaultView:window}function Jo(e,t,n,r){n.updateBound=r,Zo(e).addEventListener("resize",n.updateBound,{passive:!0});r=_o(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(_o(t.parentNode),n,r,o),o.push(t)}(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function Xo(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,Zo(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 Qo(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function ei(n,r){Object.keys(r).forEach(function(e){var t="";-1!==["width","height","top","right","bottom","left"].indexOf(e)&&Qo(r[e])&&(t="px"),n.style[e]=r[e]+t})}function ti(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 ni=mo&&/Firefox/i.test(navigator.userAgent);function ri(e,t,n){var r,o=Vo(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"],oi=c.slice(3);function ii(e,t){t=1<arguments.length&&void 0!==t&&t,e=oi.indexOf(e),e=oi.slice(e+1).concat(oi.slice(0,e));return t?e.reverse():e}var ai="flip",si="clockwise",ci="counterclockwise";function ui(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(Vo(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("%")?Ro("%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){Qo(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:Ao({},i=i?"left":"top",t[i]),end:Ao({},i,t[i]+t[r]-n[r])},e.offsets.popper=g({},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=Qo(+t)?[+t,0]:ui(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||ko(e.instance.popper),n=(e.instance.reference===t&&(t=ko(t)),$o("transform")),o=e.instance.popper.style,i=o.top,a=o.left,s=o[n],c=(o.top="",o.left="",o[n]="",Bo(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])),Ao({},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))),Ao({},t,n)}};return t.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=g({},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(ri(e.instance.modifiers,"arrow","keepTogether")){t=t.element;if("string"==typeof t){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=e.offsets,o=r.popper,r=r.reference,n=-1!==["left","right"].indexOf(n),i=n?"height":"width",a=n?"Top":"Left",s=a.toLowerCase(),c=n?"left":"top",n=n?"bottom":"right",u=Uo(t)[i],n=(r[n]-u<o[s]&&(e.offsets.popper[s]-=o[s]-(r[n]-u)),r[s]+u>o[n]&&(e.offsets.popper[s]+=r[s]+u-o[n]),e.offsets.popper=Ro(e.offsets.popper),r[s]+r[i]/2-u/2),r=wo(e.instance.popper),l=parseFloat(r["margin"+a]),r=parseFloat(r["border"+a+"Width"]),a=n-e.offsets.popper[s]-l-r,a=Math.max(Math.min(o[i]-u,a),0);e.arrowElement=t,e.offsets.arrow=(Ao(n={},s,Math.round(a)),Ao(n,c,""),n)}return e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(u,l){if(!(Yo(u.instance.modifiers,"inner")||u.flipped&&u.placement===u.originalPlacement)){var f=Bo(u.instance.popper,u.instance.reference,l.padding,l.boundariesElement,u.positionFixed),p=u.placement.split("-")[0],d=qo(p),h=u.placement.split("-")[1]||"",y=[];switch(l.behavior){case ai:y=[p,d];break;case si:y=ii(p);break;case ci:y=ii(p,!0);break;default:y=l.behavior}y.forEach(function(e,t){if(p!==e||y.length===t+1)return u;p=u.placement.split("-")[0],d=qo(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=g({},u.offsets.popper,Wo(u.instance.popper,u.offsets.reference,u.placement)),u=Go(u.instance.modifiers,u,"flip"))})}return 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=qo(t),e.offsets.popper=Ro(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(ri(e.instance.modifiers,"hide","preventOverflow")){var t=e.offsets.reference,n=Vo(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=Vo(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=Lo(t=ko(e.instance.popper)),o={position:o.position},s=ti(e,window.devicePixelRatio<2||!ni),n="bottom"===n?"top":"bottom",r="right"===r?"left":"right",c=$o("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=g({},a,e.attributes),e.styles=g({},o,e.styles),e.arrowStyles=g({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return ei(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&&ei(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){return o=Ho(o,t,e,n.positionFixed),o=Ko(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding),t.setAttribute("x-placement",o),ei(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},o(li,[{key:"update",value:function(){return function(){var e;this.state.isDestroyed||((e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}}).offsets.reference=Ho(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=Ko(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=Wo(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=Go(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,Yo(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[$o("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=Jo(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return Xo.call(this)}}]),r=li;function li(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=this,i=li;if(!(o instanceof i))throw new TypeError("Cannot call a class as a function");this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=vo(this.update.bind(this)),this.options=g({},li.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(g({},li.Defaults.modifiers,r.modifiers)).forEach(function(e){n.options.modifiers[e]=g({},li.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return g({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&bo(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 fi=r,u="function"==typeof Symbol&&Symbol.for,pi=u?Symbol.for("react.element"):60103,di=u?Symbol.for("react.portal"):60106,hi=u?Symbol.for("react.fragment"):60107,yi=u?Symbol.for("react.strict_mode"):60108,mi=u?Symbol.for("react.profiler"):60114,gi=u?Symbol.for("react.provider"):60109,vi=u?Symbol.for("react.context"):60110,bi=u?Symbol.for("react.async_mode"):60111,wi=u?Symbol.for("react.concurrent_mode"):60111,Si=u?Symbol.for("react.forward_ref"):60112,_i=u?Symbol.for("react.suspense"):60113,Ei=u?Symbol.for("react.suspense_list"):60120,Ci=u?Symbol.for("react.memo"):60115,Oi=u?Symbol.for("react.lazy"):60116,xi=u?Symbol.for("react.block"):60121,ki=u?Symbol.for("react.fundamental"):60117,Di=u?Symbol.for("react.responder"):60118,ji=u?Symbol.for("react.scope"):60119;
|
|
30
|
+
*/var bo=go&&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()},vo))}};function wo(e){return e&&"[object Function]"==={}.toString.call(e)}function So(e,t){return 1!==e.nodeType?[]:(e=e.ownerDocument.defaultView.getComputedStyle(e,null),t?e[t]:e)}function _o(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function Eo(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=So(e),n=t.overflow,r=t.overflowX,t=t.overflowY;return/(auto|scroll|overlay)/.test(n+t+r)?e:Eo(_o(e))}function Co(e){return e&&e.referenceNode?e.referenceNode:e}var Oo=go&&!(!window.MSInputMethodContext||!document.documentMode),xo=go&&/MSIE 10/.test(navigator.userAgent);function ko(e){return 11===e?Oo:10!==e&&Oo||xo}function Do(e){if(!e)return document.documentElement;for(var t=ko(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"===So(n,"position")?Do(n):n:(e?e.ownerDocument:document).documentElement}function jo(e){return null!==e.parentNode?jo(e.parentNode):e}function To(e,t){var n,r,o;return e&&e.nodeType&&t&&t.nodeType?(r=(o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING)?e:t,o=o?t:e,(n=document.createRange()).setStart(r,0),n.setEnd(o,0),e!==(n=n.commonAncestorContainer)&&t!==n||r.contains(o)?"BODY"===(o=(r=n).nodeName)||"HTML"!==o&&Do(r.firstElementChild)!==r?Do(n):n:(o=jo(e)).host?To(o.host,t):To(e,jo(t).host)):document.documentElement}function Io(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):e)[t]}function Mo(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 No(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],ko(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function Po(e){var t=e.body,e=e.documentElement,n=ko(10)&&getComputedStyle(e);return{height:No("Height",t,e,n),width:No("Width",t,e,n)}}o=function(e,t,n){return t&&Ao(e.prototype,t),n&&Ao(e,n),e};function Ao(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 Ro(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=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 Lo(e){return g({},e,{right:e.left+e.width,bottom:e.top+e.height})}function zo(e){var t={};try{ko(10)?(t=e.getBoundingClientRect(),n=Io(e,"top"),r=Io(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?Po(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-=Mo(e=So(e),"x"),r-=Mo(e,"y"),n.width-=t,n.height-=r),Lo(n)}function Fo(e,t,n){var n=2<arguments.length&&void 0!==n&&n,r=ko(10),o="HTML"===t.nodeName,i=zo(e),a=zo(t),e=Eo(e),s=So(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)),Lo({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=Io(t,"top"),t=Io(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 Bo(e){if(!e||!e.parentElement||ko())return document.documentElement;for(var t=e.parentElement;t&&"none"===So(t,"transform");)t=t.parentElement;return t||document.documentElement}function Ko(e,t,n,r,o){var i,o=4<arguments.length&&void 0!==o&&o,a={top:0,left:0},s=o?Bo(e):To(e,Co(t)),s=("viewport"===r?a=function(e,t){var t=1<arguments.length&&void 0!==t&&t,n=e.ownerDocument.documentElement,e=Fo(e,n),r=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),i=t?0:Io(n),t=t?0:Io(n,"left");return Lo({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=Eo(_o(t))).nodeName&&(i=e.ownerDocument.documentElement):i="window"===r?e.ownerDocument.documentElement:r,t=Fo(i,s,o),"HTML"!==i.nodeName||function e(t){var n=t.nodeName;return"BODY"!==n&&"HTML"!==n&&("fixed"===So(t,"position")||!!(n=_o(t))&&e(n))}(s)?a=t:(o=(r=Po(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 Ho(e,t,n,r,o,i){var a,i=5<arguments.length&&void 0!==i?i:0;return-1===e.indexOf("auto")?e:(r=Ko(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}},(0<(o=(i=Object.keys(a).map(function(e){return g({key:e},a[e],{area:(e=a[e]).width*e.height})}).sort(function(e,t){return t.area-e.area})).filter(function(e){var t=e.width,e=e.height;return t>=n.clientWidth&&e>=n.clientHeight})).length?o:i)[0].key+((t=e.split("-")[1])?"-"+t:""))}function Uo(e,t,n,r){r=3<arguments.length&&void 0!==r?r:null;return Fo(n,r?Bo(t):To(t,Co(n)),r)}function Wo(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 qo(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 Vo(e,t,n){n=n.split("-")[0];var e=Wo(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[qo(a)],r}function Go(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Yo(e,n,t){var r,o;return(void 0===t?e:e.slice(0,(e=e,r="name",o=t,Array.prototype.findIndex?e.findIndex(function(e){return e[r]===o}):(t=Go(e,function(e){return e[r]===o}),e.indexOf(t))))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var t=e.function||e.fn;e.enabled&&wo(t)&&(n.offsets.popper=Lo(n.offsets.popper),n.offsets.reference=Lo(n.offsets.reference),n=t(n,e))}),n}function $o(e,n){return e.some(function(e){var t=e.name;return e.enabled&&t===n})}function Zo(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 Jo(e){e=e.ownerDocument;return e?e.defaultView:window}function Xo(e,t,n,r){n.updateBound=r,Jo(e).addEventListener("resize",n.updateBound,{passive:!0});r=Eo(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(Eo(t.parentNode),n,r,o),o.push(t)}(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function Qo(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,Jo(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 ei(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function ti(n,r){Object.keys(r).forEach(function(e){var t="";-1!==["width","height","top","right","bottom","left"].indexOf(e)&&ei(r[e])&&(t="px"),n.style[e]=r[e]+t})}function ni(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 ri=go&&/Firefox/i.test(navigator.userAgent);function oi(e,t,n){var r,o=Go(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"],ii=c.slice(3);function ai(e,t){t=1<arguments.length&&void 0!==t&&t,e=ii.indexOf(e),e=ii.slice(e+1).concat(ii.slice(0,e));return t?e.reverse():e}var si="flip",ci="clockwise",ui="counterclockwise";function li(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(Go(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("%")?Lo("%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){ei(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:Ro({},i=i?"left":"top",t[i]),end:Ro({},i,t[i]+t[r]-n[r])},e.offsets.popper=g({},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=ei(+t)?[+t,0]:li(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||Do(e.instance.popper),n=(e.instance.reference===t&&(t=Do(t)),Zo("transform")),o=e.instance.popper.style,i=o.top,a=o.left,s=o[n],c=(o.top="",o.left="",o[n]="",Ko(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])),Ro({},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))),Ro({},t,n)}};return t.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=g({},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(oi(e.instance.modifiers,"arrow","keepTogether")){t=t.element;if("string"==typeof t){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=e.offsets,o=r.popper,r=r.reference,n=-1!==["left","right"].indexOf(n),i=n?"height":"width",a=n?"Top":"Left",s=a.toLowerCase(),c=n?"left":"top",n=n?"bottom":"right",u=Wo(t)[i],n=(r[n]-u<o[s]&&(e.offsets.popper[s]-=o[s]-(r[n]-u)),r[s]+u>o[n]&&(e.offsets.popper[s]+=r[s]+u-o[n]),e.offsets.popper=Lo(e.offsets.popper),r[s]+r[i]/2-u/2),r=So(e.instance.popper),l=parseFloat(r["margin"+a]),r=parseFloat(r["border"+a+"Width"]),a=n-e.offsets.popper[s]-l-r,a=Math.max(Math.min(o[i]-u,a),0);e.arrowElement=t,e.offsets.arrow=(Ro(n={},s,Math.round(a)),Ro(n,c,""),n)}return e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(u,l){if(!($o(u.instance.modifiers,"inner")||u.flipped&&u.placement===u.originalPlacement)){var f=Ko(u.instance.popper,u.instance.reference,l.padding,l.boundariesElement,u.positionFixed),p=u.placement.split("-")[0],d=qo(p),h=u.placement.split("-")[1]||"",y=[];switch(l.behavior){case si:y=[p,d];break;case ci:y=ai(p);break;case ui:y=ai(p,!0);break;default:y=l.behavior}y.forEach(function(e,t){if(p!==e||y.length===t+1)return u;p=u.placement.split("-")[0],d=qo(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=g({},u.offsets.popper,Vo(u.instance.popper,u.offsets.reference,u.placement)),u=Yo(u.instance.modifiers,u,"flip"))})}return 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=qo(t),e.offsets.popper=Lo(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(oi(e.instance.modifiers,"hide","preventOverflow")){var t=e.offsets.reference,n=Go(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=Go(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=zo(t=Do(e.instance.popper)),o={position:o.position},s=ni(e,window.devicePixelRatio<2||!ri),n="bottom"===n?"top":"bottom",r="right"===r?"left":"right",c=Zo("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=g({},a,e.attributes),e.styles=g({},o,e.styles),e.arrowStyles=g({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return ti(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&&ti(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){return o=Uo(o,t,e,n.positionFixed),o=Ho(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding),t.setAttribute("x-placement",o),ti(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},o(fi,[{key:"update",value:function(){return function(){var e;this.state.isDestroyed||((e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}}).offsets.reference=Uo(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=Ho(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=Vo(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=Yo(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,$o(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[Zo("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=Xo(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return Qo.call(this)}}]),r=fi;function fi(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=this,i=fi;if(!(o instanceof i))throw new TypeError("Cannot call a class as a function");this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=bo(this.update.bind(this)),this.options=g({},fi.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(g({},fi.Defaults.modifiers,r.modifiers)).forEach(function(e){n.options.modifiers[e]=g({},fi.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return g({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&wo(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 pi=r,u="function"==typeof Symbol&&Symbol.for,di=u?Symbol.for("react.element"):60103,hi=u?Symbol.for("react.portal"):60106,yi=u?Symbol.for("react.fragment"):60107,mi=u?Symbol.for("react.strict_mode"):60108,gi=u?Symbol.for("react.profiler"):60114,vi=u?Symbol.for("react.provider"):60109,bi=u?Symbol.for("react.context"):60110,wi=u?Symbol.for("react.async_mode"):60111,Si=u?Symbol.for("react.concurrent_mode"):60111,_i=u?Symbol.for("react.forward_ref"):60112,Ei=u?Symbol.for("react.suspense"):60113,Ci=u?Symbol.for("react.suspense_list"):60120,Oi=u?Symbol.for("react.memo"):60115,xi=u?Symbol.for("react.lazy"):60116,ki=u?Symbol.for("react.block"):60121,Di=u?Symbol.for("react.fundamental"):60117,ji=u?Symbol.for("react.responder"):60118,Ti=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){var t;return(r[e]||(t=r[e]={i:
|
|
|
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 l(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case pi:switch(e=e.type){case bi:case wi:case hi:case mi:case yi:case _i:return e;default:switch(e=e&&e.$$typeof){case vi:case Si:case Oi:case Ci:case gi:return e;default:return t}}case di:return t}}}function Ti(e){return l(e)===wi}var Ii={AsyncMode:bi,ConcurrentMode:wi,ContextConsumer:vi,ContextProvider:gi,Element:pi,ForwardRef:Si,Fragment:hi,Lazy:Oi,Memo:Ci,Portal:di,Profiler:mi,StrictMode:yi,Suspense:_i,isAsyncMode:function(e){return Ti(e)||l(e)===bi},isConcurrentMode:Ti,isContextConsumer:function(e){return l(e)===vi},isContextProvider:function(e){return l(e)===gi},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===pi},isForwardRef:function(e){return l(e)===Si},isFragment:function(e){return l(e)===hi},isLazy:function(e){return l(e)===Oi},isMemo:function(e){return l(e)===Ci},isPortal:function(e){return l(e)===di},isProfiler:function(e){return l(e)===mi},isStrictMode:function(e){return l(e)===yi},isSuspense:function(e){return l(e)===_i},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===hi||e===wi||e===mi||e===yi||e===_i||e===Ei||"object"==typeof e&&null!==e&&(e.$$typeof===Oi||e.$$typeof===Ci||e.$$typeof===gi||e.$$typeof===vi||e.$$typeof===Si||e.$$typeof===ki||e.$$typeof===Di||e.$$typeof===ji||e.$$typeof===xi)},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=Ii}),Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;!function(){try{if(Object.assign){var e=new String("abc");if(e[5]="de","5"!==Object.getOwnPropertyNames(e)[0]){for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r,o=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"===o.join(""))return r={},"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")?1:void 0}}}catch(e){}}()||Object.assign;function Mi(){}function Ni(){}Function.call.bind(Object.prototype.hasOwnProperty),Ni.resetWarningCache=Mi;function Pi(){return te[zi]=(te[zi]||0)+1}function Ai(e){return Array.isArray(e)?e[0]:e}function Ri(e,t){if("function"==typeof e)return qi(e,t);null!=e&&(e.current=t)}var Li=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")).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:Ni,resetWarningCache:Mi}).PropTypes=e}),zi="__global_unique_id__",Fi=function(){},Bi=t(function(e,t){t.__esModule=!0,n(m.a);var l=n(Li),f=n(Pi);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(Fi);var y=1073741823;t.default=function(e,a){var t,s,n="__create-react-context-"+(0,f.default)()+"__",r=(h(c,s=m.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=m.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=(ne(Bi),t(function(e,t){t.__esModule=!0;var n=o(m.a),r=o(Bi);function o(e){return e&&e.__esModule?e:{default:e}}t.default=n.default.createContext||r.default,e.exports=t.default})),c=ne(p),Ki=c(),Hi=c(),Ui=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}Wn(e,o);var t=e.prototype;return t.componentWillUnmount=function(){this.referenceNode=null},t.render=function(){return pe.createElement(Ki.Provider,{value:this.referenceNode},pe.createElement(Hi.Provider,{value:this.setReferenceNode},this.props.children))},e}(pe.Component),qi=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)}},Wi={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},Vi={},Gi=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&&(Ri(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:Un({},n.props.modifiers,{arrow:Un({},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?Un({position:n.state.data.offsets.popper.position},n.state.data.styles):Wi}),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:Vi}),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 fi(t,e,n.getOptions()))}),s(i(i(n)),"scheduleUpdate",function(){n.popperInstance&&n.popperInstance.scheduleUpdate()}),n}Wn(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&&yo(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(){Ri(this.props.innerRef,null),this.destroyPopperInstance()},t.render=function(){return Ai(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}(pe.Component);function Yi(e){var t=e.referenceElement,n=Hn(e,["referenceElement"]);return pe.createElement(Ki.Consumer,null,function(e){return pe.createElement(Gi,Un({referenceElement:void 0!==t?t:e},n))})}s(Gi,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1}),fi.placements;var $i=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){Ri(t.props.innerRef,e),qi(t.props.setReferenceNode,e)}),t}Wn(e,o);var t=e.prototype;return t.componentWillUnmount=function(){Ri(this.props.innerRef,null)},t.render=function(){return Fi(Boolean(this.props.setReferenceNode)),Ai(this.props.children)({ref:this.refHandler})},e}(pe.Component);function Zi(t){return pe.createElement(Hi.Consumer,null,function(e){return pe.createElement($i,Un({setReferenceNode:e},t))})}function Ji(e){var n=e.open,t=e.className,r=e.children,o=e.actions,e=ge(e),t=me({OverlayFooter:!0},t),i=pe.createRef();return pe.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?pe.createElement("div",he({ref:i},e,{className:t}),o.map(function(e,t){e.label;e=W(e,ga);return pe.createElement(be,he({type:"button"},e,{key:t}))})):pe.createElement("div",he({"data-test":"DesignSystem-OverlayFooter",ref:i},e,{className:t}),r)}function Xi(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=me(de({OverlayHeader:!0},"OverlayHeader--withBackButton",o||i),t),u=me((de(u={},"OverlayHeader-subheading",!0),de(u,"OverlayHeader-subheading--withBackButton",o||i),u));return pe.createElement("div",he({"data-test":"DesignSystem-OverlayHeader"},e,{className:t}),pe.createElement("div",{className:"OverlayHeader-headerWrapper"},(o||i)&&pe.createElement(be,{"data-test":"DesignSystem-OverlayHeader--Button",appearance:"transparent",className:"mr-4",icon:"arrow_back",largeIcon:!0,onClick:s||a}),n&&pe.createElement(tn,{className:c,"data-test":"DesignSystem-OverlayHeader--heading"},n)),r&&pe.createElement(ve,{"data-test":"DesignSystem-OverlayHeader--Subheading",appearance:"subtle",className:u},r))}function Qi(e){var t=e.children,n=e.className,e=ge(e),n=me({OverlayBody:!0},n);return pe.createElement("div",he({"data-test":"DesignSystem-OverlayBody"},e,{className:n}),t)}function ea(){var e=document.querySelector(".Overlay-wrapper");return null===e&&((e=document.createElement("div")).classList.add("Overlay-wrapper"),document.body.appendChild(e)),e}function ta(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 na(e,t,n){"Escape"===e.key&&t&&(n(e),e.preventDefault())}function ra(e){function t(e){switch(p(!0),e){case"first":l(1);break;case"last":l(r);break;case"prev":1<u&&l(u-1);break;case"next":u<r&&l(u+1)}}var n=e.type,r=e.totalPages,o=e.onPageChange,i=e.className,a=e.pageJumpDebounceDuration,s=ge(e),c=ye(pe.useState(e.page),2),u=c[0],l=c[1],f=(c=ye(pe.useState(!1),2))[0],p=c[1],d=(c=ye(pe.useState(0),2))[0],h=c[1],y=pe.useCallback(ue(a,o),[d]),a=(pe.useEffect(function(){l(e.page)},[e.page]),me((de(c={},"Pagination",!0),de(c,"Pagination--".concat(n),n),c),i)),d=me((de(o={},"Pagination-buttonWrapper",!0),de(o,"Pagination-buttonWrapper--next",!0),o)),i=me((de(c={},"Pagination-buttonWrapper",!0),de(c,"Pagination-buttonWrapper--previous",!0),c));return pe.useEffect(function(){f&&(1<=u&&u<=r?y(u):(y.cancel(),h(function(e){return e+1})))},[u]),pe.createElement("div",he({"data-test":"DesignSystem-Pagination"},s,{className:a}),pe.createElement("div",{className:i},pe.createElement(be,{onClick:function(){return t("first")},disabled:u<=1,appearance:"transparent",icon:"first_page","data-test":"DesignSystem-Pagination--FirstButton"}),pe.createElement(be,{onClick:function(){return t("prev")},disabled:u<=1,icon:"navigate_before","data-test":"DesignSystem-Pagination--PrevButton",className:"ml-4 mr-3"})),"jump"===n&&pe.createElement("div",{className:"Pagination-pageIndex"},pe.createElement(cn,{name:"page",className:"Pagination-MetricInput",onChange:function(e){e.preventDefault();e=+e.target.value.trim();0<=e&&e<=r&&(f||p(!0),l(e))},value:"".concat(R(u)?u:""),"data-test":"DesignSystem-Pagination--Input",onKeyPress:function(e){R(e.key)||e.preventDefault()}}),pe.createElement(ve,null," of ".concat(r," pages"))),pe.createElement("div",{className:d},pe.createElement(be,{onClick:function(){return t("next")},disabled:r<=u,icon:"navigate_next","data-test":"DesignSystem-Pagination--NextButton",className:"mr-4 ml-3"}),pe.createElement(be,{onClick:function(){return t("last")},disabled:r<=u,appearance:"transparent",icon:"last_page","data-test":"DesignSystem-Pagination--LastButton"})))}function oa(e){function t(e){var t,n;"start"===e&&(t=(n=$(h)).year,n=n.month,d({yearNav:t,monthNav:n})),"end"===e&&(n=(t=$(y)).year,e=t.month,d({yearNav:n,monthNav:e}))}function n(e,t,n){var r,o,i;d({open:!0}),"start"===n&&(r=u.placeholderChar||"_",t)&&!t.includes(r)&&(r=Je(c,t,f))&&(d({startDate:r}),y&&(o=(r=$(y)).year,i=r.month,r=r.date,Y(h,"more",o,i,r))&&d({endDate:void 0}),u.onPaste)&&u.onPaste(e,t),"end"===n&&(o=l.placeholderChar||"_",t)&&!t.includes(o)&&(i=Je(c,t,f))&&(d({endDate:i}),l.onPaste)&&l.onPaste(e,t)}function r(e,t,n){var r,o,i;d({open:!0}),"start"===n&&(r=u.placeholderChar||"_",t)&&!t.includes(r)&&(r=Je(c,t,f))&&(d({startDate:r}),y)&&(o=(r=$(y)).year,i=r.month,r=r.date,Y(h,"more",o,i,r))&&d({endDate:void 0}),"end"===n&&(o=l.placeholderChar||"_",t)&&!t.includes(o)&&(i=Je(c,t,f))&&d({endDate:i})}function o(e,t,n){d({init:!0});var r,o=/\d/;"start"===n&&(r=void 0===(r=u.placeholderChar)?"_":r,t&&o.test(t)&&t.includes(r)?d({startError:!0}):(!t||o.test(t))&&t||d({startError:!1}),t&&!t.includes(r)||d({startDate:void 0})),"end"===n&&(n=void 0===(r=l.placeholderChar)?"_":r,t&&o.test(t)&&t.includes(n)?d({endError:!0}):(!t||o.test(t))&&t||d({endError:!1}),t&&!t.includes(n)||d({endDate:void 0}))}function i(e){d({init:!0}),"start"===e&&(d({startDate:void 0}),t("end")),"end"===e&&(d({endDate:void 0}),t("start"))}function a(e){p.open||t(e)}function s(e){return J(f,e,c)}var c=e.inputFormat,u=e.startInputOptions,l=e.endInputOptions,f=e.validators,p=e.state,d=e.setState,e=p.init,h=p.startDate,y=p.endDate,m=p.startError,g=p.endError,v=X[c],b=u.placeholderChar||"_",w=l.placeholderChar||"_",m=u.error||u.required&&m&&e,g=l.error||l.required&&g&&e,S=void 0===u.caption?"Invalid value":u.caption,_=void 0===l.caption?"Invalid value":l.caption,E=u.label,C=l.label;return pe.createElement(En,{"data-test":"DesignSystem-DateRangePicker-InputTrigger"},pe.createElement(x,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--startDate"},E&&pe.createElement(vt,{required:u.required,withInput:!0},E),pe.createElement(ln,he({icon:"events",placeholder:c},u,{mask:v,value:h?O(c,h):e?ln.utils.getDefaultValue(v,b):"",onChange:function(e,t){r(0,t||"","start")},onPaste:function(e,t){n(e,t||"","start")},onBlur:function(e,t){o(0,t||"","start")},onClear:function(){return i("start")},onClick:function(){return a("start")},error:m,caption:m?S:"",validators:[s],clearOnEmptyBlur:!0}))),pe.createElement(x,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--endDate"},C&&pe.createElement(vt,{required:l.required,withInput:!0},C),pe.createElement(ln,he({icon:"events",placeholder:c},l,{mask:v,value:y?O(c,y):e?ln.utils.getDefaultValue(v,w):"",onChange:function(e,t){r(0,t||"","end")},onPaste:function(e,t){n(e,t||"","end")},onBlur:function(e,t){o(0,t||"","end")},onClear:function(){return i("end")},onClick:function(){return a("end")},error:g,caption:g?_:"",validators:[s],clearOnEmptyBlur:!0}))))}function ia(e){function i(e,t){var n=/\d/;return!(!e||!t||e.includes(h)||!t.includes(h))||!!(e&&n.test(e)&&e.includes(h))||!(e&&!n.test(e)||!e)&&null}var s=e.inputFormat,c=e.inputOptions,u=e.validators,t=e.state,l=e.setState,e=t.init,a=t.startDate,f=t.endDate,p=t.startValue,d=t.endValue,n=t.startError,t=t.endError,r=Q[s],n=c.error||c.required&&(n||t)&&e,t=void 0===c.caption?"Invalid value":c.caption,o=c.label,h=void 0===(y=c.placeholderChar)?"_":y,y=ln.utils.getDefaultValue(r,h).split(" - "),m=p||y[0],y=d||y[1];return pe.createElement(En,{"data-test":"DesignSystem-DateRangePicker-SingleInputTrigger"},pe.createElement(x,null,o&&pe.createElement(vt,{required:c.required,withInput:!0},o),pe.createElement(ln,he({icon:"events",placeholder:"".concat(s," - ").concat(s)},c,{mask:r,value:a||f||e?"".concat(m," - ").concat(y):void 0,onChange:function(e,t){var n,r,o,i;t=(t=t||"").split(" - "),i=t[0],t=t[1],p!==i&&i&&!i.includes(h)&&(n=Je(s,i,u))&&(r=d&&!d.includes(h),l({startDate:n,endDate:r?f:void 0}),f)&&(r=(n=$(f)).year,o=n.month,n=n.date,Y(a,"more",r,o,n))&&l({endDate:void 0}),d!==t&&t&&!t.includes(h)&&(r=Je(s,t,u),o=p&&!p.includes(h),r)&&l({endDate:r,startDate:o?a:void 0}),l({startValue:i,endValue:t})},onBlur:function(e,t){var n,r,o;t=t||"",l({init:!0}),t=t.split(" - "),n=t[0],t=t[1],r=i(n,t),o=i(t,n),null!==r&&null!==o&&l({startError:r,endError:o}),n&&!n.includes(h)||l({startDate:void 0}),t&&!t.includes(h)||l({endDate:void 0})},onPaste:function(e,t){var n,r,o,i,a;e=e,t=t||"",n=c.onPaste,r=t.split(" - "),o=r[0],r=r[1],i=Je(s,r,u),a=Je(s,o,u),l({startDate:a,endDate:i,startValue:o,endValue:r}),n&&n(e,t)},onClear:function(){l({init:!0,startDate:void 0,endDate:void 0,yearNav:void 0,monthNav:void 0})},error:n,caption:n?t:"",validators:[function(e){var e=ye(e.split(" - "),2),t=e[0],e=e[1];return J(u,t,s)&&J(u,e,s)}],clearOnEmptyBlur:!0}))))}function aa(e){var t=new Date;return new Date(t.setDate(e))}function sa(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 ca(e){e.preventDefault()}function ua(){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!Sa(t)&&e&&e.apply(void 0,[t].concat(n)),Sa(t)})}}function la(e,t){switch(t.type){case"focus":return q(q({},e),{},{isFocused:!0});case"blur":return q(q({},e),{},{isFocused:!1});case"openDialog":return q(q({},e),{},{isFileDialogActive:!0});case"closeDialog":return q(q({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return q(q({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return q(q({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return q(q({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}var fa=function(){e(n,pe["Component"]);var t=h(n);function n(e){var o;return d(this,n),de(V(o=t.call(this,e)),"triggerRef",void 0),de(V(o),"popupRef",void 0),de(V(o),"hoverableDelay",void 0),de(V(o),"_timer",void 0),de(V(o),"_throttleWait",void 0),de(V(o),"offsetMapping",void 0),de(V(o),"togglePopper",function(e,t){var n=o.props,r=n.open;(0,n.onToggle)(void 0===t?!r:t,e)}),de(V(o),"doesEventContainsElement",function(e,t){t=t.current;return t&&t.contains(e.target)}),de(V(o),"getUpdatedStyle",function(e,t,n){var r=q(q({},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:"",showClosingAnimation:!1},o.hoverableDelay=100,o.offsetMapping={small:"2px",medium:"4px",large:"8px"},o.triggerRef=pe.createRef(),o.popupRef=pe.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();var e=this.triggerRef.current,e=this.getZIndexForLayer(e);this.setState({zIndex:void 0===e?e:e+1})}},{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"),this.setState(function(){return{isOpen:!0}}))}},{key:"handleMouseLeave",value:function(){var e,t,n=this;"hover"===this.props.on&&(e=(t=this.props).hoverable,t=t.onToggle,e?this.mouseMoveHandler():(t(!1,"mouseLeave"),this.setState({showClosingAnimation:!0},function(){window.setTimeout(function(){n.setState({showClosingAnimation:!1,isOpen:!1})},120)})))}},{key:"getZIndexForLayer",value:function(e){if(null!==e)return"auto"===(e=(e=e.closest("[data-layer]")||document.body)===document.body?"auto":parseInt(window.getComputedStyle(e).zIndex||"0",10))||isNaN(e)?500:e}},{key:"getTriggerElement",value:function(e){var a=this,t=this.props,n=t.trigger,r=t.on,t=t.triggerClass,r="hover"===r?{ref:e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave}:{ref:e,onClick:function(e){e.stopPropagation(),a.togglePopper("onClick")}},e=me("PopperWrapper-trigger",t),o=function(t){var e=a.popupRef.current,n=document.body,r=parseInt(window.getComputedStyle(e).zIndex),o=!1,i=!1;return n.querySelectorAll('[data-opened="true"]').forEach(function(e){e.contains(t)&&(o=!0,parseInt(window.getComputedStyle(e).zIndex)<r)&&(i=!0)}),!(!n.isEqualNode(t)&&!i&&n.contains(t)&&o)};return pe.createElement(vn,he({className:e,onOutsideClick:function(e){var t=a.props,n=t.open,t=t.closeOnBackdropClick;n&&o(e.target)&&t&&(a.doesEventContainsElement(e,a.popupRef)||a.togglePopper("outsideClick"))}},r),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=q(q({},s?this.getUpdatedStyle(o,i,s):o),{},{zIndex:f}),o="",p=(a?o=me((de(f={},"".concat(a.open),this.state.isOpen),de(f,"".concat(a.close),!this.state.isOpen),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=q(q(q({},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 pe.cloneElement(c,a?q(q({},p),{},{className:o}):q({},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 pe.createElement(Ui,null,pe.createElement("style",null,a),pe.createElement(Zi,{innerRef:this.triggerRef},function(e){e=e.ref;return t.getTriggerElement(e)}),i&&r&&v.createPortal(pe.createElement(Yi,{placement:n,innerRef:this.popupRef,modifiers:{preventOverflow:{boundariesElement:e||document.body},hide:{enabled:o}}},this.getPopperChildren),document.body),i&&!r&&pe.createElement(Yi,{placement:n,innerRef:this.popupRef},this.getPopperChildren))}}]),n}(),pa=(de(fa,"defaultProps",{on:"click",offset:"medium",closeOnBackdropClick:!0,hoverable:!0,appendToBody:!0,style:{}}),["position","customStyle","dark","children","onToggle","className","hideOnReferenceEscape","boundaryElement"]),da=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=W(e,pa),l=ye(pe.useState(!!e.open),2),f=l[0],p=l[1],l=ye(pe.useState(!1),2),d=l[0],h=l[1],l=(pe.useEffect(function(){void 0!==e.open&&p(e.open)},[e.open]),pe.useCallback(function(e){p(e)},[])),r=(pe.useEffect(function(){d||"current"in u&&u.current&&h(!0)},[u]),me(de({Popover:!0},"Popover--dark",r),a)),a=pe.createElement("div",{"data-test":"DesignSystem-Popover",className:r,"data-layer":!0,"data-opened":f},o);return pe.createElement(fa,he({},c,{init:d,boundaryElement:"current"in u?u.current:u,open:f,hide:s,style:n,onToggle:i||l,placement:t}),a)},ha=(da.displayName="Popover",da.defaultProps=Object.assign({},re(fa.defaultProps,["appendToBody","trigger","hoverable","on","open","closeOnBackdropClick","offset","closeOnScroll"],!0),{offset:"large",position:"bottom",hideOnReferenceEscape:!0,customStyle:{}}),["children","tooltip"]),ya={bottom:"bottom",top:"top","top-start":"top","top-end":"top","bottom-start":"bottom","bottom-end":"bottom",left:"left",right:"right"},ma=function(e){var t=e.children,n=e.tooltip,r=W(e,ha),n=pe.createElement("div",{className:"Tooltip"},pe.createElement(ve,{className:"Tooltip-text",appearance:"white"},n));return pe.createElement(da,he({trigger:t,on:"hover",offset:"medium"},r,{animationClass:{open:"Tooltip-animation-open-".concat(ya[e.position]),close:"Tooltip-animation-close-".concat(ya[e.position])},className:"Tooltip-container"}),n)},ga=(ma.defaultProps=Object.assign({},re(da.defaultProps,["trigger","on","open","offset","onToggle","dark","customStyle","closeOnBackdropClick","hideOnReferenceEscape","closeOnScroll"]),{hoverable:!1}),["label"]),f=(Ji.displayName="OverlayFooter",Xi.displayName="OverlayHeader",Qi.defaultProps={stickFooter:!0,withFooter:!0},Qi.displayName="OverlayBody",new(function(){function e(){d(this,e),de(this,"overlays",void 0),this.overlays=[]}return a(e,[{key:"add",value:function(e){var t;if(null!==e)return-1===(t=this.overlays.indexOf(e))&&(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,pe["Component"]);var t=h(r);function r(e){var n;return d(this,r),de(V(n=t.call(this,e)),"modalRef",pe.createRef()),de(V(n),"element",void 0),de(V(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.modalRef.current);na(e,t,n.onOutsideClickHandler)}),n.element=ea(),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)),this.props.backdropClose&&this.state.open&&f.add(this.modalRef.current);var e=ta({element:this.element,containerClassName:".Overlay-container",elementRef:this.modalRef});this.setState({zIndex:e})}},{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=ta({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef}),this.setState({zIndex:e,open:!0,animate:!0}),(this.props.closeOnEscape||this.props.backdropClose)&&f.add(this.modalRef.current)):(this.setState({animate:!1},function(){window.setTimeout(function(){t.setState({open:!1})},120)}),(this.props.closeOnEscape||this.props.backdropClose)&&f.remove(this.modalRef.current)))}},{key:"onOutsideClickHandler",value:function(e){var t=this.props,n=t.closeOnEscape,r=t.backdropClose,t=t.onClose;this.state.open&&f.isTopOverlay(this.modalRef.current)&&((n||r)&&f.remove(this.modalRef.current),t?t(e,"OutsideClick"):"function"==typeof r&&r(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=me({Modal:!0,"Modal--open":n,"Modal-animation--open":t,"Modal-animation--close":!t},o),o=me((de(o={},"Modal-header",!0),de(o,"Modal-header--withSeperator",f),o)),f=me((de(h={},"Modal-footer",!0),de(h,"Modal-footer--withSeperator",f),h)),h=me((de(h={},"Row",!0),de(h,"Overlay-container",!0),de(h,"Overlay-container--open",n),h)),y=c||l||p||u,y=me((de(m={},"Modal-body",!0),de(m,"Modal-body--withMargin",!y||!!p),de(m,"Modal-body--withPadding",!y||!p),m)),m=ge(this.props),h=pe.createElement(En,{"data-test":"DesignSystem-ModalContainer",className:h,"data-layer":!0,"data-opened":n,style:{zIndex:e||1001}},pe.createElement(x,he({"data-test":"DesignSystem-Modal"},m,{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)&&pe.createElement("div",{className:o},pe.createElement(x,null,!u&&pe.createElement(Xi,he({"data-test":"DesignSystem-Modal--header"},c)),!!u&&u),pe.createElement(x,{className:"flex-grow-0"},pe.createElement(ma,{tooltip:"Close",position:"bottom"},pe.createElement(be,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Modal--CloseButton",onClick:function(e){d&&d(e,"IconClick")}})))),n&&s&&pe.createElement(pe.Fragment,null,c||l||p||u?pe.createElement(Qi,{className:y},this.props.children):s),(!!p||!!l)&&pe.createElement(Ji,he({"data-test":"DesignSystem-Modal--footer"},l,{open:n,className:f}),p))),e=i?pe.createElement(vn,{ref:this.modalRef,"data-test":"DesignSystem-Modal--OutsideClick",onOutsideClick:this.onOutsideClickHandler},h):h,m=v.createPortal(e,this.element);return pe.createElement(pe.Fragment,null,m,pe.createElement(oe,{open:this.state.animate,zIndex:r}))}}]),r}()),r=(de(n,"defaultProps",{dimension:"medium"}),function(){e(r,pe["Component"]);var t=h(r);function r(e){var n;return d(this,r),de(V(n=t.call(this,e)),"modalRef",pe.createRef()),de(V(n),"element",void 0),de(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)})}),de(V(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.modalRef.current);na(e,t,n.onOutsideClickHandler)}),n.element=ea(),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=ta({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=me({FullscreenModal:!0,"FullscreenModal-animation--open":t,"FullscreenModal-animation--close":!t},o),o=me((de(t={},"Overlay-container",!0),de(t,"Overlay-container--open",n),t)),t=ge(this.props),o=n?pe.createElement("div",{"data-test":"DesignSystem-FullscreenModalContainer",className:o,"data-layer":!0,style:{zIndex:e}},pe.createElement("div",he({"data-test":"DesignSystem-FullscreenModal"},t,{className:r,ref:this.modalRef}),pe.createElement(En,{className:"justify-content-center"},pe.createElement(x,{medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"12"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"12"}}[i],pe.createElement(En,{className:"FullscreenModal-header"},pe.createElement(x,null,!s&&pe.createElement(Xi,he({"data-test":"DesignSystem-FullscreenModal--header"},c)),!!s&&s),pe.createElement(x,{className:"flex-grow-0"},pe.createElement(ma,{tooltip:"Close"},pe.createElement(be,{icon:"close",appearance:"transparent","data-test":"DesignSystem-FullscreenModal--CloseButton",onClick:function(e){f&&f(e,"IconClick")}})))),pe.createElement(Qi,{"data-test":"DesignSystem-FullscreenModal--Body",className:"FullscreenModal-body"},a),(!!u||!!l)&&pe.createElement(Ji,he({"data-test":"DesignSystem-FullscreenModal--footer"},l,{open:n,className:"FullscreenModal-footer"}),u))))):null,e=v.createPortal(o,this.element);return pe.createElement(pe.Fragment,null,e)}}]),r}()),va=(de(r,"defaultProps",{dimension:"medium"}),{regular:"6",large:"10"}),u=function(){e(r,pe["Component"]);var t=h(r);function r(e){var n;return d(this,r),de(V(n=t.call(this,e)),"sidesheetRef",pe.createRef()),de(V(n),"element",void 0),de(V(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.sidesheetRef.current);na(e,t,n.onOutsideClickHandler)}),n.element=ea(),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)),this.props.backdropClose&&this.state.open&&f.add(this.sidesheetRef.current);var e=ta({element:this.element,containerClassName:".Overlay-container",elementRef:this.sidesheetRef});this.setState({zIndex:e})}},{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=ta({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.sidesheetRef}),this.setState({zIndex:e,open:!0,animate:!0}),(this.props.closeOnEscape||this.props.backdropClose)&&f.add(this.sidesheetRef.current)):(this.setState({animate:!1}),(this.props.closeOnEscape||this.props.backdropClose)&&f.remove(this.sidesheetRef.current)))}},{key:"onOutsideClickHandler",value:function(e){var t=this.props,n=t.backdropClose,r=t.closeOnEscape,t=t.onClose;this.state.open&&f.isTopOverlay(this.sidesheetRef.current)&&((n||r)&&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,t=this.state,n=t.animate,r=t.open,t=t.zIndex,o=this.props,i=o.className,a=o.backdropClose,s=o.dimension,c=o.footer,u=o.seperator,l=o.stickFooter,f=o.headerOptions,p=o.footerOptions,d=o.header,h=o.onClose,o=t?t-1:1e3,i=me({Sidesheet:!0,"Sidesheet--open":r,"Sidesheet-animation--open":n,"Sidesheet-animation--close":!n},i),n=me((de(y={},"Overlay-container",!0),de(y,"fade-in",n),de(y,"Overlay-container--open",n),de(y,"Overlay-container--close",!n),y)),y=me((de(y={},"Sidesheet-header",!0),de(y,"Sidesheet-header--withSeperator",u),y)),u=me((de(m={},"Sidesheet-footer",!0),de(m,"Sidesheet-footer--withSeperator",u),de(m,"Sidesheet-footer--stickToBottom",l),m)),l=me((de(m={},"Sidesheet-body",!0),de(m,"Sidesheet-body--withMargin",!!c&&l),m)),m=me((de(m={},"Sidesheet-header--shiftRight",(null==f?void 0:f.backButton)||(null==f?void 0:f.backIcon)),de(m,"Sidesheet-header--shiftLeft",!(null!=f&&f.backButton||null!=f&&f.backIcon)),m)),g=ge(this.props),n=pe.createElement(En,{"data-test":"DesignSystem-SidesheetContainer","data-open":this.state.open,className:n,"data-layer":!0,style:{zIndex:t||1001},ref:this.sidesheetRef,onAnimationEnd:function(){return e.handleAnimationEnd}},pe.createElement(x,he({"data-test":"DesignSystem-Sidesheet"},g,{className:i,size:va[s]}),pe.createElement("div",{className:y},pe.createElement(x,{"data-test":"DesignSystem-Sidesheet--Header"},!d&&pe.createElement(Xi,he({headingClass:m},f)),!!d&&d),pe.createElement(x,{className:"flex-grow-0"},pe.createElement(ma,{tooltip:"Close"},pe.createElement(be,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Sidesheet--CloseButton",onClick:function(e){h&&h(e,"IconClick")}})))),pe.createElement(Qi,{"data-test":"DesignSystem-Sidesheet--OverlayBody",className:l},this.props.children),(!!c||!!p)&&pe.createElement(Ji,he({"data-test":"DesignSystem-Sidesheet--Footer"},p,{open:r,className:u}),c))),t=a?pe.createElement(vn,{ref:this.sidesheetRef,"data-test":"DesignSystem-Sidesheet--OutsideClick",onOutsideClick:this.onOutsideClickHandler},n):n,g=v.createPortal(t,this.element);return pe.createElement(pe.Fragment,null,g,pe.createElement(oe,{open:this.state.animate,zIndex:o}))}}]),r}(),o=(de(u,"defaultProps",{dimension:"regular",stickFooter:!1,headerOptions:{}}),function(e){var t=e.title,n=e.description,r=e.className,e=ge(e),r=me({"Modal-description":!0},r);return pe.createElement("div",he({"data-test":"DesignSystem-ModalDescription"},e,{className:r}),t&&pe.createElement(ve,{weight:"strong","data-test":"DesignSystem-ModalDescription--Title"},t),t&&n&&pe.createElement("br",null),n&&pe.createElement(ve,{"data-test":"DesignSystem-ModalDescription--Description"},n))}),ba=(o.displayName="ModalDescription",ra.displayName="Pagination",ra.defaultProps={type:"basic",page:1,totalPages:1,pageJumpDebounceDuration:750},["startDate","endDate","yearNav","monthNav","open","inputFormat","outputFormat","startInputOptions","endInputOptions","validators","withInput","position","disabledBefore","disabledAfter","onRangeChange","rangeLimit"]),p=function(){e(c,pe["Component"]);var s=h(c);function c(e){d(this,c),de(V(l=s.call(this,e)),"monthsInView",void 0),de(V(l),"getDate",function(e,t){var n=l.props.inputFormat;return{startValue:e?O(n,e):"",endValue:t?O(n,t):""}}),de(V(l),"getErrors",function(e,t){function n(e){var t=(n=l.props).disabledBefore,n=n.disabledAfter,r=(t=$(t)).year,o=t.month,t=t.date,i=(n=$(n)).year,a=n.month,n=n.date;return!e||Y(e,"less",r,o,t)||Y(e,"more",i,a,n)}var r=n(e),o=n(t),t=$(t),i=t.year,a=t.month,t=t.date;return Y(e,"more",i,a,t)&&(o=r=!0),{startError:r,endError:o}}),de(V(l),"getInRangeError",function(){var e=l.props.rangeLimit;if(e){var t,n=l.state,r=n.startDate,n=n.endDate,o=$(r),i=o.year,a=o.month,o=o.date,s=$(n),c=s.year,u=s.month,s=s.date;if(r)return(t=new Date(r)).setDate(o+e),Y(t,"less",c,u,s+1);if(n)return(t=new Date(n)).setDate(s-e),Y(t,"more",i,a,o-1)}return!1}),de(V(l),"onRangeChangeHandler",function(e,t){l.setState({init:!0,startDate:e,endDate:t,startValue:e?O(l.props.inputFormat,e):"",endValue:t?O(l.props.inputFormat,t):""})}),de(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=y(e.startDate,t,n),t=y(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=y(this.props.startDate,n,r),n=O(n,r),this.setState({startDate:r,startValue:n})),e.endDate!==this.props.endDate&&(n=(r=this.props).inputFormat,r=r.validators,r=y(this.props.endDate,n,r),n=O(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=O(e,r),e=O(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=W(e,ba),a=this.state,s=a.startDate,c=a.endDate,u=a.yearNav,a=a.monthNav;return pe.createElement(It,he({},e,{monthsInView:this.monthsInView,rangePicker:!0,startDate:y(s,t,n),endDate:y(c,t,n),disabledBefore:y(r,t,n),disabledAfter:y(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=me((de(e={},"DateRangePicker",!0),de(e,"DateRangePicker--".concat(l),l),e));return n?(e=u?pe.createElement(ia,{inputFormat:a,inputOptions:i,validators:c,state:this.state,setState:this.setState.bind(this)}):pe.createElement(oa,{inputFormat:a,startInputOptions:r,endInputOptions:o,validators:c,state:this.state,setState:this.setState.bind(this)}),pe.createElement(da,{trigger:e,triggerClass:"w-100",className:l,position:s,appendToBody:!0,open:f,onToggle:this.onToggleHandler},t,this.renderCalendar())):this.renderCalendar()}}]),c}(),c=(de(p,"utils",{getCurrentWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:aa(t-e+1),endDate:aa(t-e+7)}},getPreviousWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:aa(t-e-6),endDate:aa(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:aa(e-90),endDate:aa(e)}},getCustomDates:function(){return{startDate:"",endDate:""}},getCurrentYear:function(){return(new Date).getFullYear()},getCurrentMonth:function(){return(new Date).getMonth()}}),de(p,"defaultProps",q(q({},It.defaultProps),{},{children:pe.createElement(pe.Fragment,null),contentAlign:"left",monthsInView:void 0,position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[P],inputOptions:{label:"Date"},startInputOptions:{label:"Start Date"},endInputOptions:{label:"End Date"}})),function(e){e=e.children;return pe.createElement(pe.Fragment,null,e)}),wa=(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}))}),Sa=function(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble},_a=function(e){return null!=e},Ea=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)}},Ca=function(e){return{type:"FILE_TOO_LARGE",message:"File is larger than ".concat(e," bytes")}},Oa=function(e){return{type:"FILE_TOO_SMALL",message:"File is smaller than ".concat(e," bytes")}},xa=function(e,t){e="application/x-moz-file"===e.type||wa(e,t);return[e,e?null:Ea(t)]},ka=function(e,t,n){if(_a(e.size))if(_a(t)&&_a(n)){if(e.size>n)return[!1,Ca(n)];if(e.size<t)return[!1,Oa(t)]}else{if(_a(t)&&e.size<t)return[!1,Oa(t)];if(_a(n)&&e.size>n)return[!1,Ca(n)]}return[!0,null]},Da=new Map([["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["png","image/png"],["bmp","image/bmp"],["tif","image/tiff"],["tiff","image/tiff"],["apng","image/apng"],["avif","image/avif"],["jfif","image/jpeg"],["pjpeg","image/pjpeg"],["pjp","image/jpeg"],["svg","image/svg+xml"],["webp","image/webp"],["cur","image/x-win-bitmap"],["MTS","model/vnd.mts"],["roq","video"],["f4a","video"],["f4b","video"],["drc","video"],["nsv","video"],["avi","video/x-msvideo"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["webm","video/webm"],["flv","video/x-flv"],["vob","video/x-ms-vob"],["ogv","video/ogg"],["ogg","application/ogg"],["gifv","image/gif"],["mng","video/x-mng"],["M2TS","video/MP2T"],["TS","video/mp2t"],["qt","video/quicktime"],["wmv","video/x-ms-wmv"],["yuv","application/octet-stream"],["rm","application/vnd.rn-realmedia"],["rmvb","application/vnd.rn-realmedia-vbr"],["viv","video/vnd.vivo"],["asf","video/x-ms-asf"],["amv","video/x-amv"],["m4v","video/x-m4v"],["mpg","video/mpeg"],["mpeg","video/mpeg"],["mpe","video/mpeg"],["mpv","video/mpv"],["m2v","video/mpeg"],["svi","video/x-msvideo"],["3gp","video/3gpp"],["3g2","video/3gpp2"],["mxf","application/mxf"],["flv","video/x-flv"],["f4v","video/x-f4v"],["f4p","video/mp4"],["aa","audio"],["aax","audio"],["act","audio"],["alac","audio"],["ape","audio"],["awb","audio"],["dss","audio"],["dvf","audio"],["iklax","audio"],["ivs","audio"],["msv","audio"],["nmf","audio"],["mogg","audio"],["raw","audio"],["rf64","audio"],["sln","audio"],["wv","audio"],["8svx","audio"],["3gp","audio/3gpp"],["mp2","audio/mpeg"],["aac","audio/x-aac"],["aiff","audio/x-aiff"],["amr","audio/amr"],["au","audio/basic"],["flac","audio/x-flac"],["gsm","audio/gsm"],["m4a","audio/mp4a-latm"],["m4b","audio/mp4a-latm"],["m4p","audio/mp4a-latm"],["mmf","application/vnd.smaf"],["mp3","audio/mpeg"],["ogg","audio/ogg"],["oga","audio/ogg"],["opus","audio/opus"],["tta","audio/x-tta"],["voc","audio/x-voice"],["wav","audio/x-wav"],["wma","audio/x-ms-wma"],["webm","audio/webm"],["cda ","application/x-cdf"],["ra","audio/x-pn-realaudio"],["vox","application/x-authorware-bin"],["rm","application/vnd.rn-realmedia"],["mpc","application/vnd.mophun.certificate"],["pdf","application/pdf"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["xlss","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xls","application/vnd.ms-excel"],["odt","application/vnd.oasis.opendocument.text"],["tex","application/x-tex"],["wpd","application/wordperfect"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["csv","text/csv"],["rtf","text/rtf"],["txt","text/plain"],["tsv","text/tab-separated-values"]]),ja=[".DS_Store","Thumbs.db"];function Ta(){return(Ta=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 Ma.apply(this,arguments)}(n.dataTransfer,n.type):(null!==(t=n).target&&t.target.files?Pa(t.target.files):[]).map(function(e){return Ia(e)}));case 1:case"end":return e.stop()}var t},e)}))).apply(this,arguments)}function Ia(e,t){var n,r=function(e){var t=e.name;t&&-1!==t.lastIndexOf(".")&&!e.type&&(t=t.split(".").pop().toLowerCase(),t=Da.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 Ma(){return(Ma=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){if(r=Pa(t.items).filter(function(e){return"file"===e.kind}),"drop"!==n)return e.abrupt("return",r);e.next=4}else e.next=8;break;case 4:return e.next=6,Promise.all(r.map(Aa));case 6:return o=e.sent,e.abrupt("return",Na(function n(e){return e.reduce(function(e,t){return[].concat(G(e),G(Array.isArray(t)?n(t):[t]))},[])}(o)));case 8:return e.abrupt("return",Na(Pa(t.files).map(function(e){return Ia(e)})));case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Na(e){return e.filter(function(e){return-1===ja.indexOf(e.name)})}function Pa(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function Aa(e){var t;return"function"==typeof e.webkitGetAsEntry&&(t=e.webkitGetAsEntry())&&t.isDirectory?Fa(t):Ra(e)}function Ra(e){var t=e.getAsFile();return t?(t=Ia(t),Promise.resolve(t)):Promise.reject("".concat(e," is not a File"))}function La(e){return za.apply(this,arguments)}function za(){return(za=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?Fa:function(){return Ba.apply(this,arguments)})(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Fa(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(La)),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 Ba(){return(Ba=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=Ia(e,r.fullPath);t(e)},function(e){n(e)})}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ka(e){function t(){R&&setTimeout(function(){var e;!k.current||(e=k.current.files)&&e.length||(j({type:"closeDialog"}),"function"==typeof _&&_())},300)}function n(e){e.target instanceof HTMLDivElement&&x.current&&x.current.contains(e.target)||(e.preventDefault(),M.current=[])}function a(e){return p?null:e}var r,o,i,s,c,u,l,f=e.accept,p=e.disabled,d=e.maxSize,h=e.minSize,y=e.multiple,m=e.onDragEnter,g=e.onDragLeave,v=e.onDragOver,b=e.onDrop,w=e.onDropAccepted,S=e.onDropRejected,_=e.onFileDialogCancel,E=e.getFilesFromEvent,C=e.preventDropOnDocument,O=e.validator,x=Object(pe.useRef)(null),k=Object(pe.useRef)(null),D=(e=ye(Object(pe.useReducer)(la,Ga),2))[0],j=e[1],e=D.isFocused,R=D.isFileDialogActive,T=D.draggedFiles,L=Object(pe.useCallback)(function(){k.current&&(j({type:"openDialog"}),k.current.value="",k.current.click())},[j]),z=(Object(pe.useEffect)(function(){return window.addEventListener("focus",t,!1),function(){window.removeEventListener("focus",t,!1)}},[k,R,_]),Object(pe.useCallback)(function(e){x.current&&x.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),L()))},[x,k])),F=Object(pe.useCallback)(function(){j({type:"focus"})},[]),I=Object(pe.useCallback)(function(){j({type:"blur"})},[]),M=Object(pe.useRef)([]),B=(Object(pe.useEffect)(function(){return C&&(document.addEventListener("dragover",ca,!1),document.addEventListener("drop",n,!1)),function(){C&&(document.removeEventListener("dragover",ca),document.removeEventListener("drop",n))}},[x,C]),Object(pe.useCallback)(function(t){t.preventDefault(),t.persist(),M.current=[].concat(G(M.current),[t.target]),sa(t)&&Promise.resolve(E(t)).then(function(e){Sa(t)||(j({draggedFiles:e,isDragActive:!0,type:"setDraggedFiles"}),m&&m(t))})},[E,m])),K=Object(pe.useCallback)(function(e){if(e.preventDefault(),e.persist(),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return sa(e)&&v&&v(e),!1},[v]),H=Object(pe.useCallback)(function(e){e.preventDefault(),e.persist();var t=M.current.filter(function(e){return x.current&&x.current.contains(e)}),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),0<(M.current=t).length||(j({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),sa(e)&&g&&g(e))},[x,g]),N=Object(pe.useCallback)(function(t){t.preventDefault(),t.persist(),M.current=[],sa(t)&&Promise.resolve(E(t)).then(function(e){var a,s;Sa(t)||(a=[],s=[],e.forEach(function(e){var t=ye(xa(e,f),2),n=t[0],t=t[1],r=ye(ka(e,h,d),2),o=r[0],r=r[1],i=O?O(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}))}),j({acceptedFiles:a,fileRejections:s,type:"setFiles"}),b&&b(t,a,s),0<s.length&&S&&S(t,s),0<a.length&&w&&w(t,a))}),j({type:"reset"})},[y,f,h,d,E,b,w,S]),z=Object(pe.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=W(e,Wa);return q(de({onDragEnter:a(ua(n,B)),onDragOver:a(ua(r,K)),onDragLeave:a(ua(o,H)),onDrop:a(ua(i,N))},t,x),e)}},[x,z,F,I,B,K,H,N,p]),U=Object(pe.useCallback)(function(e){e.stopPropagation()},[]),F=Object(pe.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=W(e,Va);return q(q({},de({accept:f,multiple:y,type:"file",style:{display:"none"},onChange:a(ua(n,N)),onClick:a(ua(r,U)),autoComplete:"off",tabIndex:-1},t,k)),e)}},[k,f,y,N,p]),P=0<(I=T.length)&&(A=(P={accept:f,minSize:h,maxSize:d,multiple:y,files:T}).files,r=P.accept,o=P.minSize,i=P.maxSize,!(!P.multiple&&1<A.length))&&A.every(function(e){var t=ye(xa(e,r),1)[0],e=ye(ka(e,o,i),1)[0];return t&&e}),A=0<I&&!P,I=A?(s=(I={accept:f,minSize:h,maxSize:d,multiple:y,files:T}).files,c=I.accept,u=I.minSize,l=I.maxSize,!I.multiple&&1<s.length?"TOO_MANY_FILES":(I=s.every(function(e){return!ye(xa(e,c),1)[0]}),s=s.every(function(e){return!ye(ka(e,u,l),1)[0]}),I?"FILE_INVALID_TYPE":s?"FILE_TOO_LARGE":"")):"";return q(q({},D),{},{isDragAccept:P,isDragReject:A,getRootProps:z,getInputProps:F,rootRef:x,inputRef:k,draggedFiles:T,fileError:I,isFocused:e&&!p,open:a(L)})}function Ha(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=me(de({},"FileUploaderButton",!0),a);return pe.createElement("div",he({},e,{className:a}),pe.createElement(be,{type:"button",disabled:o,icon:"backup"},r),pe.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 Ua(e,t,n){var r=e.sortingList,e=e.updateSortingList,o=(r=G(r)).findIndex(function(e){return e.name===t});-1!==o&&(r=[].concat(G(r.slice(0,o)),G(r.slice(o+1)))),"unsort"!==n&&r.push({name:t,type:n}),e(r)}function qa(e,t,n){(0,e.updateColumnSchema)(t,{pinned:"unpin"!==n?n:void 0})}var Wa=["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnterCallback","onDragOverCallback","onDragLeaveCallback","onDropCallback"],Va=["refKey","onChange","onClick"],Ga={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};Ka.displayName="DropzoneBase",Ka.defaultProps={disabled:!1,getFilesFromEvent:function(e){return Ta.apply(this,arguments)},maxSize:1/0,minSize:0,multiple:!0,preventDropOnDocument:!0,validator:function(){return null}};q(q({},Ka.defaultProps),{},{type:"standard"}),Ha.defaultProps={uploadButtonLabel:"Upload files",disabled:!"FileUploaderFormat",multiple:!1},Ha.displayName="FileUploaderButton",Object.assign({},Ha.defaultProps,{title:"Upload files",sizeLabel:"Maximum size: 25 MB"});function Ya(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 $a(e,t,n,r){var o,i=G(e),a=j(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;(e[s].disabled&&r||!e[s].disabled)&&(i[s]=q(q({},i[s]),n))}}catch(e){a.e(e)}finally{a.f()}return i}function Za(e,t){var n=q({},t);return e.translate&&(t=e.translate(t),n[e.name]=null!==t&&"object"===Z(t)?q(q({},n[e.name]),t):t),null!==n[e.name]&&"object"===Z(n[e.name])||(n[e.name]={title:n[e.name]}),n}function Ja(e,t){return Math.ceil(e/t)}function Xa(e,t){var n,r;return(e=e.filter(function(e){return e.disabled&&t||!e.disabled})).length?(n=e.some(function(e){return!e._selected}),r=e.every(function(e){return!e._selected}),{indeterminate:e=0<=e.length&&n&&!r,checked:!e&&!r}):{indeterminate:!1,checked:!1}}function Qa(e){return e&&!!e.length}function es(e){var t=(r=pe.useContext(ds)).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 ts(e){var t=pe.useContext(ds),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,m=t.ref,t=t.withCheckbox,g=o.name,v=o.hidden,b=o.pinned,w=(_={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===(_=o.cellType)?"DEFAULT":_]).width,S=void 0===(S=_.minWidth)?96:S,_=void 0===(_=_.maxWidth)?800:_,E=(O=ye(pe.useState(!1),2))[0],C=O[1],O=me({"Grid-cell":!0,"Grid-cell--head":n,"Grid-cell--dragged":E&&h,"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:pe.createElement("div",{key:"".concat(a,"-").concat(s),className:O,draggable:n&&h,onDragStart:function(e){h&&(C(!0),e.dataTransfer.setData("name",g),b)&&e.dataTransfer.setData("type",b)},onDrag:function(){C(!1)},onDragOver:function(e){return e.preventDefault()},onMouseUpCapture:function(){C(!1)},onDragEnd:function(e){e.preventDefault(),C(!1)},onDrop:function(e){var t;h&&(C(!1),(e={name:e.dataTransfer.getData("name"),type:e.dataTransfer.getData("type")}).type===(t={name:g,type:b||""}).type)&&d&&d(e.name,t.name)},style:{width:Ya({ref:m,withCheckbox:t},o.width||w),minWidth:Ya({ref:m,withCheckbox:t},o.minWidth||S),maxWidth:Ya({ref:m,withCheckbox:t},o.maxWidth||_)}},n?pe.createElement(ys,{colIndex:s,schema:o,onSelectAll:u,onMenuChange:l,onFilterChange:f,updateColumnSchema:p,reorderColumn:d,setIsDragged:C}):pe.createElement(ms,{rowIndex:a,colIndex:s,data:i,schema:o,expandedState:c}))}function ns(e){function t(e,t,r){var n;return e.length?(n=me((de(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),de(n,"Grid-cellGroup--main",!r),n)),pe.createElement("div",{className:n},t&&u?pe.createElement("div",{className:"Grid-cell Grid-cell--head Grid-cell--checkbox"},l?pe.createElement(M,null):pe.createElement(Fe,he({},f,{onChange:o}))):null,e.map(function(e,t){var n="left"===r?t:p.length+t;return"right"===r&&(n+=d.length),pe.createElement(ts,{key:"".concat(n),firstCell:!t,colIndex:n,isHead:!0,schema:e,onSelectAll:o,onMenuChange:i,onFilterChange:a,updateColumnSchema:s,reorderColumn:c})}))):null}var n=pe.useContext(ds),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 pe.createElement("div",{className:"Grid-head","data-test":"DesignSystem-GridHead-wrapper"},pe.createElement("div",{className:"Grid-row Grid-row--head"},t(p,!!p.length,"left"),t(d,!p.length&&!!d.length),t(n,!1,"right")))}function rs(e){function t(e,t,r){var n;return e.length?(n=me((de(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),de(n,"Grid-cellGroup--main",!r),n)),pe.createElement("div",{className:n,"data-test":"DesignSystem-Grid-cellGroup"},t&&i?pe.createElement("div",{className:"Grid-cell Grid-cell--body Grid-cell--checkbox",onClick:function(e){return e.stopPropagation()}},o?pe.createElement(M,null):pe.createElement(Fe,{checked:!!c._selected,onChange:function(e){l(u,e.target.checked)}})):null,e.map(function(e,t){var n="left"===r?t:m.length+t;return"right"===r&&(n+=v.length),pe.createElement(ts,{key:"".concat(u,"-").concat(n),rowIndex:u,colIndex:n,firstCell:!t,schema:e,data:c,expandedState:[p,d]})}))):null}var n=(a=pe.useContext(ds)).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=pe.useRef(null),p=(h=ye(pe.useState(!1),2))[0],d=h[1],h=me("Grid-row","Grid-row--body",{"Grid-row--selected":c._selected,"Grid-row--disabled":c.disabled}),y=pe.useCallback(function(){"resource"!==n||o||r&&r(c,u)},[c,u]),m=(g=s.filter(function(e){return!e.hidden&&e.pinned})).filter(function(e){return!e.hidden&&"left"===e.pinned}),g=g.filter(function(e){return!e.hidden&&"right"===e.pinned}),v=s.filter(function(e){return!e.hidden&&!e.pinned}),s=me(e,{"Grid-rowWrapper":!0});return pe.createElement("div",{className:s},pe.createElement("div",{"data-test":"DesignSystem-Grid-row",className:h,onClick:y,ref:f},t(m,!!m.length,"left"),t(v,!m.length&&!!v.length),t(g,!1,"right")),a&&p&&pe.createElement("div",{className:"Grid-nestedRow"},pe.createElement(es,{data:c,rowIndex:u})))}function os(e){var n,t,r,o,i=(d=pe.useContext(ds)).data,a=d.ref,s=d.loading,c=d.error,u=d.withPagination,l=d.page,f=d.pageSize,p=d.totalRecords,d=d.errorTemplate;return!s&&c?d?"function"==typeof d?d({}):d:null:(n=e.schema,t=e.prevPageInfo,r=e.updatePrevPageInfo,o=e.onSelect,pe.useEffect(function(){var e=a.querySelector(".Grid-body");return e&&window.requestAnimationFrame(function(){t.page===l&&(e.scrollTop=t.scrollTop)}),function(){e&&r({page:l,scrollTop:e.scrollTop})}},[]),c=Math.ceil(p/f),d=u&&l===c?p-(l-1)*f:s?f:u?Math.min(p,f):p,pe.createElement("div",{className:"Grid-body"},(s&&!i.length?G(Array(d).map(function(e){return e})):i).map(function(e,t){return t=t,e=e,pe.createElement(rs,{key:t,rowIndex:t,data:e||i[t],schema:n,onSelect:o})})))}function is(e){var t=e.tooltip;return null!=(e=e.cellData.title)?t?pe.createElement(ma,{tooltip:e,position:"top-start",triggerClass:"w-100 overflow-hidden"},pe.createElement(ve,{className:"w-100 ellipsis"},e)):pe.createElement(ve,{className:"w-100 ellipsis"},e):null}function as(e){return(e=e.cellData.metaList)?pe.createElement("div",{className:"GridCell-metaList","data-test":"DesignSystem-GridCell-metaList"},e.map(function(e,t){return pe.createElement(ve,{key:t,className:"ellipsis",appearance:"subtle",size:"small"},e)})):null}function ss(e){var t=(e=e.cellData).firstName,n=e.lastName,e=e.title;return t||n?pe.createElement(ie,{className:"mr-5",firstName:t,lastName:n}):e?pe.createElement(ie,{className:"mr-5"},e):null}function cs(e){var t,n,r=e.size,o=e.schema,i=e.loading,e=i?{}:Za(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=me(de({},"GridCell",!0));switch(s){case"DEFAULT":return pe.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--default")},i?pe.createElement(I,{length:"medium","data-test":"DesignSystem-GridCell-placeHolder"}):is({tooltip:l,cellData:f}));case"WITH_META_LIST":return pe.createElement("div",{className:"".concat(p," GridCell--metaList")},i?pe.createElement(pe.Fragment,null,pe.createElement(I,{length:"medium","data-test":"DesignSystem-GridCell-withMetaList"}),pe.createElement(I,{length:"large",size:"xxs"})):pe.createElement(pe.Fragment,null,is({tooltip:l,cellData:f}),as({cellData:f})));case"AVATAR":return i?pe.createElement(M,{className:"GridCell--align-".concat(u),imageSize:"medium",round:!0}):pe.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--avatar"),"data-test":"DesignSystem-GridCell-avatar"},"tight"!==r&&ss({cellData:f}));case"AVATAR_WITH_TEXT":return i?pe.createElement(M,{imageSize:"medium",round:!0},pe.createElement(I,{className:"ml-3",length:"medium"})):pe.createElement("div",{className:"".concat(p," "),"data-test":"DesignSystem-GridCell-avatarWithText"},"tight"!==r&&ss({cellData:f}),is({tooltip:l,cellData:f}));case"AVATAR_WITH_META_LIST":return i?pe.createElement(M,{imageSize:"medium",round:!0},pe.createElement(I,{className:"ml-3",length:"medium"}),pe.createElement(I,{className:"ml-3",length:"large"})):pe.createElement("div",{className:"".concat(p," GridCell--avatarWithText"),"data-test":"DesignSystem-GridCell-avatarWithMetaList"},"tight"!==r&&ss({cellData:f}),pe.createElement("div",{className:"GridCell-metaListWrapper"},is({tooltip:l,cellData:f}),as({cellData:f})));case"ICON":return i?pe.createElement(M,{className:"GridCell--align-".concat(u),imageSize:"small",round:!0}):pe.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)?pe.createElement(N,{name:t}):null));case"STATUS_HINT":return pe.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--statusHint")},i?pe.createElement(M,{className:"w-75 flex-grow-0",imageSize:"small",round:!0},pe.createElement(I,{length:"large"})):(n=(n={cellData:f}).cellData,t=n.statusAppearance,(n=n.title)?pe.createElement(Cn,{appearance:t},n):null))}return null}function us(e){var t=e.options,n=e.onChange,r=(e=ye(pe.useState(!1),2))[0],o=e[1],i=(e=ye(pe.useState(t),2))[0],a=e[1],s=(e=ye(pe.useState("var(--spacing-8)"),2))[0],c=e[1];return pe.useEffect(function(){a(t)},[r]),pe.createElement("div",{className:"Dropdown"},pe.createElement(da,{open:r,onToggle:function(e){o(e)},trigger:pe.createElement(be,{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(ps(t.length))),triggerClass:"w-100",customStyle:{width:s},className:"Header-draggableDropdown"},pe.createElement("div",{className:"Dropdown-wrapper"},pe.createElement("div",{className:"OptionWrapper"},pe.createElement(Fe,{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 q(q({},e),{},{selected:t.target.checked})}))}})),i.map(function(e,r){return pe.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(fs(i,e,r))}},pe.createElement(Fe,{className:"OptionCheckbox",name:e.value,label:e.label,checked:i[r].selected,onChange:function(e){return e=e,t=r,(n=G(i))[t]=q(q({},n[t]),{},{selected:e.target.checked}),void a(n);var t,n}}),pe.createElement(N,{name:"drag_handle",className:"mr-4"}))})),pe.createElement("div",{className:"Dropdown-buttonWrapper"},pe.createElement(be,{type:"button",className:"mr-4",size:"tiny",onClick:function(){o(!1)}},"Cancel"),pe.createElement(be,{type:"button",appearance:"primary",size:"tiny",onClick:function(){o(!1),n&&n(i)}},"Apply"))))}function ls(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,m=e.onSelectAll,g=e.searchPlaceholder,v=e.selectAll,b=e.searchTerm,w=e.updateSearchTerm,S=e.dynamicColumn,_=e.allowSelectAll,E=e.showFilters,e=e.customSelectionLabel,C=(D=ye(pe.useState(!1),2))[0],O=D[1],x=(D=ye(pe.useState(!0),2))[0],k=D[1],D=(pe.useEffect(function(){k(!x)},[o]),pe.useEffect(function(){v&&v.checked&&m&&m(!0,C)},[C]),pe.useEffect(function(){v&&!v.checked&&O(!1)},[v]),o.filter(function(e){return e.filters})),j=o.map(function(e){return{label:e.displayName,value:e.name,selected:!e.hidden}}),e=e||"item",r=r.filter(function(e){return e._selected}).length,T=(c-1)*u+1,c=Math.min(c*u,y),u=n?"Showing 0 ".concat(e,"s"):l&&r?C?"Selected all ".concat(y," ").concat(e).concat(ps(y)):"Selected ".concat(r," ").concat(e).concat(ps(y)," on this page"):(s?"Showing ".concat(T,"-").concat(c," of "):"Showing ").concat(y," ").concat(e).concat(ps(y));return pe.createElement("div",{className:"Header"},pe.createElement("div",{className:"Header-content Header-content--top"},i&&pe.createElement("div",{className:"Header-search"},pe.createElement(on,{"data-test":"DesignSystem-Table-Header--withSearch",name:"GridHeader-search",icon:"search",placeholder:g,onChange:function(e){e=e.target.value;w&&w(e)},value:b,onClear:function(){return w&&w("")},disabled:t&&!Qa(o),autoComplete:"off"})),E&&0<D.length&&pe.createElement("div",{className:"Header-dropdown"},pe.createElement("div",{className:"Header-filters"},D.map(function(e){var n=e.name,t=e.displayName,e=e.filters,e=e?e.map(function(t){return q(q({},t),{},{selected:d[n]&&-1!==d[n].findIndex(function(e){return e===t.value})})}):[];return pe.createElement(qe,{key:n,withCheckbox:!0,showApplyButton:!0,inlineLabel:t,icon:"filter_list",options:e,onChange:function(e){var t=n;t=q(q({},d),{},de({},t,e)),h&&h(t)}})}))),f&&pe.createElement("div",{className:"Header-actions"},f)),pe.createElement("div",{className:"Header-content Header-content--bottom"},pe.createElement("div",{className:"Header-label"},!a&&l&&!t&&pe.createElement(Fe,he({},v,{onChange:function(e){m&&m(e.target.checked)}})),t?pe.createElement(M,{withImage:!a&&l},pe.createElement(I,{length:"small",size:"s"})):pe.createElement(pe.Fragment,null,pe.createElement(vt,null,u),s&&(null==v?void 0:v.checked)&&_&&pe.createElement("div",{className:"ml-4"},C?pe.createElement(be,{"data-test":"DesignSystem-Table-Header--clearSelectionItemsButton",size:"tiny",onClick:function(){return O(!1)}},"Clear Selection"):pe.createElement(be,{"data-test":"DesignSystem-Table-Header--selectAllItemsButton",size:"tiny",onClick:function(){return O(!0)}},"Select all ".concat(y," ").concat(e,"s"))))),S&&pe.createElement("div",{className:"Header-hideColumns"},pe.createElement(us,{options:j,onChange:function(e){e=e.map(function(t){return q(q({},o.find(function(e){return e.name===t.value})),{},{hidden:!t.selected})});p&&p(e)}}))))}var fs=function(e,t,n){return t===n?e:t<n?[].concat(G(e.slice(0,t)),G(e.slice(t+1,n+1)),[e[t]],G(e.slice(n+1))):[].concat(G(e.slice(0,n)),[e[t]],G(e.slice(n,t)),G(e.slice(t+1)))},ps=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},ds=pe.createContext(q(q({},n),{},{ref:null})),hs=ds.Provider,ys=function(e){function t(){return pe.createElement(pe.Fragment,null,pe.createElement(ve,{weight:"strong",className:"ellipsis--noWrap"},r.displayName),m&&pe.createElement("div",{className:"Grid-sortingIcons"},w?"asc"===w?pe.createElement(N,{name:"arrow_upward"}):pe.createElement(N,{name:"arrow_downward"}):pe.createElement(N,{name:"unfold_more"})))}var n=pe.useContext(ds),r=e.schema,a=e.setIsDragged,o=e.colIndex,i=e.onSelectAll,s=e.onMenuChange,c=e.onFilterChange,u=e.updateColumnSchema,e=e.reorderColumn,o={schema:r,colIndex:o,onSelectAll:i,onMenuChange:s,onFilterChange:c,updateColumnSchema:u,reorderColumn:e,setIsDragged:a},l=n.loading,i=n.draggable,e=n.showMenu,f=n.sortingList,p=n.filterList,d=n.headCellTooltip,h=n.showFilters,n=n.schema,y=r.sorting,m=void 0===y||y,g=r.name,y=r.filters,v=r.pinned,n=Qa(n),b=f.findIndex(function(e){return e.name===g}),w=-1!==b?f[b].type:null,S=pe.createRef(),f=[{label:"Sort Ascending",value:"sortAsc",icon:"arrow_upward"},{label:"Sort Descending",value:"sortDesc",icon:"arrow_downward"}],b=[{label:"Pin Left",value:"pinLeft",icon:"skip_previous"},{label:"Pin Right",value:"pinRight",icon:"skip_next"}],_={label:"Unpin",value:"unpin",icon:"replay"},_=("left"===v&&(b[0]=_),"right"===v&&(b[1]=_),{label:"Unsort",value:"unsort",icon:"unfold_more"}),_=("asc"===w&&(f[0]=_),"desc"===w&&(f[1]=_),[].concat(b,[{label:"Hide Column",value:"hide",icon:"cancel"}])),b=(m&&(_=[].concat(f,G(_))),me({"Grid-headCell":!0,"Grid-headCell--draggable":i})),f=y?y.map(function(t){return q(q({},t),{},{selected:p[g]&&-1!==p[g].findIndex(function(e){return e===t.value})})}):[];return pe.createElement("div",{key:g,className:b,ref:S},pe.createElement("div",{className:"Grid-cellContent","data-test":"DesignSystem-Grid-cellContent",onClick:function(){!l&&m&&("asc"===w&&s(g,"sortDesc"),"desc"===w&&s(g,"unsort"),w||s(g,"sortAsc"))}},l&&!n?pe.createElement(M,{withImage:!1},pe.createElement(I,{length:"medium"})):!r.headerCellRenderer&&d?pe.createElement(ma,{position:"top-start",triggerClass:"w-100 overflow-hidden",tooltip:r.displayName},t()):r.headerCellRenderer&&!d?r.headerCellRenderer(o):t()),h&&y&&pe.createElement(pe.Fragment,null,l&&!n?pe.createElement("span",null,pe.createElement(M,null)):pe.createElement("div",null,pe.createElement(qe,{menu:!0,showApplyButton:!0,withCheckbox:!0,triggerOptions:{customTrigger:function(){return pe.createElement(be,{icon:"filter_list",appearance:"transparent"})}},options:f,align:"left",onChange:function(e){return c(g,e)},minWidth:176}))),e&&pe.createElement(pe.Fragment,null,l&&!n?pe.createElement("span",{className:"ml-4"},pe.createElement(M,null)):pe.createElement("div",null,pe.createElement(qe,{key:"".concat(g,"-").concat(w,"-").concat(v),menu:!0,optionType:"WITH_ICON",triggerOptions:{customTrigger:function(){return pe.createElement(be,{icon:"more_vert_filled",appearance:"transparent"})}},options:_,align:"left",onChange:function(e){return s(g,e)},minWidth:176}))),r.resizable&&pe.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:u},n=g,r=S.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(!1)}}))},ms=function(e){var t=pe.useContext(ds),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=ye(o,2),c=o[0],u=o[1],o={rowIndex:i,colIndex:e,size:a,schema:r,data:n,loading:s,expanded:c},l=!es({data:n,rowIndex:i});return pe.createElement("div",{className:"Grid-cellContent"},0===e&&t&&pe.createElement(pe.Fragment,null,l?pe.createElement("span",{className:"Grid-nestedRowPlaceholder"}):pe.createElement(N,{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):pe.createElement(cs,he({key:"".concat(i,"-").concat(e)},o)))},gs=(rs.defaultProps={data:{}},function(){e(n,pe["Component"]);var t=h(n);function n(e){var i;d(this,n),de(V(i=t.call(this,e)),"gridRef",null),de(V(i),"isHeadSyncing",!1),de(V(i),"isBodySyncing",!1),de(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)}}),de(V(i),"updateRenderedSchema",function(e){var t=i.props.updateSchema;t&&t(e)}),de(V(i),"updateColumnSchema",function(t,e){var n=G(i.props.schema),r=n.findIndex(function(e){return e.name===t});n[r]=q(q({},n[r]),e),i.updateRenderedSchema(n)}),de(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=fs(e,r,o);i.updateRenderedSchema(e)}),de(V(i),"updateSortingList",function(e){var t=i.props.updateSortingList;t&&t(e)}),de(V(i),"updateFilterList",function(e){var t=i.props.updateFilterList;t&&t(e)}),de(V(i),"onMenuChange",function(e,t){var n,r,o=i.props.sortingList;switch(t){case"sortAsc":Ua({sortingList:o,updateSortingList:i.updateSortingList},e,"asc");break;case"sortDesc":Ua({sortingList:o,updateSortingList:i.updateSortingList},e,"desc");break;case"unsort":Ua({sortingList:o,updateSortingList:i.updateSortingList},e,"unsort");break;case"pinLeft":qa({updateColumnSchema:i.updateColumnSchema},e,"left");break;case"pinRight":qa({updateColumnSchema:i.updateColumnSchema},e,"right");break;case"unpin":qa({updateColumnSchema:i.updateColumnSchema},e,"unpin");break;case"hide":n={updateColumnSchema:i.updateColumnSchema},r=!0,(0,n.updateColumnSchema)(e,{hidden:r})}}),de(V(i),"onFilterChange",function(e,t){e=q(q({},i.props.filterList),{},de({},e,t));i.updateFilterList(e)}),de(V(i),"onSelect",function(e,t){var n=i.props.onSelect;n&&n(e,t)}),de(V(i),"onSelectAll",function(e){var t=i.props.onSelectAll;t&&t(e.target.checked)}),de(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=!Qa(f=f)&&l?o:f),f=me((de(o={Grid:"true"},"Grid--".concat(i),i),de(o,"Grid--".concat(a),a),o),c);return pe.createElement("div",he({className:f},e,{ref:function(e){t.gridRef=e}}),r&&pe.createElement(hs,{value:q(q({},this.props),{},{ref:this.gridRef})},s&&pe.createElement(ns,{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)}),pe.createElement(os,{key:"".concat(u),schema:l,prevPageInfo:n,updatePrevPageInfo:this.updatePrevPageInfo.bind(this),onSelect:this.onSelect.bind(this)})))}}]),n}()),vs=(de(gs,"defaultProps",void 0),gs.defaultProps=n,cs.displayName="GridCell",["children"]),r={type:"data",size:"standard",showHead:!0,showMenu:!0,multipleSorting:!0,headerOptions:{},withPagination:!0,paginationType:"jump",page:1,pageSize:15,draggable:!0,data:[],schema:[],loading:!(ls.defaultProps={schema:[],data:[],searchPlaceholder:"Search",dynamicColumn:!0,showFilters:!0}),error:!1,loaderSchema:[],sortingList:[],filterList:{},filterPosition:"GRID",searchDebounceDuration:750,pageJumpDebounceDuration:750,errorTemplate:function(e){e=e.errorType;return pe.createElement(tn,null,{FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No results found"}[void 0===e?"DEFAULT":e])}},u=function(){e(i,pe["Component"]);var o=h(i);function i(e){d(this,i),de(V(l=o.call(this,e)),"debounceUpdate",void 0),de(V(l),"updateData",function(e){l.state.async&&l.setState({loading:!0}),e?l.debounceUpdate():l.updateDataFn()}),de(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:Xa(t,l.props.selectDisabledRow),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=G(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=Za(o[r],e),t=Za(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:Xa(o,l.props.selectDisabledRow),schema:e,data:o}))}),de(V(l),"onSelect",function(e,t){var n=l.state.data,r=l.props.onSelect,o=[e],i=n;0<=e&&(i=$a(n,o,{_selected:t},l.props.selectDisabledRow),l.setState({data:i,selectAll:Xa(i,l.props.selectDisabledRow)})),r&&r(o,t,-1===e?[]:i.filter(function(e){return e._selected}))}),de(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=$a(r,o,{_selected:e},l.props.selectDisabledRow),i=[];r.forEach(function(e,t){e._selected&&i.push(t)}),n&&n(i,e,r.filter(function(e){return e._selected}),t),l.setState({data:r,selectAll:Xa(r,l.props.selectDisabledRow)})}),de(V(l),"onPageChange",function(e){l.setState({page:e})}),de(V(l),"updateSchema",function(e){l.setState({schema:e})}),de(V(l),"updateSortingList",function(e){var t=l.props.multipleSorting;l.setState({sortingList:t?G(e):e.slice(-1),page:1})}),de(V(l),"updateFilterList",function(e){l.setState({filterList:e,page:1})}),de(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:Xa([]),searchTerm:void 0},l.debounceUpdate=ue(e.searchDebounceDuration,l.updateDataFn),l}return a(i,[{key:"componentDidMount",value:function(){this.updateData()}},{key:"componentDidUpdate",value:function(e,t){var n,r,o=this;this.state.async||(e.error!==this.props.error&&(r=(n=this.props).data,n=n.schema,this.setState({data:r=void 0===r?[]:r,schema:void 0===n?[]:n,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:r.length||0,selectAll:Xa([])})),e.loading!==this.props.loading&&(r=(n=this.props).data,e=n.schema,this.setState({data:n=void 0===r?[]:r,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:Xa([])},function(){o.updateData()}))),t.page!==this.state.page&&(r=this.props.onPageChange)&&r(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||(e=t.searchTerm!==this.state.searchTerm,this.updateData(e))}},{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,m=e.pageJumpDebounceDuration,g=e.onRowClick,v=e.loaderSchema,b=e.errorTemplate,w=e.className,e=e.filterPosition,S=ge(this.props),_=l.children,l=W(l,vs),w=w?" ".concat(w):"",E=this.state.totalRecords,C=Ja(E,y);return pe.createElement("div",he({},S,{className:"Table".concat(w),"data-test":"DesignSystem-Table-wrapper"}),u&&pe.createElement("div",{className:"Table-header","data-test":"DesignSystem-Table-header"},pe.createElement(ls,he({},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),_)),pe.createElement("div",{className:"Table-grid"},pe.createElement(gs,he({},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<C,pageSize:y,loaderSchema:v,errorTemplate:b&&b({errorType:this.state.errorType}),onRowClick:g,showFilters:"GRID"===e}))),d&&!this.state.loading&&!this.state.error&&1<C&&pe.createElement("div",{className:"Table-pagination"},pe.createElement(ra,{page:this.state.page,totalPages:Ja(E,y),type:h,onPageChange:this.onPageChange,pageJumpDebounceDuration:m})))}}]),i}(),bs=(de(u,"defaultProps",r),pe.useState,pe.useEffect,pe.useState,{success:"check_circle",info:"info",warning:"warning",alert:"error"}),ws=function(e){var t=e.appearance,n=e.className,r=e.description,o=e.size,e=ge(e),n=me(de({},"InlineMessage",!0),n),i=me((de(i={},"InlineMessage-icon--warning","warning"===t),de(i,"InlineMessage-icon--small","small"===o),de(i,"InlineMessage-icon--regular","regular"===o),i)),a=me(de({},"InlineMessage-text--".concat(t),t)),s="small"===o?14:16,c="small"===o?"medium":void 0;return pe.createElement("div",he({"data-test":"DesignSystem-InlineMessage"},e,{className:n}),"default"!==t&&pe.createElement(N,{"data-test":"DesignSystem-InlineMessage--Icon",name:bs[t],appearance:t,className:i,size:s}),pe.createElement(ve,{size:o,weight:c,className:a,"data-test":"DesignSystem-InlineMessage--Description"},r))},Ss=(ws.displayName="InlineMessage",ws.defaultProps={appearance:"default",description:"",size:"regular"},function(e){var t=e.error,e=e.message;return e?t?pe.createElement(ws,{size:"small",className:"mt-3",appearance:"alert",description:e}):pe.createElement(ve,{className:"mt-3",appearance:"subtle",size:"small",weight:"medium"},e):null}),_s=(Ss.displayName="HelpText",["children","type","className","disabled","tabIndex","icon","subtle","size","iconAlign"]),Es={tiny:12,regular:16},o=pe.forwardRef(function(e,t){var n=e.children,r=e.type,o=e.className,i=e.disabled,a=e.tabIndex,s=e.icon,c=e.subtle,u=e.size,l=e.iconAlign,e=W(e,_s),c=me((de(f={},"LinkButton",!0),de(f,"LinkButton--".concat(u),u),de(f,"LinkButton--default",!c),de(f,"LinkButton--subtle",c),de(f,"LinkButton--iconAlign-".concat(l),n&&l),de(f,"".concat(o),o),f)),f=me((de(o={},"LinkButton-icon",!0),de(o,"LinkButton-icon--".concat(l),n&&l),o));return pe.createElement("button",he({ref:t,type:r,"data-test":"DesignSystem-LinkButton",className:c,disabled:i,tabIndex:a},e),pe.createElement(pe.Fragment,null,s&&pe.createElement("div",{className:f},pe.createElement(N,{"data-test":"DesignSystem-LinkButton--Icon",name:s,size:u&&Es[u]})),n))});o.displayName="LinkButton",o.defaultProps={size:"regular",type:"button",iconAlign:"left"}}.call(this,Os(23))},function(e,t,n){function o(e){var t;return(s[e]||(t=s[e]={i:e,l:!1,exports:{}},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 m(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 g=Object(o.Map)({code:{element:"pre"}}),v=u.DefaultDraftBlockRenderMap.merge(g);function b(e){return!!e&&("unordered-list-item"===(e=e.getType())||"ordered-list-item"===e)}function w(e,t,n){var r,o,i=e.getSelection(),i=i.getIsBackward()?i.getFocusKey():i.getAnchorKey(),a=e.getCurrentContent(),s=a.getBlockForKey(i),c=s.getType();return"unordered-list-item"!==c&&"ordered-list-item"!==c||!(a=a.getBlockBefore(i))||a.getType()!==c||(i=s.getDepth(),1===t&&i===n)?e:(c=Math.min(a.getDepth()+1,n),r=t,o=c,i=(s=e).getSelection(),n=(a=s.getCurrentContent()).getBlockMap(),t=l(s).map(function(e){var t=e.getDepth()+r,t=Math.max(0,Math.min(t,o));return e.set("depth",t)}),n=n.merge(t),c=a.merge({blockMap:n,selectionBefore:i,selectionAfter:i}),u.EditorState.push(e,c,"adjust-depth"))}function S(e,t){var n,r;return 13===(t=t).which&&(t.getModifierState("Shift")||t.getModifierState("Alt")||t.getModifierState("Control"))?e.getSelection().isCollapsed()?u.RichUtils.insertSoftNewline(e):p(e):(e=(t=e).getSelection()).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?w(t,-1,r):void 0:void 0:d(t)):void 0}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 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){T[e]["".concat(e.toLowerCase(),"-").concat(n)]=E({},"".concat(t),n)}function j(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach(function(e){E(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}({},T.color,{},T.bgcolor,{},T.fontSize,{},T.fontFamily,{CODE:T.CODE,SUPERSCRIPT:T.SUPERSCRIPT,SUBSCRIPT:T.SUBSCRIPT})}var T={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(T[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 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]=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 A(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 w}),t.d(e,"handleNewLine",function(){return S}),t.d(e,"getEntityRange",function(){return k}),t.d(e,"getCustomStyleMap",function(){return j}),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 A}),t.d(e,"getSelectionInlineStyle",function(){return O}),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 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 m}),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;
|
|
38
|
+
*/function l(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case di:switch(e=e.type){case wi:case Si:case yi:case gi:case mi:case Ei:return e;default:switch(e=e&&e.$$typeof){case bi:case _i:case xi:case Oi:case vi:return e;default:return t}}case hi:return t}}}function Ii(e){return l(e)===Si}var Mi={AsyncMode:wi,ConcurrentMode:Si,ContextConsumer:bi,ContextProvider:vi,Element:di,ForwardRef:_i,Fragment:yi,Lazy:xi,Memo:Oi,Portal:hi,Profiler:gi,StrictMode:mi,Suspense:Ei,isAsyncMode:function(e){return Ii(e)||l(e)===wi},isConcurrentMode:Ii,isContextConsumer:function(e){return l(e)===bi},isContextProvider:function(e){return l(e)===vi},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===di},isForwardRef:function(e){return l(e)===_i},isFragment:function(e){return l(e)===yi},isLazy:function(e){return l(e)===xi},isMemo:function(e){return l(e)===Oi},isPortal:function(e){return l(e)===hi},isProfiler:function(e){return l(e)===gi},isStrictMode:function(e){return l(e)===mi},isSuspense:function(e){return l(e)===Ei},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===yi||e===Si||e===gi||e===mi||e===Ei||e===Ci||"object"==typeof e&&null!==e&&(e.$$typeof===xi||e.$$typeof===Oi||e.$$typeof===vi||e.$$typeof===bi||e.$$typeof===_i||e.$$typeof===Di||e.$$typeof===ji||e.$$typeof===Ti||e.$$typeof===ki)},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=Mi}),Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;!function(){try{if(Object.assign){var e=new String("abc");if(e[5]="de","5"!==Object.getOwnPropertyNames(e)[0]){for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r,o=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"===o.join(""))return r={},"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")?1:void 0}}}catch(e){}}()||Object.assign;function Ni(){}function Pi(){}Function.call.bind(Object.prototype.hasOwnProperty),Pi.resetWarningCache=Ni;function Ai(){return ee[Fi]=(ee[Fi]||0)+1}function Ri(e){return Array.isArray(e)?e[0]:e}function Li(e,t){if("function"==typeof e)return qi(e,t);null!=e&&(e.current=t)}var zi=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")).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:Pi,resetWarningCache:Ni}).PropTypes=e}),Fi="__global_unique_id__",Bi=function(){},Ki=t(function(e,t){t.__esModule=!0,n(m.a);var l=n(zi),f=n(Ai);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(Bi);var y=1073741823;t.default=function(e,a){var t,s,n="__create-react-context-"+(0,f.default)()+"__",r=(h(c,s=m.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=m.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=(te(Ki),t(function(e,t){t.__esModule=!0;var n=o(m.a),r=o(Ki);function o(e){return e&&e.__esModule?e:{default:e}}t.default=n.default.createContext||r.default,e.exports=t.default})),c=te(p),Hi=c(),Ui=c(),Wi=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}Vn(e,o);var t=e.prototype;return t.componentWillUnmount=function(){this.referenceNode=null},t.render=function(){return de.createElement(Hi.Provider,{value:this.referenceNode},de.createElement(Ui.Provider,{value:this.setReferenceNode},this.props.children))},e}(de.Component),qi=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)}},Vi={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},Gi={},Yi=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&&(Li(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:Wn({},n.props.modifiers,{arrow:Wn({},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?Wn({position:n.state.data.offsets.popper.position},n.state.data.styles):Vi}),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:Gi}),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 pi(t,e,n.getOptions()))}),s(i(i(n)),"scheduleUpdate",function(){n.popperInstance&&n.popperInstance.scheduleUpdate()}),n}Vn(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&&mo(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(){Li(this.props.innerRef,null),this.destroyPopperInstance()},t.render=function(){return Ri(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}(de.Component);function $i(e){var t=e.referenceElement,n=Un(e,["referenceElement"]);return de.createElement(Hi.Consumer,null,function(e){return de.createElement(Yi,Wn({referenceElement:void 0!==t?t:e},n))})}s(Yi,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1}),pi.placements;var Zi=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){Li(t.props.innerRef,e),qi(t.props.setReferenceNode,e)}),t}Vn(e,o);var t=e.prototype;return t.componentWillUnmount=function(){Li(this.props.innerRef,null)},t.render=function(){return Bi(Boolean(this.props.setReferenceNode)),Ri(this.props.children)({ref:this.refHandler})},e}(de.Component);function Ji(t){return de.createElement(Ui.Consumer,null,function(e){return de.createElement(Zi,Wn({setReferenceNode:e},t))})}function Xi(e){var n=e.open,t=e.className,r=e.children,o=e.actions,e=be(e),t=ve({OverlayFooter:!0},t),i=de.createRef();return de.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?de.createElement("div",ye({ref:i},e,{className:t}),o.map(function(e,t){e.label;e=q(e,va);return de.createElement(we,ye({type:"button"},e,{key:t}))})):de.createElement("div",ye({"data-test":"DesignSystem-OverlayFooter",ref:i},e,{className:t}),r)}function Qi(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=be(e),t=ve(he({OverlayHeader:!0},"OverlayHeader--withBackButton",o||i),t),u=ve((he(u={},"OverlayHeader-subheading",!0),he(u,"OverlayHeader-subheading--withBackButton",o||i),u));return de.createElement("div",ye({"data-test":"DesignSystem-OverlayHeader"},e,{className:t}),de.createElement("div",{className:"OverlayHeader-headerWrapper"},(o||i)&&de.createElement(we,{"data-test":"DesignSystem-OverlayHeader--Button",appearance:"transparent",className:"mr-4",icon:"arrow_back",largeIcon:!0,onClick:s||a}),n&&de.createElement(nn,{className:c,"data-test":"DesignSystem-OverlayHeader--heading"},n)),r&&de.createElement(Se,{"data-test":"DesignSystem-OverlayHeader--Subheading",appearance:"subtle",className:u},r))}function ea(e){var t=e.children,n=e.className,e=be(e),n=ve({OverlayBody:!0},n);return de.createElement("div",ye({"data-test":"DesignSystem-OverlayBody"},e,{className:n}),t)}function ta(){var e=document.querySelector(".Overlay-wrapper");return null===e&&((e=document.createElement("div")).classList.add("Overlay-wrapper"),document.body.appendChild(e)),e}function na(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 ra(e,t,n){"Escape"===e.key&&t&&(n(e),e.preventDefault())}function oa(e){function t(e){switch(p(!0),e){case"first":l(1);break;case"last":l(r);break;case"prev":1<u&&l(u-1);break;case"next":u<r&&l(u+1)}}var n=e.type,r=e.totalPages,o=e.onPageChange,i=e.className,a=e.pageJumpDebounceDuration,s=be(e),c=me(de.useState(e.page),2),u=c[0],l=c[1],f=(c=me(de.useState(!1),2))[0],p=c[1],d=(c=me(de.useState(0),2))[0],h=c[1],y=de.useCallback(Rt(a,o),[d]),a=(de.useEffect(function(){l(e.page)},[e.page]),ve((he(c={},"Pagination",!0),he(c,"Pagination--".concat(n),n),c),i)),d=ve((he(o={},"Pagination-buttonWrapper",!0),he(o,"Pagination-buttonWrapper--next",!0),o)),i=ve((he(c={},"Pagination-buttonWrapper",!0),he(c,"Pagination-buttonWrapper--previous",!0),c));return de.useEffect(function(){f&&(1<=u&&u<=r?y(u):(y.cancel(),h(function(e){return e+1})))},[u]),de.createElement("div",ye({"data-test":"DesignSystem-Pagination"},s,{className:a}),de.createElement("div",{className:i},de.createElement(we,{onClick:function(){return t("first")},disabled:u<=1,appearance:"transparent",icon:"first_page","data-test":"DesignSystem-Pagination--FirstButton"}),de.createElement(we,{onClick:function(){return t("prev")},disabled:u<=1,icon:"navigate_before","data-test":"DesignSystem-Pagination--PrevButton",className:"ml-4 mr-3"})),"jump"===n&&de.createElement("div",{className:"Pagination-pageIndex"},de.createElement(un,{name:"page",className:"Pagination-MetricInput",onChange:function(e){e.preventDefault();e=+e.target.value.trim();0<=e&&e<=r&&(f||p(!0),l(e))},value:"".concat(R(u)?u:""),"data-test":"DesignSystem-Pagination--Input",onKeyPress:function(e){R(e.key)||e.preventDefault()}}),de.createElement(Se,null," of ".concat(r," pages"))),de.createElement("div",{className:d},de.createElement(we,{onClick:function(){return t("next")},disabled:r<=u,icon:"navigate_next","data-test":"DesignSystem-Pagination--NextButton",className:"mr-4 ml-3"}),de.createElement(we,{onClick:function(){return t("last")},disabled:r<=u,appearance:"transparent",icon:"last_page","data-test":"DesignSystem-Pagination--LastButton"})))}function ia(e){function t(e){var t,n;"start"===e&&(t=(n=Y(h)).year,n=n.month,d({yearNav:t,monthNav:n})),"end"===e&&(n=(t=Y(y)).year,e=t.month,d({yearNav:n,monthNav:e}))}function n(e,t,n){var r,o,i;d({open:!0}),"start"===n&&(r=u.placeholderChar||"_",t)&&!t.includes(r)&&(r=_e(c,t,f))&&(d({startDate:r}),y&&(o=(r=Y(y)).year,i=r.month,r=r.date,G(h,"more",o,i,r))&&d({endDate:void 0}),u.onPaste)&&u.onPaste(e,t),"end"===n&&(o=l.placeholderChar||"_",t)&&!t.includes(o)&&(i=_e(c,t,f))&&(d({endDate:i}),l.onPaste)&&l.onPaste(e,t)}function r(e,t,n){var r,o,i;d({open:!0}),"start"===n&&(r=u.placeholderChar||"_",t)&&!t.includes(r)&&(r=_e(c,t,f))&&(d({startDate:r}),y)&&(o=(r=Y(y)).year,i=r.month,r=r.date,G(h,"more",o,i,r))&&d({endDate:void 0}),"end"===n&&(o=l.placeholderChar||"_",t)&&!t.includes(o)&&(i=_e(c,t,f))&&d({endDate:i})}function o(e,t,n){d({init:!0});var r,o=/\d/;"start"===n&&(r=void 0===(r=u.placeholderChar)?"_":r,t&&o.test(t)&&t.includes(r)?d({startError:!0}):(!t||o.test(t))&&t||d({startError:!1}),t&&!t.includes(r)||d({startDate:void 0})),"end"===n&&(n=void 0===(r=l.placeholderChar)?"_":r,t&&o.test(t)&&t.includes(n)?d({endError:!0}):(!t||o.test(t))&&t||d({endError:!1}),t&&!t.includes(n)||d({endDate:void 0}))}function i(e){d({init:!0}),"start"===e&&(d({startDate:void 0}),t("end")),"end"===e&&(d({endDate:void 0}),t("start"))}function a(e){p.open||t(e)}function s(e){return Z(f,e,c)}var c=e.inputFormat,u=e.startInputOptions,l=e.endInputOptions,f=e.validators,p=e.state,d=e.setState,e=p.init,h=p.startDate,y=p.endDate,m=p.startError,g=p.endError,v=J[c],b=u.placeholderChar||"_",w=l.placeholderChar||"_",m=u.error||u.required&&m&&e,g=l.error||l.required&&g&&e,S=void 0===u.caption?"Invalid value":u.caption,_=void 0===l.caption?"Invalid value":l.caption,E=u.label,C=l.label;return de.createElement(Cn,{"data-test":"DesignSystem-DateRangePicker-InputTrigger"},de.createElement(x,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--startDate"},E&&de.createElement(Ut,{required:u.required,withInput:!0},E),de.createElement(fn,ye({icon:"events",placeholder:c},u,{mask:v,value:h?O(c,h):e?fn.utils.getDefaultValue(v,b):"",onChange:function(e,t){r(0,t||"","start")},onPaste:function(e,t){n(e,t||"","start")},onBlur:function(e,t){o(0,t||"","start")},onClear:function(){return i("start")},onClick:function(){return a("start")},error:m,caption:m?S:"",validators:[s],clearOnEmptyBlur:!0}))),de.createElement(x,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--endDate"},C&&de.createElement(Ut,{required:l.required,withInput:!0},C),de.createElement(fn,ye({icon:"events",placeholder:c},l,{mask:v,value:y?O(c,y):e?fn.utils.getDefaultValue(v,w):"",onChange:function(e,t){r(0,t||"","end")},onPaste:function(e,t){n(e,t||"","end")},onBlur:function(e,t){o(0,t||"","end")},onClear:function(){return i("end")},onClick:function(){return a("end")},error:g,caption:g?_:"",validators:[s],clearOnEmptyBlur:!0}))))}function aa(e){function i(e,t){var n=/\d/;return!(!e||!t||e.includes(h)||!t.includes(h))||!!(e&&n.test(e)&&e.includes(h))||!(e&&!n.test(e)||!e)&&null}var s=e.inputFormat,c=e.inputOptions,u=e.validators,t=e.state,l=e.setState,e=t.init,a=t.startDate,f=t.endDate,p=t.startValue,d=t.endValue,n=t.startError,t=t.endError,r=X[s],n=c.error||c.required&&(n||t)&&e,t=void 0===c.caption?"Invalid value":c.caption,o=c.label,h=void 0===(y=c.placeholderChar)?"_":y,y=fn.utils.getDefaultValue(r,h).split(" - "),m=p||y[0],y=d||y[1];return de.createElement(Cn,{"data-test":"DesignSystem-DateRangePicker-SingleInputTrigger"},de.createElement(x,null,o&&de.createElement(Ut,{required:c.required,withInput:!0},o),de.createElement(fn,ye({icon:"events",placeholder:"".concat(s," - ").concat(s)},c,{mask:r,value:a||f||e?"".concat(m," - ").concat(y):void 0,onChange:function(e,t){var n,r,o,i;t=(t=t||"").split(" - "),i=t[0],t=t[1],p!==i&&i&&!i.includes(h)&&(n=_e(s,i,u))&&(r=d&&!d.includes(h),l({startDate:n,endDate:r?f:void 0}),f)&&(r=(n=Y(f)).year,o=n.month,n=n.date,G(a,"more",r,o,n))&&l({endDate:void 0}),d!==t&&t&&!t.includes(h)&&(r=_e(s,t,u),o=p&&!p.includes(h),r)&&l({endDate:r,startDate:o?a:void 0}),l({startValue:i,endValue:t})},onBlur:function(e,t){var n,r,o;t=t||"",l({init:!0}),t=t.split(" - "),n=t[0],t=t[1],r=i(n,t),o=i(t,n),null!==r&&null!==o&&l({startError:r,endError:o}),n&&!n.includes(h)||l({startDate:void 0}),t&&!t.includes(h)||l({endDate:void 0})},onPaste:function(e,t){var n,r,o,i,a;e=e,t=t||"",n=c.onPaste,r=t.split(" - "),o=r[0],r=r[1],i=_e(s,r,u),a=_e(s,o,u),l({startDate:a,endDate:i,startValue:o,endValue:r}),n&&n(e,t)},onClear:function(){l({init:!0,startDate:void 0,endDate:void 0,yearNav:void 0,monthNav:void 0})},error:n,caption:n?t:"",validators:[function(e){var e=me(e.split(" - "),2),t=e[0],e=e[1];return Z(u,t,s)&&Z(u,e,s)}],clearOnEmptyBlur:!0}))))}function sa(e){var t=new Date;return new Date(t.setDate(e))}function ca(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 ua(e){e.preventDefault()}function la(){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!_a(t)&&e&&e.apply(void 0,[t].concat(n)),_a(t)})}}function fa(e,t){switch(t.type){case"focus":return W(W({},e),{},{isFocused:!0});case"blur":return W(W({},e),{},{isFocused:!1});case"openDialog":return W(W({},e),{},{isFileDialogActive:!0});case"closeDialog":return W(W({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return W(W({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return W(W({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return W(W({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}var pa=function(){e(n,de["Component"]);var t=h(n);function n(e){var o;return d(this,n),he(V(o=t.call(this,e)),"triggerRef",void 0),he(V(o),"popupRef",void 0),he(V(o),"hoverableDelay",void 0),he(V(o),"_timer",void 0),he(V(o),"_throttleWait",void 0),he(V(o),"offsetMapping",void 0),he(V(o),"togglePopper",function(e,t){var n=o.props,r=n.open;(0,n.onToggle)(void 0===t?!r:t,e)}),he(V(o),"doesEventContainsElement",function(e,t){t=t.current;return t&&t.contains(e.target)}),he(V(o),"getUpdatedStyle",function(e,t,n){var r=W(W({},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:"",showClosingAnimation:!1},o.hoverableDelay=100,o.offsetMapping={small:"2px",medium:"4px",large:"8px"},o.triggerRef=de.createRef(),o.popupRef=de.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();var e=this.triggerRef.current,e=this.getZIndexForLayer(e);this.setState({zIndex:void 0===e?e:e+1})}},{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"),this.setState(function(){return{isOpen:!0}}))}},{key:"handleMouseLeave",value:function(){var e,t,n=this;"hover"===this.props.on&&(e=(t=this.props).hoverable,t=t.onToggle,e?this.mouseMoveHandler():(t(!1,"mouseLeave"),this.setState({showClosingAnimation:!0},function(){window.setTimeout(function(){n.setState({showClosingAnimation:!1,isOpen:!1})},120)})))}},{key:"getZIndexForLayer",value:function(e){if(null!==e)return"auto"===(e=(e=e.closest("[data-layer]")||document.body)===document.body?"auto":parseInt(window.getComputedStyle(e).zIndex||"0",10))||isNaN(e)?500:e}},{key:"getTriggerElement",value:function(e){var a=this,t=this.props,n=t.trigger,r=t.on,t=t.triggerClass,r="hover"===r?{ref:e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave}:{ref:e,onClick:function(e){e.stopPropagation(),a.togglePopper("onClick")}},e=ve("PopperWrapper-trigger",t),o=function(t){var e=a.popupRef.current,n=document.body,r=parseInt(window.getComputedStyle(e).zIndex),o=!1,i=!1;return n.querySelectorAll('[data-opened="true"]').forEach(function(e){e.contains(t)&&(o=!0,parseInt(window.getComputedStyle(e).zIndex)<r)&&(i=!0)}),!(!n.isEqualNode(t)&&!i&&n.contains(t)&&o)};return de.createElement(bn,ye({className:e,onOutsideClick:function(e){var t=a.props,n=t.open,t=t.closeOnBackdropClick;n&&o(e.target)&&t&&(a.doesEventContainsElement(e,a.popupRef)||a.togglePopper("outsideClick"))}},r),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=W(W({},s?this.getUpdatedStyle(o,i,s):o),{},{zIndex:f}),o="",p=(a?o=ve((he(f={},"".concat(a.open),this.state.isOpen),he(f,"".concat(a.close),!this.state.isOpen),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=W(W(W({},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 de.cloneElement(c,a?W(W({},p),{},{className:o}):W({},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 de.createElement(Wi,null,de.createElement("style",null,a),de.createElement(Ji,{innerRef:this.triggerRef},function(e){e=e.ref;return t.getTriggerElement(e)}),i&&r&&v.createPortal(de.createElement($i,{placement:n,innerRef:this.popupRef,modifiers:{preventOverflow:{boundariesElement:e||document.body},hide:{enabled:o}}},this.getPopperChildren),document.body),i&&!r&&de.createElement($i,{placement:n,innerRef:this.popupRef},this.getPopperChildren))}}]),n}(),da=(he(pa,"defaultProps",{on:"click",offset:"medium",closeOnBackdropClick:!0,hoverable:!0,appendToBody:!0,style:{}}),["position","customStyle","dark","children","onToggle","className","hideOnReferenceEscape","boundaryElement"]),ha=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=q(e,da),l=me(de.useState(!!e.open),2),f=l[0],p=l[1],l=me(de.useState(!1),2),d=l[0],h=l[1],l=(de.useEffect(function(){void 0!==e.open&&p(e.open)},[e.open]),de.useCallback(function(e){p(e)},[])),r=(de.useEffect(function(){d||"current"in u&&u.current&&h(!0)},[u]),ve(he({Popover:!0},"Popover--dark",r),a)),a=de.createElement("div",{"data-test":"DesignSystem-Popover",className:r,"data-layer":!0,"data-opened":f},o);return de.createElement(pa,ye({},c,{init:d,boundaryElement:"current"in u?u.current:u,open:f,hide:s,style:n,onToggle:i||l,placement:t}),a)},ya=(ha.displayName="Popover",ha.defaultProps=Object.assign({},ne(pa.defaultProps,["appendToBody","trigger","hoverable","on","open","closeOnBackdropClick","offset","closeOnScroll"],!0),{offset:"large",position:"bottom",hideOnReferenceEscape:!0,customStyle:{}}),["children","tooltip"]),ma={bottom:"bottom",top:"top","top-start":"top","top-end":"top","bottom-start":"bottom","bottom-end":"bottom",left:"left",right:"right"},ga=function(e){var t=e.children,n=e.tooltip,r=q(e,ya),n=de.createElement("div",{className:"Tooltip"},de.createElement(Se,{className:"Tooltip-text",appearance:"white"},n));return de.createElement(ha,ye({trigger:t,on:"hover",offset:"medium"},r,{animationClass:{open:"Tooltip-animation-open-".concat(ma[e.position]),close:"Tooltip-animation-close-".concat(ma[e.position])},className:"Tooltip-container"}),n)},va=(ga.defaultProps=Object.assign({},ne(ha.defaultProps,["trigger","on","open","offset","onToggle","dark","customStyle","closeOnBackdropClick","hideOnReferenceEscape","closeOnScroll"]),{hoverable:!1}),["label"]),f=(Xi.displayName="OverlayFooter",Qi.displayName="OverlayHeader",ea.defaultProps={stickFooter:!0,withFooter:!0},ea.displayName="OverlayBody",new(function(){function e(){d(this,e),he(this,"overlays",void 0),this.overlays=[]}return a(e,[{key:"add",value:function(e){var t;if(null!==e)return-1===(t=this.overlays.indexOf(e))&&(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,de["Component"]);var t=h(r);function r(e){var n;return d(this,r),he(V(n=t.call(this,e)),"modalRef",de.createRef()),he(V(n),"element",void 0),he(V(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.modalRef.current);ra(e,t,n.onOutsideClickHandler)}),n.element=ta(),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)),this.props.backdropClose&&this.state.open&&f.add(this.modalRef.current);var e=na({element:this.element,containerClassName:".Overlay-container",elementRef:this.modalRef});this.setState({zIndex:e})}},{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=na({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef}),this.setState({zIndex:e,open:!0,animate:!0}),(this.props.closeOnEscape||this.props.backdropClose)&&f.add(this.modalRef.current)):(this.setState({animate:!1},function(){window.setTimeout(function(){t.setState({open:!1})},120)}),(this.props.closeOnEscape||this.props.backdropClose)&&f.remove(this.modalRef.current)))}},{key:"onOutsideClickHandler",value:function(e){var t=this.props,n=t.closeOnEscape,r=t.backdropClose,t=t.onClose;this.state.open&&f.isTopOverlay(this.modalRef.current)&&((n||r)&&f.remove(this.modalRef.current),t?t(e,"OutsideClick"):"function"==typeof r&&r(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=ve({Modal:!0,"Modal--open":n,"Modal-animation--open":t,"Modal-animation--close":!t},o),o=ve((he(o={},"Modal-header",!0),he(o,"Modal-header--withSeperator",f),o)),f=ve((he(h={},"Modal-footer",!0),he(h,"Modal-footer--withSeperator",f),h)),h=ve((he(h={},"Row",!0),he(h,"Overlay-container",!0),he(h,"Overlay-container--open",n),h)),y=c||l||p||u,y=ve((he(m={},"Modal-body",!0),he(m,"Modal-body--withMargin",!y||!!p),he(m,"Modal-body--withPadding",!y||!p),m)),m=be(this.props),h=de.createElement(Cn,{"data-test":"DesignSystem-ModalContainer",className:h,"data-layer":!0,"data-opened":n,style:{zIndex:e||1001}},de.createElement(x,ye({"data-test":"DesignSystem-Modal"},m,{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)&&de.createElement("div",{className:o},de.createElement(x,null,!u&&de.createElement(Qi,ye({"data-test":"DesignSystem-Modal--header"},c)),!!u&&u),de.createElement(x,{className:"flex-grow-0"},de.createElement(ga,{tooltip:"Close",position:"bottom"},de.createElement(we,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Modal--CloseButton",onClick:function(e){d&&d(e,"IconClick")}})))),n&&s&&de.createElement(de.Fragment,null,c||l||p||u?de.createElement(ea,{className:y},this.props.children):s),(!!p||!!l)&&de.createElement(Xi,ye({"data-test":"DesignSystem-Modal--footer"},l,{open:n,className:f}),p))),e=i?de.createElement(bn,{ref:this.modalRef,"data-test":"DesignSystem-Modal--OutsideClick",onOutsideClick:this.onOutsideClickHandler},h):h,m=v.createPortal(e,this.element);return de.createElement(de.Fragment,null,m,de.createElement(re,{open:this.state.animate,zIndex:r}))}}]),r}()),r=(he(n,"defaultProps",{dimension:"medium"}),function(){e(r,de["Component"]);var t=h(r);function r(e){var n;return d(this,r),he(V(n=t.call(this,e)),"modalRef",de.createRef()),he(V(n),"element",void 0),he(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)})}),he(V(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.modalRef.current);ra(e,t,n.onOutsideClickHandler)}),n.element=ta(),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=na({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=ve({FullscreenModal:!0,"FullscreenModal-animation--open":t,"FullscreenModal-animation--close":!t},o),o=ve((he(t={},"Overlay-container",!0),he(t,"Overlay-container--open",n),t)),t=be(this.props),o=n?de.createElement("div",{"data-test":"DesignSystem-FullscreenModalContainer",className:o,"data-layer":!0,style:{zIndex:e}},de.createElement("div",ye({"data-test":"DesignSystem-FullscreenModal"},t,{className:r,ref:this.modalRef}),de.createElement(Cn,{className:"justify-content-center"},de.createElement(x,{medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"12"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"12"}}[i],de.createElement(Cn,{className:"FullscreenModal-header"},de.createElement(x,null,!s&&de.createElement(Qi,ye({"data-test":"DesignSystem-FullscreenModal--header"},c)),!!s&&s),de.createElement(x,{className:"flex-grow-0"},de.createElement(ga,{tooltip:"Close"},de.createElement(we,{icon:"close",appearance:"transparent","data-test":"DesignSystem-FullscreenModal--CloseButton",onClick:function(e){f&&f(e,"IconClick")}})))),de.createElement(ea,{"data-test":"DesignSystem-FullscreenModal--Body",className:"FullscreenModal-body"},a),(!!u||!!l)&&de.createElement(Xi,ye({"data-test":"DesignSystem-FullscreenModal--footer"},l,{open:n,className:"FullscreenModal-footer"}),u))))):null,e=v.createPortal(o,this.element);return de.createElement(de.Fragment,null,e)}}]),r}()),ba=(he(r,"defaultProps",{dimension:"medium"}),{regular:"6",large:"10"}),u=function(){e(r,de["Component"]);var t=h(r);function r(e){var n;return d(this,r),he(V(n=t.call(this,e)),"sidesheetRef",de.createRef()),he(V(n),"element",void 0),he(V(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.sidesheetRef.current);ra(e,t,n.onOutsideClickHandler)}),n.element=ta(),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)),this.props.backdropClose&&this.state.open&&f.add(this.sidesheetRef.current);var e=na({element:this.element,containerClassName:".Overlay-container",elementRef:this.sidesheetRef});this.setState({zIndex:e})}},{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=na({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.sidesheetRef}),this.setState({zIndex:e,open:!0,animate:!0}),(this.props.closeOnEscape||this.props.backdropClose)&&f.add(this.sidesheetRef.current)):(this.setState({animate:!1}),(this.props.closeOnEscape||this.props.backdropClose)&&f.remove(this.sidesheetRef.current)))}},{key:"onOutsideClickHandler",value:function(e){var t=this.props,n=t.backdropClose,r=t.closeOnEscape,t=t.onClose;this.state.open&&f.isTopOverlay(this.sidesheetRef.current)&&((n||r)&&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,t=this.state,n=t.animate,r=t.open,t=t.zIndex,o=this.props,i=o.className,a=o.backdropClose,s=o.dimension,c=o.footer,u=o.seperator,l=o.stickFooter,f=o.headerOptions,p=o.footerOptions,d=o.header,h=o.onClose,o=t?t-1:1e3,i=ve({Sidesheet:!0,"Sidesheet--open":r,"Sidesheet-animation--open":n,"Sidesheet-animation--close":!n},i),n=ve((he(y={},"Overlay-container",!0),he(y,"fade-in",n),he(y,"Overlay-container--open",n),he(y,"Overlay-container--close",!n),y)),y=ve((he(y={},"Sidesheet-header",!0),he(y,"Sidesheet-header--withSeperator",u),y)),u=ve((he(m={},"Sidesheet-footer",!0),he(m,"Sidesheet-footer--withSeperator",u),he(m,"Sidesheet-footer--stickToBottom",l),m)),l=ve((he(m={},"Sidesheet-body",!0),he(m,"Sidesheet-body--withMargin",!!c&&l),he(m,"Sidesheet-body--nextPage",(null==f?void 0:f.backButton)||(null==f?void 0:f.backIcon)),he(m,"Sidesheet-body--firstPage",!(null!=f&&f.backButton||null!=f&&f.backIcon)),m)),m=ve((he(m={},"Sidesheet-header--shiftRight",(null==f?void 0:f.backButton)||(null==f?void 0:f.backIcon)),he(m,"Sidesheet-header--shiftLeft",!(null!=f&&f.backButton||null!=f&&f.backIcon)),m)),g=be(this.props),n=de.createElement(Cn,{"data-test":"DesignSystem-SidesheetContainer","data-open":this.state.open,className:n,"data-layer":!0,style:{zIndex:t||1001},ref:this.sidesheetRef,onAnimationEnd:function(){return e.handleAnimationEnd}},de.createElement(x,ye({"data-test":"DesignSystem-Sidesheet"},g,{className:i,size:ba[s]}),de.createElement("div",{className:y},de.createElement(x,{"data-test":"DesignSystem-Sidesheet--Header"},!d&&de.createElement(Qi,ye({headingClass:m},f)),!!d&&d),de.createElement(x,{className:"flex-grow-0"},de.createElement(ga,{tooltip:"Close"},de.createElement(we,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Sidesheet--CloseButton",largeIcon:!0,onClick:function(e){h&&h(e,"IconClick")}})))),de.createElement(ea,{"data-test":"DesignSystem-Sidesheet--OverlayBody",className:l},this.props.children),(!!c||!!p)&&de.createElement(Xi,ye({"data-test":"DesignSystem-Sidesheet--Footer"},p,{open:r,className:u}),c))),t=a?de.createElement(bn,{ref:this.sidesheetRef,"data-test":"DesignSystem-Sidesheet--OutsideClick",onOutsideClick:this.onOutsideClickHandler},n):n,g=v.createPortal(t,this.element);return de.createElement(de.Fragment,null,g,de.createElement(re,{open:this.state.animate,zIndex:o}))}}]),r}(),o=(he(u,"defaultProps",{dimension:"regular",stickFooter:!1,headerOptions:{}}),function(e){var t=e.title,n=e.description,r=e.className,e=be(e),r=ve({"Modal-description":!0},r);return de.createElement("div",ye({"data-test":"DesignSystem-ModalDescription"},e,{className:r}),t&&de.createElement(Se,{weight:"strong","data-test":"DesignSystem-ModalDescription--Title"},t),t&&n&&de.createElement("br",null),n&&de.createElement(Se,{"data-test":"DesignSystem-ModalDescription--Description"},n))}),wa=(o.displayName="ModalDescription",oa.displayName="Pagination",oa.defaultProps={type:"basic",page:1,totalPages:1,pageJumpDebounceDuration:750},["startDate","endDate","yearNav","monthNav","open","inputFormat","outputFormat","startInputOptions","endInputOptions","validators","withInput","position","disabledBefore","disabledAfter","onRangeChange","rangeLimit"]),p=function(){e(c,de["Component"]);var s=h(c);function c(e){d(this,c),he(V(l=s.call(this,e)),"monthsInView",void 0),he(V(l),"getDate",function(e,t){var n=l.props.inputFormat;return{startValue:e?O(n,e):"",endValue:t?O(n,t):""}}),he(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}}),he(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}),he(V(l),"onRangeChangeHandler",function(e,t){l.setState({init:!0,startDate:e,endDate:t,startValue:e?O(l.props.inputFormat,e):"",endValue:t?O(l.props.inputFormat,t):""})}),he(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=y(e.startDate,t,n),t=y(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=y(this.props.startDate,n,r),n=O(n,r),this.setState({startDate:r,startValue:n})),e.endDate!==this.props.endDate&&(n=(r=this.props).inputFormat,r=r.validators,r=y(this.props.endDate,n,r),n=O(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=O(e,r),e=O(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=q(e,wa),a=this.state,s=a.startDate,c=a.endDate,u=a.yearNav,a=a.monthNav;return de.createElement(st,ye({},e,{monthsInView:this.monthsInView,rangePicker:!0,startDate:y(s,t,n),endDate:y(c,t,n),disabledBefore:y(r,t,n),disabledAfter:y(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=ve((he(e={},"DateRangePicker",!0),he(e,"DateRangePicker--".concat(l),l),e));return n?(e=u?de.createElement(aa,{inputFormat:a,inputOptions:i,validators:c,state:this.state,setState:this.setState.bind(this)}):de.createElement(ia,{inputFormat:a,startInputOptions:r,endInputOptions:o,validators:c,state:this.state,setState:this.setState.bind(this)}),de.createElement(ha,{trigger:e,triggerClass:"w-100",className:l,position:s,appendToBody:!0,open:f,onToggle:this.onToggleHandler},t,this.renderCalendar())):this.renderCalendar()}}]),c}(),c=(he(p,"utils",{getCurrentWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:sa(t-e+1),endDate:sa(t-e+7)}},getPreviousWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:sa(t-e-6),endDate:sa(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:sa(e-90),endDate:sa(e)}},getCustomDates:function(){return{startDate:"",endDate:""}},getCurrentYear:function(){return(new Date).getFullYear()},getCurrentMonth:function(){return(new Date).getMonth()}}),he(p,"defaultProps",W(W({},st.defaultProps),{},{children:de.createElement(de.Fragment,null),contentAlign:"left",monthsInView:void 0,position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[P],inputOptions:{label:"Date"},startInputOptions:{label:"Start Date"},endInputOptions:{label:"End Date"}})),function(e){e=e.children;return de.createElement(de.Fragment,null,e)}),Sa=(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}))}),_a=function(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble},Ea=function(e){return null!=e},Ca=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)}},Oa=function(e){return{type:"FILE_TOO_LARGE",message:"File is larger than ".concat(e," bytes")}},xa=function(e){return{type:"FILE_TOO_SMALL",message:"File is smaller than ".concat(e," bytes")}},ka=function(e,t){e="application/x-moz-file"===e.type||Sa(e,t);return[e,e?null:Ca(t)]},Da=function(e,t,n){if(Ea(e.size))if(Ea(t)&&Ea(n)){if(e.size>n)return[!1,Oa(n)];if(e.size<t)return[!1,xa(t)]}else{if(Ea(t)&&e.size<t)return[!1,xa(t)];if(Ea(n)&&e.size>n)return[!1,Oa(n)]}return[!0,null]},ja=new Map([["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["png","image/png"],["bmp","image/bmp"],["tif","image/tiff"],["tiff","image/tiff"],["apng","image/apng"],["avif","image/avif"],["jfif","image/jpeg"],["pjpeg","image/pjpeg"],["pjp","image/jpeg"],["svg","image/svg+xml"],["webp","image/webp"],["cur","image/x-win-bitmap"],["MTS","model/vnd.mts"],["roq","video"],["f4a","video"],["f4b","video"],["drc","video"],["nsv","video"],["avi","video/x-msvideo"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["webm","video/webm"],["flv","video/x-flv"],["vob","video/x-ms-vob"],["ogv","video/ogg"],["ogg","application/ogg"],["gifv","image/gif"],["mng","video/x-mng"],["M2TS","video/MP2T"],["TS","video/mp2t"],["qt","video/quicktime"],["wmv","video/x-ms-wmv"],["yuv","application/octet-stream"],["rm","application/vnd.rn-realmedia"],["rmvb","application/vnd.rn-realmedia-vbr"],["viv","video/vnd.vivo"],["asf","video/x-ms-asf"],["amv","video/x-amv"],["m4v","video/x-m4v"],["mpg","video/mpeg"],["mpeg","video/mpeg"],["mpe","video/mpeg"],["mpv","video/mpv"],["m2v","video/mpeg"],["svi","video/x-msvideo"],["3gp","video/3gpp"],["3g2","video/3gpp2"],["mxf","application/mxf"],["flv","video/x-flv"],["f4v","video/x-f4v"],["f4p","video/mp4"],["aa","audio"],["aax","audio"],["act","audio"],["alac","audio"],["ape","audio"],["awb","audio"],["dss","audio"],["dvf","audio"],["iklax","audio"],["ivs","audio"],["msv","audio"],["nmf","audio"],["mogg","audio"],["raw","audio"],["rf64","audio"],["sln","audio"],["wv","audio"],["8svx","audio"],["3gp","audio/3gpp"],["mp2","audio/mpeg"],["aac","audio/x-aac"],["aiff","audio/x-aiff"],["amr","audio/amr"],["au","audio/basic"],["flac","audio/x-flac"],["gsm","audio/gsm"],["m4a","audio/mp4a-latm"],["m4b","audio/mp4a-latm"],["m4p","audio/mp4a-latm"],["mmf","application/vnd.smaf"],["mp3","audio/mpeg"],["ogg","audio/ogg"],["oga","audio/ogg"],["opus","audio/opus"],["tta","audio/x-tta"],["voc","audio/x-voice"],["wav","audio/x-wav"],["wma","audio/x-ms-wma"],["webm","audio/webm"],["cda ","application/x-cdf"],["ra","audio/x-pn-realaudio"],["vox","application/x-authorware-bin"],["rm","application/vnd.rn-realmedia"],["mpc","application/vnd.mophun.certificate"],["pdf","application/pdf"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["xlss","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xls","application/vnd.ms-excel"],["odt","application/vnd.oasis.opendocument.text"],["tex","application/x-tex"],["wpd","application/wordperfect"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["csv","text/csv"],["rtf","text/rtf"],["txt","text/plain"],["tsv","text/tab-separated-values"]]),Ta=[".DS_Store","Thumbs.db"];function Ia(){return(Ia=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 Na.apply(this,arguments)}(n.dataTransfer,n.type):(null!==(t=n).target&&t.target.files?Aa(t.target.files):[]).map(function(e){return Ma(e)}));case 1:case"end":return e.stop()}var t},e)}))).apply(this,arguments)}function Ma(e,t){var n,r=function(e){var t=e.name;t&&-1!==t.lastIndexOf(".")&&!e.type&&(t=t.split(".").pop().toLowerCase(),t=ja.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 Na(){return(Na=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){if(r=Aa(t.items).filter(function(e){return"file"===e.kind}),"drop"!==n)return e.abrupt("return",r);e.next=4}else e.next=8;break;case 4:return e.next=6,Promise.all(r.map(Ra));case 6:return o=e.sent,e.abrupt("return",Pa(function n(e){return e.reduce(function(e,t){return[].concat(ge(e),ge(Array.isArray(t)?n(t):[t]))},[])}(o)));case 8:return e.abrupt("return",Pa(Aa(t.files).map(function(e){return Ma(e)})));case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Pa(e){return e.filter(function(e){return-1===Ta.indexOf(e.name)})}function Aa(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function Ra(e){var t;return"function"==typeof e.webkitGetAsEntry&&(t=e.webkitGetAsEntry())&&t.isDirectory?Ba(t):La(e)}function La(e){var t=e.getAsFile();return t?(t=Ma(t),Promise.resolve(t)):Promise.reject("".concat(e," is not a File"))}function za(e){return Fa.apply(this,arguments)}function Fa(){return(Fa=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?Ba:function(){return Ka.apply(this,arguments)})(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ba(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(za)),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 Ka(){return(Ka=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=Ma(e,r.fullPath);t(e)},function(e){n(e)})}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ha(e){function t(){R&&setTimeout(function(){var e;!k.current||(e=k.current.files)&&e.length||(j({type:"closeDialog"}),"function"==typeof _&&_())},300)}function n(e){e.target instanceof HTMLDivElement&&x.current&&x.current.contains(e.target)||(e.preventDefault(),M.current=[])}function a(e){return p?null:e}var r,o,i,s,c,u,l,f=e.accept,p=e.disabled,d=e.maxSize,h=e.minSize,y=e.multiple,m=e.onDragEnter,g=e.onDragLeave,v=e.onDragOver,b=e.onDrop,w=e.onDropAccepted,S=e.onDropRejected,_=e.onFileDialogCancel,E=e.getFilesFromEvent,C=e.preventDropOnDocument,O=e.validator,x=Object(de.useRef)(null),k=Object(de.useRef)(null),D=(e=me(Object(de.useReducer)(fa,Ya),2))[0],j=e[1],e=D.isFocused,R=D.isFileDialogActive,T=D.draggedFiles,L=Object(de.useCallback)(function(){k.current&&(j({type:"openDialog"}),k.current.value="",k.current.click())},[j]),z=(Object(de.useEffect)(function(){return window.addEventListener("focus",t,!1),function(){window.removeEventListener("focus",t,!1)}},[k,R,_]),Object(de.useCallback)(function(e){x.current&&x.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),L()))},[x,k])),F=Object(de.useCallback)(function(){j({type:"focus"})},[]),I=Object(de.useCallback)(function(){j({type:"blur"})},[]),M=Object(de.useRef)([]),B=(Object(de.useEffect)(function(){return C&&(document.addEventListener("dragover",ua,!1),document.addEventListener("drop",n,!1)),function(){C&&(document.removeEventListener("dragover",ua),document.removeEventListener("drop",n))}},[x,C]),Object(de.useCallback)(function(t){t.preventDefault(),t.persist(),M.current=[].concat(ge(M.current),[t.target]),ca(t)&&Promise.resolve(E(t)).then(function(e){_a(t)||(j({draggedFiles:e,isDragActive:!0,type:"setDraggedFiles"}),m&&m(t))})},[E,m])),K=Object(de.useCallback)(function(e){if(e.preventDefault(),e.persist(),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return ca(e)&&v&&v(e),!1},[v]),H=Object(de.useCallback)(function(e){e.preventDefault(),e.persist();var t=M.current.filter(function(e){return x.current&&x.current.contains(e)}),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),0<(M.current=t).length||(j({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),ca(e)&&g&&g(e))},[x,g]),N=Object(de.useCallback)(function(t){t.preventDefault(),t.persist(),M.current=[],ca(t)&&Promise.resolve(E(t)).then(function(e){var a,s;_a(t)||(a=[],s=[],e.forEach(function(e){var t=me(ka(e,f),2),n=t[0],t=t[1],r=me(Da(e,h,d),2),o=r[0],r=r[1],i=O?O(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}))}),j({acceptedFiles:a,fileRejections:s,type:"setFiles"}),b&&b(t,a,s),0<s.length&&S&&S(t,s),0<a.length&&w&&w(t,a))}),j({type:"reset"})},[y,f,h,d,E,b,w,S]),z=Object(de.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=q(e,Va);return W(he({onDragEnter:a(la(n,B)),onDragOver:a(la(r,K)),onDragLeave:a(la(o,H)),onDrop:a(la(i,N))},t,x),e)}},[x,z,F,I,B,K,H,N,p]),U=Object(de.useCallback)(function(e){e.stopPropagation()},[]),F=Object(de.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=q(e,Ga);return W(W({},he({accept:f,multiple:y,type:"file",style:{display:"none"},onChange:a(la(n,N)),onClick:a(la(r,U)),autoComplete:"off",tabIndex:-1},t,k)),e)}},[k,f,y,N,p]),P=0<(I=T.length)&&(A=(P={accept:f,minSize:h,maxSize:d,multiple:y,files:T}).files,r=P.accept,o=P.minSize,i=P.maxSize,!(!P.multiple&&1<A.length))&&A.every(function(e){var t=me(ka(e,r),1)[0],e=me(Da(e,o,i),1)[0];return t&&e}),A=0<I&&!P,I=A?(s=(I={accept:f,minSize:h,maxSize:d,multiple:y,files:T}).files,c=I.accept,u=I.minSize,l=I.maxSize,!I.multiple&&1<s.length?"TOO_MANY_FILES":(I=s.every(function(e){return!me(ka(e,c),1)[0]}),s=s.every(function(e){return!me(Da(e,u,l),1)[0]}),I?"FILE_INVALID_TYPE":s?"FILE_TOO_LARGE":"")):"";return W(W({},D),{},{isDragAccept:P,isDragReject:A,getRootProps:z,getInputProps:F,rootRef:x,inputRef:k,draggedFiles:T,fileError:I,isFocused:e&&!p,open:a(L)})}function Ua(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=be(e),a=ve(he({},"FileUploaderButton",!0),a);return de.createElement("div",ye({},e,{className:a}),de.createElement(we,{type:"button",disabled:o,icon:"backup"},r),de.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 Wa(e,t,n){var r=e.sortingList,e=e.updateSortingList,o=(r=ge(r)).findIndex(function(e){return e.name===t});-1!==o&&(r=[].concat(ge(r.slice(0,o)),ge(r.slice(o+1)))),"unsort"!==n&&r.push({name:t,type:n}),e(r)}function qa(e,t,n){(0,e.updateColumnSchema)(t,{pinned:"unpin"!==n?n:void 0})}var Va=["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnterCallback","onDragOverCallback","onDragLeaveCallback","onDropCallback"],Ga=["refKey","onChange","onClick"],Ya={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};Ha.displayName="DropzoneBase",Ha.defaultProps={disabled:!1,getFilesFromEvent:function(e){return Ia.apply(this,arguments)},maxSize:1/0,minSize:0,multiple:!0,preventDropOnDocument:!0,validator:function(){return null}};W(W({},Ha.defaultProps),{},{type:"standard"}),Ua.defaultProps={uploadButtonLabel:"Upload files",disabled:!"FileUploaderFormat",multiple:!1},Ua.displayName="FileUploaderButton",Object.assign({},Ua.defaultProps,{title:"Upload files",sizeLabel:"Maximum size: 25 MB"});function $a(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 Za(e,t,n,r){var o,i=ge(e),a=j(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;(e[s].disabled&&r||!e[s].disabled)&&(i[s]=W(W({},i[s]),n))}}catch(e){a.e(e)}finally{a.f()}return i}function Ja(e,t){var n=W({},t);return e.translate&&(t=e.translate(t),n[e.name]=null!==t&&"object"===$(t)?W(W({},n[e.name]),t):t),null!==n[e.name]&&"object"===$(n[e.name])||(n[e.name]={title:n[e.name]}),n}function Xa(e,t){return Math.ceil(e/t)}function Qa(e,t){var n,r;return(e=e.filter(function(e){return e.disabled&&t||!e.disabled})).length?(n=e.some(function(e){return!e._selected}),r=e.every(function(e){return!e._selected}),{indeterminate:e=0<=e.length&&n&&!r,checked:!e&&!r}):{indeterminate:!1,checked:!1}}function es(e){return e&&!!e.length}function ts(e){var t=(r=de.useContext(hs)).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 ns(e){var t=de.useContext(hs),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,m=t.ref,t=t.withCheckbox,g=o.name,v=o.hidden,b=o.pinned,w=(_={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===(_=o.cellType)?"DEFAULT":_]).width,S=void 0===(S=_.minWidth)?96:S,_=void 0===(_=_.maxWidth)?800:_,E=(O=me(de.useState(!1),2))[0],C=O[1],O=ve({"Grid-cell":!0,"Grid-cell--head":n,"Grid-cell--dragged":E&&h,"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:de.createElement("div",{key:"".concat(a,"-").concat(s),className:O,draggable:n&&h,onDragStart:function(e){h&&(C(!0),e.dataTransfer.setData("name",g),b)&&e.dataTransfer.setData("type",b)},onDrag:function(){C(!1)},onDragOver:function(e){return e.preventDefault()},onMouseUpCapture:function(){C(!1)},onDragEnd:function(e){e.preventDefault(),C(!1)},onDrop:function(e){var t;h&&(C(!1),(e={name:e.dataTransfer.getData("name"),type:e.dataTransfer.getData("type")}).type===(t={name:g,type:b||""}).type)&&d&&d(e.name,t.name)},style:{width:$a({ref:m,withCheckbox:t},o.width||w),minWidth:$a({ref:m,withCheckbox:t},o.minWidth||S),maxWidth:$a({ref:m,withCheckbox:t},o.maxWidth||_)}},n?de.createElement(ms,{colIndex:s,schema:o,onSelectAll:u,onMenuChange:l,onFilterChange:f,updateColumnSchema:p,reorderColumn:d,setIsDragged:C}):de.createElement(gs,{rowIndex:a,colIndex:s,data:i,schema:o,expandedState:c}))}function rs(e){function t(e,t,r){var n;return e.length?(n=ve((he(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),he(n,"Grid-cellGroup--main",!r),n)),de.createElement("div",{className:n},t&&u?de.createElement("div",{className:"Grid-cell Grid-cell--head Grid-cell--checkbox"},l?de.createElement(M,null):de.createElement(gt,ye({},f,{onChange:o}))):null,e.map(function(e,t){var n="left"===r?t:p.length+t;return"right"===r&&(n+=d.length),de.createElement(ns,{key:"".concat(n),firstCell:!t,colIndex:n,isHead:!0,schema:e,onSelectAll:o,onMenuChange:i,onFilterChange:a,updateColumnSchema:s,reorderColumn:c})}))):null}var n=de.useContext(hs),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 de.createElement("div",{className:"Grid-head","data-test":"DesignSystem-GridHead-wrapper"},de.createElement("div",{className:"Grid-row Grid-row--head"},t(p,!!p.length,"left"),t(d,!p.length&&!!d.length),t(n,!1,"right")))}function os(e){function t(e,t,r){var n;return e.length?(n=ve((he(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),he(n,"Grid-cellGroup--main",!r),n)),de.createElement("div",{className:n,"data-test":"DesignSystem-Grid-cellGroup"},t&&i?de.createElement("div",{className:"Grid-cell Grid-cell--body Grid-cell--checkbox",onClick:function(e){return e.stopPropagation()}},o?de.createElement(M,null):de.createElement(gt,{checked:!!c._selected,onChange:function(e){l(u,e.target.checked)}})):null,e.map(function(e,t){var n="left"===r?t:m.length+t;return"right"===r&&(n+=v.length),de.createElement(ns,{key:"".concat(u,"-").concat(n),rowIndex:u,colIndex:n,firstCell:!t,schema:e,data:c,expandedState:[p,d]})}))):null}var n=(a=de.useContext(hs)).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=de.useRef(null),p=(h=me(de.useState(!1),2))[0],d=h[1],h=ve("Grid-row","Grid-row--body",{"Grid-row--selected":c._selected,"Grid-row--disabled":c.disabled}),y=de.useCallback(function(){"resource"!==n||o||r&&r(c,u)},[c,u]),m=(g=s.filter(function(e){return!e.hidden&&e.pinned})).filter(function(e){return!e.hidden&&"left"===e.pinned}),g=g.filter(function(e){return!e.hidden&&"right"===e.pinned}),v=s.filter(function(e){return!e.hidden&&!e.pinned}),s=ve(e,{"Grid-rowWrapper":!0});return de.createElement("div",{className:s},de.createElement("div",{"data-test":"DesignSystem-Grid-row",className:h,onClick:y,ref:f},t(m,!!m.length,"left"),t(v,!m.length&&!!v.length),t(g,!1,"right")),a&&p&&de.createElement("div",{className:"Grid-nestedRow"},de.createElement(ts,{data:c,rowIndex:u})))}function is(e){var n,t,r,o,i=(d=de.useContext(hs)).data,a=d.ref,s=d.loading,c=d.error,u=d.withPagination,l=d.page,f=d.pageSize,p=d.totalRecords,d=d.errorTemplate;return!s&&c?d?"function"==typeof d?d({}):d:null:(n=e.schema,t=e.prevPageInfo,r=e.updatePrevPageInfo,o=e.onSelect,de.useEffect(function(){var e=a.querySelector(".Grid-body");return e&&window.requestAnimationFrame(function(){t.page===l&&(e.scrollTop=t.scrollTop)}),function(){e&&r({page:l,scrollTop:e.scrollTop})}},[]),c=Math.ceil(p/f),d=u&&l===c?p-(l-1)*f:s?f:u?Math.min(p,f):p,de.createElement("div",{className:"Grid-body"},(s&&!i.length?ge(Array(d).map(function(e){return e})):i).map(function(e,t){return t=t,e=e,de.createElement(os,{key:t,rowIndex:t,data:e||i[t],schema:n,onSelect:o})})))}function as(e){var t=e.tooltip;return null!=(e=e.cellData.title)?t?de.createElement(ga,{tooltip:e,position:"top-start",triggerClass:"w-100 overflow-hidden"},de.createElement(Se,{className:"w-100 ellipsis"},e)):de.createElement(Se,{className:"w-100 ellipsis"},e):null}function ss(e){return(e=e.cellData.metaList)?de.createElement("div",{className:"GridCell-metaList","data-test":"DesignSystem-GridCell-metaList"},e.map(function(e,t){return de.createElement(Se,{key:t,className:"ellipsis",appearance:"subtle",size:"small"},e)})):null}function cs(e){var t=(e=e.cellData).firstName,n=e.lastName,e=e.title;return t||n?de.createElement(oe,{className:"mr-5",firstName:t,lastName:n}):e?de.createElement(oe,{className:"mr-5"},e):null}function us(e){var t,n,r=e.size,o=e.schema,i=e.loading,e=i?{}:Ja(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=ve(he({},"GridCell",!0));switch(s){case"DEFAULT":return de.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--default")},i?de.createElement(I,{length:"medium","data-test":"DesignSystem-GridCell-placeHolder"}):as({tooltip:l,cellData:f}));case"WITH_META_LIST":return de.createElement("div",{className:"".concat(p," GridCell--metaList")},i?de.createElement(de.Fragment,null,de.createElement(I,{length:"medium","data-test":"DesignSystem-GridCell-withMetaList"}),de.createElement(I,{length:"large",size:"xxs"})):de.createElement(de.Fragment,null,as({tooltip:l,cellData:f}),ss({cellData:f})));case"AVATAR":return i?de.createElement(M,{className:"GridCell--align-".concat(u),imageSize:"medium",round:!0}):de.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--avatar"),"data-test":"DesignSystem-GridCell-avatar"},"tight"!==r&&cs({cellData:f}));case"AVATAR_WITH_TEXT":return i?de.createElement(M,{imageSize:"medium",round:!0},de.createElement(I,{className:"ml-3",length:"medium"})):de.createElement("div",{className:"".concat(p," "),"data-test":"DesignSystem-GridCell-avatarWithText"},"tight"!==r&&cs({cellData:f}),as({tooltip:l,cellData:f}));case"AVATAR_WITH_META_LIST":return i?de.createElement(M,{imageSize:"medium",round:!0},de.createElement(I,{className:"ml-3",length:"medium"}),de.createElement(I,{className:"ml-3",length:"large"})):de.createElement("div",{className:"".concat(p," GridCell--avatarWithText"),"data-test":"DesignSystem-GridCell-avatarWithMetaList"},"tight"!==r&&cs({cellData:f}),de.createElement("div",{className:"GridCell-metaListWrapper"},as({tooltip:l,cellData:f}),ss({cellData:f})));case"ICON":return i?de.createElement(M,{className:"GridCell--align-".concat(u),imageSize:"small",round:!0}):de.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)?de.createElement(N,{name:t}):null));case"STATUS_HINT":return de.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--statusHint")},i?de.createElement(M,{className:"w-75 flex-grow-0",imageSize:"small",round:!0},de.createElement(I,{length:"large"})):(n=(n={cellData:f}).cellData,t=n.statusAppearance,(n=n.title)?de.createElement(On,{appearance:t},n):null))}return null}function ls(e){var t=e.options,n=e.onChange,r=(e=me(de.useState(!1),2))[0],o=e[1],i=(e=me(de.useState(t),2))[0],a=e[1],s=(e=me(de.useState("var(--spacing-8)"),2))[0],c=e[1];return de.useEffect(function(){a(t)},[r]),de.createElement("div",{className:"Dropdown"},de.createElement(ha,{open:r,onToggle:function(e){o(e)},trigger:de.createElement(we,{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(ds(t.length))),triggerClass:"w-100",customStyle:{width:s},className:"Header-draggableDropdown"},de.createElement("div",{className:"Dropdown-wrapper"},de.createElement("div",{className:"OptionWrapper"},de.createElement(gt,{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 W(W({},e),{},{selected:t.target.checked})}))}})),i.map(function(e,r){return de.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(ps(i,e,r))}},de.createElement(gt,{className:"OptionCheckbox",name:e.value,label:e.label,checked:i[r].selected,onChange:function(e){return e=e,t=r,(n=ge(i))[t]=W(W({},n[t]),{},{selected:e.target.checked}),void a(n);var t,n}}),de.createElement(N,{name:"drag_handle",className:"mr-4"}))})),de.createElement("div",{className:"Dropdown-buttonWrapper"},de.createElement(we,{type:"button",className:"mr-4",size:"tiny",onClick:function(){o(!1)}},"Cancel"),de.createElement(we,{type:"button",appearance:"primary",size:"tiny",onClick:function(){o(!1),n&&n(i)}},"Apply"))))}function fs(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,m=e.onSelectAll,g=e.searchPlaceholder,v=e.selectAll,b=e.searchTerm,w=e.updateSearchTerm,S=e.dynamicColumn,_=e.allowSelectAll,E=e.showFilters,e=e.customSelectionLabel,C=(D=me(de.useState(!1),2))[0],O=D[1],x=(D=me(de.useState(!0),2))[0],k=D[1],D=(de.useEffect(function(){k(!x)},[o]),de.useEffect(function(){v&&v.checked&&m&&m(!0,C)},[C]),de.useEffect(function(){v&&!v.checked&&O(!1)},[v]),o.filter(function(e){return e.filters})),j=o.map(function(e){return{label:e.displayName,value:e.name,selected:!e.hidden}}),e=e||"item",r=r.filter(function(e){return e._selected}).length,T=(c-1)*u+1,c=Math.min(c*u,y),u=n?"Showing 0 ".concat(e,"s"):l&&r?C?"Selected all ".concat(y," ").concat(e).concat(ds(y)):"Selected ".concat(r," ").concat(e).concat(ds(y)," on this page"):(s?"Showing ".concat(T,"-").concat(c," of "):"Showing ").concat(y," ").concat(e).concat(ds(y));return de.createElement("div",{className:"Header"},de.createElement("div",{className:"Header-content Header-content--top"},i&&de.createElement("div",{className:"Header-search"},de.createElement(an,{"data-test":"DesignSystem-Table-Header--withSearch",name:"GridHeader-search",icon:"search",placeholder:g,onChange:function(e){e=e.target.value;w&&w(e)},value:b,onClear:function(){return w&&w("")},disabled:t&&!es(o),autoComplete:"off"})),E&&0<D.length&&de.createElement("div",{className:"Header-dropdown"},de.createElement("div",{className:"Header-filters"},D.map(function(e){var n=e.name,t=e.displayName,e=e.filters,e=e?e.map(function(t){return W(W({},t),{},{selected:d[n]&&-1!==d[n].findIndex(function(e){return e===t.value})})}):[];return de.createElement(Qt,{key:n,withCheckbox:!0,showApplyButton:!0,inlineLabel:t,icon:"filter_list",options:e,onChange:function(e){var t=n;t=W(W({},d),{},he({},t,e)),h&&h(t)}})}))),f&&de.createElement("div",{className:"Header-actions"},f)),de.createElement("div",{className:"Header-content Header-content--bottom"},de.createElement("div",{className:"Header-label"},!a&&l&&!t&&de.createElement(gt,ye({},v,{onChange:function(e){m&&m(e.target.checked)}})),t?de.createElement(M,{withImage:!a&&l},de.createElement(I,{length:"small",size:"s"})):de.createElement(de.Fragment,null,de.createElement(Ut,null,u),s&&(null==v?void 0:v.checked)&&_&&de.createElement("div",{className:"ml-4"},C?de.createElement(we,{"data-test":"DesignSystem-Table-Header--clearSelectionItemsButton",size:"tiny",onClick:function(){return O(!1)}},"Clear Selection"):de.createElement(we,{"data-test":"DesignSystem-Table-Header--selectAllItemsButton",size:"tiny",onClick:function(){return O(!0)}},"Select all ".concat(y," ").concat(e,"s"))))),S&&de.createElement("div",{className:"Header-hideColumns"},de.createElement(ls,{options:j,onChange:function(e){e=e.map(function(t){return W(W({},o.find(function(e){return e.name===t.value})),{},{hidden:!t.selected})});p&&p(e)}}))))}var ps=function(e,t,n){return t===n?e:t<n?[].concat(ge(e.slice(0,t)),ge(e.slice(t+1,n+1)),[e[t]],ge(e.slice(n+1))):[].concat(ge(e.slice(0,n)),[e[t]],ge(e.slice(n,t)),ge(e.slice(t+1)))},ds=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},hs=de.createContext(W(W({},n),{},{ref:null})),ys=hs.Provider,ms=function(e){function t(){return de.createElement(de.Fragment,null,de.createElement(Se,{weight:"strong",className:"ellipsis--noWrap"},r.displayName),m&&de.createElement("div",{className:"Grid-sortingIcons"},w?"asc"===w?de.createElement(N,{name:"arrow_upward"}):de.createElement(N,{name:"arrow_downward"}):de.createElement(N,{name:"unfold_more"})))}var n=de.useContext(hs),r=e.schema,a=e.setIsDragged,o=e.colIndex,i=e.onSelectAll,s=e.onMenuChange,c=e.onFilterChange,u=e.updateColumnSchema,e=e.reorderColumn,o={schema:r,colIndex:o,onSelectAll:i,onMenuChange:s,onFilterChange:c,updateColumnSchema:u,reorderColumn:e,setIsDragged:a},l=n.loading,i=n.draggable,e=n.showMenu,f=n.sortingList,p=n.filterList,d=n.headCellTooltip,h=n.showFilters,n=n.schema,y=r.sorting,m=void 0===y||y,g=r.name,y=r.filters,v=r.pinned,n=es(n),b=f.findIndex(function(e){return e.name===g}),w=-1!==b?f[b].type:null,S=de.createRef(),f=[{label:"Sort Ascending",value:"sortAsc",icon:"arrow_upward"},{label:"Sort Descending",value:"sortDesc",icon:"arrow_downward"}],b=[{label:"Pin Left",value:"pinLeft",icon:"skip_previous"},{label:"Pin Right",value:"pinRight",icon:"skip_next"}],_={label:"Unpin",value:"unpin",icon:"replay"},_=("left"===v&&(b[0]=_),"right"===v&&(b[1]=_),{label:"Unsort",value:"unsort",icon:"unfold_more"}),_=("asc"===w&&(f[0]=_),"desc"===w&&(f[1]=_),[].concat(b,[{label:"Hide Column",value:"hide",icon:"cancel"}])),b=(m&&(_=[].concat(f,ge(_))),ve({"Grid-headCell":!0,"Grid-headCell--draggable":i})),f=y?y.map(function(t){return W(W({},t),{},{selected:p[g]&&-1!==p[g].findIndex(function(e){return e===t.value})})}):[];return de.createElement("div",{key:g,className:b,ref:S},de.createElement("div",{className:"Grid-cellContent","data-test":"DesignSystem-Grid-cellContent",onClick:function(){!l&&m&&("asc"===w&&s(g,"sortDesc"),"desc"===w&&s(g,"unsort"),w||s(g,"sortAsc"))}},l&&!n?de.createElement(M,{withImage:!1},de.createElement(I,{length:"medium"})):!r.headerCellRenderer&&d?de.createElement(ga,{position:"top-start",triggerClass:"w-100 overflow-hidden",tooltip:r.displayName},t()):r.headerCellRenderer&&!d?r.headerCellRenderer(o):t()),h&&y&&de.createElement(de.Fragment,null,l&&!n?de.createElement("span",null,de.createElement(M,null)):de.createElement("div",null,de.createElement(Qt,{menu:!0,showApplyButton:!0,withCheckbox:!0,triggerOptions:{customTrigger:function(){return de.createElement(we,{icon:"filter_list",appearance:"transparent"})}},options:f,align:"left",onChange:function(e){return c(g,e)},minWidth:176}))),e&&de.createElement(de.Fragment,null,l&&!n?de.createElement("span",{className:"ml-4"},de.createElement(M,null)):de.createElement("div",null,de.createElement(Qt,{key:"".concat(g,"-").concat(w,"-").concat(v),menu:!0,optionType:"WITH_ICON",triggerOptions:{customTrigger:function(){return de.createElement(we,{icon:"more_vert_filled",appearance:"transparent"})}},options:_,align:"left",onChange:function(e){return s(g,e)},minWidth:176}))),r.resizable&&de.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:u},n=g,r=S.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(!1)}}))},gs=function(e){var t=de.useContext(hs),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=me(o,2),c=o[0],u=o[1],o={rowIndex:i,colIndex:e,size:a,schema:r,data:n,loading:s,expanded:c},l=!ts({data:n,rowIndex:i});return de.createElement("div",{className:"Grid-cellContent"},0===e&&t&&de.createElement(de.Fragment,null,l?de.createElement("span",{className:"Grid-nestedRowPlaceholder"}):de.createElement(N,{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):de.createElement(us,ye({key:"".concat(i,"-").concat(e)},o)))},vs=(os.defaultProps={data:{}},function(){e(n,de["Component"]);var t=h(n);function n(e){var i;d(this,n),he(V(i=t.call(this,e)),"gridRef",null),he(V(i),"isHeadSyncing",!1),he(V(i),"isBodySyncing",!1),he(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)}}),he(V(i),"updateRenderedSchema",function(e){var t=i.props.updateSchema;t&&t(e)}),he(V(i),"updateColumnSchema",function(t,e){var n=ge(i.props.schema),r=n.findIndex(function(e){return e.name===t});n[r]=W(W({},n[r]),e),i.updateRenderedSchema(n)}),he(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=ps(e,r,o);i.updateRenderedSchema(e)}),he(V(i),"updateSortingList",function(e){var t=i.props.updateSortingList;t&&t(e)}),he(V(i),"updateFilterList",function(e){var t=i.props.updateFilterList;t&&t(e)}),he(V(i),"onMenuChange",function(e,t){var n,r,o=i.props.sortingList;switch(t){case"sortAsc":Wa({sortingList:o,updateSortingList:i.updateSortingList},e,"asc");break;case"sortDesc":Wa({sortingList:o,updateSortingList:i.updateSortingList},e,"desc");break;case"unsort":Wa({sortingList:o,updateSortingList:i.updateSortingList},e,"unsort");break;case"pinLeft":qa({updateColumnSchema:i.updateColumnSchema},e,"left");break;case"pinRight":qa({updateColumnSchema:i.updateColumnSchema},e,"right");break;case"unpin":qa({updateColumnSchema:i.updateColumnSchema},e,"unpin");break;case"hide":n={updateColumnSchema:i.updateColumnSchema},r=!0,(0,n.updateColumnSchema)(e,{hidden:r})}}),he(V(i),"onFilterChange",function(e,t){e=W(W({},i.props.filterList),{},he({},e,t));i.updateFilterList(e)}),he(V(i),"onSelect",function(e,t){var n=i.props.onSelect;n&&n(e,t)}),he(V(i),"onSelectAll",function(e){var t=i.props.onSelectAll;t&&t(e.target.checked)}),he(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=be(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=!es(f=f)&&l?o:f),f=ve((he(o={Grid:"true"},"Grid--".concat(i),i),he(o,"Grid--".concat(a),a),o),c);return de.createElement("div",ye({className:f},e,{ref:function(e){t.gridRef=e}}),r&&de.createElement(ys,{value:W(W({},this.props),{},{ref:this.gridRef})},s&&de.createElement(rs,{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)}),de.createElement(is,{key:"".concat(u),schema:l,prevPageInfo:n,updatePrevPageInfo:this.updatePrevPageInfo.bind(this),onSelect:this.onSelect.bind(this)})))}}]),n}()),bs=(he(vs,"defaultProps",void 0),vs.defaultProps=n,us.displayName="GridCell",["children"]),r={type:"data",size:"standard",showHead:!0,showMenu:!0,multipleSorting:!0,headerOptions:{},withPagination:!0,paginationType:"jump",page:1,pageSize:15,draggable:!0,data:[],schema:[],loading:!(fs.defaultProps={schema:[],data:[],searchPlaceholder:"Search",dynamicColumn:!0,showFilters:!0}),error:!1,loaderSchema:[],sortingList:[],filterList:{},filterPosition:"GRID",searchDebounceDuration:750,pageJumpDebounceDuration:750,errorTemplate:function(e){e=e.errorType;return de.createElement(nn,null,{FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No results found"}[void 0===e?"DEFAULT":e])}},u=function(){e(i,de["Component"]);var o=h(i);function i(e){d(this,i),he(V(l=o.call(this,e)),"debounceUpdate",void 0),he(V(l),"updateData",function(e){l.state.async&&l.setState({loading:!0}),e?l.debounceUpdate():l.updateDataFn()}),he(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:Qa(t,l.props.selectDisabledRow),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=ge(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=Ja(o[r],e),t=Ja(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:Qa(o,l.props.selectDisabledRow),schema:e,data:o}))}),he(V(l),"onSelect",function(e,t){var n=l.state.data,r=l.props.onSelect,o=[e],i=n;0<=e&&(i=Za(n,o,{_selected:t},l.props.selectDisabledRow),l.setState({data:i,selectAll:Qa(i,l.props.selectDisabledRow)})),r&&r(o,t,-1===e?[]:i.filter(function(e){return e._selected}))}),he(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=Za(r,o,{_selected:e},l.props.selectDisabledRow),i=[];r.forEach(function(e,t){e._selected&&i.push(t)}),n&&n(i,e,r.filter(function(e){return e._selected}),t),l.setState({data:r,selectAll:Qa(r,l.props.selectDisabledRow)})}),he(V(l),"onPageChange",function(e){l.setState({page:e})}),he(V(l),"updateSchema",function(e){l.setState({schema:e})}),he(V(l),"updateSortingList",function(e){var t=l.props.multipleSorting;l.setState({sortingList:t?ge(e):e.slice(-1),page:1})}),he(V(l),"updateFilterList",function(e){l.setState({filterList:e,page:1})}),he(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:Qa([]),searchTerm:void 0},l.debounceUpdate=Rt(e.searchDebounceDuration,l.updateDataFn),l}return a(i,[{key:"componentDidMount",value:function(){this.updateData()}},{key:"componentDidUpdate",value:function(e,t){var n,r,o=this;this.state.async||(e.error!==this.props.error&&(r=(n=this.props).data,n=n.schema,this.setState({data:r=void 0===r?[]:r,schema:void 0===n?[]:n,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:r.length||0,selectAll:Qa([])})),e.loading!==this.props.loading&&(r=(n=this.props).data,e=n.schema,this.setState({data:n=void 0===r?[]:r,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:Qa([])},function(){o.updateData()}))),t.page!==this.state.page&&(r=this.props.onPageChange)&&r(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||(e=t.searchTerm!==this.state.searchTerm,this.updateData(e))}},{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,m=e.pageJumpDebounceDuration,g=e.onRowClick,v=e.loaderSchema,b=e.errorTemplate,w=e.className,e=e.filterPosition,S=be(this.props),_=l.children,l=q(l,bs),w=w?" ".concat(w):"",E=this.state.totalRecords,C=Xa(E,y);return de.createElement("div",ye({},S,{className:"Table".concat(w),"data-test":"DesignSystem-Table-wrapper"}),u&&de.createElement("div",{className:"Table-header","data-test":"DesignSystem-Table-header"},de.createElement(fs,ye({},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),_)),de.createElement("div",{className:"Table-grid"},de.createElement(vs,ye({},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<C,pageSize:y,loaderSchema:v,errorTemplate:b&&b({errorType:this.state.errorType}),onRowClick:g,showFilters:"GRID"===e}))),d&&!this.state.loading&&!this.state.error&&1<C&&de.createElement("div",{className:"Table-pagination"},de.createElement(oa,{page:this.state.page,totalPages:Xa(E,y),type:h,onPageChange:this.onPageChange,pageJumpDebounceDuration:m})))}}]),i}(),ws=(he(u,"defaultProps",r),de.useState,de.useEffect,de.useState,{success:"check_circle",info:"info",warning:"warning",alert:"error"}),Ss=function(e){var t=e.appearance,n=e.className,r=e.description,o=e.size,e=be(e),n=ve(he({},"InlineMessage",!0),n),i=ve((he(i={},"InlineMessage-icon--warning","warning"===t),he(i,"InlineMessage-icon--small","small"===o),he(i,"InlineMessage-icon--regular","regular"===o),i)),a=ve(he({},"InlineMessage-text--".concat(t),t)),s="small"===o?14:16,c="small"===o?"medium":void 0;return de.createElement("div",ye({"data-test":"DesignSystem-InlineMessage"},e,{className:n}),"default"!==t&&de.createElement(N,{"data-test":"DesignSystem-InlineMessage--Icon",name:ws[t],appearance:t,className:i,size:s}),de.createElement(Se,{size:o,weight:c,className:a,"data-test":"DesignSystem-InlineMessage--Description"},r))},_s=(Ss.displayName="InlineMessage",Ss.defaultProps={appearance:"default",description:"",size:"regular"},function(e){var t=e.error,e=e.message;return e?t?de.createElement(Ss,{size:"small",className:"mt-3",appearance:"alert",description:e}):de.createElement("div",{className:"mt-3"},de.createElement(Se,{appearance:"subtle",size:"small",weight:"medium"},e)):null}),Es=(_s.displayName="HelpText",["children","type","className","disabled","tabIndex","icon","subtle","size","iconAlign"]),Cs={tiny:12,regular:16},o=de.forwardRef(function(e,t){var n=e.children,r=e.type,o=e.className,i=e.disabled,a=e.tabIndex,s=e.icon,c=e.subtle,u=e.size,l=e.iconAlign,e=q(e,Es),c=ve((he(f={},"LinkButton",!0),he(f,"LinkButton--".concat(u),u),he(f,"LinkButton--default",!c),he(f,"LinkButton--subtle",c),he(f,"LinkButton--iconAlign-".concat(l),n&&l),he(f,"".concat(o),o),f)),f=ve((he(o={},"LinkButton-icon",!0),he(o,"LinkButton-icon--".concat(l),n&&l),o));return de.createElement("button",ye({ref:t,type:r,"data-test":"DesignSystem-LinkButton",className:c,disabled:i,tabIndex:a},e),de.createElement(de.Fragment,null,s&&de.createElement("div",{className:f},de.createElement(N,{"data-test":"DesignSystem-LinkButton--Icon",name:s,size:u&&Cs[u]})),n))});o.displayName="LinkButton",o.defaultProps={size:"regular",type:"button",iconAlign:"left"}}.call(this,xs(23))},function(e,t,n){function o(e){var t;return(s[e]||(t=s[e]={i:e,l:!1,exports:{}},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 m(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 g=Object(o.Map)({code:{element:"pre"}}),v=u.DefaultDraftBlockRenderMap.merge(g);function b(e){return!!e&&("unordered-list-item"===(e=e.getType())||"ordered-list-item"===e)}function w(e,t,n){var r,o,i=e.getSelection(),i=i.getIsBackward()?i.getFocusKey():i.getAnchorKey(),a=e.getCurrentContent(),s=a.getBlockForKey(i),c=s.getType();return"unordered-list-item"!==c&&"ordered-list-item"!==c||!(a=a.getBlockBefore(i))||a.getType()!==c||(i=s.getDepth(),1===t&&i===n)?e:(c=Math.min(a.getDepth()+1,n),r=t,o=c,i=(s=e).getSelection(),n=(a=s.getCurrentContent()).getBlockMap(),t=l(s).map(function(e){var t=e.getDepth()+r,t=Math.max(0,Math.min(t,o));return e.set("depth",t)}),n=n.merge(t),c=a.merge({blockMap:n,selectionBefore:i,selectionAfter:i}),u.EditorState.push(e,c,"adjust-depth"))}function S(e,t){var n,r;return 13===(t=t).which&&(t.getModifierState("Shift")||t.getModifierState("Alt")||t.getModifierState("Control"))?e.getSelection().isCollapsed()?u.RichUtils.insertSoftNewline(e):p(e):(e=(t=e).getSelection()).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?w(t,-1,r):void 0:void 0:d(t)):void 0}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 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){T[e]["".concat(e.toLowerCase(),"-").concat(n)]=E({},"".concat(t),n)}function j(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach(function(e){E(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}({},T.color,{},T.bgcolor,{},T.fontSize,{},T.fontFamily,{CODE:T.CODE,SUPERSCRIPT:T.SUPERSCRIPT,SUBSCRIPT:T.SUBSCRIPT})}var T={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(T[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 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]=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 A(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 w}),t.d(e,"handleNewLine",function(){return S}),t.d(e,"getEntityRange",function(){return k}),t.d(e,"getCustomStyleMap",function(){return j}),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 A}),t.d(e,"getSelectionInlineStyle",function(){return O}),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 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 m}),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||n.toString.toString().includes("[native code]"))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:S(e)}function L(e){return f(e)?e:_(e)}function r(e){return l(e)&&!z(e)?e:de(e)}function l(e){return!!(e&&e[B])}function u(e){return!!(e&&e[K])}function f(e){return!!(e&&e[H])}function z(e){return u(e)||f(e)}function F(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=z,c.isOrdered=F,c.Keyed=s,c.Indexed=L,c.Set=r;var B="@@__IMMUTABLE_ITERABLE__@@",K="@@__IMMUTABLE_KEYED__@@",H="@@__IMMUTABLE_INDEXED__@@",U="@@__IMMUTABLE_ORDERED__@@",q="delete",b=5,p=1<<b,w=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 m(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 g(){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 S(e){return e===null||e===undefined?Ee().toKeyedSeq():l(e)?u(e)?e.toSeq():e.fromEntrySeq():Ce(e)}function _(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 je(this,e,t,true)},e(S,t),S.prototype.toKeyedSeq=function(){return this},e(_,t),_.of=function(){return _(arguments)},_.prototype.toIndexedSeq=function(){return this},_.prototype.toString=function(){return this.__toString("Seq [","]")},_.prototype.__iterate=function(e,t){return De(this,e,t,false)},_.prototype.__iterator=function(e,t){return je(this,e,t,false)},e(de,t),de.of=function(){return de(arguments)},de.prototype.toSetSeq=function(){return this},t.isSeq=_e,t.Keyed=S,t.Set=de,t.Indexed=_;var he="@@__IMMUTABLE_SEQ__@@",ye,me,ge;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 we(e){this._iterable=e;this.size=e.length||e.size}function Se(e){this._iterator=e;this._iteratorCache=[]}function _e(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 Se(e).fromEntrySeq():ce(e)?new we(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 Se(e):ce(e)?new we(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 je(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?g():m(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function Te(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,_(r).map(function(e,t){return Ie(n,e,t,r)}));if(Ne(r))return n.call(t,e,S(r).map(function(e,t){return Ie(n,e,t,r)}));return r}function Me(e){if(Array.isArray(e))return _(e).map(Me).toList();if(Ne(e))return S(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 Pe(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)||F(n)!==F(e))return false;if(n.size===0&&e.size===0)return true;var r=!z(n);if(F(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(me)return me;me=this}}function Ae(e,t){if(!e)throw new Error(t)}function i(e,t,n){if(!(this instanceof i))return new i(e,t,n);Ae(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(ge)return ge;ge=this}}function Re(){throw TypeError("Abstract")}function Le(){}function ze(){}function Fe(){}t.prototype[he]=true,e(ve,_),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?g():m(e,o,n[t?r-o++:o++])})},e(be,S),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?g():m(t,e,r[e])})},be.prototype[U]=true,e(we,_),we.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},we.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(g);var o=0;return new y(function(){var e=r.next();return e.done?e:m(t,o++,e.value)})},e(Se,_),Se.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},Se.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 m(t,o,r[o++])})},e(o,_),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?m(e,r++,n._value):g()})},o.prototype.equals=function(e){return e instanceof o?E(this._value,e._value):Pe(e)},e(i,_),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?g():m(t,a++,e)})},i.prototype.equals=function(e){return e instanceof i?this._start===e._start&&this._end===e._end&&this._step===e._step:Pe(this,e)},e(Re,c),e(Le,Re),e(ze,Re),e(Fe,Re),Re.Keyed=Le,Re.Indexed=ze,Re.Set=Fe;var Be=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){Ae(e!==Infinity,"Cannot perform this action with an infinite size.")}function x(t){return t===null||t===undefined?ht():nt(t)&&!F(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 _t(this,undefined,arguments)},x.prototype.mergeWith=function(e){var t=R.call(arguments,1);return _t(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 _t(this,Et,arguments)},x.prototype.mergeDeepWith=function(e){var t=R.call(arguments,1);return _t(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 m(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=mt(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 mt(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 gt(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)&w;var a=(n===0?r:r>>>n)&w;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 wt(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 St(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 _t(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 Te(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}Ae(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 jt(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 Tt(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)&w);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)&w;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=mt(d,e,t+b,n,r,o,i,a);if(h===d)return this;if(!l&&h&&p.length>=Mt)return St(e,p,u,s,h);if(l&&!h&&p.length===2&>(p[f^1]))return p[f^1];if(l&&h&&p.length===1&>(h))return h;var y=e&&e===this.ownerID;var m=l?h?u:u^c:u|c;var g=l?h?Dt(p,f,h,y):Tt(p,f,y):jt(p,f,h,y);if(y){this.bitmap=m;this.nodes=g;return this}return new at(e,m,g)},st.prototype.get=function(e,t,n,r){if(t===undefined)t=C(n);var o=(e===0?t:t>>>e)&w;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)&w;var c=o===v;var u=this.nodes;var l=u[s];if(c&&!l)return this;var f=mt(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 wt(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 g()};var It=p/4,Mt=p/2,Nt=p/4;function n(e){var t=Ht();if(e===null||e===undefined)return t;if(Pt(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 Pt(e){return!!(e&&e[At])}e(n,ze),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&w]}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=Bt(this,e);return new y(function(){var e=r();return e===Lt?g():m(t,n++,e)})},n.prototype.__iterate=function(e,t){var n=0;var r=Bt(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=Pt;var At="@@__IMMUTABLE_LIST__@@",k=n.prototype;function Rt(e,t){this.array=e;this.ownerID=t}k[At]=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&w;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&w;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={},zt,Ft;function Bt(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 zt||(zt=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&w;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&w];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 m=c;m>b;m-=b){var g=f>>>m&w;y=y.array[g]=Wt(y.array[g],r)}y.array[f>>>b&w]=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&w;if(v!==p>>>c&w)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 Te(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)&&F(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 Ft||(Ft=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 m(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 m(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=(F(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 j(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&&_e(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 g();var e=n.next();if(c||t===d)return e;else if(t===re)return m(t,o-1,undefined,e);else return m(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 g();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 g()}return o===oe?e:m(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 m(o,c++,undefined,e);else return m(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:m(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:m(n,a++,t,e)}return g()})};return t}function mn(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 gn(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?m(e,r++,a):m(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?S(a):f(n)?_(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 wn(r,e[1],t[1])?t:e});return e&&e[0]}else return n.reduce(function(e,t){return wn(r,e,t)?t:e})}function wn(e,t,n){var r=e(n,t);return r===0&&n!==t&&(n===undefined||n===null||n!==n)||r>0}function Sn(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 g();return m(t,o++,a.apply(null,e.map(function(e){return e.value})))})};return t}function j(e,t){return _e(e)?t:e.constructor(t)}function _n(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)?S:f(e)?_: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 T(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,S),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:m(t,n?--o:o++,e.value,e)})},en.prototype[U]=true,e(tn,_),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:m(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:m(t,e.value,e.value,e)})},e(rn,S),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){_n(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){_n(t);var n=l(t);return m(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(T,Le),T.prototype.toString=function(){return this.__toString(Tn(this)+" {","}")},T.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},T.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},T.prototype.clear=function(){if(this.__ownerID){this._map&&this._map.clear();return this}var e=this.constructor;return e._empty||(e._empty=jn(this,ht()))},T.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Tn(this));var n=this._map&&this._map.set(e,t);if(this.__ownerID||n===this._map)return this;return jn(this,n)},T.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 jn(this,t)},T.prototype.wasAltered=function(){return this._map.wasAltered()},T.prototype.__iterator=function(e,t){var n=this;return s(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},T.prototype.__iterate=function(e,t){var n=this;return s(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},T.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 jn(this,t,e)};var I=T.prototype;function jn(e,t,n){var r=Object.create(Object.getPrototypeOf(e));r._map=t;r.__ownerID=n;return r}function Tn(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){Ae(this.__ownerID,"Cannot set on an immutable record.");this.set(t,e)}})}function M(n){return n===null||n===undefined?zn():Nn(n)&&!F(n)?n:zn().withMutations(function(t){var e=r(n);O(e.size);e.forEach(function(e){return t.add(e)})})}function Nn(e){return!!(e&&e[Pn])}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,Fe),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 Fn(vn(this,e))},M.prototype.sortBy=function(e,t){return Fn(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 Pn="@@__IMMUTABLE_SET__@@",N=M.prototype,An;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 zn(){return An||(An=Ln(ht()))}function Fn(n){return n===null||n===undefined?qn():Bn(n)?n:qn().withMutations(function(t){var e=r(n);O(e.size);e.forEach(function(e){return t.add(e)})})}function Bn(e){return Nn(e)&&F(e)}N[Pn]=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=zn,N.__make=Ln,e(Fn,M),Fn.of=function(){return this(arguments)},Fn.fromKeys=function(e){return this(s(e).keySeq())},Fn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Fn.isOrderedSet=Bn;var Kn=Fn.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 P(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(P,ze),P.of=function(){return this(arguments)},P.prototype.toString=function(){return this.__toString("Stack [","]")},P.prototype.get=function(e,t){var n=this._head;e=J(this,e);while(n&&e--)n=n.next;return n?n.value:t},P.prototype.peek=function(){return this._head&&this._head.value},P.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)},P.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)},P.prototype.pop=function(){return this.slice(1)},P.prototype.unshift=function(){return this.push.apply(this,arguments)},P.prototype.unshiftAll=function(e){return this.pushAll(e)},P.prototype.shift=function(){return this.pop.apply(this,arguments)},P.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()},P.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 ze.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)},P.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)},P.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},P.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 m(t,n++,e)}return g()})},P.isStack=Wn;var Vn="@@__IMMUTABLE_STACK__@@",Gn=P.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 Fn(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 P(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 j(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 j(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 j(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 j(this,sn(this,true))},slice:function(e,t){return j(this,fn(this,e,t,true))},some:function(e,t){return!this.every(nr(e),t)},sort:function(e){return j(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 Pe(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 j(this,mn(this,e,t))},flatten:function(e){return j(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 j(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return j(this,dn(this,e,t,true))},skipUntil:function(e,t){return this.skipWhile(nr(e),t)},sortBy:function(e,t){return j(this,vn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return j(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return j(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 A=c.prototype;A[B]=true,A[se]=A.values,A.__toJS=A.toArray,A.__toStringMapper=or,A.inspect=A.toSource=function(){return this.toString()},A.chain=A.flatMap,A.contains=A.includes;try{Object.defineProperty(A,"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 j(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 j(this,this.toSeq().map(function(e,t){return n.call(r,[t,e],i++,o)}).fromEntrySeq())},mapKeys:function(n,r){var o=this;return j(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=F(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=Be(t,3432918353);t=Be(t<<15|t>>>-15,461845907);t=Be(t<<13|t>>>-13,5);t=(t+3864292196|0)^e;t=Be(t^t>>>16,2246822507);t=Be(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]=A.entries,Xn.__toJS=A.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 j(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 j(this,sn(this,false))},slice:function(e,t){return j(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 j(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 j(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 j(this,gn(this,e))},interleave:function(){var e=[this].concat($(arguments));var t=Sn(this.toSeq(),_.of,e);var n=t.flatten(true);if(t.size)n.size=t.size*e.length;return j(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return j(this,dn(this,e,t,false))},zip:function(){var e=[this].concat($(arguments));return j(this,Sn(this,ir,e))},zipWith:function(e){var t=$(arguments);t[0]=this;return j(this,Sn(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=A.includes,Jn(S,s.prototype),Jn(_,L.prototype),Jn(de,r.prototype),Jn(Le,s.prototype),Jn(ze,L.prototype),Jn(Fe,r.prototype),{Iterable:c,Seq:t,Collection:Re,Map:x,OrderedMap:D,List:n,Stack:P,Set:M,OrderedSet:Fn,Record:T,Range:i,Repeat:o,is:E,fromJS:Te}}()},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){var n;return 0===e.getBlockMap().count()?u.createEmpty(t):(n=e.getBlockMap().first().getKey(),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:g(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());l!==u?(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)}))):g(f,l),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,t,n,r,o,i=this.getInlineStyleOverride();return null!=i?i:(i=this.getCurrentContent(),(e=this.getSelection()).isCollapsed()?(n=i,o=(t=e).getStartKey(),t=t.getStartOffset(),r=n.getBlockForKey(o),0<t?r.getInlineStyleAt(t-1):r.getLength()?r.getInlineStyleAt(0):v(n,o)):(t=i,n=(r=e).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 m(e,t,!1)},u.forceSelection=function(e,t){return m(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,o,i,a,s,c=!(3<arguments.length&&void 0!==arguments[3])||arguments[3];return e.getCurrentContent()===t?e:(r=l.getDirectionMap(t,e.getDirectionMap()),e.getAllowUndo()?(a=e.getSelection(),s=e.getCurrentContent(),o=e.getUndoStack(),i=t,a!==s.getSelectionAfter()||function(e,t){e=e.getLastChangeType();return t!==e||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(e,n)?(o=o.push(s),i=i.set("selectionBefore",a)):"insert-characters"!==n&&"backspace-character"!==n&&"delete-character"!==n||(i=i.set("selectionBefore",s.getSelectionBefore())),a=e.getInlineStyleOverride(),-1===["adjust-depth","change-block-type","split-block"].indexOf(n)&&(a=null),s={currentContent:i,directionMap:r,undoStack:o,redoStack:f(),lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:c,inlineStyleOverride:a},u.set(e,s)):u.set(e,{currentContent:t,directionMap:r,lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:c,inlineStyleOverride:null}))},u.undo=function(e){var t,n,r,o;return e.getAllowUndo()&&(n=(t=e.getUndoStack()).peek())?(r=e.getCurrentContent(),o=l.getDirectionMap(n,e.getDirectionMap()),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()})):e},u.redo=function(e){var t,n,r,o;return e.getAllowUndo()&&(n=(t=e.getRedoStack()).peek())?(r=e.getCurrentContent(),o=l.getDirectionMap(n,e.getDirectionMap()),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},e.getImmutable=function(){return this._immutable},u}();function m(e,t,n){return u.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function g(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),m=s.OrderedSet,g={replaceText:function(e,t,n,r,o){e=d(e,t),e=h(e,t),t=i.create({style:r||m(),entity:o||null});return l(e,e.getSelectionAfter(),n,t)},insertText:function(e,t,n,r,o){return t.isCollapsed()||f(!1),g.replaceText(e,t,n,r,o)},moveText:function(e,t,n){var r=a(e,t),e=g.removeRange(e,t,"backward");return g.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=g},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){return e===n||!!n.startsWith(e)&&(n=n.slice(e.length),!!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){var t;return e?(e=o({style:a,entity:null}).merge(e),c.get(e)||(t=new n(e),c=c.set(e,t),t)):s},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(r){var e;function t(){var e,t,n;return r.call(this,((e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:d)&&(t=e.characterList,n=e.text)&&!t&&(e.characterList=c(f(a.EMPTY,n.length))),e))||this}e=r,(n=t).prototype=Object.create(e.prototype),(n.prototype.constructor=n).__proto__=e;var n=t.prototype;return n.getKey=function(){return this.get("key")},n.getType=function(){return this.get("type")},n.getText=function(){return this.get("text")},n.getCharacterList=function(){return this.get("characterList")},n.getLength=function(){return this.getText().length},n.getDepth=function(){return this.get("depth")},n.getData=function(){return this.get("data")},n.getInlineStyleAt=function(e){e=this.getCharacterList().get(e);return e?e.getStyle():p},n.getEntityAt=function(e){e=this.getCharacterList().get(e);return e?e.getEntity():null},n.getChildKeys=function(){return this.get("children")},n.getParentKey=function(){return this.get("parent")},n.getPrevSiblingKey=function(){return this.get("prevSibling")},n.getNextSiblingKey=function(){return this.get("nextSibling")},n.findStyleRanges=function(e,t){s(this.getCharacterList(),o,e,t)},n.findEntityRanges=function(e,t){s(this.getCharacterList(),i,e,t)},t}(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";
|
|
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||n.toString.toString().includes("[native code]"))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:S(e)}function L(e){return f(e)?e:_(e)}function r(e){return l(e)&&!z(e)?e:de(e)}function l(e){return!!(e&&e[B])}function u(e){return!!(e&&e[K])}function f(e){return!!(e&&e[H])}function z(e){return u(e)||f(e)}function F(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=z,c.isOrdered=F,c.Keyed=s,c.Indexed=L,c.Set=r;var B="@@__IMMUTABLE_ITERABLE__@@",K="@@__IMMUTABLE_KEYED__@@",H="@@__IMMUTABLE_INDEXED__@@",U="@@__IMMUTABLE_ORDERED__@@",W="delete",b=5,p=1<<b,w=p-1,v={},q={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 m(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 g(){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 S(e){return e===null||e===undefined?Ee().toKeyedSeq():l(e)?u(e)?e.toSeq():e.fromEntrySeq():Ce(e)}function _(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 je(this,e,t,true)},e(S,t),S.prototype.toKeyedSeq=function(){return this},e(_,t),_.of=function(){return _(arguments)},_.prototype.toIndexedSeq=function(){return this},_.prototype.toString=function(){return this.__toString("Seq [","]")},_.prototype.__iterate=function(e,t){return De(this,e,t,false)},_.prototype.__iterator=function(e,t){return je(this,e,t,false)},e(de,t),de.of=function(){return de(arguments)},de.prototype.toSetSeq=function(){return this},t.isSeq=_e,t.Keyed=S,t.Set=de,t.Indexed=_;var he="@@__IMMUTABLE_SEQ__@@",ye,me,ge;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 we(e){this._iterable=e;this.size=e.length||e.size}function Se(e){this._iterator=e;this._iteratorCache=[]}function _e(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 Se(e).fromEntrySeq():ce(e)?new we(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 Se(e):ce(e)?new we(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 je(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?g():m(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function Te(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,_(r).map(function(e,t){return Ie(n,e,t,r)}));if(Ne(r))return n.call(t,e,S(r).map(function(e,t){return Ie(n,e,t,r)}));return r}function Me(e){if(Array.isArray(e))return _(e).map(Me).toList();if(Ne(e))return S(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 Pe(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)||F(n)!==F(e))return false;if(n.size===0&&e.size===0)return true;var r=!z(n);if(F(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(me)return me;me=this}}function Ae(e,t){if(!e)throw new Error(t)}function i(e,t,n){if(!(this instanceof i))return new i(e,t,n);Ae(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(ge)return ge;ge=this}}function Re(){throw TypeError("Abstract")}function Le(){}function ze(){}function Fe(){}t.prototype[he]=true,e(ve,_),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?g():m(e,o,n[t?r-o++:o++])})},e(be,S),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?g():m(t,e,r[e])})},be.prototype[U]=true,e(we,_),we.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},we.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(g);var o=0;return new y(function(){var e=r.next();return e.done?e:m(t,o++,e.value)})},e(Se,_),Se.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},Se.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 m(t,o,r[o++])})},e(o,_),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?m(e,r++,n._value):g()})},o.prototype.equals=function(e){return e instanceof o?E(this._value,e._value):Pe(e)},e(i,_),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?g():m(t,a++,e)})},i.prototype.equals=function(e){return e instanceof i?this._start===e._start&&this._end===e._end&&this._step===e._step:Pe(this,e)},e(Re,c),e(Le,Re),e(ze,Re),e(Fe,Re),Re.Keyed=Le,Re.Indexed=ze,Re.Set=Fe;var Be=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 We(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 We(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(qe!==undefined&&qe(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 qe=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){Ae(e!==Infinity,"Cannot perform this action with an infinite size.")}function x(t){return t===null||t===undefined?ht():nt(t)&&!F(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 _t(this,undefined,arguments)},x.prototype.mergeWith=function(e){var t=R.call(arguments,1);return _t(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 _t(this,Et,arguments)},x.prototype.mergeDeepWith=function(e){var t=R.call(arguments,1);return _t(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 m(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(q);var a=G(V);r=mt(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 mt(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 gt(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)&w;var a=(n===0?r:r>>>n)&w;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 wt(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 St(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 _t(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 Te(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}Ae(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 jt(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 Tt(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[W]=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)&w);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)&w;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=mt(d,e,t+b,n,r,o,i,a);if(h===d)return this;if(!l&&h&&p.length>=Mt)return St(e,p,u,s,h);if(l&&!h&&p.length===2&>(p[f^1]))return p[f^1];if(l&&h&&p.length===1&>(h))return h;var y=e&&e===this.ownerID;var m=l?h?u:u^c:u|c;var g=l?h?Dt(p,f,h,y):Tt(p,f,y):jt(p,f,h,y);if(y){this.bitmap=m;this.nodes=g;return this}return new at(e,m,g)},st.prototype.get=function(e,t,n,r){if(t===undefined)t=C(n);var o=(e===0?t:t>>>e)&w;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)&w;var c=o===v;var u=this.nodes;var l=u[s];if(c&&!l)return this;var f=mt(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 wt(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 g()};var It=p/4,Mt=p/2,Nt=p/4;function n(e){var t=Ht();if(e===null||e===undefined)return t;if(Pt(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 Pt(e){return!!(e&&e[At])}e(n,ze),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&w]}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=Bt(this,e);return new y(function(){var e=r();return e===Lt?g():m(t,n++,e)})},n.prototype.__iterate=function(e,t){var n=0;var r=Bt(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=Pt;var At="@@__IMMUTABLE_LIST__@@",k=n.prototype;function Rt(e,t){this.array=e;this.ownerID=t}k[At]=true,k[W]=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&w;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=qt(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&w;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=qt(this,e);a.array.splice(r+1);if(o)a.array[r]=o;return a};var Lt={},zt,Ft;function Bt(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 zt||(zt=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=Wt(r,e.__ownerID,0,t,n,i);else o=Wt(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 Wt(e,t,n,r,o,i){var a=r>>>n&w;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=Wt(u,t,n-b,r,o,i);if(l===u)return e;c=qt(e,t);c.array[a]=l;return c}if(s&&e.array[a]===o)return e;h(i);c=qt(e,t);if(o===undefined&&a===c.array.length-1)c.array.pop();else c.array[a]=o;return c}function qt(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&w];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=qt(u,r);var y=u;for(var m=c;m>b;m-=b){var g=f>>>m&w;y=y.array[g]=qt(y.array[g],r)}y.array[f>>>b&w]=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&w;if(v!==p>>>c&w)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 Te(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)&&F(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 Ft||(Ft=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 m(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 m(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=(F(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 j(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&&_e(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 g();var e=n.next();if(c||t===d)return e;else if(t===re)return m(t,o-1,undefined,e);else return m(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 g();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 g()}return o===oe?e:m(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 m(o,c++,undefined,e);else return m(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:m(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:m(n,a++,t,e)}return g()})};return t}function mn(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 gn(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?m(e,r++,a):m(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?S(a):f(n)?_(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 wn(r,e[1],t[1])?t:e});return e&&e[0]}else return n.reduce(function(e,t){return wn(r,e,t)?t:e})}function wn(e,t,n){var r=e(n,t);return r===0&&n!==t&&(n===undefined||n===null||n!==n)||r>0}function Sn(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 g();return m(t,o++,a.apply(null,e.map(function(e){return e.value})))})};return t}function j(e,t){return _e(e)?t:e.constructor(t)}function _n(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)?S:f(e)?_: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 T(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[W]=D.prototype.remove,e(en,S),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:m(t,n?--o:o++,e.value,e)})},en.prototype[U]=true,e(tn,_),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:m(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:m(t,e.value,e.value,e)})},e(rn,S),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){_n(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){_n(t);var n=l(t);return m(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(T,Le),T.prototype.toString=function(){return this.__toString(Tn(this)+" {","}")},T.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},T.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},T.prototype.clear=function(){if(this.__ownerID){this._map&&this._map.clear();return this}var e=this.constructor;return e._empty||(e._empty=jn(this,ht()))},T.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Tn(this));var n=this._map&&this._map.set(e,t);if(this.__ownerID||n===this._map)return this;return jn(this,n)},T.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 jn(this,t)},T.prototype.wasAltered=function(){return this._map.wasAltered()},T.prototype.__iterator=function(e,t){var n=this;return s(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},T.prototype.__iterate=function(e,t){var n=this;return s(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},T.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 jn(this,t,e)};var I=T.prototype;function jn(e,t,n){var r=Object.create(Object.getPrototypeOf(e));r._map=t;r.__ownerID=n;return r}function Tn(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){Ae(this.__ownerID,"Cannot set on an immutable record.");this.set(t,e)}})}function M(n){return n===null||n===undefined?zn():Nn(n)&&!F(n)?n:zn().withMutations(function(t){var e=r(n);O(e.size);e.forEach(function(e){return t.add(e)})})}function Nn(e){return!!(e&&e[Pn])}I[W]=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,Fe),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 Fn(vn(this,e))},M.prototype.sortBy=function(e,t){return Fn(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 Pn="@@__IMMUTABLE_SET__@@",N=M.prototype,An;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 zn(){return An||(An=Ln(ht()))}function Fn(n){return n===null||n===undefined?Wn():Bn(n)?n:Wn().withMutations(function(t){var e=r(n);O(e.size);e.forEach(function(e){return t.add(e)})})}function Bn(e){return Nn(e)&&F(e)}N[Pn]=true,N[W]=N.remove,N.mergeDeep=N.merge,N.mergeDeepWith=N.mergeWith,N.withMutations=a.withMutations,N.asMutable=a.asMutable,N.asImmutable=a.asImmutable,N.__empty=zn,N.__make=Ln,e(Fn,M),Fn.of=function(){return this(arguments)},Fn.fromKeys=function(e){return this(s(e).keySeq())},Fn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Fn.isOrderedSet=Bn;var Kn=Fn.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 Wn(){return Hn||(Hn=Un(Xt()))}function P(e){return e===null||e===undefined?Zn():qn(e)?e:Zn().unshiftAll(e)}function qn(e){return!!(e&&e[Vn])}Kn[U]=true,Kn.__empty=Wn,Kn.__make=Un,e(P,ze),P.of=function(){return this(arguments)},P.prototype.toString=function(){return this.__toString("Stack [","]")},P.prototype.get=function(e,t){var n=this._head;e=J(this,e);while(n&&e--)n=n.next;return n?n.value:t},P.prototype.peek=function(){return this._head&&this._head.value},P.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)},P.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)},P.prototype.pop=function(){return this.slice(1)},P.prototype.unshift=function(){return this.push.apply(this,arguments)},P.prototype.unshiftAll=function(e){return this.pushAll(e)},P.prototype.shift=function(){return this.pop.apply(this,arguments)},P.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()},P.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 ze.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)},P.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)},P.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},P.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 m(t,n++,e)}return g()})},P.isStack=qn;var Vn="@@__IMMUTABLE_STACK__@@",Gn=P.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 Fn(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 P(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 j(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 j(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 j(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 j(this,sn(this,true))},slice:function(e,t){return j(this,fn(this,e,t,true))},some:function(e,t){return!this.every(nr(e),t)},sort:function(e){return j(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 Pe(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 j(this,mn(this,e,t))},flatten:function(e){return j(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 j(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return j(this,dn(this,e,t,true))},skipUntil:function(e,t){return this.skipWhile(nr(e),t)},sortBy:function(e,t){return j(this,vn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return j(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return j(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 A=c.prototype;A[B]=true,A[se]=A.values,A.__toJS=A.toArray,A.__toStringMapper=or,A.inspect=A.toSource=function(){return this.toString()},A.chain=A.flatMap,A.contains=A.includes;try{Object.defineProperty(A,"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 j(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 j(this,this.toSeq().map(function(e,t){return n.call(r,[t,e],i++,o)}).fromEntrySeq())},mapKeys:function(n,r){var o=this;return j(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=F(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=Be(t,3432918353);t=Be(t<<15|t>>>-15,461845907);t=Be(t<<13|t>>>-13,5);t=(t+3864292196|0)^e;t=Be(t^t>>>16,2246822507);t=Be(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]=A.entries,Xn.__toJS=A.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 j(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 j(this,sn(this,false))},slice:function(e,t){return j(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 j(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 j(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 j(this,gn(this,e))},interleave:function(){var e=[this].concat($(arguments));var t=Sn(this.toSeq(),_.of,e);var n=t.flatten(true);if(t.size)n.size=t.size*e.length;return j(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return j(this,dn(this,e,t,false))},zip:function(){var e=[this].concat($(arguments));return j(this,Sn(this,ir,e))},zipWith:function(e){var t=$(arguments);t[0]=this;return j(this,Sn(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=A.includes,Jn(S,s.prototype),Jn(_,L.prototype),Jn(de,r.prototype),Jn(Le,s.prototype),Jn(ze,L.prototype),Jn(Fe,r.prototype),{Iterable:c,Seq:t,Collection:Re,Map:x,OrderedMap:D,List:n,Stack:P,Set:M,OrderedSet:Fn,Record:T,Range:i,Repeat:o,is:E,fromJS:Te}}()},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){var n;return 0===e.getBlockMap().count()?u.createEmpty(t):(n=e.getBlockMap().first().getKey(),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:g(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());l!==u?(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)}))):g(f,l),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,t,n,r,o,i=this.getInlineStyleOverride();return null!=i?i:(i=this.getCurrentContent(),(e=this.getSelection()).isCollapsed()?(n=i,o=(t=e).getStartKey(),t=t.getStartOffset(),r=n.getBlockForKey(o),0<t?r.getInlineStyleAt(t-1):r.getLength()?r.getInlineStyleAt(0):v(n,o)):(t=i,n=(r=e).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 m(e,t,!1)},u.forceSelection=function(e,t){return m(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,o,i,a,s,c=!(3<arguments.length&&void 0!==arguments[3])||arguments[3];return e.getCurrentContent()===t?e:(r=l.getDirectionMap(t,e.getDirectionMap()),e.getAllowUndo()?(a=e.getSelection(),s=e.getCurrentContent(),o=e.getUndoStack(),i=t,a!==s.getSelectionAfter()||function(e,t){e=e.getLastChangeType();return t!==e||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(e,n)?(o=o.push(s),i=i.set("selectionBefore",a)):"insert-characters"!==n&&"backspace-character"!==n&&"delete-character"!==n||(i=i.set("selectionBefore",s.getSelectionBefore())),a=e.getInlineStyleOverride(),-1===["adjust-depth","change-block-type","split-block"].indexOf(n)&&(a=null),s={currentContent:i,directionMap:r,undoStack:o,redoStack:f(),lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:c,inlineStyleOverride:a},u.set(e,s)):u.set(e,{currentContent:t,directionMap:r,lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:c,inlineStyleOverride:null}))},u.undo=function(e){var t,n,r,o;return e.getAllowUndo()&&(n=(t=e.getUndoStack()).peek())?(r=e.getCurrentContent(),o=l.getDirectionMap(n,e.getDirectionMap()),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()})):e},u.redo=function(e){var t,n,r,o;return e.getAllowUndo()&&(n=(t=e.getRedoStack()).peek())?(r=e.getCurrentContent(),o=l.getDirectionMap(n,e.getDirectionMap()),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},e.getImmutable=function(){return this._immutable},u}();function m(e,t,n){return u.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function g(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),m=s.OrderedSet,g={replaceText:function(e,t,n,r,o){e=d(e,t),e=h(e,t),t=i.create({style:r||m(),entity:o||null});return l(e,e.getSelectionAfter(),n,t)},insertText:function(e,t,n,r,o){return t.isCollapsed()||f(!1),g.replaceText(e,t,n,r,o)},moveText:function(e,t,n){var r=a(e,t),e=g.removeRange(e,t,"backward");return g.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=g},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){return e===n||!!n.startsWith(e)&&(n=n.slice(e.length),!!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){var t;return e?(e=o({style:a,entity:null}).merge(e),c.get(e)||(t=new n(e),c=c.set(e,t),t)):s},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(r){var e;function t(){var e,t,n;return r.call(this,((e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:d)&&(t=e.characterList,n=e.text)&&!t&&(e.characterList=c(f(a.EMPTY,n.length))),e))||this}e=r,(n=t).prototype=Object.create(e.prototype),(n.prototype.constructor=n).__proto__=e;var n=t.prototype;return n.getKey=function(){return this.get("key")},n.getType=function(){return this.get("type")},n.getText=function(){return this.get("text")},n.getCharacterList=function(){return this.get("characterList")},n.getLength=function(){return this.getText().length},n.getDepth=function(){return this.get("depth")},n.getData=function(){return this.get("data")},n.getInlineStyleAt=function(e){e=this.getCharacterList().get(e);return e?e.getStyle():p},n.getEntityAt=function(e){e=this.getCharacterList().get(e);return e?e.getEntity():null},n.getChildKeys=function(){return this.get("children")},n.getParentKey=function(){return this.get("parent")},n.getPrevSiblingKey=function(){return this.get("prevSibling")},n.getNextSiblingKey=function(){return this.get("nextSibling")},n.findStyleRanges=function(e,t){s(this.getCharacterList(),o,e,t)},n.findEntityRanges=function(e,t){s(this.getCharacterList(),i,e,t)},t}(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){var e=new String("abc");if(e[5]="de","5"!==Object.getOwnPropertyNames(e)[0]){for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r,o=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"===o.join(""))return r={},"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")?1:void 0}}}catch(e){}}()?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(r){var e;function t(e){return r.call(this,((e=e)&&(t=e.characterList,n=e.text)&&!t&&(e.characterList=a(u(o.EMPTY,n.length))),e))||this;var t,n}e=r,(n=t).prototype=Object.create(e.prototype),(n.prototype.constructor=n).__proto__=e;var n=t.prototype;return n.getKey=function(){return this.get("key")},n.getType=function(){return this.get("type")},n.getText=function(){return this.get("text")},n.getCharacterList=function(){return this.get("characterList")},n.getLength=function(){return this.getText().length},n.getDepth=function(){return this.get("depth")},n.getData=function(){return this.get("data")},n.getInlineStyleAt=function(e){e=this.getCharacterList().get(e);return e?e.getStyle():l},n.getEntityAt=function(e){e=this.getCharacterList().get(e);return e?e.getEntity():null},n.findStyleRanges=function(e,t){i(this.getCharacterList(),f,e,t)},n.findEntityRanges=function(e,t){i(this.getCharacterList(),p,e,t)},t}(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){var n;return 0<=t&&t<e.length||r(!1),t+1!==e.length&&(n=e.charCodeAt(t),e=e.charCodeAt(t+1),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 Or}),t.d(e,"List",function(){return mn}),t.d(e,"Map",function(){return Yt}),t.d(e,"OrderedMap",function(){return N}),t.d(e,"OrderedSet",function(){return pr}),t.d(e,"PairSorting",function(){return mr}),t.d(e,"Range",function(){return $n}),t.d(e,"Record",function(){return P}),t.d(e,"Repeat",function(){return Sr}),t.d(e,"Seq",function(){return C}),t.d(e,"Set",function(){return qn}),t.d(e,"Stack",function(){return Pn}),t.d(e,"fromJS",function(){return _r}),t.d(e,"get",function(){return gt}),t.d(e,"getIn",function(){return Zn}),t.d(e,"has",function(){return mt}),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 Fn}),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 zn}),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 Pt}),t.d(e,"mergeDeepWith",function(){return At}),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 wt}),t.d(e,"setIn",function(){return _t}),t.d(e,"update",function(){return xt}),t.d(e,"updateIn",function(){return St}),t.d(e,"version",function(){return Cr});var t="delete",w=5,S=1<<w,b=S-1,_={};function L(){return{value:!1}}function g(e){e&&(e.value=!0)}function z(){}function F(e){return void 0===e.size&&(e.size=e.__iterate(K)),e.size}function B(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 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:me(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,m=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}m.prototype.toString=function(){return"[Iterator]"},m.KEYS=oe,m.VALUES=h,m.ENTRIES=y,m.prototype.inspect=m.prototype.toSource=function(){return this.toString()},m.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 we();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 m(function(){var e;return o===r?E():(e=i[n?r-++o:o++],v(t,e[0],e[1]))})):this.__iteratorUncached(t,n)},t}(u),ye=function(e){function t(e){return null==e?we().toKeyedSeq():l(e)?c(e)?e.toSeq():e.fromEntrySeq():ne(e)?e.toSeq():Se(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?we():l(e)?c(e)?e.entrySeq():e.toIndexedSeq():ne(e)?e.toSeq().entrySeq():_e(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),me=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),ge=(C.isSeq=ee,C.Keyed=ye,C.Set=me,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[B(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 m(function(){var e;return i===o?E():(e=n?o-++i:i++,v(t,e,r[e]))})},t}(O)),ve=function(e){function t(e){var t=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(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 m(function(){var e;return a===i?E():(e=o[n?i-++a:a++],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){var n,r;return e?this.cacheResult().__iterator(t,e):ue(n=le(this._collection))?(r=0,new m(function(){var e=n.next();return e.done?e:v(t,r++,e.value)})):new m(E)},t}(O));function we(){return he=he||new ge([])}function Se(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 _e(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 ge(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 je(e){return e>>>1&1073741824|3221225471&e}var Te=Object.prototype.valueOf;function k(e){if(null==e)return Ie(e);if("function"==typeof e.hashCode)return je(e.hashCode(e));var t=(e=e).valueOf!==Te&&"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 je(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)))&&void 0===(o=i[Be])){if(!Pe){if(void 0!==(o=i.propertyIsEnumerable&&i.propertyIsEnumerable[Be]))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=Ae(),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(Pe)Object.defineProperty(i,Be,{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[Be]=o;else{if(void 0===i.nodeType)throw new Error("Unable to set a non-enumerable property on object.");i[Be]=o}}}return o;case"symbol":return void 0===(o=ze[i=t])&&(o=Ae(),ze[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 je(t)}var Ne=Object.isExtensible,Pe=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Ae(){var e=++Fe;return 1073741824&Fe&&(Fe=0),e}var Re,Le="function"==typeof WeakMap,ze=(Le&&(Re=new WeakMap),Object.create(null)),Fe=0,Be="__immutablehash__",Ke=("function"==typeof Symbol&&(Be=Symbol(Be)),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&&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(h,n),i=0;return n&&F(this),new m(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 m(function(){var e=n.next();return e.done?e:v(t,e.value,e.value,e)})},t}(me),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 m(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 m(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,_);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(y,e);return new m(function(){var e,t,n=o.next();return n.done?n:(t=(e=n.value)[0],v(r,t,a.call(s,e[1],t,i),n))})},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&&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(y,!r));return new m(function(){var e,t=i.next();return t.done?t:(e=t.value,v(n,s?e[0]:r?c.size-++o:o++,e[1],t))})},e}function Xe(a,s,c,u){var e=r(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(y,e),i=0;return new m(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 u,l,n=s.size;return H(e,t,n)?s:(u=U(e,n),n=q(t,n),u!=u||n!=n?Qe(s.toSeq().cacheResult(),e,t,c):((e=n-u)==e&&(l=e<0?0:e),(t=r(s)).size=0===l?l:s.size&&l||void 0,!c&&ee(s)&&0<=l&&(t.get=function(e,t){return 0<=(e=B(this,e))&&e<l?s.get(e+u,t):t}),t.__iterateUncached=function(n,e){var r,o,i,a=this;return 0===l?0:e?this.cacheResult().__iterate(n,e):(o=!(r=0),i=0,s.__iterate(function(e,t){if(!(o=o&&r++<u))return i++,!1!==n(e,c?t:i-1,a)&&i!==l}),i)},t.__iteratorUncached=function(t,e){var n,r,o;return 0!==l&&e?this.cacheResult().__iterator(t,e):0===l?new m(E):(n=s.__iterator(t,e),o=r=0,new m(function(){for(;r++<u;)n.next();var e;return++o>l?E():(e=n.next(),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,i,a=this;return e?this.cacheResult().__iterate(r,e):(o=!0,i=0,t.__iterate(function(e,t,n){if(!(o=o&&u.call(l,e,t,n)))return i++,r(e,f?t:i-1,a)}),i)},e.__iteratorUncached=function(o,e){var i,a,s,c=this;return e?this.cacheResult().__iterator(o,e):(i=t.__iterator(y,e),a=!0,s=0,new m(function(){var e;do{if((e=i.next()).done)return f||o===h?e:v(o,s++,o===oe?void 0:e.value[1],e);var t=e.value,n=t[0],r=t[1]}while(a=a&&u.call(l,r,n,c));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){var i,a;return t?this.cacheResult().__iterate(o,t):(a=!1,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,i=0),i)},u.__iteratorUncached=function(n,r){var o,i,a;return r?this.cacheResult().__iterator(n,r):(o=e.__iterator(n,r),i=[],a=0,new m(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:me)(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 ge(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 m(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:me).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 j(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 T(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 mt(e,t){return p(e)?e.has(t):ht(e)&&pe.call(e,t)}function gt(e,t,n){return p(e)?e.get(t,n):mt(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function vt(e){if(Array.isArray(e))return j(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)}var n;return pe.call(e,t)?(n=vt(e),Array.isArray(n)?n.splice(t,1):delete n[t],n):e}function wt(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)}return pe.call(e,t)&&n===e[t]||((e=vt(e))[t]=n),e}function St(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&&!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?_:gt(n,c,_);r=e(u===_?t:p(u),u,r,o+1,i,a);return r===u?n:r===_?bt(n,c):wt(s?t?I():{}:n,c,r)}(p(e),e,ft(t),0,n,r);return e===_?n:e}function _t(e,t,n){return St(e,t,_,function(){return n})}function Et(e,t){return _t(this,e,t)}function Ct(e,t){return St(e,t,function(){return _})}function Ot(e){return Ct(this,e)}function xt(e,t,n,r){return St(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 St(this,e,t,n)}function jt(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return It(this,e)}function Tt(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,_,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 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 Pt(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return Rt(e,t)}function At(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 zt(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Rt(this,e)}function Ft(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return Rt(this,t,e)}function Bt(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return St(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 St(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 z)}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);T(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(n.length<=t+1)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,_)},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=jt,i.mergeWith=Tt,i.mergeDeep=zt,i.mergeDeepWith=Ft,i.mergeIn=Bt,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===_,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(g(a),!s&&f||g(i),!s||1!==c.length){if(!f&&!s&&c.length>=ln){var p=e,d=c,a=r,i=o;p=p||new z;for(var h=new Xt(p,k(a),[a,i]),y=0;y<d.length;y++){var m=d[y];h=h.update(p,0,void 0,m[0],m[1])}return h}a=e&&e===this.ownerID,i=a?c:j(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+w,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===_)return this;var f=cn(u&c-1),p=this.nodes,d=l?p[f]:void 0,t=on(d,e,t+w,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,m=0,g=new Array(S),v=0;0!==y;v++,y>>>=1)g[v]=1&y?h[m++]:void 0;return g[r]=o,new Zt(n,m+1,g)}return l&&!t&&2===p.length&&an(p[1^f])?p[1^f]:l&&t&&1===p.length&&an(t)?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),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+w,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===_&&!u)return this;t=on(u,e,t+w,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,m=1,g=l.length;y<g;y++,m<<=1){var v=l[y];void 0!==v&&y!==f&&(p|=m,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===_;if(n!==this.keyHash)return s?this:(g(a),g(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;return(t?c[u][1]===o:s)?this:(g(a),!s&&t||g(i),s&&2===l?new Xt(e,this.keyHash,c[1^u]):(a=(n=e&&e===this.ownerID)?c:j(c),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===_,c=x(r,this.entry[0]);return(c?o===this.entry[1]:s)?this:(g(a),s?void g(i):c?e&&e===this.ownerID?(this.entry[1]=o,this):new Xt(e,this.keyHash,[r,o]):(g(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}(m));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===_?-1:1:0)}else{if(n===_)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===_?e:(g(s),g(a),new Xt(t,r,[o,i]))}function an(e){return e.constructor===Xt||e.constructor===Jt}function sn(e,t,n,r,o){var i,a;return e.keyHash===r?new Jt(t,r,[e.entry,o]):(r=(i=(0===n?e.keyHash:e.keyHash>>>n)&b)==(a=(0===n?r:r>>>n)&b)?[sn(e,t,n+w,r,o)]:(n=new Xt(t,r,o),i<a?[e,n]:[n,e]),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:j(e);return r[t]=n,r}var ln=S/4,fn=S/2,pn=S/4,dn="@@__IMMUTABLE_LIST__@@";function hn(e){return Boolean(e&&e[dn])}var yn,mn=function(o){function e(e){var t,r,n=Sn();return null==e?n:hn(e)?e:(t=o(e),0===(r=t.size)?n:(T(r),0<r&&r<S?wn(0,r,w,null,new gn(t.toArray())):n.withMutations(function(n){n.setSize(r),t.forEach(function(e,t){return n.set(t,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("List [","]")},e.prototype.get=function(e,t){var n;return 0<=(e=B(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=B(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=_n(e,n.__ownerID,0,r,o,i):t=_n(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):wn(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=w,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):Sn()},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=o("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 m(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?wn(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?Sn():(this.__ownerID=e,this.__altered=!1,this)},e}(J),M=(mn.isList=hn,mn.prototype),gn=(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=Bt,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=(gn.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 gn([],e);var o=0==r;if(0<t){var i,a=this.array[r];if((i=a&&a.removeBefore(e,t-w,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},gn.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-w,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,m=e._capacity,g=xn(m),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,o=(r=n)===g?v&&v.array:s&&s.array,i=y<r?0:y-r,S<(a=m-r)&&(a=S),function(){var e;return i===a?vn:(e=h?--a:i++,o&&o[e])}):(c=t,u=n,f=(s=e)&&s.array,p=y<u?0:y-u>>c,S<(d=1+(m-u>>c))&&(d=S),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-w,u+(e<<c))}})}}function wn(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 Sn(){return yn=yn||wn(0,0,w)}function _n(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=_n(s=e&&e.array[c],t,n-w,r,o,i))===s?e:((a=En(e,t)).array[c]=n,a):u&&e.array[c]===o?e:(i&&g(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 gn(e?e.array.slice():[],t)}function Cn(e,t){if(t>=xn(e._capacity))return e._tail;if(t<1<<e._level+w){for(var n=e._root,r=e._level;n&&0<r;)n=n.array[t>>>r&b],r-=w;return n}}function On(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new z,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 gn(c&&c.array.length?[void 0,c]:[],r),u+=1<<(s+=w);u&&(a+=u,o+=u,t+=u,i+=u);for(var l=xn(i),f=xn(t);1<<s+w<=f;)c=new gn(c&&c.array.length?[c]:[],r),s+=w;var n=e._tail,p=f<l?Cn(e,t-1):l<f?new gn([],r):n;if(n&&l<f&&a<i&&n.array.length){for(var d=c=En(c,r),h=s;w<h;h-=w)var y=l>>>h&b,d=d.array[y]=En(d.array[y],r);d.array[l>>>w&b]=n}if(t<i&&(p=p&&p.removeAfter(r,0,t)),f<=a)a-=f,t-=f,s=w,c=null,p=p&&p.removeBefore(r,0,a);else if(o<a||f<l){for(u=0;c;){var m=a>>>s&b;if(m!=f>>>s&b)break;m&&(u+=(1<<s)*m),s-=w,c=c.array[m]}(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):wn(a,t,s,c,p)}function xn(e){return e<S?0:e-1>>>w<<w}var kn,N=function(e){function t(t){return null==t?jn():xe(t)?t:jn().withMutations(function(n){var e=f(t);T(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):jn()},t.prototype.set=function(e,t){return Tn(this,e,t)},t.prototype.remove=function(e){return Tn(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){var t,n;return e===this.__ownerID?this:(t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e),e?Dn(t,n,e,this.__hash):0===this.size?jn():(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 jn(){return kn=kn||Dn(I(),Sn())}function Tn(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>=S&&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,Pn=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=B(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):An(t,n)},e.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;if(0===this.size&&Mn(e))return e;T(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):An(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):An(e,r)},e.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?An(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 ge(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){var n,r;return e?new ge(this.toArray()).__iterator(t,e):(n=0,r=this._head,new m(function(){var e;return r?(e=r.value,r=r.next,v(t,n++,e)):E()}))},e}(J),a=(Pn.isStack=Mn,Pn.prototype);function An(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||An(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 zn(e){return Boolean(e&&e[Ln])}function Fn(e){return zn(e)&&d(e)}function Bn(n,e){var r,o,i,a,t;return n===e||!(!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))&&(0===n.size&&0===e.size||(r=!Z(n),d(n)?(o=n.entries(),e.every(function(e,t){var n=o.next().value;return n&&x(n[1],e)&&(r||x(n[0],t))})&&o.next().done):(i=!1,void 0===n.size&&(void 0===e.size?"function"==typeof n.cacheResult&&n.cacheResult():(i=!0,t=n,n=e,e=t)),a=!0,t=e.__iterate(function(e,t){if(r?!n.has(e):i?!x(e,n.get(t,_)):!x(n.get(t,_),e))return a=!1}),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,t;return c(e)?(n={},e.__iterate(function(e,t){n[t]=Hn(e)}),n):(t=[],e.__iterate(function(e){t.push(Hn(e))}),t)}var Un,qn=function(r){function t(n){return null==n?Gn():zn(n)&&!d(n)?n:Gn().withMutations(function(t){var e=r(n);T(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++)"string"==typeof n[e]?t.add(n[e]):r(n[e]).forEach(function(e){return t.add(e)})}):this.constructor(n[0])},t.prototype.intersect=function(){for(var e,n=[],t=arguments.length;t--;)n[t]=arguments[t];return 0===n.length?this:(n=n.map(function(e){return r(e)}),e=[],this.forEach(function(t){n.every(function(e){return e.includes(t)})||e.push(t)}),this.withMutations(function(t){e.forEach(function(e){t.remove(e)})}))},t.prototype.subtract=function(){for(var e,n=[],t=arguments.length;t--;)n[t]=arguments[t];return 0===n.length?this:(n=n.map(function(e){return r(e)}),e=[],this.forEach(function(t){n.some(function(e){return e.includes(t)})&&e.push(t)}),this.withMutations(function(t){e.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){var t;return e===this.__ownerID?this:(t=this._map.__ensureOwner(e),e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this))},t}(X),o=(qn.isSet=zn,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+B(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 m(function(){var e;return a===r?E():(e=i,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:Bn(this,e)},r}(O);function Zn(e,t,n){for(var r=ft(t),o=0;o!==r.length;)if((e=gt(e,r[o++],_))===_)return n;return e}function Jn(e,t){return Zn(this,e,t)}function Xn(e,t){return Zn(e,t,_)!==_}function Qn(){T(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=m,Kn(u,{toArray:function(){T(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 Pn(c(this)?this.valueSeq():this)},toList:function(){return mn(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?Se(e):_e(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 ge(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){T(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))},partition:function(e,t){return r=e,o=t,i=c(n=this),a=[[],[]],n.__iterate(function(e,t){a[r.call(o,e,t,n)?1:0].push(i?[t,e]:e)}),s=st(n),a.map(function(e){return D(n,s(e))});var n,r,o,i,a,s},find:function(e,t,n){e=this.findEntry(e,t);return e?e[1]:n},forEach:function(e,t){return T(this.size),this.__iterate(t?e.bind(t):e)},join:function(t){T(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 F(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 Bn(this,e)},entrySeq:function(){var e,t=this;return t._cache?new ge(t._cache):((e=t.toSeq().map(ir).toIndexedSeq()).fromEntrySeq=function(){return t.toSeq()},e)},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,_)!==_},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,i=this;return e?this.cacheResult().__iterate(r,e):(o=0,n.__iterate(function(e,t,n){return s.call(c,e,t,n)&&++o&&r(e,t,i)}),o)},e.__iteratorUncached=function(r,e){var o,i,a=this;return e?this.cacheResult().__iterator(r,e):(o=n.__iterator(y,e),i=!0,new m(function(){var e,t,n;return i?(e=o.next()).done?e:(t=(n=e.value)[0],n=n[1],s.call(c,n,t,a)?r===y?e:v(r,t,n,e):(i=!1,E())):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=je((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(j(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=B(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=B(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 m(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(j(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(j(arguments));return D(this,it(this,cr,e))},zipAll:function(){var e=[this].concat(j(arguments));return D(this,it(this,cr,e,!0))},zipWith:function(e){var t=j(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 T(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 j(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(me,nr);var fr,pr=function(e){function t(n){return null==n?yr():Fn(n)?n:yr().withMutations(function(t){var e=X(n);T(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=Fn,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(jn())}dr[re]=!0,dr.zip=tr.zip,dr.zipWith=tr.zipWith,dr.zipAll=tr.zipAll,dr.__empty=yr,dr.__make=hr;var mr={LeftThenRight:-1,RightThenLeft:1};var P=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 "+vr(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=mn().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(A);return l.constructor=u,s&&(u.displayName=s),u},A=(P.prototype.toString=function(){for(var e,t=vr(this)+" { ",n=this._keys,r=0,o=n.length;r!==o;r++)t+=(r?", ":"")+(e=n[r])+": "+yt(this.get(e));return t+" }"},P.prototype.equals=function(e){return this===e||ne(e)&&br(this).equals(br(e))},P.prototype.hashCode=function(){return br(this).hashCode()},P.prototype.has=function(e){return this._indices.hasOwnProperty(e)},P.prototype.get=function(e,t){var n;return this.has(e)?(n=this._indices[e],void 0===(n=this._values.get(n))?this._defaultValues[e]:n):t},P.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},P.prototype.remove=function(e){return this.set(e)},P.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:gr(this,e)},P.prototype.wasAltered=function(){return this._values.wasAltered()},P.prototype.toSeq=function(){return br(this)},P.prototype.toJS=function(){return Hn(this)},P.prototype.entries=function(){return this.__iterator(y)},P.prototype.__iterator=function(e,t){return br(this).__iterator(e,t)},P.prototype.__iterate=function(e,t){return br(this).__iterate(e,t)},P.prototype.__ensureOwner=function(e){var t;return e===this.__ownerID?this:(t=this._values.__ensureOwner(e),e?gr(this,t,e):(this.__ownerID=e,this._values=t,this))},P.isRecord=ne,P.getDescriptiveName=vr,P.prototype);function gr(e,t,n){e=Object.create(Object.getPrototypeOf(e));return e._values=t,e.__ownerID=n,e}function vr(e){return e.constructor.displayName||e.constructor.name||"Record"}function br(t){return Se(t._keys.map(function(e){return[e,t.get(e)]}))}A[te]=!0,A[t]=A.remove,A.deleteIn=A.removeIn=Ot,A.getIn=Jn,A.hasIn=n.hasIn,A.merge=jt,A.mergeWith=Tt,A.mergeIn=Bt,A.mergeDeep=zt,A.mergeDeepWith=Ft,A.mergeDeepIn=Kt,A.setIn=Et,A.update=kt,A.updateIn=Dt,A.withMutations=Ht,A.asMutable=Ut,A.asImmutable=qt,A[se]=A.entries,A.toJSON=A.toObject=n.toObject,A.inspect=A.toSource=function(){return this.toString()};var wr,Sr=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(wr)return wr;wr=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 m(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):Bn(e)},r}(O);function _r(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||Er,e,"",t&&2<t.length?[]:void 0,{"":e})}function Er(e,t){return s(t)?t.toList():c(t)?t.toMap():t.toSet()}var Cr="4.3.0",Or=u;e.default={version:Cr,Collection:u,Iterable:u,Seq:C,Map:Yt,OrderedMap:N,List:mn,Stack:Pn,Set:qn,OrderedSet:pr,PairSorting:mr,Record:P,Range:$n,Repeat:Sr,is:x,fromJS:_r,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:zn,isOrderedSet:Fn,isRecord:ne,get:gt,getIn:Zn,has:mt,hasIn:Xn,merge:Mt,mergeDeep:Pt,mergeWith:Nt,mergeDeepWith:At,remove:bt,removeIn:Ct,set:wt,setIn:_t,update:xt,updateIn:St}},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,i=this.getAnchorKey(),a=this.getFocusKey();return i===a&&i===e?(o=this.getStartOffset(),r=this.getEndOffset(),t<=o&&o<=n||t<=r&&r<=n):(e===i||e===a)&&t<=(o=e===i?this.getAnchorOffset():this.getFocusOffset())&&o<=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){var t;return(s[e]||(t=s[e]={i:e,l:!1,exports:{}},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),m=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:[]}}},g=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({})}]}},w=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({})}]}},S=function(e){return{text:"\r ",inlines:[new s.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new s.Map({})}]}},_=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:S(f)};if("#text"===s&&"\n"!==t.textContent)return m(t,n,i);if("br"===s)return{chunk:g()};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:S(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:S(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:S(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=w(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=_(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,m=d.Repeat,g=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(m(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:g(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){return t=t||r.NEUTRAL,!e.length||(e=u(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){var n,r,o;return t.isCollapsed()?(n=t.getAnchorKey(),!(0<(r=t.getAnchorOffset()))||(o=e.getBlockForKey(n).getEntityAt(r-1))!==e.getBlockForKey(n).getEntityAt(r)?null:i(e.getEntityMap(),o)):(n=t.getStartKey(),o=(r=t.getStartOffset())===(t=e.getBlockForKey(n)).getLength()?null:t.getEntityAt(r),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(218)),i=n(219),a=s(n(91)),n=s(n(229));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(230)},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,o=f(t);return null!=o||e&&(e===t||e.firstChild===t)||a(!1),0===(n=e===t&&(t=t.firstChild,s(t)||a(!1),"true"!==(t=t).getAttribute("data-contents")&&a(!1),0<n)?t.childNodes.length:n)?{key:null!=o?o:(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}:(e=t.childNodes[n-1],n=t=null,n=i(e)?(r=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(r)),c(r)):(t=d(o),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,s,c,u=n.nodeType===Node.TEXT_NODE,l=o.nodeType===Node.TEXT_NODE;return u&&l?{selectionState:p(e,d(f(n)),r,d(f(o)),i),needsRecovery:!1}:(c=!(s=a=null),u?(a={key:d(f(n)),offset:r},s=h(t,o,i)):l?(s={key:d(f(o)),offset:i},a=h(t,n,r)):(a=h(t,n,r),s=h(t,o,i),n===o&&r===i&&(c=!!n.firstChild&&"BR"!==n.firstChild.nodeName)),{selectionState:p(e,a.key,a.offset,s.key,s.offset),needsRecovery:c})}},function(e,t,n){"use strict";var d=n(15),h=n(10);e.exports=function(e,t,n,r,o){var i,a,s,c,u,l,f,p=h(e.getSelection());return!(t&&r&&(t=d.decode(t),i=t.blockKey,l=(l=e.getBlockTree(i))&&l.getIn([t.decoratorKey,"leaves",t.leafKey]),t=d.decode(r),a=t.blockKey,r=(r=e.getBlockTree(a))&&r.getIn([t.decoratorKey,"leaves",t.leafKey]),l)&&r&&(t=l.get("start"),s=r.get("start"),c=l?t+n:null,u=r?s+o:null,p.getAnchorKey()!==i||p.getAnchorOffset()!==c||p.getFocusKey()!==a||p.getFocusOffset()!==u))?p:(f=!1,f=i===a?(l=l.get("end"),r=r.get("end"),s===t&&r===l?o<n:s<t):e.getCurrentContent().getBlockMap().keySeq().skipUntil(function(e){return e===i||e===a}).first()===a,p.merge({anchorKey:i,anchorOffset:c,focusKey:a,focusOffset:u,isBackward:f}))}},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 g(){return(g=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),w=n(0),i=n(45),a=n(36),S=n(41),_=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,m=o(this.props.selection,d);return this.props.tree.map(function(e,o){var i,t,n,r,a,s,c,u,l=e.get("leaves");return 0===l.size?null:(i=l.size-1,t=l.map(function(e,t){var n=b.encode(d,o,t),r=e.get("start"),e=e.get("end");return w.createElement(v,{key:n,offsetKey:n,block:p,start:r,selection:m?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(),null!=(a=e.get("decoratorKey"))&&f.props.decorator&&(n=(r=E(f.props.decorator)).getComponentForKey(a))?(r=r.getPropsForKey(a),a=b.encode(d,o,0),s=l.first().get("start"),l=l.last().get("end"),u=h.slice(s,l),e=p.getEntityAt(e.get("start")),c=_.getHTMLDirIfDifferent(S.getDirection(u),f.props.direction),u={contentState:f.props.contentState,decoratedText:u,dir:c,start:s,end:l,blockKey:d,entityKey:e,offsetKey:a},w.createElement(n,g({},r,u,{key:a}),t)):t)}).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 w.createElement("div",{"data-offset-key":e,className:n,ref:function(e){return t._node=e}},this._renderChildren())},t}(w.Component);e.exports=n},function(e,t,n){"use strict";var o=n(147),r=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?r(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(){var e=this.types.some(function(e){return-1!=e.indexOf("application/x-moz-file")});if(!e)for(var t=this.getFiles(),n=0;n<t.length;n++){var r=t[n].type;if(!o.isImage(r))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,n=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");return n===e.getCurrentContent()?e:(t=e.getSelection(),r.push(e,n.set("selectionBefore",t),t.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),m=y.List,g=y.Map,v=y.OrderedSet,b=t(181),w=t(70),S=t(27),_=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"),j=new RegExp("​?","g"),T=["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"],P=(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),A=g({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",m()),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=m(),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:m(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=m(),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,c=this.wrapper,this.wrapper="pre"===l?"pre":this.wrapper,"string"!=typeof o&&(o=this.disambiguate(l,this.wrapper)||o[0]||"unstyled"),E||!S(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(P).some(function(e){t.classList.contains(e)&&(n=P[e])}),n}(u,this.currentDepth)),a=d(),s=this._toBlockConfigs(Array.from(u.childNodes),t),this._trimCurrentText(),n.push(this._makeBlockConfig({key:a,childConfigs:s,type:o})),this.currentDepth=i,this.wrapper=c):"#text"===l?this._addTextNode(u,t):"br"===l?this._addBreakNode(u,t):_(a=u)&&(a=a).attributes.getNamedItem("src")&&a.attributes.getNamedItem("src").value?this._addImgNode(u,t):!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){var n,r,o;return S(e)?(n=e.style.fontWeight,r=e.style.fontStyle,o=e.style.textDecoration,t.withMutations(function(e){0<=T.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"))})):t}(u,s=A.has(l)?s.add(A.get(l)):s),null!=(c=function(e){if(S(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)}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=m()):(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){w(e)&&this._appendText("\n",t)},t._addImgNode=function(e,t){var n,r;_(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=m(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 m(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=m(),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 r,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(j,""));return t?(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)})}),e=g(r),new L(e,function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null}).addDOMNode(t).getContentBlocks()):null}},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,n,r,o=e.getSelection();return o.isCollapsed()&&(t=e.getCurrentContent(),r=o.getStartKey(),n=t.getBlockForKey(r).getLength(),!(o.getStartOffset()<n))&&(n=t.getBlockAfter(r))&&"atomic"===n.getType()&&(r=o.merge({focusKey:n.getKey(),focusOffset:n.getLength()}),(o=c.removeRange(t,r,"forward"))!==t)?u.push(e,o,"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();return e.shiftKey||a!==n?(o=s(i,r,e.shiftKey?-1:1,n),u.push(t,o,"adjust-depth")):t},toggleBlockType:function(e,t){var n,r=e.getSelection(),o=r.getStartKey(),i=r.getEndKey(),a=e.getCurrentContent(),s=r;return 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()})?e:(r=a.getBlockForKey(o).getType()===t?"unstyled":t,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,r=e.getSelection(),o=e.getCurrentInlineStyle();return r.isCollapsed()?u.setInlineStyleOverride(e,o.has(t)?o.remove(t):o.add(t)):(n=e.getCurrentContent(),o=o.has(t)?c.removeInlineStyle(n,r,t):c.applyInlineStyle(n,r,t),u.push(e,o,"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(216));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,m,g,v,o,i,r,a,s,c,u,b,w;/*! https://mths.be/punycode v1.4.1 by @mathias */function S(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 _(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+=w((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=w(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+=g)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)&&S("not-basic"),c.push(e.charCodeAt(n));for(r=0<d?d+1:0;r<u;){for(o=l,i=1,a=g;u<=r&&S("invalid-input"),s=e.charCodeAt(r++),(g<=(s=s-48<10?s-22:s-65<26?s-65:s-97<26?s-97:g)||s>b((m-l)/i))&&S("overflow"),l+=s*i,!(s<(s=a<=p?1:p+v<=a?v:a-p));a+=g)i>b(m/(s=g-s))&&S("overflow"),i*=s;p=C(l-o,t=c.length+1,0==o),b(l/t)>m-f&&S("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=_(e)).length,d=128,h=72,y=t=0;y<p;++y)(s=e[y])<128&&f.push(w(s));for(n=r=f.length,r&&f.push("-");n<p;){for(o=m,y=0;y<p;++y)d<=(s=e[y])&&s<o&&(o=s);for(o-d>b((m-t)/(c=n+1))&&S("overflow"),t+=(o-d)*c,d=o,y=0;y<p;++y)if((s=e[y])<d&&++t>m&&S("overflow"),s==d){for(i=t,a=g;!(i<(u=a<=h?1:h+v<=a?v:a-h));a+=g)f.push(w(E(u+(l=i-u)%(u=g-u),0))),i=b(l/u);f.push(w(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,m=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=(g=36)-1,b=Math.floor,w=String.fromCharCode,n={version:"1.4.1",ucs2:{decode:_,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(215)(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 m(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 g(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 w(e){var t=e.styles,n=e.text;var r=s(n);o(t,function(e,t){r=a(e,r)});return r}function S(e,t){var n=g(e,["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"],t.start,t.end);var r="";n.forEach(function(e){r+=w(e)});r=y(t.styles,r);return r}function _(t,e,n,r){var o=[];var i=g(t,["COLOR","BGCOLOR","FONTSIZE","FONTFAMILY"],n.start,n.end);i.forEach(function(e){o.push(S(t,e))});var a=o.join("");if(n.type==="ENTITY"){if(n.entityKey!==undefined&&n.entityKey!==null)a=m(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=_(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(m(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,n,r=o.__schemas__[e];null!==r&&(o.__compiled__[e]=t={validate:null,link:null},"[object Object]"===s(r)?("[object RegExp]"===s(r.validate)?t.validate=(n=r.validate,function(e,t){e=e.slice(t);return n.test(e)?e.match(n)[0].length:0}):c(r.validate)?t.validate=r.validate:a(e,r),c(r.normalize)?t.normalize=r.normalize:r.normalize?a(e,r):t.normalize=p()):"[object String]"===s(r)?i.push(e):a(e,r))}),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(),d(this)):(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(232)},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,m=p.List,g=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:m(g(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 d(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,c=r.getStartOffset(),u=r.getEndOffset(),c=t.getEntityAt(c),u=n.getEntityAt(u-1);return c||u?(i=r,c&&c===u?i=d(e,t,i,o,c,!0,!0):c&&u?(a=d(e,t,i,o,c,!1,!0),s=d(e,n,i,o,u,!1,!1),i=i.merge({anchorOffset:a.getAnchorOffset(),focusOffset:s.getFocusOffset(),isBackward:!1})):c?(a=d(e,t,i,o,c,!1,!0),i=i.merge({anchorOffset:a.getStartOffset(),isBackward:!1})):u&&(s=d(e,n,i,o,u,!1,!1),i=i.merge({focusOffset:s.getEndOffset(),isBackward:!1})),i):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),m=n(13),r=n(6),g=n(53),v=n(7),b=n(51),l=r.List,w=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()})},S=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()})},_=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 m&&(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:g(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 m,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):(a.push(c?e:w(e,i,r)),r.slice(c?0:1,s-1).forEach(function(e){return a.push(e)}),a.push(S(e,i,r)))}),u=y.createFromArray(a),t&&(u=_(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,i,a,s,c,u=null;return null==(u=null!=n?n.length:u)||0===u?e:(o=e.getBlockMap(),i=t.getStartKey(),a=t.getStartOffset(),c=(s=o.get(i)).getText(),n=s.merge({text:c.slice(0,a)+n+c.slice(a,s.getLength()),characterList:l(s.getCharacterList(),p(r,u).toList(),a)}),c=a+u,e.merge({blockMap:o.set(i,n),selectionAfter:t.merge({anchorOffset:c,focusOffset:c})}))}},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),w=n(55),n=n(6),S=(n.List,n.Map),_=function(e,t,n){var r;e&&(r=t.get(e))&&t.set(e,n(r))},E=function(e,t){var n=[];if(e)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)for(var r=w(e,t);r&&t.get(r);){var o=t.get(r);n.push(r),r=o.getParentKey()?w(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){var n,r,o,i,a,s,c,u,l,f,p,d,h,y,m,g;return t.isCollapsed()?e:(n=e.getBlockMap(),r=t.getStartKey(),o=t.getStartOffset(),i=t.getEndKey(),a=t.getEndOffset(),s=n.get(r),c=n.get(i),u=s instanceof b,l=[],u&&(d=c.getChildKeys(),p=E(i,n),c.getNextSiblingKey()&&(l=l.concat(p)),l=(l=d.isEmpty()?l:l.concat(p.concat([i]))).concat(E(w(c,n),n))),d=s===c?v(s.getCharacterList(),o,a):s.getCharacterList().slice(0,o).concat(c.getCharacterList().slice(a)),f=s.merge({text:s.getText().slice(0,o)+c.getText().slice(a),characterList:d}),p=u&&0===o&&0===a&&c.getParentKey()===r&&null==c.getPrevSiblingKey()?S([[r,null]]):n.toSeq().skipUntil(function(e,t){return t===r}).takeUntil(function(e,t){return t===i}).filter(function(e,t){return-1===l.indexOf(t)}).concat(S([[i,null]])).map(function(e,t){return t===r?f:null}),d=n.merge(p).filter(function(e){return!!e}),u&&s!==c&&(y=s,m=c,g=n,d=(h=d).withMutations(function(t){var n,e,r,o;_(y.getKey(),t,function(e){return e.merge({nextSibling:O(e,t,g),prevSibling:x(e,t,g)})}),_(m.getKey(),t,function(e){return e.merge({nextSibling:O(e,t,g),prevSibling:x(e,t,g)})}),E(y.getKey(),g).forEach(function(e){return _(e,t,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return t.get(e)}),nextSibling:O(e,t,g),prevSibling:x(e,t,g)})})}),_(y.getNextSiblingKey(),t,function(e){return e.merge({prevSibling:y.getPrevSiblingKey()})}),_(y.getPrevSiblingKey(),t,function(e){return e.merge({nextSibling:O(e,t,g)})}),_(m.getNextSiblingKey(),t,function(e){return e.merge({prevSibling:x(e,t,g)})}),_(m.getPrevSiblingKey(),t,function(e){return e.merge({nextSibling:m.getNextSiblingKey()})}),E(m.getKey(),g).forEach(function(e){_(e,t,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return t.get(e)}),nextSibling:O(e,t,g),prevSibling:x(e,t,g)})})}),C(m,g).forEach(function(e){return _(e,t,function(e){return e.merge({nextSibling:O(e,t,g),prevSibling:x(e,t,g)})})}),null==h.get(y.getKey())&&null!=h.get(m.getKey())&&m.getParentKey()===y.getKey()&&null==m.getPrevSiblingKey()&&(n=y.getPrevSiblingKey(),_(m.getKey(),t,function(e){return e.merge({prevSibling:n})}),_(n,t,function(e){return e.merge({nextSibling:m.getKey()})}),e=n?h.get(n):null,r=e?e.getParentKey():null,y.getChildKeys().forEach(function(e){_(e,t,function(e){return e.merge({parent:r})})}),null!=r&&(o=h.get(r),_(r,t,function(e){return e.merge({children:o.getChildKeys().concat(y.getChildKeys())})})),_(y.getChildKeys().find(function(e){return null===h.get(e).getNextSiblingKey()}),t,function(e){return e.merge({nextSibling:y.getNextSiblingKey()})}))})),e.merge({blockMap:d,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),m=n(54),g=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 m(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:g(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 o,i,a,r=t.getLength();return r?(o=[],i=n?n.getDecorations(t,e):u(l(null,r)),a=t.getCharacterList(),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)):u.of(new p({start:0,end:0,decoratorKey:null,leaves:u.of(new f({start:0,end:0}))}))},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 _=n(13),E=n(55),r=n(6),C=n(7),O=r.OrderedMap,x=r.List,k=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&&C(!1);var o,i,a,s,c,u,l,f,p,d,h=t.getKey(),y=n.getKey(),m=(y===h&&C(!1),e.getBlockMap()),g=n instanceof _,v=[n],b=m.delete(y),m=(g&&(v=[],b=m.withMutations(function(t){var o=n.getNextSiblingKey(),i=E(n,t);t.toSeq().skipUntil(function(e){return e.getKey()===y}).takeWhile(function(e){var t=e.getKey(),n=t===y,r=o&&t!==o,e=!o&&e.getParentKey()&&(!i||t!==i);return!!(n||r||e)}).forEach(function(e){v.push(e),t.delete(e.getKey())})})),b.toSeq().takeUntil(function(e){return e===t})),b=b.toSeq().skipUntil(function(e){return e===t}).skip(1),w=v.map(function(e){return[e.getKey(),e]}),S=O();return"before"===r?((o=e.getBlockBefore(h))&&o.getKey()===n.getKey()&&C(!1),S=m.concat([].concat(w,[[h,t]]),b).toOrderedMap()):"after"===r&&((o=e.getBlockAfter(h))&&o.getKey()===y&&C(!1),S=m.concat([[h,t]].concat(w),b).toOrderedMap()),e.merge({blockMap:(o=S,m=n,h=t,w=r,g?(i="after"===w,a=m.getKey(),s=h.getKey(),c=m.getParentKey(),u=m.getNextSiblingKey(),l=m.getPrevSiblingKey(),f=h.getParentKey(),p=i?h.getNextSiblingKey():s,d=i?s:h.getPrevSiblingKey(),o.withMutations(function(e){k(c,e,function(e){var t=e.getChildKeys();return e.merge({children:t.delete(t.indexOf(a))})}),k(l,e,function(e){return e.merge({nextSibling:u})}),k(u,e,function(e){return e.merge({prevSibling:l})}),k(p,e,function(e){return e.merge({prevSibling:a})}),k(d,e,function(e){return e.merge({nextSibling:a})}),k(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:x(t)})}),k(a,e,function(e){return e.merge({nextSibling:p,prevSibling:d,parent:f})})})):o),selectionBefore:e.getSelectionAfter(),selectionAfter:e.getSelectionAfter().merge({anchorKey:y,focusKey:y})})}},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(P,e,A){"use strict";!function(r){var e=A(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=A(42),h=A(59),n=A(121),y=A(129),s=A(146),c=A(149),u=A(185),l=A(186),f=A(71),m=A(8),g=A(0),v=A(45),b=A(36),w=A(11),S=A(19),_=A(14),E=A(87),C=A(37),O=A(16),x=A(7),k=A(27),D=A(10),j=w.isBrowser("IE"),T=!j,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}(g.Component),w=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(m.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||_(),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},g.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=S({"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 g.createElement("div",{className:u},this._renderPlaceholder(),g.createElement("div",{className:S("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},g.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:S({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:T&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},g.createElement(N,{editor:this,editorState:a}),g.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"),j&&(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}(g.Component);i(w,"defaultProps",{ariaDescribedBy:"{{editor_id_placeholder}}",blockRenderMap:t,blockRendererFn:function(){return null},blockStyleFn:function(){return""},keyBindingFn:E,readOnly:!1,spellCheck:!1,stripPastedStyles:!1}),P.exports=w}.call(this,A(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,m=!1,g=null;var v={onCompositionStart:function(e){m=!0,e=e,g||(g=new r(l(e))).start()},onCompositionEnd:function(e){m=y=!1,setTimeout(function(){y||v.resolveComposition(e)},20)},onSelect:a,onKeyDown:function(e,t){m?t.which!==o.RIGHT&&t.which!==o.LEFT||t.preventDefault():(v.resolveComposition(e),e._onKeyDown(t))},onKeyPress:function(e,t){t.which===o.RETURN&&t.preventDefault()},resolveComposition:function(e){var i,a,t;m||(t=d(g).stopAndFlushMutations(),y=!(g=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(U,q,W){var V;!function(s,f){"use strict";function e(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}function R(e,t){return typeof e===m&&-1!==P(t).indexOf(P(e))}function c(e,t){if(typeof e===m)return e=e.replace(/^\s\s*/,p),typeof t==h?e:e.substring(0,350)}function u(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&&c[l];)if(i=c[l++].exec(e))for(r=0;r<u.length;r++)a=i[++n],typeof(o=u[r])===y&&0<o.length?2===o.length?typeof o[1]==d?this[o[0]]=o[1].call(this,a):this[o[0]]=o[1]:3===o.length?typeof o[1]!==d||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]===y&&0<t[n].length){for(var r=0;r<t[n].length;r++)if(R(t[n][r],e))return"?"===n?f:n}else if(R(t[n],e))return"?"===n?f:n;return e}function l(e,t){var n,r,o,i,a;return typeof e===y&&(t=e,e=f),this instanceof l?(n=typeof s!=h&&s.navigator?s.navigator:f,r=e||(n&&n.userAgent?n.userAgent:p),o=n&&n.userAgentData?n.userAgentData:f,i=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}(H,t):H,a=n&&n.userAgent==r,this.getBrowser=function(){var e,t={};return t.name=f,t[b]=f,u.call(t,r,i.browser),t.major=typeof(e=t[b])===m?e.replace(/[^\d\.]/g,p).split(".")[0]:f,a&&n&&n.brave&&typeof n.brave.isBrave==d&&(t.name="Brave"),t},this.getCPU=function(){var e={};return e[w]=f,u.call(e,r,i.cpu),e},this.getDevice=function(){var e={};return e[v]=f,e[g]=f,e.type=f,u.call(e,r,i.device),a&&!e.type&&o&&o.mobile&&(e.type=S),a&&"Macintosh"==e[g]&&n&&typeof n.standalone!=h&&n.maxTouchPoints&&2<n.maxTouchPoints&&(e[g]="iPad",e.type=_),e},this.getEngine=function(){var e={};return e.name=f,e[b]=f,u.call(e,r,i.engine),e},this.getOS=function(){var e={};return e.name=f,e[b]=f,u.call(e,r,i.os),a&&!e.name&&o&&"Unknown"!=o.platform&&(e.name=o.platform.replace(/chrome os/i,B).replace(/macos/i,"Mac 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 r},this.setUA=function(e){return r=typeof e===m&&350<e.length?c(e,350):e,this},this.setUA(r),this):new l(e,t).getResult()}var r,p="",d="function",h="undefined",y="object",m="string",g="model",n="name",o="type",v="vendor",b="version",w="architecture",i="console",S="mobile",_="tablet",a="smarttv",E="wearable",C="embedded",O="Amazon",x="Apple",L="BlackBerry",k="Browser",D="Chrome",j="Firefox",T="Google",I="Microsoft",M="Opera",z="Samsung",N="Sony",F="Xiaomi",B="Chromium OS",P=function(e){return e.toLowerCase()},K={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"},H={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[n,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[n,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[n,b],[/opios[\/ ]+([\w\.]+)/i],[b,[n,M+" Mini"]],[/\bopr\/([\w\.]+)/i],[b,[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|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[n,b],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[n,"UC"+k]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[b,[n,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[b,[n,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[n,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[n,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[b,[n,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[n,/(.+)/,"$1 Secure "+k],b],[/\bfocus\/([\w\.]+)/i],[b,[n,j+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[n,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[n,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[n,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[n,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[n,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[b,[n,j]],[/\bqihu|(qi?ho?o?|360)browser/i],[[n,"360 "+k]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[n,/(.+)/,"$1 "+k],b],[/(comodo_dragon)\/([\w\.]+)/i],[[n,/_/g," "],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[n,b],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[n],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[n,"Facebook"],b],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[n,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[n,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[b,[n,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[n,D+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[n,D+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[n,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[n,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[n,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,n],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[n,[b,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,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[n,"Netscape"],b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[n,j+" 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,/panasonic;(viera)/i],[n,b],[/(cobalt)\/([\w\.]+)/i],[n,[b,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[w,"amd64"]],[/(ia32(?=;))/i],[[w,P]],[/((?:i[346]|x)86)[;\)]/i],[[w,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[w,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[w,"armhf"]],[/windows (ce|mobile); ppc;/i],[[w,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[w,/ower/,p,P]],[/(sun4\w)[;\)]/i],[[w,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[w,P]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[g,[v,z],[o,_]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[g,[v,z],[o,S]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[g,[v,x],[o,S]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[g,[v,x],[o,_]],[/(macintosh);/i],[g,[v,x]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[v,"Sharp"],[o,S]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[g,[v,"Huawei"],[o,_]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[v,"Huawei"],[o,S]],[/\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|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[g,/_/g," "],[v,F],[o,S]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[g,/_/g," "],[v,F],[o,_]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[g,[v,"OPPO"],[o,S]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[g,[v,"Vivo"],[o,S]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[g,[v,"Realme"],[o,S]],[/\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],[g,[v,"Motorola"],[o,S]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[v,"Motorola"],[o,_]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[v,"LG"],[o,_]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[v,"LG"],[o,S]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[g,[v,"Lenovo"],[o,_]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[g,/_/g," "],[v,"Nokia"],[o,S]],[/(pixel c)\b/i],[g,[v,T],[o,_]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[v,T],[o,S]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[g,[v,N],[o,S]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[v,N],[o,_]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[g,[v,"OnePlus"],[o,S]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[g,[v,O],[o,_]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[v,O],[o,S]],[/(playbook);[-\w\),; ]+(rim)/i],[g,v,[o,_]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[v,L],[o,S]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[v,"ASUS"],[o,_]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[v,"ASUS"],[o,S]],[/(nexus 9)/i],[g,[v,"HTC"],[o,_]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[g,/_/g," "],[o,S]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[g,[v,"Acer"],[o,_]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[g,[v,"Meizu"],[o,S]],[/(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],[v,g,[o,S]],[/(kobo)\s(ereader|touch)/i,/(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],[v,g,[o,_]],[/(surface duo)/i],[g,[v,I],[o,_]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[g,[v,"Fairphone"],[o,S]],[/(u304aa)/i],[g,[v,"AT&T"],[o,S]],[/\bsie-(\w*)/i],[g,[v,"Siemens"],[o,S]],[/\b(rct\w+) b/i],[g,[v,"RCA"],[o,_]],[/\b(venue[\d ]{2,7}) b/i],[g,[v,"Dell"],[o,_]],[/\b(q(?:mv|ta)\w+) b/i],[g,[v,"Verizon"],[o,_]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[g,[v,"Barnes & Noble"],[o,_]],[/\b(tm\d{3}\w+) b/i],[g,[v,"NuVision"],[o,_]],[/\b(k88) b/i],[g,[v,"ZTE"],[o,_]],[/\b(nx\d{3}j) b/i],[g,[v,"ZTE"],[o,S]],[/\b(gen\d{3}) b.+49h/i],[g,[v,"Swiss"],[o,S]],[/\b(zur\d{3}) b/i],[g,[v,"Swiss"],[o,_]],[/\b((zeki)?tb.*\b) b/i],[g,[v,"Zeki"],[o,_]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[v,"Dragon Touch"],g,[o,_]],[/\b(ns-?\w{0,9}) b/i],[g,[v,"Insignia"],[o,_]],[/\b((nxa|next)-?\w{0,9}) b/i],[g,[v,"NextBook"],[o,_]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[v,"Voice"],g,[o,S]],[/\b(lvtel\-)?(v1[12]) b/i],[[v,"LvTel"],g,[o,S]],[/\b(ph-1) /i],[g,[v,"Essential"],[o,S]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[g,[v,"Envizen"],[o,_]],[/\b(trio[-\w\. ]+) b/i],[g,[v,"MachSpeed"],[o,_]],[/\btu_(1491) b/i],[g,[v,"Rotor"],[o,_]],[/(shield[\w ]+) b/i],[g,[v,"Nvidia"],[o,_]],[/(sprint) (\w+)/i],[v,g,[o,S]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[v,I],[o,S]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[v,"Zebra"],[o,_]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[v,"Zebra"],[o,S]],[/smart-tv.+(samsung)/i],[v,[o,a]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[v,z],[o,a]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,"LG"],[o,a]],[/(apple) ?tv/i],[v,[g,x+" TV"],[o,a]],[/crkey/i],[[g,D+"cast"],[v,T],[o,a]],[/droid.+aft(\w)( bui|\))/i],[g,[v,O],[o,a]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[v,"Sharp"],[o,a]],[/(bravia[\w ]+)( bui|\))/i],[g,[v,N],[o,a]],[/(mitv-\w{5}) bui/i],[g,[v,F],[o,a]],[/Hbbtv.*(technisat) (.*);/i],[v,g,[o,a]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,c],[g,c],[o,a]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[o,a]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[v,g,[o,i]],[/droid.+; (shield) bui/i],[g,[v,"Nvidia"],[o,i]],[/(playstation [345portablevi]+)/i],[g,[v,N],[o,i]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[v,I],[o,i]],[/((pebble))app/i],[v,g,[o,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[g,[v,x],[o,E]],[/droid.+; (glass) \d/i],[g,[v,T],[o,E]],[/droid.+; (wt63?0{2,3})\)/i],[g,[v,"Zebra"],[o,E]],[/(quest( 2| pro)?)/i],[g,[v,"Facebook"],[o,E]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[o,C]],[/(aeobc)\b/i],[g,[v,O],[o,C]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[g,[o,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[g,[o,_]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[o,_]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[o,S]],[/(android[-\w\. ]{0,9});.+buil/i],[g,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[n,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[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,/\b(libweb)/i],[n,b],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,n]],os:[[/microsoft (windows) (vista|xp)/i],[n,b],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[n,[b,t,K]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[n,"Windows"],[b,t,K]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[n,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[n,"Mac OS"],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,n],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[n,b],[/\(bb(10);/i],[b,[n,L]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[b,[n,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[n,j+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[n,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[b,[n,"watchOS"]],[/crkey\/([\d\.]+)/i],[b,[n,D+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[n,B],b],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(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,b],[/(sunos) ?([\w\.\d]*)/i],[[n,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[n,b]]},A=(l.VERSION="0.7.35",l.BROWSER=e([n,b,"major"]),l.CPU=e([w]),l.DEVICE=e([g,v,o,i,S,a,_,E,C]),l.ENGINE=l.OS=e([n,b]),typeof q!=h?(q=typeof U!=h&&U.exports?U.exports=l:q).UAParser=l:"function"===d&&W(125)?(V=function(){return l}.call(q,W,q,U))!==f&&(U.exports=V):typeof s!=h&&(s.UAParser=l),typeof s!=h&&(s.jQuery||s.Zepto));A&&!A.ua&&(r=new l,A.ua=r.getResult(),A.ua.get=function(){return r.getUA()},A.ua.set=function(e){r.setUA(e);var t,n=r.getResult();for(t in n)A.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 m(e,t){for(var n=e.length;n<t;n++)e[n]="0"}function g(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){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?g(c,o):g(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,n,r,o,i,a=this.props.editorState,e=e.editorState;return a.getDirectionMap()!==e.getDirectionMap()||a.getSelection().getHasFocus()!==e.getSelection().getHasFocus()||(r=e.getNativelyRenderedContent(),t=a.isInCompositionMode(),n=e.isInCompositionMode(),!(a===e||null!==r&&e.getCurrentContent()===r||t&&n)&&(r=a.getCurrentContent(),o=e.getCurrentContent(),a=a.getDecorator(),i=e.getDecorator(),t!==n||r!==o||a!==i||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 m=y.getKey(),g={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(m),tree:a.getBlockTree(m)},v=(t.get(y.getType())||t.get("unstyled")).wrapper,g=(h.push({block:k.createElement(O,C({key:m},g)),wrapperTemplate:v,key:m,offsetKey:x.encode(m,0,0)}),y.getNextSiblingKey()),y=g?u.getBlockForKey(g):null;for(var b=[],w=0;w<h.length;){var S=h[w];if(S.wrapperTemplate){for(var _=[];_.push(h[w].block),++w<h.length&&h[w].wrapperTemplate===S.wrapperTemplate;);var E=k.cloneElement(S.wrapperTemplate,{key:S.key+"-wrap","data-offset-key":S.offsetKey},_);b.push(E)}else b.push(S.block),w++}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),j=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 _(){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",j.createRef()),e}e=o,(t=_).prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e;var t=_.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,m=e.blockRenderMap,g=e.blockRendererFn,v=e.blockStyleFn,b=e.contentState,n=e.decorator,w=e.editorKey,S=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,g),i=o.CustomComponent||_,a=C(r,m),s=a.Element,a=a.wrapperTemplate,c=x(r,w,n,v,o,null),t=E({},y.props,{tree:S.getBlockTree(t),blockProps:o.customProps,offsetKey:n,block:r});if(e.push(j.createElement(s,c,j.createElement(i,t))),a&&(o=b,!(c=(n=r).getNextSiblingKey())||o.getBlockForKey(c).getType()!==n.getType())){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}}t.splice(t.indexOf(l[0]),l.length+1),r=l.reverse(),o=r[0].key,t.push(j.cloneElement(i,{key:"".concat(o,"-wrap"),"data-offset-key":D.encode(o,0,0)},r))}return e},[])),t.getKey()),l=D.encode(u,0,0),f=O(t,g),p=f.CustomComponent,p=null!=p?j.createElement(p,d({},this.props,{tree:S.getBlockTree(u),blockProps:f.customProps,offsetKey:l,block:t})):j.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});return t.getParentKey()?p:(c=C(t,m).Element,r=x(t,w,l,v,f,this.wrapperRef),j.createElement(c,r,p))},_}(j.Component));e.exports=n},function(e,t,n){"use strict";var g=n(133),v=n(69),b=n(15),r=n(6),w=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(),m=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 w.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===m&&t===a})}).toArray();return i&&r?w.createElement(g,{block:s,children:t,contentState:n,decorator:r,decoratorKey:i,direction:l,leafSet:e,text:y,key:o}):t}).toArray();return w.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}(w.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){return e?(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)).nodeType===Node.TEXT_NODE?e.textContent:(a(e)||o(!1),e.outerHTML):"[empty]"}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 m(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,a,s,c,u,l,f,p=h(t);d(p.documentElement,t)&&(p=p.defaultView.getSelection(),f=e.getAnchorKey(),i=e.getAnchorOffset(),l=e.getFocusKey(),a=e.getFocusOffset(),s=e.getIsBackward(),!p.extend&&s&&(u=f,c=i,f=l,i=a,l=u,a=c,s=!1),u=l===n&&r<=a&&a<=o,(c=f===n&&r<=i&&i<=o)&&u?(p.removeAllRanges(),m(p,t,i-r,e),y(p,t,a-r,e)):s?(u&&(p.removeAllRanges(),m(p,t,a-r,e)),c&&(l=p.focusNode,f=p.focusOffset,p.removeAllRanges(),m(p,t,i-r,e),y(p,l,f,e))):(c&&(p.removeAllRanges(),m(p,t,i-r,e)),u&&y(p,t,a-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 z(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 F=n(75),B=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,n,r,o,i,a=this.props.editorState,e=e.editorState;return a.getDirectionMap()!==e.getDirectionMap()||a.getSelection().getHasFocus()!==e.getSelection().getHasFocus()||(r=e.getNativelyRenderedContent(),t=a.isInCompositionMode(),n=e.isInCompositionMode(),!(a===e||null!==r&&e.getCurrentContent()===r||t&&n)&&(r=a.getCurrentContent(),o=e.getCurrentContent(),a=a.getDecorator(),i=e.getDecorator(),t!==n||r!==o||a!==i||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(),m=[],g=null,v=null,b=0;b<y.length;b++){var w=y[b],S=w.getKey(),_=w.getType(),E=n(w),C=void 0,O=void 0,x=void 0,E=(E&&(C=E.component,O=E.props,x=E.editable),u||h.get(S)),k=B.encode(S,0,0),O={contentState:l,block:w,blockProps:O,blockStyleFn:r,customStyleMap:o,customStyleFn:i,decorator:d,direction:E,forceSelection:p,offsetKey:k,preventScroll:c,selection:f,tree:a.getBlockTree(S)},D=t.get(_)||t.get("unstyled"),j=D.wrapper,D=D.element||t.get("unstyled").element,T=w.getDepth(),I="",_=(r&&(I=r(w)),"li"===D&&(I=U(I,H({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===_,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===_,"public/DraftStyleDefault/reset":v!==j||null===g||g<T,"public/DraftStyleDefault/depth0":0===T,"public/DraftStyleDefault/depth1":1===T,"public/DraftStyleDefault/depth2":2===T,"public/DraftStyleDefault/depth3":3===T,"public/DraftStyleDefault/depth4":4<=T,"public/DraftStyleDefault/listLTR":"LTR"===E,"public/DraftStyleDefault/listRTL":"RTL"===E}))),C||F),T={className:I,"data-block":!0,"data-editor":s,"data-offset-key":k,key:S},E=(void 0!==x&&(T=z({},T,{contentEditable:x,suppressContentEditableWarning:!0})),K.createElement(D,T,K.createElement(_,L({},O,{key:S}))));m.push({block:E,wrapperTemplate:j,key:S,offsetKey:k}),g=j?w.getDepth():null,v=j}for(var M=[],N=0;N<m.length;){var P=m[N];if(P.wrapperTemplate){for(var A=[];A.push(m[N].block),++N<m.length&&m[N].wrapperTemplate===P.wrapperTemplate;);var R=K.cloneElement(P.wrapperTemplate,{key:P.key+"-wrap","data-offset-key":P.offsetKey},A);M.push(R)}else M.push(P.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),m="'",g="/",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 u,n,r,o,i,a,s=e._latestEditorState,l=t.data;l&&(e.props.handleBeforeInput&&p(e.props.handleBeforeInput(l,s,t.timeStamp))?t.preventDefault():(r=s.getSelection(),u=r.getStartOffset(),n=r.getAnchorKey(),r.isCollapsed()?(r=b(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=v&&(a==m||a==g)),(i=i||h(r.getDirectionMap()).get(n)!==h(s.getDirectionMap()).get(n))?(t.preventDefault(),r=c.set(r,{forceSelection:!0}),e.update(r)):(r=c.set(r,{nativelyRenderedContent:r.getCurrentContent()}),e._pendingStateFromBeforeInput=r,y(function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)}))):(t.preventDefault(),e.update(b(s,l,s.getCurrentInlineStyle(),f(s.getCurrentContent(),s.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&&"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 w=n(9),S=n(15),_=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=S.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,m,g,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=w.replaceText(p,t,i,l.getInlineStyleAt(u),f?l.getEntityAt(u):null),l=(g=k?(m=n.anchorOffset,g=n.focusOffset,y=(h=u+Math.min(m,g))+Math.abs(m-g),m=h,y):(f=i.length-d.length,h=v.getStartOffset(),y=v.getEndOffset(),m=o?y+f:h,y+f),t.merge({selectionBefore:p.getSelectionAfter(),selectionAfter:v.merge({anchorOffset:m,focusOffset:g})}));e.update(_.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),m=n(174),g=n(80),v=n(175),b=n(176),w=n(177),S=r.isOptionKeyCommand,_=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(n)&&n.preventDefault()}var i=t.props.keyBindingFn(n);null==i||""===i?e===c.SPACE&&_&&S(n)&&(e=a.replaceText(r.getCurrentContent(),r.getSelection()," "),t.update(s.push(r,e,"insert-characters"))):"undo"===i?w(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 g(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 m(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){var t;return l?(t=a.replaceWithFragment(e.getCurrentContent(),e.getSelection(),l),s.push(e,t,"insert-fragment")):e}}},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();return t.isCollapsed()&&0===t.getAnchorOffset()?a(e,1):(t=n.currentTarget.ownerDocument.defaultView.getSelection().getRangeAt(0),t=o(t),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();return 0===n?i(e,1):(t=t.getStartKey(),t=e.getCurrentContent().getBlockForKey(t).getText().slice(0,n),n=r.getBackward(t),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,n=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");return n===e.getCurrentContent()?e:(t=e.getSelection(),r.push(e,n.set("selectionBefore",t),t.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){var t,n,r,o,i=e.getSelection();return!i.isCollapsed()||0===(o=i.getAnchorOffset())||(t=i.getAnchorKey(),(t=(n=e.getCurrentContent()).getBlockForKey(t).getLength())<=1)?e:(t=o===t?(r=i.set("anchorOffset",o-1),i):(r=i.set("focusOffset",o+1)).set("anchorOffset",o+1),i=c(n,r),r=(n=(o=a.removeRange(n,r,"backward")).getSelectionAfter()).getAnchorOffset()-1,n=n.merge({anchorOffset:r,focusOffset:r}),r=a.replaceWithFragment(o,n,i),o=s.push(e,r,"insert-fragment"),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);"spellcheck-change"===t.getLastChangeType()?(r=o.getCurrentContent(),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),m=n(86),g=n(43),v=n(78),b=n(38),w=n(184);function S(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=w(e),n=f.create({style:t.getCurrentInlineStyle(),entity:g(t.getCurrentContent(),t.getSelection())}),r=m.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=w(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(S(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(S(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(S(o._latestEditorState,a,u))}}o.setClipboard(null)}t.length&&(r=f.create({style:s.getCurrentInlineStyle(),entity:g(s.getCurrentContent(),s.getSelection())}),e=m.getCurrentBlockType(s),a=h.processText(t,r,e),u=l.createFromArray(a),o.update(S(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||g(),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||g()})}function y(e,t,n){return t=t.map(function(e){return p({},e,{parentRef:n})}),e.concat(t.reverse())}var r=n(18),m=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),g=n(14),v=n(16),b=n(6),w=n(7),S=v("draft_tree_data_support"),_=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)||w(!1);for(var r=t.children.map(h),t=new m(p({},d(t,f),{prevSibling:0===n?null:l[n-1].key,nextSibling:n===l.length-1?null:l[n+1].key,children:_(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){w(!1);break}u=i.children.map(h),i=new m(p({},d(i,f),{parent:a.getKey(),children:_(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)||w(!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=(S&&!a?u.fromRawStateToRawTreeState(e):e).blocks,S?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){var t,n,r,o;return!(e=e.getSelection()).rangeCount||(e=e.getRangeAt(0),t=(e=i(e)).top,n=e.right,r=e.bottom,o=e.left,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):(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")).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,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(217),i=(n=n)&&n.__esModule?n:{default:n};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,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],o=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return!r||r.length<1?"string"==typeof e&&"string"==typeof this.getCurrentContent()?this.addToCurrentContent(e):this.content.push(e):o?this.handleFlatPush(e,r):(r=r,t=(r=Array.isArray(r)?r:Array.from(r))[0],r=r.slice(1),(n=this.getCurrentContent())instanceof a&&n.style===t?n.pushContent(e,r,o):((n=new a({style:t})).pushContent(e,r,o),this.content.push(n))),this}}]);n=a;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||{}}t.default=n},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 g=r(n(89)),s=r(n(220)),v=r(n(221)),b=r(n(222)),w=r(n(223)),f=r(n(224)),S=r(n(225)),c=r(n(226));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;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({},S.default,6<arguments.length&&void 0!==arguments[6]?arguments[6]:{}),u=[],l=[],f=null,p=0,d=[],h=[],y=!1,m=new g.default({flat:!!a});return e.forEach(function(e){var t,n;(0,v.default)(e,f,c)?!0===c.cleanup.split&&(y=!0):(t=m.parse(e),t=C(t,r,i,a,s,c,(0,b.default)()),(f&&f!==e.type||y)&&(_(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))}),_(l,o,u,{prevType:f,prevDepth:p,prevKeys:d,prevData:h},c),(0,w.default)(u,c)}var C=t.renderNode=function t(e,n,r,o,i,a,s){if(e.styles&&o)return o((0,w.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,w.default)(c,a),{key:s()});if(null!==e.entity){var l=i[e.entity];if(l&&r[l.type])return r[l.type]((0,w.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,w.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,n,r,o,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return e&&Array.isArray(e.blocks)?e.blocks.length?(t=i.inline,n=i.blocks,r=i.entities,o=i.styles,i=(i=i.decorators)?(0,c.default)(e,i,a):e.blocks,i=u(i),E(i,t,n,r,o,e.entityMap,a)):null:((0,s.default)("invalid raw object"),null)}},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(227)),f=a(n(228));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";
|
|
49
|
+
*/var c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(Object.assign){var e=new String("abc");if(e[5]="de","5"!==Object.getOwnPropertyNames(e)[0]){for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r,o=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"===o.join(""))return r={},"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")?1:void 0}}}catch(e){}}()?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(r){var e;function t(e){return r.call(this,((e=e)&&(t=e.characterList,n=e.text)&&!t&&(e.characterList=a(u(o.EMPTY,n.length))),e))||this;var t,n}e=r,(n=t).prototype=Object.create(e.prototype),(n.prototype.constructor=n).__proto__=e;var n=t.prototype;return n.getKey=function(){return this.get("key")},n.getType=function(){return this.get("type")},n.getText=function(){return this.get("text")},n.getCharacterList=function(){return this.get("characterList")},n.getLength=function(){return this.getText().length},n.getDepth=function(){return this.get("depth")},n.getData=function(){return this.get("data")},n.getInlineStyleAt=function(e){e=this.getCharacterList().get(e);return e?e.getStyle():l},n.getEntityAt=function(e){e=this.getCharacterList().get(e);return e?e.getEntity():null},n.findStyleRanges=function(e,t){i(this.getCharacterList(),f,e,t)},n.findEntityRanges=function(e,t){i(this.getCharacterList(),p,e,t)},t}(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){var n;return 0<=t&&t<e.length||r(!1),t+1!==e.length&&(n=e.charCodeAt(t),e=e.charCodeAt(t+1),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 Or}),t.d(e,"List",function(){return mn}),t.d(e,"Map",function(){return Yt}),t.d(e,"OrderedMap",function(){return N}),t.d(e,"OrderedSet",function(){return pr}),t.d(e,"PairSorting",function(){return mr}),t.d(e,"Range",function(){return $n}),t.d(e,"Record",function(){return P}),t.d(e,"Repeat",function(){return Sr}),t.d(e,"Seq",function(){return C}),t.d(e,"Set",function(){return Wn}),t.d(e,"Stack",function(){return Pn}),t.d(e,"fromJS",function(){return _r}),t.d(e,"get",function(){return gt}),t.d(e,"getIn",function(){return Zn}),t.d(e,"has",function(){return mt}),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 Fn}),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 zn}),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 Pt}),t.d(e,"mergeDeepWith",function(){return At}),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 wt}),t.d(e,"setIn",function(){return _t}),t.d(e,"update",function(){return xt}),t.d(e,"updateIn",function(){return St}),t.d(e,"version",function(){return Cr});var t="delete",w=5,S=1<<w,b=S-1,_={};function L(){return{value:!1}}function g(e){e&&(e.value=!0)}function z(){}function F(e){return void 0===e.size&&(e.size=e.__iterate(K)),e.size}function B(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 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 q(e,t,0)}function W(e,t){return q(e,t,t)}function q(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:me(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,m=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}m.prototype.toString=function(){return"[Iterator]"},m.KEYS=oe,m.VALUES=h,m.ENTRIES=y,m.prototype.inspect=m.prototype.toSource=function(){return this.toString()},m.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 we();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 m(function(){var e;return o===r?E():(e=i[n?r-++o:o++],v(t,e[0],e[1]))})):this.__iteratorUncached(t,n)},t}(u),ye=function(e){function t(e){return null==e?we().toKeyedSeq():l(e)?c(e)?e.toSeq():e.fromEntrySeq():ne(e)?e.toSeq():Se(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?we():l(e)?c(e)?e.entrySeq():e.toIndexedSeq():ne(e)?e.toSeq().entrySeq():_e(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),me=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),ge=(C.isSeq=ee,C.Keyed=ye,C.Set=me,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[B(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 m(function(){var e;return i===o?E():(e=n?o-++i:i++,v(t,e,r[e]))})},t}(O)),ve=function(e){function t(e){var t=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(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 m(function(){var e;return a===i?E():(e=o[n?i-++a:a++],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){var n,r;return e?this.cacheResult().__iterator(t,e):ue(n=le(this._collection))?(r=0,new m(function(){var e=n.next();return e.done?e:v(t,r++,e.value)})):new m(E)},t}(O));function we(){return he=he||new ge([])}function Se(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 _e(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 ge(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 je(e){return e>>>1&1073741824|3221225471&e}var Te=Object.prototype.valueOf;function k(e){if(null==e)return Ie(e);if("function"==typeof e.hashCode)return je(e.hashCode(e));var t=(e=e).valueOf!==Te&&"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 je(r);case"string":return(t.length>Ke?function(e){var t=We[e];void 0===t&&(t=Me(e),Ue===He&&(Ue=0,We={}),Ue++,We[e]=t);return t}:Me)(t);case"object":case"function":var o,i=t;if((!Le||void 0===(o=Re.get(i)))&&void 0===(o=i[Be])){if(!Pe){if(void 0!==(o=i.propertyIsEnumerable&&i.propertyIsEnumerable[Be]))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=Ae(),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(Pe)Object.defineProperty(i,Be,{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[Be]=o;else{if(void 0===i.nodeType)throw new Error("Unable to set a non-enumerable property on object.");i[Be]=o}}}return o;case"symbol":return void 0===(o=ze[i=t])&&(o=Ae(),ze[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 je(t)}var Ne=Object.isExtensible,Pe=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Ae(){var e=++Fe;return 1073741824&Fe&&(Fe=0),e}var Re,Le="function"==typeof WeakMap,ze=(Le&&(Re=new WeakMap),Object.create(null)),Fe=0,Be="__immutablehash__",Ke=("function"==typeof Symbol&&(Be=Symbol(Be)),16),He=255,Ue=0,We={},qe=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=(qe.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&&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(h,n),i=0;return n&&F(this),new m(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 m(function(){var e=n.next();return e.done?e:v(t,e.value,e.value,e)})},t}(me),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 m(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 m(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,_);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(y,e);return new m(function(){var e,t,n=o.next();return n.done?n:(t=(e=n.value)[0],v(r,t,a.call(s,e[1],t,i),n))})},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&&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(y,!r));return new m(function(){var e,t=i.next();return t.done?t:(e=t.value,v(n,s?e[0]:r?c.size-++o:o++,e[1],t))})},e}function Xe(a,s,c,u){var e=r(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(y,e),i=0;return new m(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 u,l,n=s.size;return H(e,t,n)?s:(u=U(e,n),n=W(t,n),u!=u||n!=n?Qe(s.toSeq().cacheResult(),e,t,c):((e=n-u)==e&&(l=e<0?0:e),(t=r(s)).size=0===l?l:s.size&&l||void 0,!c&&ee(s)&&0<=l&&(t.get=function(e,t){return 0<=(e=B(this,e))&&e<l?s.get(e+u,t):t}),t.__iterateUncached=function(n,e){var r,o,i,a=this;return 0===l?0:e?this.cacheResult().__iterate(n,e):(o=!(r=0),i=0,s.__iterate(function(e,t){if(!(o=o&&r++<u))return i++,!1!==n(e,c?t:i-1,a)&&i!==l}),i)},t.__iteratorUncached=function(t,e){var n,r,o;return 0!==l&&e?this.cacheResult().__iterator(t,e):0===l?new m(E):(n=s.__iterator(t,e),o=r=0,new m(function(){for(;r++<u;)n.next();var e;return++o>l?E():(e=n.next(),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,i,a=this;return e?this.cacheResult().__iterate(r,e):(o=!0,i=0,t.__iterate(function(e,t,n){if(!(o=o&&u.call(l,e,t,n)))return i++,r(e,f?t:i-1,a)}),i)},e.__iteratorUncached=function(o,e){var i,a,s,c=this;return e?this.cacheResult().__iterator(o,e):(i=t.__iterator(y,e),a=!0,s=0,new m(function(){var e;do{if((e=i.next()).done)return f||o===h?e:v(o,s++,o===oe?void 0:e.value[1],e);var t=e.value,n=t[0],r=t[1]}while(a=a&&u.call(l,r,n,c));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){var i,a;return t?this.cacheResult().__iterate(o,t):(a=!1,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,i=0),i)},u.__iteratorUncached=function(n,r){var o,i,a;return r?this.cacheResult().__iterator(n,r):(o=e.__iterator(n,r),i=[],a=0,new m(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:me)(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 ge(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 m(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:me).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 j(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 T(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=qe.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 mt(e,t){return p(e)?e.has(t):ht(e)&&pe.call(e,t)}function gt(e,t,n){return p(e)?e.get(t,n):mt(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function vt(e){if(Array.isArray(e))return j(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)}var n;return pe.call(e,t)?(n=vt(e),Array.isArray(n)?n.splice(t,1):delete n[t],n):e}function wt(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)}return pe.call(e,t)&&n===e[t]||((e=vt(e))[t]=n),e}function St(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&&!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?_:gt(n,c,_);r=e(u===_?t:p(u),u,r,o+1,i,a);return r===u?n:r===_?bt(n,c):wt(s?t?I():{}:n,c,r)}(p(e),e,ft(t),0,n,r);return e===_?n:e}function _t(e,t,n){return St(e,t,_,function(){return n})}function Et(e,t){return _t(this,e,t)}function Ct(e,t){return St(e,t,function(){return _})}function Ot(e){return Ct(this,e)}function xt(e,t,n,r){return St(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 St(this,e,t,n)}function jt(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return It(this,e)}function Tt(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,_,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 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 Pt(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return Rt(e,t)}function At(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 zt(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Rt(this,e)}function Ft(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return Rt(this,t,e)}function Bt(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return St(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 St(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 z)}function Wt(){return this.__ensureOwner()}function qt(){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);T(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(n.length<=t+1)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,_)},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=jt,i.mergeWith=Tt,i.mergeDeep=zt,i.mergeDeepWith=Ft,i.mergeIn=Bt,i.mergeDeepIn=Kt,i.withMutations=Ht,i.wasAltered=qt,i.asImmutable=Wt,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===_,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(g(a),!s&&f||g(i),!s||1!==c.length){if(!f&&!s&&c.length>=ln){var p=e,d=c,a=r,i=o;p=p||new z;for(var h=new Xt(p,k(a),[a,i]),y=0;y<d.length;y++){var m=d[y];h=h.update(p,0,void 0,m[0],m[1])}return h}a=e&&e===this.ownerID,i=a?c:j(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+w,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===_)return this;var f=cn(u&c-1),p=this.nodes,d=l?p[f]:void 0,t=on(d,e,t+w,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,m=0,g=new Array(S),v=0;0!==y;v++,y>>>=1)g[v]=1&y?h[m++]:void 0;return g[r]=o,new Zt(n,m+1,g)}return l&&!t&&2===p.length&&an(p[1^f])?p[1^f]:l&&t&&1===p.length&&an(t)?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),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+w,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===_&&!u)return this;t=on(u,e,t+w,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,m=1,g=l.length;y<g;y++,m<<=1){var v=l[y];void 0!==v&&y!==f&&(p|=m,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===_;if(n!==this.keyHash)return s?this:(g(a),g(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;return(t?c[u][1]===o:s)?this:(g(a),!s&&t||g(i),s&&2===l?new Xt(e,this.keyHash,c[1^u]):(a=(n=e&&e===this.ownerID)?c:j(c),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===_,c=x(r,this.entry[0]);return(c?o===this.entry[1]:s)?this:(g(a),s?void g(i):c?e&&e===this.ownerID?(this.entry[1]=o,this):new Xt(e,this.keyHash,[r,o]):(g(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}(m));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===_?-1:1:0)}else{if(n===_)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===_?e:(g(s),g(a),new Xt(t,r,[o,i]))}function an(e){return e.constructor===Xt||e.constructor===Jt}function sn(e,t,n,r,o){var i,a;return e.keyHash===r?new Jt(t,r,[e.entry,o]):(r=(i=(0===n?e.keyHash:e.keyHash>>>n)&b)==(a=(0===n?r:r>>>n)&b)?[sn(e,t,n+w,r,o)]:(n=new Xt(t,r,o),i<a?[e,n]:[n,e]),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:j(e);return r[t]=n,r}var ln=S/4,fn=S/2,pn=S/4,dn="@@__IMMUTABLE_LIST__@@";function hn(e){return Boolean(e&&e[dn])}var yn,mn=function(o){function e(e){var t,r,n=Sn();return null==e?n:hn(e)?e:(t=o(e),0===(r=t.size)?n:(T(r),0<r&&r<S?wn(0,r,w,null,new gn(t.toArray())):n.withMutations(function(n){n.setSize(r),t.forEach(function(e,t){return n.set(t,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("List [","]")},e.prototype.get=function(e,t){var n;return 0<=(e=B(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=B(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=_n(e,n.__ownerID,0,r,o,i):t=_n(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):wn(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=w,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):Sn()},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=o("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),W(t,n))},e.prototype.__iterator=function(t,n){var r=n?this.size:0,o=bn(this,n);return new m(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?wn(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?Sn():(this.__ownerID=e,this.__altered=!1,this)},e}(J),M=(mn.isList=hn,mn.prototype),gn=(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=Bt,M.mergeDeepIn=Kt,M.withMutations=Ht,M.wasAltered=qt,M.asImmutable=Wt,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=(gn.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 gn([],e);var o=0==r;if(0<t){var i,a=this.array[r];if((i=a&&a.removeBefore(e,t-w,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},gn.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-w,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,m=e._capacity,g=xn(m),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,o=(r=n)===g?v&&v.array:s&&s.array,i=y<r?0:y-r,S<(a=m-r)&&(a=S),function(){var e;return i===a?vn:(e=h?--a:i++,o&&o[e])}):(c=t,u=n,f=(s=e)&&s.array,p=y<u?0:y-u>>c,S<(d=1+(m-u>>c))&&(d=S),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-w,u+(e<<c))}})}}function wn(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 Sn(){return yn=yn||wn(0,0,w)}function _n(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=_n(s=e&&e.array[c],t,n-w,r,o,i))===s?e:((a=En(e,t)).array[c]=n,a):u&&e.array[c]===o?e:(i&&g(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 gn(e?e.array.slice():[],t)}function Cn(e,t){if(t>=xn(e._capacity))return e._tail;if(t<1<<e._level+w){for(var n=e._root,r=e._level;n&&0<r;)n=n.array[t>>>r&b],r-=w;return n}}function On(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new z,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 gn(c&&c.array.length?[void 0,c]:[],r),u+=1<<(s+=w);u&&(a+=u,o+=u,t+=u,i+=u);for(var l=xn(i),f=xn(t);1<<s+w<=f;)c=new gn(c&&c.array.length?[c]:[],r),s+=w;var n=e._tail,p=f<l?Cn(e,t-1):l<f?new gn([],r):n;if(n&&l<f&&a<i&&n.array.length){for(var d=c=En(c,r),h=s;w<h;h-=w)var y=l>>>h&b,d=d.array[y]=En(d.array[y],r);d.array[l>>>w&b]=n}if(t<i&&(p=p&&p.removeAfter(r,0,t)),f<=a)a-=f,t-=f,s=w,c=null,p=p&&p.removeBefore(r,0,a);else if(o<a||f<l){for(u=0;c;){var m=a>>>s&b;if(m!=f>>>s&b)break;m&&(u+=(1<<s)*m),s-=w,c=c.array[m]}(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):wn(a,t,s,c,p)}function xn(e){return e<S?0:e-1>>>w<<w}var kn,N=function(e){function t(t){return null==t?jn():xe(t)?t:jn().withMutations(function(n){var e=f(t);T(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):jn()},t.prototype.set=function(e,t){return Tn(this,e,t)},t.prototype.remove=function(e){return Tn(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){var t,n;return e===this.__ownerID?this:(t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e),e?Dn(t,n,e,this.__hash):0===this.size?jn():(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 jn(){return kn=kn||Dn(I(),Sn())}function Tn(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>=S&&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,Pn=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=B(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):An(t,n)},e.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;if(0===this.size&&Mn(e))return e;T(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):An(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(W(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):An(e,r)},e.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?An(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 ge(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){var n,r;return e?new ge(this.toArray()).__iterator(t,e):(n=0,r=this._head,new m(function(){var e;return r?(e=r.value,r=r.next,v(t,n++,e)):E()}))},e}(J),a=(Pn.isStack=Mn,Pn.prototype);function An(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||An(0)}a[In]=!0,a.shift=a.pop,a.unshift=a.push,a.unshiftAll=a.pushAll,a.withMutations=Ht,a.wasAltered=qt,a.asImmutable=Wt,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 zn(e){return Boolean(e&&e[Ln])}function Fn(e){return zn(e)&&d(e)}function Bn(n,e){var r,o,i,a,t;return n===e||!(!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))&&(0===n.size&&0===e.size||(r=!Z(n),d(n)?(o=n.entries(),e.every(function(e,t){var n=o.next().value;return n&&x(n[1],e)&&(r||x(n[0],t))})&&o.next().done):(i=!1,void 0===n.size&&(void 0===e.size?"function"==typeof n.cacheResult&&n.cacheResult():(i=!0,t=n,n=e,e=t)),a=!0,t=e.__iterate(function(e,t){if(r?!n.has(e):i?!x(e,n.get(t,_)):!x(n.get(t,_),e))return a=!1}),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,t;return c(e)?(n={},e.__iterate(function(e,t){n[t]=Hn(e)}),n):(t=[],e.__iterate(function(e){t.push(Hn(e))}),t)}var Un,Wn=function(r){function t(n){return null==n?Gn():zn(n)&&!d(n)?n:Gn().withMutations(function(t){var e=r(n);T(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 qn(this,this._map.set(e,e))},t.prototype.remove=function(e){return qn(this,this._map.remove(e))},t.prototype.clear=function(){return qn(this,this._map.clear())},t.prototype.map=function(n,r){var o=this,i=!1,e=qn(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++)"string"==typeof n[e]?t.add(n[e]):r(n[e]).forEach(function(e){return t.add(e)})}):this.constructor(n[0])},t.prototype.intersect=function(){for(var e,n=[],t=arguments.length;t--;)n[t]=arguments[t];return 0===n.length?this:(n=n.map(function(e){return r(e)}),e=[],this.forEach(function(t){n.every(function(e){return e.includes(t)})||e.push(t)}),this.withMutations(function(t){e.forEach(function(e){t.remove(e)})}))},t.prototype.subtract=function(){for(var e,n=[],t=arguments.length;t--;)n[t]=arguments[t];return 0===n.length?this:(n=n.map(function(e){return r(e)}),e=[],this.forEach(function(t){n.some(function(e){return e.includes(t)})&&e.push(t)}),this.withMutations(function(t){e.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){var t;return e===this.__ownerID?this:(t=this._map.__ensureOwner(e),e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this))},t}(X),o=(Wn.isSet=zn,Wn.prototype);function qn(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=Wt,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+B(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=W(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 m(function(){var e;return a===r?E():(e=i,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:Bn(this,e)},r}(O);function Zn(e,t,n){for(var r=ft(t),o=0;o!==r.length;)if((e=gt(e,r[o++],_))===_)return n;return e}function Jn(e,t){return Zn(this,e,t)}function Xn(e,t){return Zn(e,t,_)!==_}function Qn(){T(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=m,Kn(u,{toArray:function(){T(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 qe(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 Wn(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 Pn(c(this)?this.valueSeq():this)},toList:function(){return mn(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?Se(e):_e(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 ge(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){T(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))},partition:function(e,t){return r=e,o=t,i=c(n=this),a=[[],[]],n.__iterate(function(e,t){a[r.call(o,e,t,n)?1:0].push(i?[t,e]:e)}),s=st(n),a.map(function(e){return D(n,s(e))});var n,r,o,i,a,s},find:function(e,t,n){e=this.findEntry(e,t);return e?e[1]:n},forEach:function(e,t){return T(this.size),this.__iterate(t?e.bind(t):e)},join:function(t){T(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(r,o){T(this.size);var i=!1;return this.__iterate(function(e,t,n){if(r.call(o,e,t,n))return!(i=!0)}),i},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 F(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 Bn(this,e)},entrySeq:function(){var e,t=this;return t._cache?new ge(t._cache):((e=t.toSeq().map(ir).toIndexedSeq()).fromEntrySeq=function(){return t.toSeq()},e)},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,_)!==_},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,i=this;return e?this.cacheResult().__iterate(r,e):(o=0,n.__iterate(function(e,t,n){return s.call(c,e,t,n)&&++o&&r(e,t,i)}),o)},e.__iteratorUncached=function(r,e){var o,i,a=this;return e?this.cacheResult().__iterator(r,e):(o=n.__iterator(y,e),i=!0,new m(function(){var e,t,n;return i?(e=o.next()).done?e:(t=(n=e.value)[0],n=n[1],s.call(c,n,t,a)?r===y?e:v(r,t,n,e):(i=!1,E())):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=je((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 qe(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(j(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=B(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=B(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 m(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(j(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(j(arguments));return D(this,it(this,cr,e))},zipAll:function(){var e=[this].concat(j(arguments));return D(this,it(this,cr,e,!0))},zipWith:function(e){var t=j(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 T(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 j(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(me,nr);var fr,pr=function(e){function t(n){return null==n?yr():Fn(n)?n:yr().withMutations(function(t){var e=X(n);T(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}(Wn),dr=(pr.isOrderedSet=Fn,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(jn())}dr[re]=!0,dr.zip=tr.zip,dr.zipWith=tr.zipWith,dr.zipAll=tr.zipAll,dr.__empty=yr,dr.__make=hr;var mr={LeftThenRight:-1,RightThenLeft:1};var P=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 "+vr(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=mn().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(A);return l.constructor=u,s&&(u.displayName=s),u},A=(P.prototype.toString=function(){for(var e,t=vr(this)+" { ",n=this._keys,r=0,o=n.length;r!==o;r++)t+=(r?", ":"")+(e=n[r])+": "+yt(this.get(e));return t+" }"},P.prototype.equals=function(e){return this===e||ne(e)&&br(this).equals(br(e))},P.prototype.hashCode=function(){return br(this).hashCode()},P.prototype.has=function(e){return this._indices.hasOwnProperty(e)},P.prototype.get=function(e,t){var n;return this.has(e)?(n=this._indices[e],void 0===(n=this._values.get(n))?this._defaultValues[e]:n):t},P.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},P.prototype.remove=function(e){return this.set(e)},P.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:gr(this,e)},P.prototype.wasAltered=function(){return this._values.wasAltered()},P.prototype.toSeq=function(){return br(this)},P.prototype.toJS=function(){return Hn(this)},P.prototype.entries=function(){return this.__iterator(y)},P.prototype.__iterator=function(e,t){return br(this).__iterator(e,t)},P.prototype.__iterate=function(e,t){return br(this).__iterate(e,t)},P.prototype.__ensureOwner=function(e){var t;return e===this.__ownerID?this:(t=this._values.__ensureOwner(e),e?gr(this,t,e):(this.__ownerID=e,this._values=t,this))},P.isRecord=ne,P.getDescriptiveName=vr,P.prototype);function gr(e,t,n){e=Object.create(Object.getPrototypeOf(e));return e._values=t,e.__ownerID=n,e}function vr(e){return e.constructor.displayName||e.constructor.name||"Record"}function br(t){return Se(t._keys.map(function(e){return[e,t.get(e)]}))}A[te]=!0,A[t]=A.remove,A.deleteIn=A.removeIn=Ot,A.getIn=Jn,A.hasIn=n.hasIn,A.merge=jt,A.mergeWith=Tt,A.mergeIn=Bt,A.mergeDeep=zt,A.mergeDeepWith=Ft,A.mergeDeepIn=Kt,A.setIn=Et,A.update=kt,A.updateIn=Dt,A.withMutations=Ht,A.asMutable=Ut,A.asImmutable=Wt,A[se]=A.entries,A.toJSON=A.toObject=n.toObject,A.inspect=A.toSource=function(){return this.toString()};var wr,Sr=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(wr)return wr;wr=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,W(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 m(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):Bn(e)},r}(O);function _r(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||Er,e,"",t&&2<t.length?[]:void 0,{"":e})}function Er(e,t){return s(t)?t.toList():c(t)?t.toMap():t.toSet()}var Cr="4.3.2",Or=u;e.default={version:Cr,Collection:u,Iterable:u,Seq:C,Map:Yt,OrderedMap:N,List:mn,Stack:Pn,Set:Wn,OrderedSet:pr,PairSorting:mr,Record:P,Range:$n,Repeat:Sr,is:x,fromJS:_r,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:zn,isOrderedSet:Fn,isRecord:ne,get:gt,getIn:Zn,has:mt,hasIn:Xn,merge:Mt,mergeDeep:Pt,mergeWith:Nt,mergeDeepWith:At,remove:bt,removeIn:Ct,set:wt,setIn:_t,update:xt,updateIn:St}},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,i=this.getAnchorKey(),a=this.getFocusKey();return i===a&&i===e?(o=this.getStartOffset(),r=this.getEndOffset(),t<=o&&o<=n||t<=r&&r<=n):(e===i||e===a)&&t<=(o=e===i?this.getAnchorOffset():this.getFocusOffset())&&o<=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){var t;return(s[e]||(t=s[e]={i:e,l:!1,exports:{}},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),m=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:[]}}},g=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({})}]}},w=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({})}]}},S=function(e){return{text:"\r ",inlines:[new s.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new s.Map({})}]}},_=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:S(f)};if("#text"===s&&"\n"!==t.textContent)return m(t,n,i);if("br"===s)return{chunk:g()};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:S(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:S(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:S(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=w(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=_(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,m=d.Repeat,g=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(m(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:g(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){return t=t||r.NEUTRAL,!e.length||(e=u(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){var n,r,o;return t.isCollapsed()?(n=t.getAnchorKey(),!(0<(r=t.getAnchorOffset()))||(o=e.getBlockForKey(n).getEntityAt(r-1))!==e.getBlockForKey(n).getEntityAt(r)?null:i(e.getEntityMap(),o)):(n=t.getStartKey(),o=(r=t.getStartOffset())===(t=e.getBlockForKey(n)).getLength()?null:t.getEntityAt(r),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(218)),i=n(219),a=s(n(91)),n=s(n(229));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(230)},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,o=f(t);return null!=o||e&&(e===t||e.firstChild===t)||a(!1),0===(n=e===t&&(t=t.firstChild,s(t)||a(!1),"true"!==(t=t).getAttribute("data-contents")&&a(!1),0<n)?t.childNodes.length:n)?{key:null!=o?o:(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}:(e=t.childNodes[n-1],n=t=null,n=i(e)?(r=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(r)),c(r)):(t=d(o),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,s,c,u=n.nodeType===Node.TEXT_NODE,l=o.nodeType===Node.TEXT_NODE;return u&&l?{selectionState:p(e,d(f(n)),r,d(f(o)),i),needsRecovery:!1}:(c=!(s=a=null),u?(a={key:d(f(n)),offset:r},s=h(t,o,i)):l?(s={key:d(f(o)),offset:i},a=h(t,n,r)):(a=h(t,n,r),s=h(t,o,i),n===o&&r===i&&(c=!!n.firstChild&&"BR"!==n.firstChild.nodeName)),{selectionState:p(e,a.key,a.offset,s.key,s.offset),needsRecovery:c})}},function(e,t,n){"use strict";var d=n(15),h=n(10);e.exports=function(e,t,n,r,o){var i,a,s,c,u,l,f,p=h(e.getSelection());return!(t&&r&&(t=d.decode(t),i=t.blockKey,l=(l=e.getBlockTree(i))&&l.getIn([t.decoratorKey,"leaves",t.leafKey]),t=d.decode(r),a=t.blockKey,r=(r=e.getBlockTree(a))&&r.getIn([t.decoratorKey,"leaves",t.leafKey]),l)&&r&&(t=l.get("start"),s=r.get("start"),c=l?t+n:null,u=r?s+o:null,p.getAnchorKey()!==i||p.getAnchorOffset()!==c||p.getFocusKey()!==a||p.getFocusOffset()!==u))?p:(f=!1,f=i===a?(l=l.get("end"),r=r.get("end"),s===t&&r===l?o<n:s<t):e.getCurrentContent().getBlockMap().keySeq().skipUntil(function(e){return e===i||e===a}).first()===a,p.merge({anchorKey:i,anchorOffset:c,focusKey:a,focusOffset:u,isBackward:f}))}},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 g(){return(g=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),w=n(0),i=n(45),a=n(36),S=n(41),_=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,m=o(this.props.selection,d);return this.props.tree.map(function(e,o){var i,t,n,r,a,s,c,u,l=e.get("leaves");return 0===l.size?null:(i=l.size-1,t=l.map(function(e,t){var n=b.encode(d,o,t),r=e.get("start"),e=e.get("end");return w.createElement(v,{key:n,offsetKey:n,block:p,start:r,selection:m?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(),null!=(a=e.get("decoratorKey"))&&f.props.decorator&&(n=(r=E(f.props.decorator)).getComponentForKey(a))?(r=r.getPropsForKey(a),a=b.encode(d,o,0),s=l.first().get("start"),l=l.last().get("end"),u=h.slice(s,l),e=p.getEntityAt(e.get("start")),c=_.getHTMLDirIfDifferent(S.getDirection(u),f.props.direction),u={contentState:f.props.contentState,decoratedText:u,dir:c,start:s,end:l,blockKey:d,entityKey:e,offsetKey:a},w.createElement(n,g({},r,u,{key:a}),t)):t)}).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 w.createElement("div",{"data-offset-key":e,className:n,ref:function(e){return t._node=e}},this._renderChildren())},t}(w.Component);e.exports=n},function(e,t,n){"use strict";var o=n(147),r=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?r(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(){var e=this.types.some(function(e){return-1!=e.indexOf("application/x-moz-file")});if(!e)for(var t=this.getFiles(),n=0;n<t.length;n++){var r=t[n].type;if(!o.isImage(r))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,n=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");return n===e.getCurrentContent()?e:(t=e.getSelection(),r.push(e,n.set("selectionBefore",t),t.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),m=y.List,g=y.Map,v=y.OrderedSet,b=t(181),w=t(70),S=t(27),_=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"),j=new RegExp("​?","g"),T=["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"],P=(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),A=g({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",m()),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=m(),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:m(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=m(),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,c=this.wrapper,this.wrapper="pre"===l?"pre":this.wrapper,"string"!=typeof o&&(o=this.disambiguate(l,this.wrapper)||o[0]||"unstyled"),E||!S(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(P).some(function(e){t.classList.contains(e)&&(n=P[e])}),n}(u,this.currentDepth)),a=d(),s=this._toBlockConfigs(Array.from(u.childNodes),t),this._trimCurrentText(),n.push(this._makeBlockConfig({key:a,childConfigs:s,type:o})),this.currentDepth=i,this.wrapper=c):"#text"===l?this._addTextNode(u,t):"br"===l?this._addBreakNode(u,t):_(a=u)&&(a=a).attributes.getNamedItem("src")&&a.attributes.getNamedItem("src").value?this._addImgNode(u,t):!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){var n,r,o;return S(e)?(n=e.style.fontWeight,r=e.style.fontStyle,o=e.style.textDecoration,t.withMutations(function(e){0<=T.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"))})):t}(u,s=A.has(l)?s.add(A.get(l)):s),null!=(c=function(e){if(S(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)}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=m()):(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){w(e)&&this._appendText("\n",t)},t._addImgNode=function(e,t){var n,r;_(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=m(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 m(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=m(),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 r,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(j,""));return t?(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)})}),e=g(r),new L(e,function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null}).addDOMNode(t).getContentBlocks()):null}},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,n,r,o=e.getSelection();return o.isCollapsed()&&(t=e.getCurrentContent(),r=o.getStartKey(),n=t.getBlockForKey(r).getLength(),!(o.getStartOffset()<n))&&(n=t.getBlockAfter(r))&&"atomic"===n.getType()&&(r=o.merge({focusKey:n.getKey(),focusOffset:n.getLength()}),(o=c.removeRange(t,r,"forward"))!==t)?u.push(e,o,"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();return e.shiftKey||a!==n?(o=s(i,r,e.shiftKey?-1:1,n),u.push(t,o,"adjust-depth")):t},toggleBlockType:function(e,t){var n,r=e.getSelection(),o=r.getStartKey(),i=r.getEndKey(),a=e.getCurrentContent(),s=r;return 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()})?e:(r=a.getBlockForKey(o).getType()===t?"unstyled":t,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,r=e.getSelection(),o=e.getCurrentInlineStyle();return r.isCollapsed()?u.setInlineStyleOverride(e,o.has(t)?o.remove(t):o.add(t)):(n=e.getCurrentContent(),o=o.has(t)?c.removeInlineStyle(n,r,t):c.applyInlineStyle(n,r,t),u.push(e,o,"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(216));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,m,g,v,o,i,r,a,s,c,u,b,w;/*! https://mths.be/punycode v1.4.1 by @mathias */function S(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 _(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+=w((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=w(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+=g)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)&&S("not-basic"),c.push(e.charCodeAt(n));for(r=0<d?d+1:0;r<u;){for(o=l,i=1,a=g;u<=r&&S("invalid-input"),s=e.charCodeAt(r++),(g<=(s=s-48<10?s-22:s-65<26?s-65:s-97<26?s-97:g)||s>b((m-l)/i))&&S("overflow"),l+=s*i,!(s<(s=a<=p?1:p+v<=a?v:a-p));a+=g)i>b(m/(s=g-s))&&S("overflow"),i*=s;p=C(l-o,t=c.length+1,0==o),b(l/t)>m-f&&S("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=_(e)).length,d=128,h=72,y=t=0;y<p;++y)(s=e[y])<128&&f.push(w(s));for(n=r=f.length,r&&f.push("-");n<p;){for(o=m,y=0;y<p;++y)d<=(s=e[y])&&s<o&&(o=s);for(o-d>b((m-t)/(c=n+1))&&S("overflow"),t+=(o-d)*c,d=o,y=0;y<p;++y)if((s=e[y])<d&&++t>m&&S("overflow"),s==d){for(i=t,a=g;!(i<(u=a<=h?1:h+v<=a?v:a-h));a+=g)f.push(w(E(u+(l=i-u)%(u=g-u),0))),i=b(l/u);f.push(w(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,m=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=(g=36)-1,b=Math.floor,w=String.fromCharCode,n={version:"1.4.1",ucs2:{decode:_,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(215)(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 m(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 g(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 w(e){var t=e.styles,n=e.text;var r=s(n);o(t,function(e,t){r=a(e,r)});return r}function S(e,t){var n=g(e,["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"],t.start,t.end);var r="";n.forEach(function(e){r+=w(e)});r=y(t.styles,r);return r}function _(t,e,n,r){var o=[];var i=g(t,["COLOR","BGCOLOR","FONTSIZE","FONTFAMILY"],n.start,n.end);i.forEach(function(e){o.push(S(t,e))});var a=o.join("");if(n.type==="ENTITY"){if(n.entityKey!==undefined&&n.entityKey!==null)a=m(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=_(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(m(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,n,r=o.__schemas__[e];null!==r&&(o.__compiled__[e]=t={validate:null,link:null},"[object Object]"===s(r)?("[object RegExp]"===s(r.validate)?t.validate=(n=r.validate,function(e,t){e=e.slice(t);return n.test(e)?e.match(n)[0].length:0}):c(r.validate)?t.validate=r.validate:a(e,r),c(r.normalize)?t.normalize=r.normalize:r.normalize?a(e,r):t.normalize=p()):"[object String]"===s(r)?i.push(e):a(e,r))}),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(),d(this)):(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(232)},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,m=p.List,g=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:m(g(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 d(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,c=r.getStartOffset(),u=r.getEndOffset(),c=t.getEntityAt(c),u=n.getEntityAt(u-1);return c||u?(i=r,c&&c===u?i=d(e,t,i,o,c,!0,!0):c&&u?(a=d(e,t,i,o,c,!1,!0),s=d(e,n,i,o,u,!1,!1),i=i.merge({anchorOffset:a.getAnchorOffset(),focusOffset:s.getFocusOffset(),isBackward:!1})):c?(a=d(e,t,i,o,c,!1,!0),i=i.merge({anchorOffset:a.getStartOffset(),isBackward:!1})):u&&(s=d(e,n,i,o,u,!1,!1),i=i.merge({focusOffset:s.getEndOffset(),isBackward:!1})),i):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),m=n(13),r=n(6),g=n(53),v=n(7),b=n(51),l=r.List,w=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()})},S=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()})},_=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 m&&(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:g(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 m,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):(a.push(c?e:w(e,i,r)),r.slice(c?0:1,s-1).forEach(function(e){return a.push(e)}),a.push(S(e,i,r)))}),u=y.createFromArray(a),t&&(u=_(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,i,a,s,c,u=null;return null==(u=null!=n?n.length:u)||0===u?e:(o=e.getBlockMap(),i=t.getStartKey(),a=t.getStartOffset(),c=(s=o.get(i)).getText(),n=s.merge({text:c.slice(0,a)+n+c.slice(a,s.getLength()),characterList:l(s.getCharacterList(),p(r,u).toList(),a)}),c=a+u,e.merge({blockMap:o.set(i,n),selectionAfter:t.merge({anchorOffset:c,focusOffset:c})}))}},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),w=n(55),n=n(6),S=(n.List,n.Map),_=function(e,t,n){var r;e&&(r=t.get(e))&&t.set(e,n(r))},E=function(e,t){var n=[];if(e)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)for(var r=w(e,t);r&&t.get(r);){var o=t.get(r);n.push(r),r=o.getParentKey()?w(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){var n,r,o,i,a,s,c,u,l,f,p,d,h,y,m,g;return t.isCollapsed()?e:(n=e.getBlockMap(),r=t.getStartKey(),o=t.getStartOffset(),i=t.getEndKey(),a=t.getEndOffset(),s=n.get(r),c=n.get(i),u=s instanceof b,l=[],u&&(d=c.getChildKeys(),p=E(i,n),c.getNextSiblingKey()&&(l=l.concat(p)),l=(l=d.isEmpty()?l:l.concat(p.concat([i]))).concat(E(w(c,n),n))),d=s===c?v(s.getCharacterList(),o,a):s.getCharacterList().slice(0,o).concat(c.getCharacterList().slice(a)),f=s.merge({text:s.getText().slice(0,o)+c.getText().slice(a),characterList:d}),p=u&&0===o&&0===a&&c.getParentKey()===r&&null==c.getPrevSiblingKey()?S([[r,null]]):n.toSeq().skipUntil(function(e,t){return t===r}).takeUntil(function(e,t){return t===i}).filter(function(e,t){return-1===l.indexOf(t)}).concat(S([[i,null]])).map(function(e,t){return t===r?f:null}),d=n.merge(p).filter(function(e){return!!e}),u&&s!==c&&(y=s,m=c,g=n,d=(h=d).withMutations(function(t){var n,e,r,o;_(y.getKey(),t,function(e){return e.merge({nextSibling:O(e,t,g),prevSibling:x(e,t,g)})}),_(m.getKey(),t,function(e){return e.merge({nextSibling:O(e,t,g),prevSibling:x(e,t,g)})}),E(y.getKey(),g).forEach(function(e){return _(e,t,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return t.get(e)}),nextSibling:O(e,t,g),prevSibling:x(e,t,g)})})}),_(y.getNextSiblingKey(),t,function(e){return e.merge({prevSibling:y.getPrevSiblingKey()})}),_(y.getPrevSiblingKey(),t,function(e){return e.merge({nextSibling:O(e,t,g)})}),_(m.getNextSiblingKey(),t,function(e){return e.merge({prevSibling:x(e,t,g)})}),_(m.getPrevSiblingKey(),t,function(e){return e.merge({nextSibling:m.getNextSiblingKey()})}),E(m.getKey(),g).forEach(function(e){_(e,t,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return t.get(e)}),nextSibling:O(e,t,g),prevSibling:x(e,t,g)})})}),C(m,g).forEach(function(e){return _(e,t,function(e){return e.merge({nextSibling:O(e,t,g),prevSibling:x(e,t,g)})})}),null==h.get(y.getKey())&&null!=h.get(m.getKey())&&m.getParentKey()===y.getKey()&&null==m.getPrevSiblingKey()&&(n=y.getPrevSiblingKey(),_(m.getKey(),t,function(e){return e.merge({prevSibling:n})}),_(n,t,function(e){return e.merge({nextSibling:m.getKey()})}),e=n?h.get(n):null,r=e?e.getParentKey():null,y.getChildKeys().forEach(function(e){_(e,t,function(e){return e.merge({parent:r})})}),null!=r&&(o=h.get(r),_(r,t,function(e){return e.merge({children:o.getChildKeys().concat(y.getChildKeys())})})),_(y.getChildKeys().find(function(e){return null===h.get(e).getNextSiblingKey()}),t,function(e){return e.merge({nextSibling:y.getNextSiblingKey()})}))})),e.merge({blockMap:d,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),m=n(54),g=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 m(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:g(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 o,i,a,r=t.getLength();return r?(o=[],i=n?n.getDecorations(t,e):u(l(null,r)),a=t.getCharacterList(),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)):u.of(new p({start:0,end:0,decoratorKey:null,leaves:u.of(new f({start:0,end:0}))}))},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 _=n(13),E=n(55),r=n(6),C=n(7),O=r.OrderedMap,x=r.List,k=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&&C(!1);var o,i,a,s,c,u,l,f,p,d,h=t.getKey(),y=n.getKey(),m=(y===h&&C(!1),e.getBlockMap()),g=n instanceof _,v=[n],b=m.delete(y),m=(g&&(v=[],b=m.withMutations(function(t){var o=n.getNextSiblingKey(),i=E(n,t);t.toSeq().skipUntil(function(e){return e.getKey()===y}).takeWhile(function(e){var t=e.getKey(),n=t===y,r=o&&t!==o,e=!o&&e.getParentKey()&&(!i||t!==i);return!!(n||r||e)}).forEach(function(e){v.push(e),t.delete(e.getKey())})})),b.toSeq().takeUntil(function(e){return e===t})),b=b.toSeq().skipUntil(function(e){return e===t}).skip(1),w=v.map(function(e){return[e.getKey(),e]}),S=O();return"before"===r?((o=e.getBlockBefore(h))&&o.getKey()===n.getKey()&&C(!1),S=m.concat([].concat(w,[[h,t]]),b).toOrderedMap()):"after"===r&&((o=e.getBlockAfter(h))&&o.getKey()===y&&C(!1),S=m.concat([[h,t]].concat(w),b).toOrderedMap()),e.merge({blockMap:(o=S,m=n,h=t,w=r,g?(i="after"===w,a=m.getKey(),s=h.getKey(),c=m.getParentKey(),u=m.getNextSiblingKey(),l=m.getPrevSiblingKey(),f=h.getParentKey(),p=i?h.getNextSiblingKey():s,d=i?s:h.getPrevSiblingKey(),o.withMutations(function(e){k(c,e,function(e){var t=e.getChildKeys();return e.merge({children:t.delete(t.indexOf(a))})}),k(l,e,function(e){return e.merge({nextSibling:u})}),k(u,e,function(e){return e.merge({prevSibling:l})}),k(p,e,function(e){return e.merge({prevSibling:a})}),k(d,e,function(e){return e.merge({nextSibling:a})}),k(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:x(t)})}),k(a,e,function(e){return e.merge({nextSibling:p,prevSibling:d,parent:f})})})):o),selectionBefore:e.getSelectionAfter(),selectionAfter:e.getSelectionAfter().merge({anchorKey:y,focusKey:y})})}},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(P,e,A){"use strict";!function(r){var e=A(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=A(42),h=A(59),n=A(121),y=A(129),s=A(146),c=A(149),u=A(185),l=A(186),f=A(71),m=A(8),g=A(0),v=A(45),b=A(36),w=A(11),S=A(19),_=A(14),E=A(87),C=A(37),O=A(16),x=A(7),k=A(27),D=A(10),j=w.isBrowser("IE"),T=!j,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}(g.Component),w=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(m.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||_(),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},g.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=S({"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 g.createElement("div",{className:u},this._renderPlaceholder(),g.createElement("div",{className:S("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},g.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:S({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:T&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},g.createElement(N,{editor:this,editorState:a}),g.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"),j&&(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}(g.Component);i(w,"defaultProps",{ariaDescribedBy:"{{editor_id_placeholder}}",blockRenderMap:t,blockRendererFn:function(){return null},blockStyleFn:function(){return""},keyBindingFn:E,readOnly:!1,spellCheck:!1,stripPastedStyles:!1}),P.exports=w}.call(this,A(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,m=!1,g=null;var v={onCompositionStart:function(e){m=!0,e=e,g||(g=new r(l(e))).start()},onCompositionEnd:function(e){m=y=!1,setTimeout(function(){y||v.resolveComposition(e)},20)},onSelect:a,onKeyDown:function(e,t){m?t.which!==o.RIGHT&&t.which!==o.LEFT||t.preventDefault():(v.resolveComposition(e),e._onKeyDown(t))},onKeyPress:function(e,t){t.which===o.RETURN&&t.preventDefault()},resolveComposition:function(e){var i,a,t;m||(t=d(g).stopAndFlushMutations(),y=!(g=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(U,W,q){var V;!function(s,f){"use strict";function e(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}function R(e,t){return typeof e===m&&-1!==P(t).indexOf(P(e))}function c(e,t){if(typeof e===m)return e=e.replace(/^\s\s*/,p),typeof t==h?e:e.substring(0,350)}function u(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&&c[l];)if(i=c[l++].exec(e))for(r=0;r<u.length;r++)a=i[++n],typeof(o=u[r])===y&&0<o.length?2===o.length?typeof o[1]==d?this[o[0]]=o[1].call(this,a):this[o[0]]=o[1]:3===o.length?typeof o[1]!==d||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]===y&&0<t[n].length){for(var r=0;r<t[n].length;r++)if(R(t[n][r],e))return"?"===n?f:n}else if(R(t[n],e))return"?"===n?f:n;return e}function l(e,t){var n,r,o,i,a;return typeof e===y&&(t=e,e=f),this instanceof l?(n=typeof s!=h&&s.navigator?s.navigator:f,r=e||(n&&n.userAgent?n.userAgent:p),o=n&&n.userAgentData?n.userAgentData:f,i=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}(H,t):H,a=n&&n.userAgent==r,this.getBrowser=function(){var e,t={};return t.name=f,t[b]=f,u.call(t,r,i.browser),t.major=typeof(e=t[b])===m?e.replace(/[^\d\.]/g,p).split(".")[0]:f,a&&n&&n.brave&&typeof n.brave.isBrave==d&&(t.name="Brave"),t},this.getCPU=function(){var e={};return e[w]=f,u.call(e,r,i.cpu),e},this.getDevice=function(){var e={};return e[v]=f,e[g]=f,e.type=f,u.call(e,r,i.device),a&&!e.type&&o&&o.mobile&&(e.type=S),a&&"Macintosh"==e[g]&&n&&typeof n.standalone!=h&&n.maxTouchPoints&&2<n.maxTouchPoints&&(e[g]="iPad",e.type=_),e},this.getEngine=function(){var e={};return e.name=f,e[b]=f,u.call(e,r,i.engine),e},this.getOS=function(){var e={};return e.name=f,e[b]=f,u.call(e,r,i.os),a&&!e.name&&o&&"Unknown"!=o.platform&&(e.name=o.platform.replace(/chrome os/i,B).replace(/macos/i,"Mac 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 r},this.setUA=function(e){return r=typeof e===m&&350<e.length?c(e,350):e,this},this.setUA(r),this):new l(e,t).getResult()}var r,p="",d="function",h="undefined",y="object",m="string",g="model",n="name",o="type",v="vendor",b="version",w="architecture",i="console",S="mobile",_="tablet",a="smarttv",E="wearable",C="embedded",O="Amazon",x="Apple",L="BlackBerry",k="Browser",D="Chrome",j="Firefox",T="Google",I="Microsoft",M="Opera",z="Samsung",N="Sony",F="Xiaomi",B="Chromium OS",P=function(e){return e.toLowerCase()},K={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"},H={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[n,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[n,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[n,b],[/opios[\/ ]+([\w\.]+)/i],[b,[n,M+" Mini"]],[/\bopr\/([\w\.]+)/i],[b,[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|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[n,b],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[n,"UC"+k]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[b,[n,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[b,[n,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[n,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[n,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[b,[n,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[n,/(.+)/,"$1 Secure "+k],b],[/\bfocus\/([\w\.]+)/i],[b,[n,j+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[n,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[n,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[n,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[n,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[n,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[b,[n,j]],[/\bqihu|(qi?ho?o?|360)browser/i],[[n,"360 "+k]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[n,/(.+)/,"$1 "+k],b],[/(comodo_dragon)\/([\w\.]+)/i],[[n,/_/g," "],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[n,b],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[n],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[n,"Facebook"],b],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[n,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[n,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[b,[n,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[n,D+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[n,D+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[n,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[n,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[n,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,n],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[n,[b,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,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[n,"Netscape"],b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[n,j+" 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,/panasonic;(viera)/i],[n,b],[/(cobalt)\/([\w\.]+)/i],[n,[b,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[w,"amd64"]],[/(ia32(?=;))/i],[[w,P]],[/((?:i[346]|x)86)[;\)]/i],[[w,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[w,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[w,"armhf"]],[/windows (ce|mobile); ppc;/i],[[w,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[w,/ower/,p,P]],[/(sun4\w)[;\)]/i],[[w,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[w,P]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[g,[v,z],[o,_]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[g,[v,z],[o,S]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[g,[v,x],[o,S]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[g,[v,x],[o,_]],[/(macintosh);/i],[g,[v,x]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[v,"Sharp"],[o,S]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[g,[v,"Huawei"],[o,_]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[v,"Huawei"],[o,S]],[/\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|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[g,/_/g," "],[v,F],[o,S]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[g,/_/g," "],[v,F],[o,_]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[g,[v,"OPPO"],[o,S]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[g,[v,"Vivo"],[o,S]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[g,[v,"Realme"],[o,S]],[/\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],[g,[v,"Motorola"],[o,S]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[v,"Motorola"],[o,_]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[v,"LG"],[o,_]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[v,"LG"],[o,S]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[g,[v,"Lenovo"],[o,_]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[g,/_/g," "],[v,"Nokia"],[o,S]],[/(pixel c)\b/i],[g,[v,T],[o,_]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[v,T],[o,S]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[g,[v,N],[o,S]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[v,N],[o,_]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[g,[v,"OnePlus"],[o,S]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[g,[v,O],[o,_]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[v,O],[o,S]],[/(playbook);[-\w\),; ]+(rim)/i],[g,v,[o,_]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[v,L],[o,S]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[v,"ASUS"],[o,_]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[v,"ASUS"],[o,S]],[/(nexus 9)/i],[g,[v,"HTC"],[o,_]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[g,/_/g," "],[o,S]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[g,[v,"Acer"],[o,_]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[g,[v,"Meizu"],[o,S]],[/(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],[v,g,[o,S]],[/(kobo)\s(ereader|touch)/i,/(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],[v,g,[o,_]],[/(surface duo)/i],[g,[v,I],[o,_]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[g,[v,"Fairphone"],[o,S]],[/(u304aa)/i],[g,[v,"AT&T"],[o,S]],[/\bsie-(\w*)/i],[g,[v,"Siemens"],[o,S]],[/\b(rct\w+) b/i],[g,[v,"RCA"],[o,_]],[/\b(venue[\d ]{2,7}) b/i],[g,[v,"Dell"],[o,_]],[/\b(q(?:mv|ta)\w+) b/i],[g,[v,"Verizon"],[o,_]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[g,[v,"Barnes & Noble"],[o,_]],[/\b(tm\d{3}\w+) b/i],[g,[v,"NuVision"],[o,_]],[/\b(k88) b/i],[g,[v,"ZTE"],[o,_]],[/\b(nx\d{3}j) b/i],[g,[v,"ZTE"],[o,S]],[/\b(gen\d{3}) b.+49h/i],[g,[v,"Swiss"],[o,S]],[/\b(zur\d{3}) b/i],[g,[v,"Swiss"],[o,_]],[/\b((zeki)?tb.*\b) b/i],[g,[v,"Zeki"],[o,_]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[v,"Dragon Touch"],g,[o,_]],[/\b(ns-?\w{0,9}) b/i],[g,[v,"Insignia"],[o,_]],[/\b((nxa|next)-?\w{0,9}) b/i],[g,[v,"NextBook"],[o,_]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[v,"Voice"],g,[o,S]],[/\b(lvtel\-)?(v1[12]) b/i],[[v,"LvTel"],g,[o,S]],[/\b(ph-1) /i],[g,[v,"Essential"],[o,S]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[g,[v,"Envizen"],[o,_]],[/\b(trio[-\w\. ]+) b/i],[g,[v,"MachSpeed"],[o,_]],[/\btu_(1491) b/i],[g,[v,"Rotor"],[o,_]],[/(shield[\w ]+) b/i],[g,[v,"Nvidia"],[o,_]],[/(sprint) (\w+)/i],[v,g,[o,S]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[v,I],[o,S]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[v,"Zebra"],[o,_]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[v,"Zebra"],[o,S]],[/smart-tv.+(samsung)/i],[v,[o,a]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[v,z],[o,a]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,"LG"],[o,a]],[/(apple) ?tv/i],[v,[g,x+" TV"],[o,a]],[/crkey/i],[[g,D+"cast"],[v,T],[o,a]],[/droid.+aft(\w)( bui|\))/i],[g,[v,O],[o,a]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[v,"Sharp"],[o,a]],[/(bravia[\w ]+)( bui|\))/i],[g,[v,N],[o,a]],[/(mitv-\w{5}) bui/i],[g,[v,F],[o,a]],[/Hbbtv.*(technisat) (.*);/i],[v,g,[o,a]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,c],[g,c],[o,a]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[o,a]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[v,g,[o,i]],[/droid.+; (shield) bui/i],[g,[v,"Nvidia"],[o,i]],[/(playstation [345portablevi]+)/i],[g,[v,N],[o,i]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[v,I],[o,i]],[/((pebble))app/i],[v,g,[o,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[g,[v,x],[o,E]],[/droid.+; (glass) \d/i],[g,[v,T],[o,E]],[/droid.+; (wt63?0{2,3})\)/i],[g,[v,"Zebra"],[o,E]],[/(quest( 2| pro)?)/i],[g,[v,"Facebook"],[o,E]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[o,C]],[/(aeobc)\b/i],[g,[v,O],[o,C]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[g,[o,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[g,[o,_]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[o,_]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[o,S]],[/(android[-\w\. ]{0,9});.+buil/i],[g,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[n,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[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,/\b(libweb)/i],[n,b],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,n]],os:[[/microsoft (windows) (vista|xp)/i],[n,b],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[n,[b,t,K]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[n,"Windows"],[b,t,K]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[n,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[n,"Mac OS"],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,n],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[n,b],[/\(bb(10);/i],[b,[n,L]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[b,[n,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[n,j+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[n,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[b,[n,"watchOS"]],[/crkey\/([\d\.]+)/i],[b,[n,D+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[n,B],b],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(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,b],[/(sunos) ?([\w\.\d]*)/i],[[n,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[n,b]]},A=(l.VERSION="0.7.35",l.BROWSER=e([n,b,"major"]),l.CPU=e([w]),l.DEVICE=e([g,v,o,i,S,a,_,E,C]),l.ENGINE=l.OS=e([n,b]),typeof W!=h?(W=typeof U!=h&&U.exports?U.exports=l:W).UAParser=l:"function"===d&&q(125)?(V=function(){return l}.call(W,q,W,U))!==f&&(U.exports=V):typeof s!=h&&(s.UAParser=l),typeof s!=h&&(s.jQuery||s.Zepto));A&&!A.ua&&(r=new l,A.ua=r.getResult(),A.ua.get=function(){return r.getUA()},A.ua.set=function(e){r.setUA(e);var t,n=r.getResult();for(t in n)A.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 m(e,t){for(var n=e.length;n<t;n++)e[n]="0"}function g(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){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?g(c,o):g(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,n,r,o,i,a=this.props.editorState,e=e.editorState;return a.getDirectionMap()!==e.getDirectionMap()||a.getSelection().getHasFocus()!==e.getSelection().getHasFocus()||(r=e.getNativelyRenderedContent(),t=a.isInCompositionMode(),n=e.isInCompositionMode(),!(a===e||null!==r&&e.getCurrentContent()===r||t&&n)&&(r=a.getCurrentContent(),o=e.getCurrentContent(),a=a.getDecorator(),i=e.getDecorator(),t!==n||r!==o||a!==i||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 m=y.getKey(),g={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(m),tree:a.getBlockTree(m)},v=(t.get(y.getType())||t.get("unstyled")).wrapper,g=(h.push({block:k.createElement(O,C({key:m},g)),wrapperTemplate:v,key:m,offsetKey:x.encode(m,0,0)}),y.getNextSiblingKey()),y=g?u.getBlockForKey(g):null;for(var b=[],w=0;w<h.length;){var S=h[w];if(S.wrapperTemplate){for(var _=[];_.push(h[w].block),++w<h.length&&h[w].wrapperTemplate===S.wrapperTemplate;);var E=k.cloneElement(S.wrapperTemplate,{key:S.key+"-wrap","data-offset-key":S.offsetKey},_);b.push(E)}else b.push(S.block),w++}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),j=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 _(){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",j.createRef()),e}e=o,(t=_).prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e;var t=_.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,m=e.blockRenderMap,g=e.blockRendererFn,v=e.blockStyleFn,b=e.contentState,n=e.decorator,w=e.editorKey,S=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,g),i=o.CustomComponent||_,a=C(r,m),s=a.Element,a=a.wrapperTemplate,c=x(r,w,n,v,o,null),t=E({},y.props,{tree:S.getBlockTree(t),blockProps:o.customProps,offsetKey:n,block:r});if(e.push(j.createElement(s,c,j.createElement(i,t))),a&&(o=b,!(c=(n=r).getNextSiblingKey())||o.getBlockForKey(c).getType()!==n.getType())){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}}t.splice(t.indexOf(l[0]),l.length+1),r=l.reverse(),o=r[0].key,t.push(j.cloneElement(i,{key:"".concat(o,"-wrap"),"data-offset-key":D.encode(o,0,0)},r))}return e},[])),t.getKey()),l=D.encode(u,0,0),f=O(t,g),p=f.CustomComponent,p=null!=p?j.createElement(p,d({},this.props,{tree:S.getBlockTree(u),blockProps:f.customProps,offsetKey:l,block:t})):j.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});return t.getParentKey()?p:(c=C(t,m).Element,r=x(t,w,l,v,f,this.wrapperRef),j.createElement(c,r,p))},_}(j.Component));e.exports=n},function(e,t,n){"use strict";var g=n(133),v=n(69),b=n(15),r=n(6),w=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(),m=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 w.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===m&&t===a})}).toArray();return i&&r?w.createElement(g,{block:s,children:t,contentState:n,decorator:r,decoratorKey:i,direction:l,leafSet:e,text:y,key:o}):t}).toArray();return w.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}(w.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){return e?(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)).nodeType===Node.TEXT_NODE?e.textContent:(a(e)||o(!1),e.outerHTML):"[empty]"}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 m(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,a,s,c,u,l,f,p=h(t);d(p.documentElement,t)&&(p=p.defaultView.getSelection(),f=e.getAnchorKey(),i=e.getAnchorOffset(),l=e.getFocusKey(),a=e.getFocusOffset(),s=e.getIsBackward(),!p.extend&&s&&(u=f,c=i,f=l,i=a,l=u,a=c,s=!1),u=l===n&&r<=a&&a<=o,(c=f===n&&r<=i&&i<=o)&&u?(p.removeAllRanges(),m(p,t,i-r,e),y(p,t,a-r,e)):s?(u&&(p.removeAllRanges(),m(p,t,a-r,e)),c&&(l=p.focusNode,f=p.focusOffset,p.removeAllRanges(),m(p,t,i-r,e),y(p,l,f,e))):(c&&(p.removeAllRanges(),m(p,t,i-r,e)),u&&y(p,t,a-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 z(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 F=n(75),B=n(15),K=n(0),H=n(19),U=n(145),W=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,n,r,o,i,a=this.props.editorState,e=e.editorState;return a.getDirectionMap()!==e.getDirectionMap()||a.getSelection().getHasFocus()!==e.getSelection().getHasFocus()||(r=e.getNativelyRenderedContent(),t=a.isInCompositionMode(),n=e.isInCompositionMode(),!(a===e||null!==r&&e.getCurrentContent()===r||t&&n)&&(r=a.getCurrentContent(),o=e.getCurrentContent(),a=a.getDecorator(),i=e.getDecorator(),t!==n||r!==o||a!==i||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=W(a.getDirectionMap()),y=l.getBlocksAsArray(),m=[],g=null,v=null,b=0;b<y.length;b++){var w=y[b],S=w.getKey(),_=w.getType(),E=n(w),C=void 0,O=void 0,x=void 0,E=(E&&(C=E.component,O=E.props,x=E.editable),u||h.get(S)),k=B.encode(S,0,0),O={contentState:l,block:w,blockProps:O,blockStyleFn:r,customStyleMap:o,customStyleFn:i,decorator:d,direction:E,forceSelection:p,offsetKey:k,preventScroll:c,selection:f,tree:a.getBlockTree(S)},D=t.get(_)||t.get("unstyled"),j=D.wrapper,D=D.element||t.get("unstyled").element,T=w.getDepth(),I="",_=(r&&(I=r(w)),"li"===D&&(I=U(I,H({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===_,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===_,"public/DraftStyleDefault/reset":v!==j||null===g||g<T,"public/DraftStyleDefault/depth0":0===T,"public/DraftStyleDefault/depth1":1===T,"public/DraftStyleDefault/depth2":2===T,"public/DraftStyleDefault/depth3":3===T,"public/DraftStyleDefault/depth4":4<=T,"public/DraftStyleDefault/listLTR":"LTR"===E,"public/DraftStyleDefault/listRTL":"RTL"===E}))),C||F),T={className:I,"data-block":!0,"data-editor":s,"data-offset-key":k,key:S},E=(void 0!==x&&(T=z({},T,{contentEditable:x,suppressContentEditableWarning:!0})),K.createElement(D,T,K.createElement(_,L({},O,{key:S}))));m.push({block:E,wrapperTemplate:j,key:S,offsetKey:k}),g=j?w.getDepth():null,v=j}for(var M=[],N=0;N<m.length;){var P=m[N];if(P.wrapperTemplate){for(var A=[];A.push(m[N].block),++N<m.length&&m[N].wrapperTemplate===P.wrapperTemplate;);var R=K.cloneElement(P.wrapperTemplate,{key:P.key+"-wrap","data-offset-key":P.offsetKey},A);M.push(R)}else M.push(P.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),m="'",g="/",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 u,n,r,o,i,a,s=e._latestEditorState,l=t.data;l&&(e.props.handleBeforeInput&&p(e.props.handleBeforeInput(l,s,t.timeStamp))?t.preventDefault():(r=s.getSelection(),u=r.getStartOffset(),n=r.getAnchorKey(),r.isCollapsed()?(r=b(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=v&&(a==m||a==g)),(i=i||h(r.getDirectionMap()).get(n)!==h(s.getDirectionMap()).get(n))?(t.preventDefault(),r=c.set(r,{forceSelection:!0}),e.update(r)):(r=c.set(r,{nativelyRenderedContent:r.getCurrentContent()}),e._pendingStateFromBeforeInput=r,y(function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)}))):(t.preventDefault(),e.update(b(s,l,s.getCurrentInlineStyle(),f(s.getCurrentContent(),s.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&&"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 w=n(9),S=n(15),_=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=S.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,m,g,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=w.replaceText(p,t,i,l.getInlineStyleAt(u),f?l.getEntityAt(u):null),l=(g=k?(m=n.anchorOffset,g=n.focusOffset,y=(h=u+Math.min(m,g))+Math.abs(m-g),m=h,y):(f=i.length-d.length,h=v.getStartOffset(),y=v.getEndOffset(),m=o?y+f:h,y+f),t.merge({selectionBefore:p.getSelectionAfter(),selectionAfter:v.merge({anchorOffset:m,focusOffset:g})}));e.update(_.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),m=n(174),g=n(80),v=n(175),b=n(176),w=n(177),S=r.isOptionKeyCommand,_=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(n)&&n.preventDefault()}var i=t.props.keyBindingFn(n);null==i||""===i?e===c.SPACE&&_&&S(n)&&(e=a.replaceText(r.getCurrentContent(),r.getSelection()," "),t.update(s.push(r,e,"insert-characters"))):"undo"===i?w(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 g(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 m(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){var t;return l?(t=a.replaceWithFragment(e.getCurrentContent(),e.getSelection(),l),s.push(e,t,"insert-fragment")):e}}},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();return t.isCollapsed()&&0===t.getAnchorOffset()?a(e,1):(t=n.currentTarget.ownerDocument.defaultView.getSelection().getRangeAt(0),t=o(t),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();return 0===n?i(e,1):(t=t.getStartKey(),t=e.getCurrentContent().getBlockForKey(t).getText().slice(0,n),n=r.getBackward(t),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,n=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");return n===e.getCurrentContent()?e:(t=e.getSelection(),r.push(e,n.set("selectionBefore",t),t.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){var t,n,r,o,i=e.getSelection();return!i.isCollapsed()||0===(o=i.getAnchorOffset())||(t=i.getAnchorKey(),(t=(n=e.getCurrentContent()).getBlockForKey(t).getLength())<=1)?e:(t=o===t?(r=i.set("anchorOffset",o-1),i):(r=i.set("focusOffset",o+1)).set("anchorOffset",o+1),i=c(n,r),r=(n=(o=a.removeRange(n,r,"backward")).getSelectionAfter()).getAnchorOffset()-1,n=n.merge({anchorOffset:r,focusOffset:r}),r=a.replaceWithFragment(o,n,i),o=s.push(e,r,"insert-fragment"),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);"spellcheck-change"===t.getLastChangeType()?(r=o.getCurrentContent(),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),m=n(86),g=n(43),v=n(78),b=n(38),w=n(184);function S(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=w(e),n=f.create({style:t.getCurrentInlineStyle(),entity:g(t.getCurrentContent(),t.getSelection())}),r=m.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=w(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(S(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(S(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(S(o._latestEditorState,a,u))}}o.setClipboard(null)}t.length&&(r=f.create({style:s.getCurrentInlineStyle(),entity:g(s.getCurrentContent(),s.getSelection())}),e=m.getCurrentBlockType(s),a=h.processText(t,r,e),u=l.createFromArray(a),o.update(S(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||g(),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||g()})}function y(e,t,n){return t=t.map(function(e){return p({},e,{parentRef:n})}),e.concat(t.reverse())}var r=n(18),m=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),g=n(14),v=n(16),b=n(6),w=n(7),S=v("draft_tree_data_support"),_=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)||w(!1);for(var r=t.children.map(h),t=new m(p({},d(t,f),{prevSibling:0===n?null:l[n-1].key,nextSibling:n===l.length-1?null:l[n+1].key,children:_(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){w(!1);break}u=i.children.map(h),i=new m(p({},d(i,f),{parent:a.getKey(),children:_(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)||w(!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=(S&&!a?u.fromRawStateToRawTreeState(e):e).blocks,S?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){var t,n,r,o;return!(e=e.getSelection()).rangeCount||(e=e.getRangeAt(0),t=(e=i(e)).top,n=e.right,r=e.bottom,o=e.left,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):(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")).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,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(217),i=(n=n)&&n.__esModule?n:{default:n};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,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],o=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return!r||r.length<1?"string"==typeof e&&"string"==typeof this.getCurrentContent()?this.addToCurrentContent(e):this.content.push(e):o?this.handleFlatPush(e,r):(r=r,t=(r=Array.isArray(r)?r:Array.from(r))[0],r=r.slice(1),(n=this.getCurrentContent())instanceof a&&n.style===t?n.pushContent(e,r,o):((n=new a({style:t})).pushContent(e,r,o),this.content.push(n))),this}}]);n=a;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||{}}t.default=n},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 g=r(n(89)),s=r(n(220)),v=r(n(221)),b=r(n(222)),w=r(n(223)),f=r(n(224)),S=r(n(225)),c=r(n(226));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;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({},S.default,6<arguments.length&&void 0!==arguments[6]?arguments[6]:{}),u=[],l=[],f=null,p=0,d=[],h=[],y=!1,m=new g.default({flat:!!a});return e.forEach(function(e){var t,n;(0,v.default)(e,f,c)?!0===c.cleanup.split&&(y=!0):(t=m.parse(e),t=C(t,r,i,a,s,c,(0,b.default)()),(f&&f!==e.type||y)&&(_(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))}),_(l,o,u,{prevType:f,prevDepth:p,prevKeys:d,prevData:h},c),(0,w.default)(u,c)}var C=t.renderNode=function t(e,n,r,o,i,a,s){if(e.styles&&o)return o((0,w.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,w.default)(c,a),{key:s()});if(null!==e.entity){var l=i[e.entity];if(l&&r[l.type])return r[l.type]((0,w.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,w.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,n,r,o,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return e&&Array.isArray(e.blocks)?e.blocks.length?(t=i.inline,n=i.blocks,r=i.entities,o=i.styles,i=(i=i.decorators)?(0,c.default)(e,i,a):e.blocks,i=u(i),E(i,t,n,r,o,e.entityMap,a)):null:((0,s.default)("invalid raw object"),null)}},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(227)),f=a(n(228));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 E=e(17),C=e(0);function O(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,z=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,F=e?Symbol.for("react.suspense_list"):60120,B=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 m(e){if(null!=e){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 F: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 B:return m(e.type);case H:return m(e.render);case K:if(e=1===e._status?e._result:null)return m(e)}}return null}var e=C.__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 g(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 x={},r=("children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){x[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];x[t]=new n(t,1,!1,e[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){x[e]=new n(e,2,!1,e.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){x[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){x[e]=new n(e,3,!1,e.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(e){x[e]=new n(e,3,!0,e,null,!1)}),["capture","download"].forEach(function(e){x[e]=new n(e,4,!1,e,null,!1)}),["cols","rows","size","span"].forEach(function(e){x[e]=new n(e,6,!1,e,null,!1)}),["rowSpan","start"].forEach(function(e){x[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);x[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);x[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);x[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(e){x[e]=new n(e,1,!1,e.toLowerCase(),null,!1)}),x.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(e){x[e]=new n(e,1,!1,e.toLowerCase(),null,!0)});var X=/["'&<>]/;function k(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,w=!1,S=null,_=0;function D(){if(null===v)throw Error(O(321));return v}function ee(){if(0<_)throw Error(O(312));return{memoizedState:null,queue:null,next:null}}function j(){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(;w;)w=!1,_+=1,a=null,n=e(t,r);return i=v=null,_=0,a=S=null,n}function ne(e,t){return"function"==typeof t?t(e):t}function re(e,t,n){if(v=D(),a=j(),b){var r=a.queue;if(t=r.dispatch,null===S||void 0===(n=S.get(r)))return[a.memoizedState,t];for(S.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(!(_<25))throw Error(O(301));if(e===v)if(w=!0,e={action:n,next:null},null===S&&(S=new Map),void 0===(n=S.get(t)))S.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}.bind(null,v,e),[a.memoizedState,e]}function T(){}var I=0,oe={readContext:function(e){var t=I;return g(e,t),e[t]},useContext:function(e){D();var t=I;return g(e,t),e[t]},useMemo:function(e,t){if(v=D(),t=void 0===t?null:t,null!==(a=j())){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=j()).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:T,useEffect:T,useDebugValue:T,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=E({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=C.Children.toArray,P=e.ReactCurrentDispatcher,pe={listing:!0,pre:!0,textarea:!0},de=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,he={},A={};var ye=Object.prototype.hasOwnProperty,me={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function ge(e,t){if(void 0===e)throw Error(O(152,m(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 g(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=E({},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 ge(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=E({},c,l)):E(c,l))}n.state=c}}else o=null;if(ge(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(O(108,m(t)||"Unknown",f))}p&&(h=E({},h,p))}for(;C.isValidElement(d);){var t=d,n=t.type;if("function"!=typeof n)break;e(t,n)}return{child:d,context:h}}(e=we.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=(g(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,P.current);P.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(O(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(O(294));throw e}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=f}}return r[0]}finally{P.current=n,I=t}},e.render=function(e,t,n){if("string"==typeof e||"number"==typeof e){if(""===(n=""+e))return"";if(!this.makeStaticMarkup){if(this.previousWasTextNode)return"\x3c!-- --\x3e"+k(n);this.previousWasTextNode=!0}return k(n)}if(e=(t=ve(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!C.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(O(257));throw Error(O(258,n.toString()))}var r,o=e.type;if("string"==typeof o)return this.renderDOM(e,t,n);switch(o){case u:case z:case l:case F: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(O(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 B:return e=[C.createElement(o.type,E({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 g(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(O(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=[C.createElement(o._result,E({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(O(295))}case q:throw Error(O(343))}throw Error(O(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(O(65,r));he[r]=!0}var o,i,a,s,c,u=e.props;if("input"===r)u=E({type:void 0},u,{defaultChecked:void 0,defaultValue:void 0,value:null!=u.value?u.value:u.defaultValue,checked:null!=u.checked?u.checked:u.defaultChecked});else if("textarea"===r){if(null==(l=u.value)){var l=u.defaultValue,f=u.children;if(null!=f){if(null!=l)throw Error(O(92));if(Array.isArray(f)){if(!(f.length<=1))throw Error(O(93));f=f[0]}l=""+f}null==l&&(l="")}u=E({},u,{value:void 0,children:""+l})}else if("select"===r)this.currentSelectValue=null!=u.value?u.value:u.defaultValue,u=E({},u,{value:void 0});else if("option"===r){var f=this.currentSelectValue,p=null==(p=u.children)?p:(o="",C.Children.forEach(p,function(e){null!=e&&(o+=e)}),o);if(null!=f){var d=null!=u.value?u.value+"":p;if(l=!1,Array.isArray(f)){for(var h=0;h<f.length;h++)if(""+f[h]===d){l=!0;break}}else l=""+f===d;u=E({selected:void 0,children:void 0},u,{selected:l,children:p})}}if(l=u){if(ce[r]&&(null!=l.children||null!=l.dangerouslySetInnerHTML))throw Error(O(137,r,""));if(null!=l.dangerouslySetInnerHTML){if(null!=l.children)throw Error(O(60));if(!("object"==typeof l.dangerouslySetInnerHTML&&"__html"in l.dangerouslySetInnerHTML))throw Error(O(61))}if(null!=l.style&&"object"!=typeof l.style)throw Error(O(62,""))}for(_ in l=u,f=this.makeStaticMarkup,p=1===this.stack.length,d="<"+e.type,l)if(ye.call(l,_)){var y=l[_];if(null!=y){if("style"===_){var m,g,v,b,h=void 0,w="",S="";for(h in y)y.hasOwnProperty(h)&&(m=0===h.indexOf("--"),null!=(g=y[h]))&&(w+=S+(b=m?h:(b=h,A.hasOwnProperty(b)?A[b]:(v=b.replace(le,"-$1").toLowerCase().replace(fe,"-ms-"),A[b]=v)))+":",S=h,w+=m=null==g||"boolean"==typeof g||""===g?"":m||"number"!=typeof g||0===g||M.hasOwnProperty(S)&&M[S]?(""+g).trim():g+"px",S=";");y=w||null}h=null;e:if(g=l,-1===(m=r).indexOf("-"))m="string"==typeof g.is;else switch(m){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":m=!1;break e;default:m=!0}m?me.hasOwnProperty(_)||(h=Z(h=_)&&null!=y?h+'="'+k(y)+'"':""):(i=_,a=y,c=s=void 0,s=x.hasOwnProperty(i)?x[i]:null,h=(c=(c="style"!==i)&&(null!==s?0===s.type:2<i.length&&("o"===i[0]||"O"===i[0])&&("n"===i[1]||"N"===i[1])))||J(i,a,s,!1)?"":null!==s?(i=s.attributeName,3===(c=s.type)||4===c&&!0===a?i+'=""':i+'="'+k(a=s.sanitizeURL?""+a:a)+'"'):Z(i)?i+'="'+k(a)+'"':""),h&&(d+=" "+h)}}f||p&&(d+=' data-reactroot=""');var _=d;l="",se.hasOwnProperty(r)?_+="/>":(_+=">",l="</"+e.type+">");e:{if(null!=(f=u.dangerouslySetInnerHTML)){if(null!=f.__html){f=f.__html;break e}}else if("string"==typeof(f=u.children)||"number"==typeof f){f=k(f);break e}f=null}return null!=f?(u=[],pe.hasOwnProperty(r)&&"\n"===f.charAt(0)&&(_+="\n"),_+=f):u=N(u.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:u,childIndex:0,context:t,footer:l}),this.previousWasTextNode=!1,_};var be=we,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(O(207))},renderToStaticNodeStream:function(){throw Error(O(208))},version:"16.14.0"};function we(e,t){if(e=C.isValidElement(e)&&(e.type!==c||(e=e.props.children,C.isValidElement(e)))?[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(O(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.1.2","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.13.3","@storybook/addon-docs":"6.5.10","@storybook/addon-essentials":"6.5.10","@storybook/react":"6.5.10","@storybook/storybook-deployer":"2.8.12","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":"^16.4.0","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":"^4.0.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":"^2.13.3","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 _o}),o.d(e,"EditorPreview",function(){return Uo});var y=o(0),m=o.n(y),e=o(1),d=o.n(e),h=o(2),g=o(4),e=o(39),L=o.n(e),e=o(92),z=o.n(e),F=o(24),e=o(5),v=o.n(e);function B(e){return(B="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){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,function(e){e=function(e,t){if("object"!==B(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===B(e)?e:String(e)}(r.key),r)}}function H(e,t,n){return t&&K(e.prototype,t),n&&K(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var U=H(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 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 W(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,function(e){e=function(e,t){if("object"!==q(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==q(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===q(e)?e:String(e)}(r.key),r)}}function V(e,t,n){return t&&W(e.prototype,t),n&&W(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var G,Y=V(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}}),$=[],Z={onKeyDown:function(t){$.forEach(function(e){e(t)})},registerCallBack:function(e){$.push(e)},deregisterCallBack:function(t){$=$.filter(function(e){return e!==t})}},J=function(){G=!0},X=function(){G=!1},Q=function(){return G};function ee(e){e=e.getData()&&e.getData().get("text-align");return e?"rdw-".concat(e,"-aligned-block"):""}function te(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function s(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 ne(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 re(e){return e[e.options[0]].icon}function oe(e,n){var r;return e&&void 0===n?e:(r={},te(e,function(e,t){"[object Object]"===Object.prototype.toString.call(t)?r[e]=oe(t,n[e]):r[e]=void 0!==n[e]?n[e]:t}),r)}function i(e){return(i="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 ie(e,t,n){(t=se(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}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,se(r.key),r)}}function se(e){e=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===i(e)?e:String(e)}function ce(e,t){return(ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=le(n),t=(e=r?(e=le(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===i(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 le(e){return(le=Object.setPrototypeOf?Object.getPrototypeOf.bind():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&&ce(t,e);var n,a=ue(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()((ie(e={},"Editor-option",!0),ie(e,"Editor-option--active",i&&!o),ie(e,"".concat(o),i&&o),ie(e,"Editor-option--disabled",a),e),r);return m.a.createElement("div",{"aria-label":t,onKeyDown:this.handleKeyDown,tabIndex:0,className:o,onClick:this.onClick,"aria-selected":i},n)}}])&&ae(t.prototype,e),n&&ae(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),b=(u.propTypes={onClick:d.a.func.isRequired,children:d.a.any,value:d.a.string,className:d.a.string,activeClassName:d.a.string,active:d.a.bool,disabled:d.a.bool,title:d.a.string,tabIndex:d.a.number},u.defaultProps={activeClassName:""},o(3));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 fe(e,t,n){(t=de(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}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,de(r.key),r)}}function de(e){e=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===a(e)?e:String(e)}function he(e,t){return(he=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=me(n),t=(e=r?(e=me(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 me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf.bind():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&&he(t,e);var n,r=ye(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=m.a.createRef(),i.listRef=m.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()((fe(l={},"Editor-dropdown",!0),fe(l,"Editor-dropdown--expanded",t),l),o);return m.a.createElement("div",{className:l},m.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&&m.a.createElement(b.f,{name:"keyboard_arrow_down"})),t&&m.a.createElement("ul",{tabIndex:1,ref:this.listRef,onKeyDown:this.handleListKeyDown,className:v()("Editor-dropdown-optionWrapper",i),onClick:f},m.a.Children.map(u,function(e,t){return e&&m.a.cloneElement(e,{onSelect:n.onChange,highlighted:c===t,setHighlighted:n.setHighlighted,highlightedClassName:"Editor-dropdown-option--highlight",index:t})})))}}])&&pe(t.prototype,e),n&&pe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component);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 ge(e,t,n){(t=be(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}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,be(r.key),r)}}function be(e){e=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===c(e)?e:String(e)}function we(e,t){return(we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Se(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=_e(n),t=(e=r?(e=_e(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===c(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 _e(e){return(_e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}w.propTypes={children:d.a.any,onChange:d.a.func,className:d.a.string,expanded:d.a.bool,menu:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,optionWrapperClassName:d.a.string,triggerClassName:d.a.string,ariaLabel:d.a.string,title:d.a.string};var S=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&&we(t,e);var n,a=Se(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()((ge(e={},"Editor-dropdown-option",!0),ge(e,"Editor-dropdown-option--active ".concat(c),r&&!s),ge(e,"".concat(t),i),ge(e,"".concat(u),o),e),a);return m.a.createElement("li",{tabIndex:1,className:c,onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick},n)}}])&&ve(t.prototype,e),n&&ve(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);function l(e){return(l="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,Ce(r.key),r)}}function Ce(e){e=function(e,t){if("object"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===l(e)?e:String(e)}function Oe(e,t){return(Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():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"===l(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}S.propTypes={children:d.a.any,value:d.a.any,onClick:d.a.func,onSelect:d.a.func,setHighlighted:d.a.func,index:d.a.number,disabled:d.a.bool,active:d.a.bool,highlighted:d.a.bool,className:d.a.string,activeClassName:d.a.string,disabledClassName:d.a.string,highlightedClassName:d.a.string,title:d.a.string,isCheckbox:d.a.bool},S.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""};var De=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(){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 m.a.createElement(b.n,{tooltip:"More formatting"},m.a.createElement(w,{onChange:e,expanded:t,doExpand:n,doCollapse:o,onExpandEvent:r,triggerClassName:"Editor-textDecoration-moreIcon",menu:!0},m.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 m.a.createElement(S,{key:t,value:e,active:n,isCheckbox:1<s},1<s?m.a.createElement(b.b,{checked:n,label:r}):m.a.createElement(m.a.Fragment,null,m.a.createElement(b.f,{size:20,name:o,className:"mr-4",appearance:n?"white":"default"}),m.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()((e={},t=!0,(c=Ce(c="Editor-textDecoration"))in e?Object.defineProperty(e,c,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[c]=t,e),n);return m.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 m.a.createElement(b.n,{tooltip:o},m.a.createElement(u,{"aria-label":"".concat(e," button"),role:"button",tabIndex:0,key:t,value:e,onClick:s,active:n,className:"mr-2"},m.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}(y.Component);function p(e){return(p="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,function(e){e=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===p(e)?e:String(e)}(r.key),r)}}function Te(e,t){return(Te=Object.setPrototypeOf?Object.setPrototypeOf.bind():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"===p(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}De.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,className:d.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&&Te(t,e);var n,r=Ie(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(g.getSelectionEntity)(n);if(r){r=n.getCurrentContent().getEntity(r).getType();if("MENTION"===r||"LINK"===r)return}r=h.RichUtils.toggleInlineStyle(n,e);r&&t(r)},o.changeKeys=function(e){var n;if(e)return n={},te(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(g.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(g.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||De;return m.a.createElement(o,{config:t,currentState:n,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle,className:e})}}])&&je(t.prototype,e),n&&je(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);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 Ne(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,function(e){e=function(e,t){if("object"!==_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===_(e)?e:String(e)}(r.key),r)}}function Pe(e,t){return(Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=Re(n),t=(e=r?(e=Re(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===_(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,className:d.a.string};var t=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=Ae(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 m.a.createElement("div",{className:t,"aria-label":"Editor-block-control"},m.a.createElement(b.n,{tooltip:"Text style"},m.a.createElement(w,{onChange:c,expanded:o,doExpand:i,doCollapse:s,onExpandEvent:a,triggerClassName:"Editor-heading-trigger"},m.a.createElement(b.f,{name:n,size:20}),e.map(function(e,t){return m.a.createElement(S,{index:t,active:r===e.label,value:e.label,key:t},m.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)}}])&&Ne(t.prototype,e),n&&Ne(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Le=(t.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doExpand:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,className:d.a.string},t);function E(e){return(E="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 ze(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,function(e){e=function(e,t){if("object"!==E(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===E(e)?e:String(e)}(r.key),r)}}function Fe(e,t){return(Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Be(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"===E(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}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&&Fe(t,e);var n,r=Be(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=h.RichUtils.toggleBlockType(r,e);r&&n(r)};e=e.editorState;return o.state={expanded:!1,currentBlockType:e?Object(g.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(g.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 m.a.createElement(Le,{config:t,currentState:{blockType:n&&n.label},onChange:this.toggleBlockType,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,className:e})}}])&&ze(t.prototype,e),n&&ze(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component),t.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,config:d.a.object,className:d.a.string};o(201);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 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,function(e){e=function(e,t){if("object"!==C(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===C(e)?e:String(e)}(r.key),r)}}function Ue(e,t){return(Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():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"===C(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ve=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&&Ue(t,e);var n,i=qe(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 m.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 m.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},m.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}})}))}}])&&He(t.prototype,e),n&&He(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(y.Component);function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}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,function(e){e=function(e,t){if("object"!==O(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===O(e)?e:String(e)}(r.key),r)}}function Ye(e,t){return(Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():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"===O(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ve.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doExpand:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,translations:d.a.object};var Je=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&&Ye(t,e);var n,o=$e(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(g.toggleCustomInlineStyle)(n,"fontSize",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontSize:t?Object(g.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(g.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||Ve,n=n&&Number(n.substring(9));return m.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})}}])&&Ge(t.prototype,e),n&&Ge(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);Je.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,modalHandler:d.a.object,config:d.a.object,translations:d.a.object},o(202);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 Xe(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,function(e){e=function(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===x(e)?e:String(e)}(r.key),r)}}function Qe(e,t){return(Qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=tt(n),t=(e=r?(e=tt(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 tt(e){return(tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var n=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&&Qe(t,e);var n,i=et(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 m.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},m.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"]},m.a.createElement("span",{className:"rdw-fontfamily-placeholder"},f||a["components.controls.fontfamily.fontfamily"]),i.map(function(e,t){return m.a.createElement(S,{active:f===e,value:e,key:t},e)})))}}])&&Xe(t.prototype,e),n&&Xe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(y.Component),nt=(n.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doExpand:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,translations:d.a.object},n);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 rt(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,function(e){e=function(e,t){if("object"!==k(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===k(e)?e:String(e)}(r.key),r)}}function ot(e,t){return(ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function it(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=at(n),t=(e=r?(e=at(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===k(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 at(e){return(at=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n=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&&ot(t,e);var n,o=it(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(g.toggleCustomInlineStyle)(n,"fontFamily",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontFamily:t?Object(g.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(g.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||nt,n=n&&n.substring(11);return m.a.createElement(o,{translations:e,config:t,currentState:{fontFamily:n},onChange:this.toggleFontFamily,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&rt(t.prototype,e),n&&rt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function st(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,ct(r.key),r)}}function ct(e){e=function(e,t){if("object"!==D(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===D(e)?e:String(e)}function ut(e,t){return(ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lt(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=ft(n),t=(e=r?(e=ft(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===D(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 ft(e){return(ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var pt=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&&ut(t,e);var n,a=lt(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()((e={},t=!0,(a=ct(a="d-flex"))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e),n);return m.a.createElement("div",{className:a},m.a.createElement(b.n,{tooltip:i.title},m.a.createElement(u,{value:"unordered",onClick:this.toggleBlockType,active:"unordered"===o,className:"mr-2"},m.a.createElement(b.f,{appearance:"unordered"===o?"info":"default",name:i.icon,size:20}))),m.a.createElement(b.n,{tooltip:r.title},m.a.createElement(u,{value:"ordered",onClick:this.toggleBlockType,active:"ordered"===o},m.a.createElement(b.f,{appearance:"ordered"===o?"info":"default",name:r.icon,size:20}))))}}])&&st(t.prototype,e),n&&st(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);function j(e){return(j="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 dt(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,function(e){e=function(e,t){if("object"!==j(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===j(e)?e:String(e)}(r.key),r)}}function ht(e,t){return(ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=mt(n),t=(e=r?(e=mt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===j(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 mt(e){return(mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}pt.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,className:d.a.string};var gt=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&&ht(t,e);var n,o=yt(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=h.RichUtils.toggleBlockType(t,e);t&&n(t)},r.adjustDepth=function(e){var t=r.props,n=t.onChange,t=t.editorState,t=Object(g.changeDepth)(t,e,4);t&&n(t)},r.isIndentDisabled=function(){var e=r.props.editorState,t=r.state.currentBlock,e=Object(g.getBlockBeforeSelectedBlock)(e);return!e||!Object(g.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(g.isListBlock)(e)||e.get("depth")<=0};var e=r.props,t=e.editorState,e=e.modalHandler;return r.state={expanded:!1,currentBlock:t?Object(g.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(g.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"),m.a.createElement(pt,{config:n,translations:r,currentState:{listType:e},expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,className:t})}}])&&dt(t.prototype,e),n&&dt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);gt.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object,className:d.a.string},o(203);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 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,function(e){e=function(e,t){if("object"!==T(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===T(e)?e:String(e)}(r.key),r)}}function bt(e,t){return(bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wt(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"===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 St(e){return(St=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _t=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&&bt(t,e);var n,r=wt(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 m.a.createElement("div",{className:v()("rdw-text-align-wrapper",t),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&m.a.createElement(u,{value:"left",className:v()(r.className),active:"left"===c,onClick:s,title:r.title||e["components.controls.textalign.left"]},m.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&m.a.createElement(u,{value:"center",className:v()(o.className),active:"center"===c,onClick:s,title:o.title||e["components.controls.textalign.center"]},m.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&m.a.createElement(u,{value:"right",className:v()(i.className),active:"right"===c,onClick:s,title:i.title||e["components.controls.textalign.right"]},m.a.createElement("img",{src:i.icon,alt:""})),0<=n.indexOf("justify")&&m.a.createElement(u,{value:"justify",className:v()(a.className),active:"justify"===c,onClick:s,title:a.title||e["components.controls.textalign.justify"]},m.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 m.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"]},m.a.createElement("img",{src:a&&t[a]&&t[a].icon||re(t),alt:""}),0<=c.indexOf("left")&&m.a.createElement(S,{value:"left",active:"left"===a,className:v()("rdw-text-align-dropdownOption",u.className),title:u.title||e["components.controls.textalign.left"]},m.a.createElement("img",{src:u.icon,alt:""})),0<=c.indexOf("center")&&m.a.createElement(S,{value:"center",active:"center"===a,className:v()("rdw-text-align-dropdownOption",l.className),title:l.title||e["components.controls.textalign.center"]},m.a.createElement("img",{src:l.icon,alt:""})),0<=c.indexOf("right")&&m.a.createElement(S,{value:"right",active:"right"===a,className:v()("rdw-text-align-dropdownOption",f.className),title:f.title||e["components.controls.textalign.right"]},m.a.createElement("img",{src:f.icon,alt:""})),0<=c.indexOf("justify")&&m.a.createElement(S,{value:"justify",active:"justify"===a,className:v()("rdw-text-align-dropdownOption",p.className),title:p.title||e["components.controls.textalign.justify"]},m.a.createElement("img",{src:p.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&vt(t.prototype,e),n&&vt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component);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,function(e){e=function(e,t){if("object"!==Et(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Et(e)?e:String(e)}(r.key),r)}}function Ot(e,t){return(Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}_t.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,translations:d.a.object};var Dt=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&&Ot(t,e);var n,o=xt(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(g.setBlockData)(n,{"text-align":e}):Object(g.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(g.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||_t;return m.a.createElement(o,{config:t,translations:e,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:n},onChange:this.addBlockAlignmentData})}}])&&Ct(t.prototype,e),n&&Ct(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);function jt(e){return(jt="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 Tt(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,function(e){e=function(e,t){if("object"!==jt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==jt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===jt(e)?e:String(e)}(r.key),r)}}function It(e,t){return(It=Object.setPrototypeOf?Object.setPrototypeOf.bind():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"===jt(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Dt.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var Pt=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&&It(t,e);var n,r=Mt(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 m.a.createElement("div",{className:"Editor-colorPicker",onClick:o.handleClick,onKeyDown:o.handleKeyDown},t.map(function(e,t){return m.a.createElement("div",{className:"Editor-colorPicker-circleWrapper"},m.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&&m.a.createElement(b.f,{name:"check",appearance:"white",className:"Editor-colorPicker-selectedCircle"}))}))},o.state={currentStyle:"color"},o.ref=m.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=m.a.createElement(b.n,{tooltip:"Text color"},m.a.createElement(u,{tabIndex:0,"aria-label":"Font colors",onClick:n,active:t,activeClassName:"bg-secondary"},m.a.createElement(b.f,{name:"text_format",size:20})));return m.a.createElement("div",{className:e,"aria-haspopup":"true","aria-expanded":t},m.a.createElement(b.l,{trigger:n,position:"bottom-start",open:t},this.renderModal()))}}])&&Tt(t.prototype,e),n&&Tt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component),At=(Pt.propTypes={expanded:d.a.bool,onToggle:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,className:d.a.className},Pt);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,function(e){e=function(e,t){if("object"!==Rt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Rt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Rt(e)?e:String(e)}(r.key),r)}}function zt(e,t){return(zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ft(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=Bt(n),t=(e=r?(e=Bt(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 Bt(e){return(Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pt=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&&zt(t,e);var n,r=Ft(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(g.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(g.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR,expanded:!1}},function(){var e=Object(g.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(g.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR||"color-var(--text)",n.currentBgColor=Object(g.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||At,r=r&&r.substring(6),o=o&&o.substring(8);return m.a.createElement(i,{config:t,className:e,onChange:this.toggleColor,expanded:n,onToggle:this.toggleColorPicker,currentState:{color:r,bgColor:o}})}}])&&Lt(t.prototype,e),n&&Lt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),r=(Pt.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,className:d.a.string},o(93)),r=o.n(r);function Kt(e){return(Kt="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 Ht(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,Ut(r.key),r)}}function Ut(e){e=function(e,t){if("object"!==Kt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Kt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Kt(e)?e:String(e)}function qt(e,t){return(qt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Wt(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"===Kt(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var I=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&&qt(t,e);var n,a=Wt(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=Ut(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;return m.a.createElement("div",{className:"px-6 mt-6 mb-5",onClick:f},m.a.createElement(b.m,{weight:"strong",size:"large"},t?"Edit":"Insert a"," link"),m.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:f}),m.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:f}),m.a.createElement("div",{className:"d-flex justify-content-end"},m.a.createElement(b.a,{onClick:e,className:"mr-4"},"Cancel"),m.a.createElement(b.a,{onClick:this.addLink,disabled:!r||!n,appearance:"primary"},"Save")))}},{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?m.a.createElement(S,null,m.a.createElement(b.f,{size:20,name:n,className:"mr-4"}),m.a.createElement(b.m,null,t)):m.a.createElement(b.n,{tooltip:"Link"},m.a.createElement(u,{value:"unordered-list-item",onClick:o,"aria-haspopup":"true","aria-expanded":e,active:e,activeClassName:"bg-secondary"},m.a.createElement(b.f,{name:n,size:20})));return m.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e},m.a.createElement(b.l,{trigger:t,position:r?"right":"bottom",open:e,onToggle:o},this.renderAddLinkModal()))}}])&&Ht(t.prototype,e),n&&Ht(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),Gt=(I.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,inDropdown:d.a.boolean},I);function Yt(e){return(Yt="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 $t(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,tn(r.key),r)}}function Zt(e,t){return(Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Jt(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=Xt(n),t=(e=r?(e=Xt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Yt(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 Xt(e){return(Xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qt(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 en(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Qt(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=tn(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)):Qt(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function tn(e){e=function(e,t){if("object"!==Yt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Yt(e)?e:String(e)}function nn(e){var t=rn.match(e.target);return en(en({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var rn=r()(),I=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&&Zt(t,e);var n,r=Jt(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||nn)({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(g.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(g.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(g.getEntityRange)(t,n),r=r.getIsBackward()?r.merge({anchorOffset:n.end,focusOffset:n.start}):r.merge({anchorOffset:n.start,focusOffset:n.end}),e(h.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(g.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=h.Modifier.replaceText(o.getCurrentContent(),a,"".concat(e),null,i),n=h.EditorState.push(o,t,"insert-characters");a=n.getSelection().merge({anchorOffset:a.get("anchorOffset")+e.length,focusOffset:a.get("anchorOffset")+e.length}),n=h.EditorState.acceptSelection(n,a),t=h.Modifier.insertText(n.getCurrentContent(),a," ",n.getCurrentInlineStyle(),void 0),r(h.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(g.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(g.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 m.a.createElement(Gt,{config:t,expanded:n,inDropdown:e,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:o,selectionText:r},onChange:this.onChange})}}])&&$t(t.prototype,e),n&&$t(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),r=(I.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,onCloseLinkPopover:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,inDropdown:d.a.boolean,linkPopoverOpen:d.a.bool},I);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,function(e){e=function(e,t){if("object"!==on(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==on(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===on(e)?e:String(e)}(r.key),r)}}function sn(e,t){return(sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}I=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&&sn(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");(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(g.getEntityRange)(t,r),o=o.getIsBackward()?o.merge({anchorOffset:r.end,focusOffset:r.start}):o.merge({anchorOffset:r.start,focusOffset:r.end})),h.Modifier.replaceText(t.getCurrentContent(),o,"".concat(e),t.getCurrentInlineStyle(),void 0)),o=h.EditorState.push(t,r,"insert-characters");n(h.EditorState.push(o,r,"insert-characters"))};e=i.props.editorState;return i.state={selectionText:void 0,link:void 0,currentEntity:e?Object(g.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(g.getSelectionEntity)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,t=t.title,r=e.mention.label;e.inDropdown;return m.a.createElement(b.n,{tooltip:r||t},m.a.createElement(u,{value:"unordered-list-item",onClick:this.addLink,className:"mr-2"},m.a.createElement(b.f,{name:n,size:20})))}}])&&an(t.prototype,e),n&&an(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),I.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,config:d.a.object,inDropdown:d.a.boolean};o(209);function ln(e){return(ln="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 fn(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,pn(r.key),r)}}function pn(e){e=function(e,t){if("object"!==ln(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==ln(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ln(e)?e:String(e)}function dn(e,t){return(dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():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"===ln(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mn=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,a=hn(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=pn(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 m.a.createElement("div",{className:v()("rdw-embedded-modal",o),onClick:f},m.a.createElement("div",{className:"rdw-embedded-modal-header"},m.a.createElement("span",{className:"rdw-embedded-modal-header-option"},r["components.controls.embedded.embeddedlink"],m.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),m.a.createElement("div",{className:"rdw-embedded-modal-link-section"},m.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},m.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"}),m.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),m.a.createElement("div",{className:"rdw-embedded-modal-size"},m.a.createElement("span",null,m.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),m.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),m.a.createElement("span",null,m.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:e,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),m.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),m.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},m.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!e},r["generic.add"]),m.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 m.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-embedded-control"},m.a.createElement(u,{className:v()(r),value:"unordered-list-item",onClick:i,title:t||e["components.controls.embedded.embedded"]},m.a.createElement("img",{src:n,alt:""})),o?this.rendeEmbeddedLinkModal():void 0)}}])&&fn(t.prototype,e),n&&fn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),gn=(mn.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,onChange:d.a.func,config:d.a.object,translations:d.a.object,doCollapse:d.a.func},mn);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 bn(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,function(e){e=function(e,t){if("object"!==vn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==vn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===vn(e)?e:String(e)}(r.key),r)}}function wn(e,t){return(wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=_n(n),t=(e=r?(e=_n(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 _n(e){return(_n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}mn=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&&wn(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(h.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||gn;return m.a.createElement(r,{config:t,translations:e,onChange:this.addEmbeddedLink,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&bn(t.prototype,e),n&&bn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),mn.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};o(210);function En(e){return(En="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 Cn(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,function(e){e=function(e,t){if("object"!==En(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==En(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===En(e)?e:String(e)}(r.key),r)}}function On(e,t){return(On=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xn(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=kn(n),t=(e=r?(e=kn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===En(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 kn(e){return(kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Dn=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&&On(t,e);var n,a=xn(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 m.a.createElement("div",{className:v()("rdw-emoji-modal",t),onClick:f},e.map(function(e,t){return m.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 m.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"]},m.a.createElement(u,{className:v()(r),value:"unordered-list-item",onClick:i},m.a.createElement("img",{src:n,alt:""})),o?this.renderEmojiModal():void 0)}}])&&Cn(t.prototype,e),n&&Cn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),jn=(Dn.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,onChange:d.a.func,config:d.a.object,translations:d.a.object},Dn);function Tn(e){return(Tn="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 In(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,function(e){e=function(e,t){if("object"!==Tn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Tn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Tn(e)?e:String(e)}(r.key),r)}}function Mn(e,t){return(Mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=Pn(n),t=(e=r?(e=Pn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Tn(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 Pn(e){return(Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Dn=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&&Mn(t,e);var n,a=Nn(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=h.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());t(h.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||jn;return m.a.createElement(r,{config:t,translations:e,onChange:this.addEmoji,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&In(t.prototype,e),n&&In(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);function An(e){return(An="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,Ln(r.key),r)}}function Ln(e){e=function(e,t){if("object"!==An(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==An(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===An(e)?e:String(e)}function zn(e,t){return(zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():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"===An(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Dn.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var Kn=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&&zn(t,e);var n,r=Fn(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=Ln(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]),e.target.value=null},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=m.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?m.a.createElement(S,null,m.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},m.a.createElement(b.f,{name:n,size:20,className:"mr-4"}),m.a.createElement(b.m,null,r)),m.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"})):m.a.createElement("div",{"aria-haspopup":"true","aria-expanded":o},m.a.createElement(b.n,{tooltip:r},m.a.createElement(u,{"aria-label":"add image",className:"mr-2",value:"unordered-list-item",onClick:this.fileUploadClick},m.a.createElement("span",null,m.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},m.a.createElement(b.f,{name:n,size:20}))),m.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"}))))}}])&&Rn(t.prototype,e),n&&Rn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Hn=(Kn.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,translations:d.a.object,inDropdown:d.a.bool},Kn);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 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,function(e){e=function(e,t){if("object"!==Un(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Un(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Un(e)?e:String(e)}(r.key),r)}}function Wn(e,t){return(Wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Vn(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=Gn(n),t=(e=r?(e=Gn(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 Gn(e){return(Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Yn(e){var t=e.config,n=e.onChange,e=e.translations,r=t.icon,o=t.className,t=t.title;return m.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},m.a.createElement(u,{className:v()(o),onClick:n,title:t||e["components.controls.remove.remove"]},m.a.createElement("img",{src:r,alt:""})))}var Kn=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&&Wn(t,e);var n,r=Vn(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(h.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 m.a.createElement(Hn,{config:t,inDropdown:e,onChange:this.addImage})}}])&&qn(t.prototype,e),n&&qn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),$n=(Kn.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,config:d.a.object,inDropdown:d.a.bool},o(211),Yn.propTypes={onChange:d.a.func,config:d.a.object,translations:d.a.object},Yn);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 Jn(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,function(e){e=function(e,t){if("object"!==Zn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Zn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Zn(e)?e:String(e)}(r.key),r)}}function Xn(e,t){return(Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=er(n),t=(e=r?(e=er(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 er(e){return(er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tr=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&&Xn(t,e);var n,a=Qn(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=h.Modifier.removeInlineStyle(r,n.getSelection(),e)}),te(Object(g.getSelectionCustomInlineStyle)(n,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(e,t){t&&(r=h.Modifier.removeInlineStyle(r,n.getSelection(),t))}),h.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||$n;return m.a.createElement(r,{config:t,translations:e,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Jn(t.prototype,e),n&&Jn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);tr.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,config:d.a.object,translations:d.a.object,modalHandler:d.a.object},o(212);function nr(e){return(nr="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,function(e){e=function(e,t){if("object"!==nr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==nr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===nr(e)?e:String(e)}(r.key),r)}}function or(e,t){return(or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ir(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=ar(n),t=(e=r?(e=ar(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===nr(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 ar(e){return(ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sr=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&&or(t,e);var n,a=ir(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 m.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"]},m.a.createElement("img",{src:re(t),alt:""}),0<=c.indexOf("undo")&&m.a.createElement(S,{value:"undo",onClick:this.onChange,disabled:s,className:v()("rdw-history-dropdownoption",u.className),title:u.title||e["components.controls.history.undo"]},m.a.createElement("img",{src:u.icon,alt:""})),0<=c.indexOf("redo")&&m.a.createElement(S,{value:"redo",onClick:this.onChange,disabled:a,className:v()("rdw-history-dropdownoption",l.className),title:l.title||e["components.controls.history.redo"]},m.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 m.a.createElement("div",{className:v()("rdw-history-wrapper",t),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&m.a.createElement(u,{value:"undo",onClick:this.onChange,className:v()(r.className),disabled:a,title:r.title||e["components.controls.history.undo"]},m.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&m.a.createElement(u,{value:"redo",onClick:this.onChange,className:v()(o.className),disabled:i,title:o.title||e["components.controls.history.redo"]},m.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&rr(t.prototype,e),n&&rr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);function cr(e){return(cr="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 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,function(e){e=function(e,t){if("object"!==cr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==cr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===cr(e)?e:String(e)}(r.key),r)}}function lr(e,t){return(lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():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"===cr(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}sr.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,translations:d.a.object};var dr=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&&lr(t,e);var n,o=fr(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=h.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||sr;return m.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})}}])&&ur(t.prototype,e),n&&ur(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);function hr(e){return(hr="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)}dr.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var yr=["config","currentState","onChange"],mr=["config"];function gr(){return(gr=Object.assign?Object.assign.bind():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,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 br(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,function(e){e=function(e,t){if("object"!==hr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==hr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===hr(e)?e:String(e)}(r.key),r)}}function wr(e,t){return(wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Sr(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=_r(n),t=(e=r?(e=_r(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===hr(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 _r(e){return(_r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Er=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&&wr(t,e);var n,r=Sr(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,vr(e,yr));this.state.expanded;return m.a.createElement(w,{expanded:this.state.expanded,doExpand:this.doExpand,doCollapse:this.doCollapse,onExpandEvent:this.onExpandEvent,menu:!0},m.a.createElement(b.f,{name:"more_horizon"}),o.options.slice(o.max,o.options.length).map(function(e,t){var n=o[e],e=Cr[e];return m.a.createElement(e,gr({key:t,config:n,inDropdown:!0,onChange:r.onChange},i))}))}},{key:"render",value:function(){var o=this,e=this.props,i=e.config,a=vr(e,mr),e=i.max;return m.a.createElement("div",{className:"Editor-toolbar-insert"},i.options.slice(0,e).map(function(e,t){var n=i[e],r=Cr[e];return(o.props.mention||"mention"!==e)&&n.isVisible?m.a.createElement(r,gr({key:t,config:n,inDropdown:!1},a)):null}))}}])&&br(t.prototype,e),n&&br(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Cr=(Er.propTypes={onChange:d.a.func.isRequired,onCloseLinkPopover:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,mention:d.a.object,linkPopoverOpen:d.a.bool,translations:d.a.object},{textDecoration:e,heading:t,fontSize:Je,insert:Er,fontFamily:n,list:gt,textAlign:Dt,colorPicker:Pt,link:r,mention:I,embedded:mn,emoji:Dn,image:Kn,remove:tr,history:dr});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)}function xr(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,function(e){e=function(e,t){if("object"!==Or(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Or(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Or(e)?e:String(e)}(r.key),r)}}function kr(e,t){return(kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=jr(n),t=(e=r?(e=jr(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 jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Tr(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"LINK"===n.getEntity(e).getType()},t)}function Ir(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=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(g.getEntityRange)(e,n),t=t.getIsBackward()?t.merge({anchorOffset:e.end,focusOffset:e.start}):t.merge({anchorOffset:e.start,focusOffset:e.end}),n=h.Modifier.setBlockType(r,t,"unstyled"),n=h.Modifier.removeRange(n,t,"backward");c.onChange(h.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=m.a.createElement("span",{contentEditable:"false",suppressContentEditableWarning:!0},m.a.createElement(b.m,{appearance:"link"},t));return m.a.createElement(b.l,{trigger:t,appendToBody:!0,open:n,onToggle:this.onToggle},m.a.createElement("div",{contentEditable:"false",suppressContentEditableWarning:!0,className:"d-flex pl-5 py-5 pr-4 align-items-center"},m.a.createElement(b.h,{href:e,target:"_new",className:"Editor-link"},e),m.a.createElement("span",{className:"Editor-seperator"}),m.a.createElement(b.a,{"aria-label":"Edit",onClick:this.onEditLink,appearance:"transparent",icon:"edit"}),m.a.createElement("span",{className:"Editor-seperator"}),m.a.createElement(b.a,{"aria-label":"Delete",onClick:this.onDeleteLink,appearance:"transparent",icon:"delete"})))}}])&&xr(t.prototype,e),n&&xr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);return e.propTypes={entityKey:d.a.string.isRequired,children:d.a.array,contentState:d.a.object},e}function Mr(e){return(Mr="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 Nr(){return(Nr=Object.assign?Object.assign.bind():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 Pr(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 Ar(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Pr(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=zr(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)):Pr(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}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,zr(r.key),r)}}function Lr(e,t,n){return t&&Rr(e.prototype,t),n&&Rr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function zr(e){e=function(e,t){if("object"!==Mr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Mr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Mr(e)?e:String(e)}var e=Lr(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=Ar(Ar({type:"input",name:e,clearButton:!1},i.chipOptions),{},{label:t,className:"Editor-mention-chip"}),m.a.createElement(b.c,Nr({},e,{onClose:function(){var e=i.config,t=e.getEditorState(),n=t.getCurrentContent(),r=t.getSelection(),t=Object(g.getEntityRange)(t,o),r=r.getIsBackward()?r.merge({anchorOffset:t.end,focusOffset:t.start}):r.merge({anchorOffset:t.start,focusOffset:t.end+1}),t=h.Modifier.setBlockType(n,r,"unstyled"),t=h.Modifier.removeRange(t,r,"backward");e.onChange(h.EditorState.push(e.getEditorState(),t,"remove-range"))}})))}return e.propTypes={entityKey:d.a.number,children:d.a.array,contentState:d.a.object},e},this.getMentionDecorator=function(){return{strategy:i.findMentionEntities,component:i.getMentionComponent()}},this.config=t,this.chipOptions=t.chipOptions,this.renderer=t.renderer}),Fr=(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 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 M(e,t,n){(t=Vr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Kr(e,t){return(Kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(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,Vr(r.key),r)}}function Wr(e,t,n){return t&&qr(e.prototype,t),n&&qr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vr(e){e=function(e,t){if("object"!==Br(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Br(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Br(e)?e:String(e)}function Gr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yr(e){var t=e.block,t=(e=e.contentState.getEntity(t.getEntityAt(0)).getData()).src,n=e.height,e=e.width;return m.a.createElement("iframe",{height:n,width:e,src:t,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}var $r=Wr(function e(t){var c=this,n=(Gr(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<ne(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,f=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&&Kr(t,e);var r=Hr(o);function o(){var l;Gr(this,o);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(l=r.call.apply(r,[this].concat(t))).state={style:{left:15},activeOption:-1,showSuggestions:!0,showLoader:!1,keyDown:!0},l.focusOption=function(e,t,n){var t=document.querySelectorAll(t),n=("string"==typeof n&&(n=parseInt(n)),"down"===e?n+1:n-1),r=n,e="down"===e?t.length:-1,n=(r===e&&(r=0),t[r=-1===n&&-1===e?t.length-1:r]);n&&n.scrollIntoView({block:"end"})},l.onEditorKeyDown=function(e){var t=l.state.activeOption,n={},r=".Editor-dropdown-option";l.disableMouseEvents(),"ArrowDown"===e.key?(e.preventDefault(),l.focusOption("down",r,t),t===l.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=Number(t)+1):"ArrowUp"===e.key?(e.preventDefault(),l.focusOption("up",r,t),n.activeOption=t<=0?l.filteredSuggestions.length-1:Number(t)-1):"Escape"===e.key?(n.showSuggestions=!1,X()):"Enter"===e.key&&l.addMention(),l.setState(n)},l.onOptionMouseOver=function(e){l.enableMouseEvents();e=parseInt(e.target.getAttribute("data-index"));0<=e&&e<l.filteredSuggestions.length&&l.setState({activeOption:e})},l.disableMouseEvents=function(){l.setState({keyDown:!0})},l.enableMouseEvents=function(){l.setState({keyDown:!1})},l.setSuggestionReference=function(e){l.suggestion=e},l.setDropdownReference=function(e){l.dropdown=e},l.closeSuggestionDropdown=function(){l.state.showSuggestions&&l.setState({showSuggestions:!1})},l.filteredSuggestions=[],l.filterSuggestions=function(e){var t=f.getSuggestions?f.getSuggestions():[];l.filteredSuggestions=ne(t,e,f.caseSensitive)},l.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){f.fetchSuggestions(e).then(function(e){l.filteredSuggestions=e,l.setState({showSuggestions:0<e.length,showLoader:!1})})}),l.updateSuggestions=function(e){e=e.children[0].props.text.substr(1);f.fetchSuggestions?(l.setState({showLoader:!0}),l.debouncedFetchSuggestion(e)):l.filterSuggestions(e)},l.addMention=function(e){var t,n,r,o=l.state.activeOption,i=f.getEditorState(),a=f.onChange,s=f.separator,c=f.trigger,o=l.filteredSuggestions[o],u=l.props.children[0].props.text.substr(1);o&&(i=i,a=a,s=s,c=c,e=e,u=u,t=(o=o).label,n=o.value,o=o.url,n=i.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(c).concat(n),value:n,url:o}).getLastCreatedEntityKey(),o=Object(g.getSelectedBlock)(i).getText(),r=i.getSelection().focusOffset,s=(o.lastIndexOf(s+c,r)||0)+1,c=!1," "===o[r=o.length===s+1?o.length:r]&&(c=!0),e&&(r=s+u.length+1),o=i.getSelection().merge({anchorOffset:s,focusOffset:r}),e=h.EditorState.acceptSelection(i,o),u=h.Modifier.replaceText(e.getCurrentContent(),o,"".concat(t),null,n),e=h.EditorState.push(e,u,"insert-characters"),c||(o=e.getSelection().merge({anchorOffset:s+t.length,focusOffset:s+t.length}),e=h.EditorState.acceptSelection(e,o),u=h.Modifier.insertText(e.getCurrentContent(),o," ",e.getCurrentInlineStyle(),void 0)),a(h.EditorState.push(e,u,"insert-characters")))},l.getOptionClass=function(e){var t,n=l.state.activeOption;return v()((M(t={},"Editor-dropdown-option",!0),M(t,"Editor-dropdown-option--highlight",e===n),M(t,"Editor-dropdown--keydown",l.state.keyDown),t))},l.renderOption=function(e,t){var n,r=f.dropdownOptions,r=(void 0===r?{}:r).customOptionRenderer,o=e.icon,i=e.label;return r?(n=r(e,l.state.activeOption,t),m.a.cloneElement(n,{key:t,spellCheck:!1,onClick:function(e){l.addMention(e),n.props.onClick&&n.props.onClick()},"data-index":t,onMouseOver:l.onOptionMouseOver})):m.a.createElement("span",{key:t,spellCheck:!1,onClick:function(){return l.addMention("onMouseSelect")},"data-index":t,onMouseOver:l.onOptionMouseOver,className:l.getOptionClass(t)},o&&m.a.createElement(b.f,{name:o,className:"mr-4"}),m.a.createElement(b.m,null,i))},l}return Wr(o,[{key:"componentDidMount",value:function(){var e=this.suggestion.getBoundingClientRect(),t=e.left,e=e.top+25;this.setState({style:{left:t,top:e}}),Z.registerCallBack(this.onEditorKeyDown),J(),f.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.updateSuggestions(this.props),this.setState({showSuggestions:!0}),document.addEventListener("scroll",this.closeSuggestionDropdown,{once:!0})}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.updateSuggestions(this.props),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("scroll",this.closeSuggestionDropdown),Z.deregisterCallBack(this.onEditorKeyDown),X(),f.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e,n=this,t=this.props.children,r=this.state.showSuggestions,o=f.dropdownOptions,o=(void 0===o?{}:o).dropdownClassName,o=v()((M(e={},"Popover",!0),M(e,"".concat(o),void 0!==o),M(e,"Editor-mention-dropdown",!0),M(e,"position-fixed",!0),e));return m.a.createElement("span",{className:"Editor-mention-suggestion",ref:this.setSuggestionReference,onClick:f.modalHandler.onSuggestionClick,"aria-haspopup":"true"},m.a.createElement("span",null,t),r&&m.a.createElement("span",{className:o,style:this.state.style,contentEditable:"false",suppressContentEditableWarning:!0,ref:this.setDropdownReference,onMouseMove:this.enableMouseEvents,onMouseLeave:this.disableMouseEvents,onScroll:this.enableMouseEvents},this.state.showLoader?m.a.createElement("span",{className:"Editor-dropdown-option"},m.a.createElement(b.j,{withImage:!1},m.a.createElement(b.k,{length:"large"}),m.a.createElement(b.k,{length:"large"}),m.a.createElement(b.k,{length:"large"}))):this.filteredSuggestions.map(function(e,t){return n.renderOption(e,t)})))}}]),o}(y.Component)).propTypes={children:d.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}}),Zr=function(e){return[new Fr(e).getMentionDecorator(),new $r(e).getSuggestionDecorator()]},Jr=(Yr.propTypes={block:d.a.object,contentState:d.a.object},Yr);function Xr(e,t,n){return Math.min(Math.max(e,t),n)}var N={east:1,north:8,south:2,west:4};function Qr(e){function t(e,t){var n,r,o,i=s.current,a=c.current;null!==i&&null!==a&&(n=(r=i.getBoundingClientRect()).width,r=r.height,(o=l.current).startWidth=n,o.startHeight=r,o.ratio=n/r,o.currentWidth=n,o.currentHeight=r,o.startX=e.clientX,o.startY=e.clientY,o.isResizing=!0,o.direction=t,o=(e=t)===N.east||e===N.west,t=e===N.north||e===N.south,e=e&N.north&&e&N.west||e&N.south&&e&N.east,o=o?"ew":t?"ns":e?"nwse":"nesw",null!==f&&f.style.setProperty("cursor","".concat(o,"-resize"),"important"),null!==document.body&&(document.body.style.setProperty("cursor","".concat(o,"-resize"),"important"),u.current.value=document.body.style.getPropertyValue("-webkit-user-select"),u.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important")),a.classList.add("image-control-wrapper--resizing"),i.style.height="".concat(r,"px"),i.style.width="".concat(n,"px"),document.addEventListener("pointermove",d),document.addEventListener("pointerup",h))}var i=e.onResizeEnd,s=e.imageRef,n=e.maxWidth,e=e.editor,c=Object(y.useRef)(),u=Object(y.useRef)({priority:"",value:"default"}),l=Object(y.useRef)({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),f=(Object(y.useEffect)(function(){return function(){document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",h)}},[]),e),a=n||(null!==f?f.getBoundingClientRect().width-20:100),p=null!==f?f.getBoundingClientRect().height-20:100,d=function(e){var t,n=s.current,r=l.current,o=r.direction&(N.east|N.west),i=r.direction&(N.south|N.north);null!==n&&r.isResizing&&(o&&i?(o=Math.floor(r.startX-e.clientX),o=r.direction&N.east?-o:o,t=(o=Xr(r.startWidth+o,100,a))/r.ratio,n.style.width="".concat(o,"px"),n.style.height="".concat(t,"px"),r.currentHeight=t,r.currentWidth=o):i?(t=Math.floor(r.startY-e.clientY),t=r.direction&N.south?-t:t,o=Xr(r.startHeight+t,100,p),n.style.height="".concat(o,"px"),r.currentHeight=o):(i=Math.floor(r.startX-e.clientX),i=r.direction&N.east?-i:i,t=Xr(r.startWidth+i,100,a),n.style.width="".concat(t,"px"),r.currentWidth=t))},h=function e(){var t,n=s.current,r=l.current,o=c.current;null!==n&&null!==o&&r.isResizing&&(n=r.currentWidth,t=r.currentHeight,r.startWidth=0,r.startHeight=0,r.ratio=0,r.startX=0,r.startY=0,r.currentWidth=0,r.currentHeight=0,r.isResizing=!1,o.classList.remove("image-control-wrapper--resizing"),document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",e),null!==f&&f.style.setProperty("cursor","default"),null!==document.body&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",u.current.value,u.current.priority)),i(n,t))};return y.createElement("div",{ref:c},y.createElement("div",{className:"Editor-image-resizer Image-resizer--n",onPointerDown:function(e){t(e,N.north)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--ne",onPointerDown:function(e){t(e,N.north|N.east)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--e",onPointerDown:function(e){t(e,N.east)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--se",onPointerDown:function(e){t(e,N.south|N.east)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--s",onPointerDown:function(e){t(e,N.south)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--sw",onPointerDown:function(e){t(e,N.south|N.west)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--w",onPointerDown:function(e){t(e,N.west)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--nw",onPointerDown:function(e){t(e,N.north|N.west)}}))}o(213);function eo(e){return(eo="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 to(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,function(e){e=function(e,t){if("object"!==eo(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==eo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===eo(e)?e:String(e)}(r.key),r)}}function no(e,t){return(no=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ro(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=io(n),t=(e=r?(e=io(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===eo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return oo(t)}}function oo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function io(e){return(io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ao=function(l){var 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&&no(t,e);var n,o=ro(i);function i(e){var r;if(this instanceof i)return(r=o.call(this,e)).imageRef=null,r.state={hovered:!1},r.setEntityAlignmentLeft=function(){r.setEntityAlignment("left")},r.setEntityAlignmentRight=function(){r.setEntityAlignment("right")},r.setEntityAlignmentCenter=function(){r.setEntityAlignment("center")},r.setEntityAlignment=function(e){var t=r.props,n=t.block,t=t.contentState,n=n.getEntityAt(0);t.mergeEntityData(n,{alignment:e,alt:e}),l.onChange(h.EditorState.push(l.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 h.SelectionState({anchorKey:t,anchorOffset:0,focusKey:n,focusOffset:0}),n=h.Modifier.setBlockType(e,t,"unstyled"),n=h.Modifier.removeRange(n,t,"backward");l.onChange(h.EditorState.push(l.getEditorState(),n,"remove-range"))},r.toggleHovered=function(){var e;r.state.hovered&&(e=l.getEditorState().getCurrentContent(),l.onChange(h.EditorState.push(l.getEditorState(),e,""))),r.setState({hovered:!r.state.hovered})},r.imageRef=m.a.createRef(),r.onResizeEnd=r.onResizeEnd.bind(oo(r)),r;throw new TypeError("Cannot call a class as a function")}return t=i,(e=[{key:"renderAlignmentOptions",value:function(e){return m.a.createElement("div",{className:"Popover d-flex ".concat(e?"mt-4":"")},m.a.createElement("div",{onClick:this.setEntityAlignmentLeft,className:"Editor-image-options"},m.a.createElement(b.f,{name:"format_align_left",size:20})),m.a.createElement("div",{onClick:this.setEntityAlignmentCenter,className:"Editor-image-options"},m.a.createElement(b.f,{name:"format_align_center",size:20})),m.a.createElement("div",{onClick:this.setEntityAlignmentRight,className:"Editor-image-options"},m.a.createElement(b.f,{name:"format_align_right",size:20})),m.a.createElement("div",{onClick:this.removeEntity,className:"Editor-image-options"},m.a.createElement(b.f,{name:"delete",size:20})))}},{key:"updateImageSize",value:function(e,t){var n=this.props.block.getEntityAt(0),n=l.getEditorState().getCurrentContent().mergeEntityData(n,{width:"".concat(e,"px"),height:"".concat(t,"px")}),e=(l.onChange(h.EditorState.push(l.getEditorState(),n,"")),l.getEditorState()),t=h.Modifier.replaceText(e.getCurrentContent(),e.getSelection()," ");l.onChange(h.EditorState.push(e,t,"insert-characters"))}},{key:"onResizeEnd",value:function(e,t){this.setState({hovered:!1}),this.updateImageSize(e,t)}},{key:"render",value:function(){var e=this.props,t=e.block,e=e.contentState,n=this.state.hovered,r=l.isImageAlignmentEnabled,o=l.isImageResizeEnabled,i=l.nonFloatingImage,e=e.getEntity(t.getEntityAt(0)).getData(),t=e.src,a=e.alignment,s=e.height,c=e.width,e=e.alt,i=("center"!==e||a?i&&"right"===e&&!a?this.setEntityAlignmentRight():i&&"left"===e&&!a&&this.setEntityAlignmentLeft():this.setEntityAlignmentCenter(),document.getElementById("RichTextEditorWrapper")),a=v()({"d-flex":!0,"justify-content-end":"right"===a,"justify-content-start":!a||"left"===a,"justify-content-center":"center"===a}),u=v()({"position-relative":!0,"Editor-image--selected":n&&o,"Editor-image":!n&&o,"ml-4":o});return m.a.createElement("div",{className:a},m.a.createElement("span",{onClick:this.toggleHovered,className:u},m.a.createElement("img",{src:t,alt:e,style:{height:s,width:c},ref:this.imageRef}),n&&m.a.createElement(m.a.Fragment,null,r()&&this.renderAlignmentOptions(o),o&&m.a.createElement(Qr,{editor:i,imageRef:this.imageRef,onResizeEnd:this.onResizeEnd}))))}}])&&to(t.prototype,e),n&&to(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);return e.propTypes={block:d.a.object,contentState:d.a.object},e},so=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:ao(n),editable:!1};if(t&&"EMBEDDED_LINK"===t.type)return{component:Jr,editable:!1}}}},co=["var(--text)","var(--secondary)","var(--success)","var(--primary)","var(--alert)","var(--accent1)"],Er=(t="ctrl",t=((null==(Je=navigator.userAgentData)?void 0:Je.platform.toLowerCase())||"linux").includes("mac")?"cmd":t),uo={options:["heading","textDecoration","colorPicker","list","insert"],textDecoration:{max:4,options:["bold","italic","underline","strikethrough"],bold:{icon:"format_bold",title:"Bold (".concat(Er,"+B)"),label:"Bold"},italic:{icon:"format_italic",title:"Italic (".concat(Er,"+I)"),label:"Italic"},underline:{icon:"format_underlined",title:"Underline (".concat(Er,"+U)"),label:"Underline"},strikethrough:{icon:"strikethrough_s",title:"Strikethrough",label:"Strikethrough"}},heading:{icon:"text_fields",options:["H1","H2","H3","H4"]},list:{options:["unordered","ordered"],unordered:{icon:"format_list_bulleted",title:" Bulleted list"},ordered:{icon:"format_list_numbered",title:"Numbered list"}},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",colors:co},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,resizeEnabled:!1,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}},n={title:d.a.string,label:d.a.string},gt={isVisible:d.a.bool,title:d.a.string,alt:d.a.string,uploadCallback:d.a.func,resizeEnabled:d.a.bool,defaultSize:d.a.shape({height:d.a.string,width:d.a.string})},Dt={isVisible:d.a.bool,title:d.a.string},Pt=d.a.shape({textDecoration:d.a.shape({max:d.a.number,bold:d.a.shape(n),italic:d.a.shape(n),underline:d.a.shape(n),strikethrough:d.a.shape(n)}),colorPicker:d.a.shape({colors:d.a.arrayOf(d.a.string)}),insert:d.a.shape({max:d.a.number,image:d.a.shape(gt),link:d.a.shape(Dt)})});o(214),o(94),o(95),o(96),o(97),o(98);o(99),o(100),o(101);function lo(e){return(lo="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 fo(){return(fo=Object.assign?Object.assign.bind():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 po(e){return function(e){if(Array.isArray(e))return ho(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?ho(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ho(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 ho(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 yo(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 P(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?yo(Object(n),!0).forEach(function(e){mo(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yo(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function mo(e,t,n){return(t=vo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function go(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,vo(r.key),r)}}function vo(e){e=function(e,t){if("object"!==lo(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==lo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===lo(e)?e:String(e)}function bo(e,t){return(bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wo(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=So(n),t=(e=r?(e=So(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===lo(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 So(e){return(So=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var 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&&bo(t,e);var n,o=wo(i);function i(e){var a;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(a=o.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){if("Tab"===e.key)return t=a.props.onTab,(n=Object(g.changeDepth)(a.state.editorState,e.shiftKey?-1:1,4))&&n!==a.state.editorState&&(a.onChange(n),e.preventDefault()),t&&t(e,n),null;if("ArrowUp"!==e.key&&"ArrowDown"!==e.key||Q()&&e.preventDefault(),"Backspace"===e.key&&a.isEmptyListBlock()){var t=h.RichUtils.toggleBlockType(a.state.editorState);if(t)return a.onChange(t),a.setState({editorState:h.EditorState.moveFocusToEnd(h.EditorState.createEmpty())}),!0}if("Delete"===e.key){var n=h.RichUtils.onDelete(a.state.editorState);if(n)return a.onChange(n),!0}return Object(h.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(g.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(n&&n(e,a.props.wrapperId),s(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(P(P({},a.state),{},{linkPopoverOpen:!0}))},a.getCompositeDecorator=function(e){var t=[{strategy:Tr,component:Ir({focusHandler:a.focusHandler,getEditorState:a.getEditorState,onChange:a.onChange,onEditLink:a.onEditLink})}];return a.props.mention&&t.push.apply(t,po(Zr(P(P({},a.props.mention),{},{onChange:a.onChange,getEditorState:a.getEditorState,getSuggestions:a.getSuggestions,getWrapperRef:a.getWrapperRef,modalHandler:a.modalHandler})))),new h.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(h.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 s(a.props,"editorState")?a.props.editorState&&(t=h.EditorState.set(a.props.editorState,{decorator:e})):s(a.props,"defaultEditorState")?a.props.defaultEditorState&&(t=h.EditorState.set(a.props.defaultEditorState,{decorator:e})):s(a.props,"contentState")?a.props.contentState&&(n=Object(h.convertFromRaw)(a.props.contentState),t=h.EditorState.createWithContent(n,e),t=h.EditorState.moveSelectionToEnd(t)):s(a.props,"defaultContentState")&&(n=a.props.defaultContentState)&&(n=Object(h.convertFromRaw)(n),t=h.EditorState.createWithContent(n,e),t=h.EditorState.moveSelectionToEnd(t)),t=t||h.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 P(P({},Object(g.getCustomStyleMap)()),e.customStyleMap)},a.changeEditorState=function(e){var e=Object(h.convertFromRaw)(e),t=a.state.editorState,t=h.EditorState.push(t,e,"insert-characters");return h.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=h.RichUtils.handleKeyCommand(n,e);if(t)return a.onChange(t),!0}return!1},a.handleReturn=function(e){var t;return!!Q()||(t=a.state.editorState,!!(t=Object(g.handleNewLine)(t,e))&&(a.onChange(t),!0))},a.handlePastedTextFn=function(e,t){var n,r,o=a.state.editorState,i=a.props.handlePastedText;return t.includes("<figure")?t:t.includes("DraftStyle")?null:i?i(e,t,o,a.onChange):(i=e,e=t,t=o,o=a.onChange,(r=Object(g.getSelectedBlock)(t))&&"code"===r.type?(r=h.Modifier.replaceText(t.getCurrentContent(),t.getSelection(),i,t.getCurrentInlineStyle()),o(h.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=h.Modifier.replaceWithFragment(n,t.getSelection(),new F.List(i.contentBlocks)),o(h.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=h.DefaultDraftBlockRenderMap.merge(Object(F.Map)({"header-one":{wrapper:m.a.createElement(b.e,{size:"xxl"},a.props.children)},"header-two":{wrapper:m.a.createElement(b.e,{size:"xl"},a.props.children)},"header-three":{wrapper:m.a.createElement(b.e,{size:"l"},a.props.children)},"header-four":{wrapper:m.a.createElement(b.e,{size:"m"},a.props.children)},unstyled:{element:"p",wrapper:m.a.createElement("div",null,a.props.children)}}));var t=oe(uo,e.toolbar),n=e.wrapperId||Math.floor(1e4*Math.random()),n=(a.wrapperId="Editor-wrapper-".concat(n),a.modalHandler=new U,a.focusHandler=new Y,e.toolbar&&e.toolbar.insert&&(null==(n=e.toolbar.insert.image)?void 0:n.resizeEnabled)),r=e.toolbar&&e.toolbar.insert&&(null==(r=e.toolbar.insert.image)?void 0:r.nonFloatingImage),n=(a.blockRendererFn=so({isReadOnly:!0,isImageAlignmentEnabled:a.isImageAlignmentEnabled,isImageResizeEnabled:n,nonFloatingImage:r,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(g.extractInlineStyle)(n),a.state={editorState:n,toolbar:t,editorFocused:!1,linkPopoverOpen:!1},a}return t=i,(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=oe(uo,o),t.toolbar=o),s(this.props,"editorState")&&n!==e.editorState?t.editorState=n?h.EditorState.set(n,{decorator:this.compositeDecorator}):h.EditorState.createEmpty(this.compositeDecorator):s(this.props,"contentState")&&r!==e.contentState&&(r?(o=this.changeEditorState(r))&&(t.editorState=o):t.editorState=h.EditorState.createEmpty(this.compositeDecorator)),e.editorState===n&&e.contentState===r||Object(g.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()(mo({},"Editor-toolbar",!0),n),n=v()(mo({},"Editor-wrapper",!0),i),i=v()((mo(i={},"Editor",!0),mo(i,"hide-placeholder",this.isEmptyListBlock()),i),o);return m.a.createElement("div",{id:this.wrapperId,className:n,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur},this.props.showToolbar&&m.a.createElement("div",{className:e,onMouseDown:this.preventDefault,"aria-label":"Editor-toolbar",onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=Cr[e],e=r[e];return m.a.createElement(n,fo({key:t},u,{config:e,mention:c,className:"Editor-toolbar-options"}))})),m.a.createElement("div",{ref:this.setWrapperReference,className:i,style:a,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:Z.onKeyDown,onMouseDown:this.onEditorMouseDown,id:"RichTextEditorWrapper"},m.a.createElement(h.Editor,fo({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:ee,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,handlePastedText:this.handlePastedTextFn,ariaLabel:s,blockRenderMap:this.blockRenderMap},this.editorProps))))}}])&&go(t.prototype,e),n&&go(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component),_o=(r.utils={EditorState:h.EditorState,ContentState:h.ContentState,RichUtils:h.RichUtils,convertFromRaw:h.convertFromRaw,convertToRaw:h.convertToRaw,htmlToState:function(e){var e=e.replaceAll('<p><br/></p><p id="RichTextEditor-Image"','<p id="RichTextEditor-Image"').replaceAll("<br/>","").replaceAll("<p> </p>",""),e=L()(e);if(e)return{contentState:e=h.ContentState.createFromBlockArray(e.contentBlocks),editorState:h.EditorState.createWithContent(e)}},stateToHTML:function(e){var n=1<arguments.length&&void 0!==arguments[1]&&arguments[1],e=Object(h.convertToRaw)(e.getCurrentContent());return z()(e,{},!1,function(e){var t=e.type,e=e.data;if("IMAGE"===t)return t=e.alignment||"left","center"===e.alt||"center"===t?'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-right:auto; margin-left:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):!n||"left"!==e.alt&&"left"!==t?n?'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-left:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="float:').concat(t,"; height: ").concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-right:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n ')})}},r.propTypes={mention:d.a.shape({separator:d.a.string,trigger:d.a.string,chipOptions:d.a.object,dropdownOptions:d.a.shape({dropdownClassName:d.a.string,customOptionRenderer:d.a.func}),renderer:d.a.func,suggestions:d.a.shape({label:d.a.string,value:d.a.string,icon:d.a.string}),fetchSuggestions:d.a.func}),editorState:d.a.object,onEditorStateChange:d.a.func,defaultEditorState:d.a.object,onContentStateChange:d.a.func,defaultContentState:d.a.object,contentState:d.a.object,spellCheck:d.a.bool,toolbar:Pt,showToolbar:d.a.bool,editorClassName:d.a.string,wrapperClassName:d.a.string,toolbarClassName:d.a.string,editorStyle:d.a.object,onFocus:d.a.func,onBlur:d.a.func,onTab:d.a.func,textAlignment:d.a.oneOf(["left","right","center"]),readOnly:d.a.bool,autoFocus:d.a.bool,placeholder:d.a.string,ariaLabel:d.a.string,wrapperId:d.a.number,editorRef:d.a.func,handlePastedText:d.a.func},r.defaultProps={autoFocus:!0,showToolbar:!0},r),Eo=o(49),Co=o.n(Eo),Oo=o(50);function xo(e){return(xo="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 ko(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?ko(Object(n),!0).forEach(function(e){Do(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ko(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Do(e,t,n){return(t=function(e){e=function(e,t){if("object"!==xo(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==xo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===xo(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jo(e){return function(e){if(Array.isArray(e))return To(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?To(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?To(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 To(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 Io(e,n){return m.a.createElement(m.a.Fragment,null,e.map(function(e,t){return m.a.createElement("li",{key:n[t]},e)}))}function Mo(e,r){return m.a.createElement(m.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"),m.a.createElement(b.i,{key:r[t]},n.map(function(e){return[e,m.a.createElement("br",null)]}))):e&&0===(null==(n=e[1])?void 0:n.length)?m.a.createElement("p",null,m.a.createElement("br",null)):m.a.createElement(b.i,{key:r[t]},e.map(function(e){return[e]}))}))}function No(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({},Bo),n),r=A(A({},zo),r),o=A(A({},Fo),o),r=A(A(A({},Ko),r),o),o=A(A({},Ro),Ho(t)),t={blocks:r,entities:n,styles:Object(Eo.createStylesRenderer)(Lo,o)};return Co()(e,t,!1)}function Po(e){var t=e.raw,n=e.entities,r=e.headings,o=e.list,e=e.colors;return(t=t&&No(t,{entities:n,headings:r,list:o,colors:e}))?m.a.createElement("div",{className:"Preview-wrapper"},t):null}var Ao={paddingLeft:"1.5em",margin:"0px"},Ro={BOLD:{fontWeight:"bold"},ITALIC:{fontStyle:"italic"},UNDERLINE:{textDecoration:"underline"},STRIKETHROUGH:{textDecoration:"line-through"}},Lo=function(e){var t=e.children,n=e.style,e=e.key;return m.a.createElement("span",{key:e,style:n},t)},zo={"header-one":function(e,t){var n=t.keys;return e.map(function(e,t){return m.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 m.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 m.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 m.a.createElement(b.e,{size:"m",key:n[t]},e)})}},Fo={"unordered-list-item":function(e,t){t=t.keys;return m.a.createElement("ul",{style:Ao},Io(e,t))},"ordered-list-item":function(e,t){t=t.keys;return m.a.createElement("ol",{style:Ao},Io(e,t))}},Bo={LINK:function(e,t,n){n=n.key;return m.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 m.a.createElement("p",{id:"RichTextEditor-Image",style:{justifyContent:t||"left",display:"flex"}},m.a.createElement("img",{src:n,alt:r,height:o,width:i}))},MENTION:function(e,t,n){n=n.key;return m.a.createElement("span",{name:t.value,className:"Chip--input Chip d-inline-flex mt-3",key:n},e)}},Ko={unstyled:function(e,t,n){t=t.keys;return Mo(e,t)},atomic:function(e,t){return e[0]}},Ho=function(e){return[].concat(jo(co),jo(e)).reduce(function(e,t){var n="color-".concat(t),t={color:t};return A(A({},e),{},Do({},n,t))},{})},Uo=(Po.utils={convertToHTML:function(e){var t,n,r=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return(e=e&&No(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}))&&Object(Oo.renderToStaticMarkup)(e)?(t=(n=o(231)).name,n=n.version,t="https://s3.us-east-1.amazonaws.com/webui-assets/".concat(t,"/v").concat(n,"/design-system.css"),n=r?'<link rel="stylesheet" href="'.concat(t,'">'):"","".concat(n," ").concat(Object(Oo.renderToStaticMarkup)(e))):""}},Po.propTypes={raw:d.a.object.isRequired,colors:d.a.arrayOf(d.a.string),list:d.a.object,headings:d.a.object,entities:d.a.object},Po.defaultProps={entities:{},headings:{},list:{},colors:[]},Po)}]);
|
|
57
|
+
*/var E=e(17),C=e(0);function O(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,z=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,F=e?Symbol.for("react.suspense_list"):60120,B=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,W=e?Symbol.for("react.scope"):60119;function m(e){if(null!=e){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 F: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 B:return m(e.type);case H:return m(e.render);case K:if(e=1===e._status?e._result:null)return m(e)}}return null}var e=C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=(e.hasOwnProperty("ReactCurrentDispatcher")||(e.ReactCurrentDispatcher={current:null}),e.hasOwnProperty("ReactCurrentBatchConfig")||(e.ReactCurrentBatchConfig={suspense:null}),{});function g(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 x={},r=("children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){x[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];x[t]=new n(t,1,!1,e[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){x[e]=new n(e,2,!1,e.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){x[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){x[e]=new n(e,3,!1,e.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(e){x[e]=new n(e,3,!0,e,null,!1)}),["capture","download"].forEach(function(e){x[e]=new n(e,4,!1,e,null,!1)}),["cols","rows","size","span"].forEach(function(e){x[e]=new n(e,6,!1,e,null,!1)}),["rowSpan","start"].forEach(function(e){x[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);x[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);x[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);x[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(e){x[e]=new n(e,1,!1,e.toLowerCase(),null,!1)}),x.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(e){x[e]=new n(e,1,!1,e.toLowerCase(),null,!0)});var X=/["'&<>]/;function k(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,w=!1,S=null,_=0;function D(){if(null===v)throw Error(O(321));return v}function ee(){if(0<_)throw Error(O(312));return{memoizedState:null,queue:null,next:null}}function j(){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(;w;)w=!1,_+=1,a=null,n=e(t,r);return i=v=null,_=0,a=S=null,n}function ne(e,t){return"function"==typeof t?t(e):t}function re(e,t,n){if(v=D(),a=j(),b){var r=a.queue;if(t=r.dispatch,null===S||void 0===(n=S.get(r)))return[a.memoizedState,t];for(S.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(!(_<25))throw Error(O(301));if(e===v)if(w=!0,e={action:n,next:null},null===S&&(S=new Map),void 0===(n=S.get(t)))S.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}.bind(null,v,e),[a.memoizedState,e]}function T(){}var I=0,oe={readContext:function(e){var t=I;return g(e,t),e[t]},useContext:function(e){D();var t=I;return g(e,t),e[t]},useMemo:function(e,t){if(v=D(),t=void 0===t?null:t,null!==(a=j())){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=j()).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:T,useEffect:T,useDebugValue:T,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=E({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=C.Children.toArray,P=e.ReactCurrentDispatcher,pe={listing:!0,pre:!0,textarea:!0},de=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,he={},A={};var ye=Object.prototype.hasOwnProperty,me={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function ge(e,t){if(void 0===e)throw Error(O(152,m(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 g(r,n),r[n];if(e=e.contextTypes){for(var o in n={},e)n[o]=t[o];t=n}else t=q;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=E({},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 ge(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=E({},c,l)):E(c,l))}n.state=c}}else o=null;if(ge(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(O(108,m(t)||"Unknown",f))}p&&(h=E({},h,p))}for(;C.isValidElement(d);){var t=d,n=t.type;if("function"!=typeof n)break;e(t,n)}return{child:d,context:h}}(e=we.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=(g(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,P.current);P.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(O(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(O(294));throw e}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=f}}return r[0]}finally{P.current=n,I=t}},e.render=function(e,t,n){if("string"==typeof e||"number"==typeof e){if(""===(n=""+e))return"";if(!this.makeStaticMarkup){if(this.previousWasTextNode)return"\x3c!-- --\x3e"+k(n);this.previousWasTextNode=!0}return k(n)}if(e=(t=ve(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!C.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(O(257));throw Error(O(258,n.toString()))}var r,o=e.type;if("string"==typeof o)return this.renderDOM(e,t,n);switch(o){case u:case z:case l:case F: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(O(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 B:return e=[C.createElement(o.type,E({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 g(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(O(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=[C.createElement(o._result,E({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(O(295))}case W:throw Error(O(343))}throw Error(O(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(O(65,r));he[r]=!0}var o,i,a,s,c,u=e.props;if("input"===r)u=E({type:void 0},u,{defaultChecked:void 0,defaultValue:void 0,value:null!=u.value?u.value:u.defaultValue,checked:null!=u.checked?u.checked:u.defaultChecked});else if("textarea"===r){if(null==(l=u.value)){var l=u.defaultValue,f=u.children;if(null!=f){if(null!=l)throw Error(O(92));if(Array.isArray(f)){if(!(f.length<=1))throw Error(O(93));f=f[0]}l=""+f}null==l&&(l="")}u=E({},u,{value:void 0,children:""+l})}else if("select"===r)this.currentSelectValue=null!=u.value?u.value:u.defaultValue,u=E({},u,{value:void 0});else if("option"===r){var f=this.currentSelectValue,p=null==(p=u.children)?p:(o="",C.Children.forEach(p,function(e){null!=e&&(o+=e)}),o);if(null!=f){var d=null!=u.value?u.value+"":p;if(l=!1,Array.isArray(f)){for(var h=0;h<f.length;h++)if(""+f[h]===d){l=!0;break}}else l=""+f===d;u=E({selected:void 0,children:void 0},u,{selected:l,children:p})}}if(l=u){if(ce[r]&&(null!=l.children||null!=l.dangerouslySetInnerHTML))throw Error(O(137,r,""));if(null!=l.dangerouslySetInnerHTML){if(null!=l.children)throw Error(O(60));if(!("object"==typeof l.dangerouslySetInnerHTML&&"__html"in l.dangerouslySetInnerHTML))throw Error(O(61))}if(null!=l.style&&"object"!=typeof l.style)throw Error(O(62,""))}for(_ in l=u,f=this.makeStaticMarkup,p=1===this.stack.length,d="<"+e.type,l)if(ye.call(l,_)){var y=l[_];if(null!=y){if("style"===_){var m,g,v,b,h=void 0,w="",S="";for(h in y)y.hasOwnProperty(h)&&(m=0===h.indexOf("--"),null!=(g=y[h]))&&(w+=S+(b=m?h:(b=h,A.hasOwnProperty(b)?A[b]:(v=b.replace(le,"-$1").toLowerCase().replace(fe,"-ms-"),A[b]=v)))+":",S=h,w+=m=null==g||"boolean"==typeof g||""===g?"":m||"number"!=typeof g||0===g||M.hasOwnProperty(S)&&M[S]?(""+g).trim():g+"px",S=";");y=w||null}h=null;e:if(g=l,-1===(m=r).indexOf("-"))m="string"==typeof g.is;else switch(m){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":m=!1;break e;default:m=!0}m?me.hasOwnProperty(_)||(h=Z(h=_)&&null!=y?h+'="'+k(y)+'"':""):(i=_,a=y,c=s=void 0,s=x.hasOwnProperty(i)?x[i]:null,h=(c=(c="style"!==i)&&(null!==s?0===s.type:2<i.length&&("o"===i[0]||"O"===i[0])&&("n"===i[1]||"N"===i[1])))||J(i,a,s,!1)?"":null!==s?(i=s.attributeName,3===(c=s.type)||4===c&&!0===a?i+'=""':i+'="'+k(a=s.sanitizeURL?""+a:a)+'"'):Z(i)?i+'="'+k(a)+'"':""),h&&(d+=" "+h)}}f||p&&(d+=' data-reactroot=""');var _=d;l="",se.hasOwnProperty(r)?_+="/>":(_+=">",l="</"+e.type+">");e:{if(null!=(f=u.dangerouslySetInnerHTML)){if(null!=f.__html){f=f.__html;break e}}else if("string"==typeof(f=u.children)||"number"==typeof f){f=k(f);break e}f=null}return null!=f?(u=[],pe.hasOwnProperty(r)&&"\n"===f.charAt(0)&&(_+="\n"),_+=f):u=N(u.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:u,childIndex:0,context:t,footer:l}),this.previousWasTextNode=!1,_};var be=we,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(O(207))},renderToStaticNodeStream:function(){throw Error(O(208))},version:"16.14.0"};function we(e,t){if(e=C.isValidElement(e)&&(e.type!==c||(e=e.props.children,C.isValidElement(e)))?[e]:N(e),e={type:null,domNamespace:ie,children:e,childIndex:0,context:q,footer:""},0===(n=y[0])){var n,r=y,o=2*(n=r.length);if(!(o<=65536))throw Error(O(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.1.4","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.13.3","@storybook/addon-docs":"6.5.10","@storybook/addon-essentials":"6.5.10","@storybook/react":"6.5.10","@storybook/storybook-deployer":"2.8.12","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":"^16.4.0","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":"^4.0.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":"^2.13.3","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 _o}),o.d(e,"EditorPreview",function(){return Uo});var y=o(0),m=o.n(y),e=o(1),d=o.n(e),h=o(2),g=o(4),e=o(39),L=o.n(e),e=o(92),z=o.n(e),F=o(24),e=o(5),v=o.n(e);function B(e){return(B="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){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,function(e){e=function(e,t){if("object"!==B(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===B(e)?e:String(e)}(r.key),r)}}function H(e,t,n){return t&&K(e.prototype,t),n&&K(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var U=H(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 W(e){return(W="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 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,function(e){e=function(e,t){if("object"!==W(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===W(e)?e:String(e)}(r.key),r)}}function V(e,t,n){return t&&q(e.prototype,t),n&&q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var G,Y=V(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}}),$=[],Z={onKeyDown:function(t){$.forEach(function(e){e(t)})},registerCallBack:function(e){$.push(e)},deregisterCallBack:function(t){$=$.filter(function(e){return e!==t})}},J=function(){G=!0},X=function(){G=!1},Q=function(){return G};function ee(e){e=e.getData()&&e.getData().get("text-align");return e?"rdw-".concat(e,"-aligned-block"):""}function te(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function s(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 ne(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 re(e){return e[e.options[0]].icon}function oe(e,n){var r;return e&&void 0===n?e:(r={},te(e,function(e,t){"[object Object]"===Object.prototype.toString.call(t)?r[e]=oe(t,n[e]):r[e]=void 0!==n[e]?n[e]:t}),r)}function i(e){return(i="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 ie(e,t,n){(t=se(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}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,se(r.key),r)}}function se(e){e=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===i(e)?e:String(e)}function ce(e,t){return(ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=le(n),t=(e=r?(e=le(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===i(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 le(e){return(le=Object.setPrototypeOf?Object.getPrototypeOf.bind():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&&ce(t,e);var n,a=ue(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()((ie(e={},"Editor-option",!0),ie(e,"Editor-option--active",i&&!o),ie(e,"".concat(o),i&&o),ie(e,"Editor-option--disabled",a),e),r);return m.a.createElement("div",{"aria-label":t,onKeyDown:this.handleKeyDown,tabIndex:0,className:o,onClick:this.onClick,"aria-selected":i},n)}}])&&ae(t.prototype,e),n&&ae(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),b=(u.propTypes={onClick:d.a.func.isRequired,children:d.a.any,value:d.a.string,className:d.a.string,activeClassName:d.a.string,active:d.a.bool,disabled:d.a.bool,title:d.a.string,tabIndex:d.a.number},u.defaultProps={activeClassName:""},o(3));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 fe(e,t,n){(t=de(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}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,de(r.key),r)}}function de(e){e=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===a(e)?e:String(e)}function he(e,t){return(he=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=me(n),t=(e=r?(e=me(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 me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf.bind():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&&he(t,e);var n,r=ye(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=m.a.createRef(),i.listRef=m.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()((fe(l={},"Editor-dropdown",!0),fe(l,"Editor-dropdown--expanded",t),l),o);return m.a.createElement("div",{className:l},m.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&&m.a.createElement(b.f,{name:"keyboard_arrow_down"})),t&&m.a.createElement("ul",{tabIndex:1,ref:this.listRef,onKeyDown:this.handleListKeyDown,className:v()("Editor-dropdown-optionWrapper",i),onClick:f},m.a.Children.map(u,function(e,t){return e&&m.a.cloneElement(e,{onSelect:n.onChange,highlighted:c===t,setHighlighted:n.setHighlighted,highlightedClassName:"Editor-dropdown-option--highlight",index:t})})))}}])&&pe(t.prototype,e),n&&pe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component);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 ge(e,t,n){(t=be(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}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,be(r.key),r)}}function be(e){e=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===c(e)?e:String(e)}function we(e,t){return(we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Se(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=_e(n),t=(e=r?(e=_e(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===c(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 _e(e){return(_e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}w.propTypes={children:d.a.any,onChange:d.a.func,className:d.a.string,expanded:d.a.bool,menu:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,optionWrapperClassName:d.a.string,triggerClassName:d.a.string,ariaLabel:d.a.string,title:d.a.string};var S=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&&we(t,e);var n,a=Se(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()((ge(e={},"Editor-dropdown-option",!0),ge(e,"Editor-dropdown-option--active ".concat(c),r&&!s),ge(e,"".concat(t),i),ge(e,"".concat(u),o),e),a);return m.a.createElement("li",{tabIndex:1,className:c,onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick},n)}}])&&ve(t.prototype,e),n&&ve(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);function l(e){return(l="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,Ce(r.key),r)}}function Ce(e){e=function(e,t){if("object"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===l(e)?e:String(e)}function Oe(e,t){return(Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():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"===l(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}S.propTypes={children:d.a.any,value:d.a.any,onClick:d.a.func,onSelect:d.a.func,setHighlighted:d.a.func,index:d.a.number,disabled:d.a.bool,active:d.a.bool,highlighted:d.a.bool,className:d.a.string,activeClassName:d.a.string,disabledClassName:d.a.string,highlightedClassName:d.a.string,title:d.a.string,isCheckbox:d.a.bool},S.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""};var De=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(){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 m.a.createElement(b.n,{tooltip:"More formatting"},m.a.createElement(w,{onChange:e,expanded:t,doExpand:n,doCollapse:o,onExpandEvent:r,triggerClassName:"Editor-textDecoration-moreIcon",menu:!0},m.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 m.a.createElement(S,{key:t,value:e,active:n,isCheckbox:1<s},1<s?m.a.createElement(b.b,{checked:n,label:r}):m.a.createElement(m.a.Fragment,null,m.a.createElement(b.f,{size:20,name:o,className:"mr-4",appearance:n?"white":"default"}),m.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()((e={},t=!0,(c=Ce(c="Editor-textDecoration"))in e?Object.defineProperty(e,c,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[c]=t,e),n);return m.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 m.a.createElement(b.n,{tooltip:o},m.a.createElement(u,{"aria-label":"".concat(e," button"),role:"button",tabIndex:0,key:t,value:e,onClick:s,active:n,className:"mr-2"},m.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}(y.Component);function p(e){return(p="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,function(e){e=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===p(e)?e:String(e)}(r.key),r)}}function Te(e,t){return(Te=Object.setPrototypeOf?Object.setPrototypeOf.bind():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"===p(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}De.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,className:d.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&&Te(t,e);var n,r=Ie(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(g.getSelectionEntity)(n);if(r){r=n.getCurrentContent().getEntity(r).getType();if("MENTION"===r||"LINK"===r)return}r=h.RichUtils.toggleInlineStyle(n,e);r&&t(r)},o.changeKeys=function(e){var n;if(e)return n={},te(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(g.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(g.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||De;return m.a.createElement(o,{config:t,currentState:n,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle,className:e})}}])&&je(t.prototype,e),n&&je(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);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 Ne(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,function(e){e=function(e,t){if("object"!==_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===_(e)?e:String(e)}(r.key),r)}}function Pe(e,t){return(Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=Re(n),t=(e=r?(e=Re(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===_(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,className:d.a.string};var t=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=Ae(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 m.a.createElement("div",{className:t,"aria-label":"Editor-block-control"},m.a.createElement(b.n,{tooltip:"Text style"},m.a.createElement(w,{onChange:c,expanded:o,doExpand:i,doCollapse:s,onExpandEvent:a,triggerClassName:"Editor-heading-trigger"},m.a.createElement(b.f,{name:n,size:20}),e.map(function(e,t){return m.a.createElement(S,{index:t,active:r===e.label,value:e.label,key:t},m.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)}}])&&Ne(t.prototype,e),n&&Ne(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Le=(t.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doExpand:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,className:d.a.string},t);function E(e){return(E="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 ze(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,function(e){e=function(e,t){if("object"!==E(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===E(e)?e:String(e)}(r.key),r)}}function Fe(e,t){return(Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Be(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"===E(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}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&&Fe(t,e);var n,r=Be(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=h.RichUtils.toggleBlockType(r,e);r&&n(r)};e=e.editorState;return o.state={expanded:!1,currentBlockType:e?Object(g.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(g.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 m.a.createElement(Le,{config:t,currentState:{blockType:n&&n.label},onChange:this.toggleBlockType,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,className:e})}}])&&ze(t.prototype,e),n&&ze(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component),t.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,config:d.a.object,className:d.a.string};o(201);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 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,function(e){e=function(e,t){if("object"!==C(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===C(e)?e:String(e)}(r.key),r)}}function Ue(e,t){return(Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=qe(n),t=(e=r?(e=qe(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===C(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ve=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&&Ue(t,e);var n,i=We(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 m.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 m.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},m.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}})}))}}])&&He(t.prototype,e),n&&He(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(y.Component);function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}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,function(e){e=function(e,t){if("object"!==O(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===O(e)?e:String(e)}(r.key),r)}}function Ye(e,t){return(Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():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"===O(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ve.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doExpand:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,translations:d.a.object};var Je=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&&Ye(t,e);var n,o=$e(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(g.toggleCustomInlineStyle)(n,"fontSize",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontSize:t?Object(g.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(g.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||Ve,n=n&&Number(n.substring(9));return m.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})}}])&&Ge(t.prototype,e),n&&Ge(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);Je.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,modalHandler:d.a.object,config:d.a.object,translations:d.a.object},o(202);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 Xe(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,function(e){e=function(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===x(e)?e:String(e)}(r.key),r)}}function Qe(e,t){return(Qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=tt(n),t=(e=r?(e=tt(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 tt(e){return(tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var n=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&&Qe(t,e);var n,i=et(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 m.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},m.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"]},m.a.createElement("span",{className:"rdw-fontfamily-placeholder"},f||a["components.controls.fontfamily.fontfamily"]),i.map(function(e,t){return m.a.createElement(S,{active:f===e,value:e,key:t},e)})))}}])&&Xe(t.prototype,e),n&&Xe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(y.Component),nt=(n.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doExpand:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,translations:d.a.object},n);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 rt(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,function(e){e=function(e,t){if("object"!==k(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===k(e)?e:String(e)}(r.key),r)}}function ot(e,t){return(ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function it(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=at(n),t=(e=r?(e=at(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===k(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 at(e){return(at=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n=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&&ot(t,e);var n,o=it(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(g.toggleCustomInlineStyle)(n,"fontFamily",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontFamily:t?Object(g.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(g.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||nt,n=n&&n.substring(11);return m.a.createElement(o,{translations:e,config:t,currentState:{fontFamily:n},onChange:this.toggleFontFamily,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&rt(t.prototype,e),n&&rt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function st(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,ct(r.key),r)}}function ct(e){e=function(e,t){if("object"!==D(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===D(e)?e:String(e)}function ut(e,t){return(ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lt(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=ft(n),t=(e=r?(e=ft(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===D(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 ft(e){return(ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var pt=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&&ut(t,e);var n,a=lt(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()((e={},t=!0,(a=ct(a="d-flex"))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e),n);return m.a.createElement("div",{className:a},m.a.createElement(b.n,{tooltip:i.title},m.a.createElement(u,{value:"unordered",onClick:this.toggleBlockType,active:"unordered"===o,className:"mr-2"},m.a.createElement(b.f,{appearance:"unordered"===o?"info":"default",name:i.icon,size:20}))),m.a.createElement(b.n,{tooltip:r.title},m.a.createElement(u,{value:"ordered",onClick:this.toggleBlockType,active:"ordered"===o},m.a.createElement(b.f,{appearance:"ordered"===o?"info":"default",name:r.icon,size:20}))))}}])&&st(t.prototype,e),n&&st(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);function j(e){return(j="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 dt(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,function(e){e=function(e,t){if("object"!==j(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===j(e)?e:String(e)}(r.key),r)}}function ht(e,t){return(ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=mt(n),t=(e=r?(e=mt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===j(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 mt(e){return(mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}pt.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,className:d.a.string};var gt=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&&ht(t,e);var n,o=yt(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=h.RichUtils.toggleBlockType(t,e);t&&n(t)},r.adjustDepth=function(e){var t=r.props,n=t.onChange,t=t.editorState,t=Object(g.changeDepth)(t,e,4);t&&n(t)},r.isIndentDisabled=function(){var e=r.props.editorState,t=r.state.currentBlock,e=Object(g.getBlockBeforeSelectedBlock)(e);return!e||!Object(g.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(g.isListBlock)(e)||e.get("depth")<=0};var e=r.props,t=e.editorState,e=e.modalHandler;return r.state={expanded:!1,currentBlock:t?Object(g.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(g.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"),m.a.createElement(pt,{config:n,translations:r,currentState:{listType:e},expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,className:t})}}])&&dt(t.prototype,e),n&&dt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);gt.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object,className:d.a.string},o(203);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 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,function(e){e=function(e,t){if("object"!==T(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===T(e)?e:String(e)}(r.key),r)}}function bt(e,t){return(bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wt(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"===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 St(e){return(St=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _t=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&&bt(t,e);var n,r=wt(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 m.a.createElement("div",{className:v()("rdw-text-align-wrapper",t),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&m.a.createElement(u,{value:"left",className:v()(r.className),active:"left"===c,onClick:s,title:r.title||e["components.controls.textalign.left"]},m.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&m.a.createElement(u,{value:"center",className:v()(o.className),active:"center"===c,onClick:s,title:o.title||e["components.controls.textalign.center"]},m.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&m.a.createElement(u,{value:"right",className:v()(i.className),active:"right"===c,onClick:s,title:i.title||e["components.controls.textalign.right"]},m.a.createElement("img",{src:i.icon,alt:""})),0<=n.indexOf("justify")&&m.a.createElement(u,{value:"justify",className:v()(a.className),active:"justify"===c,onClick:s,title:a.title||e["components.controls.textalign.justify"]},m.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 m.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"]},m.a.createElement("img",{src:a&&t[a]&&t[a].icon||re(t),alt:""}),0<=c.indexOf("left")&&m.a.createElement(S,{value:"left",active:"left"===a,className:v()("rdw-text-align-dropdownOption",u.className),title:u.title||e["components.controls.textalign.left"]},m.a.createElement("img",{src:u.icon,alt:""})),0<=c.indexOf("center")&&m.a.createElement(S,{value:"center",active:"center"===a,className:v()("rdw-text-align-dropdownOption",l.className),title:l.title||e["components.controls.textalign.center"]},m.a.createElement("img",{src:l.icon,alt:""})),0<=c.indexOf("right")&&m.a.createElement(S,{value:"right",active:"right"===a,className:v()("rdw-text-align-dropdownOption",f.className),title:f.title||e["components.controls.textalign.right"]},m.a.createElement("img",{src:f.icon,alt:""})),0<=c.indexOf("justify")&&m.a.createElement(S,{value:"justify",active:"justify"===a,className:v()("rdw-text-align-dropdownOption",p.className),title:p.title||e["components.controls.textalign.justify"]},m.a.createElement("img",{src:p.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&vt(t.prototype,e),n&&vt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component);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,function(e){e=function(e,t){if("object"!==Et(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Et(e)?e:String(e)}(r.key),r)}}function Ot(e,t){return(Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}_t.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,translations:d.a.object};var Dt=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&&Ot(t,e);var n,o=xt(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(g.setBlockData)(n,{"text-align":e}):Object(g.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(g.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||_t;return m.a.createElement(o,{config:t,translations:e,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:n},onChange:this.addBlockAlignmentData})}}])&&Ct(t.prototype,e),n&&Ct(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);function jt(e){return(jt="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 Tt(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,function(e){e=function(e,t){if("object"!==jt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==jt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===jt(e)?e:String(e)}(r.key),r)}}function It(e,t){return(It=Object.setPrototypeOf?Object.setPrototypeOf.bind():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"===jt(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Dt.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var Pt=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&&It(t,e);var n,r=Mt(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 m.a.createElement("div",{className:"Editor-colorPicker",onClick:o.handleClick,onKeyDown:o.handleKeyDown},t.map(function(e,t){return m.a.createElement("div",{className:"Editor-colorPicker-circleWrapper"},m.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&&m.a.createElement(b.f,{name:"check",appearance:"white",className:"Editor-colorPicker-selectedCircle"}))}))},o.state={currentStyle:"color"},o.ref=m.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=m.a.createElement(b.n,{tooltip:"Text color"},m.a.createElement(u,{tabIndex:0,"aria-label":"Font colors",onClick:n,active:t,activeClassName:"bg-secondary"},m.a.createElement(b.f,{name:"text_format",size:20})));return m.a.createElement("div",{className:e,"aria-haspopup":"true","aria-expanded":t},m.a.createElement(b.l,{trigger:n,position:"bottom-start",open:t},this.renderModal()))}}])&&Tt(t.prototype,e),n&&Tt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component),At=(Pt.propTypes={expanded:d.a.bool,onToggle:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,className:d.a.className},Pt);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,function(e){e=function(e,t){if("object"!==Rt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Rt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Rt(e)?e:String(e)}(r.key),r)}}function zt(e,t){return(zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ft(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=Bt(n),t=(e=r?(e=Bt(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 Bt(e){return(Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pt=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&&zt(t,e);var n,r=Ft(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(g.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(g.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR,expanded:!1}},function(){var e=Object(g.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(g.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR||"color-var(--text)",n.currentBgColor=Object(g.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||At,r=r&&r.substring(6),o=o&&o.substring(8);return m.a.createElement(i,{config:t,className:e,onChange:this.toggleColor,expanded:n,onToggle:this.toggleColorPicker,currentState:{color:r,bgColor:o}})}}])&&Lt(t.prototype,e),n&&Lt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),r=(Pt.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,className:d.a.string},o(93)),r=o.n(r);function Kt(e){return(Kt="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 Ht(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,Ut(r.key),r)}}function Ut(e){e=function(e,t){if("object"!==Kt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Kt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Kt(e)?e:String(e)}function Wt(e,t){return(Wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=Vt(n),t=(e=r?(e=Vt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Kt(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var I=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&&Wt(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={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=Ut(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;return m.a.createElement("div",{className:"px-6 mt-6 mb-5",onClick:f},m.a.createElement(b.m,{weight:"strong",size:"large"},t?"Edit":"Insert a"," link"),m.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:f}),m.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:f}),m.a.createElement("div",{className:"d-flex justify-content-end"},m.a.createElement(b.a,{onClick:e,className:"mr-4"},"Cancel"),m.a.createElement(b.a,{onClick:this.addLink,disabled:!r||!n,appearance:"primary"},"Save")))}},{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?m.a.createElement(S,null,m.a.createElement(b.f,{size:20,name:n,className:"mr-4"}),m.a.createElement(b.m,null,t)):m.a.createElement(b.n,{tooltip:"Link"},m.a.createElement(u,{value:"unordered-list-item",onClick:o,"aria-haspopup":"true","aria-expanded":e,active:e,activeClassName:"bg-secondary"},m.a.createElement(b.f,{name:n,size:20})));return m.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e},m.a.createElement(b.l,{trigger:t,position:r?"right":"bottom",open:e,onToggle:o},this.renderAddLinkModal()))}}])&&Ht(t.prototype,e),n&&Ht(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),Gt=(I.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,inDropdown:d.a.boolean},I);function Yt(e){return(Yt="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 $t(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,tn(r.key),r)}}function Zt(e,t){return(Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Jt(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=Xt(n),t=(e=r?(e=Xt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Yt(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 Xt(e){return(Xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qt(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 en(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Qt(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=tn(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)):Qt(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function tn(e){e=function(e,t){if("object"!==Yt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Yt(e)?e:String(e)}function nn(e){var t=rn.match(e.target);return en(en({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var rn=r()(),I=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&&Zt(t,e);var n,r=Jt(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||nn)({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(g.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(g.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(g.getEntityRange)(t,n),r=r.getIsBackward()?r.merge({anchorOffset:n.end,focusOffset:n.start}):r.merge({anchorOffset:n.start,focusOffset:n.end}),e(h.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(g.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=h.Modifier.replaceText(o.getCurrentContent(),a,"".concat(e),null,i),n=h.EditorState.push(o,t,"insert-characters");a=n.getSelection().merge({anchorOffset:a.get("anchorOffset")+e.length,focusOffset:a.get("anchorOffset")+e.length}),n=h.EditorState.acceptSelection(n,a),t=h.Modifier.insertText(n.getCurrentContent(),a," ",n.getCurrentInlineStyle(),void 0),r(h.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(g.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(g.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 m.a.createElement(Gt,{config:t,expanded:n,inDropdown:e,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:o,selectionText:r},onChange:this.onChange})}}])&&$t(t.prototype,e),n&&$t(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),r=(I.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,onCloseLinkPopover:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,inDropdown:d.a.boolean,linkPopoverOpen:d.a.bool},I);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,function(e){e=function(e,t){if("object"!==on(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==on(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===on(e)?e:String(e)}(r.key),r)}}function sn(e,t){return(sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}I=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&&sn(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");(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(g.getEntityRange)(t,r),o=o.getIsBackward()?o.merge({anchorOffset:r.end,focusOffset:r.start}):o.merge({anchorOffset:r.start,focusOffset:r.end})),h.Modifier.replaceText(t.getCurrentContent(),o,"".concat(e),t.getCurrentInlineStyle(),void 0)),o=h.EditorState.push(t,r,"insert-characters");n(h.EditorState.push(o,r,"insert-characters"))};e=i.props.editorState;return i.state={selectionText:void 0,link:void 0,currentEntity:e?Object(g.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(g.getSelectionEntity)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,t=t.title,r=e.mention.label;e.inDropdown;return m.a.createElement(b.n,{tooltip:r||t},m.a.createElement(u,{value:"unordered-list-item",onClick:this.addLink,className:"mr-2"},m.a.createElement(b.f,{name:n,size:20})))}}])&&an(t.prototype,e),n&&an(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),I.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,config:d.a.object,inDropdown:d.a.boolean};o(209);function ln(e){return(ln="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 fn(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,pn(r.key),r)}}function pn(e){e=function(e,t){if("object"!==ln(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==ln(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ln(e)?e:String(e)}function dn(e,t){return(dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():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"===ln(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mn=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,a=hn(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=pn(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 m.a.createElement("div",{className:v()("rdw-embedded-modal",o),onClick:f},m.a.createElement("div",{className:"rdw-embedded-modal-header"},m.a.createElement("span",{className:"rdw-embedded-modal-header-option"},r["components.controls.embedded.embeddedlink"],m.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),m.a.createElement("div",{className:"rdw-embedded-modal-link-section"},m.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},m.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"}),m.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),m.a.createElement("div",{className:"rdw-embedded-modal-size"},m.a.createElement("span",null,m.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),m.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),m.a.createElement("span",null,m.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:e,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),m.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),m.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},m.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!e},r["generic.add"]),m.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 m.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-embedded-control"},m.a.createElement(u,{className:v()(r),value:"unordered-list-item",onClick:i,title:t||e["components.controls.embedded.embedded"]},m.a.createElement("img",{src:n,alt:""})),o?this.rendeEmbeddedLinkModal():void 0)}}])&&fn(t.prototype,e),n&&fn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),gn=(mn.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,onChange:d.a.func,config:d.a.object,translations:d.a.object,doCollapse:d.a.func},mn);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 bn(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,function(e){e=function(e,t){if("object"!==vn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==vn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===vn(e)?e:String(e)}(r.key),r)}}function wn(e,t){return(wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=_n(n),t=(e=r?(e=_n(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 _n(e){return(_n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}mn=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&&wn(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(h.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||gn;return m.a.createElement(r,{config:t,translations:e,onChange:this.addEmbeddedLink,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&bn(t.prototype,e),n&&bn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),mn.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};o(210);function En(e){return(En="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 Cn(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,function(e){e=function(e,t){if("object"!==En(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==En(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===En(e)?e:String(e)}(r.key),r)}}function On(e,t){return(On=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xn(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=kn(n),t=(e=r?(e=kn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===En(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 kn(e){return(kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Dn=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&&On(t,e);var n,a=xn(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 m.a.createElement("div",{className:v()("rdw-emoji-modal",t),onClick:f},e.map(function(e,t){return m.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 m.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"]},m.a.createElement(u,{className:v()(r),value:"unordered-list-item",onClick:i},m.a.createElement("img",{src:n,alt:""})),o?this.renderEmojiModal():void 0)}}])&&Cn(t.prototype,e),n&&Cn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),jn=(Dn.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,onChange:d.a.func,config:d.a.object,translations:d.a.object},Dn);function Tn(e){return(Tn="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 In(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,function(e){e=function(e,t){if("object"!==Tn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Tn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Tn(e)?e:String(e)}(r.key),r)}}function Mn(e,t){return(Mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=Pn(n),t=(e=r?(e=Pn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Tn(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 Pn(e){return(Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Dn=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&&Mn(t,e);var n,a=Nn(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=h.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());t(h.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||jn;return m.a.createElement(r,{config:t,translations:e,onChange:this.addEmoji,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&In(t.prototype,e),n&&In(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);function An(e){return(An="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,Ln(r.key),r)}}function Ln(e){e=function(e,t){if("object"!==An(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==An(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===An(e)?e:String(e)}function zn(e,t){return(zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():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"===An(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Dn.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var Kn=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&&zn(t,e);var n,r=Fn(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=Ln(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]),e.target.value=null},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=m.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?m.a.createElement(S,null,m.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},m.a.createElement(b.f,{name:n,size:20,className:"mr-4"}),m.a.createElement(b.m,null,r)),m.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"})):m.a.createElement("div",{"aria-haspopup":"true","aria-expanded":o},m.a.createElement(b.n,{tooltip:r},m.a.createElement(u,{"aria-label":"add image",className:"mr-2",value:"unordered-list-item",onClick:this.fileUploadClick},m.a.createElement("span",null,m.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},m.a.createElement(b.f,{name:n,size:20}))),m.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"}))))}}])&&Rn(t.prototype,e),n&&Rn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Hn=(Kn.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,translations:d.a.object,inDropdown:d.a.bool},Kn);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 Wn(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,function(e){e=function(e,t){if("object"!==Un(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Un(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Un(e)?e:String(e)}(r.key),r)}}function qn(e,t){return(qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Vn(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=Gn(n),t=(e=r?(e=Gn(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 Gn(e){return(Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Yn(e){var t=e.config,n=e.onChange,e=e.translations,r=t.icon,o=t.className,t=t.title;return m.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},m.a.createElement(u,{className:v()(o),onClick:n,title:t||e["components.controls.remove.remove"]},m.a.createElement("img",{src:r,alt:""})))}var Kn=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&&qn(t,e);var n,r=Vn(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(h.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 m.a.createElement(Hn,{config:t,inDropdown:e,onChange:this.addImage})}}])&&Wn(t.prototype,e),n&&Wn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),$n=(Kn.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,config:d.a.object,inDropdown:d.a.bool},o(211),Yn.propTypes={onChange:d.a.func,config:d.a.object,translations:d.a.object},Yn);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 Jn(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,function(e){e=function(e,t){if("object"!==Zn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Zn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Zn(e)?e:String(e)}(r.key),r)}}function Xn(e,t){return(Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=er(n),t=(e=r?(e=er(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 er(e){return(er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tr=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&&Xn(t,e);var n,a=Qn(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=h.Modifier.removeInlineStyle(r,n.getSelection(),e)}),te(Object(g.getSelectionCustomInlineStyle)(n,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(e,t){t&&(r=h.Modifier.removeInlineStyle(r,n.getSelection(),t))}),h.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||$n;return m.a.createElement(r,{config:t,translations:e,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Jn(t.prototype,e),n&&Jn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);tr.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,config:d.a.object,translations:d.a.object,modalHandler:d.a.object},o(212);function nr(e){return(nr="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,function(e){e=function(e,t){if("object"!==nr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==nr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===nr(e)?e:String(e)}(r.key),r)}}function or(e,t){return(or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ir(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=ar(n),t=(e=r?(e=ar(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===nr(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 ar(e){return(ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sr=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&&or(t,e);var n,a=ir(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 m.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"]},m.a.createElement("img",{src:re(t),alt:""}),0<=c.indexOf("undo")&&m.a.createElement(S,{value:"undo",onClick:this.onChange,disabled:s,className:v()("rdw-history-dropdownoption",u.className),title:u.title||e["components.controls.history.undo"]},m.a.createElement("img",{src:u.icon,alt:""})),0<=c.indexOf("redo")&&m.a.createElement(S,{value:"redo",onClick:this.onChange,disabled:a,className:v()("rdw-history-dropdownoption",l.className),title:l.title||e["components.controls.history.redo"]},m.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 m.a.createElement("div",{className:v()("rdw-history-wrapper",t),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&m.a.createElement(u,{value:"undo",onClick:this.onChange,className:v()(r.className),disabled:a,title:r.title||e["components.controls.history.undo"]},m.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&m.a.createElement(u,{value:"redo",onClick:this.onChange,className:v()(o.className),disabled:i,title:o.title||e["components.controls.history.redo"]},m.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&rr(t.prototype,e),n&&rr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);function cr(e){return(cr="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 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,function(e){e=function(e,t){if("object"!==cr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==cr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===cr(e)?e:String(e)}(r.key),r)}}function lr(e,t){return(lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():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"===cr(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}sr.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,translations:d.a.object};var dr=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&&lr(t,e);var n,o=fr(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=h.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||sr;return m.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})}}])&&ur(t.prototype,e),n&&ur(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);function hr(e){return(hr="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)}dr.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var yr=["config","currentState","onChange"],mr=["config"];function gr(){return(gr=Object.assign?Object.assign.bind():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,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 br(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,function(e){e=function(e,t){if("object"!==hr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==hr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===hr(e)?e:String(e)}(r.key),r)}}function wr(e,t){return(wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Sr(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=_r(n),t=(e=r?(e=_r(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===hr(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 _r(e){return(_r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Er=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&&wr(t,e);var n,r=Sr(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,vr(e,yr));this.state.expanded;return m.a.createElement(w,{expanded:this.state.expanded,doExpand:this.doExpand,doCollapse:this.doCollapse,onExpandEvent:this.onExpandEvent,menu:!0},m.a.createElement(b.f,{name:"more_horizon"}),o.options.slice(o.max,o.options.length).map(function(e,t){var n=o[e],e=Cr[e];return m.a.createElement(e,gr({key:t,config:n,inDropdown:!0,onChange:r.onChange},i))}))}},{key:"render",value:function(){var o=this,e=this.props,i=e.config,a=vr(e,mr),e=i.max;return m.a.createElement("div",{className:"Editor-toolbar-insert"},i.options.slice(0,e).map(function(e,t){var n=i[e],r=Cr[e];return(o.props.mention||"mention"!==e)&&n.isVisible?m.a.createElement(r,gr({key:t,config:n,inDropdown:!1},a)):null}))}}])&&br(t.prototype,e),n&&br(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Cr=(Er.propTypes={onChange:d.a.func.isRequired,onCloseLinkPopover:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,mention:d.a.object,linkPopoverOpen:d.a.bool,translations:d.a.object},{textDecoration:e,heading:t,fontSize:Je,insert:Er,fontFamily:n,list:gt,textAlign:Dt,colorPicker:Pt,link:r,mention:I,embedded:mn,emoji:Dn,image:Kn,remove:tr,history:dr});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)}function xr(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,function(e){e=function(e,t){if("object"!==Or(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Or(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Or(e)?e:String(e)}(r.key),r)}}function kr(e,t){return(kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=jr(n),t=(e=r?(e=jr(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 jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Tr(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"LINK"===n.getEntity(e).getType()},t)}function Ir(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=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(g.getEntityRange)(e,n),t=t.getIsBackward()?t.merge({anchorOffset:e.end,focusOffset:e.start}):t.merge({anchorOffset:e.start,focusOffset:e.end}),n=h.Modifier.setBlockType(r,t,"unstyled"),n=h.Modifier.removeRange(n,t,"backward");c.onChange(h.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=m.a.createElement("span",{contentEditable:"false",suppressContentEditableWarning:!0},m.a.createElement(b.m,{appearance:"link"},t));return m.a.createElement(b.l,{trigger:t,appendToBody:!0,open:n,onToggle:this.onToggle},m.a.createElement("div",{contentEditable:"false",suppressContentEditableWarning:!0,className:"d-flex pl-5 py-5 pr-4 align-items-center"},m.a.createElement(b.h,{href:e,target:"_new",className:"Editor-link"},e),m.a.createElement("span",{className:"Editor-seperator"}),m.a.createElement(b.a,{"aria-label":"Edit",onClick:this.onEditLink,appearance:"transparent",icon:"edit"}),m.a.createElement("span",{className:"Editor-seperator"}),m.a.createElement(b.a,{"aria-label":"Delete",onClick:this.onDeleteLink,appearance:"transparent",icon:"delete"})))}}])&&xr(t.prototype,e),n&&xr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);return e.propTypes={entityKey:d.a.string.isRequired,children:d.a.array,contentState:d.a.object},e}function Mr(e){return(Mr="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 Nr(){return(Nr=Object.assign?Object.assign.bind():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 Pr(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 Ar(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Pr(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=zr(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)):Pr(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}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,zr(r.key),r)}}function Lr(e,t,n){return t&&Rr(e.prototype,t),n&&Rr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function zr(e){e=function(e,t){if("object"!==Mr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Mr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Mr(e)?e:String(e)}var e=Lr(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=Ar(Ar({type:"input",name:e,clearButton:!1},i.chipOptions),{},{label:t,className:"Editor-mention-chip"}),m.a.createElement(b.c,Nr({},e,{onClose:function(){var e=i.config,t=e.getEditorState(),n=t.getCurrentContent(),r=t.getSelection(),t=Object(g.getEntityRange)(t,o),r=r.getIsBackward()?r.merge({anchorOffset:t.end,focusOffset:t.start}):r.merge({anchorOffset:t.start,focusOffset:t.end+1}),t=h.Modifier.setBlockType(n,r,"unstyled"),t=h.Modifier.removeRange(t,r,"backward");e.onChange(h.EditorState.push(e.getEditorState(),t,"remove-range"))}})))}return e.propTypes={entityKey:d.a.number,children:d.a.array,contentState:d.a.object},e},this.getMentionDecorator=function(){return{strategy:i.findMentionEntities,component:i.getMentionComponent()}},this.config=t,this.chipOptions=t.chipOptions,this.renderer=t.renderer}),Fr=(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 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 M(e,t,n){(t=Vr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Kr(e,t){return(Kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(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,Vr(r.key),r)}}function qr(e,t,n){return t&&Wr(e.prototype,t),n&&Wr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vr(e){e=function(e,t){if("object"!==Br(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Br(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Br(e)?e:String(e)}function Gr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yr(e){var t=e.block,t=(e=e.contentState.getEntity(t.getEntityAt(0)).getData()).src,n=e.height,e=e.width;return m.a.createElement("iframe",{height:n,width:e,src:t,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}var $r=qr(function e(t){var c=this,n=(Gr(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<ne(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,f=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&&Kr(t,e);var r=Hr(o);function o(){var l;Gr(this,o);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(l=r.call.apply(r,[this].concat(t))).state={style:{left:15},activeOption:-1,showSuggestions:!0,showLoader:!1,keyDown:!0},l.focusOption=function(e,t,n){var t=document.querySelectorAll(t),n=("string"==typeof n&&(n=parseInt(n)),"down"===e?n+1:n-1),r=n,e="down"===e?t.length:-1,n=(r===e&&(r=0),t[r=-1===n&&-1===e?t.length-1:r]);n&&n.scrollIntoView({block:"end"})},l.onEditorKeyDown=function(e){var t=l.state.activeOption,n={},r=".Editor-dropdown-option";l.disableMouseEvents(),"ArrowDown"===e.key?(e.preventDefault(),l.focusOption("down",r,t),t===l.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=Number(t)+1):"ArrowUp"===e.key?(e.preventDefault(),l.focusOption("up",r,t),n.activeOption=t<=0?l.filteredSuggestions.length-1:Number(t)-1):"Escape"===e.key?(n.showSuggestions=!1,X()):"Enter"===e.key&&l.addMention(),l.setState(n)},l.onOptionMouseOver=function(e){l.enableMouseEvents();e=parseInt(e.target.getAttribute("data-index"));0<=e&&e<l.filteredSuggestions.length&&l.setState({activeOption:e})},l.disableMouseEvents=function(){l.setState({keyDown:!0})},l.enableMouseEvents=function(){l.setState({keyDown:!1})},l.setSuggestionReference=function(e){l.suggestion=e},l.setDropdownReference=function(e){l.dropdown=e},l.closeSuggestionDropdown=function(){l.state.showSuggestions&&l.setState({showSuggestions:!1})},l.filteredSuggestions=[],l.filterSuggestions=function(e){var t=f.getSuggestions?f.getSuggestions():[];l.filteredSuggestions=ne(t,e,f.caseSensitive)},l.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){f.fetchSuggestions(e).then(function(e){l.filteredSuggestions=e,l.setState({showSuggestions:0<e.length,showLoader:!1})})}),l.updateSuggestions=function(e){e=e.children[0].props.text.substr(1);f.fetchSuggestions?(l.setState({showLoader:!0}),l.debouncedFetchSuggestion(e)):l.filterSuggestions(e)},l.addMention=function(e){var t,n,r,o=l.state.activeOption,i=f.getEditorState(),a=f.onChange,s=f.separator,c=f.trigger,o=l.filteredSuggestions[o],u=l.props.children[0].props.text.substr(1);o&&(i=i,a=a,s=s,c=c,e=e,u=u,t=(o=o).label,n=o.value,o=o.url,n=i.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(c).concat(n),value:n,url:o}).getLastCreatedEntityKey(),o=Object(g.getSelectedBlock)(i).getText(),r=i.getSelection().focusOffset,s=(o.lastIndexOf(s+c,r)||0)+1,c=!1," "===o[r=o.length===s+1?o.length:r]&&(c=!0),e&&(r=s+u.length+1),o=i.getSelection().merge({anchorOffset:s,focusOffset:r}),e=h.EditorState.acceptSelection(i,o),u=h.Modifier.replaceText(e.getCurrentContent(),o,"".concat(t),null,n),e=h.EditorState.push(e,u,"insert-characters"),c||(o=e.getSelection().merge({anchorOffset:s+t.length,focusOffset:s+t.length}),e=h.EditorState.acceptSelection(e,o),u=h.Modifier.insertText(e.getCurrentContent(),o," ",e.getCurrentInlineStyle(),void 0)),a(h.EditorState.push(e,u,"insert-characters")))},l.getOptionClass=function(e){var t,n=l.state.activeOption;return v()((M(t={},"Editor-dropdown-option",!0),M(t,"Editor-dropdown-option--highlight",e===n),M(t,"Editor-dropdown--keydown",l.state.keyDown),t))},l.renderOption=function(e,t){var n,r=f.dropdownOptions,r=(void 0===r?{}:r).customOptionRenderer,o=e.icon,i=e.label;return r?(n=r(e,l.state.activeOption,t),m.a.cloneElement(n,{key:t,spellCheck:!1,onClick:function(e){l.addMention(e),n.props.onClick&&n.props.onClick()},"data-index":t,onMouseOver:l.onOptionMouseOver})):m.a.createElement("span",{key:t,spellCheck:!1,onClick:function(){return l.addMention("onMouseSelect")},"data-index":t,onMouseOver:l.onOptionMouseOver,className:l.getOptionClass(t)},o&&m.a.createElement(b.f,{name:o,className:"mr-4"}),m.a.createElement(b.m,null,i))},l}return qr(o,[{key:"componentDidMount",value:function(){var e=this.suggestion.getBoundingClientRect(),t=e.left,e=e.top+25;this.setState({style:{left:t,top:e}}),Z.registerCallBack(this.onEditorKeyDown),J(),f.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.updateSuggestions(this.props),this.setState({showSuggestions:!0}),document.addEventListener("scroll",this.closeSuggestionDropdown,{once:!0})}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.updateSuggestions(this.props),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("scroll",this.closeSuggestionDropdown),Z.deregisterCallBack(this.onEditorKeyDown),X(),f.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e,n=this,t=this.props.children,r=this.state.showSuggestions,o=f.dropdownOptions,o=(void 0===o?{}:o).dropdownClassName,o=v()((M(e={},"Popover",!0),M(e,"".concat(o),void 0!==o),M(e,"Editor-mention-dropdown",!0),M(e,"position-fixed",!0),e));return m.a.createElement("span",{className:"Editor-mention-suggestion",ref:this.setSuggestionReference,onClick:f.modalHandler.onSuggestionClick,"aria-haspopup":"true"},m.a.createElement("span",null,t),r&&m.a.createElement("span",{className:o,style:this.state.style,contentEditable:"false",suppressContentEditableWarning:!0,ref:this.setDropdownReference,onMouseMove:this.enableMouseEvents,onMouseLeave:this.disableMouseEvents,onScroll:this.enableMouseEvents},this.state.showLoader?m.a.createElement("span",{className:"Editor-dropdown-option"},m.a.createElement(b.j,{withImage:!1},m.a.createElement(b.k,{length:"large"}),m.a.createElement(b.k,{length:"large"}),m.a.createElement(b.k,{length:"large"}))):this.filteredSuggestions.map(function(e,t){return n.renderOption(e,t)})))}}]),o}(y.Component)).propTypes={children:d.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}}),Zr=function(e){return[new Fr(e).getMentionDecorator(),new $r(e).getSuggestionDecorator()]},Jr=(Yr.propTypes={block:d.a.object,contentState:d.a.object},Yr);function Xr(e,t,n){return Math.min(Math.max(e,t),n)}var N={east:1,north:8,south:2,west:4};function Qr(e){function t(e,t){var n,r,o,i=s.current,a=c.current;null!==i&&null!==a&&(n=(r=i.getBoundingClientRect()).width,r=r.height,(o=l.current).startWidth=n,o.startHeight=r,o.ratio=n/r,o.currentWidth=n,o.currentHeight=r,o.startX=e.clientX,o.startY=e.clientY,o.isResizing=!0,o.direction=t,o=(e=t)===N.east||e===N.west,t=e===N.north||e===N.south,e=e&N.north&&e&N.west||e&N.south&&e&N.east,o=o?"ew":t?"ns":e?"nwse":"nesw",null!==f&&f.style.setProperty("cursor","".concat(o,"-resize"),"important"),null!==document.body&&(document.body.style.setProperty("cursor","".concat(o,"-resize"),"important"),u.current.value=document.body.style.getPropertyValue("-webkit-user-select"),u.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important")),a.classList.add("image-control-wrapper--resizing"),i.style.height="".concat(r,"px"),i.style.width="".concat(n,"px"),document.addEventListener("pointermove",d),document.addEventListener("pointerup",h))}var i=e.onResizeEnd,s=e.imageRef,n=e.maxWidth,e=e.editor,c=Object(y.useRef)(),u=Object(y.useRef)({priority:"",value:"default"}),l=Object(y.useRef)({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),f=(Object(y.useEffect)(function(){return function(){document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",h)}},[]),e),a=n||(null!==f?f.getBoundingClientRect().width-20:100),p=null!==f?f.getBoundingClientRect().height-20:100,d=function(e){var t,n=s.current,r=l.current,o=r.direction&(N.east|N.west),i=r.direction&(N.south|N.north);null!==n&&r.isResizing&&(o&&i?(o=Math.floor(r.startX-e.clientX),o=r.direction&N.east?-o:o,t=(o=Xr(r.startWidth+o,100,a))/r.ratio,n.style.width="".concat(o,"px"),n.style.height="".concat(t,"px"),r.currentHeight=t,r.currentWidth=o):i?(t=Math.floor(r.startY-e.clientY),t=r.direction&N.south?-t:t,o=Xr(r.startHeight+t,100,p),n.style.height="".concat(o,"px"),r.currentHeight=o):(i=Math.floor(r.startX-e.clientX),i=r.direction&N.east?-i:i,t=Xr(r.startWidth+i,100,a),n.style.width="".concat(t,"px"),r.currentWidth=t))},h=function e(){var t,n=s.current,r=l.current,o=c.current;null!==n&&null!==o&&r.isResizing&&(n=r.currentWidth,t=r.currentHeight,r.startWidth=0,r.startHeight=0,r.ratio=0,r.startX=0,r.startY=0,r.currentWidth=0,r.currentHeight=0,r.isResizing=!1,o.classList.remove("image-control-wrapper--resizing"),document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",e),null!==f&&f.style.setProperty("cursor","default"),null!==document.body&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",u.current.value,u.current.priority)),i(n,t))};return y.createElement("div",{ref:c},y.createElement("div",{className:"Editor-image-resizer Image-resizer--ne",onPointerDown:function(e){t(e,N.north|N.east)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--se",onPointerDown:function(e){t(e,N.south|N.east)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--sw",onPointerDown:function(e){t(e,N.south|N.west)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--nw",onPointerDown:function(e){t(e,N.north|N.west)}}))}o(213);function eo(e){return(eo="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 to(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,function(e){e=function(e,t){if("object"!==eo(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==eo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===eo(e)?e:String(e)}(r.key),r)}}function no(e,t){return(no=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ro(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=io(n),t=(e=r?(e=io(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===eo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return oo(t)}}function oo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function io(e){return(io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ao=function(f){var 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&&no(t,e);var n,o=ro(i);function i(e){var r;if(this instanceof i)return(r=o.call(this,e)).imageRef=null,r.state={hovered:!1},r.setEntityAlignmentLeft=function(){r.setEntityAlignment("left")},r.setEntityAlignmentRight=function(){r.setEntityAlignment("right")},r.setEntityAlignmentCenter=function(){r.setEntityAlignment("center")},r.setEntityAlignment=function(e){var t=r.props,n=t.block,t=t.contentState,n=n.getEntityAt(0);t.mergeEntityData(n,{alignment:e,alt:e}),f.onChange(h.EditorState.push(f.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 h.SelectionState({anchorKey:t,anchorOffset:0,focusKey:n,focusOffset:0}),n=h.Modifier.setBlockType(e,t,"unstyled"),n=h.Modifier.removeRange(n,t,"backward");f.onChange(h.EditorState.push(f.getEditorState(),n,"remove-range"))},r.toggleHovered=function(){var e;r.state.hovered&&(e=f.getEditorState().getCurrentContent(),f.onChange(h.EditorState.push(f.getEditorState(),e,""))),r.setState({hovered:!r.state.hovered})},r.imageRef=m.a.createRef(),r.onResizeEnd=r.onResizeEnd.bind(oo(r)),r;throw new TypeError("Cannot call a class as a function")}return t=i,(e=[{key:"renderAlignmentOptions",value:function(e){return m.a.createElement("div",{className:"Popover d-flex ".concat(e?"mt-4":"")},m.a.createElement("div",{onClick:this.setEntityAlignmentLeft,className:"Editor-image-options"},m.a.createElement(b.f,{name:"format_align_left",size:20})),m.a.createElement("div",{onClick:this.setEntityAlignmentCenter,className:"Editor-image-options"},m.a.createElement(b.f,{name:"format_align_center",size:20})),m.a.createElement("div",{onClick:this.setEntityAlignmentRight,className:"Editor-image-options"},m.a.createElement(b.f,{name:"format_align_right",size:20})),m.a.createElement("div",{onClick:this.removeEntity,className:"Editor-image-options"},m.a.createElement(b.f,{name:"delete",size:20})))}},{key:"updateImageSize",value:function(e,t){var n=this.props.block.getEntityAt(0),n=f.getEditorState().getCurrentContent().mergeEntityData(n,{width:"".concat(e,"px"),height:"".concat(t,"px")}),e=(f.onChange(h.EditorState.push(f.getEditorState(),n,"")),f.getEditorState()),t=h.Modifier.replaceText(e.getCurrentContent(),e.getSelection()," ");f.onChange(h.EditorState.push(e,t,"insert-characters"))}},{key:"onResizeEnd",value:function(e,t){this.setState({hovered:!1}),this.updateImageSize(e,t)}},{key:"render",value:function(){var e=this.props,t=e.block,e=e.contentState,n=this.state.hovered,r=f.isImageAlignmentEnabled,o=f.isImageResizeEnabled,i=f.isReadOnly,a=f.nonFloatingImage,e=e.getEntity(t.getEntityAt(0)).getData(),t=e.src,s=e.alignment,c=e.height,u=e.width,e=e.alt,a=("center"!==e||s?a&&"right"===e&&!s?this.setEntityAlignmentRight():a&&"left"===e&&!s&&this.setEntityAlignmentLeft():this.setEntityAlignmentCenter(),document.getElementById("RichTextEditorWrapper")),s=v()({"d-flex":!0,"justify-content-end":"right"===s,"justify-content-start":!s||"left"===s,"justify-content-center":"center"===s}),l=v()({"position-relative":!0,"Editor-image--selected":!i&&n&&o,"Editor-image":!i&&!n&&o,"ml-4":o});return m.a.createElement("div",{className:s},m.a.createElement("span",{onClick:this.toggleHovered,className:l},m.a.createElement("img",{src:t,alt:e,style:{height:c,width:u},ref:this.imageRef}),!i&&n&&m.a.createElement(m.a.Fragment,null,r()&&this.renderAlignmentOptions(o),o&&m.a.createElement(Qr,{editor:a,imageRef:this.imageRef,onResizeEnd:this.onResizeEnd}))))}}])&&to(t.prototype,e),n&&to(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);return e.propTypes={block:d.a.object,contentState:d.a.object},e},so=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:ao(n),editable:!1};if(t&&"EMBEDDED_LINK"===t.type)return{component:Jr,editable:!1}}}},co=["var(--text)","var(--secondary)","var(--success)","var(--primary)","var(--alert)","var(--accent1)"],Er=(t="ctrl",t=((null==(Je=navigator.userAgentData)?void 0:Je.platform.toLowerCase())||"linux").includes("mac")?"cmd":t),uo={options:["heading","textDecoration","colorPicker","list","insert"],textDecoration:{max:4,options:["bold","italic","underline","strikethrough"],bold:{icon:"format_bold",title:"Bold (".concat(Er,"+B)"),label:"Bold"},italic:{icon:"format_italic",title:"Italic (".concat(Er,"+I)"),label:"Italic"},underline:{icon:"format_underlined",title:"Underline (".concat(Er,"+U)"),label:"Underline"},strikethrough:{icon:"strikethrough_s",title:"Strikethrough",label:"Strikethrough"}},heading:{icon:"text_fields",options:["H1","H2","H3","H4"]},list:{options:["unordered","ordered"],unordered:{icon:"format_list_bulleted",title:" Bulleted list"},ordered:{icon:"format_list_numbered",title:"Numbered list"}},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",colors:co},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,resizeEnabled:!1,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}},n={title:d.a.string,label:d.a.string},gt={isVisible:d.a.bool,title:d.a.string,alt:d.a.string,uploadCallback:d.a.func,resizeEnabled:d.a.bool,defaultSize:d.a.shape({height:d.a.string,width:d.a.string})},Dt={isVisible:d.a.bool,title:d.a.string},Pt=d.a.shape({textDecoration:d.a.shape({max:d.a.number,bold:d.a.shape(n),italic:d.a.shape(n),underline:d.a.shape(n),strikethrough:d.a.shape(n)}),colorPicker:d.a.shape({colors:d.a.arrayOf(d.a.string)}),insert:d.a.shape({max:d.a.number,image:d.a.shape(gt),link:d.a.shape(Dt)})});o(214),o(94),o(95),o(96),o(97),o(98);o(99),o(100),o(101);function lo(e){return(lo="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 fo(){return(fo=Object.assign?Object.assign.bind():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 po(e){return function(e){if(Array.isArray(e))return ho(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?ho(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ho(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 ho(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 yo(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 P(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?yo(Object(n),!0).forEach(function(e){mo(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yo(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function mo(e,t,n){return(t=vo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function go(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,vo(r.key),r)}}function vo(e){e=function(e,t){if("object"!==lo(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==lo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===lo(e)?e:String(e)}function bo(e,t){return(bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wo(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=So(n),t=(e=r?(e=So(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===lo(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 So(e){return(So=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var 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&&bo(t,e);var n,o=wo(i);function i(e){var a;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(a=o.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){if("Tab"===e.key)return t=a.props.onTab,(n=Object(g.changeDepth)(a.state.editorState,e.shiftKey?-1:1,4))&&n!==a.state.editorState&&(a.onChange(n),e.preventDefault()),t&&t(e,n),null;if("ArrowUp"!==e.key&&"ArrowDown"!==e.key||Q()&&e.preventDefault(),"Backspace"===e.key&&a.isEmptyListBlock()){var t=h.RichUtils.toggleBlockType(a.state.editorState);if(t)return a.onChange(t),a.setState({editorState:h.EditorState.moveFocusToEnd(h.EditorState.createEmpty())}),!0}if("Delete"===e.key){var n=h.RichUtils.onDelete(a.state.editorState);if(n)return a.onChange(n),!0}return Object(h.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(g.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(n&&n(e,a.props.wrapperId),s(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(P(P({},a.state),{},{linkPopoverOpen:!0}))},a.getCompositeDecorator=function(e){var t=[{strategy:Tr,component:Ir({focusHandler:a.focusHandler,getEditorState:a.getEditorState,onChange:a.onChange,onEditLink:a.onEditLink})}];return a.props.mention&&t.push.apply(t,po(Zr(P(P({},a.props.mention),{},{onChange:a.onChange,getEditorState:a.getEditorState,getSuggestions:a.getSuggestions,getWrapperRef:a.getWrapperRef,modalHandler:a.modalHandler})))),new h.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(h.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 s(a.props,"editorState")?a.props.editorState&&(t=h.EditorState.set(a.props.editorState,{decorator:e})):s(a.props,"defaultEditorState")?a.props.defaultEditorState&&(t=h.EditorState.set(a.props.defaultEditorState,{decorator:e})):s(a.props,"contentState")?a.props.contentState&&(n=Object(h.convertFromRaw)(a.props.contentState),t=h.EditorState.createWithContent(n,e),t=h.EditorState.moveSelectionToEnd(t)):s(a.props,"defaultContentState")&&(n=a.props.defaultContentState)&&(n=Object(h.convertFromRaw)(n),t=h.EditorState.createWithContent(n,e),t=h.EditorState.moveSelectionToEnd(t)),t=t||h.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 P(P({},Object(g.getCustomStyleMap)()),e.customStyleMap)},a.changeEditorState=function(e){var e=Object(h.convertFromRaw)(e),t=a.state.editorState,t=h.EditorState.push(t,e,"insert-characters");return h.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=h.RichUtils.handleKeyCommand(n,e);if(t)return a.onChange(t),!0}return!1},a.handleReturn=function(e){var t;return!!Q()||(t=a.state.editorState,!!(t=Object(g.handleNewLine)(t,e))&&(a.onChange(t),!0))},a.handlePastedTextFn=function(e,t){var n,r,o=a.state.editorState,i=a.props.handlePastedText;return t.includes("<figure")?t:t.includes("DraftStyle")?null:i?i(e,t,o,a.onChange):(i=e,e=t,t=o,o=a.onChange,(r=Object(g.getSelectedBlock)(t))&&"code"===r.type?(r=h.Modifier.replaceText(t.getCurrentContent(),t.getSelection(),i,t.getCurrentInlineStyle()),o(h.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=h.Modifier.replaceWithFragment(n,t.getSelection(),new F.List(i.contentBlocks)),o(h.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=h.DefaultDraftBlockRenderMap.merge(Object(F.Map)({"header-one":{wrapper:m.a.createElement(b.e,{size:"xxl"},a.props.children)},"header-two":{wrapper:m.a.createElement(b.e,{size:"xl"},a.props.children)},"header-three":{wrapper:m.a.createElement(b.e,{size:"l"},a.props.children)},"header-four":{wrapper:m.a.createElement(b.e,{size:"m"},a.props.children)},unstyled:{element:"p",wrapper:m.a.createElement("div",null,a.props.children)}}));var t=oe(uo,e.toolbar),n=e.wrapperId||Math.floor(1e4*Math.random()),n=(a.wrapperId="Editor-wrapper-".concat(n),a.modalHandler=new U,a.focusHandler=new Y,e.toolbar&&e.toolbar.insert&&(null==(n=e.toolbar.insert.image)?void 0:n.resizeEnabled)),r=e.toolbar&&e.toolbar.insert&&(null==(r=e.toolbar.insert.image)?void 0:r.nonFloatingImage),n=(a.blockRendererFn=so({isReadOnly:e.readOnly,isImageAlignmentEnabled:a.isImageAlignmentEnabled,isImageResizeEnabled:n,nonFloatingImage:r,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(g.extractInlineStyle)(n),a.state={editorState:n,toolbar:t,editorFocused:!1,linkPopoverOpen:!1},a}return t=i,(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=oe(uo,o),t.toolbar=o),s(this.props,"editorState")&&n!==e.editorState?t.editorState=n?h.EditorState.set(n,{decorator:this.compositeDecorator}):h.EditorState.createEmpty(this.compositeDecorator):s(this.props,"contentState")&&r!==e.contentState&&(r?(o=this.changeEditorState(r))&&(t.editorState=o):t.editorState=h.EditorState.createEmpty(this.compositeDecorator)),e.editorState===n&&e.contentState===r||Object(g.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()(mo({},"Editor-toolbar",!0),n),n=v()(mo({},"Editor-wrapper",!0),i),i=v()((mo(i={},"Editor",!0),mo(i,"hide-placeholder",this.isEmptyListBlock()),i),o);return m.a.createElement("div",{id:this.wrapperId,className:n,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur},this.props.showToolbar&&m.a.createElement("div",{className:e,onMouseDown:this.preventDefault,"aria-label":"Editor-toolbar",onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=Cr[e],e=r[e];return m.a.createElement(n,fo({key:t},u,{config:e,mention:c,className:"Editor-toolbar-options"}))})),m.a.createElement("div",{ref:this.setWrapperReference,className:i,style:a,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:Z.onKeyDown,onMouseDown:this.onEditorMouseDown,id:"RichTextEditorWrapper"},m.a.createElement(h.Editor,fo({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:ee,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,handlePastedText:this.handlePastedTextFn,ariaLabel:s,blockRenderMap:this.blockRenderMap},this.editorProps))))}}])&&go(t.prototype,e),n&&go(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component),_o=(r.utils={EditorState:h.EditorState,ContentState:h.ContentState,RichUtils:h.RichUtils,convertFromRaw:h.convertFromRaw,convertToRaw:h.convertToRaw,htmlToState:function(e){var e=e.replaceAll('<p><br/></p><p id="RichTextEditor-Image"','<p id="RichTextEditor-Image"').replaceAll("<br/>","").replaceAll("<p> </p>",""),e=L()(e);if(e)return{contentState:e=h.ContentState.createFromBlockArray(e.contentBlocks),editorState:h.EditorState.createWithContent(e)}},stateToHTML:function(e){var n=1<arguments.length&&void 0!==arguments[1]&&arguments[1],e=Object(h.convertToRaw)(e.getCurrentContent());return z()(e,{},!1,function(e){var t=e.type,e=e.data;if("IMAGE"===t)return t=e.alignment||"left","center"===e.alt||"center"===t?'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-right:auto; margin-left:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):!n||"left"!==e.alt&&"left"!==t?n?'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-left:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="float:').concat(t,"; height: ").concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-right:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n ')})}},r.propTypes={mention:d.a.shape({separator:d.a.string,trigger:d.a.string,chipOptions:d.a.object,dropdownOptions:d.a.shape({dropdownClassName:d.a.string,customOptionRenderer:d.a.func}),renderer:d.a.func,suggestions:d.a.shape({label:d.a.string,value:d.a.string,icon:d.a.string}),fetchSuggestions:d.a.func}),editorState:d.a.object,onEditorStateChange:d.a.func,defaultEditorState:d.a.object,onContentStateChange:d.a.func,defaultContentState:d.a.object,contentState:d.a.object,spellCheck:d.a.bool,toolbar:Pt,showToolbar:d.a.bool,editorClassName:d.a.string,wrapperClassName:d.a.string,toolbarClassName:d.a.string,editorStyle:d.a.object,onFocus:d.a.func,onBlur:d.a.func,onTab:d.a.func,textAlignment:d.a.oneOf(["left","right","center"]),readOnly:d.a.bool,autoFocus:d.a.bool,placeholder:d.a.string,ariaLabel:d.a.string,wrapperId:d.a.number,editorRef:d.a.func,handlePastedText:d.a.func},r.defaultProps={autoFocus:!0,showToolbar:!0},r),Eo=o(49),Co=o.n(Eo),Oo=o(50);function xo(e){return(xo="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 ko(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?ko(Object(n),!0).forEach(function(e){Do(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ko(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Do(e,t,n){return(t=function(e){e=function(e,t){if("object"!==xo(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==xo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===xo(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jo(e){return function(e){if(Array.isArray(e))return To(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?To(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?To(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 To(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 Io(e,n){return m.a.createElement(m.a.Fragment,null,e.map(function(e,t){return m.a.createElement("li",{key:n[t]},e)}))}function Mo(e,r){return m.a.createElement(m.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"),m.a.createElement(b.i,{key:r[t]},n.map(function(e){return[e,m.a.createElement("br",null)]}))):e&&0===(null==(n=e[1])?void 0:n.length)?m.a.createElement("p",null,m.a.createElement("br",null)):m.a.createElement(b.i,{key:r[t]},e.map(function(e){return[e]}))}))}function No(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({},Bo),n),r=A(A({},zo),r),o=A(A({},Fo),o),r=A(A(A({},Ko),r),o),o=A(A({},Ro),Ho(t)),t={blocks:r,entities:n,styles:Object(Eo.createStylesRenderer)(Lo,o)};return Co()(e,t,!1)}function Po(e){var t=e.raw,n=e.entities,r=e.headings,o=e.list,e=e.colors;return(t=t&&No(t,{entities:n,headings:r,list:o,colors:e}))?m.a.createElement("div",{className:"Preview-wrapper"},t):null}var Ao={paddingLeft:"1.5em",margin:"0px"},Ro={BOLD:{fontWeight:"bold"},ITALIC:{fontStyle:"italic"},UNDERLINE:{textDecoration:"underline"},STRIKETHROUGH:{textDecoration:"line-through"}},Lo=function(e){var t=e.children,n=e.style,e=e.key;return m.a.createElement("span",{key:e,style:n},t)},zo={"header-one":function(e,t){var n=t.keys;return e.map(function(e,t){return m.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 m.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 m.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 m.a.createElement(b.e,{size:"m",key:n[t]},e)})}},Fo={"unordered-list-item":function(e,t){t=t.keys;return m.a.createElement("ul",{style:Ao},Io(e,t))},"ordered-list-item":function(e,t){t=t.keys;return m.a.createElement("ol",{style:Ao},Io(e,t))}},Bo={LINK:function(e,t,n){n=n.key;return m.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 m.a.createElement("p",{id:"RichTextEditor-Image",style:{justifyContent:t||"left",display:"flex"}},m.a.createElement("img",{src:n,alt:r,height:o,width:i}))},MENTION:function(e,t,n){n=n.key;return m.a.createElement("span",{name:t.value,className:"Chip--input Chip d-inline-flex mt-3",key:n},e)}},Ko={unstyled:function(e,t,n){t=t.keys;return Mo(e,t)},atomic:function(e,t){return e[0]}},Ho=function(e){return[].concat(jo(co),jo(e)).reduce(function(e,t){var n="color-".concat(t),t={color:t};return A(A({},e),{},Do({},n,t))},{})},Uo=(Po.utils={convertToHTML:function(e){var t,n,r=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return(e=e&&No(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}))&&Object(Oo.renderToStaticMarkup)(e)?(t=(n=o(231)).name,n=n.version,t="https://s3.us-east-1.amazonaws.com/webui-assets/".concat(t,"/v").concat(n,"/design-system.css"),n=r?'<link rel="stylesheet" href="'.concat(t,'">'):"","".concat(n," ").concat(Object(Oo.renderToStaticMarkup)(e))):""}},Po.propTypes={raw:d.a.object.isRequired,colors:d.a.arrayOf(d.a.string),list:d.a.object,headings:d.a.object,entities:d.a.object},Po.defaultProps={entities:{},headings:{},list:{},colors:[]},Po)}]);
|