@innovaccer/rich-text-editor 2.1.7 → 2.1.8
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,js,Is){"use strict";!function(p){Is.d(js,"a",function(){return Te}),Is.d(js,"b",function(){return bt}),Is.d(js,"c",function(){return gt}),Is.d(js,"d",function(){return on}),Is.d(js,"e",function(){return cn}),Is.d(js,"f",function(){return P}),Is.d(js,"g",function(){return pn}),Is.d(js,"h",function(){return wn}),Is.d(js,"i",function(){return kn}),Is.d(js,"j",function(){return M}),Is.d(js,"k",function(){return I}),Is.d(js,"l",function(){return wa}),Is.d(js,"m",function(){return je}),Is.d(js,"n",function(){return Ea});var Se=Is(0),m=Is.n(Se),v=Is(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 _e(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){Ee(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 Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ce(){return(Ce=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 G(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 G(t)}}function Oe(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 xe(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 T(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 j(e,t){var n;return t?"number"==typeof t?(n=K(e,t),U(e,n)):t:""}function N(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(F(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))}Ee(n={},"hh:mm","--:--"),Ee(n,"hh:mm AM","--:-- AM");var L=n,F=function(e){return"hh:mm AM"===e},z=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=F(e)?z(n).hrs:n,e=F(e)?z(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+=F(e)&&t?" ".concat(t):""},q=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)})},V={"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/]},J={"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/]},X=(Ee(n={},"hh:mm",[/[0-1-2]/,/\d/,":",/[0-5]/,/\d/]),Ee(n,"hh:mm AM",[/[0-1]/,/\d/,":",/[0-5]/,/\d/," ",/[APap]/,"M"]),n),Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==p?p:"undefined"!=typeof self?self:{};function ee(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 te(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 ne(e){function t(){document.body.style.overflow=o||"",i(null)}var n=e.className,r=De(e),o=(l=Oe(ie(null),2))[0],i=l[1],a=(l=Oe(Se.useState(e.open),2))[0],s=l[1],c=(l=Oe(Se.useState(e.open),2))[0],u=l[1],l=ke({Backdrop:!0,"Backdrop--open":a,"Backdrop-animation--open":c,"Backdrop-animation--close":!c},n);return oe(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(Se.createElement("div",Ce({"data-test":"DesignSystem-Backdrop","data-layer":!0,"data-opened":a},r,{className:l,style:{zIndex:e.zIndex}})),document.body)}var ke=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(19),c=n(40),u=n(42),l=n(59),f=n(120),p=n(75),d=n(30),h=n(9),m=n(57),g=n(8),y=n(48),v=n(187),b=n(86),w=n(31),S=n(188),_=n(191),E=n(14),O=n(87),C=n(197),n=n(84);e.exports={Editor:f,EditorBlock:p,EditorState:g,CompositeDecorator:a,Entity:d,EntityInstance:m,BlockMapBuilder:o,CharacterMetadata:i,ContentBlock:s,ContentState:c,RawDraftContentState:v,SelectionState:w,AtomicBlockUtils:r,KeyBindingUtil:y,Modifier:h,RichUtils:b,DefaultDraftBlockRenderMap:u,DefaultDraftInlineStyle:l,convertFromHTML:n,convertFromRaw:_,convertToRaw:S,genKey:E,getDefaultKeyBinding:O,getVisibleSelectionRect:C}},function(e,_c,Ec){"use strict";!function(p){Ec.d(_c,"a",function(){return Te}),Ec.d(_c,"b",function(){return Ot}),Ec.d(_c,"c",function(){return _t}),Ec.d(_c,"d",function(){return un}),Ec.d(_c,"e",function(){return pn}),Ec.d(_c,"f",function(){return A}),Ec.d(_c,"g",function(){return gn}),Ec.d(_c,"h",function(){return Cn}),Ec.d(_c,"i",function(){return Nn}),Ec.d(_c,"j",function(){return N}),Ec.d(_c,"k",function(){return j}),Ec.d(_c,"l",function(){return Ca}),Ec.d(_c,"m",function(){return Ie}),Ec.d(_c,"n",function(){return Da});var Se=Ec(0),g=Ec.n(Se),v=Ec(18);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 _e(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){Ee(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 Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oe(){return(Oe=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&&O(e,t)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function O(e,t){return(O=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 G(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 G(t)}}function Ce(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 xe(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 T(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 I(e,t){var n;return t?"number"==typeof t?(n=K(e,t),U(e,n)):t:""}function M(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 P(e,t){var n=(e=H(t,e)).hours,e=e.minutes;return(F(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))}Ee(n={},"hh:mm","--:--"),Ee(n,"hh:mm AM","--:-- AM");var L=n,F=function(e){return"hh:mm AM"===e},z=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=F(e)?z(n).hrs:n,e=F(e)?z(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+=F(e)&&t?" ".concat(t):""},q=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)})},V={"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/]},J={"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/]},X=(Ee(n={},"hh:mm",[/[0-1-2]/,/\d/,":",/[0-5]/,/\d/]),Ee(n,"hh:mm AM",[/[0-1]/,/\d/,":",/[0-5]/,/\d/," ",/[APap]/,"M"]),n),Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==p?p:"undefined"!=typeof self?self:{};function ee(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 te(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 ne(e){function t(){document.body.style.overflow=o||"",i(null)}var n=e.className,r=De(e),o=(l=Ce(le(null),2))[0],i=l[1],a=(l=Ce(Se.useState(e.open),2))[0],s=l[1],c=(l=Ce(Se.useState(e.open),2))[0],u=l[1],l=ke({Backdrop:!0,"Backdrop--open":a,"Backdrop-animation--open":c,"Backdrop-animation--close":!c},n);return ue(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(Se.createElement("div",Oe({"data-test":"DesignSystem-Backdrop","data-layer":!0,"data-opened":a},r,{className:l,style:{zIndex:e.zIndex}})),document.body)}var ke=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}),De=function(n){return["className","data-test"].reduce(function(e,t){return n[t]?_e(_e({},e),{},Ee({},t,n[t])):_e({},e)},{})},re=function(e){function t(){return Se.createElement("span",Ce({"data-test":"DesignSystem-Avatar"},l,{className:p}),f&&Se.createElement(je,{weight:"medium",appearance:"white",className:d},f),!f&&Se.createElement(P,{"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=De(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=ke((Ee(a={Avatar:!0},"Avatar--".concat(o),o),Ee(a,"Avatar--".concat(i),i),Ee(a,"Avatar--disabled",!f||!n),a),c),d=ke((Ee(s={},"Avatar-content--".concat(o),o),Ee(s,"Avatar-content--".concat(i),i),s)),h=ke(Ee({},"Avatar-content--".concat(i),i));return n&&f?Se.createElement(Ea,{tooltip:e,position:r,triggerClass:"flex-grow-0"},t()):t()},oe=(re.displayName="Avatar",re.defaultProps={tooltipPosition:"bottom",withTooltip:!0,size:"regular"},Se.useEffect),ie=Se.useState,ae=(ne.displayName="Backdrop",["size","appearance","iconAlign","tabIndex","largeIcon","type","children","icon","expanded","selected","loading","disabled","className","tooltip","iconType"]),se={tiny:12,regular:16,large:20},ce=Se.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,m=(e.tooltip,e.iconType),e=W(e,ae),f=ke((Ee(n={},"Button",!0),Ee(n,"Button--expanded",f),Ee(n,"Button--".concat(r),r),Ee(n,"Button--".concat(r,"Square"),!u),Ee(n,"Button--".concat(o),o),Ee(n,"Button--selected",p&&("basic"===o||"transparent"===o)),Ee(n,"Button--iconAlign-".concat(i),u&&i),Ee(n,"".concat(y),y),n)),y=ke((Ee(p={},"Button-icon",!0),Ee(p,"Button-icon--".concat(i),u&&i),p));return Se.createElement("button",Ce({"data-test":"DesignSystem-Button",ref:t,type:c,className:f,disabled:h||d,tabIndex:a},e),d?Se.createElement(Se.Fragment,null,Se.createElement(Nn,{size:"small",appearance:"basic"===o||"transparent"===o?"secondary":"white","data-test":"DesignSystem-Button--Spinner",className:"Button-spinner"}),Se.createElement(je,{className:"Button-text Button-text--hidden"},u||"")):Se.createElement(Se.Fragment,null,l&&Se.createElement("div",{className:y},Se.createElement(P,{"data-test":"DesignSystem-Button--Icon",name:l,type:m,size:s&&!u?se[r]+4:se[r]})),u&&Se.createElement("span",{className:"Button-text"},u)))}),Te=Se.forwardRef(function(e,t){var n=e.icon,r=e.tooltip,o=e.children;return n&&r&&!o?Se.createElement(Ea,{tooltip:r},Se.createElement(ce,Ce({},e,{ref:t}))):Se.createElement(ce,Ce({},e,{ref:t}))});Te.displayName="Button";function ue(e){return["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].indexOf(e)}function le(e,t){return new Date(e,t+1,0).getDate()}function fe(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 pe(e,t){var n,r,o,i,a;if(q(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 de(e,t,n,r,o){var i=new Date("".concat(o,"-").concat(r,"-").concat(n));if(e)switch(t){case"less":return e<=i;case"equal":return e.toDateString()===i.toDateString();case"more":return i<=e;default:return!1}return!1}function he(e){var n=e.onClick,r=e.onKeyDown,o=void 0===(t=e.role)?"button":t,t=e.tabIndex,e=W(e,ft);return _e({},n?{onClick:n,role:o,tabIndex:t||0,"aria-label":e["aria-label"],onKeyDown:function(e){var t;r?r(e):(t=e.key,dt(o,t)&&n&&(e.preventDefault(),n(e)))}}:{role:o,tabIndex:t,"aria-label":e["aria-label"]})}function ye(e){var t=e.children,n=void 0===(n=e.componentType)?"span":n,r=e.className,e=W(e,yt);return Se.createElement(n,_e(_e({},e),{},{className:r}),t)}function me(e){function t(e){var t;return ke((Ee(t={},"Chip-icon",!0),Ee(t,"Chip-icon--".concat(e),e),Ee(t,"Chip-icon-disabled--right","right"===e&&s),Ee(t,"cursor-pointer","right"===e&&!s),Ee(t,"Chip-icon--selected","right"===e&&u),t))}function n(e){e.stopPropagation(),l&&l()}function r(e){var t;return ke((Ee(t={},"disabled",s&&!u),Ee(t,"primary_dark",!s&&u),Ee(t,"primary_lighter",s&&u),Ee(t,"subtle",!s&&!u&&"right"===e),Ee(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,p=e.labelPrefix,d=e.iconType,e=De(e),h=ke((Ee(h={},"primary-lighter",s&&u),Ee(h,"inverse-lightest",s&&!u),Ee(h,"primary-dark",u),Ee(h,"inverse",!s&&!u),h));return Se.createElement("div",Ce({tabIndex:s?-1:0,"data-test":"DesignSystem-GenericChip--GenericChipWrapper"},e,{className:"Chip-wrapper ".concat(c),onClick:function(){f&&f()}}),i&&Se.createElement(P,{"data-test":"DesignSystem-GenericChip--Icon",name:i,type:d,appearance:r("left"),className:t("left")}),"string"==typeof o?Se.createElement(Se.Fragment,null,p&&Se.createElement(je,{"data-test":"DesignSystem-GenericChip--LabelPrefix",weight:"medium",color:h,className:"Chip-text mr-3"},p),Se.createElement(je,{"data-test":"DesignSystem-GenericChip--Text",color:h,className:"Chip-text"},o)):o,a&&Se.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"},Se.createElement(P,{name:"clear",appearance:r("right"),className:"p-2"})))}function ge(){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 ve(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 be(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=V[o];return Se.createElement(gn,Ce({icon:"events",placeholder:o},i,{error:r,mask:u,value:n?O(o,n):e?gn.utils.getDefaultValue(u,c):"",onChange:function(e,t){var n=i.onChange;s({open:!0}),t&&!t.includes(c)&&(t=pe(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=pe(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 q(a,e,o)}],clearOnEmptyBlur:!0,id:"parent-DatePicker"}))}function we(e){var t=new Date;return t.setHours(e.substring(0,2)),t.setMinutes(e.substring(3,5)),t}function Ie(e){return"12-Hour"===e}function Me(e){var e=e.split(":"),t=12<=(n=parseInt(e[0],10))?"PM":"AM",n=(n%12||12).toString(),n=Ct(n),e=e[1];return"".concat(n.toString(),":").concat(e," ").concat(t)}function Ne(e,t,n){for(var r=[],o=we(e),i=we(t);o<=i;)r.push(o.toTimeString().substring(0,5)),o.setMinutes(o.getMinutes()+n);return r}function Pe(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 Ae(e){var t=parseInt(e,10);return t<10?e:((60<t?t%60:t).toString()+"0").slice(0,2)}function Re(e){return(parseInt(e,10)%24).toString()}function Le(e){return/^[0-9]+$/.test(e)}function Fe(e){return/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]*$/.test(e)}function ze(e){var e=e.split(It),t=Re(e[0]);return{hour:Ct(t),min:((""!==e[1]?Ae(e[1]):"00")+"0").slice(0,2)}}function Be(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=Ct(e):(i="0"+e[0],a=Ae(e[1]+"0"));break;case 3:i="0"+e[0],a=Ae(e.slice(1));break;case 4:i=t?(parseInt(o,10)%12).toString():Re(o),a=Ae(e.slice(2));break;default:a=i="-1"}return{hour:i,min:a}}function Ke(e,t){var n,r={hour:"00",min:"00"};return Le(t)?(n=Be(t),r=parseInt(n.hour)<=12&&0<parseInt(n.hour)?Ue(e,n):n):/^[0-9]+[ AaMmPp]+$/.test(t)?(r=function(e){e=e.split(/[\saAmMpP]/),e=Be(e[0],!0);return{hour:e.hour,min:e.min}}(t)).hour=He(r.hour,t):Fe(t)?(n=ze(t),r=parseInt(n.hour)<=12?Ue(e,n):n):/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]+[ AaMmPp]+$/.test(t)&&(e=t.replace(/[\saApPmM]/g,""),Le(e)?r=Be(e,!0):Fe(e)&&(r=ze(e)),r.hour=He(r.hour,t)),r}function He(e,t){return"12"===e&&_t(t)?e="00":Et(t)&&"12"!==e&&(e=(parseInt(e,10)+12).toString()),e}function Ue(e,t){var n="".concat(t.hour,":").concat(t.min),r=jt(),o=xt(r,n),r=Mt(e,r),e=Mt(e,n);return o&&e<r&&(n=parseInt(t.hour,10)+12,t.hour=n.toString()),t}function We(e,t){var e=At(xe(e)),n=At(xe(t));return e.length===n.length&&e.every(function(e,t){return e.value===n[t].value})}function qe(e){return void 0!==e}function Ve(e){return void 0!==e}function Ge(e,t,n){return e&&n&&""===t}function Ye(e,t,n,r){return r&&n&&0===t&&""===e}function $e(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 Ze(e,t){e=t&&(null==(t=t[e])?void 0:t.optionID),(t=document.getElementById(e))&&t.scrollIntoView&&t.scrollIntoView({block:"center"})}function Je(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=e.error,v=Oe(Se.useState(0),2),b=v[0],w=v[1],S=(v=Oe(Se.useState(!1),2))[0],_=v[1],E=(v=Oe(Se.useState(-1),2))[0],C=v[1],O=(v=Oe(Se.useState(0),2))[0],x=v[1],k=(t=(v=e).startTime,n=e.endTime,r=e.interval,o=e.timeFormat,i=e.showDuration,a=e.disabledSlotList,v=e.id,e=t?Ot(t):"00:00",n=n?Ot(n):Tt(t),e=kt(e,n,r),Dt(e,o,v,i,t,a));return Se.useEffect(function(){void 0!==s&&_(s)},[s]),Se.useEffect(function(){var e;return S&&-1!=E&&(w(E),e=setTimeout(function(){Ze(E,k)},100)),function(){clearTimeout(e)}},[S]),Se.useEffect(function(){x(O+1)},[f,c,u,d,y]),Se.createElement(on,{key:O,maxHeight:160,loadersCount:0,withSearch:!0,open:S,tabIndex:b,searchPlaceholder:"Search",onChange:function(t){var e=t,n=(Ie(p)&&(e=Me(t)),k.findIndex(function(e){return e.value===t}));C(n),l&&l(e)},fetchOptions:m||function(e){n=e,t=Nt(t=k);var t,n,r=""===n?(r=jt(),Mt(t,r)):Pt(t,n);return w(t=""===e&&-1!=E?E:r),Promise.resolve({options:-1===r?[]:k,count:k.length,scrollToIndex:0===t?t+1:t,searchTerm:e})},noResultMessage:h,staticLimit:k.length,onPopperToggle:function(){_(!S)},error:g})}function Xe(e){var t=e.validators,s=e.inputOptions,c=e.inputFormat,u=e.outputFormat,l=e.onTimeChange,n=e.time,e=e.error,f=(i=Oe(Se.useState(n),2))[0],r=i[1],o=(i=Oe(Se.useState(!1),2))[0],p=i[1],d=void 0===(i=s.placeholderChar)?"_":i,i=(Se.useEffect(function(){var e=j(c,f),e=void 0===n&&e.includes(d)?f:n;r(e)},[n]),X[c]);return Se.createElement(gn,Ce({placeholder:L[c],placeholderChar:d},s,{mask:i,value:f?j(c,f):o?gn.utils.getDefaultValue(i,d):"",validators:function(e){return q(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=j(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=F(a)?z(o).AMPM:"",o=F(a)?z(o).hrs:B(o,r),U(a,{minutes:t,hours:o,am_pm:n}))),l(r)),s.onBlur&&s.onBlur(e,i)},error:e,id:"parent-TimePicker"}))}var Qe=12,et=3,tt=12,nt=3,rt=7,ot=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],it={small:["Su","Mo","Tu","We","Th","Fr","Sa"],large:["Su","Mo","Tu","We","Th","Fr","Sa"]},at=Qe,st=function(e){return e-e%at},$=function(e){var t,n,r;return(e=e&&y(e))?(t=e.getFullYear(),n=e.getMonth(),r=e.getDay(),e=e.getDate(),{decadeYear:st(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?pe(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},ct=function(){e(p,Se["Component"]);var f=h(p);function p(e){d(this,p),Ee(G(V=f.call(this,e)),"updateState",function(e,t,n){V.setState({year:e,month:t,date:n})}),Ee(G(V),"getDateValue",function(e,t,n){return new Date(e,t,n)}),Ee(G(V),"getNavDateInfo",function(e){var t=V.state,n=t.yearBlockNav,r=t.yearNav,t=t.monthNav,o=(t+e)%tt==-1?11:(t+e)%tt,r=0<=e?r+(0!==e&&o<t?1:0):r-(0!==e&&t<o?1:0);return{yearBlock:n,year:r,month:o}}),Ee(G(V),"getInRangeError",function(){var e=V.props,t=e.rangePicker,e=e.rangeLimit,n=V.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}),Ee(G(V),"selectYear",function(e){return function(){V.updateState(e),V.setState({view:"month"})}}),Ee(G(V),"yearMouseOverHandler",function(e,t,n,r){var o=V.props.onYearHover;o&&o({value:e,year:e,isCurrentYear:t,isDisabled:n},r)}),Ee(G(V),"selectMonth",function(e){return function(){V.updateState(V.state.yearNav,e),V.setState({view:"date"})}}),Ee(G(V),"monthMouseOverHandler",function(e,t,n,r){var o=ot,i=V.props.onMonthHover,o={value:o[e],month:o[e],year:V.state.year,isCurrentMonth:t,isDisabled:n};i&&i(o,r)}),Ee(G(V),"selectDate",function(e,t,n,r){e=V.calculateDate(e,t,n,r,!1);V.setState({currDate:e})}),Ee(G(V),"calculateDate",function(e,t,n,r,o){var i,a,s="",n=(t<=0?(i=e-1,a=n+t,s="prev"):a=(i=e,t),V.getNavDateInfo(i)),e=n.year,t=n.month;return!1===o&&(V.updateState(e,t,a),V.onNavIconClickHandler(s)()),V.getDateValue(e,t,a)}),Ee(G(V),"onNavIconClickHandler",function(s){return function(){var e=V.state,t=e.view,n=e.yearBlockNav,r=e.yearNav,o=e.monthNav,i=Qe,a=tt;switch(t){case"year":"prev"===s&&V.setState({yearBlockNav:n-i}),"next"===s&&V.setState({yearBlockNav:n+i});break;case"month":"prev"===s&&V.setState({yearNav:r-1}),"next"===s&&V.setState({yearNav:r+1});break;case"date":"prev"===s&&(0===o&&V.setState({yearNav:r-1}),V.setState({monthNav:(a+o-1)%a})),"next"===s&&(o===a-1&&V.setState({yearNav:r+1}),V.setState({monthNav:(o+1)%a}))}}}),Ee(G(V),"renderJumpButton",function(e){var t=V.props,n=t.disabledBefore,r=t.disabledAfter,t=t.size,o=V.state,i=o.view,a=o.yearBlockNav,s=o.yearNav,c=o.monthNav,u=!1;switch(i){case"year":"prev"===e&&(u=fe(n,"more",a)||fe(n,"equal",a)),"next"===e&&(u=fe(r,"less",a)||fe(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=ke(Ee({"Calendar-headerIcon":!0},"Calendar-headerIcon--".concat(e),e));return Se.createElement(Te,{type:"button",className:o,appearance:"basic",icon:"arrow_".concat("next"===e?"forward":"back"),disabled:u,size:"small"===t?"tiny":"regular",onClick:V.onNavIconClickHandler(e)})}),Ee(G(V),"onNavHeadingClickHandler",function(n){return function(){var e=V.props.monthsInView,t=V.props.jumpView;(t=t&&1<e?!1:t)&&("year"===n&&V.setState({view:"date"}),"month"===n&&V.setState({view:"year"}),"date"===n)&&V.setState({view:"month"})}}),Ee(G(V),"renderHeaderContent",function(e){function t(e){return"small"===r?Se.createElement(Se.Fragment,null,Se.createElement(je,{weight:"strong"},e),"year"!==a&&!i&&Se.createElement(P,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"})):Se.createElement(Se.Fragment,null,Se.createElement(cn,{size:"s"},e),"year"!==a&&!i&&Se.createElement(P,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"}))}var n=V.props,r=n.size,o=n.monthsInView,i=n.rangePicker,n=V.state,a=n.view,n=n.yearBlockNav,s=Qe,c=ot,u=V.getNavDateInfo(e),l=u.year,u=u.month,o=ke({"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 Se.createElement("div",{className:o},"date"!==a&&Se.createElement("div",{className:"d-flex justify-content-center align-items-center",onClick:V.onNavHeadingClickHandler(a)},t(e)),"date"===a&&Se.createElement(Se.Fragment,null,Se.createElement("div",{onClick:V.onNavHeadingClickHandler(a),className:"d-flex justify-content-center align-items-center"},t(c[u])),Se.createElement("div",{className:"ml-4 d-flex justify-content-center align-items-center",onClick:V.onNavHeadingClickHandler("month")},t(l))))}),Ee(G(V),"renderBodyYear",function(){var e=Qe,u=et,t=V.props,l=t.size,f=t.rangePicker,p=t.disabledBefore,d=t.disabledAfter,t=V.state,h=t.yearBlockNav,y=t.currYear,t=Math.ceil(e/u);return Array.from({length:t},function(e,c){return Se.createElement("div",{key:c,className:"Calendar-valueRow"},Array.from({length:u},function(e,t){var n,r,o,i,a,s=u*c+t;if(s!==h)return a=!(s=Y(p,"more",n=h+s)||Y(d,"less",n))&&!f&&n===V.state.year,r=function(){return n===y},o=ke((Ee(o={"Calendar-value":!0,"Calendar-value--active":a,"Calendar-value--disabled":s,"Calendar-yearValue":!0},"Calendar-yearValue--".concat(l),l),Ee(o,"Calendar-value--currDateMonthYear",r()),o)),i=ke({"Calendar-value--currDate":r()&&!a,"Calendar-text":!0}),a=ke({inverse:!a&&!r()&&!s,white:a,"primary-lighter":r()&&s,primary:r(),"inverse-lightest":s}),Se.createElement("div",{key:"".concat(c,"-").concat(t),"data-test":"DesignSystem-Calendar--yearValue",className:o,onClick:V.selectYear(n),onMouseOver:V.yearMouseOverHandler.bind(G(V),n,r(),s)},Se.createElement(je,{size:"small"===l?"small":"regular",color:a,className:i},n))}))})}),Ee(G(V),"renderBodyMonth",function(){var e=tt,u=nt,l=ot,t=V.props,f=t.size,p=t.disabledBefore,d=t.disabledAfter,t=V.state,h=t.yearNav,y=t.year,m=t.currYear,g=t.currMonth,t=Math.ceil(e/u);return Array.from({length:t},function(e,c){return Se.createElement("div",{key:c,className:"Calendar-valueRow"},Array.from({length:u},function(e,t){function n(){return m===h&&g===r}var r=u*c+t,o=Y(p,"more",h,r)||Y(d,"less",h,r),i=!o&&y===h&&r===V.state.month,a=ke((Ee(a={"Calendar-value":!0,"Calendar-value--active":i,"Calendar-value--disabled":o,"Calendar-monthValue":!0},"Calendar-monthValue--".concat(f),f),Ee(a,"Calendar-value--currDateMonthYear",n()),a)),s=ke({inverse:!i&&!n()&&!o,white:i,"primary-lighter":n()&&o,primary:n(),"inverse-lightest":o}),i=ke({"Calendar-value--currDate":n()&&!i,"Calendar-text":!0});return Se.createElement("div",{key:"".concat(c,"-").concat(t),"data-test":"DesignSystem-Calendar--monthValue",className:a,onClick:V.selectMonth(r),onMouseOver:V.monthMouseOverHandler.bind(G(V),r,n(),o)},Se.createElement(je,{size:"small"===f?"small":"regular",color:s,className:i},l[r]))}))})}),Ee(G(V),"onDateRowMouseLeaveHandler",function(){V.props.rangePicker&&V.setState({hoverDate:void 0})}),Ee(G(V),"renderBodyDate",function(e){var o=rt,i=it,t=V.props,a=t.size,s=t.firstDayOfWeek,c="large"===a?"regular":"small";return Se.createElement(Se.Fragment,null,Se.createElement("div",{className:"Calendar-dayValues"},Array.from({length:7},function(e,t){var n=ke({"Calendar-valueWrapper":!0}),r=(t+o+ue(s))%o;return Se.createElement(je,{key:t,className:n,appearance:"default",weight:"strong",size:c},i[a][r])})),Se.createElement("div",{className:"Calendar-dateValues",onMouseLeave:V.onDateRowMouseLeaveHandler},V.renderDateValues(e)))}),Ee(G(V),"renderDateValues",function(b){function w(e){return function(){(!x||j&&I||!W)&&V.selectDate(b,e,K,H)}}function S(t){return function(){var e;x&&(e=V.getDateValue(z,B,t),j&&I||V.setState({hoverDate:e}))}}function _(e,t,n,r){var e=V.calculateDate(b,e,K,H,!0)||new Date,o=ot,i=it.large[e.getDay()],t={value:e.getDate(),isToday:t,isDisabled:n,todayDate:V.state.currDate,fullDate:e,date:e.getDate(),month:o[e.getMonth()],year:e.getFullYear(),dayName:i};a&&a(t,r)}var E=rt,C=tt,e=V.props,O=e.size,x=e.rangePicker,t=e.firstDayOfWeek,k=e.disabledBefore,D=e.disabledAfter,T=e.monthsInView,a=e.onDateHover,e=V.state,j=e.startDate,I=e.endDate,M=e.hoverDate,N=e.year,P=e.month,A=e.date,R=e.currMonth,L=e.currYear,F=e.todayDate,e=V.getNavDateInfo(b),z=e.year,B=e.month,K=le(z,B-1),H=le(z,B),e=new Date(z,B).getDay()-ue(t),U=Math.abs(e),t=Math.ceil((H+U)/E),W=(6===t||1<T||(t+=1),V.getInRangeError()),q=V.props.events;return Array.from({length:t},function(e,v){return Se.createElement("div",{key:v,className:"Calendar-valueRow"},Array.from({length:E},function(e,t){function n(){var e=r<=0?L===z&&R===B-1&&F===K+r:H<r?L===z&&R===B+1&&F===r-H:L===z&&R===B&&F===r;return e}var r=E*v+t-U+1,o=r<=0||H<r,i=Y(k,"more",z,B,r)||Y(D,"less",z,B,r),a=!i&&N===z&&P===B&&A===r,s=!1,c=$(j),c=(c.year,c.month,c.date,$(I)),c=(c.year,c.month,c.date,I&&!1),u=j&&!1,l="".concat(r<=0?K+r:H<r?r-H:r),f="".concat(r<=0?0===B?B+C:(B-1)%C+1:H<r?(B+1)%C+1:B+1),p="".concat(r<=0&&B+1===1?z-1:H<r&&B+1===12?z+1:z),d="".concat(2===f.length?f:"0".concat(f),"/").concat(2===l.length?l:"0".concat(l),"/").concat(p),d=q&&"object"===Z(q)&&q.hasOwnProperty(d),h=(x&&(h=Y(j,"equal",z,B,r),y=Y(I,"equal",z,B,r),m=Y(M,"equal",z,B,r),a=!i&&(h||y),j&&I?s=!i&&(de(j,"less",l,f,p)&&de(I,"more",l,f,p)||h||y):j?s=!i&&(de(M,"more",l,f,p)||m)&&de(j,"less",l,f,p):I&&(s=!i&&(Y(M,"less",z,B,r)||m)&&Y(I,"more",z,B,r))),s&&W),y=j&&de(j,"equal",l,f,p),m=I&&de(I,"equal",l,f,p),g=j&&I&&(y||m),l=de(M,"equal",l,f,p)&&M&&j&&j<=M,f=0===t||6===t,p=s||x&&(a||g),s=ke({"Calendar-valueWrapper":!0,"Calendar-valueWrapper--inRange":!f&&p,"Calendar-valueWrapper--inEdgeRange":p&&f,"Calendar-valueWrapper--inRangeError":h,"Calendar-valueWrapper--start":c&&!u&&6!==t||x&&y&&6!==t,"Calendar-valueWrapper--end":u&&!c&&0!==t||x&&m&&0!==t,"Calendar-valueWrapper--startEnd":c&&u,"Calendar-valueWrapper--startError":c&&h||x&&h&&y,"Calendar-valueWrapper--endError":u&&h||x&&h&&m,"Calendar-valueWrapper--dummy":o,"Calendar-valueWrapper--hoverDate":x&&l,"Calendar-valueWrapper--inStartRange":p&&0===t&&!a&&!g,"Calendar-valueWrapper--inEndRange":p&&6===t&&!a&&!g}),y=ke((Ee(f={"Calendar-value":!0,"Calendar-inRangeValue":!(c||u||a||g),"Calendar-value--start":c&&!u,"Calendar-value--end":u&&!c,"Calendar-value--startError":c&&h,"Calendar-value--endError":u&&h,"Calendar-value--active":a||g,"Calendar-value--disabled":i,"Calendar-dateValue":!0},"Calendar-dateValue--".concat(O),O),Ee(f,"Calendar-value--currDateMonthYear",n()),Ee(f,"Calendar-value--currDate",n()&&!a&&!g),f)),m=ke({inverse:!(a||n()||i||g),white:a||g,"primary-lighter":n()&&i,primary:n(),"inverse-lightest":i});return Se.createElement("div",{key:"".concat(v,"-").concat(t),className:s,"data-test":"designSystem-Calendar-WrapperClass"},!o&&Se.createElement(Se.Fragment,null,Se.createElement(je,{color:m,size:"small"===O?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:y,onClick:w(r),onMouseOver:S(r),onMouseEnter:_.bind(G(V),r,n(),i)},r),d&&V.renderEventsIndicator(O,a)),(o&&0<r&&b===T-1||o&&r<=0&&0===b)&&Se.createElement(Se.Fragment,null,Se.createElement(je,{appearance:a||g?"white":i?"disabled":n()?"link":"default",size:"small"===O?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:y,onClick:w(r),onMouseOver:S(r),onMouseEnter:_.bind(G(V),r,n(),i)},r<=0?K+r:r-H),d&&V.renderEventsIndicator(O,a)))}))})}),Ee(G(V),"renderCalendar",function(e){var t=V.props,n=t.size,t=t.monthsInView,r=V.state.view,o=ke((Ee(o={},"Calendar",!0),Ee(o,"Calendar-".concat(r,"--").concat(n),r),Ee(o,"Calendar--".concat(n),n),o)),n=ke(Ee({},"Calendar-header--".concat(n),n)),i=ke({"Calendar-body":!0});return Se.createElement("div",{key:e,"data-test":"DesignSystem-Calendar",className:o},Se.createElement("div",{className:n},0===e&&V.renderJumpButton("prev"),V.renderHeaderContent(e),e===t-1&&V.renderJumpButton("next")),Se.createElement("div",{className:i},"year"===r&&V.renderBodyYear(),"month"===r&&V.renderBodyMonth(),"date"===r&&V.renderBodyDate(e)))});var V,t=V.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 V.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:st(a)},V}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:st(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:st(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=ke((Ee(n={"Calendar-eventsIndicator":!0},"Calendar-eventsIndicator--".concat(e),!0),Ee(n,"Calendar-eventsIndicator--active",t),n));return Se.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=De(this.props),e=ke({"Calendar-wrapper":!0},e);return Se.createElement("div",Ce({},r,{className:e,"data-test":"DesignSystem-Calendar-Wrapper"}),Array.from({length:t},function(e,t){return n.renderCalendar(t)}))}}]),p}(),ut=(Ee(ct,"defaultProps",{size:"large",monthsInView:1,view:"date",firstDayOfWeek:"sunday",jumpView:!0}),["shadow","children","className"]),n=Se.forwardRef(function(e,t){var n,r=e.shadow,r=void 0===r?"shadow10":r,o=e.children,i=e.className,e=W(e,ut),r=ke((Ee(n={Card:!0},"Card--".concat(r),r),Ee(n,"".concat(i),i),n));return Se.createElement("div",Ce({"data-test":"DesignSystem-Card",ref:t},e,{className:r}),o)}),lt=(n.displayName="Card",n.defaultProps={shadow:"shadow10"},["border","children","className"]),ft=(Se.forwardRef(function(e,t){var n=e.border,r=e.children,o=e.className,e=W(e,lt),n=ke(Ee({CardSubdued:!0},"CardSubdued--".concat(n),n),o);return Se.createElement("div",Ce({"data-test":"DesignSystem-CardSubdued",ref:t},e,{className:n}),r)}).displayName="CardSubdued",["onClick","onKeyDown","role","tabIndex"]),pt={button:new Set(["Enter","Space","Spacebar"," "]),link:new Set(["Enter"]),checkbox:new Set([]),radio:new Set([])},dt=function(e,t){return!!pt[e]&&pt[e].has(t)},ht={timelapse:"outlined",content_copy:"outlined",speed:"outlined",add_circle_outline:"outlined",turned_in_not:"outlined",important_devices:"outlined",thumb_down_off_alt:"outlined",alarm_on:"outlined",calendar_view_month:"outlined",aspect_ratio:"outlined",change_history:"outlined",arrow_circle_down:"outlined",card_membership:"outlined",query_builder:"outlined",copyright:"outlined",arrow_circle_up:"outlined",alarm:"outlined",work_outline:"outlined",bookmark_border:"outlined",delete_outline:"outlined",credit_card:"outlined",highlight_of:"outlined",check_circle_outline:"outlined",help_outline:"outlined",schedule:"outlined",radio_button_unchecked:"outlined",radio_button_checked:"outlined",delete:"outlined"},P=function(e){var t,n=e.appearance,r=e.className,o=e.name,i=e.size,a=e.children,s=he(e),c=De(e),e=e.type&&{outline:"outlined",sharp:"outlined",round:"rounded",filled:"rounded","two-tone":"rounded"}[e.type]||e.type||o&&ht[o]||"rounded",u=n&&n.includes("_")?(t=(u=n).indexOf("_"),u.slice(0,t)+u.charAt(t+1).toUpperCase()+u.slice(t+2)):n,e=ke((Ee(t={},"material-symbols",!0),Ee(t,"material-symbols-rounded","rounded"===e),Ee(t,"material-symbols-outlined","outlined"===e),Ee(t,"Icon",!0),Ee(t,"Icon--".concat(u),n),Ee(t,"".concat(r),r),t)),n={fontSize:"".concat(i,"px"),width:"".concat(i,"px")};return a&&Se.isValidElement(a)?Se.createElement("span",Ce({},c,{className:r}),a):Se.createElement("i",Ce({"data-test":"DesignSystem-Icon"},c,{className:e,style:n},s),o)},yt=(P.displayName="Icon",P.defaultProps={size:16},["children","componentType","className"]),mt=["appearance","size","children","weight","small","className","color"],je=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,mt),n=ke((Ee(t={Text:!0},"Text--".concat(n),!c&&n),Ee(t,"Text--".concat(i),i),Ee(t,"Text--".concat(r),r),Ee(t,"color-".concat(c),c),Ee(t,"Text--small","small"===r||a),t),s);return Se.createElement(ye,Ce({"data-test":"DesignSystem-Text"},e,{className:n,componentType:"span"}),o)},gt=(je.displayName="Text",je.defaultProps={appearance:"default",size:"regular"},me.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,p=e.labelPrefix,d=e.iconType,e=De(e),o="action"!==i&&o,h=!("selection"!==i||!s),i=ke((Ee(t={Chip:!0},"Chip-".concat(i,"--disabled"),a),Ee(t,"Chip--".concat(i),i&&!a),Ee(t,"Chip-".concat(i,"--selected"),s&&!a),Ee(t,"Chip-selection--selectedDisabled","selection"===i&&s&&a),Ee(t,"Chip-icon--clear",o),t),f);return Se.createElement(me,Ce({"data-test":"DesignSystem-Chip--GenericChip"},e,{label:n,selected:h,icon:r,iconType:d,clearButton:o,disabled:a,className:i,onClose:function(){!a&&c&&c(l)},onClick:function(){!a&&u&&u(l)},name:l,labelPrefix:p}))}),vt=(gt.displayName="Chip",gt.defaultProps={type:"input"},["size","tabIndex","defaultChecked","indeterminate","label","error","disabled","onChange","name","value","className","checked","helpText","id"]),bt=Se.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(ge()):y,m=W(e,vt),g=Se.useRef(null);Se.useImperativeHandle(t,function(){return g.current});var t=Oe(Se.useState(void 0===d?o:d),2),v=t[0],b=t[1],t=(Se.useEffect(function(){S(i)},[i]),Se.useEffect(function(){void 0!==d&&b(d)},[d]),ke((Ee(t={},"Checkbox",!0),Ee(t,"Checkbox--disabled",c),t),p)),p=ke((Ee(p={},"Checkbox-outerWrapper",!0),Ee(p,"Checkbox-outerWrapper--".concat(n),n),p)),e=ke((Ee(w={},"Checkbox-input",!0),Ee(w,"Checkbox-input--checked",v),Ee(w,"Checkbox-input--indeterminate",e.indeterminate),w)),s=ke((Ee(w={},"Checkbox-wrapper",!0),Ee(w,"Checkbox-wrapper--default",!s),Ee(w,"Checkbox-wrapper--error",s),w)),w=ke((Ee(w={},"Checkbox-label",!0),Ee(w,"Checkbox-label--tiny","tiny"===n),w)),S=function(e){g.current.indeterminate=e},_=ke((Ee(_={},"checked--regular",v&&"regular"===n),Ee(_,"checked--tiny",v&&"tiny"===n),Ee(_,"indeterminate--regular",i&&"regular"===n),Ee(_,"indeterminate--tiny",i&&"tiny"===n),_));return Se.createElement(Se.Fragment,null,Se.createElement("div",{"data-test":"DesignSystem-Checkbox",className:t},Se.createElement("div",{"data-test":"DesignSystem-Checkbox-OuterWrapper",className:p},Se.createElement("input",Ce({},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"})),Se.createElement("span",{className:s,"data-test":"DesignSystem-Checkbox-Icon"},_&&Se.createElement(ve,{name:_}))),Se.createElement("div",{className:"Checkbox-labelWrapper"},a&&a.trim()&&Se.createElement("label",{htmlFor:y,className:w,"data-test":"DesignSystem-Checkbox-Label"},Se.createElement(je,{size:"tiny"===n?"small":"regular",appearance:c?"disabled":"default"},a.trim())),h&&Se.createElement(je,{"data-test":"DesignSystem-Checkbox-HelpText",size:"small",appearance:c?"disabled":"subtle"},h.trim()))))}),wt=(bt.displayName="Checkbox",["size","sizeXS","sizeS","sizeM","sizeL","sizeXL","className","children"]),x=Se.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,wt),r=ke((Ee(n={},"Col",!0),Ee(n,"Col--".concat(r),r),Ee(n,"Col--xs-".concat(o),o),Ee(n,"Col--s-".concat(i),i),Ee(n,"Col--m-".concat(a),a),Ee(n,"Col--l-".concat(s),s),Ee(n,"Col--xl-".concat(c),c),Ee(n,"".concat(u),u),n));return Se.createElement("div",Ce({ref:t,"data-test":"DesignSystem-Column"},e,{className:r}),l)}),St=(x.displayName="Column",["date","open","position","inputFormat","outputFormat","inputOptions","validators","withInput","disabledBefore","disabledAfter","onDateChange","closeOnSelect","size","showTodayDate","children","view"]),n=function(){e(o,Se["Component"]);var r=h(o);function o(e){d(this,o),Ee(G(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))}),Ee(G(s),"onDateChangeHandler",function(e){s.setState({init:!0,date:e}),s.props.closeOnSelect&&s.setState({open:!1})}),Ee(G(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?Se.createElement(Se.Fragment,null):c,u=t.view,t=W(t,St),l=this.state.date,f=ot,p=new Date(Date.now()),f="".concat(f[p.getMonth()]," ").concat(p.getDate()),p=y(l,n,r),l=y(o,n,r),o=y(i,n,r),i=ke({"d-flex justify-content-center":!0,"pb-5":"small"===a,"pb-6":"large"===a,"pt-3":"large"===a&&"year"===u});return Se.createElement("div",null,Se.createElement("div",{className:"d-flex"},c,Se.createElement(ct,Ce({},t,{size:a,date:p,view:u,disabledBefore:l,disabledAfter:o,onDateChange:this.onDateChangeHandler}))),s&&Se.createElement("div",{className:i,"data-test":"DesignSystem-Select--TodaysDate-wrapper"},Se.createElement(gt,{label:"Today, ".concat(f),name:"chip",type:"action",disabled:(n=!0,p&&l&&o?n=l<p&&p<o:p&&l?n=l<p:p&&o&&(n=p<o),!n),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?Se.createElement(wa,{trigger:Se.createElement(be,{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}(),_t=(Ee(n,"defaultProps",_e(_e({},ct.defaultProps),{},{position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[N],inputOptions:{},closeOnSelect:!0})),function(e){return e.includes("a")||e.includes("A")}),Et=function(e){return e.includes("p")||e.includes("P")},Ct=function(e){return("0"+e).slice(-2)},Ot=function(e){var t,n,r;return _t(r=e)||Et(r)?(r=Oe((r=e).split(" "),2),t=r[0],r=r[1],t=t.split(":"),n=t[0],t=t[1],"12"===n&&_t(r)&&(n="00"),Et(r)&&"12"!==n&&(n=(parseInt(n,10)+12).toString()),"".concat(n,":").concat(t)):e},xt=function(e,t){e=we(e);return we(t)<e},kt=function(e,t,n){var r,o,i,a;return""===t||xt(e,t)?(r=e,o=t,i=Ne("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)):Ne(e,t,n)},Dt=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,Ie(r=s)&&(a=Me(n)),o&&i&&(o=(r=Pe(i,n)).hour,i=r.minute,a+=" (".concat(o," hr ").concat(i," min)")),a),value:e,disabled:f&&(n=f,o=r=e,Ie(s)&&(o=Me(r)),!!n.includes(o)),selected:!1,optionID:c+t};var n,r,o,i,a})},Tt=function(e){return e?"":"23:59"},jt=function(){var e=new Date;return Ct(e.getHours())+":"+Ct(e.getMinutes())},It=/[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~]/,Mt=function(e,t){for(var n=0,r={hour:100,mins:100},o=0;o<e.length;o++){var i=Pe(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},Nt=function(e){return e.map(function(e){return e.value})},Pt=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=Ke(e=e,t=t),n=t.hour,"60"===(t=t.min)&&(t="00",n=(parseInt(n,10)+1).toString()),n="".concat(n,":").concat(t),Mt(e,n)):-1},At=function(e){return e.sort(function(e,t){return e.value>t.value?1:t.value>e.value?-1:0})},Rt=function(e,t){e.scrollTo(0,t)};Je.defaultProps={timeFormat:"12-Hour",interval:15},Je.displayName="TimePickerWithSearch",Xe.defaultProps={inputFormat:"hh:mm AM",outputFormat:"hh:mm AM",inputOptions:{},validators:[A]},Xe.displayName="TimePickerWithInput";function Lt(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 Ft(e,t,n){return void 0===n?Lt(e,t,!1):Lt(e,n,!1!==t)}_e(_e({},Xe.defaultProps),Je.defaultProps);function zt(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=Xt[p=u?"WITH_CHECKBOX":void 0===p?"DEFAULT":p],g=ke((Ee(g={},"Option",!0),Ee(g,"Option--active",s),Ee(g,"Option--selected",r&&!l),Ee(g,"Option--disabled",d),Ee(g,"OptionWrapper",!0),Ee(g,"color-".concat(h),!0),g)),v=ke((Ee(v={},"Option-checkbox",!0),Ee(v,"Option-checkbox--active",s),Ee(v,"OptionWrapper",!0),v)),b=ke((Ee(b={},"Option-text",!0),Ee(b,"Option-text--wrap",!e.truncateOption),b)),w=ke((Ee(w={},"OptionWrapper",!0),Ee(w,"OptionWrapper--disabled",d),w));return e.optionRenderer?Se.createElement("div",Ce({"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?Se.createElement(je,{"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,Se.createElement(Sn,{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 Bt(e){var t,n=void 0===(n=e.size)?"small":n,r=e.round,o=e.className,e=De(e),r=ke((Ee(t={PlaceholderImage:!0,"Placeholder--animation":!0},"PlaceholderImage--round",r),Ee(t,"PlaceholderImage--".concat(n),n),t),o);return Se.createElement("span",Ce({},e,{className:r}))}function Kt(e){var t=e.loadingType,n=["medium","large"][(e.optionIndex+2)%2];switch(t){case"DEFAULT":return Se.createElement(I,{length:n,"data-test":"DesignSystem-Dropdown--PlaceholderParagraph"});case"WITH_ICON":return Se.createElement(M,{withImage:!0,round:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(I,{length:"large"}));case"WITH_META":return Se.createElement(M,{withImage:!1,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(I,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),Se.createElement(I,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}));case"WITH_CHECKBOX":return Se.createElement(M,{withImage:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(I,{length:"large"}));case"ICON_WITH_META":return Se.createElement(M,{withImage:!0,round:!0,imageSize:"medium","data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(I,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),Se.createElement(I,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}))}return null}function Ht(e){var t=e.dropdownStyle,n=e.errorType,r=e.updateOptions;return Se.createElement("div",{className:"Dropdown-wrapper px-7 d-flex",style:t,"data-test":"DesignSystem-Dropdown--wrapper"},Se.createElement("div",{className:"d-flex flex-column justify-content-center align-items-center","data-test":"DesignSystem-Dropdown--errorWrapper"},Se.createElement(je,{className:"text-align-center mb-3",weight:"strong"},Qt[n]),Se.createElement(je,{className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},en[n]),"FAILED_TO_FETCH"===n&&Se.createElement(Te,{size:"tiny",largeIcon:!0,"aria-label":"reload",icon:"refresh",iconAlign:"left",onClick:function(){return r()}},"Reload")))}function Ut(i){function R(){var e=document.querySelector(".Dropdown-wrapper");(e=null==e?void 0:e.offsetHeight)&&fe(e)}function L(){return Se.createElement(Ht,{dropdownStyle:_e(_e({},ge),{},{minHeight:p}),updateOptions:ne,errorType:oe})}function o(e,t){Q(e,t),he||null!=(e=O.current)&&e.focus(),T(g)}function F(){var e;X(),null!=(e=O.current)&&e.focus()}function z(){var e;J(),null!=(e=O.current)&&e.focus()}function B(){T(g),E&&w&&E("")}function K(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 Se.createElement("div",{className:ve(t)},Se.createElement(je,{size:"small",appearance:"subtle"},e),t&&Se.createElement(Te,{onClick:n,disabled:r,appearance:"transparent",size:"tiny",type:"button"},"Clear"))}function H(t,e){var n=Ye(w,m,f,_)?e+1===D:e===D,r=-1!==y.findIndex(function(e){return e.value===t.value}),o="Checkbox-option-".concat(e,"-").concat(t.value,"-").concat((new Date).getTime());return Se.createElement("label",{htmlFor:o},Se.createElement(zt,{optionData:t,truncateOption:V,selected:r,index:e,updateActiveOption:we,optionRenderer:Z,active:n,checkboxes:_,menu:b,onClick:function(){return be(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?D+1:D-1,u="down"===e?s.length:-1;c!==u;){if("true"!==s[c].getAttribute("data-disabled")){var l=s[c];l&&(n=se.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?Rt(n,r.offsetTop-o.height+a):i.top<o.top&&n&&Rt(n,r.offsetTop-a)),void 0!==l&&T(c);break}"down"===e?c++:c--}}var W,e,s,c,u=void 0===(t=i.listOptions)?[]:t,q=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,V=void 0===(d=i.truncateOption)||d,f=void 0===(d=i.withSelectAll)||d,p=void 0===(d=i.maxHeight)?200:d,d=i.customTrigger,h=i.selected,y=i.tempSelected,G=i.previousSelected,m=i.remainingOptions,g=i.firstEnabledOption,v=i.dropdownOpen,b=i.menu,w=i.searchTerm,S=i.showApplyButton,_=i.withCheckbox,Y=i.withSearch,$=i.popoverOptions,E=i.onSearchChange,Z=i.optionRenderer,J=i.applyOptions,X=i.cancelOptions,Q=i.toggleDropdown,C=i.className,ee=void 0===(ee=i.searchPlaceholder)?"Search..":ee,te=i.scrollIndex,ne=i.updateOptions,re=i.noResultMessage,oe=i.errorType,ie=i.loadingOptions,ae=De(i),se=Se.createRef(),ce=Se.createRef(),O=Se.createRef(),x=Se.createRef(),k=Se.createRef(),ue=(I=Oe(Se.useState(),2))[0],le=I[1],D=(I=Oe(Se.useState(g),2))[0],T=I[1],j=(I=Oe(Se.useState(),2))[0],fe=I[1],I=0===u.length&&!ie&&h.length<=0;Se.useEffect(function(){var e,t,n,r,o;return v&&(o=i.width,t=i.minWidth,n=i.maxWidth,r=null==(r=ce.current)?void 0:r.clientWidth,o={width:o||r,minWidth:t||(S?176:b?128:r),maxWidth:n||"100%"},requestAnimationFrame(R),le(o),te)&&0===y.length&&(e=setTimeout(function(){Ze(te,u)},100)),function(){clearTimeout(e)}},[v]),Se.useEffect(function(){g!==D&&T(g)},[g]);var M=void 0===(M=i.triggerSize)?"regular":M,N=void 0===(N=i.placeholder)?"Select":N,pe=i.icon,de=i.error,he=i.disabled,P=i.inlineLabel,A=i.triggerLabel,ye=i.iconType,me=d?d(A||N):Se.createElement(Se.Fragment,null),d=d?Se.cloneElement(me,{tabIndex:0,ref:O}):Se.createElement(Jt,{placeholder:N,triggerSize:M,open:v,icon:pe,disabled:he,inlineLabel:P,menu:b,error:de,ref:O,iconType:ye},A),ge={maxHeight:p,overflowY:"auto",overflowX:"hidden",minHeight:j},me={maxHeight:j||p,overflowY:"auto",overflowX:"hidden",minHeight:j},ve=function(e){var t;return ke((Ee(t={},"Dropdown-section",!0),Ee(t,"Dropdown-section--withClear",e),t))},N=ke(Ee({},"Dropdown",!0),C),pe=ke((Ee(M={},"Dropdown-wrapper",!0),Ee(M,"Dropdown-wrapper--wrap",!V),M)),de=ke((Ee(P={},"Option-checkbox--active",0===D),Ee(P,"Option-checkboxWrapper",!0),Ee(P,"Option-checkbox",!0),Ee(P,"OptionWrapper",!0),P)),be=function(e){i.onOptionSelect(e),null!=(e=O.current)&&e.focus()},we=function(e,t){t=_&&f&&!i.async&&!t?e+1:e;T(t)},ye=(Y||i.async)&&(!I||"NO_RECORDS_FOUND"===oe);return Se.createElement("div",Ce({},ae,{className:N,ref:ce,onKeyDown:function(e){var t,n=".OptionWrapper";switch(e.key){case"ArrowDown":e.preventDefault(),v?U("down",n):o(!v);break;case"ArrowUp":e.preventDefault(),v?U("up",n):o(!v);break;case"Enter":var r=document.activeElement;v&&(q.current===r||O.current===r)&&(e.preventDefault(),r=_?"".concat(n," .Checkbox-input"):n,r=document.querySelectorAll(r)[D])&&r.click(),v||o(!v);break;case"Tab":!S&&v?(e.preventDefault(),o(!1,"onClick")):(r=document.activeElement,t=null==(t=k.current)?void 0:t.disabled,(r===x.current&&t||r===k.current)&&v?(e.preventDefault(),o(!1,"onClick")):S&&v&&(e.preventDefault(),r===x.current?null!=(t=k.current)&&t.focus():null!=(r=x.current)&&r.focus()))}}}),Se.createElement(wa,Ce({onToggle:o,trigger:d,triggerClass:b?"":"w-100",open:v,customStyle:ue,position:tn[t]},$,{"data-test":"DesignSystem-Dropdown--Popover"}),ye&&Se.createElement("div",{className:"Dropdown-inputWrapper"},Se.createElement(pn,{name:"Dropdown-search",icon:"search",value:w,placeholder:ee,autoFocus:!0,onChange:K,onClear:B,ref:q,autoComplete:"off",className:"Dropdown-input"})),(A=i.selectedSectionLabel,s=void 0===A?"Selected Items":A,A=void 0===(A=i.allItemsSectionLabel)?"All Items":A,j=void 0===(j=i.loadersCount)?10:j,C=void 0===(C=i.errorTemplate)?L:C,M=Ye(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(xe)}(u),j&&ie?Se.createElement("div",{className:"Dropdown-loading"},Se.createElement("div",{className:"Dropdown-wrapper",style:me},(e=j,e=Array(j).fill("Loading"),W=_?"WITH_CHECKBOX":n,e.map(function(e,t){return Se.createElement("div",{className:"Option-loading",key:"".concat(e,"-").concat(t)},Se.createElement(Kt,{loadingType:W,optionIndex:t}))})))):I?re?Se.createElement("div",{className:"Dropdown-wrapper",style:ge,"data-test":"DesignSystem-Dropdown--errorWrapper"},Se.createElement("div",{className:"Option"},Se.createElement("div",{className:"Option-subinfo"},re))):C&&C({errorType:oe}):Se.createElement("div",{className:pe,style:ge,ref:se},M&&(j=void 0===(j=i.selectAllLabel)?"Select All":j,e=i.selectAll,C=i.onSelectAll,j=j.trim()?j.trim():"Select All",M="Checkbox-option-".concat(j.toLowerCase().replace(/\s+/g,""),"-").concat((new Date).getTime()),Se.createElement("div",{className:de,onMouseEnter:function(){return we(0,!0)}},Se.createElement("label",{htmlFor:M,className:"Checkbox-label"},Se.createElement(bt,{label:j,onChange:C,checked:e.checked,indeterminate:e.indeterminate,tabIndex:-1,className:"OptionCheckbox",id:M})))),0<h.length&&a(s,!0),h.map(H),0<h.length&&0<u.length-h.length&&!(null!=(j=u[0].group)&&j.trim())&&a(A),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 Se.createElement("div",{className:"Option-checkboxWrapper",key:t},n!==r&&r&&a(r),H(e,o))}),i.async&&0<m&&(C=i.footerLabel,Se.createElement("div",{className:"Dropdown-footer"},Se.createElement(je,{size:"small",appearance:"subtle"},void 0===C?"Search for more options":C))))),S&&_&&(P=We(G,y)||i.loadingOptions,Se.createElement("div",{className:"Dropdown-buttonWrapper"},Se.createElement(Te,{ref:x,className:"mr-4",appearance:"basic",onClick:F,disabled:i.loadingOptions,size:"tiny",tabIndex:-1,"data-test":"DesignSystem-Dropdown-CancelButton",type:"button"},l),Se.createElement(Te,{ref:k,appearance:"primary",disabled:P,size:"tiny",onClick:z,"data-test":"DesignSystem-Dropdown-ApplyButton",type:"button"},r)))))}function Wt(e){var t,n=e.className,r=e.iconType,e=W(e,un),n=ke((Ee(t={},"ActionButton",!0),Ee(t,"".concat(n),n),t));return Se.createElement(P,Ce({className:n,type:r,"data-test":"DesignSystem-Input-ActionButton"},e))}function qt(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,vn),e=De(e),r=ke((Ee(u={Label:!0},"Label--withInput",r),Ee(u,"Label--optional",n),u),a),u=ke({"Label-text":!0,"Label--disabled":o});return Se.createElement("div",Ce({"data-test":"DesignSystem-Label"},e,{className:r}),Se.createElement(ye,Ce({"data-test":"DesignSystem-Label--Text",className:u,componentType:"label"},c),i,function(){return 0<arguments.length&&void 0!==arguments[0]&&arguments[0]?Se.createElement("span",{className:"Label-requiredIndicator","data-test":"DesignSystem-Label--RequiredIndicator"}):(1<arguments.length?arguments[1]:void 0)?Se.createElement(je,{"data-test":"DesignSystem-Label--OptionalText",appearance:"subtle",className:"Label-optionalText"},"(optional)"):null}(t,n),s&&Se.createElement(Ea,{tooltip:s},Se.createElement(P,{"data-test":"DesignSystem-Label--Info",name:"info",size:12,appearance:"subtle",className:"ml-3 cursor-pointer d-flex align-items-center"}))))}function Gt(e){var t=e.label,n=e.icon,r=e.size,e=e.iconType;return Se.createElement("span",{"data-test":"DesignSystem-MetaList--Meta",className:"Meta"},n&&Se.createElement(P,{"data-test":"DesignSystem-MetaList--MetaIcon",name:n,appearance:"subtle",className:"Meta-icon",type:e,size:"regular"===r?16:12}),Se.createElement(je,{size:r,"data-test":"DesignSystem-MetaList--MetaLabel",appearance:"subtle"},t))}function Yt(e){return"".concat((100*e).toFixed(2),"%")}function $t(e,t,n){return null==e?e:Math.min(Math.max(e,t),n)}var Zt=["triggerSize","placeholder","menu","children","icon","disabled","open","inlineLabel","error","iconType"],Jt=Se.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,p=e.iconType,e=W(e,Zt),d=c?"disabled":"default",o=o.trim(),o=a||o,h=i?s||"more_horiz":"keyboard_arrow_down",r=ke((Ee(n={},"Button",!0),Ee(n,"DropdownButton",!0),Ee(n,"DropdownButton--".concat(r),r),Ee(n,"DropdownButton--".concat(r,"Square"),i),Ee(n,"DropdownButton--placeholder",!a&&!i),Ee(n,"DropdownButton--icon",s),Ee(n,"DropdownButton--open",u),Ee(n,"DropdownButton--error",f),n)),f=ke((Ee(u={},"Text",!0),Ee(u,"Text--regular",!0),Ee(u,"DropdownButton-text",!0),u));return Se.createElement("button",Ce({ref:t,type:"button",value:a,className:r,disabled:c,tabIndex:0,"data-test":"DesignSystem-DropdownTrigger"},e),!i&&Se.createElement("div",{className:"DropdownButton-wrapper"},l&&Se.createElement(je,{appearance:"subtle",className:"mr-4 white-space-nowrap"},"".concat(l.trim().charAt(0).toUpperCase()).concat(l.trim().slice(1))),s&&!l&&Se.createElement(P,{appearance:d,className:"d-flex align-items-center mr-4",name:s,type:p}),o&&Se.createElement("span",{className:f},o)),Se.createElement(P,{appearance:d,name:h,type:p}))}),Xt=(Jt.displayName="DropdownButton",Ee(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 Se.createElement("div",{className:t,onClick:r,onMouseEnter:a,"data-test":e,"data-disabled":c},Se.createElement("div",{className:"Option-label"},Se.createElement(je,{className:n,color:i,id:o.optionID},s)))}),Ee(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,l=i.disabled,i=i.iconType,n=ke((Ee(t={},"".concat(n),!0),Ee(t,"Option--icon",u),t));return Se.createElement("div",{className:n,onClick:o,onMouseEnter:a,"data-test":e,"data-disabled":l},u&&Se.createElement(P,{className:"Option-icon mr-4","data-test":"".concat(e,"--Icon"),name:u,type:i}),Se.createElement("div",{className:"Option-label"},Se.createElement(je,{className:r,color:s},c)))}),Ee(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 Se.createElement("div",{className:t,onClick:r,onMouseEnter:i,"data-test":e,"data-disabled":o},Se.createElement("div",{className:"Option-label"},Se.createElement(je,{className:n,color:s},u),c&&a(c)))}),Ee(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 Se.createElement("div",{className:t,onMouseEnter:i,"data-test":a,"data-disabled":r},Se.createElement(bt,{label:c,disabled:r,checked:n,onChange:o,tabIndex:-1,className:"OptionCheckbox ".concat(s?"pb-0":""),"data-test":"".concat(a,"--Checkbox"),id:e}),s&&Se.createElement("div",{className:"pl-8 ml-3"},(t=r?"disabled":"subtle",i=n?"white":"disabled","string"==typeof(c=s)?Se.createElement(je,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",appearance:t,size:"small",weight:"medium"},c):(o=c.list,c=c.seperator,Se.createElement(Sn,{list:void 0===o?[]:o,seperator:c,iconAppearance:i,labelAppearance:t,seperatorAppearance:i,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})))))}),Ee(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=ke((Ee(t={},"".concat(n),!0),Ee(t,"Option--icon",p),t));return Se.createElement("div",{className:n,onClick:i,onMouseEnter:s,"data-test":e,"data-disabled":a},p&&Se.createElement(P,{"data-test":"".concat(e,"--Icon"),className:"Option-icon mr-4",name:p,appearance:c}),Se.createElement("div",{className:"Option-label"},Se.createElement(je,{className:r,color:u},f),l&&o(l)))}),n),I=function(e){var t,n=e.length,r=e.size,o=e.className,e=De(e),i=ke(Ee({"Placeholder--animation":!0,PlaceholderParagraph:!0},"PlaceholderParagraph--".concat(r),r)),n=ke((Ee(t={"PlaceholderParagraph-wrapper":!0},"PlaceholderParagraph-wrapper--length-".concat(n),n),Ee(t,"PlaceholderParagraph-wrapper--size-".concat(r),r),t),o);return Se.createElement("div",Ce({},e,{className:n}),Se.createElement("span",{className:i}))},M=(I.displayName="PlaceholderParagraph",I.defaultProps={length:"medium"},Bt.displayName="PlaceholderImage",Bt.defaultProps={size:"small"},function(e){var t=e.imageSize,n=e.withImage,r=e.round,o=e.children,i=e.className,e=De(e),a=ke(Ee({"Placeholder-paragraph":!0},"Placeholder-paragraph--withImage",n)),i=ke(Ee({},"Placeholder",!0),i);return Se.createElement("div",Ce({"data-test":"DesignSystem-Placeholder"},e,{className:i}),n&&Se.createElement(Bt,{round:r,size:t,"data-test":"DesignSystem-Placeholder--Image"}),o&&Se.createElement("div",{className:a,"data-test":"DesignSystem-Placeholder--Paragraph"},o))}),Qt=(M.displayName="Placeholder",M.defaultProps={withImage:!0,imageSize:"small"},{FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No record available"}),en={FAILED_TO_FETCH:"We couldn't load the data, try reloading.",NO_RECORDS_FOUND:"Try modifying your search to find what you are looking for.",DEFAULT:"We have nothing to show you at the moment."},tn={right:"bottom-start",left:"bottom-end"},nn=(Ut.displayName="DropdownList",["triggerOptions","selected","tabIndex"]),rn=Se.createRef(),on=function(){e(l,Se["Component"]);var u=h(l);function l(e){d(this,l),Ee(G(v=u.call(this,e)),"staticLimit",void 0),Ee(G(v),"getDisabledOptions",function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).filter(function(e){return e.disabled})}),Ee(G(v),"fetchOptionsFunction",function(t){var n,e=v.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})})}),Ee(G(v),"getUnSelectedOptions",function(e,t){var n;return e.length?t?(t=v.props.selected,n=void 0===t?[]:t,e.filter(function(t){return qe(v.props.selected)?-1===n.findIndex(function(e){return e.value===t.value}):!t.selected})):e.filter(function(t){return-1===v.state.tempSelected.findIndex(function(e){return e.value===t.value})}):e}),Ee(G(v),"getSelectedOptions",function(e,t){var n=v.props.selected;return e.length?t?qe(v.props.selected)?void 0===n?[]:n:e.filter(function(e){return e.selected}):v.state.tempSelected:[]}),Ee(G(v),"updateOptions",function(c,e){var t=v.state,u=t.searchTerm,l=t.selectAll,f=t.tempSelected,p=t.previousSelected,d=t.errorType,h=void 0===e?v.state.async:e,t=v.props,y=t.fetchOptions,m=t.withCheckbox,g=t.withSearch;(y||v.fetchOptionsFunction)(u).then(function(e){var t,n,r,o,i,a=e.options,s=e.count;e.scrollToIndex&&setTimeout(function(){Ze(e.scrollToIndex,a)},0),(!e.searchTerm||e.searchTerm&&e.searchTerm===v.state.searchTerm)&&(h=""===u?s>v.staticLimit:h,t=Ge(h,u,m)?v.getUnSelectedOptions(a,c):a,n=""===u?v.getSelectedOptions(a,c):[],r=""===u?s:v.state.optionsLength,o=v.getDisabledOptions(t.slice(0,v.staticLimit)),i=d,i=0===r&&""===u?"DEFAULT":""!==u?"NO_RECORDS_FOUND":"FAILED_TO_FETCH",v.setState(_e(_e({},v.state),{},{errorType:y?i:d,scrollIndex:e.scrollToIndex||0,optionsLength:r,loading:!1,async:h,searchedOptionsLength:s,options:t.slice(0,v.staticLimit),tempSelected:c?n:f,previousSelected:c?n:p,selected:Ge(h,u,m)?n:[],triggerLabel:v.updateTriggerLabel(c?n:f),selectAll:!h&&c?$e(n,r,o.length):l})),h||g)&&null!=(i=rn.current)&&i.focus()}).catch(function(){v.setState({errorType:y?"FAILED_TO_FETCH":d,loading:!1,options:[]})})}),Ee(G(v),"updateSearchTerm",function(e){v.setState(_e(_e({},v.state),{},{loading:!0,searchInit:!0,searchTerm:e,errorType:"NO_RECORDS_FOUND"}))}),Ee(G(v),"updateOnPopperToggle",function(){var e,t=v.props,n=t.withCheckbox,r=t.showApplyButton,o=t.onClose,i=t.name,t=t.selected,t=void 0===t?[]:t,a=v.state,s=a.previousSelected,c=a.tempSelected,u=a.optionsLength,l=a.async,f=a.loading,p=a.searchTerm,a=a.options,d=(Ve(v.props.open)?v.props:v.state).open,a=v.getDisabledOptions(a).length;n&&r&&(e=qe(v.props.selected)?t:s,v.setState({tempSelected:e,selectAll:$e(e,u,a),triggerLabel:v.updateTriggerLabel(e)})),Ve(v.props.open)&&v.setState({open:d}),d&&(u=Ge(l,p,n)&&!We(v.state.selected,c),v.setState({loading:u||f||""!==p,searchInit:""!==p,searchTerm:""}),u)&&v.updateOptions(!1),o&&!d&&(a=(n&&r?qe(v.props.selected)?t:s:v.state.tempSelected).map(function(e){return e.value}),v.debounceOnClose(a,i))}),Ee(G(v),"debounceOnClose",Ft(300,function(e,t){var n=v.props.onClose;n&&n(e,t)})),Ee(G(v),"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=v.props).triggerOptions,e=e.getLabel,t=(n=void 0===n?{}:n).customLabel,n=n.labelLimit,r=v.state?v.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)}),Ee(G(v),"updateSelectedOptions",function(e,t,n){var r=v.state,o=r.optionsLength,i=r.previousSelected,a=r.selected,s=r.loading,r=r.open,c=v.props,u=c.onChange,l=c.withCheckbox,f=c.showApplyButton,p=c.closeOnSelect,d=c.name,c=c.onPopperToggle,h=l&&f&&n,y=v.getDisabledOptions(v.state.options),m=0===e.length&&0<a.length||e.every(function(e){return e.disabled})&&!a.every(function(e){return e.disabled});v.setState(_e(_e({},v.state),{},{tempSelected:e,triggerLabel:v.updateTriggerLabel(e),selectAll:$e(e,o,y.length),open:Ve(v.props.open)||l?r:!p,previousSelected:h?e:i,selected:m?e:a,loading:!!m||s})),m&&v.debounceClear(),!u||f&&!n||(o=e.map(function(e){return e.value}),u(t?o[0]:o,d)),!l&&p&&c&&Ve(v.props.open)&&c(!1,"optionClick")}),Ee(G(v),"isValidOption",function(e){var t=v.props,n=t.closeOnSelect,r=t.withCheckbox,o=t.open,t=t.onPopperToggle,i=v.state.tempSelected;return!(0<i.length&&!r&&i[0].value===e.value&&(v.setState(_e(_e({},v.state),{},{open:Ve(o)||!n})),!r&&n&&t&&Ve(o)&&t(!1,"optionClick"),1))}),Ee(G(v),"onOptionSelect",function(e){var t=v.props,n=t.onUpdate,r=t.selected,t=t.menu;qe(r)?n&&(v.isValidOption(e)||t)&&n("select-option",e):(v.isValidOption(e)||t)&&v.updateSelectedOptions([e],!0)}),Ee(G(v),"onSelect",function(t,e){var n=v.props,r=n.onUpdate,o=n.selected,n=n.showApplyButton;qe(o)&&!n?r&&r(e?"select-option":"deselect-option",t):(o=v.state.tempSelected.slice(),e||(n=o.findIndex(function(e){return e.value===t.value}),o.splice(n,1)),o=e?o.concat(t):o,v.updateSelectedOptions(o,!1))}),Ee(G(v),"onSelectAll",function(e){var t=v.props,n=t.onUpdate,r=t.selected,t=t.showApplyButton,o=v.state,i=o.tempSelected,o=o.options;qe(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(xe(o.filter(function(e){return!e.disabled})),xe(r)):r,v.updateSelectedOptions(t,!1))}),Ee(G(v),"debounceSearch",Ft(v.props.searchDebounceDuration,function(){v.setState({searchInit:!1},function(){v.updateOptions(!1)})})),Ee(G(v),"reload",function(){v.setState({loading:!0},function(){v.updateOptions(!1)})}),Ee(G(v),"debounceClear",Ft(250,function(){return v.updateOptions(!1)})),Ee(G(v),"onClearOptions",function(){var e=v.props,t=e.selected,n=e.name,r=e.onUpdate,o=e.showApplyButton,e=e.onChange,i=v.state.tempSelected.filter(function(e){return e.disabled});qe(t)&&!o?r&&r("clear-all"):(v.setState({selected:i,tempSelected:i,triggerLabel:"",loading:!0}),v.debounceClear(),e&&!o&&e(i,n))}),Ee(G(v),"onTogglePopper",function(e){var t=v.props.onPopperToggle;t&&Ve(v.props.open)&&t(!1,e)}),Ee(G(v),"onCancelOptions",function(){var e=v.state,t=e.previousSelected,n=e.tempSelected,e=e.optionsLength,r=v.props,o=r.selected,i=r.onUpdate,a=r.onClose,r=r.name,s=!!Ve(v.props.open)&&v.state.open,c=t.map(function(e){return e.value});qe(o)?i&&i("cancel-selected",t,n):(o=v.updateTriggerLabel(t),i=v.getDisabledOptions(v.state.options),v.setState(_e(_e({},v.state),{},{tempSelected:t,selectAll:$e(t,e,i.length),triggerLabel:o,open:s})),a&&!s&&a(c,r)),v.onTogglePopper("cancelClick")}),Ee(G(v),"onApplyOptions",function(){var e=v.state,t=e.tempSelected,e=e.previousSelected,n=v.props,r=n.onChange,o=n.selected,i=n.onUpdate,a=n.onClose,n=n.name,s=!!Ve(v.props.open)&&v.state.open,c=t.map(function(e){return e.value});qe(o)?i&&i("apply-selected",e,t):(v.setState(_e(_e({},v.state),{},{previousSelected:t,optionsApplied:!0,open:s})),r&&r(c,n),a&&!s&&a(c,n)),v.onTogglePopper("applyClick")}),Ee(G(v),"onToggleDropdown",function(e,t){var n;v.props.disabled||((n=v.props.onPopperToggle)&&Ve(v.props.open)?n(e,t):v.setState({open:e}))});var v,t=e.selected,t=void 0===t?[]:t,n=e.totalOptions,r=e.withCheckbox,o=e.loading,i=e.open,a=e.options,e=(v.staticLimit=Math.min(100,e.staticLimit),n||a.length),n="fetchOptions"in v.props||e>v.staticLimit,s=n?[]:v.getSelectedOptions(a,!0),c=v.getDisabledOptions(a);return v.state={async:n,optionsLength:e,open:i,searchInit:!1,searchedOptionsLength:e,optionsApplied:!1,options:a||[],loading:n||o,searchTerm:"",tempSelected:s,previousSelected:s,selected:Ge(n,"",r)?t:[],triggerLabel:v.updateTriggerLabel(s,e),selectAll:$e(s,e,c.length),errorType:"DEFAULT"},v}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(_e(_e({},this.state),{},{options:a,loading:o,tempSelected:i,previousSelected:i,optionsLength:a.length,searchedOptionsLength:a.length,triggerLabel:this.updateTriggerLabel(i),selectAll:$e(i,this.state.optionsLength,r)})),n&&null!=(o=rn.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||Ve(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,p=e.scrollIndex,e=e.errorType,d=this.props,h=d.withSelectAll,h=void 0===h||h,d=d.withCheckbox,y=this.props,m=y.triggerOptions,m=void 0===m?{}:m,g=(y.selected,y.tabIndex),y=W(y,nn),s=s-t.length,g=g||(Ye(o,s,h,d)?0:t.findIndex(function(e){return!e.disabled}));return Se.createElement(Ut,Ce({listOptions:t,inputRef:rn,remainingOptions:s,firstEnabledOption:g,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:m.customTrigger,scrollIndex:p,updateOptions:this.reload,errorType:e},y))}}]),l}(),an=(Ee(on,"defaultProps",{triggerOptions:{},options:[],closeOnSelect:!0,staticLimit:50,searchDebounceDuration:300}),["appearance","size","children","className","color"]),sn={s:"h5",m:"h4",l:"h3",xl:"h2",xxl:"h1"},cn=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.className,a=e.color,e=W(e,an),n=ke((Ee(t={Heading:!0},"Heading--".concat(r),r),Ee(t,"Heading--".concat(n),!a&&n),Ee(t,"color-".concat(a),a),t),i);return Se.createElement(ye,Ce({"data-test":"DesignSystem-Heading"},e,{className:n,componentType:sn[r]}),o)},un=(cn.displayName="Heading",cn.defaultProps={appearance:"default",size:"m"},["className","iconType"]),ln=(Wt.displayName="ActionButton",Wt.defaultProps={size:16,type:"rounded"},["size","type","minWidth","defaultValue","name","placeholder","value","icon","inlineLabel","required","error","info","onChange","onClick","onClear","onBlur","onFocus","onPaste","actionIcon","className","autoFocus","disabled","readOnly","iconType"]),fn={tiny:12,regular:16,large:20},pn=Se.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=e.iconType,x=W(e,ln),k=Se.useRef(null),D=Oe(Se.useState(!c),2),T=D[0],j=D[1],D=(Se.useImperativeHandle(t,function(){return k.current}),Se.useEffect(function(){var e;_&&null!=(e=k.current)&&e.focus({preventScroll:!0})},[]),De(e)),e=ke((Ee(t={},"Input",!0),Ee(t,"Input--".concat(n),n),Ee(t,"Input--disabled",E||C),Ee(t,"Input--error",p),t),S),S=ke((Ee(t={},"Input-input",!0),Ee(t,"Input-input--".concat(n),n),t)),T=ke((Ee(t={},"Input-icon",!0),Ee(t,"Input-icon--left",!0),Ee(t,"Input-icon--inputBlank",T),Ee(t,"Input-icon--error",p),t)),t=ke((Ee(p={},"Input-icon",!0),Ee(p,"Input-iconWrapper--right",!0),p)),p=Se.createElement("div",{className:t,tabIndex:0},Se.createElement(P,{name:"info",size:fn[n],className:"Input-icon--right"}));return Se.createElement("div",{"data-test":"DesignSystem-InputWrapper",className:e,style:{minWidth:o},onClick:function(){var e;return null==(e=k.current)?void 0:e.focus()},role:"presentation",onBlur:function(){var e;return j(!(null!=(e=k.current)&&e.value))}},l&&Se.createElement("div",{className:"Input-inlineLabel"},Se.createElement(je,{appearance:"subtle"},l)),"tiny"!==n&&u&&Se.createElement("div",{className:T},Se.createElement(P,{name:u,size:fn[n],type:O})),Se.createElement("input",Ce({"data-test":"DesignSystem-Input"},D,x,{ref:k,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?Se.createElement(Ea,{position:"bottom",tooltip:d},p):w&&(c||i)?w:m&&(c||i)&&Se.createElement("div",{className:t},Se.createElement(P,{"data-test":"DesignSystem-Input--closeIcon",onClick:function(e){var t;null!=(t=k.current)&&t.focus({preventScroll:!0}),m(e)},name:"close",size:fn[n],className:"Input-icon--right"})))}),dn=(pn.displayName="Input",Object.assign(pn,{ActionButton:Wt}),["size","defaultValue","name","placeholder","icon","prefix","suffix","error","min","max","onChange","onClick","onBlur","onFocus","className","autoFocus","disabled","readOnly","value","showActionButton","onKeyDown","iconType"]),hn={regular:16,large:20},yn=Se.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=e.iconType,C=W(e,dn),O=Se.useRef(null),x=void 0===w,k=Oe(Se.useState(w||r),2),D=k[0],T=k[1],k=(Se.useImperativeHandle(t,function(){return O.current}),Se.useEffect(function(){var e;g&&null!=(e=O.current)&&e.focus({preventScroll:!0})},[]),Se.useEffect(function(){void 0!==w&&T(w)},[w]),De(e)),e=ke((Ee(t={},"MetricInput",!0),Ee(t,"MetricInput--".concat(n),n),Ee(t,"MetricInput--disabled",v||b),Ee(t,"MetricInput--error",u),t),m),t=ke((Ee(u={},"MetricInput-input",!0),Ee(u,"MetricInput-input--".concat(n),n),Ee(u,"mr-4",!c&&!_&&"regular"===n),Ee(u,"mr-6",!c&&!_&&"large"===n),u)),u=ke((Ee(m={},"MetricInput-icon",!0),Ee(m,"MetricInput-icon--".concat(n),n),m)),m=ke((Ee(m={},"mr-4","regular"===n),Ee(m,"mr-5","regular"!==n),m)),j=ke((Ee(j={},"ml-4 mr-3","regular"===n),Ee(j,"mx-5","regular"!==n),j)),I=ke((Ee(I={},"p-0",!0),Ee(I,"MetricInput-arrowIcon--".concat(n),n),Ee(I,"ml-3",!0),I)),M=function(e,t){var n=Number(D||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))),x&&T(n),p&&(t=Object.create(e,{target:{value:{value:n}}}),p(t)))},N="large"===n?"regular":"tiny";return Se.createElement("div",{"data-test":"DesignSystem-MetricInputWrapper",className:e,onKeyDown:S,role:"presentation"},a&&Se.createElement(P,{"data-test":"DesignSystem-MetricInput--icon",name:a,type:E,size:hn[n],appearance:D?"subtle":"disabled",className:u}),s&&Se.createElement(je,{"data-test":"DesignSystem-MetricInput--prefix",className:m,size:n,appearance:"subtle"},s),Se.createElement("input",Ce({"data-test":"DesignSystem-MetricInput"},k,C,{type:"number",ref:O,name:o,defaultValue:r,placeholder:i,className:t,value:D,disabled:v,readOnly:b,onChange:function(e){x&&T(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(),M(t,"down"));case"ArrowUp":t.preventDefault(),M(t,"up")}}else e.preventDefault()}})),c&&Se.createElement(je,{"data-test":"DesignSystem-MetricInput--suffix",className:j,size:n,appearance:"subtle"},c),_&&Se.createElement("div",{className:"MetricInput-arrowIcons"},Se.createElement(Te,{icon:"keyboard_arrow_up",size:N,className:"".concat(I," mb-2"),onClick:function(e){return M(e,"up")},"data-test":"DesignSystem-MetricInput--upIcon"}),Se.createElement(Te,{icon:"keyboard_arrow_down",size:N,className:I,onClick:function(e){return M(e,"down")},"data-test":"DesignSystem-MetricInput--downIcon"})))}),mn=(yn.displayName="MetricInput",["mask","value","placeholderChar","validators","clearOnEmptyBlur","defaultValue","mask","error","caption","required","onChange","onPaste","onBlur","onFocus","onClear","className","id","helpText"]),n=Se.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,F=W(n,mn),v=Se.useCallback(function(e){return"object"===Z(y[e])},[y]),b=Se.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=Se.useCallback(function(){var e=b("right",0);return{start:e,end:e}},[b]),w=Se.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 qt(y,d).slice(e,t+1)},[y,d]),S=Se.useMemo(function(){return w()},[w]),_=Se.useMemo(function(){return p()},[p]),E=Se.useRef(null),C=Se.useRef(),O=Se.useRef(_),x=Se.useRef(0),r=Oe(Se.useState(r||t||""),2),k=r[0],D=r[1],T=(Se.useImperativeHandle(e,function(){return E.current}),Se.useEffect(function(){D(t||"")},[t]),Se.useEffect(function(){M(x.current)},[k]),Se.useCallback(function(e){return Math.abs(e.end-e.start)},[])),j=Se.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=Se.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=Se.useCallback(function(e){return I({start:e,end:e})},[I]),N=Se.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=Se.useCallback(function(){O.current=j(),C.current=window.requestAnimationFrame(P)},[O.current,j]),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=Se.useCallback(function(e){for(var t,n=null==(n=e.currentTarget)?void 0:n.value,r=j(),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?T(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)&&q(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&&q(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,j,N,T,w,b,v,M,D,m]),e=Se.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]),z=Se.useCallback(function(e){x.current=_.start,D(S),null!=l&&l(e)},[D,w,M,p,l]),B=Se.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=Se.useMemo(function(){return ke({"d-flex flex-column flex-grow-1":!0},f)},[f]);return Se.createElement("div",{className:K,"data-test":"DesignSystem-InputMask--Wrapper"},Se.createElement(pn,Ce({},F,{value:k,error:i,required:R,onFocus:B,onChange:r,onClear:k===S?void 0:z,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=q(h,n);r&&s&&o&&(s(e,n),D(n))},autoComplete:"off",ref:E})),Se.createElement(ks,{message:i?a:L,error:i}))}),gn=(n.displayName="InputMask",n.utils={getDefaultValue:qt},n),vn=["required","optional","withInput","disabled","children","className","info"],bn=(Vt.displayName="Label",["children","className","appearance","size","disabled"]),wn=function(e){var t,n=e.children,r=e.className,o=e.appearance,i=e.size,a=e.disabled,e=W(e,bn),i=ke((Ee(t={Link:!0},"Link--".concat(i),i),Ee(t,"Link--".concat(o),o),Ee(t,"Link--".concat(o,"-disabled"),a),t),r);return Se.createElement(ye,Ce({"data-test":"DesignSystem-Link",className:i,componentType:"a",tabIndex:a?-1:0},e),n)},Sn=(wn.displayName="Link",wn.defaultProps={appearance:"default",size:"regular",disabled:!1},Gt.displayName="Meta",function(e){var i=e.list,t=e.seperator,n=e.className,a=e.size,e=De(e),n=ke(Ee({},"MetaList",!0),n),s=ke(Ee({},"MetaList-seperator",!0)),r=ke((Ee(r={},"MetaList-seperator",!0),Ee(r,"MetaList-seperator--left",!0),r));return Se.createElement("div",Ce({"data-test":"DesignSystem-MetaList"},e,{className:n}),t&&Se.createElement(P,{"data-test":"DesignSystem-MetaList--Seperator",name:"fiber_manual_record",size:8,className:r,appearance:"disabled"}),i.map(function(e,t){var n=e.label,r=e.icon,e=e.iconType,o=t!==i.length-1;return Se.createElement("span",{key:t,className:"MetaList-item"},Se.createElement(Gt,{size:a,label:void 0===n?"":n,icon:r,iconType:e}),o&&Se.createElement(P,{"data-test":"DesignSystem-MetaList--rightSeperator",name:"fiber_manual_record",size:8,className:s,appearance:"disabled"}))}))});Sn.displayName="MetaList",Sn.defaultProps={seperatorAppearance:"disabled",iconAppearance:"subtle",labelAppearance:"subtle",size:"regular"};function _n(e,t,n,r){for(var o=t<n?1:-1,i=t;i!==n+o;i+=o)e[i]=r}var En=function(){e(i,Se["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 Ee(G(o=r.call.apply(r,[this].concat(t))),"state",{isHandleMoving:!1,isHandleHovered:!1}),Ee(G(o),"handleElement",null),Ee(G(o),"refHandlers",{handle:function(e){return o.handleElement=e}}),Ee(G(o),"mouseEventClientOffset",function(e){return e.clientX}),Ee(G(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}),Ee(G(o),"changeValue",function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:o.props.onChange,e=$t(e,o.props.min,o.props.max);return isNaN(e)||o.props.value===e||t&&t(e),e}),Ee(G(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)}),Ee(G(o),"continueHandleMovement",function(e){var e=o.mouseEventClientOffset(e);o.state.isHandleMoving&&!o.props.disabled&&(e=o.clientToValue(e),o.changeValue(e))}),Ee(G(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))}),Ee(G(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()))}),Ee(G(o),"handleKeyUp",function(e){o.props.disabled||0<=[37,39].indexOf(e.keyCode)&&(e=o.props.onRelease)&&e(o.props.value)}),Ee(G(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}}),Ee(G(o),"handleMouseOver",function(){o.setState({isHandleHovered:!0})}),Ee(G(o),"handleMouseLeave",function(){o.setState({isHandleHovered:!1})}),Ee(G(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(Yt((r-t)*n)," - ").concat(e,"px)")},n=ke((Ee(t={},"Slider-handle",!0),Ee(t,"Slider-handle--disabled",o),Ee(t,"Slider-handle--active",s),Ee(t,"border-0",o),t)),s=ke((Ee(e={},"Slider-tooltip",!0),Ee(e,"Tooltip",!0),Ee(e,"d-none",!a),e));return Se.createElement(Se.Fragment,null,Se.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"}),Se.createElement("div",{className:s,style:r},i))}}]),i}(),n=function(){e(n,Se["Component"]);var t=h(n);function n(e){var p;return d(this,n),Ee(G(p=t.call(this,e)),"handleElements",[]),Ee(G(p),"trackElement",null),Ee(G(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}),Ee(G(p),"getOffsetRatio",function(e){return $t((e-p.props.min)*p.state.tickSizeRatio,0,1)}),Ee(G(p),"addHandleRef",function(e){null!=e&&p.handleElements.push(e)}),Ee(G(p),"getHandleValues",function(e){e=Se.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}),Ee(G(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}))}),Ee(G(p),"getTrackFill",function(e,t){return void 0!==e.fillAfter?e.fillAfter:void 0!==t&&void 0!==t.fillBefore&&t.fillBefore}),Ee(G(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)}),Ee(G(p),"getLockedHandleIndex",function(e,t){var n=e<t?1:-1,e=e+n;return e!==t+n?e:-1}),Ee(G(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?(_n(n,t,i,n[i]),n):(_n(r,t,o,e),r)}),Ee(G(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])})}),Ee(G(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])}))}),Ee(G(p),"formatLabel",function(e){var t=p.props.labelRenderer,e=e.toFixed(p.state.labelPrecision);return"function"==typeof t?t(Number(e)):e}),Ee(G(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 Se.createElement(En,{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})})}),Ee(G(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:Yt(e)},t=!a&&-1!==u.indexOf(n.toFixed(p.state.labelPrecision)),r=ke((Ee(r={},"Slider-ticks",!0),Ee(r,"bg-dark",t),r));s.push(Se.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"},Se.createElement("span",{className:r}),!1!==i&&Se.createElement(je,{size:"small",appearance:t?"default":"disabled"},p.formatLabel(n))))}(l,f);return s}),Ee(G(p),"renderTrackFill",function(e,t,n){var r=Oe([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=_e({},{width:"".concat(100-r-o,"%")}),o=p.getTrackFill(t,n),n=ke((Ee(t={},"Slider-progress",!0),Ee(t,"Slider-progress--disabled",p.props.disabled),Ee(t,"Slider-progress--inRange",o),Ee(t,"Slider-progress--inRangeDisabled",o&&p.props.disabled),t));return Se.createElement("div",{key:"track-".concat(e),className:n,style:r})}),Ee(G(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}),Ee(G(p),"handleLabelMouseOver",function(e){p.setState({hoveredLabelValue:e})}),Ee(G(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=De(this.props),e=ke(Ee({},"Slider",!0),e),o=ke((Ee(o={},"Slider-wrapper",!0),Ee(o,"Slider-wrapper--disabled",this.props.disabled),o));return Se.createElement("div",Ce({},r,{className:e,"data-test":"DesignSystem-MultiSlider"}),n&&Se.createElement(Vt,{withInput:!0},n),Se.createElement("div",{className:o},Se.createElement("div",{className:"Slider-track",ref:function(e){return t.trackElement=e},onMouseDown:this.maybeHandleTrackClick,"data-test":"DesignSystem-MultiSlider-Slider-Track"},this.renderTracks()),Se.createElement("div",{className:"Slider-axis"},this.renderLabels()),this.renderHandles()))}}]),n}(),Cn=(Ee(n,"defaultProps",{labelStepSize:1,max:10,min:0,stepSize:1,labelRenderer:!0}),Ee(n,"Handle",function(){return null}),["children","className","onOutsideClick"]),On=Se.forwardRef(function(e,t){var n=e.children,r=e.className,o=e.onOutsideClick,e=W(e,Cn),i=Se.useRef(null),a=(Se.useImperativeHandle(t,function(){return i.current},[i]),Se.useEffect(function(){return document.addEventListener("click",a,!0),function(){document.removeEventListener("click",a)}},[]),Se.useCallback(function(e){var t=i;e.target&&t.current&&(t.current.contains(e.target)||o(e))},[])),t=ke(Ee({},"OutsideClick",!0),r);return Se.createElement("div",Ce({ref:i},e,{className:t}),n)}),xn=(On.displayName="OutsideClick",["appearance","children","className","color"]),kn=function(e){var t,n=e.appearance,r=e.children,o=e.className,i=e.color,e=W(e,xn),n=ke((Ee(t={Text:!0},"Text--".concat(n),!i&&n),Ee(t,"color-".concat(i),i),t),o);return Se.createElement(ye,Ce({"data-test":"DesignSystem-Paragraph"},e,{className:n,componentType:"p"}),r)},Dn=(kn.displayName="Paragraph",kn.defaultProps={appearance:"default"},["size","label","disabled","onChange","name","value","checked","defaultChecked","className","helpText","error"]),r=Se.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,Dn),d=Se.useRef(null),t=(Se.useImperativeHandle(t,function(){return d.current}),ke((Ee(t={},"Radio",!0),Ee(t,"Radio--disabled",o),t),l)),p=ke((Ee(l={},"Radio-wrapper",!0),Ee(l,"Radio-defaultWrapper",!p),Ee(l,"Radio-errorWrapper",p),Ee(l,"Radio-wrapper--".concat(n),n),l)),l=ke((Ee(l={},"Radio-outerWrapper",!0),Ee(l,"Radio-outerWrapper--".concat(n),n),l)),h=ke(Ee({},"Radio-Label",!0)),y="".concat(a,"-").concat(r,"-").concat(ge());return Se.createElement("div",{className:t,"data-test":"DesignSystem-Radio"},Se.createElement("div",{className:l,"data-test":"DesignSystem-Radio-OuterWrapper"},Se.createElement("input",Ce({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"})),Se.createElement("span",{"data-test":"DesignSystem-Radio-wrapper",className:p})),Se.createElement("div",{className:"Radio-labelWrapper"},r&&Se.createElement("label",{className:h,htmlFor:y,"data-test":"DesignSystem-Radio-Label"},Se.createElement(je,{size:"tiny"===n?"small":"regular",appearance:o?"disabled":"default"},r)),f&&Se.createElement(je,{"data-test":"DesignSystem-Radio-HelpText",size:"small",appearance:o?"disabled":"subtle"},f.trim())))}),Tn=(r.displayName="Radio",["className","children"]),jn=Se.forwardRef(function(e,t){var n=e.className,r=e.children,e=W(e,Tn),n=ke(Ee({Row:!0},"".concat(n),n));return Se.createElement("div",Ce({"data-test":"DesignSystem-Row",ref:t},e,{className:n}),r)}),In=(jn.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=De(e),s=ke(Ee({},"StatusHint",!0),s),t=ke((Ee(c={},"StatusHint-icon",!0),Ee(c,"StatusHint--".concat(t),t),c)),c=ke(Ee({},"ellipsis--noWrap",a));return Se.createElement("div",Ce({"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)}}),Se.createElement("span",{"data-test":"DesignSystem-StatusHint--Icon",className:t}),Se.createElement(je,{"data-test":"DesignSystem-StatusHint--Text",weight:"medium",className:c},n))}),Mn=(In.displayName="StatusHint",In.defaultProps={appearance:"default"},function(e){var t,n=e.appearance,r=e.children,o=e.subtle,i=e.className,e=De(e),n=ke((Ee(t={Pills:!0},"Badge--".concat(n),n&&!o),Ee(t,"Badge--subtle-".concat(n),o),t),i);return Se.createElement("span",Ce({"data-test":"DesignSystem-Pills"},e,{className:n}),r)}),Nn=(Mn.displayName="Pills",Mn.defaultProps={appearance:"secondary"},function(e){var t=e.appearance,n=e.size,r=e.className,e=De(e),n=ke(Ee({Spinner:!0},"Spinner--".concat(n),n),r),r=ke(Ee({Circle:!0},"Circle--".concat(t),t));return Se.createElement("svg",Ce({},e,{className:n},{viewBox:"0 0 50 50"}),Se.createElement("circle",Ce({className:r},{cx:25,cy:25,r:20,fill:"none",strokeMiterlimit:"10",strokeWidth:"4"})))}),Pn=(Nn.displayName="Spinner",Nn.defaultProps={appearance:"primary",size:"medium"},_e(_e({},n.defaultProps),{},{defaultValue:0}),(r=o=o||{})[r.START=0]="START",r[r.END=1]="END",_e(_e({},n.defaultProps),{},{defaultValue:[0,10]}),["size","defaultChecked","disabled","onChange","name","value","className","appearance","checked"]),An=(Se.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,Pn),f=Oe(Se.useState(void 0===l?o:l),2),p=f[0],d=f[1],f=(Se.useEffect(function(){void 0!==l&&d(l)},[l]),ke((Ee(f={},"Switch",!0),Ee(f,"Switch--disabled",i),Ee(f,"Switch--".concat(r),r),f),u)),r=ke((Ee(u={},"Switch-wrapper",!0),Ee(u,"Switch-wrapper--disabled",i),Ee(u,"Switch-wrapper--".concat(r),r),Ee(u,"Switch-wrapper--checked",p),Ee(u,"Switch-wrapper--checkedDisabled",p&&i),u));return Se.createElement("div",{className:f},Se.createElement("input",Ce({},e,{type:"checkbox",defaultChecked:o,disabled:i,onChange:n,checked:p,ref:t,name:s,value:c,className:"Switch-input",onKeyUp:n})),Se.createElement("span",{className:r}))}).displayName="Switch",["rows","resize","disabled","name","placeholder","value","defaultValue","required","error","onChange","onClick","onBlur","onFocus","className"]);Se.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,An),o=ke((Ee(n={},"Textarea",!0),Ee(n,"Textarea--resize",o),Ee(n,"Textarea--error",f),n),m);return Se.createElement("textarea",Ce({"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 Rn(e){var t=Qn.call(e);return"[object Arguments]"===t||"[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Function]"===Qn.call(e.callee)}function Ln(){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 Fn(){return Ln()&&!!Symbol.toStringTag}function zn(e){try{return lr('"use strict"; return ('+e+").constructor;")()}catch(e){}}var Bn,Kn,Hn,Un,Wn,qn,Vn,Gn,Yn,$n=ee(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})),Zn=ee(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})),Jn=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=(ee(Jn),t(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Jn(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),Xn=ee(o),i=ee(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=ee(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})),Qn=Object.prototype.toString,n=(Object.keys||(Bn=Object.prototype.hasOwnProperty,Kn=Object.prototype.toString,Hn=Rn,r=Object.prototype.propertyIsEnumerable,Un=!r.call({toString:null},"toString"),Wn=r.call(function(){},"prototype"),qn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Vn=function(e){var t=e.constructor;return t&&t.prototype===e},Gn={$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},Yn=function(){if("undefined"!=typeof window)for(var e in window)try{if(!Gn["$"+e]&&Bn.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{Vn(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]"===Kn.call(e),r=Hn(e),o=t&&"[object String]"===Kn.call(e),i=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=Wn&&n;if(o&&0<e.length&&!Bn.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||!Bn.call(e,u)||i.push(String(u));if(Un)for(var l=function(e){if("undefined"==typeof window||!Yn)return Vn(e);try{return Vn(e)}catch(e){return!1}}(e),f=0;f<qn.length;++f)l&&"constructor"===qn[f]||!Bn.call(e,qn[f])||i.push(qn[f]);return i}),c),er=Array.prototype.slice,tr=Object.keys,nr=tr?function(e){return tr(e)}:n,rr=Object.keys,or=(nr.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return Rn(e)?rr(er.call(e)):rr(e)}):Object.keys=nr,Object.keys||nr},nr),o="undefined"!=typeof Symbol&&Symbol,ir=Array.prototype.slice,ar=Object.prototype.toString,sr=Function.prototype.bind||function(t){var n=this;if("function"!=typeof n||"[object Function]"!==ar.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,e,o=ir.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(ir.call(arguments))),Object(e)===e?e:this):n.apply(t,o.concat(ir.call(arguments)))}),n.prototype&&((e=function(){}).prototype=n.prototype,r.prototype=new e,e.prototype=null),r},cr=sr.call(Function.call,Object.prototype.hasOwnProperty),ur=SyntaxError,lr=Function,fr=TypeError,pr=Object.getOwnPropertyDescriptor;if(pr)try{pr({},"")}catch(Si){pr=null}function dr(){throw new fr}function hr(e,t){if("string"!=typeof e||0===e.length)throw new fr("intrinsic name must be a non-empty string");if(1<arguments.length&&"boolean"!=typeof t)throw new fr('"allowMissing" argument must be a boolean');var n=function(e){var t=Ar(e,0,1),n=Ar(e,-1);if("%"===t&&"%"!==n)throw new ur("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new ur("invalid intrinsic syntax, expected opening `%`");var o=[];return Pr(e,Rr,function(e,t,n,r){o[o.length]=n?Pr(r,Lr,"$1"):t||e}),o}(e),r=0<n.length?n[0]:"",o=function(e,t){var n,r=e;if(cr(Ir,r)&&(r="%"+(n=Ir[r])[0]+"%"),cr(Tr,r)){var o=Tr[r];if(void 0!==(o=o===Dr?jr(r):o)||t)return{alias:n,name:r,value:o};throw new fr("intrinsic "+e+" exists, but is not available. Please file an issue!")}throw new ur("intrinsic "+e+" does not exist!")}("%"+r+"%",t),i=(o.name,o.value),a=!1;(o=o.alias)&&(r=o[0],Nr(n,Mr([0,1],o)));for(var s=1,c=!0;s<n.length;s+=1){var u=n[s],l=Ar(u,0,1),f=Ar(u,-1);if(('"'===l||"'"===l||"`"===l||'"'===f||"'"===f||"`"===f)&&l!==f)throw new ur("property names with quotes must have matching quotes");if("constructor"!==u&&c||(a=!0),cr(Tr,l="%"+(r+="."+u)+"%"))i=Tr[l];else if(null!=i){if(!(u in i)){if(t)return;throw new fr("base intrinsic for "+e+" exists, but the property is not available.")}i=pr&&s+1>=n.length?(c=!!(f=pr(i,u)))&&"get"in f&&!("originalValue"in f.get)?f.get:i[u]:(c=cr(i,u),i[u]),c&&!a&&(Tr[l]=i)}}return i}function yr(e,t){return"function"==typeof(t=hr(e,!!t))&&-1<zr(e,".prototype.")?Fr(t):t}function mr(e){return!(Br&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===Kr(e)}function gr(e){return!!mr(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Array]"!==Kr(e)&&"[object Function]"===Kr(e.callee)}function vr(e,t){var n=2<arguments.length?arguments[2]:{},r=or(t);Ur&&(r=qr.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&&(!Gr(s)||!s())||(Yr?Vr(o,i,{configurable:!0,enumerable:!1,value:a,writable:!0}):o[i]=a)}function br(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!Zr(e)||!Zr(t))}function wr(){return"function"==typeof Object.is?Object.is:br}function Sr(){if(null!=this&&this!==to(this))throw new no("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 _r(){if(!ro)throw new io("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=oo(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return Sr}var Er,Cr,Or,xr,r=pr?function(){try{return dr}catch(e){try{return pr(arguments,"callee").get}catch(e){return dr}}}():dr,c="function"==typeof o&&"function"==typeof Symbol&&"symbol"==typeof o("foo")&&"symbol"==typeof Symbol("bar")&&Ln(),kr=Object.getPrototypeOf||function(e){return e.__proto__},Dr={},n="undefined"==typeof Uint8Array?u:kr(Uint8Array),Tr={"%AggregateError%":"undefined"==typeof AggregateError?u:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?u:ArrayBuffer,"%ArrayIteratorPrototype%":c?kr([][Symbol.iterator]()):u,"%AsyncFromSyncIteratorPrototype%":u,"%AsyncFunction%":Dr,"%AsyncGenerator%":Dr,"%AsyncGeneratorFunction%":Dr,"%AsyncIteratorPrototype%":Dr,"%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%":lr,"%GeneratorFunction%":Dr,"%Int8Array%":"undefined"==typeof Int8Array?u:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?u:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?u:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c?kr(kr([][Symbol.iterator]())):u,"%JSON%":"object"==typeof JSON?JSON:u,"%Map%":"undefined"==typeof Map?u:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c?kr((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?kr((new Set)[Symbol.iterator]()):u,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?u:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c?kr(""[Symbol.iterator]()):u,"%Symbol%":c?Symbol:u,"%SyntaxError%":ur,"%ThrowTypeError%":r,"%TypedArray%":n,"%TypeError%":fr,"%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},jr=function e(t){var n,r;return"%AsyncFunction%"===t?n=zn("async function () {}"):"%GeneratorFunction%"===t?n=zn("function* () {}"):"%AsyncGeneratorFunction%"===t?n=zn("async function* () {}"):"%AsyncGenerator%"===t?(r=e("%AsyncGeneratorFunction%"))&&(n=r.prototype):"%AsyncIteratorPrototype%"===t&&(r=e("%AsyncGenerator%"))&&(n=kr(r.prototype)),Tr[t]=n},Ir={"%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"]},Mr=sr.call(Function.call,Array.prototype.concat),Nr=sr.call(Function.apply,Array.prototype.splice),Pr=sr.call(Function.call,String.prototype.replace),Ar=sr.call(Function.call,String.prototype.slice),Rr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Lr=/\\(\\)?/g,Fr=t(function(e){var t=hr("%Function.prototype.apply%"),n=hr("%Function.prototype.call%"),r=hr("%Reflect.apply%",!0)||sr.call(n,t),o=hr("%Object.getOwnPropertyDescriptor%",!0),i=hr("%Object.defineProperty%",!0),a=hr("%Math.max%");if(i)try{i({},"a",{value:1})}catch(e){i=null}e.exports=function(e){var t=r(sr,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(sr,t,arguments)}i?i(e.exports,"apply",{value:s}):e.exports.apply=s}),zr=(Fr.apply,Fr(hr("String.prototype.indexOf"))),Br=Fn(),Kr=yr("Object.prototype.toString"),o=function(){return mr(arguments)}(),Hr=(mr.isLegacyArguments=gr,o?mr:gr),Ur="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),Wr=Object.prototype.toString,qr=Array.prototype.concat,Vr=Object.defineProperty,Gr=function(e){return"function"==typeof e&&"[object Function]"===Wr.call(e)},Yr=Vr&&function(){var e={};try{for(var t in Vr(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),$r=(vr.supportsDescriptors=!!Yr,vr),Zr=function(e){return e!=e},c=Fr(wr(),Object),Jr=($r(c,{getPolyfill:wr,implementation:br,shim:function(){var e=wr();return $r(Object,{is:e},{is:function(){return Object.is!==e}}),e}}),c),r=Fn(),Xr=(r&&(Er=yr("Object.prototype.hasOwnProperty"),Cr=yr("RegExp.prototype.exec"),Or={},xr={toString:n=function(){throw Or},valueOf:n},"symbol"==typeof Symbol.toPrimitive)&&(xr[Symbol.toPrimitive]=n),yr("Object.prototype.toString")),Qr=Object.getOwnPropertyDescriptor,eo=r?function(e){if(!e||"object"!=typeof e)return!1;var t=Qr(e,"lastIndex");if(!(t&&Er(t,"value")))return!1;try{Cr(e,xr)}catch(e){return e===Or}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===Xr(e)},to=Object,no=TypeError,ro=$r.supportsDescriptors,oo=Object.getOwnPropertyDescriptor,io=TypeError,ao=$r.supportsDescriptors,so=Object.getOwnPropertyDescriptor,co=Object.defineProperty,uo=TypeError,lo=Object.getPrototypeOf,fo=/a/,u=Fr(Sr),po=($r(u,{getPolyfill:_r,implementation:Sr,shim:function(){var e,t,n;if(ao&&lo)return e=_r(),t=lo(fo),(n=so(t,"flags"))&&n.get===e||co(t,"flags",{configurable:!0,enumerable:!1,get:e}),e;throw new uo("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors")}}),u),ho=Date.prototype.getDay,yo=Object.prototype.toString,mo=Fn(),go=function(e){if("object"!=typeof e||null===e)return!1;if(!mo)return"[object Date]"===yo.call(e);try{return ho.call(e),!0}catch(e){return!1}},vo=Date.prototype.getTime;function bo(e,t,n){n=n||{};if(n.strict?!Jr(e,t):e!==t){if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return n.strict?Jr(e,t):e==t;var r,o,i=e,a=t,s=n;if(typeof i!=typeof a)return!1;if(wo(i)||wo(a))return!1;if(i.prototype!==a.prototype)return!1;if(Hr(i)!==Hr(a))return!1;e=eo(i),t=eo(a);if(e!==t)return!1;if(e||t)return i.source===a.source&&po(i)===po(a);if(go(i)&&go(a))return vo.call(i)===vo.call(a);if(e=So(i),t=So(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=or(i),u=or(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],!bo(i[o],a[o],s))return!1}}return!0}function wo(e){return null==e}function So(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 _o=bo,Eo="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,Co=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(Eo&&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}),De=function(n){return["className","data-test"].reduce(function(e,t){return n[t]?_e(_e({},e),{},Ee({},t,n[t])):_e({},e)},{})},re=Se.createContext({size:"regular",appearance:"secondary",firstName:"",lastName:""}),oe=re.Provider,ie={secondary:"inverse",primary:"white",alert:"white",accent2:"white",accent3:"white",warning:"warning_darker",success:"success_darker",accent1:"accent1_darker",accent4:"accent4_darker"},ae={regular:32,tiny:24},se=["accent4","primary","accent3","alert","accent2","warning","accent1","success"],ce=function(e){function t(){return i&&"string"!=typeof i?Se.createElement("span",{"data-test":"DesignSystem-AvatarWrapper",className:g,role:p},Se.createElement(oe,{value:b},Se.createElement("span",Oe({"data-test":"DesignSystem-Avatar"},d,{className:m}),i))):Se.createElement("span",{"data-test":"DesignSystem-AvatarWrapper",className:g,role:p},Se.createElement("span",Oe({"data-test":"DesignSystem-Avatar"},d,{className:m}),h&&Se.createElement(Ie,{weight:"medium",appearance:"white",className:y},h),!h&&Se.createElement(A,{"data-test":"DesignSystem-Avatar--Icon",name:"person",size:"regular"===o?20:16,appearance:"white",className:v})))}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=e.shape,f=e.role,p=void 0===f?"presentation":f,d=De(e),h=i&&"string"==typeof i?i.trim().slice(0,2):"".concat(a?a.trim()[0]:"").concat(s?s.trim()[0]:""),f=i&&"string"==typeof i?i:"".concat(a||""," ").concat(s||"")||"",e=u||se[(h.charCodeAt(0)+(h.charCodeAt(1)||0))%8]||"secondary",m=ke((Ee(u={Avatar:!0},"Avatar--square","square"===l),Ee(u,"Avatar--".concat(o),"square"!==l),Ee(u,"Avatar--".concat(e),e),Ee(u,"Avatar--disabled",!h||!n),u),c),g=ke((Ee(u={},"Avatar--wrapper","square"===l),Ee(u,"Avatar--".concat(o),"square"===l),u)),y=ke((Ee(c={},"Avatar-content--".concat(o),o),Ee(c,"Avatar-content--".concat(e),e),c)),v=ke(Ee({},"Avatar-content--".concat(e),e)),b={size:o,firstName:a,lastName:s,appearance:e};return n&&h?Se.createElement(Da,{tooltip:f,position:r,triggerClass:"flex-grow-0"},t()):t()},ue=(ce.displayName="Avatar",ce.Icon=function(e){var t=Se.useContext(re),n=t.size,t=t.appearance;return Se.createElement(A,Oe({},e,{size:"regular"===n?20:16,appearance:t&&ie[t]||"inverse"}))},ce.Image=function(e){var t=e.children,n=e.src,r=Ce(Se.useState(!1),2),o=r[0],i=r[1],r=Se.useContext(re),a=r.size,s=r.appearance,c=r.firstName,r=r.lastName,e=De(e),r="".concat(c?c.trim()[0]:"").concat(r?r.trim()[0]:""),u=a&&ae[a],l=ke((Ee(l={},"Avatar-content--".concat(a),a),Ee(l,"Avatar-content--".concat(s),s),l)),s=ke(Ee({},"Avatar-content--".concat(s),s));return t?Se.createElement(Se.Fragment,null,t):o?r?Se.createElement(Ie,Oe({weight:"medium",appearance:"white",className:l},e),r):Se.createElement(A,{"data-test":"DesignSystem-Avatar--Icon",name:"person",size:"regular"===a?20:16,appearance:"white",className:s}):Se.createElement("img",Oe({"data-test":"DesignSystem-Image",src:n,alt:c},e,{height:u,width:u,onError:function(){i(!0)}}))},ce.defaultProps={tooltipPosition:"bottom",withTooltip:!0,size:"regular",shape:"round"},Se.useEffect),le=Se.useState,fe=(ne.displayName="Backdrop",["size","appearance","iconAlign","tabIndex","largeIcon","type","children","icon","expanded","selected","loading","disabled","className","tooltip","iconType"]),pe={tiny:12,regular:16,large:20},de=Se.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,m=e.className,g=(e.tooltip,e.iconType),e=W(e,fe),f=ke((Ee(n={},"Button",!0),Ee(n,"Button--expanded",f),Ee(n,"Button--".concat(r),r),Ee(n,"Button--".concat(r,"Square"),!u),Ee(n,"Button--".concat(o),o),Ee(n,"Button--selected",p&&("basic"===o||"transparent"===o)),Ee(n,"Button--iconAlign-".concat(i),u&&i),Ee(n,"".concat(m),m),n)),m=ke((Ee(p={},"Button-icon",!0),Ee(p,"Button-icon--".concat(i),u&&i),p));return Se.createElement("button",Oe({"data-test":"DesignSystem-Button",ref:t,type:c,className:f,disabled:h||d,tabIndex:a},e),d?Se.createElement(Se.Fragment,null,Se.createElement(Fn,{size:"small",appearance:"basic"===o||"transparent"===o?"secondary":"white","data-test":"DesignSystem-Button--Spinner",className:"Button-spinner"}),Se.createElement(Ie,{className:"Button-text Button-text--hidden"},u||"")):Se.createElement(Se.Fragment,null,l&&Se.createElement("div",{className:m},Se.createElement(A,{"data-test":"DesignSystem-Button--Icon",name:l,type:g,size:s&&!u?pe[r]+4:pe[r]})),u&&Se.createElement("span",{className:"Button-text"},u)))}),Te=Se.forwardRef(function(e,t){var n=e.icon,r=e.tooltip,o=e.children;return n&&r&&!o?Se.createElement(Da,{tooltip:r},Se.createElement(de,Oe({},e,{ref:t}))):Se.createElement(de,Oe({},e,{ref:t}))});Te.displayName="Button";function he(e){return["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].indexOf(e)}function me(e,t){return new Date(e,t+1,0).getDate()}function ge(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 C(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 ye(e,t){var n,r,o,i,a;if(q(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]}}),m({year:r,month:o,date:i})}function ve(e,t,n,r,o){var i=new Date("".concat(o,"-").concat(r,"-").concat(n));if(e)switch(t){case"less":return e<=i;case"equal":return e.toDateString()===i.toDateString();case"more":return i<=e;default:return!1}return!1}function be(e){var n=e.onClick,r=e.onKeyDown,o=void 0===(t=e.role)?"button":t,t=e.tabIndex,e=W(e,gt);return _e({},n?{onClick:n,role:o,tabIndex:t||0,"aria-label":e["aria-label"],onKeyDown:function(e){var t;r?r(e):(t=e.key,vt(o,t)&&n&&(e.preventDefault(),n(e)))}}:{role:o,tabIndex:t,"aria-label":e["aria-label"]})}function we(e){var t=e.children,n=void 0===(n=e.componentType)?"span":n,r=e.className,e=W(e,wt);return Se.createElement(n,_e(_e({},e),{},{className:r}),t)}function je(e){function t(e){var t;return ke((Ee(t={},"Chip-icon",!0),Ee(t,"Chip-icon--".concat(e),e),Ee(t,"Chip-icon-disabled--right","right"===e&&s),Ee(t,"cursor-pointer","right"===e&&!s),Ee(t,"Chip-icon--selected","right"===e&&u),t))}function n(e){e.stopPropagation(),l&&l()}function r(e){var t;return ke((Ee(t={},"disabled",s&&!u),Ee(t,"primary_dark",!s&&u),Ee(t,"primary_lighter",s&&u),Ee(t,"subtle",!s&&!u&&"right"===e),Ee(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,p=e.labelPrefix,d=e.iconType,e=De(e),h=ke((Ee(h={},"primary-lighter",s&&u),Ee(h,"inverse-lightest",s&&!u),Ee(h,"primary-dark",u),Ee(h,"inverse",!s&&!u),h));return Se.createElement("div",Oe({tabIndex:s?-1:0,"data-test":"DesignSystem-GenericChip--GenericChipWrapper"},e,{className:"Chip-wrapper ".concat(c),onClick:function(){f&&f()}}),i&&Se.createElement(A,{"data-test":"DesignSystem-GenericChip--Icon",name:i,type:d,appearance:r("left"),className:t("left")}),"string"==typeof o?Se.createElement(Se.Fragment,null,p&&Se.createElement(Ie,{"data-test":"DesignSystem-GenericChip--LabelPrefix",weight:"medium",color:h,className:"Chip-text mr-3"},p),Se.createElement(Ie,{"data-test":"DesignSystem-GenericChip--Text",color:h,className:"Chip-text"},o)):o,a&&Se.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"},Se.createElement(A,{name:"clear",appearance:r("right"),className:"p-2"})))}function Ne(){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 Me(e){switch(e.name){case"checked--regular":return g.a.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.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 g.a.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.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 g.a.createElement("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.a.createElement("path",{d:"M0 0H10V2H0V0Z",fill:"white"}));case"indeterminate--tiny":return g.a.createElement("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0H0V2H8V0Z",fill:"white"}));default:return null}}function Ae(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=V[o];return Se.createElement(Sn,Oe({icon:"events",placeholder:o},i,{error:r,mask:u,value:n?C(o,n):e?Sn.utils.getDefaultValue(u,c):"",onChange:function(e,t){var n=i.onChange;s({open:!0}),t&&!t.includes(c)&&(t=ye(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=ye(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 q(a,e,o)}],clearOnEmptyBlur:!0,id:"parent-DatePicker"}))}function Pe(e){var t=new Date;return t.setHours(e.substring(0,2)),t.setMinutes(e.substring(3,5)),t}function Re(e){return"12-Hour"===e}function Le(e){var e=e.split(":"),t=12<=(n=parseInt(e[0],10))?"PM":"AM",n=(n%12||12).toString(),n=Tt(n),e=e[1];return"".concat(n.toString(),":").concat(e," ").concat(t)}function Fe(e,t,n){for(var r=[],o=Pe(e),i=Pe(t);o<=i;)r.push(o.toTimeString().substring(0,5)),o.setMinutes(o.getMinutes()+n);return r}function ze(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 Be(e){var t=parseInt(e,10);return t<10?e:((60<t?t%60:t).toString()+"0").slice(0,2)}function Ke(e){return(parseInt(e,10)%24).toString()}function He(e){return/^[0-9]+$/.test(e)}function Ue(e){return/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]*$/.test(e)}function We(e){var e=e.split(Rt),t=Ke(e[0]);return{hour:Tt(t),min:((""!==e[1]?Be(e[1]):"00")+"0").slice(0,2)}}function qe(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=Tt(e):(i="0"+e[0],a=Be(e[1]+"0"));break;case 3:i="0"+e[0],a=Be(e.slice(1));break;case 4:i=t?(parseInt(o,10)%12).toString():Ke(o),a=Be(e.slice(2));break;default:a=i="-1"}return{hour:i,min:a}}function Ve(e,t){var n,r={hour:"00",min:"00"};return He(t)?(n=qe(t),r=parseInt(n.hour)<=12&&0<parseInt(n.hour)?Ye(e,n):n):/^[0-9]+[ AaMmPp]+$/.test(t)?(r=function(e){e=e.split(/[\saAmMpP]/),e=qe(e[0],!0);return{hour:e.hour,min:e.min}}(t)).hour=Ge(r.hour,t):Ue(t)?(n=We(t),r=parseInt(n.hour)<=12?Ye(e,n):n):/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]+[ AaMmPp]+$/.test(t)&&(e=t.replace(/[\saApPmM]/g,""),He(e)?r=qe(e,!0):Ue(e)&&(r=We(e)),r.hour=Ge(r.hour,t)),r}function Ge(e,t){return"12"===e&&kt(t)?e="00":Dt(t)&&"12"!==e&&(e=(parseInt(e,10)+12).toString()),e}function Ye(e,t){var n="".concat(t.hour,":").concat(t.min),r=Pt(),o=jt(r,n),r=Lt(e,r),e=Lt(e,n);return o&&e<r&&(n=parseInt(t.hour,10)+12,t.hour=n.toString()),t}function $e(e,t){var e=Bt(xe(e)),n=Bt(xe(t));return e.length===n.length&&e.every(function(e,t){return e.value===n[t].value})}function Ze(e){return void 0!==e}function Je(e){return void 0!==e}function Xe(e,t,n){return e&&n&&""===t}function Qe(e,t,n,r){return r&&n&&0===t&&""===e}function et(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 tt(e,t){e=t&&(null==(t=t[e])?void 0:t.optionID),(t=document.getElementById(e))&&t.scrollIntoView&&t.scrollIntoView({block:"center"})}function nt(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,m=e.disabledSlotList,g=e.fetchTimeOptions,y=e.error,v=Ce(Se.useState(0),2),b=v[0],w=v[1],S=(v=Ce(Se.useState(!1),2))[0],_=v[1],E=(v=Ce(Se.useState(-1),2))[0],O=v[1],C=(v=Ce(Se.useState(0),2))[0],x=v[1],k=(t=(v=e).startTime,n=e.endTime,r=e.interval,o=e.timeFormat,i=e.showDuration,a=e.disabledSlotList,v=e.id,e=t?It(t):"00:00",n=n?It(n):At(t),e=Nt(e,n,r),Mt(e,o,v,i,t,a));return Se.useEffect(function(){void 0!==s&&_(s)},[s]),Se.useEffect(function(){var e;return S&&-1!=E&&(w(E),e=setTimeout(function(){tt(E,k)},100)),function(){clearTimeout(e)}},[S]),Se.useEffect(function(){x(C+1)},[f,c,u,d,m]),Se.createElement(un,{key:C,maxHeight:160,loadersCount:0,withSearch:!0,open:S,tabIndex:b,searchPlaceholder:"Search",onChange:function(t){var e=t,n=(Re(p)&&(e=Le(t)),k.findIndex(function(e){return e.value===t}));O(n),l&&l(e)},fetchOptions:g||function(e){n=e,t=Ft(t=k);var t,n,r=""===n?(r=Pt(),Lt(t,r)):zt(t,n);return w(t=""===e&&-1!=E?E:r),Promise.resolve({options:-1===r?[]:k,count:k.length,scrollToIndex:0===t?t+1:t,searchTerm:e})},noResultMessage:h,staticLimit:k.length,onPopperToggle:function(){_(!S)},error:y})}function rt(e){var t=e.validators,s=e.inputOptions,c=e.inputFormat,u=e.outputFormat,l=e.onTimeChange,n=e.time,e=e.error,f=(i=Ce(Se.useState(n),2))[0],r=i[1],o=(i=Ce(Se.useState(!1),2))[0],p=i[1],d=void 0===(i=s.placeholderChar)?"_":i,i=(Se.useEffect(function(){var e=I(c,f),e=void 0===n&&e.includes(d)?f:n;r(e)},[n]),X[c]);return Se.createElement(Sn,Oe({placeholder:L[c],placeholderChar:d},s,{mask:i,value:f?I(c,f):o?Sn.utils.getDefaultValue(i,d):"",validators:function(e){return q(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=I(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=F(a)?z(o).AMPM:"",o=F(a)?z(o).hrs:B(o,r),U(a,{minutes:t,hours:o,am_pm:n}))),l(r)),s.onBlur&&s.onBlur(e,i)},error:e,id:"parent-TimePicker"}))}var ot=12,it=3,at=12,st=3,ct=7,ut=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],lt={small:["Su","Mo","Tu","We","Th","Fr","Sa"],large:["Su","Mo","Tu","We","Th","Fr","Sa"]},ft=ot,pt=function(e){return e-e%ft},$=function(e){var t,n,r;return(e=e&&m(e))?(t=e.getFullYear(),n=e.getMonth(),r=e.getDay(),e=e.getDate(),{decadeYear:pt(t),year:t,month:n,day:r,date:e}):{}},m=function(e,t,n){var r;if(e)if("number"==typeof e)r=new Date(e);else{if("string"==typeof e)return t?ye(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},dt=function(){e(p,Se["Component"]);var f=h(p);function p(e){d(this,p),Ee(G(V=f.call(this,e)),"updateState",function(e,t,n){V.setState({year:e,month:t,date:n})}),Ee(G(V),"getDateValue",function(e,t,n){return new Date(e,t,n)}),Ee(G(V),"getNavDateInfo",function(e){var t=V.state,n=t.yearBlockNav,r=t.yearNav,t=t.monthNav,o=(t+e)%at==-1?11:(t+e)%at,r=0<=e?r+(0!==e&&o<t?1:0):r-(0!==e&&t<o?1:0);return{yearBlock:n,year:r,month:o}}),Ee(G(V),"getInRangeError",function(){var e=V.props,t=e.rangePicker,e=e.rangeLimit,n=V.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}),Ee(G(V),"selectYear",function(e){return function(){V.updateState(e),V.setState({view:"month"})}}),Ee(G(V),"yearMouseOverHandler",function(e,t,n,r){var o=V.props.onYearHover;o&&o({value:e,year:e,isCurrentYear:t,isDisabled:n},r)}),Ee(G(V),"selectMonth",function(e){return function(){V.updateState(V.state.yearNav,e),V.setState({view:"date"})}}),Ee(G(V),"monthMouseOverHandler",function(e,t,n,r){var o=ut,i=V.props.onMonthHover,o={value:o[e],month:o[e],year:V.state.year,isCurrentMonth:t,isDisabled:n};i&&i(o,r)}),Ee(G(V),"selectDate",function(e,t,n,r){e=V.calculateDate(e,t,n,r,!1);V.setState({currDate:e})}),Ee(G(V),"calculateDate",function(e,t,n,r,o){var i,a,s="",n=(t<=0?(i=e-1,a=n+t,s="prev"):a=(i=e,t),V.getNavDateInfo(i)),e=n.year,t=n.month;return!1===o&&(V.updateState(e,t,a),V.onNavIconClickHandler(s)()),V.getDateValue(e,t,a)}),Ee(G(V),"onNavIconClickHandler",function(s){return function(){var e=V.state,t=e.view,n=e.yearBlockNav,r=e.yearNav,o=e.monthNav,i=ot,a=at;switch(t){case"year":"prev"===s&&V.setState({yearBlockNav:n-i}),"next"===s&&V.setState({yearBlockNav:n+i});break;case"month":"prev"===s&&V.setState({yearNav:r-1}),"next"===s&&V.setState({yearNav:r+1});break;case"date":"prev"===s&&(0===o&&V.setState({yearNav:r-1}),V.setState({monthNav:(a+o-1)%a})),"next"===s&&(o===a-1&&V.setState({yearNav:r+1}),V.setState({monthNav:(o+1)%a}))}}}),Ee(G(V),"renderJumpButton",function(e){var t=V.props,n=t.disabledBefore,r=t.disabledAfter,t=t.size,o=V.state,i=o.view,a=o.yearBlockNav,s=o.yearNav,c=o.monthNav,u=!1;switch(i){case"year":"prev"===e&&(u=ge(n,"more",a)||ge(n,"equal",a)),"next"===e&&(u=ge(r,"less",a)||ge(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=ke(Ee({"Calendar-headerIcon":!0},"Calendar-headerIcon--".concat(e),e));return Se.createElement(Te,{type:"button",className:o,appearance:"basic",icon:"arrow_".concat("next"===e?"forward":"back"),disabled:u,size:"small"===t?"tiny":"regular",onClick:V.onNavIconClickHandler(e)})}),Ee(G(V),"onNavHeadingClickHandler",function(n){return function(){var e=V.props.monthsInView,t=V.props.jumpView;(t=t&&1<e?!1:t)&&("year"===n&&V.setState({view:"date"}),"month"===n&&V.setState({view:"year"}),"date"===n)&&V.setState({view:"month"})}}),Ee(G(V),"renderHeaderContent",function(e){function t(e){return"small"===r?Se.createElement(Se.Fragment,null,Se.createElement(Ie,{weight:"strong"},e),"year"!==a&&!i&&Se.createElement(A,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"})):Se.createElement(Se.Fragment,null,Se.createElement(pn,{size:"s"},e),"year"!==a&&!i&&Se.createElement(A,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"}))}var n=V.props,r=n.size,o=n.monthsInView,i=n.rangePicker,n=V.state,a=n.view,n=n.yearBlockNav,s=ot,c=ut,u=V.getNavDateInfo(e),l=u.year,u=u.month,o=ke({"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 Se.createElement("div",{className:o},"date"!==a&&Se.createElement("div",{className:"d-flex justify-content-center align-items-center",onClick:V.onNavHeadingClickHandler(a)},t(e)),"date"===a&&Se.createElement(Se.Fragment,null,Se.createElement("div",{onClick:V.onNavHeadingClickHandler(a),className:"d-flex justify-content-center align-items-center"},t(c[u])),Se.createElement("div",{className:"ml-4 d-flex justify-content-center align-items-center",onClick:V.onNavHeadingClickHandler("month")},t(l))))}),Ee(G(V),"renderBodyYear",function(){var e=ot,u=it,t=V.props,l=t.size,f=t.rangePicker,p=t.disabledBefore,d=t.disabledAfter,t=V.state,h=t.yearBlockNav,m=t.currYear,t=Math.ceil(e/u);return Array.from({length:t},function(e,c){return Se.createElement("div",{key:c,className:"Calendar-valueRow"},Array.from({length:u},function(e,t){var n,r,o,i,a,s=u*c+t;if(s!==h)return a=!(s=Y(p,"more",n=h+s)||Y(d,"less",n))&&!f&&n===V.state.year,r=function(){return n===m},o=ke((Ee(o={"Calendar-value":!0,"Calendar-value--active":a,"Calendar-value--disabled":s,"Calendar-yearValue":!0},"Calendar-yearValue--".concat(l),l),Ee(o,"Calendar-value--currDateMonthYear",r()),o)),i=ke({"Calendar-value--currDate":r()&&!a,"Calendar-text":!0}),a=ke({inverse:!a&&!r()&&!s,white:a,"primary-lighter":r()&&s,primary:r(),"inverse-lightest":s}),Se.createElement("div",{key:"".concat(c,"-").concat(t),"data-test":"DesignSystem-Calendar--yearValue",className:o,onClick:V.selectYear(n),onMouseOver:V.yearMouseOverHandler.bind(G(V),n,r(),s)},Se.createElement(Ie,{size:"small"===l?"small":"regular",color:a,className:i},n))}))})}),Ee(G(V),"renderBodyMonth",function(){var e=at,u=st,l=ut,t=V.props,f=t.size,p=t.disabledBefore,d=t.disabledAfter,t=V.state,h=t.yearNav,m=t.year,g=t.currYear,y=t.currMonth,t=Math.ceil(e/u);return Array.from({length:t},function(e,c){return Se.createElement("div",{key:c,className:"Calendar-valueRow"},Array.from({length:u},function(e,t){function n(){return g===h&&y===r}var r=u*c+t,o=Y(p,"more",h,r)||Y(d,"less",h,r),i=!o&&m===h&&r===V.state.month,a=ke((Ee(a={"Calendar-value":!0,"Calendar-value--active":i,"Calendar-value--disabled":o,"Calendar-monthValue":!0},"Calendar-monthValue--".concat(f),f),Ee(a,"Calendar-value--currDateMonthYear",n()),a)),s=ke({inverse:!i&&!n()&&!o,white:i,"primary-lighter":n()&&o,primary:n(),"inverse-lightest":o}),i=ke({"Calendar-value--currDate":n()&&!i,"Calendar-text":!0});return Se.createElement("div",{key:"".concat(c,"-").concat(t),"data-test":"DesignSystem-Calendar--monthValue",className:a,onClick:V.selectMonth(r),onMouseOver:V.monthMouseOverHandler.bind(G(V),r,n(),o)},Se.createElement(Ie,{size:"small"===f?"small":"regular",color:s,className:i},l[r]))}))})}),Ee(G(V),"onDateRowMouseLeaveHandler",function(){V.props.rangePicker&&V.setState({hoverDate:void 0})}),Ee(G(V),"renderBodyDate",function(e){var o=ct,i=lt,t=V.props,a=t.size,s=t.firstDayOfWeek,c="large"===a?"regular":"small";return Se.createElement(Se.Fragment,null,Se.createElement("div",{className:"Calendar-dayValues"},Array.from({length:7},function(e,t){var n=ke({"Calendar-valueWrapper":!0}),r=(t+o+he(s))%o;return Se.createElement(Ie,{key:t,className:n,appearance:"default",weight:"strong",size:c},i[a][r])})),Se.createElement("div",{className:"Calendar-dateValues",onMouseLeave:V.onDateRowMouseLeaveHandler},V.renderDateValues(e)))}),Ee(G(V),"renderDateValues",function(b){function w(e){return function(){(!x||I&&j||!W)&&V.selectDate(b,e,K,H)}}function S(t){return function(){var e;x&&(e=V.getDateValue(z,B,t),I&&j||V.setState({hoverDate:e}))}}function _(e,t,n,r){var e=V.calculateDate(b,e,K,H,!0)||new Date,o=ut,i=lt.large[e.getDay()],t={value:e.getDate(),isToday:t,isDisabled:n,todayDate:V.state.currDate,fullDate:e,date:e.getDate(),month:o[e.getMonth()],year:e.getFullYear(),dayName:i};a&&a(t,r)}var E=ct,O=at,e=V.props,C=e.size,x=e.rangePicker,t=e.firstDayOfWeek,k=e.disabledBefore,D=e.disabledAfter,T=e.monthsInView,a=e.onDateHover,e=V.state,I=e.startDate,j=e.endDate,N=e.hoverDate,M=e.year,A=e.month,P=e.date,R=e.currMonth,L=e.currYear,F=e.todayDate,e=V.getNavDateInfo(b),z=e.year,B=e.month,K=me(z,B-1),H=me(z,B),e=new Date(z,B).getDay(),t=he(t),U=Math.abs((e-t+7)%7),e=Math.ceil((H+U)/E),W=(6===e||1<T||(e+=1),V.getInRangeError()),q=V.props.events;return Array.from({length:e},function(e,v){return Se.createElement("div",{key:v,className:"Calendar-valueRow"},Array.from({length:E},function(e,t){function n(){var e=r<=0?L===z&&R===B-1&&F===K+r:H<r?L===z&&R===B+1&&F===r-H:L===z&&R===B&&F===r;return e}var r=E*v+t-U+1,o=r<=0||H<r,i=Y(k,"more",z,B,r)||Y(D,"less",z,B,r),a=!i&&M===z&&A===B&&P===r,s=!1,c=$(I),c=(c.year,c.month,c.date,$(j)),c=(c.year,c.month,c.date,j&&!1),u=I&&!1,l="".concat(r<=0?K+r:H<r?r-H:r),f="".concat(r<=0?0===B?B+O:(B-1)%O+1:H<r?(B+1)%O+1:B+1),p="".concat(r<=0&&B+1===1?z-1:H<r&&B+1===12?z+1:z),d="".concat(2===f.length?f:"0".concat(f),"/").concat(2===l.length?l:"0".concat(l),"/").concat(p),d=q&&"object"===Z(q)&&q.hasOwnProperty(d),h=(x&&(h=Y(I,"equal",z,B,r),m=Y(j,"equal",z,B,r),g=Y(N,"equal",z,B,r),a=!i&&(h||m),I&&j?s=!i&&(ve(I,"less",l,f,p)&&ve(j,"more",l,f,p)||h||m):I?s=!i&&(ve(N,"more",l,f,p)||g)&&ve(I,"less",l,f,p):j&&(s=!i&&(Y(N,"less",z,B,r)||g)&&Y(j,"more",z,B,r))),s&&W),m=I&&ve(I,"equal",l,f,p),g=j&&ve(j,"equal",l,f,p),y=I&&j&&(m||g),l=ve(N,"equal",l,f,p)&&N&&I&&I<=N,f=0===t||6===t,p=s||x&&(a||y),s=ke({"Calendar-valueWrapper":!0,"Calendar-valueWrapper--inRange":!f&&p,"Calendar-valueWrapper--inEdgeRange":p&&f,"Calendar-valueWrapper--inRangeError":h,"Calendar-valueWrapper--start":c&&!u&&6!==t||x&&m&&6!==t,"Calendar-valueWrapper--end":u&&!c&&0!==t||x&&g&&0!==t,"Calendar-valueWrapper--startEnd":c&&u,"Calendar-valueWrapper--startError":c&&h||x&&h&&m,"Calendar-valueWrapper--endError":u&&h||x&&h&&g,"Calendar-valueWrapper--dummy":o,"Calendar-valueWrapper--hoverDate":x&&l,"Calendar-valueWrapper--inStartRange":p&&0===t&&!a&&!y,"Calendar-valueWrapper--inEndRange":p&&6===t&&!a&&!y}),m=ke((Ee(f={"Calendar-value":!0,"Calendar-inRangeValue":!(c||u||a||y),"Calendar-value--start":c&&!u,"Calendar-value--end":u&&!c,"Calendar-value--startError":c&&h,"Calendar-value--endError":u&&h,"Calendar-value--active":a||y,"Calendar-value--disabled":i,"Calendar-dateValue":!0},"Calendar-dateValue--".concat(C),C),Ee(f,"Calendar-value--currDateMonthYear",n()),Ee(f,"Calendar-value--currDate",n()&&!a&&!y),f)),g=ke({inverse:!(a||n()||i||y),white:a||y,"primary-lighter":n()&&i,primary:n(),"inverse-lightest":i});return Se.createElement("div",{key:"".concat(v,"-").concat(t),className:s,"data-test":"designSystem-Calendar-WrapperClass"},!o&&Se.createElement(Se.Fragment,null,Se.createElement(Ie,{color:g,size:"small"===C?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:m,onClick:w(r),onMouseOver:S(r),onMouseEnter:_.bind(G(V),r,n(),i)},r),d&&V.renderEventsIndicator(C,a)),(o&&0<r&&b===T-1||o&&r<=0&&0===b)&&Se.createElement(Se.Fragment,null,Se.createElement(Ie,{appearance:a||y?"white":i?"disabled":n()?"link":"default",size:"small"===C?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:m,onClick:w(r),onMouseOver:S(r),onMouseEnter:_.bind(G(V),r,n(),i)},r<=0?K+r:r-H),d&&V.renderEventsIndicator(C,a)))}))})}),Ee(G(V),"renderCalendar",function(e){var t=V.props,n=t.size,t=t.monthsInView,r=V.state.view,o=ke((Ee(o={},"Calendar",!0),Ee(o,"Calendar-".concat(r,"--").concat(n),r),Ee(o,"Calendar--".concat(n),n),o)),n=ke(Ee({},"Calendar-header--".concat(n),n)),i=ke({"Calendar-body":!0});return Se.createElement("div",{key:e,"data-test":"DesignSystem-Calendar",className:o},Se.createElement("div",{className:n},0===e&&V.renderJumpButton("prev"),V.renderHeaderContent(e),e===t-1&&V.renderJumpButton("next")),Se.createElement("div",{className:i},"year"===r&&V.renderBodyYear(),"month"===r&&V.renderBodyMonth(),"date"===r&&V.renderBodyDate(e)))});var V,t=V.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 V.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:pt(a)},V}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=m(this.props.date),this.setState({currDate:i})),this.props.startDate&&!isNaN(this.props.startDate.getTime())&&e.startDate!==this.props.startDate&&(o=m(this.props.startDate),this.setState({startDate:o})),this.props.endDate&&!isNaN(this.props.endDate.getTime())&&e.endDate!==this.props.endDate&&(n=m(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:pt(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})),(this.state.startDate&&!isNaN(this.state.startDate.getTime())&&(null==(r=t.startDate)?void 0:r.getTime())!==(null==(o=this.state.startDate)?void 0:o.getTime())||this.state.endDate&&!isNaN(null==(i=this.state.endDate)?void 0:i.getTime())&&(null==(a=t.endDate)?void 0:a.getTime())!==(null==(e=this.state.endDate)?void 0:e.getTime()))&&(n=this.props.onRangeChange,o=(r=this.state).startDate,i=r.endDate,n)&&n(o,i),t.year!==this.state.year&&void 0!==(a=this.state.year)&&1===s&&this.setState({year:a,yearBlockNav:pt(a),yearNav:a}),t.month!==this.state.month&&void 0!==(e=this.state.month)&&1===s&&this.setState({monthNav:e})}},{key:"renderEventsIndicator",value:function(e,t){var n,e=ke((Ee(n={"Calendar-eventsIndicator":!0},"Calendar-eventsIndicator--".concat(e),!0),Ee(n,"Calendar-eventsIndicator--active",t),n));return Se.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=De(this.props),e=ke({"Calendar-wrapper":!0},e);return Se.createElement("div",Oe({},r,{className:e,"data-test":"DesignSystem-Calendar-Wrapper"}),Array.from({length:t},function(e,t){return n.renderCalendar(t)}))}}]),p}(),ht=(Ee(dt,"defaultProps",{size:"large",monthsInView:1,view:"date",firstDayOfWeek:"sunday",jumpView:!0}),["shadow","children","className"]),n=Se.forwardRef(function(e,t){var n,r=e.shadow,r=void 0===r?"shadow10":r,o=e.children,i=e.className,e=W(e,ht),r=ke((Ee(n={Card:!0},"Card--".concat(r),r),Ee(n,"".concat(i),i),n));return Se.createElement("div",Oe({"data-test":"DesignSystem-Card",ref:t},e,{className:r}),o)}),mt=(n.displayName="Card",n.defaultProps={shadow:"shadow10"},["border","children","className"]),gt=(Se.forwardRef(function(e,t){var n=e.border,r=e.children,o=e.className,e=W(e,mt),n=ke(Ee({CardSubdued:!0},"CardSubdued--".concat(n),n),o);return Se.createElement("div",Oe({"data-test":"DesignSystem-CardSubdued",ref:t},e,{className:n}),r)}).displayName="CardSubdued",["onClick","onKeyDown","role","tabIndex"]),yt={button:new Set(["Enter","Space","Spacebar"," "]),link:new Set(["Enter"]),checkbox:new Set([]),radio:new Set([])},vt=function(e,t){return!!yt[e]&&yt[e].has(t)},bt={timelapse:"outlined",content_copy:"outlined",speed:"outlined",add_circle_outline:"outlined",turned_in_not:"outlined",important_devices:"outlined",thumb_down_off_alt:"outlined",alarm_on:"outlined",calendar_view_month:"outlined",aspect_ratio:"outlined",change_history:"outlined",arrow_circle_down:"outlined",card_membership:"outlined",query_builder:"outlined",copyright:"outlined",arrow_circle_up:"outlined",alarm:"outlined",work_outline:"outlined",bookmark_border:"outlined",delete_outline:"outlined",credit_card:"outlined",highlight_of:"outlined",check_circle_outline:"outlined",help_outline:"outlined",schedule:"outlined",radio_button_unchecked:"outlined",radio_button_checked:"outlined",delete:"outlined"},A=function(e){var t,n=e.appearance,r=e.className,o=e.name,i=e.size,a=e.children,s=be(e),c=De(e),e=e.type&&{outline:"outlined",sharp:"outlined",round:"rounded",filled:"rounded","two-tone":"rounded"}[e.type]||e.type||o&&bt[o]||"rounded",u=n&&n.includes("_")?(t=(u=n).indexOf("_"),u.slice(0,t)+u.charAt(t+1).toUpperCase()+u.slice(t+2)):n,e=ke((Ee(t={},"material-symbols",!0),Ee(t,"material-symbols-rounded","rounded"===e),Ee(t,"material-symbols-outlined","outlined"===e),Ee(t,"Icon",!0),Ee(t,"Icon--".concat(u),n),Ee(t,"".concat(r),r),t)),n={fontSize:"".concat(i,"px"),width:"".concat(i,"px")};return a&&Se.isValidElement(a)?Se.createElement("span",Oe({},c,{className:r}),a):Se.createElement("i",Oe({"data-test":"DesignSystem-Icon"},c,{className:e,style:n},s),o)},wt=(A.displayName="Icon",A.defaultProps={size:16},["children","componentType","className"]),St=["appearance","size","children","weight","small","className","color"],Ie=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,St),n=ke((Ee(t={Text:!0},"Text--".concat(n),!c&&n),Ee(t,"Text--".concat(i),i),Ee(t,"Text--".concat(r),r),Ee(t,"color-".concat(c),c),Ee(t,"Text--small","small"===r||a),t),s);return Se.createElement(we,Oe({"data-test":"DesignSystem-Text"},e,{className:n,componentType:"span"}),o)},_t=(Ie.displayName="Text",Ie.defaultProps={appearance:"default",size:"regular"},je.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,p=e.labelPrefix,d=e.iconType,e=De(e),o="action"!==i&&o,h=!("selection"!==i||!s),i=ke((Ee(t={Chip:!0},"Chip-".concat(i,"--disabled"),a),Ee(t,"Chip--".concat(i),i&&!a),Ee(t,"Chip-".concat(i,"--selected"),s&&!a),Ee(t,"Chip-selection--selectedDisabled","selection"===i&&s&&a),Ee(t,"Chip-icon--clear",o),t),f);return Se.createElement(je,Oe({"data-test":"DesignSystem-Chip--GenericChip"},e,{label:n,selected:h,icon:r,iconType:d,clearButton:o,disabled:a,className:i,onClose:function(){!a&&c&&c(l)},onClick:function(){!a&&u&&u(l)},name:l,labelPrefix:p}))}),Et=(_t.displayName="Chip",_t.defaultProps={type:"input"},["size","tabIndex","defaultChecked","indeterminate","label","error","disabled","onChange","name","value","className","checked","helpText","id"]),Ot=Se.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,m=e.id,m=void 0===m?"".concat(l,"-").concat(a,"-").concat(Ne()):m,g=W(e,Et),y=Se.useRef(null);Se.useImperativeHandle(t,function(){return y.current});var t=Ce(Se.useState(void 0===d?o:d),2),v=t[0],b=t[1],t=(Se.useEffect(function(){S(i)},[i]),Se.useEffect(function(){void 0!==d&&b(d)},[d]),ke((Ee(t={},"Checkbox",!0),Ee(t,"Checkbox--disabled",c),t),p)),p=ke((Ee(p={},"Checkbox-outerWrapper",!0),Ee(p,"Checkbox-outerWrapper--".concat(n),n),p)),e=ke((Ee(w={},"Checkbox-input",!0),Ee(w,"Checkbox-input--checked",v),Ee(w,"Checkbox-input--indeterminate",e.indeterminate),w)),s=ke((Ee(w={},"Checkbox-wrapper",!0),Ee(w,"Checkbox-wrapper--default",!s),Ee(w,"Checkbox-wrapper--error",s),w)),w=ke((Ee(w={},"Checkbox-label",!0),Ee(w,"Checkbox-label--tiny","tiny"===n),w)),S=function(e){y.current.indeterminate=e},_=ke((Ee(_={},"checked--regular",v&&"regular"===n),Ee(_,"checked--tiny",v&&"tiny"===n),Ee(_,"indeterminate--regular",i&&"regular"===n),Ee(_,"indeterminate--tiny",i&&"tiny"===n),_));return Se.createElement(Se.Fragment,null,Se.createElement("div",{"data-test":"DesignSystem-Checkbox",className:t},Se.createElement("div",{"data-test":"DesignSystem-Checkbox-OuterWrapper",className:p},Se.createElement("input",Oe({},g,{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:y,name:l,value:f,className:e,tabIndex:r,id:m,"data-test":"DesignSystem-Checkbox-InputBox"})),Se.createElement("span",{className:s,"data-test":"DesignSystem-Checkbox-Icon"},_&&Se.createElement(Me,{name:_}))),Se.createElement("div",{className:"Checkbox-labelWrapper"},a&&a.trim()&&Se.createElement("label",{htmlFor:m,className:w,"data-test":"DesignSystem-Checkbox-Label"},Se.createElement(Ie,{size:"tiny"===n?"small":"regular",appearance:c?"disabled":"default"},a.trim())),h&&Se.createElement(Ie,{"data-test":"DesignSystem-Checkbox-HelpText",size:"small",appearance:c?"disabled":"subtle"},h.trim()))))}),Ct=(Ot.displayName="Checkbox",["size","sizeXS","sizeS","sizeM","sizeL","sizeXL","className","children"]),x=Se.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,Ct),r=ke((Ee(n={},"Col",!0),Ee(n,"Col--".concat(r),r),Ee(n,"Col--xs-".concat(o),o),Ee(n,"Col--s-".concat(i),i),Ee(n,"Col--m-".concat(a),a),Ee(n,"Col--l-".concat(s),s),Ee(n,"Col--xl-".concat(c),c),Ee(n,"".concat(u),u),n));return Se.createElement("div",Oe({ref:t,"data-test":"DesignSystem-Column"},e,{className:r}),l)}),xt=(x.displayName="Column",["date","open","position","inputFormat","outputFormat","inputOptions","validators","withInput","disabledBefore","disabledAfter","onDateChange","closeOnSelect","size","showTodayDate","children","view"]),n=function(){e(o,Se["Component"]);var r=h(o);function o(e){d(this,o),Ee(G(u=r.call(this,e)),"getError",function(e){var t,n,r,o,i=u.props,a=i.disabledBefore,s=i.disabledAfter,c=i.outputFormat,i=i.onError;return!(!e||(t=(a=$(a)).year,n=a.month,a=a.date,r=(s=$(s)).year,o=s.month,s=s.date,!Y(e,"less",t,n,a)&&!Y(e,"more",r,o,s))||(i&&i(e,C(c,e)),0))}),Ee(G(u),"onDateChangeHandler",function(e){u.setState({init:!0,date:e}),u.props.closeOnSelect&&u.setState({open:!1})}),Ee(G(u),"onToggleHandler",function(e,t){var n=u.props.inputOptions.disabled;if(!n)switch(t){case"outsideClick":u.setState({open:e});break;case"onClick":u.setState({open:!0})}});var u,t=e.inputFormat,n=e.validators,t=m(e.date,t,n),n=u.getError(t);return u.state={date:t,error:n,init:!1,open:e.open||!1},u}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=m(this.props.date,n,r),this.setState({date:n})),e.open!==this.props.open&&this.setState({open:this.props.open||!1}),t.date!==this.state.date&&(n=(r=this.props).onDateChange,e=r.outputFormat,t=this.state.date,r=this.getError(t),this.setState({error:r}),n)&&(r?n(void 0,""):n(t,C(e,t)))}},{key:"renderCalendar",value:function(){var e=this,t=this.props,n=(t.date,t.open,t.position,t.inputFormat),r=(t.outputFormat,t.inputOptions,t.validators),o=(t.withInput,t.disabledBefore),i=t.disabledAfter,a=(t.onDateChange,t.closeOnSelect,t.size),s=t.showTodayDate,s=void 0===s||s,c=t.children,c=void 0===c?Se.createElement(Se.Fragment,null):c,u=t.view,t=W(t,xt),l=this.state.date,f=ut,p=new Date(Date.now()),f="".concat(f[p.getMonth()]," ").concat(p.getDate()),p=m(l,n,r),l=m(o,n,r),o=m(i,n,r),i=ke({"d-flex justify-content-center":!0,"pb-5":"small"===a,"pb-6":"large"===a,"pt-3":"large"===a&&"year"===u});return Se.createElement("div",null,Se.createElement("div",{className:"d-flex"},c,Se.createElement(dt,Oe({},t,{size:a,date:p,view:u,disabledBefore:l,disabledAfter:o,onDateChange:this.onDateChangeHandler}))),s&&Se.createElement("div",{className:i,"data-test":"DesignSystem-Select--TodaysDate-wrapper"},Se.createElement(_t,{label:"Today, ".concat(f),name:"chip",type:"action",disabled:(n=!0,p&&l&&o?n=l<p&&p<o:p&&l?n=l<p:p&&o&&(n=p<o),!n),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,i=e.validators,e=e.popoverOptions,a=this.state.open;return n?Se.createElement(Ca,Oe({trigger:Se.createElement(Ae,{inputFormat:r,inputOptions:o,validators:i,state:this.state,setState:this.setState.bind(this)})},e,{triggerClass:"w-100",position:t,appendToBody:!0,open:a,onToggle:this.onToggleHandler}),this.renderCalendar()):this.renderCalendar()}}]),o}(),kt=(Ee(n,"defaultProps",_e(_e({},dt.defaultProps),{},{position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[M],inputOptions:{},closeOnSelect:!0})),function(e){return e.includes("a")||e.includes("A")}),Dt=function(e){return e.includes("p")||e.includes("P")},Tt=function(e){return("0"+e).slice(-2)},It=function(e){var t,n,r;return kt(r=e)||Dt(r)?(r=Ce((r=e).split(" "),2),t=r[0],r=r[1],t=t.split(":"),n=t[0],t=t[1],"12"===n&&kt(r)&&(n="00"),Dt(r)&&"12"!==n&&(n=(parseInt(n,10)+12).toString()),"".concat(n,":").concat(t)):e},jt=function(e,t){e=Pe(e);return Pe(t)<e},Nt=function(e,t,n){var r,o,i,a;return""===t||jt(e,t)?(r=e,o=t,i=Fe("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)):Fe(e,t,n)},Mt=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,Re(r=s)&&(a=Le(n)),o&&i&&(o=(r=ze(i,n)).hour,i=r.minute,a+=" (".concat(o," hr ").concat(i," min)")),a),value:e,disabled:f&&(n=f,o=r=e,Re(s)&&(o=Le(r)),!!n.includes(o)),selected:!1,optionID:c+t};var n,r,o,i,a})},At=function(e){return e?"":"23:59"},Pt=function(){var e=new Date;return Tt(e.getHours())+":"+Tt(e.getMinutes())},Rt=/[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~]/,Lt=function(e,t){for(var n=0,r={hour:100,mins:100},o=0;o<e.length;o++){var i=ze(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},Ft=function(e){return e.map(function(e){return e.value})},zt=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=Ve(e=e,t=t),n=t.hour,"60"===(t=t.min)&&(t="00",n=(parseInt(n,10)+1).toString()),n="".concat(n,":").concat(t),Lt(e,n)):-1},Bt=function(e){return e.sort(function(e,t){return e.value>t.value?1:t.value>e.value?-1:0})},Kt=function(e,t){e.scrollTo(0,t)};nt.defaultProps={timeFormat:"12-Hour",interval:15},nt.displayName="TimePickerWithSearch",rt.defaultProps={inputFormat:"hh:mm AM",outputFormat:"hh:mm AM",inputOptions:{},validators:[P]},rt.displayName="TimePickerWithInput";function Ht(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 Ut(e,t,n){return void 0===n?Ht(e,t,!1):Ht(e,n,!1!==t)}_e(_e({},rt.defaultProps),nt.defaultProps);function Wt(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",m=d?"disabled":r&&!l?"primary_dark":"default",g=nn[p=u?"WITH_CHECKBOX":void 0===p?"DEFAULT":p],y=ke((Ee(y={},"Option",!0),Ee(y,"Option--active",s),Ee(y,"Option--selected",r&&!l),Ee(y,"Option--disabled",d),Ee(y,"OptionWrapper",!0),Ee(y,"color-".concat(h),!0),y)),v=ke((Ee(v={},"Option-checkbox",!0),Ee(v,"Option-checkbox--active",s),Ee(v,"OptionWrapper",!0),v)),b=ke((Ee(b={},"Option-text",!0),Ee(b,"Option-text--wrap",!e.truncateOption),b)),w=ke((Ee(w={},"OptionWrapper",!0),Ee(w,"OptionWrapper--disabled",d),w));return e.optionRenderer?Se.createElement("div",Oe({"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})):g({selected:r,index:c,renderSubInfo:function(e){var t,n=r?"white":"disabled";return"string"==typeof e?Se.createElement(Ie,{"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,Se.createElement(xn,{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:m,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:y,id:f})}function qt(e){var t,n=void 0===(n=e.size)?"small":n,r=e.round,o=e.className,e=De(e),r=ke((Ee(t={PlaceholderImage:!0,"Placeholder--animation":!0},"PlaceholderImage--round",r),Ee(t,"PlaceholderImage--".concat(n),n),t),o);return Se.createElement("span",Oe({},e,{className:r}))}function Vt(e){var t=e.loadingType,n=["medium","large"][(e.optionIndex+2)%2];switch(t){case"DEFAULT":return Se.createElement(j,{length:n,"data-test":"DesignSystem-Dropdown--PlaceholderParagraph"});case"WITH_ICON":return Se.createElement(N,{withImage:!0,round:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(j,{length:"large"}));case"WITH_META":return Se.createElement(N,{withImage:!1,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(j,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),Se.createElement(j,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}));case"WITH_CHECKBOX":return Se.createElement(N,{withImage:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(j,{length:"large"}));case"ICON_WITH_META":return Se.createElement(N,{withImage:!0,round:!0,imageSize:"medium","data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(j,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),Se.createElement(j,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}))}return null}function Gt(e){var t=e.dropdownStyle,n=e.errorType,r=e.updateOptions;return Se.createElement("div",{className:"Dropdown-wrapper px-7 d-flex",style:t,"data-test":"DesignSystem-Dropdown--wrapper"},Se.createElement("div",{className:"d-flex flex-column justify-content-center align-items-center","data-test":"DesignSystem-Dropdown--errorWrapper"},Se.createElement(Ie,{className:"text-align-center mb-3",weight:"strong"},rn[n]),Se.createElement(Ie,{className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},on[n]),"FAILED_TO_FETCH"===n&&Se.createElement(Te,{size:"tiny",largeIcon:!0,"aria-label":"reload",icon:"refresh",iconAlign:"left",onClick:function(){return r()}},"Reload")))}function Yt(i){function R(){var e=document.querySelector(".Dropdown-wrapper");(e=null==e?void 0:e.offsetHeight)&&fe(e)}function L(){return Se.createElement(Gt,{dropdownStyle:_e(_e({},ye),{},{minHeight:p}),updateOptions:ne,errorType:oe})}function o(e,t){Q(e,t),he||null!=(e=C.current)&&e.focus(),T(y)}function F(){var e;X(),null!=(e=C.current)&&e.focus()}function z(){var e;J(),null!=(e=C.current)&&e.focus()}function B(){T(y),E&&w&&E("")}function K(e){T(y),E&&E(e.target.value)}function a(e,t){var n=i.onClearOptions,r=h.every(function(e){return e.disabled});return Se.createElement("div",{className:ve(t)},Se.createElement(Ie,{size:"small",appearance:"subtle"},e),t&&Se.createElement(Te,{onClick:n,disabled:r,appearance:"transparent",size:"tiny",type:"button"},"Clear"))}function H(t,e){var n=Qe(w,g,f,_)?e+1===D:e===D,r=-1!==m.findIndex(function(e){return e.value===t.value}),o="Checkbox-option-".concat(e,"-").concat(t.value,"-").concat((new Date).getTime());return Se.createElement("label",{htmlFor:o},Se.createElement(Wt,{optionData:t,truncateOption:V,selected:r,index:e,updateActiveOption:we,optionRenderer:Z,active:n,checkboxes:_,menu:b,onClick:function(){return be(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?D+1:D-1,u="down"===e?s.length:-1;c!==u;){if("true"!==s[c].getAttribute("data-disabled")){var l=s[c];l&&(n=se.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?Kt(n,r.offsetTop-o.height+a):i.top<o.top&&n&&Kt(n,r.offsetTop-a)),void 0!==l&&T(c);break}"down"===e?c++:c--}}var W,e,s,c,u=void 0===(t=i.listOptions)?[]:t,q=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,V=void 0===(d=i.truncateOption)||d,f=void 0===(d=i.withSelectAll)||d,p=void 0===(d=i.maxHeight)?200:d,d=i.customTrigger,h=i.selected,m=i.tempSelected,G=i.previousSelected,g=i.remainingOptions,y=i.firstEnabledOption,v=i.dropdownOpen,b=i.menu,w=i.searchTerm,S=i.showApplyButton,_=i.withCheckbox,Y=i.withSearch,$=i.popoverOptions,E=i.onSearchChange,Z=i.optionRenderer,J=i.applyOptions,X=i.cancelOptions,Q=i.toggleDropdown,O=i.className,ee=void 0===(ee=i.searchPlaceholder)?"Search..":ee,te=i.scrollIndex,ne=i.updateOptions,re=i.noResultMessage,oe=i.errorType,ie=i.loadingOptions,ae=De(i),se=Se.createRef(),ce=Se.createRef(),C=Se.createRef(),x=Se.createRef(),k=Se.createRef(),ue=(j=Ce(Se.useState(),2))[0],le=j[1],D=(j=Ce(Se.useState(y),2))[0],T=j[1],I=(j=Ce(Se.useState(),2))[0],fe=j[1],j=0===u.length&&!ie&&h.length<=0;Se.useEffect(function(){var e,t,n,r,o;return v&&(o=i.width,t=i.minWidth,n=i.maxWidth,r=null==(r=ce.current)?void 0:r.clientWidth,o={width:o||r,minWidth:t||(S?176:b?128:r),maxWidth:n||"100%"},requestAnimationFrame(R),le(o),te)&&0===m.length&&(e=setTimeout(function(){tt(te,u)},100)),function(){clearTimeout(e)}},[v]),Se.useEffect(function(){y!==D&&T(y)},[y]);var N=void 0===(N=i.triggerSize)?"regular":N,M=void 0===(M=i.placeholder)?"Select":M,pe=i.icon,de=i.error,he=i.disabled,A=i.inlineLabel,P=i.triggerLabel,me=i.iconType,ge=d?d(P||M):Se.createElement(Se.Fragment,null),d=d?Se.cloneElement(ge,{tabIndex:0,ref:C}):Se.createElement(tn,{placeholder:M,triggerSize:N,open:v,icon:pe,disabled:he,inlineLabel:A,menu:b,error:de,ref:C,iconType:me},P),ye={maxHeight:p,overflowY:"auto",overflowX:"hidden",minHeight:I},ge={maxHeight:I||p,overflowY:"auto",overflowX:"hidden",minHeight:I},ve=function(e){var t;return ke((Ee(t={},"Dropdown-section",!0),Ee(t,"Dropdown-section--withClear",e),t))},M=ke(Ee({},"Dropdown",!0),O),pe=ke((Ee(N={},"Dropdown-wrapper",!0),Ee(N,"Dropdown-wrapper--wrap",!V),N)),de=ke((Ee(A={},"Option-checkbox--active",0===D),Ee(A,"Option-checkboxWrapper",!0),Ee(A,"Option-checkbox",!0),Ee(A,"OptionWrapper",!0),A)),be=function(e){i.onOptionSelect(e),null!=(e=C.current)&&e.focus()},we=function(e,t){t=_&&f&&!i.async&&!t?e+1:e;T(t)},me=Y||i.async;return Se.createElement("div",Oe({},ae,{className:M,ref:ce,onKeyDown:function(e){var t,n=".OptionWrapper";switch(e.key){case"ArrowDown":e.preventDefault(),v?U("down",n):o(!v);break;case"ArrowUp":e.preventDefault(),v?U("up",n):o(!v);break;case"Enter":var r=document.activeElement;v&&(q.current===r||C.current===r)&&(e.preventDefault(),r=_?"".concat(n," .Checkbox-input"):n,r=document.querySelectorAll(r)[D])&&r.click(),v||o(!v);break;case"Tab":!S&&v?(e.preventDefault(),o(!1,"onClick")):(r=document.activeElement,t=null==(t=k.current)?void 0:t.disabled,(r===x.current&&t||r===k.current)&&v?(e.preventDefault(),o(!1,"onClick")):S&&v&&(e.preventDefault(),r===x.current?null!=(t=k.current)&&t.focus():null!=(r=x.current)&&r.focus()))}}}),Se.createElement(Ca,Oe({onToggle:o,trigger:d,triggerClass:b?"":"w-100",open:v,customStyle:ue,position:an[t]},$,{"data-test":"DesignSystem-Dropdown--Popover"}),me&&Se.createElement("div",{className:"Dropdown-inputWrapper"},Se.createElement(gn,{name:"Dropdown-search",icon:"search",value:w,placeholder:ee,autoFocus:!0,onChange:K,onClear:B,ref:q,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,O=void 0===(O=i.errorTemplate)?L:O,N=Qe(w,g,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(xe)}(u),I&&ie?Se.createElement("div",{className:"Dropdown-loading"},Se.createElement("div",{className:"Dropdown-wrapper",style:ge},(e=I,e=Array(I).fill("Loading"),W=_?"WITH_CHECKBOX":n,e.map(function(e,t){return Se.createElement("div",{className:"Option-loading",key:"".concat(e,"-").concat(t)},Se.createElement(Vt,{loadingType:W,optionIndex:t}))})))):j?re?Se.createElement("div",{className:"Dropdown-wrapper",style:ye,"data-test":"DesignSystem-Dropdown--errorWrapper"},Se.createElement("div",{className:"Option"},Se.createElement("div",{className:"Option-subinfo"},re))):O&&O({errorType:oe}):Se.createElement("div",{className:pe,style:ye,ref:se},N&&(I=void 0===(I=i.selectAllLabel)?"Select All":I,e=i.selectAll,O=i.onSelectAll,I=I.trim()?I.trim():"Select All",N="Checkbox-option-".concat(I.toLowerCase().replace(/\s+/g,""),"-").concat((new Date).getTime()),Se.createElement("div",{className:de,onMouseEnter:function(){return we(0,!0)}},Se.createElement("label",{htmlFor:N,className:"Checkbox-label"},Se.createElement(Ot,{label:I,onChange:O,checked:e.checked,indeterminate:e.indeterminate,tabIndex:-1,className:"OptionCheckbox",id:N})))),0<h.length&&a(s,!0),h.map(H),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 Se.createElement("div",{className:"Option-checkboxWrapper",key:t},n!==r&&r&&a(r),H(e,o))}),i.async&&0<g&&(O=i.footerLabel,Se.createElement("div",{className:"Dropdown-footer"},Se.createElement(Ie,{size:"small",appearance:"subtle"},void 0===O?"Search for more options":O))))),S&&_&&(A=$e(G,m)||i.loadingOptions,Se.createElement("div",{className:"Dropdown-buttonWrapper"},Se.createElement(Te,{ref:x,className:"mr-4",appearance:"basic",onClick:F,disabled:i.loadingOptions,size:"tiny",tabIndex:-1,"data-test":"DesignSystem-Dropdown-CancelButton",type:"button"},l),Se.createElement(Te,{ref:k,appearance:"primary",disabled:A,size:"tiny",onClick:z,"data-test":"DesignSystem-Dropdown-ApplyButton",type:"button"},r)))))}function $t(e){var t,n=e.className,r=e.iconType,e=W(e,dn),n=ke((Ee(t={},"ActionButton",!0),Ee(t,"".concat(n),n),t));return Se.createElement(A,Oe({className:n,type:r,"data-test":"DesignSystem-Input-ActionButton"},e))}function Zt(e,t){for(var n="",r=0;r<e.length;r++)n+="object"===Z(e[r])?t:e[r];return n}function Jt(e){var t=e.label,n=e.icon,r=e.size,e=e.iconType;return Se.createElement("span",{"data-test":"DesignSystem-MetaList--Meta",className:"Meta"},n&&Se.createElement(A,{"data-test":"DesignSystem-MetaList--MetaIcon",name:n,appearance:"subtle",className:"Meta-icon",type:e,size:"regular"===r?16:12}),Se.createElement(Ie,{size:r,"data-test":"DesignSystem-MetaList--MetaLabel",appearance:"subtle"},t))}function Xt(e){return"".concat((100*e).toFixed(2),"%")}function Qt(e,t,n){return null==e?e:Math.min(Math.max(e,t),n)}var en=["triggerSize","placeholder","menu","children","icon","disabled","open","inlineLabel","error","iconType"],tn=Se.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,p=e.iconType,e=W(e,en),d=c?"disabled":"default",o=o.trim(),o=a||o,h=i?s||"more_horiz":"keyboard_arrow_down",r=ke((Ee(n={},"Button",!0),Ee(n,"DropdownButton",!0),Ee(n,"DropdownButton--".concat(r),r),Ee(n,"DropdownButton--".concat(r,"Square"),i),Ee(n,"DropdownButton--placeholder",!a&&!i),Ee(n,"DropdownButton--icon",s),Ee(n,"DropdownButton--open",u),Ee(n,"DropdownButton--error",f),n)),f=ke((Ee(u={},"Text",!0),Ee(u,"Text--regular",!0),Ee(u,"DropdownButton-text",!0),u));return Se.createElement("button",Oe({ref:t,type:"button",value:a,className:r,disabled:c,tabIndex:0,"data-test":"DesignSystem-DropdownTrigger"},e),!i&&Se.createElement("div",{className:"DropdownButton-wrapper"},l&&Se.createElement(Ie,{appearance:"subtle",className:"mr-4 white-space-nowrap"},"".concat(l.trim().charAt(0).toUpperCase()).concat(l.trim().slice(1))),s&&!l&&Se.createElement(A,{appearance:d,className:"d-flex align-items-center mr-4",name:s,type:p}),o&&Se.createElement("span",{className:f},o)),Se.createElement(A,{appearance:d,name:h,type:p}))}),nn=(tn.displayName="DropdownButton",Ee(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 Se.createElement("div",{className:t,onClick:r,onMouseEnter:a,"data-test":e,"data-disabled":c},Se.createElement("div",{className:"Option-label"},Se.createElement(Ie,{className:n,color:i,id:o.optionID},s)))}),Ee(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,l=i.disabled,i=i.iconType,n=ke((Ee(t={},"".concat(n),!0),Ee(t,"Option--icon",u),t));return Se.createElement("div",{className:n,onClick:o,onMouseEnter:a,"data-test":e,"data-disabled":l},u&&Se.createElement(A,{className:"Option-icon mr-4","data-test":"".concat(e,"--Icon"),name:u,type:i}),Se.createElement("div",{className:"Option-label"},Se.createElement(Ie,{className:r,color:s},c)))}),Ee(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 Se.createElement("div",{className:t,onClick:r,onMouseEnter:i,"data-test":e,"data-disabled":o},Se.createElement("div",{className:"Option-label"},Se.createElement(Ie,{className:n,color:s},u),c&&a(c)))}),Ee(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 Se.createElement("div",{className:t,onMouseEnter:i,"data-test":a,"data-disabled":r},Se.createElement(Ot,{label:c,disabled:r,checked:n,onChange:o,tabIndex:-1,className:"OptionCheckbox ".concat(s?"pb-0":""),"data-test":"".concat(a,"--Checkbox"),id:e}),s&&Se.createElement("div",{className:"pl-8 ml-3"},(t=r?"disabled":"subtle",i=n?"white":"disabled","string"==typeof(c=s)?Se.createElement(Ie,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",appearance:t,size:"small",weight:"medium"},c):(o=c.list,c=c.seperator,Se.createElement(xn,{list:void 0===o?[]:o,seperator:c,iconAppearance:i,labelAppearance:t,seperatorAppearance:i,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})))))}),Ee(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=ke((Ee(t={},"".concat(n),!0),Ee(t,"Option--icon",p),t));return Se.createElement("div",{className:n,onClick:i,onMouseEnter:s,"data-test":e,"data-disabled":a},p&&Se.createElement(A,{"data-test":"".concat(e,"--Icon"),className:"Option-icon mr-4",name:p,appearance:c}),Se.createElement("div",{className:"Option-label"},Se.createElement(Ie,{className:r,color:u},f),l&&o(l)))}),n),j=function(e){var t,n=e.length,r=e.size,o=e.className,e=De(e),i=ke(Ee({"Placeholder--animation":!0,PlaceholderParagraph:!0},"PlaceholderParagraph--".concat(r),r)),n=ke((Ee(t={"PlaceholderParagraph-wrapper":!0},"PlaceholderParagraph-wrapper--length-".concat(n),n),Ee(t,"PlaceholderParagraph-wrapper--size-".concat(r),r),t),o);return Se.createElement("div",Oe({},e,{className:n}),Se.createElement("span",{className:i}))},N=(j.displayName="PlaceholderParagraph",j.defaultProps={length:"medium"},qt.displayName="PlaceholderImage",qt.defaultProps={size:"small"},function(e){var t=e.imageSize,n=e.withImage,r=e.round,o=e.children,i=e.className,e=De(e),a=ke(Ee({"Placeholder-paragraph":!0},"Placeholder-paragraph--withImage",n)),i=ke(Ee({},"Placeholder",!0),i);return Se.createElement("div",Oe({"data-test":"DesignSystem-Placeholder"},e,{className:i}),n&&Se.createElement(qt,{round:r,size:t,"data-test":"DesignSystem-Placeholder--Image"}),o&&Se.createElement("div",{className:a,"data-test":"DesignSystem-Placeholder--Paragraph"},o))}),rn=(N.displayName="Placeholder",N.defaultProps={withImage:!0,imageSize:"small"},{FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No record available"}),on={FAILED_TO_FETCH:"We couldn't load the data, try reloading.",NO_RECORDS_FOUND:"Try modifying your search to find what you are looking for.",DEFAULT:"We have nothing to show you at the moment."},an={right:"bottom-start",left:"bottom-end"},sn=(Yt.displayName="DropdownList",["triggerOptions","selected","tabIndex"]),cn=Se.createRef(),un=function(){e(l,Se["Component"]);var u=h(l);function l(e){d(this,l),Ee(G(v=u.call(this,e)),"staticLimit",void 0),Ee(G(v),"getDisabledOptions",function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).filter(function(e){return e.disabled})}),Ee(G(v),"fetchOptionsFunction",function(t){var n,e=v.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})})}),Ee(G(v),"getUnSelectedOptions",function(e,t){var n;return e.length?t?(t=v.props.selected,n=void 0===t?[]:t,e.filter(function(t){return Ze(v.props.selected)?-1===n.findIndex(function(e){return e.value===t.value}):!t.selected})):e.filter(function(t){return-1===v.state.tempSelected.findIndex(function(e){return e.value===t.value})}):e}),Ee(G(v),"getSelectedOptions",function(e,t){var n=v.props.selected;return e.length?t?Ze(v.props.selected)?void 0===n?[]:n:e.filter(function(e){return e.selected}):v.state.tempSelected:[]}),Ee(G(v),"updateOptions",function(c,e){var t=v.state,u=t.searchTerm,l=t.selectAll,f=t.tempSelected,p=t.previousSelected,d=t.errorType,h=void 0===e?v.state.async:e,t=v.props,m=t.fetchOptions,g=t.withCheckbox,y=t.withSearch;(m||v.fetchOptionsFunction)(u).then(function(e){var t,n,r,o,i,a=e.options,s=e.count;e.scrollToIndex&&setTimeout(function(){tt(e.scrollToIndex,a)},0),(!e.searchTerm||e.searchTerm&&e.searchTerm===v.state.searchTerm)&&(h=""===u?s>v.staticLimit:h,t=Xe(h,u,g)?v.getUnSelectedOptions(a,c):a,n=""===u?v.getSelectedOptions(a,c):[],r=""===u?s:v.state.optionsLength,o=v.getDisabledOptions(t.slice(0,v.staticLimit)),i=d,i=0===r&&""===u?"DEFAULT":""!==u?"NO_RECORDS_FOUND":"FAILED_TO_FETCH",v.setState(_e(_e({},v.state),{},{errorType:m?i:d,scrollIndex:e.scrollToIndex||0,optionsLength:r,loading:!1,async:h,searchedOptionsLength:s,options:t.slice(0,v.staticLimit),tempSelected:c?n:f,previousSelected:c?n:p,selected:Xe(h,u,g)?n:[],triggerLabel:v.updateTriggerLabel(c?n:f),selectAll:!h&&c?et(n,r,o.length):l})),h||y)&&null!=(i=cn.current)&&i.focus()}).catch(function(){v.setState({errorType:m?"FAILED_TO_FETCH":d,loading:!1,options:[]})})}),Ee(G(v),"updateSearchTerm",function(e){v.setState(_e(_e({},v.state),{},{loading:!0,searchInit:!0,searchTerm:e,errorType:"NO_RECORDS_FOUND"}))}),Ee(G(v),"updateOnPopperToggle",function(){var e,t=v.props,n=t.withCheckbox,r=t.showApplyButton,o=t.onClose,i=t.name,t=t.selected,t=void 0===t?[]:t,a=v.state,s=a.previousSelected,c=a.tempSelected,u=a.optionsLength,l=a.async,f=a.loading,p=a.searchTerm,a=a.options,d=(Je(v.props.open)?v.props:v.state).open,a=v.getDisabledOptions(a).length;n&&r&&(e=Ze(v.props.selected)?t:s,v.setState({tempSelected:e,selectAll:et(e,u,a),triggerLabel:v.updateTriggerLabel(e)})),Je(v.props.open)&&v.setState({open:d}),d&&(u=Xe(l,p,n)&&!$e(v.state.selected,c),v.setState({loading:u||f||""!==p,searchInit:""!==p,searchTerm:""}),u)&&v.updateOptions(!1),o&&!d&&(a=(n&&r?Ze(v.props.selected)?t:s:v.state.tempSelected).map(function(e){return e.value}),v.debounceOnClose(a,i))}),Ee(G(v),"debounceOnClose",Ut(300,function(e,t){var n=v.props.onClose;n&&n(e,t)})),Ee(G(v),"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=v.props).triggerOptions,e=e.getLabel,t=(n=void 0===n?{}:n).customLabel,n=n.labelLimit,r=v.state?v.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)}),Ee(G(v),"updateSelectedOptions",function(e,t,n){var r=v.state,o=r.optionsLength,i=r.previousSelected,a=r.selected,s=r.loading,r=r.open,c=v.props,u=c.onChange,l=c.withCheckbox,f=c.showApplyButton,p=c.closeOnSelect,d=c.name,c=c.onPopperToggle,h=l&&f&&n,m=v.getDisabledOptions(v.state.options),g=0===e.length&&0<a.length||e.every(function(e){return e.disabled})&&!a.every(function(e){return e.disabled});v.setState(_e(_e({},v.state),{},{tempSelected:e,triggerLabel:v.updateTriggerLabel(e),selectAll:et(e,o,m.length),open:Je(v.props.open)||l?r:!p,previousSelected:h?e:i,selected:g?e:a,loading:!!g||s})),g&&v.debounceClear(),!u||f&&!n||(o=e.map(function(e){return e.value}),u(t?o[0]:o,d)),!l&&p&&c&&Je(v.props.open)&&c(!1,"optionClick")}),Ee(G(v),"isValidOption",function(e){var t=v.props,n=t.closeOnSelect,r=t.withCheckbox,o=t.open,t=t.onPopperToggle,i=v.state.tempSelected;return!(0<i.length&&!r&&i[0].value===e.value&&(v.setState(_e(_e({},v.state),{},{open:Je(o)||!n})),!r&&n&&t&&Je(o)&&t(!1,"optionClick"),1))}),Ee(G(v),"onOptionSelect",function(e){var t=v.props,n=t.onUpdate,r=t.selected,t=t.menu;Ze(r)?n&&(v.isValidOption(e)||t)&&n("select-option",e):(v.isValidOption(e)||t)&&v.updateSelectedOptions([e],!0)}),Ee(G(v),"onSelect",function(t,e){var n=v.props,r=n.onUpdate,o=n.selected,n=n.showApplyButton;Ze(o)&&!n?r&&r(e?"select-option":"deselect-option",t):(o=v.state.tempSelected.slice(),e||(n=o.findIndex(function(e){return e.value===t.value}),o.splice(n,1)),o=e?o.concat(t):o,v.updateSelectedOptions(o,!1))}),Ee(G(v),"onSelectAll",function(e){var t=v.props,n=t.onUpdate,r=t.selected,t=t.showApplyButton,o=v.state,i=o.tempSelected,o=o.options;Ze(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(xe(o.filter(function(e){return!e.disabled})),xe(r)):r,v.updateSelectedOptions(t,!1))}),Ee(G(v),"debounceSearch",Ut(v.props.searchDebounceDuration,function(){v.setState({searchInit:!1},function(){v.updateOptions(!1)})})),Ee(G(v),"reload",function(){v.setState({loading:!0},function(){v.updateOptions(!1)})}),Ee(G(v),"debounceClear",Ut(250,function(){return v.updateOptions(!1)})),Ee(G(v),"onClearOptions",function(){var e=v.props,t=e.selected,n=e.name,r=e.onUpdate,o=e.showApplyButton,e=e.onChange,i=v.state.tempSelected.filter(function(e){return e.disabled});Ze(t)&&!o?r&&r("clear-all"):(v.setState({selected:i,tempSelected:i,triggerLabel:"",loading:!0}),v.debounceClear(),e&&!o&&e(i,n))}),Ee(G(v),"onTogglePopper",function(e){var t=v.props.onPopperToggle;t&&Je(v.props.open)&&t(!1,e)}),Ee(G(v),"onCancelOptions",function(){var e=v.state,t=e.previousSelected,n=e.tempSelected,e=e.optionsLength,r=v.props,o=r.selected,i=r.onUpdate,a=r.onClose,r=r.name,s=!!Je(v.props.open)&&v.state.open,c=t.map(function(e){return e.value});Ze(o)?i&&i("cancel-selected",t,n):(o=v.updateTriggerLabel(t),i=v.getDisabledOptions(v.state.options),v.setState(_e(_e({},v.state),{},{tempSelected:t,selectAll:et(t,e,i.length),triggerLabel:o,open:s})),a&&!s&&a(c,r)),v.onTogglePopper("cancelClick")}),Ee(G(v),"onApplyOptions",function(){var e=v.state,t=e.tempSelected,e=e.previousSelected,n=v.props,r=n.onChange,o=n.selected,i=n.onUpdate,a=n.onClose,n=n.name,s=!!Je(v.props.open)&&v.state.open,c=t.map(function(e){return e.value});Ze(o)?i&&i("apply-selected",e,t):(v.setState(_e(_e({},v.state),{},{previousSelected:t,optionsApplied:!0,open:s})),r&&r(c,n),a&&!s&&a(c,n)),v.onTogglePopper("applyClick")}),Ee(G(v),"onToggleDropdown",function(e,t){var n;v.props.disabled||((n=v.props.onPopperToggle)&&Je(v.props.open)?n(e,t):v.setState({open:e}))});var v,t=e.selected,t=void 0===t?[]:t,n=e.totalOptions,r=e.withCheckbox,o=e.loading,i=e.open,a=e.options,e=(v.staticLimit=Math.min(100,e.staticLimit),n||a.length),n="fetchOptions"in v.props||e>v.staticLimit,s=n?[]:v.getSelectedOptions(a,!0),c=v.getDisabledOptions(a);return v.state={async:n,optionsLength:e,open:i,searchInit:!1,searchedOptionsLength:e,optionsApplied:!1,options:a||[],loading:n||o,searchTerm:"",tempSelected:s,previousSelected:s,selected:Xe(n,"",r)?t:[],triggerLabel:v.updateTriggerLabel(s,e),selectAll:et(s,e,c.length),errorType:"DEFAULT"},v}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(_e(_e({},this.state),{},{options:a,loading:o,tempSelected:i,previousSelected:i,optionsLength:a.length,searchedOptionsLength:a.length,triggerLabel:this.updateTriggerLabel(i),selectAll:et(i,this.state.optionsLength,r)})),n&&null!=(o=cn.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||Je(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,p=e.scrollIndex,e=e.errorType,d=this.props,h=d.withSelectAll,h=void 0===h||h,d=d.withCheckbox,m=this.props,g=m.triggerOptions,g=void 0===g?{}:g,y=(m.selected,m.tabIndex),m=W(m,sn),s=s-t.length,y=y||(Qe(o,s,h,d)?0:t.findIndex(function(e){return!e.disabled}));return Se.createElement(Yt,Oe({listOptions:t,inputRef:cn,remainingOptions:s,firstEnabledOption:y,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:g.customTrigger,scrollIndex:p,updateOptions:this.reload,errorType:e},m))}}]),l}(),ln=(Ee(un,"defaultProps",{triggerOptions:{},options:[],closeOnSelect:!0,staticLimit:50,searchDebounceDuration:300}),["appearance","size","children","className","color"]),fn={s:"h5",m:"h4",l:"h3",xl:"h2",xxl:"h1"},pn=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.className,a=e.color,e=W(e,ln),n=ke((Ee(t={Heading:!0},"Heading--".concat(r),r),Ee(t,"Heading--".concat(n),!a&&n),Ee(t,"color-".concat(a),a),t),i);return Se.createElement(we,Oe({"data-test":"DesignSystem-Heading"},e,{className:n,componentType:fn[r]}),o)},dn=(pn.displayName="Heading",pn.defaultProps={appearance:"default",size:"m"},["className","iconType"]),hn=($t.displayName="ActionButton",$t.defaultProps={size:16,type:"rounded"},["size","type","minWidth","defaultValue","name","placeholder","value","icon","inlineLabel","required","error","info","onChange","onClick","onClear","onBlur","onFocus","onPaste","actionIcon","className","autoFocus","disabled","readOnly","iconType"]),mn={tiny:12,regular:16,large:20},gn=Se.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,m=e.onClick,g=e.onClear,y=e.onBlur,v=e.onFocus,b=e.onPaste,w=e.actionIcon,S=e.className,_=e.autoFocus,E=e.disabled,O=e.readOnly,C=e.iconType,x=W(e,hn),k=Se.useRef(null),D=Ce(Se.useState(!c),2),T=D[0],I=D[1],D=(Se.useImperativeHandle(t,function(){return k.current}),Se.useEffect(function(){var e;_&&null!=(e=k.current)&&e.focus({preventScroll:!0})},[]),De(e)),e=ke((Ee(t={},"Input",!0),Ee(t,"Input--".concat(n),n),Ee(t,"Input--disabled",E||O),Ee(t,"Input--error",p),t),S),S=ke((Ee(t={},"Input-input",!0),Ee(t,"Input-input--".concat(n),n),t)),T=ke((Ee(t={},"Input-icon",!0),Ee(t,"Input-icon--left",!0),Ee(t,"Input-icon--inputBlank",T),Ee(t,"Input-icon--error",p),t)),t=ke((Ee(p={},"Input-icon",!0),Ee(p,"Input-iconWrapper--right",!0),p)),p=Se.createElement("div",{className:t,tabIndex:0},Se.createElement(A,{name:"info",size:mn[n],className:"Input-icon--right"}));return Se.createElement("div",{"data-test":"DesignSystem-InputWrapper",className:e,style:{minWidth:o},onClick:function(){var e;return null==(e=k.current)?void 0:e.focus()},role:"presentation",onBlur:function(){var e;return I(!(null!=(e=k.current)&&e.value))}},l&&Se.createElement("div",{className:"Input-inlineLabel"},Se.createElement(Ie,{appearance:"subtle"},l)),"tiny"!==n&&u&&Se.createElement("div",{className:T},Se.createElement(A,{name:u,size:mn[n],type:C})),Se.createElement("input",Oe({"data-test":"DesignSystem-Input"},D,x,{ref:k,name:a,type:r,defaultValue:i,placeholder:s,className:S,value:c,required:f,disabled:E,readOnly:O,onChange:h,onBlur:y,onClick:m,onFocus:v,onPaste:b,tabIndex:O?-1:void 0})),E?"":d?Se.createElement(Da,{position:"bottom",tooltip:d},p):w&&(c||i)?w:g&&(c||i)&&Se.createElement("div",{className:t},Se.createElement(A,{"data-test":"DesignSystem-Input--closeIcon",onClick:function(e){var t;null!=(t=k.current)&&t.focus({preventScroll:!0}),g(e)},name:"close",size:mn[n],className:"Input-icon--right"})))}),yn=(gn.displayName="Input",Object.assign(gn,{ActionButton:$t}),["size","defaultValue","name","placeholder","icon","prefix","suffix","error","min","max","onChange","onClick","onBlur","onFocus","className","autoFocus","disabled","readOnly","value","showActionButton","onKeyDown","iconType"]),vn={regular:16,large:20},bn=Se.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,m=e.onFocus,g=e.className,y=e.autoFocus,v=e.disabled,b=e.readOnly,w=e.value,S=e.showActionButton,_=void 0===S||S,S=e.onKeyDown,E=e.iconType,O=W(e,yn),C=Se.useRef(null),x=void 0===w,k=Ce(Se.useState(w||r),2),D=k[0],T=k[1],k=(Se.useImperativeHandle(t,function(){return C.current}),Se.useEffect(function(){var e;y&&null!=(e=C.current)&&e.focus({preventScroll:!0})},[]),Se.useEffect(function(){void 0!==w&&T(w)},[w]),De(e)),e=ke((Ee(t={},"MetricInput",!0),Ee(t,"MetricInput--".concat(n),n),Ee(t,"MetricInput--disabled",v||b),Ee(t,"MetricInput--error",u),t),g),t=ke((Ee(u={},"MetricInput-input",!0),Ee(u,"MetricInput-input--".concat(n),n),Ee(u,"mr-4",!c&&!_&&"regular"===n),Ee(u,"mr-6",!c&&!_&&"large"===n),u)),u=ke((Ee(g={},"MetricInput-icon",!0),Ee(g,"MetricInput-icon--".concat(n),n),g)),g=ke((Ee(g={},"mr-4","regular"===n),Ee(g,"mr-5","regular"!==n),g)),I=ke((Ee(I={},"ml-4 mr-3","regular"===n),Ee(I,"mx-5","regular"!==n),I)),j=ke((Ee(j={},"p-0",!0),Ee(j,"MetricInput-arrowIcon--".concat(n),n),Ee(j,"ml-3",!0),j)),N=function(e,t){var n=Number(D||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))),x&&T(n),p&&(t=Object.create(e,{target:{value:{value:n}}}),p(t)))},M="large"===n?"regular":"tiny";return Se.createElement("div",{"data-test":"DesignSystem-MetricInputWrapper",className:e,onKeyDown:S,role:"presentation"},a&&Se.createElement(A,{"data-test":"DesignSystem-MetricInput--icon",name:a,type:E,size:vn[n],appearance:D?"subtle":"disabled",className:u}),s&&Se.createElement(Ie,{"data-test":"DesignSystem-MetricInput--prefix",className:g,size:n,appearance:"subtle"},s),Se.createElement("input",Oe({"data-test":"DesignSystem-MetricInput"},k,O,{type:"number",ref:C,name:o,defaultValue:r,placeholder:i,className:t,value:D,disabled:v,readOnly:b,onChange:function(e){x&&T(e.target.value),p&&p(e)},onBlur:h,onClick:d,onFocus:m,onKeyDown:function(e){if(_){var t=e;switch(t.key){case"e":case"E":return void t.preventDefault();case"ArrowDown":return void(t.preventDefault(),N(t,"down"));case"ArrowUp":t.preventDefault(),N(t,"up")}}else e.preventDefault()}})),c&&Se.createElement(Ie,{"data-test":"DesignSystem-MetricInput--suffix",className:I,size:n,appearance:"subtle"},c),_&&Se.createElement("div",{className:"MetricInput-arrowIcons"},Se.createElement(Te,{type:"button",icon:"keyboard_arrow_up",size:M,className:"".concat(j," mb-2"),onClick:function(e){return N(e,"up")},"data-test":"DesignSystem-MetricInput--upIcon"}),Se.createElement(Te,{type:"button",icon:"keyboard_arrow_down",size:M,className:j,onClick:function(e){return N(e,"down")},"data-test":"DesignSystem-MetricInput--downIcon"})))}),wn=(bn.displayName="MetricInput",["mask","value","placeholderChar","validators","clearOnEmptyBlur","defaultValue","mask","error","caption","required","onChange","onPaste","onBlur","onFocus","onClear","className","id","helpText"]),n=Se.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,m=n.mask,i=n.error,a=n.caption,R=n.required,g=n.onChange,s=n.onPaste,c=n.onBlur,u=n.onFocus,l=n.onClear,f=n.className,y=n.id,L=n.helpText,F=W(n,wn),v=Se.useCallback(function(e){return"object"===Z(m[e])},[m]),b=Se.useCallback(function(e,t){if("right"===e){for(var n=t;n<m.length;n++)if(v(n))return n;return m.length}if("left"!==e)return t;for(var r=t;0<=r;r--)if(v(r-1))return r;return 0},[m,v]),p=Se.useCallback(function(){var e=b("right",0);return{start:e,end:e}},[b]),w=Se.useCallback(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:m.length-1;return Zt(m,d).slice(e,t+1)},[m,d]),S=Se.useMemo(function(){return w()},[w]),_=Se.useMemo(function(){return p()},[p]),E=Se.useRef(null),O=Se.useRef(),C=Se.useRef(_),x=Se.useRef(0),r=Ce(Se.useState(r||t||""),2),k=r[0],D=r[1],T=(Se.useImperativeHandle(e,function(){return E.current}),Se.useEffect(function(){D(t||"")},[t]),Se.useEffect(function(){N(x.current)},[k]),Se.useCallback(function(e){return Math.abs(e.end-e.start)},[])),I=Se.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]),j=Se.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]),N=Se.useCallback(function(e){return j({start:e,end:e})},[j]),M=Se.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>=m.length||(r>=e.length?C.current={start:t,end:t}:(n=m[t],v(t)?(e[r].match(n)?o+=e[r]:o+=d,a++):o+=n,o+=M(e,i,a))),o},[m,d,v]),A=Se.useCallback(function(){C.current=I(),O.current=window.requestAnimationFrame(A)},[C.current,I]),P=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=Se.useCallback(function(e){for(var t,n=null==(n=e.currentTarget)?void 0:n.value,r=I(),o=Math.min(C.current.start,r.start),i=r.end,a=o,s="",c=0,i=n.slice(o,i),s=M(i,o),i=k,u=(0!==i.length||"parent-TimePicker"!==y&&"parent-DatePicker"!==y||(i=S),t=s.length,r.end>C.current.end?c=t?T(C.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,m.length).join(""),s!==d&&""!==s&&!s.includes(d)&&q(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,m.length).join("");x.current=a,r!==i&&q(h,r)?"__:__ _M"===S?(D(r.toUpperCase()),null!=g&&g(e,r.toUpperCase())):(D(r),null!=g&&g(e,r)):window.requestAnimationFrame(function(){return N(x.current)})},[C.current,h,I,M,T,w,b,v,N,D,g]),e=Se.useCallback(function(e){var t=e.currentTarget.value;o&&t===S&&(D(""),t=""),null!=c&&c(e,t),O.current&&window.cancelAnimationFrame(O.current)},[o,O.current,w,D,c]),z=Se.useCallback(function(e){x.current=_.start,D(S),null!=l&&l(e)},[D,w,N,p,l]),B=Se.useCallback(function(e){O.current=window.requestAnimationFrame(A),k||(x.current=_.start,D(w())),null!=u&&u(e)},[O.current,k,A,D,j,u]),K=Se.useMemo(function(){return ke({"d-flex flex-column flex-grow-1":!0},f)},[f]);return Se.createElement("div",{className:K,"data-test":"DesignSystem-InputMask--Wrapper"},Se.createElement(gn,Oe({},F,{value:k,error:i,required:R,onFocus:B,onChange:r,onClear:k===S?void 0:z,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],P(r)&&P(o)):P(t)),o=q(h,n);r&&s&&o&&(s(e,n),D(n))},autoComplete:"off",ref:E})),Se.createElement(Ms,{message:i?a:L,error:i}))}),Sn=(n.displayName="InputMask",n.utils={getDefaultValue:Zt},n),_n=["required","optional","withInput","disabled","children","className","info"],En=function(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,_n),e=De(e),r=ke((Ee(u={Label:!0},"Label--withInput",r),Ee(u,"Label--optional",n),u),a),u=ke({"Label-text":!0,"Label--disabled":o});return Se.createElement("div",Oe({"data-test":"DesignSystem-Label"},e,{className:r}),Se.createElement(we,Oe({"data-test":"DesignSystem-Label--Text",className:u,componentType:"label"},c),i,function(){return 0<arguments.length&&void 0!==arguments[0]&&arguments[0]?Se.createElement("span",{className:"Label-requiredIndicator","data-test":"DesignSystem-Label--RequiredIndicator"}):(1<arguments.length?arguments[1]:void 0)?Se.createElement(Ie,{"data-test":"DesignSystem-Label--OptionalText",appearance:"subtle",className:"Label-optionalText"},"(optional)"):null}(t,n),s&&Se.createElement(Da,{tooltip:s},Se.createElement(A,{"data-test":"DesignSystem-Label--Info",name:"info",size:12,appearance:"subtle",className:"ml-3 cursor-pointer d-flex align-items-center"}))))},On=(En.displayName="Label",["children","className","appearance","size","disabled"]),Cn=function(e){var t,n=e.children,r=e.className,o=e.appearance,i=e.size,a=e.disabled,e=W(e,On),i=ke((Ee(t={Link:!0},"Link--".concat(i),i),Ee(t,"Link--".concat(o),o),Ee(t,"Link--".concat(o,"-disabled"),a),t),r);return Se.createElement(we,Oe({"data-test":"DesignSystem-Link",className:i,componentType:"a",tabIndex:a?-1:0},e),n)},xn=(Cn.displayName="Link",Cn.defaultProps={appearance:"default",size:"regular",disabled:!1},Jt.displayName="Meta",function(e){var i=e.list,t=e.seperator,n=e.className,a=e.size,e=De(e),n=ke(Ee({},"MetaList",!0),n),s=ke(Ee({},"MetaList-seperator",!0)),r=ke((Ee(r={},"MetaList-seperator",!0),Ee(r,"MetaList-seperator--left",!0),r));return Se.createElement("div",Oe({"data-test":"DesignSystem-MetaList"},e,{className:n}),t&&Se.createElement(A,{"data-test":"DesignSystem-MetaList--Seperator",name:"fiber_manual_record",size:8,className:r,appearance:"disabled"}),i.map(function(e,t){var n=e.label,r=e.icon,e=e.iconType,o=t!==i.length-1;return Se.createElement("span",{key:t,className:"MetaList-item"},Se.createElement(Jt,{size:a,label:void 0===n?"":n,icon:r,iconType:e}),o&&Se.createElement(A,{"data-test":"DesignSystem-MetaList--rightSeperator",name:"fiber_manual_record",size:8,className:s,appearance:"disabled"}))}))});xn.displayName="MetaList",xn.defaultProps={seperatorAppearance:"disabled",iconAppearance:"subtle",labelAppearance:"subtle",size:"regular"};function kn(e,t,n,r){for(var o=t<n?1:-1,i=t;i!==n+o;i+=o)e[i]=r}var Dn=function(){e(i,Se["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 Ee(G(o=r.call.apply(r,[this].concat(t))),"state",{isHandleMoving:!1,isHandleHovered:!1}),Ee(G(o),"handleElement",null),Ee(G(o),"refHandlers",{handle:function(e){return o.handleElement=e}}),Ee(G(o),"mouseEventClientOffset",function(e){return e.clientX}),Ee(G(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}),Ee(G(o),"changeValue",function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:o.props.onChange,e=Qt(e,o.props.min,o.props.max);return isNaN(e)||o.props.value===e||t&&t(e),e}),Ee(G(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)}),Ee(G(o),"continueHandleMovement",function(e){var e=o.mouseEventClientOffset(e);o.state.isHandleMoving&&!o.props.disabled&&(e=o.clientToValue(e),o.changeValue(e))}),Ee(G(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))}),Ee(G(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()))}),Ee(G(o),"handleKeyUp",function(e){o.props.disabled||0<=[37,39].indexOf(e.keyCode)&&(e=o.props.onRelease)&&e(o.props.value)}),Ee(G(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}}),Ee(G(o),"handleMouseOver",function(){o.setState({isHandleHovered:!0})}),Ee(G(o),"handleMouseLeave",function(){o.setState({isHandleHovered:!1})}),Ee(G(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(Xt((r-t)*n)," - ").concat(e,"px)")},n=ke((Ee(t={},"Slider-handle",!0),Ee(t,"Slider-handle--disabled",o),Ee(t,"Slider-handle--active",s),Ee(t,"border-0",o),t)),s=ke((Ee(e={},"Slider-tooltip",!0),Ee(e,"Tooltip",!0),Ee(e,"d-none",!a),e));return Se.createElement(Se.Fragment,null,Se.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"}),Se.createElement("div",{className:s,style:r},i))}}]),i}(),n=function(){e(n,Se["Component"]);var t=h(n);function n(e){var p;return d(this,n),Ee(G(p=t.call(this,e)),"handleElements",[]),Ee(G(p),"trackElement",null),Ee(G(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}),Ee(G(p),"getOffsetRatio",function(e){return Qt((e-p.props.min)*p.state.tickSizeRatio,0,1)}),Ee(G(p),"addHandleRef",function(e){null!=e&&p.handleElements.push(e)}),Ee(G(p),"getHandleValues",function(e){e=Se.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}),Ee(G(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}))}),Ee(G(p),"getTrackFill",function(e,t){return void 0!==e.fillAfter?e.fillAfter:void 0!==t&&void 0!==t.fillBefore&&t.fillBefore}),Ee(G(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)}),Ee(G(p),"getLockedHandleIndex",function(e,t){var n=e<t?1:-1,e=e+n;return e!==t+n?e:-1}),Ee(G(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?(kn(n,t,i,n[i]),n):(kn(r,t,o,e),r)}),Ee(G(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])})}),Ee(G(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])}))}),Ee(G(p),"formatLabel",function(e){var t=p.props.labelRenderer,e=e.toFixed(p.state.labelPrecision);return"function"==typeof t?t(Number(e)):e}),Ee(G(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 Se.createElement(Dn,{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})})}),Ee(G(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:Xt(e)},t=!a&&-1!==u.indexOf(n.toFixed(p.state.labelPrecision)),r=ke((Ee(r={},"Slider-ticks",!0),Ee(r,"bg-dark",t),r));s.push(Se.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"},Se.createElement("span",{className:r}),!1!==i&&Se.createElement(Ie,{size:"small",appearance:t?"default":"disabled"},p.formatLabel(n))))}(l,f);return s}),Ee(G(p),"renderTrackFill",function(e,t,n){var r=Ce([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=_e({},{width:"".concat(100-r-o,"%")}),o=p.getTrackFill(t,n),n=ke((Ee(t={},"Slider-progress",!0),Ee(t,"Slider-progress--disabled",p.props.disabled),Ee(t,"Slider-progress--inRange",o),Ee(t,"Slider-progress--inRangeDisabled",o&&p.props.disabled),t));return Se.createElement("div",{key:"track-".concat(e),className:n,style:r})}),Ee(G(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}),Ee(G(p),"handleLabelMouseOver",function(e){p.setState({hoveredLabelValue:e})}),Ee(G(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=De(this.props),e=ke(Ee({},"Slider",!0),e),o=ke((Ee(o={},"Slider-wrapper",!0),Ee(o,"Slider-wrapper--disabled",this.props.disabled),o));return Se.createElement("div",Oe({},r,{className:e,"data-test":"DesignSystem-MultiSlider"}),n&&Se.createElement(En,{withInput:!0},n),Se.createElement("div",{className:o},Se.createElement("div",{className:"Slider-track",ref:function(e){return t.trackElement=e},onMouseDown:this.maybeHandleTrackClick,"data-test":"DesignSystem-MultiSlider-Slider-Track"},this.renderTracks()),Se.createElement("div",{className:"Slider-axis"},this.renderLabels()),this.renderHandles()))}}]),n}(),Tn=(Ee(n,"defaultProps",{labelStepSize:1,max:10,min:0,stepSize:1,labelRenderer:!0}),Ee(n,"Handle",function(){return null}),["children","className","onOutsideClick"]),In=Se.forwardRef(function(e,t){var n=e.children,r=e.className,o=e.onOutsideClick,e=W(e,Tn),i=Se.useRef(null),a=(Se.useImperativeHandle(t,function(){return i.current},[i]),Se.useEffect(function(){return document.addEventListener("click",a,!0),function(){document.removeEventListener("click",a)}},[]),Se.useCallback(function(e){var t=i;e.target&&t.current&&(t.current.contains(e.target)||o(e))},[])),t=ke(Ee({},"OutsideClick",!0),r);return Se.createElement("div",Oe({ref:i},e,{className:t}),n)}),jn=(In.displayName="OutsideClick",["appearance","children","className","color"]),Nn=function(e){var t,n=e.appearance,r=e.children,o=e.className,i=e.color,e=W(e,jn),n=ke((Ee(t={Text:!0},"Text--".concat(n),!i&&n),Ee(t,"color-".concat(i),i),t),o);return Se.createElement(we,Oe({"data-test":"DesignSystem-Paragraph"},e,{className:n,componentType:"p"}),r)},Mn=(Nn.displayName="Paragraph",Nn.defaultProps={appearance:"default"},["size","label","disabled","onChange","name","value","checked","defaultChecked","className","helpText","error"]),r=Se.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,Mn),d=Se.useRef(null),t=(Se.useImperativeHandle(t,function(){return d.current}),ke((Ee(t={},"Radio",!0),Ee(t,"Radio--disabled",o),t),l)),p=ke((Ee(l={},"Radio-wrapper",!0),Ee(l,"Radio-defaultWrapper",!p),Ee(l,"Radio-errorWrapper",p),Ee(l,"Radio-wrapper--".concat(n),n),l)),l=ke((Ee(l={},"Radio-outerWrapper",!0),Ee(l,"Radio-outerWrapper--".concat(n),n),l)),h=ke(Ee({},"Radio-Label",!0)),m="".concat(a,"-").concat(r,"-").concat(Ne());return Se.createElement("div",{className:t,"data-test":"DesignSystem-Radio"},Se.createElement("div",{className:l,"data-test":"DesignSystem-Radio-OuterWrapper"},Se.createElement("input",Oe({tabIndex:0},e,{type:"radio",disabled:o,checked:c,defaultChecked:u,ref:d,name:a,value:s,onChange:i,className:"Radio-input",id:m,"data-test":"DesignSystem-Radio-Input"})),Se.createElement("span",{"data-test":"DesignSystem-Radio-wrapper",className:p})),Se.createElement("div",{className:"Radio-labelWrapper"},r&&Se.createElement("label",{className:h,htmlFor:m,"data-test":"DesignSystem-Radio-Label"},Se.createElement(Ie,{size:"tiny"===n?"small":"regular",appearance:o?"disabled":"default"},r)),f&&Se.createElement(Ie,{"data-test":"DesignSystem-Radio-HelpText",size:"small",appearance:o?"disabled":"subtle"},f.trim())))}),An=(r.displayName="Radio",["className","children"]),Pn=Se.forwardRef(function(e,t){var n=e.className,r=e.children,e=W(e,An),n=ke(Ee({Row:!0},"".concat(n),n));return Se.createElement("div",Oe({"data-test":"DesignSystem-Row",ref:t},e,{className:n}),r)}),Rn=(Pn.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=De(e),s=ke(Ee({},"StatusHint",!0),s),t=ke((Ee(c={},"StatusHint-icon",!0),Ee(c,"StatusHint--".concat(t),t),c)),c=ke(Ee({},"ellipsis--noWrap",a));return Se.createElement("div",Oe({"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)}}),Se.createElement("span",{"data-test":"DesignSystem-StatusHint--Icon",className:t}),Se.createElement(Ie,{"data-test":"DesignSystem-StatusHint--Text",weight:"medium",className:c},n))}),Ln=(Rn.displayName="StatusHint",Rn.defaultProps={appearance:"default"},function(e){var t,n=e.appearance,r=e.children,o=e.subtle,i=e.className,e=De(e),n=ke((Ee(t={Pills:!0},"Badge--".concat(n),n&&!o),Ee(t,"Badge--subtle-".concat(n),o),t),i);return Se.createElement("span",Oe({"data-test":"DesignSystem-Pills"},e,{className:n}),r)}),Fn=(Ln.displayName="Pills",Ln.defaultProps={appearance:"secondary"},function(e){var t=e.appearance,n=e.size,r=e.className,e=De(e),n=ke(Ee({Spinner:!0},"Spinner--".concat(n),n),r),r=ke(Ee({Circle:!0},"Circle--".concat(t),t));return Se.createElement("svg",Oe({},e,{className:n},{viewBox:"0 0 50 50"}),Se.createElement("circle",Oe({className:r},{cx:25,cy:25,r:20,fill:"none",strokeMiterlimit:"10",strokeWidth:"4"})))}),zn=(Fn.displayName="Spinner",Fn.defaultProps={appearance:"primary",size:"medium"},_e(_e({},n.defaultProps),{},{defaultValue:0}),(r=o=o||{})[r.START=0]="START",r[r.END=1]="END",_e(_e({},n.defaultProps),{},{defaultValue:[0,10]}),["size","defaultChecked","disabled","onChange","name","value","className","appearance","checked"]),Bn=(Se.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,zn),f=Ce(Se.useState(void 0===l?o:l),2),p=f[0],d=f[1],f=(Se.useEffect(function(){void 0!==l&&d(l)},[l]),ke((Ee(f={},"Switch",!0),Ee(f,"Switch--disabled",i),Ee(f,"Switch--".concat(r),r),f),u)),r=ke((Ee(u={},"Switch-wrapper",!0),Ee(u,"Switch-wrapper--disabled",i),Ee(u,"Switch-wrapper--".concat(r),r),Ee(u,"Switch-wrapper--checked",p),Ee(u,"Switch-wrapper--checkedDisabled",p&&i),u));return Se.createElement("div",{className:f},Se.createElement("input",Oe({},e,{type:"checkbox",defaultChecked:o,disabled:i,onChange:n,checked:p,ref:t,name:s,value:c,className:"Switch-input",onKeyUp:n})),Se.createElement("span",{className:r}))}).displayName="Switch",["rows","resize","disabled","name","placeholder","value","defaultValue","required","error","onChange","onClick","onBlur","onFocus","className"]),o=Se.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,m=e.onFocus,g=e.className,e=W(e,Bn),o=ke((Ee(n={},"Textarea",!0),Ee(n,"Textarea--resize",o),Ee(n,"Textarea--error",f),n),g);return Se.createElement("textarea",Oe({"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:m}))});o.displayName="Textarea";function Kn(e){var t=or.call(e);return"[object Arguments]"===t||"[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Function]"===or.call(e.callee)}function Hn(){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 Un(){return Hn()&&!!Symbol.toStringTag}function Wn(e){try{return mr('"use strict"; return ('+e+").constructor;")()}catch(e){}}var qn,Vn,Gn,Yn,$n,Zn,Jn,Xn,Qn,er=ee(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})),tr=ee(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})),nr=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}),r=(ee(nr),t(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,nr(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),rr=ee(r),i=ee(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=ee(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})),or=Object.prototype.toString,o=(Object.keys||(qn=Object.prototype.hasOwnProperty,Vn=Object.prototype.toString,Gn=Kn,n=Object.prototype.propertyIsEnumerable,Yn=!n.call({toString:null},"toString"),$n=n.call(function(){},"prototype"),Zn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Jn=function(e){var t=e.constructor;return t&&t.prototype===e},Xn={$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},Qn=function(){if("undefined"!=typeof window)for(var e in window)try{if(!Xn["$"+e]&&qn.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{Jn(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]"===Vn.call(e),r=Gn(e),o=t&&"[object String]"===Vn.call(e),i=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=$n&&n;if(o&&0<e.length&&!qn.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||!qn.call(e,u)||i.push(String(u));if(Yn)for(var l=function(e){if("undefined"==typeof window||!Qn)return Jn(e);try{return Jn(e)}catch(e){return!1}}(e),f=0;f<Zn.length;++f)l&&"constructor"===Zn[f]||!qn.call(e,Zn[f])||i.push(Zn[f]);return i}),c),ir=Array.prototype.slice,ar=Object.keys,sr=ar?function(e){return ar(e)}:o,cr=Object.keys,ur=(sr.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return Kn(e)?cr(ir.call(e)):cr(e)}):Object.keys=sr,Object.keys||sr},sr),r="undefined"!=typeof Symbol&&Symbol,lr=Array.prototype.slice,fr=Object.prototype.toString,pr=Function.prototype.bind||function(t){var n=this;if("function"!=typeof n||"[object Function]"!==fr.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,e,o=lr.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(lr.call(arguments))),Object(e)===e?e:this):n.apply(t,o.concat(lr.call(arguments)))}),n.prototype&&((e=function(){}).prototype=n.prototype,r.prototype=new e,e.prototype=null),r},dr=pr.call(Function.call,Object.prototype.hasOwnProperty),hr=SyntaxError,mr=Function,gr=TypeError,yr=Object.getOwnPropertyDescriptor;if(yr)try{yr({},"")}catch(xi){yr=null}function vr(){throw new gr}function br(e,t){if("string"!=typeof e||0===e.length)throw new gr("intrinsic name must be a non-empty string");if(1<arguments.length&&"boolean"!=typeof t)throw new gr('"allowMissing" argument must be a boolean');var n=function(e){var t=Br(e,0,1),n=Br(e,-1);if("%"===t&&"%"!==n)throw new hr("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new hr("invalid intrinsic syntax, expected opening `%`");var o=[];return zr(e,Kr,function(e,t,n,r){o[o.length]=n?zr(r,Hr,"$1"):t||e}),o}(e),r=0<n.length?n[0]:"",o=function(e,t){var n,r=e;if(dr(Rr,r)&&(r="%"+(n=Rr[r])[0]+"%"),dr(Ar,r)){var o=Ar[r];if(void 0!==(o=o===Mr?Pr(r):o)||t)return{alias:n,name:r,value:o};throw new gr("intrinsic "+e+" exists, but is not available. Please file an issue!")}throw new hr("intrinsic "+e+" does not exist!")}("%"+r+"%",t),i=(o.name,o.value),a=!1;(o=o.alias)&&(r=o[0],Fr(n,Lr([0,1],o)));for(var s=1,c=!0;s<n.length;s+=1){var u=n[s],l=Br(u,0,1),f=Br(u,-1);if(('"'===l||"'"===l||"`"===l||'"'===f||"'"===f||"`"===f)&&l!==f)throw new hr("property names with quotes must have matching quotes");if("constructor"!==u&&c||(a=!0),dr(Ar,l="%"+(r+="."+u)+"%"))i=Ar[l];else if(null!=i){if(!(u in i)){if(t)return;throw new gr("base intrinsic for "+e+" exists, but the property is not available.")}i=yr&&s+1>=n.length?(c=!!(f=yr(i,u)))&&"get"in f&&!("originalValue"in f.get)?f.get:i[u]:(c=dr(i,u),i[u]),c&&!a&&(Ar[l]=i)}}return i}function wr(e,t){return"function"==typeof(t=br(e,!!t))&&-1<Wr(e,".prototype.")?Ur(t):t}function Sr(e){return!(qr&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===Vr(e)}function _r(e){return!!Sr(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Array]"!==Vr(e)&&"[object Function]"===Vr(e.callee)}function Er(e,t){var n=2<arguments.length?arguments[2]:{},r=ur(t);Yr&&(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&&(!Xr(s)||!s())||(Qr?Jr(o,i,{configurable:!0,enumerable:!1,value:a,writable:!0}):o[i]=a)}function Or(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!to(e)||!to(t))}function Cr(){return"function"==typeof Object.is?Object.is:Or}function xr(){if(null!=this&&this!==ao(this))throw new so("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 kr(){if(!co)throw new lo("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=uo(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return xr}var Dr,Tr,Ir,jr,n=yr?function(){try{return vr}catch(e){try{return yr(arguments,"callee").get}catch(e){return vr}}}():vr,c="function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&Hn(),Nr=Object.getPrototypeOf||function(e){return e.__proto__},Mr={},o="undefined"==typeof Uint8Array?u:Nr(Uint8Array),Ar={"%AggregateError%":"undefined"==typeof AggregateError?u:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?u:ArrayBuffer,"%ArrayIteratorPrototype%":c?Nr([][Symbol.iterator]()):u,"%AsyncFromSyncIteratorPrototype%":u,"%AsyncFunction%":Mr,"%AsyncGenerator%":Mr,"%AsyncGeneratorFunction%":Mr,"%AsyncIteratorPrototype%":Mr,"%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%":mr,"%GeneratorFunction%":Mr,"%Int8Array%":"undefined"==typeof Int8Array?u:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?u:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?u:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c?Nr(Nr([][Symbol.iterator]())):u,"%JSON%":"object"==typeof JSON?JSON:u,"%Map%":"undefined"==typeof Map?u:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c?Nr((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?Nr((new Set)[Symbol.iterator]()):u,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?u:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c?Nr(""[Symbol.iterator]()):u,"%Symbol%":c?Symbol:u,"%SyntaxError%":hr,"%ThrowTypeError%":n,"%TypedArray%":o,"%TypeError%":gr,"%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},Pr=function e(t){var n,r;return"%AsyncFunction%"===t?n=Wn("async function () {}"):"%GeneratorFunction%"===t?n=Wn("function* () {}"):"%AsyncGeneratorFunction%"===t?n=Wn("async function* () {}"):"%AsyncGenerator%"===t?(r=e("%AsyncGeneratorFunction%"))&&(n=r.prototype):"%AsyncIteratorPrototype%"===t&&(r=e("%AsyncGenerator%"))&&(n=Nr(r.prototype)),Ar[t]=n},Rr={"%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"]},Lr=pr.call(Function.call,Array.prototype.concat),Fr=pr.call(Function.apply,Array.prototype.splice),zr=pr.call(Function.call,String.prototype.replace),Br=pr.call(Function.call,String.prototype.slice),Kr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Hr=/\\(\\)?/g,Ur=t(function(e){var t=br("%Function.prototype.apply%"),n=br("%Function.prototype.call%"),r=br("%Reflect.apply%",!0)||pr.call(n,t),o=br("%Object.getOwnPropertyDescriptor%",!0),i=br("%Object.defineProperty%",!0),a=br("%Math.max%");if(i)try{i({},"a",{value:1})}catch(e){i=null}e.exports=function(e){var t=r(pr,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(pr,t,arguments)}i?i(e.exports,"apply",{value:s}):e.exports.apply=s}),Wr=(Ur.apply,Ur(br("String.prototype.indexOf"))),qr=Un(),Vr=wr("Object.prototype.toString"),r=function(){return Sr(arguments)}(),Gr=(Sr.isLegacyArguments=_r,r?Sr:_r),Yr="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),$r=Object.prototype.toString,Zr=Array.prototype.concat,Jr=Object.defineProperty,Xr=function(e){return"function"==typeof e&&"[object Function]"===$r.call(e)},Qr=Jr&&function(){var e={};try{for(var t in Jr(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),eo=(Er.supportsDescriptors=!!Qr,Er),to=function(e){return e!=e},c=Ur(Cr(),Object),no=(eo(c,{getPolyfill:Cr,implementation:Or,shim:function(){var e=Cr();return eo(Object,{is:e},{is:function(){return Object.is!==e}}),e}}),c),n=Un(),ro=(n&&(Dr=wr("Object.prototype.hasOwnProperty"),Tr=wr("RegExp.prototype.exec"),Ir={},jr={toString:o=function(){throw Ir},valueOf:o},"symbol"==typeof Symbol.toPrimitive)&&(jr[Symbol.toPrimitive]=o),wr("Object.prototype.toString")),oo=Object.getOwnPropertyDescriptor,io=n?function(e){if(!e||"object"!=typeof e)return!1;var t=oo(e,"lastIndex");if(!(t&&Dr(t,"value")))return!1;try{Tr(e,jr)}catch(e){return e===Ir}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===ro(e)},ao=Object,so=TypeError,co=eo.supportsDescriptors,uo=Object.getOwnPropertyDescriptor,lo=TypeError,fo=eo.supportsDescriptors,po=Object.getOwnPropertyDescriptor,ho=Object.defineProperty,mo=TypeError,go=Object.getPrototypeOf,yo=/a/,u=Ur(xr),vo=(eo(u,{getPolyfill:kr,implementation:xr,shim:function(){var e,t,n;if(fo&&go)return e=kr(),t=go(yo),(n=po(t,"flags"))&&n.get===e||ho(t,"flags",{configurable:!0,enumerable:!1,get:e}),e;throw new mo("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors")}}),u),bo=Date.prototype.getDay,wo=Object.prototype.toString,So=Un(),_o=function(e){if("object"!=typeof e||null===e)return!1;if(!So)return"[object Date]"===wo.call(e);try{return bo.call(e),!0}catch(e){return!1}},Eo=Date.prototype.getTime;function Oo(e,t,n){n=n||{};if(n.strict?!no(e,t):e!==t){if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return n.strict?no(e,t):e==t;var r,o,i=e,a=t,s=n;if(typeof i!=typeof a)return!1;if(Co(i)||Co(a))return!1;if(i.prototype!==a.prototype)return!1;if(Gr(i)!==Gr(a))return!1;e=io(i),t=io(a);if(e!==t)return!1;if(e||t)return i.source===a.source&&vo(i)===vo(a);if(_o(i)&&_o(a))return Eo.call(i)===Eo.call(a);if(e=xo(i),t=xo(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=ur(i),u=ur(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],!Oo(i[o],a[o],s))return!1}}return!0}function Co(e){return null==e}function xo(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 ko=Oo,Do="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,To=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(Do&&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 Oo=Eo&&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()},Co))}};function xo(e){return e&&"[object Function]"==={}.toString.call(e)}function ko(e,t){return 1!==e.nodeType?[]:(e=e.ownerDocument.defaultView.getComputedStyle(e,null),t?e[t]:e)}function Do(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function To(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=ko(e),n=t.overflow,r=t.overflowX,t=t.overflowY;return/(auto|scroll|overlay)/.test(n+t+r)?e:To(Do(e))}function jo(e){return e&&e.referenceNode?e.referenceNode:e}var Io=Eo&&!(!window.MSInputMethodContext||!document.documentMode),Mo=Eo&&/MSIE 10/.test(navigator.userAgent);function No(e){return 11===e?Io:10!==e&&Io||Mo}function Po(e){if(!e)return document.documentElement;for(var t=No(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"===ko(n,"position")?Po(n):n:(e?e.ownerDocument:document).documentElement}function Ao(e){return null!==e.parentNode?Ao(e.parentNode):e}function Ro(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&&Po(r.firstElementChild)!==r?Po(n):n:(o=Ao(e)).host?Ro(o.host,t):Ro(e,Ao(t).host)):document.documentElement}function Lo(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 Fo(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 zo(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],No(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function Bo(e){var t=e.body,e=e.documentElement,n=No(10)&&getComputedStyle(e);return{height:zo("Height",t,e,n),width:zo("Width",t,e,n)}}o=function(e,t,n){return t&&Ko(e.prototype,t),n&&Ko(e,n),e};function Ko(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 Ho(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 Uo(e){return g({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Wo(e){var t={};try{No(10)?(t=e.getBoundingClientRect(),n=Lo(e,"top"),r=Lo(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?Bo(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-=Fo(e=ko(e),"x"),r-=Fo(e,"y"),n.width-=t,n.height-=r),Uo(n)}function qo(e,t,n){var n=2<arguments.length&&void 0!==n&&n,r=No(10),o="HTML"===t.nodeName,i=Wo(e),a=Wo(t),e=To(e),s=ko(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)),Uo({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=Lo(t,"top"),t=Lo(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 Vo(e){if(!e||!e.parentElement||No())return document.documentElement;for(var t=e.parentElement;t&&"none"===ko(t,"transform");)t=t.parentElement;return t||document.documentElement}function Go(e,t,n,r,o){var i,o=4<arguments.length&&void 0!==o&&o,a={top:0,left:0},s=o?Vo(e):Ro(e,jo(t)),s=("viewport"===r?a=function(e,t){var t=1<arguments.length&&void 0!==t&&t,n=e.ownerDocument.documentElement,e=qo(e,n),r=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),i=t?0:Lo(n),t=t?0:Lo(n,"left");return Uo({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=To(Do(t))).nodeName&&(i=e.ownerDocument.documentElement):i="window"===r?e.ownerDocument.documentElement:r,t=qo(i,s,o),"HTML"!==i.nodeName||function e(t){var n=t.nodeName;return"BODY"!==n&&"HTML"!==n&&("fixed"===ko(t,"position")||!!(n=Do(t))&&e(n))}(s)?a=t:(o=(r=Bo(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 Yo(e,t,n,r,o,i){var a,i=5<arguments.length&&void 0!==i?i:0;return-1===e.indexOf("auto")?e:(r=Go(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 $o(e,t,n,r){r=3<arguments.length&&void 0!==r?r:null;return qo(n,r?Vo(t):Ro(t,jo(n)),r)}function Zo(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 Jo(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 Xo(e,t,n){n=n.split("-")[0];var e=Zo(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[Jo(a)],r}function Qo(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function ei(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=Qo(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&&xo(t)&&(n.offsets.popper=Uo(n.offsets.popper),n.offsets.reference=Uo(n.offsets.reference),n=t(n,e))}),n}function ti(e,n){return e.some(function(e){var t=e.name;return e.enabled&&t===n})}function ni(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 ri(e){e=e.ownerDocument;return e?e.defaultView:window}function oi(e,t,n,r){n.updateBound=r,ri(e).addEventListener("resize",n.updateBound,{passive:!0});r=To(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(To(t.parentNode),n,r,o),o.push(t)}(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function ii(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,ri(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 ai(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function si(n,r){Object.keys(r).forEach(function(e){var t="";-1!==["width","height","top","right","bottom","left"].indexOf(e)&&ai(r[e])&&(t="px"),n.style[e]=r[e]+t})}function ci(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 ui=Eo&&/Firefox/i.test(navigator.userAgent);function li(e,t,n){var r,o=Qo(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"],fi=c.slice(3);function pi(e,t){t=1<arguments.length&&void 0!==t&&t,e=fi.indexOf(e),e=fi.slice(e+1).concat(fi.slice(0,e));return t?e.reverse():e}var di="flip",hi="clockwise",yi="counterclockwise";function mi(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(Qo(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("%")?Uo("%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){ai(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:Ho({},i=i?"left":"top",t[i]),end:Ho({},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=ai(+t)?[+t,0]:mi(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||Po(e.instance.popper),n=(e.instance.reference===t&&(t=Po(t)),ni("transform")),o=e.instance.popper.style,i=o.top,a=o.left,s=o[n],c=(o.top="",o.left="",o[n]="",Go(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])),Ho({},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))),Ho({},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(li(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=Zo(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=Uo(e.offsets.popper),r[s]+r[i]/2-u/2),r=ko(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=(Ho(n={},s,Math.round(a)),Ho(n,c,""),n)}return e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(u,l){if(!(ti(u.instance.modifiers,"inner")||u.flipped&&u.placement===u.originalPlacement)){var f=Go(u.instance.popper,u.instance.reference,l.padding,l.boundariesElement,u.positionFixed),p=u.placement.split("-")[0],d=Jo(p),h=u.placement.split("-")[1]||"",y=[];switch(l.behavior){case di:y=[p,d];break;case hi:y=pi(p);break;case yi:y=pi(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=Jo(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,Xo(u.instance.popper,u.offsets.reference,u.placement)),u=ei(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=Jo(t),e.offsets.popper=Uo(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(li(e.instance.modifiers,"hide","preventOverflow")){var t=e.offsets.reference,n=Qo(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=Qo(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=Wo(t=Po(e.instance.popper)),o={position:o.position},s=ci(e,window.devicePixelRatio<2||!ui),n="bottom"===n?"top":"bottom",r="right"===r?"left":"right",c=ni("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 si(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&&si(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){return o=$o(o,t,e,n.positionFixed),o=Yo(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding),t.setAttribute("x-placement",o),si(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},o(gi,[{key:"update",value:function(){return function(){var e;this.state.isDestroyed||((e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}}).offsets.reference=$o(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=Yo(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=Xo(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=ei(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,ti(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[ni("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=oi(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return ii.call(this)}}]),r=gi;function gi(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=this,i=gi;if(!(o instanceof i))throw new TypeError("Cannot call a class as a function");this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=Oo(this.update.bind(this)),this.options=g({},gi.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({},gi.Defaults.modifiers,r.modifiers)).forEach(function(e){n.options.modifiers[e]=g({},gi.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&&xo(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 vi=r,u="function"==typeof Symbol&&Symbol.for,bi=u?Symbol.for("react.element"):60103,wi=u?Symbol.for("react.portal"):60106,Si=u?Symbol.for("react.fragment"):60107,_i=u?Symbol.for("react.strict_mode"):60108,Ei=u?Symbol.for("react.profiler"):60114,Ci=u?Symbol.for("react.provider"):60109,Oi=u?Symbol.for("react.context"):60110,xi=u?Symbol.for("react.async_mode"):60111,ki=u?Symbol.for("react.concurrent_mode"):60111,Di=u?Symbol.for("react.forward_ref"):60112,Ti=u?Symbol.for("react.suspense"):60113,ji=u?Symbol.for("react.suspense_list"):60120,Ii=u?Symbol.for("react.memo"):60115,Mi=u?Symbol.for("react.lazy"):60116,Ni=u?Symbol.for("react.block"):60121,Pi=u?Symbol.for("react.fundamental"):60117,Ai=u?Symbol.for("react.responder"):60118,Ri=u?Symbol.for("react.scope"):60119;
|
|
30
|
+
*/var Io=Do&&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()},To))}};function jo(e){return e&&"[object Function]"==={}.toString.call(e)}function No(e,t){return 1!==e.nodeType?[]:(e=e.ownerDocument.defaultView.getComputedStyle(e,null),t?e[t]:e)}function Mo(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function Ao(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=No(e),n=t.overflow,r=t.overflowX,t=t.overflowY;return/(auto|scroll|overlay)/.test(n+t+r)?e:Ao(Mo(e))}function Po(e){return e&&e.referenceNode?e.referenceNode:e}var Ro=Do&&!(!window.MSInputMethodContext||!document.documentMode),Lo=Do&&/MSIE 10/.test(navigator.userAgent);function Fo(e){return 11===e?Ro:10!==e&&Ro||Lo}function zo(e){if(!e)return document.documentElement;for(var t=Fo(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"===No(n,"position")?zo(n):n:(e?e.ownerDocument:document).documentElement}function Bo(e){return null!==e.parentNode?Bo(e.parentNode):e}function Ko(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&&zo(r.firstElementChild)!==r?zo(n):n:(o=Bo(e)).host?Ko(o.host,t):Ko(e,Bo(t).host)):document.documentElement}function Ho(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 Uo(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 Wo(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],Fo(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function qo(e){var t=e.body,e=e.documentElement,n=Fo(10)&&getComputedStyle(e);return{height:Wo("Height",t,e,n),width:Wo("Width",t,e,n)}}r=function(e,t,n){return t&&Vo(e.prototype,t),n&&Vo(e,n),e};function Vo(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 Go(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=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 Yo(e){return y({},e,{right:e.left+e.width,bottom:e.top+e.height})}function $o(e){var t={};try{Fo(10)?(t=e.getBoundingClientRect(),n=Ho(e,"top"),r=Ho(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?qo(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-=Uo(e=No(e),"x"),r-=Uo(e,"y"),n.width-=t,n.height-=r),Yo(n)}function Zo(e,t,n){var n=2<arguments.length&&void 0!==n&&n,r=Fo(10),o="HTML"===t.nodeName,i=$o(e),a=$o(t),e=Ao(e),s=No(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)),Yo({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=Ho(t,"top"),t=Ho(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 Jo(e){if(!e||!e.parentElement||Fo())return document.documentElement;for(var t=e.parentElement;t&&"none"===No(t,"transform");)t=t.parentElement;return t||document.documentElement}function Xo(e,t,n,r,o){var i,o=4<arguments.length&&void 0!==o&&o,a={top:0,left:0},s=o?Jo(e):Ko(e,Po(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:Ho(n),t=t?0:Ho(n,"left");return Yo({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=Ao(Mo(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"===No(t,"position")||!!(n=Mo(t))&&e(n))}(s)?a=t:(o=(r=qo(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 Qo(e,t,n,r,o,i){var a,i=5<arguments.length&&void 0!==i?i:0;return-1===e.indexOf("auto")?e:(r=Xo(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 y({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 ei(e,t,n,r){r=3<arguments.length&&void 0!==r?r:null;return Zo(n,r?Jo(t):Ko(t,Po(n)),r)}function ti(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 ni(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 ri(e,t,n){n=n.split("-")[0];var e=ti(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[ni(a)],r}function oi(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function ii(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=oi(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&&jo(t)&&(n.offsets.popper=Yo(n.offsets.popper),n.offsets.reference=Yo(n.offsets.reference),n=t(n,e))}),n}function ai(e,n){return e.some(function(e){var t=e.name;return e.enabled&&t===n})}function si(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 ci(e){e=e.ownerDocument;return e?e.defaultView:window}function ui(e,t,n,r){n.updateBound=r,ci(e).addEventListener("resize",n.updateBound,{passive:!0});r=Ao(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(Ao(t.parentNode),n,r,o),o.push(t)}(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function li(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,ci(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 fi(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function pi(n,r){Object.keys(r).forEach(function(e){var t="";-1!==["width","height","top","right","bottom","left"].indexOf(e)&&fi(r[e])&&(t="px"),n.style[e]=r[e]+t})}function di(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 hi=Do&&/Firefox/i.test(navigator.userAgent);function mi(e,t,n){var r,o=oi(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"],gi=c.slice(3);function yi(e,t){t=1<arguments.length&&void 0!==t&&t,e=gi.indexOf(e),e=gi.slice(e+1).concat(gi.slice(0,e));return t?e.reverse():e}var vi="flip",bi="clockwise",wi="counterclockwise";function Si(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(oi(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("%")?Yo("%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){fi(e)&&(o[r]+=e*("-"===n[t-1]?-1:1))})}),o}o={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:Go({},i=i?"left":"top",t[i]),end:Go({},i,t[i]+t[r]-n[r])},e.offsets.popper=y({},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=fi(+t)?[+t,0]:Si(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||zo(e.instance.popper),n=(e.instance.reference===t&&(t=zo(t)),si("transform")),o=e.instance.popper.style,i=o.top,a=o.left,s=o[n],c=(o.top="",o.left="",o[n]="",Xo(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])),Go({},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))),Go({},t,n)}};return t.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=y({},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(mi(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=ti(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=Yo(e.offsets.popper),r[s]+r[i]/2-u/2),r=No(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=(Go(n={},s,Math.round(a)),Go(n,c,""),n)}return e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(u,l){if(!(ai(u.instance.modifiers,"inner")||u.flipped&&u.placement===u.originalPlacement)){var f=Xo(u.instance.popper,u.instance.reference,l.padding,l.boundariesElement,u.positionFixed),p=u.placement.split("-")[0],d=ni(p),h=u.placement.split("-")[1]||"",m=[];switch(l.behavior){case vi:m=[p,d];break;case bi:m=yi(p);break;case wi:m=yi(p,!0);break;default:m=l.behavior}m.forEach(function(e,t){if(p!==e||m.length===t+1)return u;p=u.placement.split("-")[0],d=ni(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=m[t+1]),o&&(h="end"===(e=h)?"start":"start"===e?"end":e),u.placement=p+(h?"-"+h:""),u.offsets.popper=y({},u.offsets.popper,ri(u.instance.popper,u.offsets.reference,u.placement)),u=ii(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=ni(t),e.offsets.popper=Yo(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(mi(e.instance.modifiers,"hide","preventOverflow")){var t=e.offsets.reference,n=oi(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=oi(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=$o(t=zo(e.instance.popper)),o={position:o.position},s=di(e,window.devicePixelRatio<2||!hi),n="bottom"===n?"top":"bottom",r="right"===r?"left":"right",c=si("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=y({},a,e.attributes),e.styles=y({},o,e.styles),e.arrowStyles=y({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return pi(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&&pi(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){return o=ei(o,t,e,n.positionFixed),o=Qo(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding),t.setAttribute("x-placement",o),pi(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},r(_i,[{key:"update",value:function(){return function(){var e;this.state.isDestroyed||((e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}}).offsets.reference=ei(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=Qo(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=ri(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=ii(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,ai(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[si("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=ui(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return li.call(this)}}]),n=_i;function _i(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=this,i=_i;if(!(o instanceof i))throw new TypeError("Cannot call a class as a function");this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=Io(this.update.bind(this)),this.options=y({},_i.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(y({},_i.Defaults.modifiers,r.modifiers)).forEach(function(e){n.options.modifiers[e]=y({},_i.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return y({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&jo(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}n.Utils=("undefined"!=typeof window?window:p).PopperUtils,n.placements=c,n.Defaults=o;var Ei=n,u="function"==typeof Symbol&&Symbol.for,Oi=u?Symbol.for("react.element"):60103,Ci=u?Symbol.for("react.portal"):60106,xi=u?Symbol.for("react.fragment"):60107,ki=u?Symbol.for("react.strict_mode"):60108,Di=u?Symbol.for("react.profiler"):60114,Ti=u?Symbol.for("react.provider"):60109,Ii=u?Symbol.for("react.context"):60110,ji=u?Symbol.for("react.async_mode"):60111,Ni=u?Symbol.for("react.concurrent_mode"):60111,Mi=u?Symbol.for("react.forward_ref"):60112,Ai=u?Symbol.for("react.suspense"):60113,Pi=u?Symbol.for("react.suspense_list"):60120,Ri=u?Symbol.for("react.memo"):60115,Li=u?Symbol.for("react.lazy"):60116,Fi=u?Symbol.for("react.block"):60121,zi=u?Symbol.for("react.fundamental"):60117,Bi=u?Symbol.for("react.responder"):60118,Ki=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 bi:switch(e=e.type){case xi:case ki:case Si:case Ei:case _i:case Ti:return e;default:switch(e=e&&e.$$typeof){case Oi:case Di:case Mi:case Ii:case Ci:return e;default:return t}}case wi:return t}}}function Li(e){return l(e)===ki}var Fi={AsyncMode:xi,ConcurrentMode:ki,ContextConsumer:Oi,ContextProvider:Ci,Element:bi,ForwardRef:Di,Fragment:Si,Lazy:Mi,Memo:Ii,Portal:wi,Profiler:Ei,StrictMode:_i,Suspense:Ti,isAsyncMode:function(e){return Li(e)||l(e)===xi},isConcurrentMode:Li,isContextConsumer:function(e){return l(e)===Oi},isContextProvider:function(e){return l(e)===Ci},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===bi},isForwardRef:function(e){return l(e)===Di},isFragment:function(e){return l(e)===Si},isLazy:function(e){return l(e)===Mi},isMemo:function(e){return l(e)===Ii},isPortal:function(e){return l(e)===wi},isProfiler:function(e){return l(e)===Ei},isStrictMode:function(e){return l(e)===_i},isSuspense:function(e){return l(e)===Ti},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===Si||e===ki||e===Ei||e===_i||e===Ti||e===ji||"object"==typeof e&&null!==e&&(e.$$typeof===Mi||e.$$typeof===Ii||e.$$typeof===Ci||e.$$typeof===Oi||e.$$typeof===Di||e.$$typeof===Pi||e.$$typeof===Ai||e.$$typeof===Ri||e.$$typeof===Ni)},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=Fi}),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 zi(){}function Bi(){}Function.call.bind(Object.prototype.hasOwnProperty),Bi.resetWarningCache=zi;function Ki(){return Q[qi]=(Q[qi]||0)+1}function Hi(e){return Array.isArray(e)?e[0]:e}function Ui(e,t){if("function"==typeof e)return Ji(e,t);null!=e&&(e.current=t)}var Wi=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:Bi,resetWarningCache:zi}).PropTypes=e}),qi="__global_unique_id__",Vi=function(){},Gi=t(function(e,t){t.__esModule=!0,n(m.a);var l=n(Wi),f=n(Ki);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(Vi);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=(ee(Gi),t(function(e,t){t.__esModule=!0;var n=o(m.a),r=o(Gi);function o(e){return e&&e.__esModule?e:{default:e}}t.default=n.default.createContext||r.default,e.exports=t.default})),c=ee(p),Yi=c(),$i=c(),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)),"referenceNode",void 0),s(i(i(t)),"setReferenceNode",function(e){e&&t.referenceNode!==e&&(t.referenceNode=e,t.forceUpdate())}),t}Xn(e,o);var t=e.prototype;return t.componentWillUnmount=function(){this.referenceNode=null},t.render=function(){return Se.createElement(Yi.Provider,{value:this.referenceNode},Se.createElement($i.Provider,{value:this.setReferenceNode},this.props.children))},e}(Se.Component),Ji=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)}},Xi={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},Qi={},ea=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&&(Ui(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:Zn({},n.props.modifiers,{arrow:Zn({},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?Zn({position:n.state.data.offsets.popper.position},n.state.data.styles):Xi}),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:Qi}),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 vi(t,e,n.getOptions()))}),s(i(i(n)),"scheduleUpdate",function(){n.popperInstance&&n.popperInstance.scheduleUpdate()}),n}Xn(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&&_o(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(){Ui(this.props.innerRef,null),this.destroyPopperInstance()},t.render=function(){return Hi(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}(Se.Component);function ta(e){var t=e.referenceElement,n=$n(e,["referenceElement"]);return Se.createElement(Yi.Consumer,null,function(e){return Se.createElement(ea,Zn({referenceElement:void 0!==t?t:e},n))})}s(ea,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1}),vi.placements;var na=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){Ui(t.props.innerRef,e),Ji(t.props.setReferenceNode,e)}),t}Xn(e,o);var t=e.prototype;return t.componentWillUnmount=function(){Ui(this.props.innerRef,null)},t.render=function(){return Vi(Boolean(this.props.setReferenceNode)),Hi(this.props.children)({ref:this.refHandler})},e}(Se.Component);function ra(t){return Se.createElement($i.Consumer,null,function(e){return Se.createElement(na,Zn({setReferenceNode:e},t))})}function oa(e){var n=e.open,t=e.className,r=e.children,o=e.actions,e=De(e),t=ke({OverlayFooter:!0},t),i=Se.createRef();return Se.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?Se.createElement("div",Ce({ref:i},e,{className:t}),o.map(function(e,t){e.label;e=W(e,Ca);return Se.createElement(Te,Ce({type:"button"},e,{key:t}))})):Se.createElement("div",Ce({"data-test":"DesignSystem-OverlayFooter",ref:i},e,{className:t}),r)}function ia(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=De(e),t=ke(Ee({OverlayHeader:!0},"OverlayHeader--withBackButton",o||i),t),u=ke((Ee(u={},"OverlayHeader-subheading",!0),Ee(u,"OverlayHeader-subheading--withBackButton",o||i),u));return Se.createElement("div",Ce({"data-test":"DesignSystem-OverlayHeader"},e,{className:t}),Se.createElement("div",{className:"OverlayHeader-headerWrapper"},(o||i)&&Se.createElement(Te,{"data-test":"DesignSystem-OverlayHeader--Button",appearance:"transparent",className:"mr-4",icon:"arrow_back",largeIcon:!0,onClick:s||a}),n&&Se.createElement(cn,{className:c,"data-test":"DesignSystem-OverlayHeader--heading"},n)),r&&Se.createElement(je,{"data-test":"DesignSystem-OverlayHeader--Subheading",appearance:"subtle",className:u},r))}function aa(e){var t=e.children,n=e.className,e=De(e),n=ke({OverlayBody:!0},n);return Se.createElement("div",Ce({"data-test":"DesignSystem-OverlayBody"},e,{className:n}),t)}function sa(){var e=document.querySelector(".Overlay-wrapper");return null===e&&((e=document.createElement("div")).classList.add("Overlay-wrapper"),document.body.appendChild(e)),e}function ca(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 ua(e,t,n){"Escape"===e.key&&t&&(n(e),e.preventDefault())}function la(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=De(e),c=Oe(Se.useState(e.page),2),u=c[0],l=c[1],f=(c=Oe(Se.useState(!1),2))[0],p=c[1],d=(c=Oe(Se.useState(0),2))[0],h=c[1],y=Se.useCallback(Ft(a,o),[d]),a=(Se.useEffect(function(){l(e.page)},[e.page]),ke((Ee(c={},"Pagination",!0),Ee(c,"Pagination--".concat(n),n),c),i)),d=ke((Ee(o={},"Pagination-buttonWrapper",!0),Ee(o,"Pagination-buttonWrapper--next",!0),o)),i=ke((Ee(c={},"Pagination-buttonWrapper",!0),Ee(c,"Pagination-buttonWrapper--previous",!0),c));return Se.useEffect(function(){f&&(1<=u&&u<=r?y(u):(y.cancel(),h(function(e){return e+1})))},[u]),Se.createElement("div",Ce({"data-test":"DesignSystem-Pagination"},s,{className:a}),Se.createElement("div",{className:i},Se.createElement(Te,{onClick:function(){return t("first")},disabled:u<=1,appearance:"transparent",icon:"first_page","data-test":"DesignSystem-Pagination--FirstButton"}),Se.createElement(Te,{onClick:function(){return t("prev")},disabled:u<=1,icon:"navigate_before","data-test":"DesignSystem-Pagination--PrevButton",className:"ml-4 mr-3"})),"jump"===n&&Se.createElement("div",{className:"Pagination-pageIndex"},Se.createElement(yn,{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()}}),Se.createElement(je,null," of ".concat(r," pages"))),Se.createElement("div",{className:d},Se.createElement(Te,{onClick:function(){return t("next")},disabled:r<=u,icon:"navigate_next","data-test":"DesignSystem-Pagination--NextButton",className:"mr-4 ml-3"}),Se.createElement(Te,{onClick:function(){return t("last")},disabled:r<=u,appearance:"transparent",icon:"last_page","data-test":"DesignSystem-Pagination--LastButton"})))}function fa(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=pe(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=pe(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=pe(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=pe(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 q(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=V[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 Se.createElement(jn,{"data-test":"DesignSystem-DateRangePicker-InputTrigger"},Se.createElement(x,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--startDate"},E&&Se.createElement(Vt,{required:u.required,withInput:!0},E),Se.createElement(gn,Ce({icon:"events",placeholder:c},u,{mask:v,value:h?O(c,h):e?gn.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}))),Se.createElement(x,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--endDate"},C&&Se.createElement(Vt,{required:l.required,withInput:!0},C),Se.createElement(gn,Ce({icon:"events",placeholder:c},l,{mask:v,value:y?O(c,y):e?gn.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 pa(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=J[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=gn.utils.getDefaultValue(r,h).split(" - "),m=p||y[0],y=d||y[1];return Se.createElement(jn,{"data-test":"DesignSystem-DateRangePicker-SingleInputTrigger"},Se.createElement(x,null,o&&Se.createElement(Vt,{required:c.required,withInput:!0},o),Se.createElement(gn,Ce({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=pe(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=pe(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=pe(s,r,u),a=pe(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=Oe(e.split(" - "),2),t=e[0],e=e[1];return q(u,t,s)&&q(u,e,s)}],clearOnEmptyBlur:!0}))))}function da(e){var t=new Date;return new Date(t.setDate(e))}function ha(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 ya(e){e.preventDefault()}function ma(){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!Da(t)&&e&&e.apply(void 0,[t].concat(n)),Da(t)})}}function ga(e,t){switch(t.type){case"focus":return _e(_e({},e),{},{isFocused:!0});case"blur":return _e(_e({},e),{},{isFocused:!1});case"openDialog":return _e(_e({},e),{},{isFileDialogActive:!0});case"closeDialog":return _e(_e({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return _e(_e({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return _e(_e({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return _e(_e({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}var va=function(){e(n,Se["Component"]);var t=h(n);function n(e){var o;return d(this,n),Ee(G(o=t.call(this,e)),"triggerRef",void 0),Ee(G(o),"popupRef",void 0),Ee(G(o),"hoverableDelay",void 0),Ee(G(o),"_timer",void 0),Ee(G(o),"_throttleWait",void 0),Ee(G(o),"offsetMapping",void 0),Ee(G(o),"togglePopper",function(e,t){var n=o.props,r=n.open;(0,n.onToggle)(void 0===t?!r:t,e)}),Ee(G(o),"doesEventContainsElement",function(e,t){t=t.current;return t&&t.contains(e.target)}),Ee(G(o),"getUpdatedStyle",function(e,t,n){var r=_e(_e({},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=Se.createRef(),o.popupRef=Se.createRef(),o.getPopperChildren=o.getPopperChildren.bind(G(o)),o.mouseMoveHandler=o.mouseMoveHandler.bind(G(o)),o.handleMouseEnter=o.handleMouseEnter.bind(G(o)),o.handleMouseLeave=o.handleMouseLeave.bind(G(o)),o.boundaryScrollHandler=o.boundaryScrollHandler.bind(G(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=ke("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 Se.createElement(On,Ce({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=_e(_e({},s?this.getUpdatedStyle(o,i,s):o),{},{zIndex:f}),o="",p=(a?o=ke((Ee(f={},"".concat(a.open),this.state.isOpen),Ee(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=_e(_e(_e({},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 Se.cloneElement(c,a?_e(_e({},p),{},{className:o}):_e({},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 Se.createElement(Zi,null,Se.createElement("style",null,a),Se.createElement(ra,{innerRef:this.triggerRef},function(e){e=e.ref;return t.getTriggerElement(e)}),i&&r&&v.createPortal(Se.createElement(ta,{placement:n,innerRef:this.popupRef,modifiers:{preventOverflow:{boundariesElement:e||document.body},hide:{enabled:o}}},this.getPopperChildren),document.body),i&&!r&&Se.createElement(ta,{placement:n,innerRef:this.popupRef},this.getPopperChildren))}}]),n}(),ba=(Ee(va,"defaultProps",{on:"click",offset:"medium",closeOnBackdropClick:!0,hoverable:!0,appendToBody:!0,style:{}}),["position","customStyle","dark","children","onToggle","className","hideOnReferenceEscape","boundaryElement"]),wa=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,ba),l=Oe(Se.useState(!!e.open),2),f=l[0],p=l[1],l=Oe(Se.useState(!1),2),d=l[0],h=l[1],l=(Se.useEffect(function(){void 0!==e.open&&p(e.open)},[e.open]),Se.useCallback(function(e){p(e)},[])),r=(Se.useEffect(function(){d||"current"in u&&u.current&&h(!0)},[u]),ke(Ee({Popover:!0},"Popover--dark",r),a)),a=Se.createElement("div",{"data-test":"DesignSystem-Popover",className:r,"data-layer":!0,"data-opened":f},o);return Se.createElement(va,Ce({},c,{init:d,boundaryElement:"current"in u?u.current:u,open:f,hide:s,style:n,onToggle:i||l,placement:t}),a)},Sa=(wa.displayName="Popover",wa.defaultProps=Object.assign({},te(va.defaultProps,["appendToBody","trigger","hoverable","on","open","closeOnBackdropClick","offset","closeOnScroll"],!0),{offset:"large",position:"bottom",hideOnReferenceEscape:!0,customStyle:{}}),["children","tooltip"]),_a={bottom:"bottom",top:"top","top-start":"top","top-end":"top","bottom-start":"bottom","bottom-end":"bottom",left:"left",right:"right"},Ea=function(e){var t=e.children,n=e.tooltip,r=W(e,Sa),n=Se.createElement("div",{className:"Tooltip"},Se.createElement(je,{className:"Tooltip-text",appearance:"white"},n));return Se.createElement(wa,Ce({trigger:t,on:"hover",offset:"medium"},r,{animationClass:{open:"Tooltip-animation-open-".concat(_a[e.position]),close:"Tooltip-animation-close-".concat(_a[e.position])},className:"Tooltip-container"}),n)},Ca=(Ea.defaultProps=Object.assign({},te(wa.defaultProps,["trigger","on","open","offset","onToggle","dark","customStyle","closeOnBackdropClick","hideOnReferenceEscape","closeOnScroll"]),{hoverable:!1}),["label"]),f=(oa.displayName="OverlayFooter",ia.displayName="OverlayHeader",aa.defaultProps={stickFooter:!0,withFooter:!0},aa.displayName="OverlayBody",new(function(){function e(){d(this,e),Ee(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,Se["Component"]);var t=h(r);function r(e){var n;return d(this,r),Ee(G(n=t.call(this,e)),"modalRef",Se.createRef()),Ee(G(n),"element",void 0),Ee(G(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.modalRef.current);ua(e,t,n.onOutsideClickHandler)}),n.element=sa(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(G(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=ca({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=ca({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=ke({Modal:!0,"Modal--open":n,"Modal-animation--open":t,"Modal-animation--close":!t},o),o=ke((Ee(o={},"Modal-header",!0),Ee(o,"Modal-header--withSeperator",f),o)),f=ke((Ee(h={},"Modal-footer",!0),Ee(h,"Modal-footer--withSeperator",f),h)),h=ke((Ee(h={},"Row",!0),Ee(h,"Overlay-container",!0),Ee(h,"Overlay-container--open",n),h)),y=c||l||p||u,y=ke((Ee(m={},"Modal-body",!0),Ee(m,"Modal-body--withMargin",!y||!!p),Ee(m,"Modal-body--withPadding",!y||!p),m)),m=De(this.props),h=Se.createElement(jn,{"data-test":"DesignSystem-ModalContainer",className:h,"data-layer":!0,"data-opened":n,style:{zIndex:e||1001}},Se.createElement(x,Ce({"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)&&Se.createElement("div",{className:o},Se.createElement(x,null,!u&&Se.createElement(ia,Ce({"data-test":"DesignSystem-Modal--header"},c)),!!u&&u),Se.createElement(x,{className:"flex-grow-0"},Se.createElement(Ea,{tooltip:"Close",position:"bottom"},Se.createElement(Te,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Modal--CloseButton",onClick:function(e){d&&d(e,"IconClick")}})))),n&&s&&Se.createElement(Se.Fragment,null,c||l||p||u?Se.createElement(aa,{className:y},this.props.children):s),(!!p||!!l)&&Se.createElement(oa,Ce({"data-test":"DesignSystem-Modal--footer"},l,{open:n,className:f}),p))),e=i?Se.createElement(On,{ref:this.modalRef,"data-test":"DesignSystem-Modal--OutsideClick",onOutsideClick:this.onOutsideClickHandler},h):h,m=v.createPortal(e,this.element);return Se.createElement(Se.Fragment,null,m,Se.createElement(ne,{open:this.state.animate,zIndex:r}))}}]),r}()),r=(Ee(n,"defaultProps",{dimension:"medium"}),function(){e(r,Se["Component"]);var t=h(r);function r(e){var n;return d(this,r),Ee(G(n=t.call(this,e)),"modalRef",Se.createRef()),Ee(G(n),"element",void 0),Ee(G(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)})}),Ee(G(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.modalRef.current);ua(e,t,n.onOutsideClickHandler)}),n.element=sa(),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=ca({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=ke({FullscreenModal:!0,"FullscreenModal-animation--open":t,"FullscreenModal-animation--close":!t},o),o=ke((Ee(t={},"Overlay-container",!0),Ee(t,"Overlay-container--open",n),t)),t=De(this.props),o=n?Se.createElement("div",{"data-test":"DesignSystem-FullscreenModalContainer",className:o,"data-layer":!0,style:{zIndex:e}},Se.createElement("div",Ce({"data-test":"DesignSystem-FullscreenModal"},t,{className:r,ref:this.modalRef}),Se.createElement(jn,{className:"justify-content-center"},Se.createElement(x,{medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"12"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"12"}}[i],Se.createElement(jn,{className:"FullscreenModal-header"},Se.createElement(x,null,!s&&Se.createElement(ia,Ce({"data-test":"DesignSystem-FullscreenModal--header"},c)),!!s&&s),Se.createElement(x,{className:"flex-grow-0"},Se.createElement(Ea,{tooltip:"Close"},Se.createElement(Te,{icon:"close",appearance:"transparent","data-test":"DesignSystem-FullscreenModal--CloseButton",onClick:function(e){f&&f(e,"IconClick")}})))),Se.createElement(aa,{"data-test":"DesignSystem-FullscreenModal--Body",className:"FullscreenModal-body"},a),(!!u||!!l)&&Se.createElement(oa,Ce({"data-test":"DesignSystem-FullscreenModal--footer"},l,{open:n,className:"FullscreenModal-footer"}),u))))):null,e=v.createPortal(o,this.element);return Se.createElement(Se.Fragment,null,e)}}]),r}()),Oa=(Ee(r,"defaultProps",{dimension:"medium"}),{regular:"6",large:"10"}),u=function(){e(r,Se["Component"]);var t=h(r);function r(e){var n;return d(this,r),Ee(G(n=t.call(this,e)),"sidesheetRef",Se.createRef()),Ee(G(n),"element",void 0),Ee(G(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.sidesheetRef.current);ua(e,t,n.onOutsideClickHandler)}),n.element=sa(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(G(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=ca({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=ca({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=ke({Sidesheet:!0,"Sidesheet--open":r,"Sidesheet-animation--open":n,"Sidesheet-animation--close":!n},i),n=ke((Ee(y={},"Overlay-container",!0),Ee(y,"fade-in",n),Ee(y,"Overlay-container--open",n),Ee(y,"Overlay-container--close",!n),y)),y=ke((Ee(y={},"Sidesheet-header",!0),Ee(y,"Sidesheet-header--withSeperator",u),y)),u=ke((Ee(m={},"Sidesheet-footer",!0),Ee(m,"Sidesheet-footer--withSeperator",u),Ee(m,"Sidesheet-footer--stickToBottom",l),m)),l=ke((Ee(m={},"Sidesheet-body",!0),Ee(m,"Sidesheet-body--withMargin",!!c&&l),Ee(m,"Sidesheet-body--nextPage",(null==f?void 0:f.backButton)||(null==f?void 0:f.backIcon)),Ee(m,"Sidesheet-body--firstPage",!(null!=f&&f.backButton||null!=f&&f.backIcon)),m)),m=ke((Ee(m={},"Sidesheet-header--shiftRight",(null==f?void 0:f.backButton)||(null==f?void 0:f.backIcon)),Ee(m,"Sidesheet-header--shiftLeft",!(null!=f&&f.backButton||null!=f&&f.backIcon)),m)),g=De(this.props),n=Se.createElement(jn,{"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}},Se.createElement(x,Ce({"data-test":"DesignSystem-Sidesheet"},g,{className:i,size:Oa[s]}),Se.createElement("div",{className:y},Se.createElement(x,{"data-test":"DesignSystem-Sidesheet--Header"},!d&&Se.createElement(ia,Ce({headingClass:m},f)),!!d&&d),Se.createElement(x,{className:"flex-grow-0"},Se.createElement(Ea,{tooltip:"Close"},Se.createElement(Te,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Sidesheet--CloseButton",largeIcon:!0,onClick:function(e){h&&h(e,"IconClick")}})))),Se.createElement(aa,{"data-test":"DesignSystem-Sidesheet--OverlayBody",className:l},this.props.children),(!!c||!!p)&&Se.createElement(oa,Ce({"data-test":"DesignSystem-Sidesheet--Footer"},p,{open:r,className:u}),c))),t=a?Se.createElement(On,{ref:this.sidesheetRef,"data-test":"DesignSystem-Sidesheet--OutsideClick",onOutsideClick:this.onOutsideClickHandler},n):n,g=v.createPortal(t,this.element);return Se.createElement(Se.Fragment,null,g,Se.createElement(ne,{open:this.state.animate,zIndex:o}))}}]),r}(),o=(Ee(u,"defaultProps",{dimension:"regular",stickFooter:!1,headerOptions:{}}),function(e){var t=e.title,n=e.description,r=e.className,e=De(e),r=ke({"Modal-description":!0},r);return Se.createElement("div",Ce({"data-test":"DesignSystem-ModalDescription"},e,{className:r}),t&&Se.createElement(je,{weight:"strong","data-test":"DesignSystem-ModalDescription--Title"},t),t&&n&&Se.createElement("br",null),n&&Se.createElement(je,{"data-test":"DesignSystem-ModalDescription--Description"},n))}),xa=(o.displayName="ModalDescription",la.displayName="Pagination",la.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,Se["Component"]);var s=h(c);function c(e){d(this,c),Ee(G(l=s.call(this,e)),"monthsInView",void 0),Ee(G(l),"getDate",function(e,t){var n=l.props.inputFormat;return{startValue:e?O(n,e):"",endValue:t?O(n,t):""}}),Ee(G(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}}),Ee(G(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}),Ee(G(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):""})}),Ee(G(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,xa),a=this.state,s=a.startDate,c=a.endDate,u=a.yearNav,a=a.monthNav;return Se.createElement(ct,Ce({},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=ke((Ee(e={},"DateRangePicker",!0),Ee(e,"DateRangePicker--".concat(l),l),e));return n?(e=u?Se.createElement(pa,{inputFormat:a,inputOptions:i,validators:c,state:this.state,setState:this.setState.bind(this)}):Se.createElement(fa,{inputFormat:a,startInputOptions:r,endInputOptions:o,validators:c,state:this.state,setState:this.setState.bind(this)}),Se.createElement(wa,{trigger:e,triggerClass:"w-100",className:l,position:s,appendToBody:!0,open:f,onToggle:this.onToggleHandler},t,this.renderCalendar())):this.renderCalendar()}}]),c}(),c=(Ee(p,"utils",{getCurrentWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:da(t-e+1),endDate:da(t-e+7)}},getPreviousWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:da(t-e-6),endDate:da(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:da(e-90),endDate:da(e)}},getCustomDates:function(){return{startDate:"",endDate:""}},getCurrentYear:function(){return(new Date).getFullYear()},getCurrentMonth:function(){return(new Date).getMonth()}}),Ee(p,"defaultProps",_e(_e({},ct.defaultProps),{},{children:Se.createElement(Se.Fragment,null),contentAlign:"left",monthsInView:void 0,position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[N],inputOptions:{label:"Date"},startInputOptions:{label:"Start Date"},endInputOptions:{label:"End Date"}})),function(e){e=e.children;return Se.createElement(Se.Fragment,null,e)}),ka=(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}))}),Da=function(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble},Ta=function(e){return null!=e},ja=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)}},Ia=function(e){return{type:"FILE_TOO_LARGE",message:"File is larger than ".concat(e," bytes")}},Ma=function(e){return{type:"FILE_TOO_SMALL",message:"File is smaller than ".concat(e," bytes")}},Na=function(e,t){e="application/x-moz-file"===e.type||ka(e,t);return[e,e?null:ja(t)]},Pa=function(e,t,n){if(Ta(e.size))if(Ta(t)&&Ta(n)){if(e.size>n)return[!1,Ia(n)];if(e.size<t)return[!1,Ma(t)]}else{if(Ta(t)&&e.size<t)return[!1,Ma(t)];if(Ta(n)&&e.size>n)return[!1,Ia(n)]}return[!0,null]},Aa=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"]]),Ra=[".DS_Store","Thumbs.db"];function La(){return(La=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 za.apply(this,arguments)}(n.dataTransfer,n.type):(null!==(t=n).target&&t.target.files?Ka(t.target.files):[]).map(function(e){return Fa(e)}));case 1:case"end":return e.stop()}var t},e)}))).apply(this,arguments)}function Fa(e,t){var n,r=function(e){var t=e.name;t&&-1!==t.lastIndexOf(".")&&!e.type&&(t=t.split(".").pop().toLowerCase(),t=Aa.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 za(){return(za=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=Ka(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(Ha));case 6:return o=e.sent,e.abrupt("return",Ba(function n(e){return e.reduce(function(e,t){return[].concat(xe(e),xe(Array.isArray(t)?n(t):[t]))},[])}(o)));case 8:return e.abrupt("return",Ba(Ka(t.files).map(function(e){return Fa(e)})));case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ba(e){return e.filter(function(e){return-1===Ra.indexOf(e.name)})}function Ka(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function Ha(e){var t;return"function"==typeof e.webkitGetAsEntry&&(t=e.webkitGetAsEntry())&&t.isDirectory?Va(t):Ua(e)}function Ua(e){var t=e.getAsFile();return t?(t=Fa(t),Promise.resolve(t)):Promise.reject("".concat(e," is not a File"))}function Wa(e){return qa.apply(this,arguments)}function qa(){return(qa=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?Va:function(){return Ga.apply(this,arguments)})(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Va(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(Wa)),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 Ga(){return(Ga=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=Fa(e,r.fullPath);t(e)},function(e){n(e)})}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ya(e){function t(){R&&setTimeout(function(){var e;!k.current||(e=k.current.files)&&e.length||(T({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(Se.useRef)(null),k=Object(Se.useRef)(null),D=(e=Oe(Object(Se.useReducer)(ga,es),2))[0],T=e[1],e=D.isFocused,R=D.isFileDialogActive,j=D.draggedFiles,L=Object(Se.useCallback)(function(){k.current&&(T({type:"openDialog"}),k.current.value="",k.current.click())},[T]),F=(Object(Se.useEffect)(function(){return window.addEventListener("focus",t,!1),function(){window.removeEventListener("focus",t,!1)}},[k,R,_]),Object(Se.useCallback)(function(e){x.current&&x.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),L()))},[x,k])),z=Object(Se.useCallback)(function(){T({type:"focus"})},[]),I=Object(Se.useCallback)(function(){T({type:"blur"})},[]),M=Object(Se.useRef)([]),B=(Object(Se.useEffect)(function(){return C&&(document.addEventListener("dragover",ya,!1),document.addEventListener("drop",n,!1)),function(){C&&(document.removeEventListener("dragover",ya),document.removeEventListener("drop",n))}},[x,C]),Object(Se.useCallback)(function(t){t.preventDefault(),t.persist(),M.current=[].concat(xe(M.current),[t.target]),ha(t)&&Promise.resolve(E(t)).then(function(e){Da(t)||(T({draggedFiles:e,isDragActive:!0,type:"setDraggedFiles"}),m&&m(t))})},[E,m])),K=Object(Se.useCallback)(function(e){if(e.preventDefault(),e.persist(),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return ha(e)&&v&&v(e),!1},[v]),H=Object(Se.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||(T({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),ha(e)&&g&&g(e))},[x,g]),N=Object(Se.useCallback)(function(t){t.preventDefault(),t.persist(),M.current=[],ha(t)&&Promise.resolve(E(t)).then(function(e){var a,s;Da(t)||(a=[],s=[],e.forEach(function(e){var t=Oe(Na(e,f),2),n=t[0],t=t[1],r=Oe(Pa(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}))}),T({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))}),T({type:"reset"})},[y,f,h,d,E,b,w,S]),F=Object(Se.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,Xa);return _e(Ee({onDragEnter:a(ma(n,B)),onDragOver:a(ma(r,K)),onDragLeave:a(ma(o,H)),onDrop:a(ma(i,N))},t,x),e)}},[x,F,z,I,B,K,H,N,p]),U=Object(Se.useCallback)(function(e){e.stopPropagation()},[]),z=Object(Se.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,Qa);return _e(_e({},Ee({accept:f,multiple:y,type:"file",style:{display:"none"},onChange:a(ma(n,N)),onClick:a(ma(r,U)),autoComplete:"off",tabIndex:-1},t,k)),e)}},[k,f,y,N,p]),P=0<(I=j.length)&&(A=(P={accept:f,minSize:h,maxSize:d,multiple:y,files:j}).files,r=P.accept,o=P.minSize,i=P.maxSize,!(!P.multiple&&1<A.length))&&A.every(function(e){var t=Oe(Na(e,r),1)[0],e=Oe(Pa(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:j}).files,c=I.accept,u=I.minSize,l=I.maxSize,!I.multiple&&1<s.length?"TOO_MANY_FILES":(I=s.every(function(e){return!Oe(Na(e,c),1)[0]}),s=s.every(function(e){return!Oe(Pa(e,u,l),1)[0]}),I?"FILE_INVALID_TYPE":s?"FILE_TOO_LARGE":"")):"";return _e(_e({},D),{},{isDragAccept:P,isDragReject:A,getRootProps:F,getInputProps:z,rootRef:x,inputRef:k,draggedFiles:j,fileError:I,isFocused:e&&!p,open:a(L)})}function $a(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=De(e),a=ke(Ee({},"FileUploaderButton",!0),a);return Se.createElement("div",Ce({},e,{className:a}),Se.createElement(Te,{type:"button",disabled:o,icon:"backup"},r),Se.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 Za(e,t,n){var r=e.sortingList,e=e.updateSortingList,o=(r=xe(r)).findIndex(function(e){return e.name===t});-1!==o&&(r=[].concat(xe(r.slice(0,o)),xe(r.slice(o+1)))),"unsort"!==n&&r.push({name:t,type:n}),e(r)}function Ja(e,t,n){(0,e.updateColumnSchema)(t,{pinned:"unpin"!==n?n:void 0})}var Xa=["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnterCallback","onDragOverCallback","onDragLeaveCallback","onDropCallback"],Qa=["refKey","onChange","onClick"],es={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};Ya.displayName="DropzoneBase",Ya.defaultProps={disabled:!1,getFilesFromEvent:function(e){return La.apply(this,arguments)},maxSize:1/0,minSize:0,multiple:!0,preventDropOnDocument:!0,validator:function(){return null}};_e(_e({},Ya.defaultProps),{},{type:"standard"}),$a.defaultProps={uploadButtonLabel:"Upload files",disabled:!"FileUploaderFormat",multiple:!1},$a.displayName="FileUploaderButton",Object.assign({},$a.defaultProps,{title:"Upload files",sizeLabel:"Maximum size: 25 MB"});function ts(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 ns(e,t,n,r){var o,i=xe(e),a=T(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;(e[s].disabled&&r||!e[s].disabled)&&(i[s]=_e(_e({},i[s]),n))}}catch(e){a.e(e)}finally{a.f()}return i}function rs(e,t){var n=_e({},t);return e.translate&&(t=e.translate(t),n[e.name]=null!==t&&"object"===Z(t)?_e(_e({},n[e.name]),t):t),null!==n[e.name]&&"object"===Z(n[e.name])||(n[e.name]={title:n[e.name]}),n}function os(e,t){return Math.ceil(e/t)}function is(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 as(e){return e&&!!e.length}function ss(e){var t=Se.useContext(bs),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,e=e.nestedRowData,h=t.draggable,y=t.separator,m=t.nestedRows,g=t.ref,t=t.withCheckbox,v=o.name,b=o.hidden,w=o.pinned,S=(E={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===(E=o.cellType)?"DEFAULT":E]).width,_=void 0===(_=E.minWidth)?96:_,E=void 0===(E=E.maxWidth)?800:E,C=(x=Oe(Se.useState(!1),2))[0],O=x[1],x=ke({"Grid-cell":!0,"Grid-cell--head":n,"Grid-cell--dragged":C&&h,"Grid-cell--body":!n,"Grid-cell--separator":!r&&(void 0!==o.separator?o.separator:y),"Grid-cell--nestedRow":!n&&0===s&&m});return b?null:Se.createElement("div",{key:"".concat(a,"-").concat(s),className:x,draggable:n&&h,onDragStart:function(e){h&&(O(!0),e.dataTransfer.setData("name",v),w)&&e.dataTransfer.setData("type",w)},onDrag:function(){O(!1)},onDragOver:function(e){return e.preventDefault()},onMouseUpCapture:function(){O(!1)},onDragEnd:function(e){e.preventDefault(),O(!1)},onDrop:function(e){var t;h&&(O(!1),(e={name:e.dataTransfer.getData("name"),type:e.dataTransfer.getData("type")}).type===(t={name:v,type:w||""}).type)&&d&&d(e.name,t.name)},style:{width:ts({ref:g,withCheckbox:t},o.width||S),minWidth:ts({ref:g,withCheckbox:t},o.minWidth||_),maxWidth:ts({ref:g,withCheckbox:t},o.maxWidth||E)}},n?Se.createElement(Ss,{colIndex:s,schema:o,onSelectAll:u,onMenuChange:l,onFilterChange:f,updateColumnSchema:p,reorderColumn:d,setIsDragged:O}):Se.createElement(_s,{rowIndex:a,colIndex:s,data:i,schema:o,expandedState:c,nestedRowData:e}))}function cs(e){function t(e,t,r){var n;return e.length?(n=ke((Ee(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),Ee(n,"Grid-cellGroup--main",!r),n)),Se.createElement("div",{className:n},t&&u?Se.createElement("div",{className:"Grid-cell Grid-cell--head Grid-cell--checkbox"},l?Se.createElement(M,null):Se.createElement(bt,Ce({},f,{onChange:o}))):null,e.map(function(e,t){var n="left"===r?t:p.length+t;return"right"===r&&(n+=d.length),Se.createElement(ss,{key:"".concat(n),firstCell:!t,colIndex:n,isHead:!0,schema:e,onSelectAll:o,onMenuChange:i,onFilterChange:a,updateColumnSchema:s,reorderColumn:c})}))):null}var n=Se.useContext(bs),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 Se.createElement("div",{className:"Grid-head","data-test":"DesignSystem-GridHead-wrapper"},Se.createElement("div",{className:"Grid-row Grid-row--head"},t(p,!!p.length,"left"),t(d,!p.length&&!!d.length),t(n,!1,"right")))}function us(e){function t(e,t,r){var n;return e.length?(n=ke((Ee(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),Ee(n,"Grid-cellGroup--main",!r),n)),Se.createElement("div",{className:n,"data-test":"DesignSystem-Grid-cellGroup"},t&&u?Se.createElement("div",{className:"Grid-cell Grid-cell--body Grid-cell--checkbox",onClick:function(e){return e.stopPropagation()}},c?Se.createElement(M,null):Se.createElement(bt,{checked:!!p._selected,onChange:function(e){h(d,e.target.checked)}})):null,e.map(function(e,t){var n="left"===r?t:w.length+t;return"right"===r&&(n+=_.length),Se.createElement(ss,{key:"".concat(d,"-").concat(n),rowIndex:d,colIndex:n,firstCell:!t,schema:e,data:p,expandedState:[m,g],nestedRowData:E})}))):null}var n,r,o,i,a=(l=Se.useContext(bs)).type,s=l.onRowClick,c=l.loading,u=l.withCheckbox,l=l.nestedRows,f=e.schema,p=e.data,d=e.rowIndex,h=e.onSelect,e=e.className,y=Se.useRef(null),m=(v=Oe(Se.useState(!1),2))[0],g=v[1],v=ke("Grid-row","Grid-row--body",{"Grid-row--selected":p._selected,"Grid-row--disabled":p.disabled}),b=Se.useCallback(function(){"resource"!==a||c||s&&s(p,d)},[p,d]),w=(S=f.filter(function(e){return!e.hidden&&e.pinned})).filter(function(e){return!e.hidden&&"left"===e.pinned}),S=S.filter(function(e){return!e.hidden&&"right"===e.pinned}),_=f.filter(function(e){return!e.hidden&&!e.pinned}),E=(f={data:p,rowIndex:d,expanded:m},C=Se.useContext(bs),n=C.schema,r=C.loading,C=C.nestedRowRenderer,o=f.data,i=f.rowIndex,f=f.expanded,C?C({data:o,schema:n,loading:r,rowIndex:i,expanded:f}):null),C=ke(e,{"Grid-rowWrapper":!0});return Se.createElement("div",{className:C},Se.createElement("div",{"data-test":"DesignSystem-Grid-row",className:v,onClick:b,ref:y},t(w,!!w.length,"left"),t(_,!w.length&&!!_.length),t(S,!1,"right")),l&&m&&Se.createElement("div",{className:"Grid-nestedRow"},E))}function ls(e){var n,t,r,o,i=(d=Se.useContext(bs)).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,Se.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,Se.createElement("div",{className:"Grid-body"},(s&&!i.length?xe(Array(d).map(function(e){return e})):i).map(function(e,t){return t=t,e=e,Se.createElement(us,{key:t,rowIndex:t,data:e||i[t],schema:n,onSelect:o})})))}function fs(e){var t=e.tooltip;return null!=(e=e.cellData.title)?t?Se.createElement(Ea,{tooltip:e,position:"top-start",triggerClass:"w-100 overflow-hidden"},Se.createElement(je,{className:"w-100 ellipsis"},e)):Se.createElement(je,{className:"w-100 ellipsis"},e):null}function ps(e){return(e=e.cellData.metaList)?Se.createElement("div",{className:"GridCell-metaList","data-test":"DesignSystem-GridCell-metaList"},e.map(function(e,t){return Se.createElement(je,{key:t,className:"ellipsis",appearance:"subtle",size:"small"},e)})):null}function ds(e){var t=(e=e.cellData).firstName,n=e.lastName,e=e.title;return t||n?Se.createElement(re,{className:"mr-5",firstName:t,lastName:n}):e?Se.createElement(re,{className:"mr-5"},e):null}function hs(e){var t,n,r=e.size,o=e.schema,i=e.loading,e=i?{}:rs(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=ke(Ee({},"GridCell",!0));switch(s){case"DEFAULT":return Se.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--default")},i?Se.createElement(I,{length:"medium","data-test":"DesignSystem-GridCell-placeHolder"}):fs({tooltip:l,cellData:f}));case"WITH_META_LIST":return Se.createElement("div",{className:"".concat(p," GridCell--metaList")},i?Se.createElement(Se.Fragment,null,Se.createElement(I,{length:"medium","data-test":"DesignSystem-GridCell-withMetaList"}),Se.createElement(I,{length:"large",size:"xxs"})):Se.createElement(Se.Fragment,null,fs({tooltip:l,cellData:f}),ps({cellData:f})));case"AVATAR":return i?Se.createElement(M,{className:"GridCell--align-".concat(u),imageSize:"medium",round:!0}):Se.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--avatar"),"data-test":"DesignSystem-GridCell-avatar"},"tight"!==r&&ds({cellData:f}));case"AVATAR_WITH_TEXT":return i?Se.createElement(M,{imageSize:"medium",round:!0},Se.createElement(I,{className:"ml-3",length:"medium"})):Se.createElement("div",{className:"".concat(p," "),"data-test":"DesignSystem-GridCell-avatarWithText"},"tight"!==r&&ds({cellData:f}),fs({tooltip:l,cellData:f}));case"AVATAR_WITH_META_LIST":return i?Se.createElement(M,{imageSize:"medium",round:!0},Se.createElement(I,{className:"ml-3",length:"medium"}),Se.createElement(I,{className:"ml-3",length:"large"})):Se.createElement("div",{className:"".concat(p," GridCell--avatarWithText"),"data-test":"DesignSystem-GridCell-avatarWithMetaList"},"tight"!==r&&ds({cellData:f}),Se.createElement("div",{className:"GridCell-metaListWrapper"},fs({tooltip:l,cellData:f}),ps({cellData:f})));case"ICON":return i?Se.createElement(M,{className:"GridCell--align-".concat(u),imageSize:"small",round:!0}):Se.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)?Se.createElement(P,{name:t}):null));case"STATUS_HINT":return Se.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--statusHint")},i?Se.createElement(M,{className:"w-75 flex-grow-0",imageSize:"small",round:!0},Se.createElement(I,{length:"large"})):(n=(n={cellData:f}).cellData,t=n.statusAppearance,(n=n.title)?Se.createElement(In,{appearance:t},n):null))}return null}function ys(e){var t=e.options,n=e.onChange,r=(e=Oe(Se.useState(!1),2))[0],o=e[1],i=(e=Oe(Se.useState(t),2))[0],a=e[1],s=(e=Oe(Se.useState("var(--spacing-8)"),2))[0],c=e[1];return Se.useEffect(function(){a(t)},[r]),Se.createElement("div",{className:"Dropdown"},Se.createElement(wa,{open:r,onToggle:function(e){o(e)},trigger:Se.createElement(Te,{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(vs(t.length))),triggerClass:"w-100",customStyle:{width:s},className:"Header-draggableDropdown"},Se.createElement("div",{className:"Dropdown-wrapper"},Se.createElement("div",{className:"OptionWrapper"},Se.createElement(bt,{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 _e(_e({},e),{},{selected:t.target.checked})}))}})),i.map(function(e,r){return Se.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(gs(i,e,r))}},Se.createElement(bt,{className:"OptionCheckbox",name:e.value,label:e.label,checked:i[r].selected,onChange:function(e){return e=e,t=r,(n=xe(i))[t]=_e(_e({},n[t]),{},{selected:e.target.checked}),void a(n);var t,n}}),Se.createElement(P,{name:"drag_handle",className:"mr-4"}))})),Se.createElement("div",{className:"Dropdown-buttonWrapper"},Se.createElement(Te,{type:"button",className:"mr-4",size:"tiny",onClick:function(){o(!1)}},"Cancel"),Se.createElement(Te,{type:"button",appearance:"primary",size:"tiny",onClick:function(){o(!1),n&&n(i)}},"Apply"))))}function ms(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=Oe(Se.useState(!1),2))[0],O=D[1],x=(D=Oe(Se.useState(!0),2))[0],k=D[1],D=(Se.useEffect(function(){k(!x)},[o]),Se.useEffect(function(){v&&v.checked&&m&&m(!0,C)},[C]),Se.useEffect(function(){v&&!v.checked&&O(!1)},[v]),o.filter(function(e){return e.filters})),T=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,j=(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(vs(y)):"Selected ".concat(r," ").concat(e).concat(vs(y)," on this page"):(s?"Showing ".concat(j,"-").concat(c," of "):"Showing ").concat(y," ").concat(e).concat(vs(y));return Se.createElement("div",{className:"Header"},Se.createElement("div",{className:"Header-content Header-content--top"},i&&Se.createElement("div",{className:"Header-search"},Se.createElement(pn,{"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&&!as(o),autoComplete:"off"})),E&&0<D.length&&Se.createElement("div",{className:"Header-dropdown"},Se.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 _e(_e({},t),{},{selected:d[n]&&-1!==d[n].findIndex(function(e){return e===t.value})})}):[];return Se.createElement(on,{key:n,withCheckbox:!0,showApplyButton:!0,inlineLabel:t,icon:"filter_list",options:e,onChange:function(e){var t=n;t=_e(_e({},d),{},Ee({},t,e)),h&&h(t)}})}))),f&&Se.createElement("div",{className:"Header-actions"},f)),Se.createElement("div",{className:"Header-content Header-content--bottom"},Se.createElement("div",{className:"Header-label"},!a&&l&&!t&&Se.createElement(bt,Ce({},v,{onChange:function(e){m&&m(e.target.checked)}})),t?Se.createElement(M,{withImage:!a&&l},Se.createElement(I,{length:"small",size:"s"})):Se.createElement(Se.Fragment,null,Se.createElement(Vt,null,u),s&&(null==v?void 0:v.checked)&&_&&Se.createElement("div",{className:"ml-4"},C?Se.createElement(Te,{"data-test":"DesignSystem-Table-Header--clearSelectionItemsButton",size:"tiny",onClick:function(){return O(!1)}},"Clear Selection"):Se.createElement(Te,{"data-test":"DesignSystem-Table-Header--selectAllItemsButton",size:"tiny",onClick:function(){return O(!0)}},"Select all ".concat(y," ").concat(e,"s"))))),S&&Se.createElement("div",{className:"Header-hideColumns"},Se.createElement(ys,{options:T,onChange:function(e){e=e.map(function(t){return _e(_e({},o.find(function(e){return e.name===t.value})),{},{hidden:!t.selected})});p&&p(e)}}))))}var gs=function(e,t,n){return t===n?e:t<n?[].concat(xe(e.slice(0,t)),xe(e.slice(t+1,n+1)),[e[t]],xe(e.slice(n+1))):[].concat(xe(e.slice(0,n)),[e[t]],xe(e.slice(n,t)),xe(e.slice(t+1)))},vs=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},bs=Se.createContext(_e(_e({},n),{},{ref:null})),ws=bs.Provider,Ss=function(e){function t(){return Se.createElement(Se.Fragment,null,Se.createElement(je,{weight:"strong",className:"ellipsis--noWrap"},r.displayName),m&&Se.createElement("div",{className:"Grid-sortingIcons"},w?"asc"===w?Se.createElement(P,{name:"arrow_upward"}):Se.createElement(P,{name:"arrow_downward"}):Se.createElement(P,{name:"unfold_more"})))}var n=Se.useContext(bs),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=as(n),b=f.findIndex(function(e){return e.name===g}),w=-1!==b?f[b].type:null,S=Se.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,xe(_))),ke({"Grid-headCell":!0,"Grid-headCell--draggable":i})),f=y?y.map(function(t){return _e(_e({},t),{},{selected:p[g]&&-1!==p[g].findIndex(function(e){return e===t.value})})}):[];return Se.createElement("div",{key:g,className:b,ref:S},Se.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?Se.createElement(M,{withImage:!1},Se.createElement(I,{length:"medium"})):!r.headerCellRenderer&&d?Se.createElement(Ea,{position:"top-start",triggerClass:"w-100 overflow-hidden",tooltip:r.displayName},t()):r.headerCellRenderer&&!d?r.headerCellRenderer(o):t()),h&&y&&Se.createElement(Se.Fragment,null,l&&!n?Se.createElement("span",null,Se.createElement(M,null)):Se.createElement("div",null,Se.createElement(on,{menu:!0,showApplyButton:!0,withCheckbox:!0,triggerOptions:{customTrigger:function(){return Se.createElement(Te,{icon:"filter_list",appearance:"transparent"})}},options:f,align:"left",onChange:function(e){return c(g,e)},minWidth:176}))),e&&Se.createElement(Se.Fragment,null,l&&!n?Se.createElement("span",{className:"ml-4"},Se.createElement(M,null)):Se.createElement("div",null,Se.createElement(on,{key:"".concat(g,"-").concat(w,"-").concat(v),menu:!0,optionType:"WITH_ICON",triggerOptions:{customTrigger:function(){return Se.createElement(Te,{icon:"more_vert_filled",appearance:"transparent"})}},options:_,align:"left",onChange:function(e){return s(g,e)},minWidth:176}))),r.resizable&&Se.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)}}))},_s=function(e){var t=Se.useContext(bs),n=e.data,r=e.schema,o=e.expandedState,i=e.rowIndex,a=e.colIndex,s=e.nestedRowData,e=t.size,c=t.loading,t=t.nestedRows,o=Oe(o,2),u=o[0],l=o[1],o={rowIndex:i,colIndex:a,size:e,schema:r,data:n,loading:c,expanded:u};return Se.createElement("div",{className:"Grid-cellContent"},0===a&&t&&Se.createElement(Se.Fragment,null,s?Se.createElement(P,{className:"Grid-nestedRowTrigger",name:u?"keyboard_arrow_up":"keyboard_arrow_down",size:20,appearance:"default",onClick:function(e){s&&(e.stopPropagation(),l(!u))}}):Se.createElement("span",{className:"Grid-nestedRowPlaceholder"})),r.cellRenderer?r.cellRenderer(o):Se.createElement(hs,Ce({key:"".concat(i,"-").concat(a)},o)))},Es=(us.defaultProps={data:{}},function(){e(n,Se["Component"]);var t=h(n);function n(e){var i;d(this,n),Ee(G(i=t.call(this,e)),"gridRef",null),Ee(G(i),"isHeadSyncing",!1),Ee(G(i),"isBodySyncing",!1),Ee(G(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)}}),Ee(G(i),"updateRenderedSchema",function(e){var t=i.props.updateSchema;t&&t(e)}),Ee(G(i),"updateColumnSchema",function(t,e){var n=xe(i.props.schema),r=n.findIndex(function(e){return e.name===t});n[r]=_e(_e({},n[r]),e),i.updateRenderedSchema(n)}),Ee(G(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=gs(e,r,o);i.updateRenderedSchema(e)}),Ee(G(i),"updateSortingList",function(e){var t=i.props.updateSortingList;t&&t(e)}),Ee(G(i),"updateFilterList",function(e){var t=i.props.updateFilterList;t&&t(e)}),Ee(G(i),"onMenuChange",function(e,t){var n,r,o=i.props.sortingList;switch(t){case"sortAsc":Za({sortingList:o,updateSortingList:i.updateSortingList},e,"asc");break;case"sortDesc":Za({sortingList:o,updateSortingList:i.updateSortingList},e,"desc");break;case"unsort":Za({sortingList:o,updateSortingList:i.updateSortingList},e,"unsort");break;case"pinLeft":Ja({updateColumnSchema:i.updateColumnSchema},e,"left");break;case"pinRight":Ja({updateColumnSchema:i.updateColumnSchema},e,"right");break;case"unpin":Ja({updateColumnSchema:i.updateColumnSchema},e,"unpin");break;case"hide":n={updateColumnSchema:i.updateColumnSchema},r=!0,(0,n.updateColumnSchema)(e,{hidden:r})}}),Ee(G(i),"onFilterChange",function(e,t){e=_e(_e({},i.props.filterList),{},Ee({},e,t));i.updateFilterList(e)}),Ee(G(i),"onSelect",function(e,t){var n=i.props.onSelect;n&&n(e,t)}),Ee(G(i),"onSelectAll",function(e){var t=i.props.onSelectAll;t&&t(e.target.checked)}),Ee(G(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=De(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=!as(f=f)&&l?o:f),f=ke((Ee(o={Grid:"true"},"Grid--".concat(i),i),Ee(o,"Grid--".concat(a),a),o),c);return Se.createElement("div",Ce({className:f},e,{ref:function(e){t.gridRef=e}}),r&&Se.createElement(ws,{value:_e(_e({},this.props),{},{ref:this.gridRef})},s&&Se.createElement(cs,{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)}),Se.createElement(ls,{key:"".concat(u),schema:l,prevPageInfo:n,updatePrevPageInfo:this.updatePrevPageInfo.bind(this),onSelect:this.onSelect.bind(this)})))}}]),n}()),Cs=(Ee(Es,"defaultProps",void 0),Es.defaultProps=n,hs.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:!(ms.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 Se.createElement(cn,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,Se["Component"]);var o=h(i);function i(e){d(this,i),Ee(G(l=o.call(this,e)),"debounceUpdate",void 0),Ee(G(l),"updateData",function(e){l.state.async&&l.setState({loading:!0}),e?l.debounceUpdate():l.updateDataFn()}),Ee(G(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:is(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=xe(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=rs(o[r],e),t=rs(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:is(o,l.props.selectDisabledRow),schema:e,data:o}))}),Ee(G(l),"onSelect",function(e,t){var n=l.state.data,r=l.props.onSelect,o=[e],i=n;0<=e&&(i=ns(n,o,{_selected:t},l.props.selectDisabledRow),l.setState({data:i,selectAll:is(i,l.props.selectDisabledRow)})),r&&r(o,t,-1===e?[]:i.filter(function(e){return e._selected}))}),Ee(G(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=ns(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:is(r,l.props.selectDisabledRow)})}),Ee(G(l),"onPageChange",function(e){l.setState({page:e})}),Ee(G(l),"updateSchema",function(e){l.setState({schema:e})}),Ee(G(l),"updateSortingList",function(e){var t=l.props.multipleSorting;l.setState({sortingList:t?xe(e):e.slice(-1),page:1})}),Ee(G(l),"updateFilterList",function(e){l.setState({filterList:e,page:1})}),Ee(G(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:is([]),searchTerm:void 0},l.debounceUpdate=Ft(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:is([])})),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:is([])},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=De(this.props),_=l.children,l=W(l,Cs),w=w?" ".concat(w):"",E=this.state.totalRecords,C=os(E,y);return Se.createElement("div",Ce({},S,{className:"Table".concat(w),"data-test":"DesignSystem-Table-wrapper"}),u&&Se.createElement("div",{className:"Table-header","data-test":"DesignSystem-Table-header"},Se.createElement(ms,Ce({},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),_)),Se.createElement("div",{className:"Table-grid"},Se.createElement(Es,Ce({},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&&Se.createElement("div",{className:"Table-pagination"},Se.createElement(la,{page:this.state.page,totalPages:os(E,y),type:h,onPageChange:this.onPageChange,pageJumpDebounceDuration:m})))}}]),i}(),Os=(Ee(u,"defaultProps",r),Se.useState,Se.useEffect,Se.useState,{success:"check_circle",info:"info",warning:"warning",alert:"error"}),xs=function(e){var t=e.appearance,n=e.className,r=e.description,o=e.size,e=De(e),n=ke(Ee({},"InlineMessage",!0),n),i=ke((Ee(i={},"InlineMessage-icon--warning","warning"===t),Ee(i,"InlineMessage-icon--small","small"===o),Ee(i,"InlineMessage-icon--regular","regular"===o),i)),a=ke(Ee({},"InlineMessage-text--".concat(t),t)),s="small"===o?14:16,c="small"===o?"medium":void 0;return Se.createElement("div",Ce({"data-test":"DesignSystem-InlineMessage"},e,{className:n}),"default"!==t&&Se.createElement(P,{"data-test":"DesignSystem-InlineMessage--Icon",name:Os[t],appearance:t,className:i,size:s}),Se.createElement(je,{size:o,weight:c,className:a,"data-test":"DesignSystem-InlineMessage--Description"},r))},o=(xs.displayName="InlineMessage",xs.defaultProps={appearance:"default",description:"",size:"regular"},function(e){var t,n=e.vertical,r=e.appearance,o=e.className,e=De(e),n=ke((Ee(t={},"Divider",!0),Ee(t,"Divider--horizontal",!n),Ee(t,"Divider--vertical",n),Ee(t,"Divider--basic",!n&&"header"!==r),Ee(t,"Divider--header",!n&&"header"===r),t),o);return Se.createElement("hr",Ce({"data-test":"DesignSystem-Divider"},e,{className:n}))}),ks=(o.displayName="Divider",o.defaultProps={appearance:"basic",vertical:!1},function(e){var t=e.error,e=e.message;return e?t?Se.createElement(xs,{size:"small",className:"mt-3",appearance:"alert",description:e}):Se.createElement("div",{className:"mt-3"},Se.createElement(je,{appearance:"subtle",size:"small",weight:"medium"},e)):null}),Ds=(ks.displayName="HelpText",["children","type","className","disabled","tabIndex","icon","subtle","size","iconAlign","iconType"]),Ts={tiny:12,regular:16},p=Se.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,f=e.iconType,e=W(e,Ds),c=ke((Ee(p={},"LinkButton",!0),Ee(p,"LinkButton--".concat(u),u),Ee(p,"LinkButton--default",!c),Ee(p,"LinkButton--subtle",c),Ee(p,"LinkButton--iconAlign-".concat(l),n&&l),Ee(p,"".concat(o),o),p)),p=ke((Ee(o={},"LinkButton-icon",!0),Ee(o,"LinkButton-icon--".concat(l),n&&l),o));return Se.createElement("button",Ce({ref:t,type:r,"data-test":"DesignSystem-LinkButton",className:c,disabled:i,tabIndex:a},e),Se.createElement(Se.Fragment,null,s&&Se.createElement("div",{className:p},Se.createElement(P,{"data-test":"DesignSystem-LinkButton--Icon",name:s,type:f,size:u&&Ts[u]})),n))});p.displayName="LinkButton",p.defaultProps={size:"regular",type:"button",iconAlign:"left"},new Map}.call(this,Is(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){j[e]["".concat(e.toLowerCase(),"-").concat(n)]=E({},"".concat(t),n)}function T(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(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}({},j.color,{},j.bgcolor,{},j.fontSize,{},j.fontFamily,{CODE:j.CODE,SUPERSCRIPT:j.SUPERSCRIPT,SUBSCRIPT:j.SUBSCRIPT})}var j={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function I(e,t,n){var r=e.getSelection(),o=Object.keys(j[t]).reduce(function(e,t){return u.Modifier.removeInlineStyle(e,r,t)},e.getCurrentContent()),o=u.EditorState.push(e,o,"changeinline-style"),e=e.getCurrentInlineStyle();return r.isCollapsed()&&(o=e.reduce(function(e,t){return u.RichUtils.toggleInlineStyle(e,t)},o)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t?e.has(n)||(o=u.RichUtils.toggleInlineStyle(o,n)):e.has("".concat(e="bgcolor"===t?"backgroundColor":t,"-").concat(n))||(o=u.RichUtils.toggleInlineStyle(o,"".concat(t.toLowerCase(),"-").concat(n)),D(t,e,n)),o}function M(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?D("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?D("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?D("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&D("fontFamily","fontFamily",e.substr(11))})}function N(e,t,n){e=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(e&&0<e.size)return e.get(0)}function 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 T}),t.d(e,"toggleCustomInlineStyle",function(){return I}),t.d(e,"getSelectionEntity",function(){return x}),t.d(e,"extractInlineStyle",function(){return M}),t.d(e,"removeAllInlineStyles",function(){return 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 Oi:switch(e=e.type){case ji:case Ni:case xi:case Di:case ki:case Ai:return e;default:switch(e=e&&e.$$typeof){case Ii:case Mi:case Li:case Ri:case Ti:return e;default:return t}}case Ci:return t}}}function Hi(e){return l(e)===Ni}var Ui={AsyncMode:ji,ConcurrentMode:Ni,ContextConsumer:Ii,ContextProvider:Ti,Element:Oi,ForwardRef:Mi,Fragment:xi,Lazy:Li,Memo:Ri,Portal:Ci,Profiler:Di,StrictMode:ki,Suspense:Ai,isAsyncMode:function(e){return Hi(e)||l(e)===ji},isConcurrentMode:Hi,isContextConsumer:function(e){return l(e)===Ii},isContextProvider:function(e){return l(e)===Ti},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Oi},isForwardRef:function(e){return l(e)===Mi},isFragment:function(e){return l(e)===xi},isLazy:function(e){return l(e)===Li},isMemo:function(e){return l(e)===Ri},isPortal:function(e){return l(e)===Ci},isProfiler:function(e){return l(e)===Di},isStrictMode:function(e){return l(e)===ki},isSuspense:function(e){return l(e)===Ai},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===xi||e===Ni||e===Di||e===ki||e===Ai||e===Pi||"object"==typeof e&&null!==e&&(e.$$typeof===Li||e.$$typeof===Ri||e.$$typeof===Ti||e.$$typeof===Ii||e.$$typeof===Mi||e.$$typeof===zi||e.$$typeof===Bi||e.$$typeof===Ki||e.$$typeof===Fi)},typeOf:l},r=t(function(e,t){});r.AsyncMode,r.ConcurrentMode,r.ContextConsumer,r.ContextProvider,r.Element,r.ForwardRef,r.Fragment,r.Lazy,r.Memo,r.Portal,r.Profiler,r.StrictMode,r.Suspense,r.isAsyncMode,r.isConcurrentMode,r.isContextConsumer,r.isContextProvider,r.isElement,r.isForwardRef,r.isFragment,r.isLazy,r.isMemo,r.isPortal,r.isProfiler,r.isStrictMode,r.isSuspense,r.isValidElementType,r.typeOf,t(function(e){e.exports=Ui}),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 Wi(){}function qi(){}Function.call.bind(Object.prototype.hasOwnProperty),qi.resetWarningCache=Wi;function Vi(){return Q[Zi]=(Q[Zi]||0)+1}function Gi(e){return Array.isArray(e)?e[0]:e}function Yi(e,t){if("function"==typeof e)return na(e,t);null!=e&&(e.current=t)}var $i=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:qi,resetWarningCache:Wi}).PropTypes=e}),Zi="__global_unique_id__",Ji=function(){},Xi=t(function(e,t){t.__esModule=!0,n(g.a);var l=n($i),f=n(Vi);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(Ji);var m=1073741823;t.default=function(e,a){var t,s,n="__create-react-context-"+(0,f.default)()+"__",r=(h(c,s=g.a.Component),c.prototype.getChildContext=function(){var e={};return e[n]=this.emitter,e},c.prototype.componentWillReceiveProps=function(e){var t,n,r,o,i;this.props.value!==e.value&&(t=this.props.value,n=e.value,r=void 0,(o=t)===(i=n)?0===o&&1/o!=1/i:o==o||i==i)&&(r="function"==typeof a?a(t,n):m,0!==(r|=0))&&this.emitter.set(e.value,r)},c.prototype.render=function(){return this.props.children},c);function c(){var e,t;p(this,c);for(var n,r,o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return(e=t=d(this,s.call.apply(s,[this].concat(i)))).emitter=(n=t.props.value,r=[],{on:function(e){r.push(e)},off:function(t){r=r.filter(function(e){return e!==t})},get:function(){return n},set:function(e,t){n=e,r.forEach(function(e){return e(n,t)})}}),d(t,e)}r.childContextTypes=((o={})[n]=l.default.object.isRequired,o),h(u,i=g.a.Component),u.prototype.componentWillReceiveProps=function(e){e=e.observedBits;this.observedBits=null==e?m:e},u.prototype.componentDidMount=function(){this.context[n]&&this.context[n].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?m: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=(ee(Xi),t(function(e,t){t.__esModule=!0;var n=o(g.a),r=o(Xi);function o(e){return e&&e.__esModule?e:{default:e}}t.default=n.default.createContext||r.default,e.exports=t.default})),c=ee(p),Qi=c(),ea=c(),ta=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}rr(e,o);var t=e.prototype;return t.componentWillUnmount=function(){this.referenceNode=null},t.render=function(){return Se.createElement(Qi.Provider,{value:this.referenceNode},Se.createElement(ea.Provider,{value:this.setReferenceNode},this.props.children))},e}(Se.Component),na=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)}},ra={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},oa={},ia=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&&(Yi(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:tr({},n.props.modifiers,{arrow:tr({},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?tr({position:n.state.data.offsets.popper.position},n.state.data.styles):ra}),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:oa}),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 Ei(t,e,n.getOptions()))}),s(i(i(n)),"scheduleUpdate",function(){n.popperInstance&&n.popperInstance.scheduleUpdate()}),n}rr(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&&ko(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(){Yi(this.props.innerRef,null),this.destroyPopperInstance()},t.render=function(){return Gi(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}(Se.Component);function aa(e){var t=e.referenceElement,n=er(e,["referenceElement"]);return Se.createElement(Qi.Consumer,null,function(e){return Se.createElement(ia,tr({referenceElement:void 0!==t?t:e},n))})}s(ia,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1}),Ei.placements;var sa=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){Yi(t.props.innerRef,e),na(t.props.setReferenceNode,e)}),t}rr(e,o);var t=e.prototype;return t.componentWillUnmount=function(){Yi(this.props.innerRef,null)},t.render=function(){return Ji(Boolean(this.props.setReferenceNode)),Gi(this.props.children)({ref:this.refHandler})},e}(Se.Component);function ca(t){return Se.createElement(ea.Consumer,null,function(e){return Se.createElement(sa,tr({setReferenceNode:e},t))})}function ua(e){var n=e.open,t=e.className,r=e.children,o=e.actions,e=De(e),t=ke({OverlayFooter:!0},t),i=Se.createRef();return Se.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?Se.createElement("div",Oe({ref:i},e,{className:t}),o.map(function(e,t){e.label;e=W(e,Ta);return Se.createElement(Te,Oe({type:"button"},e,{key:t}))})):Se.createElement("div",Oe({"data-test":"DesignSystem-OverlayFooter",ref:i},e,{className:t}),r)}function la(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=De(e),t=ke(Ee({OverlayHeader:!0},"OverlayHeader--withBackButton",o||i),t),u=ke((Ee(u={},"OverlayHeader-subheading",!0),Ee(u,"OverlayHeader-subheading--withBackButton",o||i),u));return Se.createElement("div",Oe({"data-test":"DesignSystem-OverlayHeader"},e,{className:t}),Se.createElement("div",{className:"OverlayHeader-headerWrapper"},(o||i)&&Se.createElement(Te,{"data-test":"DesignSystem-OverlayHeader--Button",appearance:"transparent",className:"mr-4",icon:"arrow_back",largeIcon:!0,onClick:s||a}),n&&Se.createElement(pn,{className:c,"data-test":"DesignSystem-OverlayHeader--heading"},n)),r&&Se.createElement(Ie,{"data-test":"DesignSystem-OverlayHeader--Subheading",appearance:"subtle",className:u},r))}function fa(e){var t=e.children,n=e.className,e=De(e),n=ke({OverlayBody:!0},n);return Se.createElement("div",Oe({"data-test":"DesignSystem-OverlayBody"},e,{className:n}),t)}function pa(){var e=document.querySelector(".Overlay-wrapper");return null===e&&((e=document.createElement("div")).classList.add("Overlay-wrapper"),document.body.appendChild(e)),e}function da(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 ha(e,t,n){"Escape"===e.key&&t&&(n(e),e.preventDefault())}function ma(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=De(e),c=Ce(Se.useState(e.page),2),u=c[0],l=c[1],f=(c=Ce(Se.useState(!1),2))[0],p=c[1],d=(c=Ce(Se.useState(0),2))[0],h=c[1],m=Se.useCallback(Ut(a,o),[d]),a=(Se.useEffect(function(){l(e.page)},[e.page]),ke((Ee(c={},"Pagination",!0),Ee(c,"Pagination--".concat(n),n),c),i)),d=ke((Ee(o={},"Pagination-buttonWrapper",!0),Ee(o,"Pagination-buttonWrapper--next",!0),o)),i=ke((Ee(c={},"Pagination-buttonWrapper",!0),Ee(c,"Pagination-buttonWrapper--previous",!0),c));return Se.useEffect(function(){f&&(1<=u&&u<=r?m(u):(m.cancel(),h(function(e){return e+1})))},[u]),Se.createElement("div",Oe({"data-test":"DesignSystem-Pagination"},s,{className:a}),Se.createElement("div",{className:i},Se.createElement(Te,{onClick:function(){return t("first")},disabled:u<=1,appearance:"transparent",icon:"first_page","data-test":"DesignSystem-Pagination--FirstButton"}),Se.createElement(Te,{onClick:function(){return t("prev")},disabled:u<=1,icon:"navigate_before","data-test":"DesignSystem-Pagination--PrevButton",className:"ml-4 mr-3"})),"jump"===n&&Se.createElement("div",{className:"Pagination-pageIndex"},Se.createElement(bn,{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()}}),Se.createElement(Ie,null," of ".concat(r," pages"))),Se.createElement("div",{className:d},Se.createElement(Te,{onClick:function(){return t("next")},disabled:r<=u,icon:"navigate_next","data-test":"DesignSystem-Pagination--NextButton",className:"mr-4 ml-3"}),Se.createElement(Te,{onClick:function(){return t("last")},disabled:r<=u,appearance:"transparent",icon:"last_page","data-test":"DesignSystem-Pagination--LastButton"})))}function ga(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=$(m)).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=ye(c,t,f))&&(d({startDate:r}),m&&(o=(r=$(m)).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=ye(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=ye(c,t,f))&&!isNaN(r.getTime())&&(d({startDate:r}),m)&&(o=(r=$(m)).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=ye(c,t,f))&&!isNaN(i.getTime())&&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 q(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,m=p.endDate,g=p.startError,y=p.endError,v=V[c],b=u.placeholderChar||"_",w=l.placeholderChar||"_",g=u.error||u.required&&g&&e,y=l.error||l.required&&y&&e,S=void 0===u.caption?"Invalid value":u.caption,_=void 0===l.caption?"Invalid value":l.caption,E=u.label,O=l.label;return Se.createElement(Pn,{"data-test":"DesignSystem-DateRangePicker-InputTrigger"},Se.createElement(x,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--startDate"},E&&Se.createElement(En,{required:u.required,withInput:!0},E),Se.createElement(Sn,Oe({icon:"events",placeholder:c},u,{mask:v,value:h?C(c,h):e?Sn.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:g,caption:g?S:"",validators:[s],clearOnEmptyBlur:!0}))),Se.createElement(x,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--endDate"},O&&Se.createElement(En,{required:l.required,withInput:!0},O),Se.createElement(Sn,Oe({icon:"events",placeholder:c},l,{mask:v,value:m?C(c,m):e?Sn.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:y,caption:y?_:"",validators:[s],clearOnEmptyBlur:!0}))))}function ya(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=J[s],n=c.error||c.required&&(n||t)&&e,t=void 0===c.caption?"Invalid value":c.caption,o=c.label,h=void 0===(m=c.placeholderChar)?"_":m,m=Sn.utils.getDefaultValue(r,h).split(" - "),g=p||m[0],m=d||m[1];return Se.createElement(Pn,{"data-test":"DesignSystem-DateRangePicker-SingleInputTrigger"},Se.createElement(x,null,o&&Se.createElement(En,{required:c.required,withInput:!0},o),Se.createElement(Sn,Oe({icon:"events",placeholder:"".concat(s," - ").concat(s)},c,{mask:r,value:a||f||e?"".concat(g," - ").concat(m):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=ye(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=ye(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=ye(s,r,u),a=ye(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=Ce(e.split(" - "),2),t=e[0],e=e[1];return q(u,t,s)&&q(u,e,s)}],clearOnEmptyBlur:!0}))))}function va(e){var t=new Date;return new Date(t.setDate(e))}function ba(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 wa(e){e.preventDefault()}function Sa(){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!Ma(t)&&e&&e.apply(void 0,[t].concat(n)),Ma(t)})}}function _a(e,t){switch(t.type){case"focus":return _e(_e({},e),{},{isFocused:!0});case"blur":return _e(_e({},e),{},{isFocused:!1});case"openDialog":return _e(_e({},e),{},{isFileDialogActive:!0});case"closeDialog":return _e(_e({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return _e(_e({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return _e(_e({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return _e(_e({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}var Ea=function(){e(n,Se["Component"]);var t=h(n);function n(e){var o;return d(this,n),Ee(G(o=t.call(this,e)),"triggerRef",void 0),Ee(G(o),"popupRef",void 0),Ee(G(o),"hoverableDelay",void 0),Ee(G(o),"_timer",void 0),Ee(G(o),"_throttleWait",void 0),Ee(G(o),"offsetMapping",void 0),Ee(G(o),"togglePopper",function(e,t){var n=o.props,r=n.open;(0,n.onToggle)(void 0===t?!r:t,e)}),Ee(G(o),"doesEventContainsElement",function(e,t){t=t.current;return t&&t.contains(e.target)}),Ee(G(o),"getUpdatedStyle",function(e,t,n){var r=_e(_e({},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=Se.createRef(),o.popupRef=Se.createRef(),o.getPopperChildren=o.getPopperChildren.bind(G(o)),o.mouseMoveHandler=o.mouseMoveHandler.bind(G(o)),o.handleMouseEnter=o.handleMouseEnter.bind(G(o)),o.handleMouseLeave=o.handleMouseLeave.bind(G(o)),o.boundaryScrollHandler=o.boundaryScrollHandler.bind(G(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&&this.props.boundaryElement.addEventListener("scroll",this.boundaryScrollHandler)}},{key:"removeBoundaryScrollHandler",value:function(){this.props.boundaryElement&&this.props.boundaryElement.removeEventListener&&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=ke("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 Se.createElement(In,Oe({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=_e(_e({},s?this.getUpdatedStyle(o,i,s):o),{},{zIndex:f}),o="",p=(a?o=ke((Ee(f={},"".concat(a.open),this.state.isOpen),Ee(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), fadeOut 100ms")},s=_e(_e(_e({},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 Se.cloneElement(c,a?_e(_e({},p),{},{className:o}):_e({},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 Se.createElement(ta,null,Se.createElement("style",null,a),Se.createElement(ca,{innerRef:this.triggerRef},function(e){e=e.ref;return t.getTriggerElement(e)}),i&&r&&v.createPortal(Se.createElement(aa,{placement:n,innerRef:this.popupRef,modifiers:{preventOverflow:{boundariesElement:e||document.body},hide:{enabled:o}}},this.getPopperChildren),document.body),i&&!r&&Se.createElement(aa,{placement:n,innerRef:this.popupRef},this.getPopperChildren))}}]),n}(),Oa=(Ee(Ea,"defaultProps",{on:"click",offset:"medium",closeOnBackdropClick:!0,hoverable:!0,appendToBody:!0,style:{}}),["position","customStyle","dark","children","onToggle","className","hideOnReferenceEscape","boundaryElement"]),Ca=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,Oa),l=Ce(Se.useState(!!e.open),2),f=l[0],p=l[1],l=Ce(Se.useState(!1),2),d=l[0],h=l[1],l=(Se.useEffect(function(){void 0!==e.open&&p(e.open)},[e.open]),Se.useCallback(function(e){p(e)},[])),r=(Se.useEffect(function(){d||"current"in u&&u.current&&h(!0)},[u]),ke(Ee({Popover:!0},"Popover--dark",r),a)),a=Se.createElement("div",{"data-test":"DesignSystem-Popover",className:r,"data-layer":!0,"data-opened":f},o);return Se.createElement(Ea,Oe({},c,{init:d,boundaryElement:"current"in u?u.current:u,open:f,hide:s,style:n,onToggle:i||l,placement:t}),a)},xa=(Ca.displayName="Popover",Ca.defaultProps=Object.assign({},te(Ea.defaultProps,["appendToBody","trigger","hoverable","on","open","closeOnBackdropClick","offset","closeOnScroll"],!0),{offset:"large",position:"bottom",hideOnReferenceEscape:!0,customStyle:{}}),["children","tooltip","showTooltip"]),ka={bottom:"bottom",top:"top","top-start":"top","top-end":"top","bottom-start":"bottom","bottom-end":"bottom",left:"left",right:"right"},Da=function(e){var t=e.children,n=e.tooltip,r=e.showTooltip,o=W(e,xa);return r?(r=Se.createElement("div",{className:"Tooltip"},Se.createElement(Ie,{className:"Tooltip-text",appearance:"white"},n)),Se.createElement(Ca,Oe({trigger:t,on:"hover",offset:"medium"},o,{animationClass:{open:"Tooltip-animation-open-".concat(ka[e.position]),close:"Tooltip-animation-close-".concat(ka[e.position])},className:"Tooltip-container"}),r)):t},Ta=(Da.defaultProps=Object.assign({},te(Ca.defaultProps,["trigger","on","open","offset","onToggle","dark","customStyle","closeOnBackdropClick","hideOnReferenceEscape","closeOnScroll"]),{hoverable:!1,showTooltip:!0}),["label"]),f=(ua.displayName="OverlayFooter",la.displayName="OverlayHeader",fa.defaultProps={stickFooter:!0,withFooter:!0},fa.displayName="OverlayBody",new(function(){function e(){d(this,e),Ee(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}())),o=(Object.freeze(f),function(){e(r,Se["Component"]);var t=h(r);function r(e){var n;return d(this,r),Ee(G(n=t.call(this,e)),"modalRef",Se.createRef()),Ee(G(n),"element",void 0),Ee(G(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.modalRef.current);ha(e,t,n.onOutsideClickHandler)}),n.element=pa(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(G(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=da({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=da({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=ke({Modal:!0,"Modal--open":n,"Modal-animation--open":t,"Modal-animation--close":!t},o),o=ke((Ee(o={},"Modal-header",!0),Ee(o,"Modal-header--withSeperator",f),o)),f=ke((Ee(h={},"Modal-footer",!0),Ee(h,"Modal-footer--withSeperator",f),h)),h=ke((Ee(h={},"Row",!0),Ee(h,"Overlay-container",!0),Ee(h,"Overlay-container--open",n),h)),m=c||l||p||u,m=ke((Ee(g={},"Modal-body",!0),Ee(g,"Modal-body--withMargin",!m||!!p),Ee(g,"Modal-body--withPadding",!m||!p),g)),g=De(this.props),h=Se.createElement(Pn,{"data-test":"DesignSystem-ModalContainer",className:h,"data-layer":!0,"data-opened":n,style:{zIndex:e||1001}},Se.createElement(x,Oe({"data-test":"DesignSystem-Modal"},g,{className:t},{small:{size:"3",sizeL:"4",sizeM:"4",sizeXS:"10"},medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"10"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"10"}}[a],{ref:this.modalRef}),(c||u)&&Se.createElement("div",{className:o},Se.createElement(x,null,!u&&Se.createElement(la,Oe({"data-test":"DesignSystem-Modal--header"},c)),!!u&&u),Se.createElement(x,{className:"flex-grow-0"},Se.createElement(Da,{tooltip:"Close",position:"bottom"},Se.createElement(Te,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Modal--CloseButton",onClick:function(e){d&&d(e,"IconClick")}})))),n&&s&&Se.createElement(Se.Fragment,null,c||l||p||u?Se.createElement(fa,{className:m},this.props.children):s),(!!p||!!l)&&Se.createElement(ua,Oe({"data-test":"DesignSystem-Modal--footer"},l,{open:n,className:f}),p))),e=i?Se.createElement(In,{ref:this.modalRef,"data-test":"DesignSystem-Modal--OutsideClick",onOutsideClick:this.onOutsideClickHandler},h):h,g=v.createPortal(e,this.element);return Se.createElement(Se.Fragment,null,g,Se.createElement(ne,{open:this.state.animate,zIndex:r}))}}]),r}()),n=(Ee(o,"defaultProps",{dimension:"medium"}),function(){e(r,Se["Component"]);var t=h(r);function r(e){var n;return d(this,r),Ee(G(n=t.call(this,e)),"modalRef",Se.createRef()),Ee(G(n),"element",void 0),Ee(G(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)})}),Ee(G(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.modalRef.current);ha(e,t,n.onOutsideClickHandler)}),n.element=pa(),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=da({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=ke({FullscreenModal:!0,"FullscreenModal-animation--open":t,"FullscreenModal-animation--close":!t},o),o=ke((Ee(t={},"Overlay-container",!0),Ee(t,"Overlay-container--open",n),t)),t=De(this.props),o=n?Se.createElement("div",{"data-test":"DesignSystem-FullscreenModalContainer",className:o,"data-layer":!0,style:{zIndex:e}},Se.createElement("div",Oe({"data-test":"DesignSystem-FullscreenModal"},t,{className:r,ref:this.modalRef}),Se.createElement(Pn,{className:"justify-content-center"},Se.createElement(x,{medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"12"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"12"}}[i],Se.createElement(Pn,{className:"FullscreenModal-header"},Se.createElement(x,null,!s&&Se.createElement(la,Oe({"data-test":"DesignSystem-FullscreenModal--header"},c)),!!s&&s),Se.createElement(x,{className:"flex-grow-0"},Se.createElement(Da,{tooltip:"Close"},Se.createElement(Te,{icon:"close",appearance:"transparent","data-test":"DesignSystem-FullscreenModal--CloseButton",onClick:function(e){f&&f(e,"IconClick")}})))),Se.createElement(fa,{"data-test":"DesignSystem-FullscreenModal--Body",className:"FullscreenModal-body"},a),(!!u||!!l)&&Se.createElement(ua,Oe({"data-test":"DesignSystem-FullscreenModal--footer"},l,{open:n,className:"FullscreenModal-footer"}),u))))):null,e=v.createPortal(o,this.element);return Se.createElement(Se.Fragment,null,e)}}]),r}()),Ia=(Ee(n,"defaultProps",{dimension:"medium"}),{regular:"6",large:"10"}),u=function(){e(r,Se["Component"]);var t=h(r);function r(e){var n;return d(this,r),Ee(G(n=t.call(this,e)),"sidesheetRef",Se.createRef()),Ee(G(n),"element",void 0),Ee(G(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.sidesheetRef.current);ha(e,t,n.onOutsideClickHandler)}),n.element=pa(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(G(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=da({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=da({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=ke({Sidesheet:!0,"Sidesheet--open":r,"Sidesheet-animation--open":n,"Sidesheet-animation--close":!n},i),n=ke((Ee(m={},"Overlay-container",!0),Ee(m,"fade-in",n),Ee(m,"Overlay-container--open",n),Ee(m,"Overlay-container--close",!n),m)),m=ke((Ee(m={},"Sidesheet-header",!0),Ee(m,"Sidesheet-header--withSeperator",u),m)),u=ke((Ee(g={},"Sidesheet-footer",!0),Ee(g,"Sidesheet-footer--withSeperator",u),Ee(g,"Sidesheet-footer--stickToBottom",l),g)),l=ke((Ee(g={},"Sidesheet-body",!0),Ee(g,"Sidesheet-body--withMargin",!!c&&l),Ee(g,"Sidesheet-body--nextPage",(null==f?void 0:f.backButton)||(null==f?void 0:f.backIcon)),Ee(g,"Sidesheet-body--firstPage",!(null!=f&&f.backButton||null!=f&&f.backIcon)),g)),g=ke((Ee(g={},"Sidesheet-header--shiftRight",(null==f?void 0:f.backButton)||(null==f?void 0:f.backIcon)),Ee(g,"Sidesheet-header--shiftLeft",!(null!=f&&f.backButton||null!=f&&f.backIcon)),g)),y=De(this.props),n=Se.createElement(Pn,{"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}},Se.createElement(x,Oe({"data-test":"DesignSystem-Sidesheet"},y,{className:i,size:Ia[s]}),Se.createElement("div",{className:m},Se.createElement(x,{"data-test":"DesignSystem-Sidesheet--Header"},!d&&Se.createElement(la,Oe({headingClass:g},f)),!!d&&d),Se.createElement(x,{className:"flex-grow-0"},Se.createElement(Da,{tooltip:"Close"},Se.createElement(Te,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Sidesheet--CloseButton",largeIcon:!0,onClick:function(e){h&&h(e,"IconClick")}})))),Se.createElement(fa,{"data-test":"DesignSystem-Sidesheet--OverlayBody",className:l},this.props.children),(!!c||!!p)&&Se.createElement(ua,Oe({"data-test":"DesignSystem-Sidesheet--Footer"},p,{open:r,className:u}),c))),t=a?Se.createElement(In,{ref:this.sidesheetRef,"data-test":"DesignSystem-Sidesheet--OutsideClick",onOutsideClick:this.onOutsideClickHandler},n):n,y=v.createPortal(t,this.element);return Se.createElement(Se.Fragment,null,y,Se.createElement(ne,{open:this.state.animate,zIndex:o}))}}]),r}(),r=(Ee(u,"defaultProps",{dimension:"regular",stickFooter:!1,headerOptions:{}}),function(e){var t=e.title,n=e.description,r=e.className,e=De(e),r=ke({"Modal-description":!0},r);return Se.createElement("div",Oe({"data-test":"DesignSystem-ModalDescription"},e,{className:r}),t&&Se.createElement(Ie,{weight:"strong","data-test":"DesignSystem-ModalDescription--Title"},t),t&&n&&Se.createElement("br",null),n&&Se.createElement(Ie,{"data-test":"DesignSystem-ModalDescription--Description"},n))}),ja=(r.displayName="ModalDescription",ma.displayName="Pagination",ma.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,Se["Component"]);var s=h(c);function c(e){d(this,c),Ee(G(l=s.call(this,e)),"monthsInView",void 0),Ee(G(l),"getDate",function(e,t){var n=l.props.inputFormat;return{startValue:e?C(n,e):"",endValue:t?C(n,t):""}}),Ee(G(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}}),Ee(G(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}),Ee(G(l),"onRangeChangeHandler",function(e,t){l.setState({init:!0,startDate:e,endDate:t,startValue:e?C(l.props.inputFormat,e):"",endValue:t?C(l.props.inputFormat,t):""})}),Ee(G(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=m(e.startDate,t,n),t=m(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=m(this.props.startDate,n,r),n=C(n,r),this.setState({startDate:r,startValue:n})),e.endDate!==this.props.endDate&&(n=(r=this.props).inputFormat,r=r.validators,r=m(this.props.endDate,n,r),n=C(n,r),this.setState({endDate:r,endValue:n})),e.open!==this.props.open&&this.setState({open:this.props.open||!1}),e.yearNav!==this.props.yearNav&&this.setState({yearNav:this.props.yearNav}),e.monthNav!==this.props.monthNav&&this.setState({monthNav:this.props.monthNav}),t.startDate===this.state.startDate&&t.endDate===this.state.endDate||(n=(r=this.props).onRangeChange,e=r.outputFormat,r=(t=this.state).startDate,t=t.endDate,o=(i=this.getErrors(r,t)).startError,i=i.endError,this.setState({startError:o,endError:i}),n&&(a=this.getInRangeError(),s=C(e,r),e=C(e,t),a||o||i?o?n(void 0,i?void 0:t,s,e):n(r,void 0,s,e):n(r,t,s,e)),this.state.startDate&&this.state.endDate&&this.setState({open:!1}))}},{key:"renderCalendar",value:function(){var e=this.props,t=(e.startDate,e.endDate,e.yearNav,e.monthNav,e.open,e.inputFormat),n=(e.outputFormat,e.startInputOptions,e.endInputOptions,e.validators),r=(e.withInput,e.position,e.disabledBefore),o=e.disabledAfter,i=(e.onRangeChange,e.rangeLimit),e=W(e,ja),a=this.state,s=a.startDate,c=a.endDate,u=a.yearNav,a=a.monthNav;return Se.createElement(dt,Oe({},e,{monthsInView:this.monthsInView,rangePicker:!0,startDate:m(s,t,n),endDate:m(c,t,n),disabledBefore:m(r,t,n),disabledAfter:m(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=ke((Ee(e={},"DateRangePicker",!0),Ee(e,"DateRangePicker--".concat(l),l),e));return n?(e=u?Se.createElement(ya,{inputFormat:a,inputOptions:i,validators:c,state:this.state,setState:this.setState.bind(this)}):Se.createElement(ga,{inputFormat:a,startInputOptions:r,endInputOptions:o,validators:c,state:this.state,setState:this.setState.bind(this)}),Se.createElement(Ca,{trigger:e,triggerClass:"w-100",className:l,position:s,appendToBody:!0,open:f,onToggle:this.onToggleHandler},t,this.renderCalendar())):this.renderCalendar()}}]),c}(),c=(Ee(p,"utils",{getCurrentWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:va(t-e+1),endDate:va(t-e+7)}},getPreviousWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:va(t-e-6),endDate:va(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:va(e-90),endDate:va(e)}},getCustomDates:function(){return{startDate:"",endDate:""}},getCurrentYear:function(){return(new Date).getFullYear()},getCurrentMonth:function(){return(new Date).getMonth()}}),Ee(p,"defaultProps",_e(_e({},dt.defaultProps),{},{children:Se.createElement(Se.Fragment,null),contentAlign:"left",monthsInView:void 0,position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[M],inputOptions:{label:"Date"},startInputOptions:{label:"Start Date"},endInputOptions:{label:"End Date"}})),function(e){e=e.children;return Se.createElement(Se.Fragment,null,e)}),Na=(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}))}),Ma=function(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble},Aa=function(e){return null!=e},Pa=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)}},Ra=function(e){return{type:"FILE_TOO_LARGE",message:"File is larger than ".concat(e," bytes")}},La=function(e){return{type:"FILE_TOO_SMALL",message:"File is smaller than ".concat(e," bytes")}},Fa=function(e,t){e="application/x-moz-file"===e.type||Na(e,t);return[e,e?null:Pa(t)]},za=function(e,t,n){if(Aa(e.size))if(Aa(t)&&Aa(n)){if(e.size>n)return[!1,Ra(n)];if(e.size<t)return[!1,La(t)]}else{if(Aa(t)&&e.size<t)return[!1,La(t)];if(Aa(n)&&e.size>n)return[!1,Ra(n)]}return[!0,null]},Ba=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"]]),Ka=[".DS_Store","Thumbs.db"];function Ha(){return(Ha=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 Wa.apply(this,arguments)}(n.dataTransfer,n.type):(null!==(t=n).target&&t.target.files?Va(t.target.files):[]).map(function(e){return Ua(e)}));case 1:case"end":return e.stop()}var t},e)}))).apply(this,arguments)}function Ua(e,t){var n,r=function(e){var t=e.name;t&&-1!==t.lastIndexOf(".")&&!e.type&&(t=t.split(".").pop().toLowerCase(),t=Ba.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 Wa(){return(Wa=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=Va(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(Ga));case 6:return o=e.sent,e.abrupt("return",qa(function n(e){return e.reduce(function(e,t){return[].concat(xe(e),xe(Array.isArray(t)?n(t):[t]))},[])}(o)));case 8:return e.abrupt("return",qa(Va(t.files).map(function(e){return Ua(e)})));case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function qa(e){return e.filter(function(e){return-1===Ka.indexOf(e.name)})}function Va(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function Ga(e){var t;return"function"==typeof e.webkitGetAsEntry&&(t=e.webkitGetAsEntry())&&t.isDirectory?Ja(t):Ya(e)}function Ya(e){var t=e.getAsFile();return t?(t=Ua(t),Promise.resolve(t)):Promise.reject("".concat(e," is not a File"))}function $a(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?Ja:function(){return Xa.apply(this,arguments)})(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ja(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($a)),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 Xa(){return(Xa=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=Ua(e,r.fullPath);t(e)},function(e){n(e)})}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Qa(e){function t(){R&&setTimeout(function(){var e;!k.current||(e=k.current.files)&&e.length||(T({type:"closeDialog"}),"function"==typeof _&&_())},300)}function n(e){e.target instanceof HTMLDivElement&&x.current&&x.current.contains(e.target)||(e.preventDefault(),N.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,m=e.multiple,g=e.onDragEnter,y=e.onDragLeave,v=e.onDragOver,b=e.onDrop,w=e.onDropAccepted,S=e.onDropRejected,_=e.onFileDialogCancel,E=e.getFilesFromEvent,O=e.preventDropOnDocument,C=e.validator,x=Object(Se.useRef)(null),k=Object(Se.useRef)(null),D=(e=Ce(Object(Se.useReducer)(_a,is),2))[0],T=e[1],e=D.isFocused,R=D.isFileDialogActive,I=D.draggedFiles,L=Object(Se.useCallback)(function(){k.current&&(T({type:"openDialog"}),k.current.value="",k.current.click())},[T]),F=(Object(Se.useEffect)(function(){return window.addEventListener("focus",t,!1),function(){window.removeEventListener("focus",t,!1)}},[k,R,_]),Object(Se.useCallback)(function(e){x.current&&x.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),L()))},[x,k])),z=Object(Se.useCallback)(function(){T({type:"focus"})},[]),j=Object(Se.useCallback)(function(){T({type:"blur"})},[]),N=Object(Se.useRef)([]),B=(Object(Se.useEffect)(function(){return O&&(document.addEventListener("dragover",wa,!1),document.addEventListener("drop",n,!1)),function(){O&&(document.removeEventListener("dragover",wa),document.removeEventListener("drop",n))}},[x,O]),Object(Se.useCallback)(function(t){t.preventDefault(),t.persist(),N.current=[].concat(xe(N.current),[t.target]),ba(t)&&Promise.resolve(E(t)).then(function(e){Ma(t)||(T({draggedFiles:e,isDragActive:!0,type:"setDraggedFiles"}),g&&g(t))})},[E,g])),K=Object(Se.useCallback)(function(e){if(e.preventDefault(),e.persist(),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return ba(e)&&v&&v(e),!1},[v]),H=Object(Se.useCallback)(function(e){e.preventDefault(),e.persist();var t=N.current.filter(function(e){return x.current&&x.current.contains(e)}),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),0<(N.current=t).length||(T({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),ba(e)&&y&&y(e))},[x,y]),M=Object(Se.useCallback)(function(t){t.preventDefault(),t.persist(),N.current=[],ba(t)&&Promise.resolve(E(t)).then(function(e){var a,s;Ma(t)||(a=[],s=[],e.forEach(function(e){var t=Ce(Fa(e,f),2),n=t[0],t=t[1],r=Ce(za(e,h,d),2),o=r[0],r=r[1],i=C?C(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}))}),T({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))}),T({type:"reset"})},[m,f,h,d,E,b,w,S]),F=Object(Se.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,rs);return _e(Ee({onDragEnter:a(Sa(n,B)),onDragOver:a(Sa(r,K)),onDragLeave:a(Sa(o,H)),onDrop:a(Sa(i,M))},t,x),e)}},[x,F,z,j,B,K,H,M,p]),U=Object(Se.useCallback)(function(e){e.stopPropagation()},[]),z=Object(Se.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,os);return _e(_e({},Ee({accept:f,multiple:m,type:"file",style:{display:"none"},onChange:a(Sa(n,M)),onClick:a(Sa(r,U)),autoComplete:"off",tabIndex:-1},t,k)),e)}},[k,f,m,M,p]),A=0<(j=I.length)&&(P=(A={accept:f,minSize:h,maxSize:d,multiple:m,files:I}).files,r=A.accept,o=A.minSize,i=A.maxSize,!(!A.multiple&&1<P.length))&&P.every(function(e){var t=Ce(Fa(e,r),1)[0],e=Ce(za(e,o,i),1)[0];return t&&e}),P=0<j&&!A,j=P?(s=(j={accept:f,minSize:h,maxSize:d,multiple:m,files:I}).files,c=j.accept,u=j.minSize,l=j.maxSize,!j.multiple&&1<s.length?"TOO_MANY_FILES":(j=s.every(function(e){return!Ce(Fa(e,c),1)[0]}),s=s.every(function(e){return!Ce(za(e,u,l),1)[0]}),j?"FILE_INVALID_TYPE":s?"FILE_TOO_LARGE":"")):"";return _e(_e({},D),{},{isDragAccept:A,isDragReject:P,getRootProps:F,getInputProps:z,rootRef:x,inputRef:k,draggedFiles:I,fileError:j,isFocused:e&&!p,open:a(L)})}function es(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=De(e),a=ke(Ee({},"FileUploaderButton",!0),a);return Se.createElement("div",Oe({},e,{className:a}),Se.createElement(Te,{type:"button",disabled:o,icon:"backup"},r),Se.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 ts(e,t,n){var r=e.sortingList,e=e.updateSortingList,o=(r=xe(r)).findIndex(function(e){return e.name===t});-1!==o&&(r=[].concat(xe(r.slice(0,o)),xe(r.slice(o+1)))),"unsort"!==n&&r.push({name:t,type:n}),e(r)}function ns(e,t,n){(0,e.updateColumnSchema)(t,{pinned:"unpin"!==n?n:void 0})}var rs=["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnterCallback","onDragOverCallback","onDragLeaveCallback","onDropCallback"],os=["refKey","onChange","onClick"],is={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};Qa.displayName="DropzoneBase",Qa.defaultProps={disabled:!1,getFilesFromEvent:function(e){return Ha.apply(this,arguments)},maxSize:1/0,minSize:0,multiple:!0,preventDropOnDocument:!0,validator:function(){return null}};_e(_e({},Qa.defaultProps),{},{type:"standard"}),es.defaultProps={uploadButtonLabel:"Upload files",disabled:!"FileUploaderFormat",multiple:!1},es.displayName="FileUploaderButton",Object.assign({},es.defaultProps,{title:"Upload files",sizeLabel:"Maximum size: 25 MB"});function as(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 ss(e,t,n,r){var o,i=xe(e),a=T(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;(e[s].disabled&&r||!e[s].disabled)&&(i[s]=_e(_e({},i[s]),n))}}catch(e){a.e(e)}finally{a.f()}return i}function cs(e,t){var n=_e({},t);return e.translate&&(t=e.translate(t),n[e.name]=null!==t&&"object"===Z(t)?_e(_e({},n[e.name]),t):t),null!==n[e.name]&&"object"===Z(n[e.name])||(n[e.name]={title:n[e.name]}),n}function us(e,t){return Math.ceil(e/t)}function ls(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 fs(e){return e&&!!e.length}function ps(e){var t=Se.useContext(Os),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,e=e.nestedRowData,h=t.draggable,m=t.separator,g=t.nestedRows,y=t.ref,t=t.withCheckbox,v=o.name,b=o.hidden,w=o.pinned,S=(E={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===(E=o.cellType)?"DEFAULT":E]).width,_=void 0===(_=E.minWidth)?96:_,E=void 0===(E=E.maxWidth)?800:E,O=(x=Ce(Se.useState(!1),2))[0],C=x[1],x=ke({"Grid-cell":!0,"Grid-cell--head":n,"Grid-cell--dragged":O&&h,"Grid-cell--body":!n,"Grid-cell--separator":!r&&(void 0!==o.separator?o.separator:m),"Grid-cell--nestedRow":!n&&0===s&&g});return b?null:Se.createElement("div",{key:"".concat(a,"-").concat(s),className:x,draggable:n&&h,onDragStart:function(e){h&&(C(!0),e.dataTransfer.setData("name",v),w)&&e.dataTransfer.setData("type",w)},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:v,type:w||""}).type)&&d&&d(e.name,t.name)},style:{width:as({ref:y,withCheckbox:t},o.width||S),minWidth:as({ref:y,withCheckbox:t},o.minWidth||_),maxWidth:as({ref:y,withCheckbox:t},o.maxWidth||E)}},n?Se.createElement(xs,{colIndex:s,schema:o,onSelectAll:u,onMenuChange:l,onFilterChange:f,updateColumnSchema:p,reorderColumn:d,setIsDragged:C}):Se.createElement(ks,{rowIndex:a,colIndex:s,data:i,schema:o,expandedState:c,nestedRowData:e}))}function ds(e){function t(e,t,r){var n;return e.length?(n=ke((Ee(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),Ee(n,"Grid-cellGroup--main",!r),n)),Se.createElement("div",{className:n},t&&u?Se.createElement("div",{className:"Grid-cell Grid-cell--head Grid-cell--checkbox"},l?Se.createElement(N,null):Se.createElement(Ot,Oe({},f,{onChange:o}))):null,e.map(function(e,t){var n="left"===r?t:p.length+t;return"right"===r&&(n+=d.length),Se.createElement(ps,{key:"".concat(n),firstCell:!t,colIndex:n,isHead:!0,schema:e,onSelectAll:o,onMenuChange:i,onFilterChange:a,updateColumnSchema:s,reorderColumn:c})}))):null}var n=Se.useContext(Os),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 Se.createElement("div",{className:"Grid-head","data-test":"DesignSystem-GridHead-wrapper"},Se.createElement("div",{className:"Grid-row Grid-row--head"},t(p,!!p.length,"left"),t(d,!p.length&&!!d.length),t(n,!1,"right")))}function hs(e){function t(e,t,r){var n;return e.length?(n=ke((Ee(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),Ee(n,"Grid-cellGroup--main",!r),n)),Se.createElement("div",{className:n,"data-test":"DesignSystem-Grid-cellGroup"},t&&u?Se.createElement("div",{className:"Grid-cell Grid-cell--body Grid-cell--checkbox",onClick:function(e){return e.stopPropagation()}},c?Se.createElement(N,null):Se.createElement(Ot,{checked:!!p._selected,onChange:function(e){h(d,e.target.checked)}})):null,e.map(function(e,t){var n="left"===r?t:w.length+t;return"right"===r&&(n+=_.length),Se.createElement(ps,{key:"".concat(d,"-").concat(n),rowIndex:d,colIndex:n,firstCell:!t,schema:e,data:p,expandedState:[g,y],nestedRowData:E})}))):null}var n,r,o,i,a=(l=Se.useContext(Os)).type,s=l.onRowClick,c=l.loading,u=l.withCheckbox,l=l.nestedRows,f=e.schema,p=e.data,d=e.rowIndex,h=e.onSelect,e=e.className,m=Se.useRef(null),g=(v=Ce(Se.useState(!1),2))[0],y=v[1],v=ke("Grid-row","Grid-row--body",{"Grid-row--selected":p._selected,"Grid-row--disabled":p.disabled}),b=Se.useCallback(function(){"resource"!==a||c||s&&s(p,d)},[p,d]),w=(S=f.filter(function(e){return!e.hidden&&e.pinned})).filter(function(e){return!e.hidden&&"left"===e.pinned}),S=S.filter(function(e){return!e.hidden&&"right"===e.pinned}),_=f.filter(function(e){return!e.hidden&&!e.pinned}),E=(f={data:p,rowIndex:d,expanded:g},O=Se.useContext(Os),n=O.schema,r=O.loading,O=O.nestedRowRenderer,o=f.data,i=f.rowIndex,f=f.expanded,O?O({data:o,schema:n,loading:r,rowIndex:i,expanded:f}):null),O=ke(e,{"Grid-rowWrapper":!0});return Se.createElement("div",{className:O},Se.createElement("div",{"data-test":"DesignSystem-Grid-row",className:v,onClick:b,ref:m},t(w,!!w.length,"left"),t(_,!w.length&&!!_.length),t(S,!1,"right")),l&&g&&Se.createElement("div",{className:"Grid-nestedRow"},E))}function ms(e){var n,t,r,o,i=(d=Se.useContext(Os)).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,Se.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,Se.createElement("div",{className:"Grid-body"},(s&&!i.length?xe(Array(d).map(function(e){return e})):i).map(function(e,t){return t=t,e=e,Se.createElement(hs,{key:t,rowIndex:t,data:e||i[t],schema:n,onSelect:o})})))}function gs(e){var t=e.tooltip;return null!=(e=e.cellData.title)?t?Se.createElement(Da,{tooltip:e,position:"top-start",triggerClass:"w-100 overflow-hidden"},Se.createElement(Ie,{className:"w-100 ellipsis"},e)):Se.createElement(Ie,{className:"w-100 ellipsis"},e):null}function ys(e){return(e=e.cellData.metaList)?Se.createElement("div",{className:"GridCell-metaList","data-test":"DesignSystem-GridCell-metaList"},e.map(function(e,t){return Se.createElement(Ie,{key:t,className:"ellipsis",appearance:"subtle",size:"small"},e)})):null}function vs(e){var t=(e=e.cellData).firstName,n=e.lastName,e=e.title;return t||n?Se.createElement(ce,{className:"mr-5",firstName:t,lastName:n}):e?Se.createElement(ce,{className:"mr-5"},e):null}function bs(e){var t,n,r=e.size,o=e.schema,i=e.loading,e=i?{}:cs(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=ke(Ee({},"GridCell",!0));switch(s){case"DEFAULT":return Se.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--default")},i?Se.createElement(j,{length:"medium","data-test":"DesignSystem-GridCell-placeHolder"}):gs({tooltip:l,cellData:f}));case"WITH_META_LIST":return Se.createElement("div",{className:"".concat(p," GridCell--metaList")},i?Se.createElement(Se.Fragment,null,Se.createElement(j,{length:"medium","data-test":"DesignSystem-GridCell-withMetaList"}),Se.createElement(j,{length:"large",size:"xxs"})):Se.createElement(Se.Fragment,null,gs({tooltip:l,cellData:f}),ys({cellData:f})));case"AVATAR":return i?Se.createElement(N,{className:"GridCell--align-".concat(u),imageSize:"medium",round:!0}):Se.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--avatar"),"data-test":"DesignSystem-GridCell-avatar"},"tight"!==r&&vs({cellData:f}));case"AVATAR_WITH_TEXT":return i?Se.createElement(N,{imageSize:"medium",round:!0},Se.createElement(j,{className:"ml-3",length:"medium"})):Se.createElement("div",{className:"".concat(p," "),"data-test":"DesignSystem-GridCell-avatarWithText"},"tight"!==r&&vs({cellData:f}),gs({tooltip:l,cellData:f}));case"AVATAR_WITH_META_LIST":return i?Se.createElement(N,{imageSize:"medium",round:!0},Se.createElement(j,{className:"ml-3",length:"medium"}),Se.createElement(j,{className:"ml-3",length:"large"})):Se.createElement("div",{className:"".concat(p," GridCell--avatarWithText"),"data-test":"DesignSystem-GridCell-avatarWithMetaList"},"tight"!==r&&vs({cellData:f}),Se.createElement("div",{className:"GridCell-metaListWrapper"},gs({tooltip:l,cellData:f}),ys({cellData:f})));case"ICON":return i?Se.createElement(N,{className:"GridCell--align-".concat(u),imageSize:"small",round:!0}):Se.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)?Se.createElement(A,{name:t}):null));case"STATUS_HINT":return Se.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--statusHint")},i?Se.createElement(N,{className:"w-75 flex-grow-0",imageSize:"small",round:!0},Se.createElement(j,{length:"large"})):(n=(n={cellData:f}).cellData,t=n.statusAppearance,(n=n.title)?Se.createElement(Rn,{appearance:t},n):null))}return null}function ws(e){var t=e.options,n=e.onChange,r=(e=Ce(Se.useState(!1),2))[0],o=e[1],i=(e=Ce(Se.useState(t),2))[0],a=e[1],s=(e=Ce(Se.useState("var(--spacing-8)"),2))[0],c=e[1];return Se.useEffect(function(){a(t)},[r]),Se.createElement("div",{className:"Dropdown"},Se.createElement(Ca,{open:r,onToggle:function(e){o(e)},trigger:Se.createElement(Te,{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(Es(t.length))),triggerClass:"w-100",customStyle:{width:s},className:"Header-draggableDropdown"},Se.createElement("div",{className:"Dropdown-wrapper"},Se.createElement("div",{className:"OptionWrapper"},Se.createElement(Ot,{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 _e(_e({},e),{},{selected:t.target.checked})}))}})),i.map(function(e,r){return Se.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(_s(i,e,r))}},Se.createElement(Ot,{className:"OptionCheckbox",name:e.value,label:e.label,checked:i[r].selected,onChange:function(e){return e=e,t=r,(n=xe(i))[t]=_e(_e({},n[t]),{},{selected:e.target.checked}),void a(n);var t,n}}),Se.createElement(A,{name:"drag_handle",className:"mr-4"}))})),Se.createElement("div",{className:"Dropdown-buttonWrapper"},Se.createElement(Te,{type:"button",className:"mr-4",size:"tiny",onClick:function(){o(!1)}},"Cancel"),Se.createElement(Te,{type:"button",appearance:"primary",size:"tiny",onClick:function(){o(!1),n&&n(i)}},"Apply"))))}function Ss(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===(m=e.filterList)?{}:m,h=e.updateFilterList,m=void 0===(m=e.totalRecords)?0:m,g=e.onSelectAll,y=e.searchPlaceholder,v=e.selectAll,b=e.searchTerm,w=e.updateSearchTerm,S=e.dynamicColumn,_=e.allowSelectAll,E=e.showFilters,e=e.customSelectionLabel,O=(D=Ce(Se.useState(!1),2))[0],C=D[1],x=(D=Ce(Se.useState(!0),2))[0],k=D[1],D=(Se.useEffect(function(){k(!x)},[o]),Se.useEffect(function(){v&&v.checked&&g&&g(!0,O)},[O]),Se.useEffect(function(){v&&!v.checked&&C(!1)},[v]),o.filter(function(e){return e.filters})),T=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,I=(c-1)*u+1,c=Math.min(c*u,m),u=n?"Showing 0 ".concat(e,"s"):l&&r?O?"Selected all ".concat(m," ").concat(e).concat(Es(m)):"Selected ".concat(r," ").concat(e).concat(Es(m)," on this page"):(s?"Showing ".concat(I,"-").concat(c," of "):"Showing ").concat(m," ").concat(e).concat(Es(m));return Se.createElement("div",{className:"Header"},Se.createElement("div",{className:"Header-content Header-content--top"},i&&Se.createElement("div",{className:"Header-search"},Se.createElement(gn,{"data-test":"DesignSystem-Table-Header--withSearch",name:"GridHeader-search",icon:"search",placeholder:y,onChange:function(e){e=e.target.value;w&&w(e)},value:b,onClear:function(){return w&&w("")},disabled:t&&!fs(o),autoComplete:"off"})),E&&0<D.length&&Se.createElement("div",{className:"Header-dropdown"},Se.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 _e(_e({},t),{},{selected:d[n]&&-1!==d[n].findIndex(function(e){return e===t.value})})}):[];return Se.createElement(un,{key:n,withCheckbox:!0,showApplyButton:!0,inlineLabel:t,icon:"filter_list",options:e,onChange:function(e){var t=n;t=_e(_e({},d),{},Ee({},t,e)),h&&h(t)}})}))),f&&Se.createElement("div",{className:"Header-actions"},f)),Se.createElement("div",{className:"Header-content Header-content--bottom"},Se.createElement("div",{className:"Header-label"},!a&&l&&!t&&Se.createElement(Ot,Oe({},v,{onChange:function(e){g&&g(e.target.checked)}})),t?Se.createElement(N,{withImage:!a&&l},Se.createElement(j,{length:"small",size:"s"})):Se.createElement(Se.Fragment,null,Se.createElement(En,null,u),s&&(null==v?void 0:v.checked)&&_&&Se.createElement("div",{className:"ml-4"},O?Se.createElement(Te,{"data-test":"DesignSystem-Table-Header--clearSelectionItemsButton",size:"tiny",onClick:function(){return C(!1)}},"Clear Selection"):Se.createElement(Te,{"data-test":"DesignSystem-Table-Header--selectAllItemsButton",size:"tiny",onClick:function(){return C(!0)}},"Select all ".concat(m," ").concat(e,"s"))))),S&&Se.createElement("div",{className:"Header-hideColumns"},Se.createElement(ws,{options:T,onChange:function(e){e=e.map(function(t){return _e(_e({},o.find(function(e){return e.name===t.value})),{},{hidden:!t.selected})});p&&p(e)}}))))}var _s=function(e,t,n){return t===n?e:t<n?[].concat(xe(e.slice(0,t)),xe(e.slice(t+1,n+1)),[e[t]],xe(e.slice(n+1))):[].concat(xe(e.slice(0,n)),[e[t]],xe(e.slice(n,t)),xe(e.slice(t+1)))},Es=function(e){return 1<e?"s":""},o={showHead:!0,loaderSchema:[],schema:[],data:[],totalRecords:0,type:"data",size:"standard",page:1,pageSize:15,loading:!"FileUploaderList",error:!1,sortingList:[],filterList:{},showFilters:!0},Os=Se.createContext(_e(_e({},o),{},{ref:null})),Cs=Os.Provider,xs=function(e){function t(){return Se.createElement(Se.Fragment,null,Se.createElement(Ie,{weight:"strong",className:"ellipsis--noWrap"},r.displayName),g&&Se.createElement("div",{className:"Grid-sortingIcons"},w?"asc"===w?Se.createElement(A,{name:"arrow_upward"}):Se.createElement(A,{name:"arrow_downward"}):Se.createElement(A,{name:"unfold_more"})))}var n=Se.useContext(Os),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,m=r.sorting,g=void 0===m||m,y=r.name,m=r.filters,v=r.pinned,n=fs(n),b=f.findIndex(function(e){return e.name===y}),w=-1!==b?f[b].type:null,S=Se.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=(g&&(_=[].concat(f,xe(_))),ke({"Grid-headCell":!0,"Grid-headCell--draggable":i})),f=m?m.map(function(t){return _e(_e({},t),{},{selected:p[y]&&-1!==p[y].findIndex(function(e){return e===t.value})})}):[];return Se.createElement("div",{key:y,className:b,ref:S},Se.createElement("div",{className:"Grid-cellContent","data-test":"DesignSystem-Grid-cellContent",onClick:function(){!l&&g&&("asc"===w&&s(y,"sortDesc"),"desc"===w&&s(y,"unsort"),w||s(y,"sortAsc"))}},l&&!n?Se.createElement(N,{withImage:!1},Se.createElement(j,{length:"medium"})):!r.headerCellRenderer&&d?Se.createElement(Da,{position:"top-start",triggerClass:"w-100 overflow-hidden",tooltip:r.displayName},t()):r.headerCellRenderer&&!d?r.headerCellRenderer(o):t()),h&&m&&Se.createElement(Se.Fragment,null,l&&!n?Se.createElement("span",null,Se.createElement(N,null)):Se.createElement("div",null,Se.createElement(un,{menu:!0,showApplyButton:!0,withCheckbox:!0,triggerOptions:{customTrigger:function(){return Se.createElement(Te,{icon:"filter_list",appearance:"transparent"})}},options:f,align:"left",onChange:function(e){return c(y,e)},minWidth:176}))),e&&Se.createElement(Se.Fragment,null,l&&!n?Se.createElement("span",{className:"ml-4"},Se.createElement(N,null)):Se.createElement("div",null,Se.createElement(un,{key:"".concat(y,"-").concat(w,"-").concat(v),menu:!0,optionType:"WITH_ICON",triggerOptions:{customTrigger:function(){return Se.createElement(Te,{icon:"more_vert_filled",appearance:"transparent"})}},options:_,align:"left",onChange:function(e){return s(y,e)},minWidth:176}))),r.resizable&&Se.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=y,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)}}))},ks=function(e){var t=Se.useContext(Os),n=e.data,r=e.schema,o=e.expandedState,i=e.rowIndex,a=e.colIndex,s=e.nestedRowData,e=t.size,c=t.loading,t=t.nestedRows,o=Ce(o,2),u=o[0],l=o[1],o={rowIndex:i,colIndex:a,size:e,schema:r,data:n,loading:c,expanded:u};return Se.createElement("div",{className:"Grid-cellContent"},0===a&&t&&Se.createElement(Se.Fragment,null,s?Se.createElement(A,{className:"Grid-nestedRowTrigger",name:u?"keyboard_arrow_up":"keyboard_arrow_down",size:20,appearance:"default",onClick:function(e){s&&(e.stopPropagation(),l(!u))}}):Se.createElement("span",{className:"Grid-nestedRowPlaceholder"})),r.cellRenderer?r.cellRenderer(o):Se.createElement(bs,Oe({key:"".concat(i,"-").concat(a)},o)))},Ds=(hs.defaultProps={data:{}},function(){e(n,Se["Component"]);var t=h(n);function n(e){var i;d(this,n),Ee(G(i=t.call(this,e)),"gridRef",null),Ee(G(i),"isHeadSyncing",!1),Ee(G(i),"isBodySyncing",!1),Ee(G(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)}}),Ee(G(i),"updateRenderedSchema",function(e){var t=i.props.updateSchema;t&&t(e)}),Ee(G(i),"updateColumnSchema",function(t,e){var n=xe(i.props.schema),r=n.findIndex(function(e){return e.name===t});n[r]=_e(_e({},n[r]),e),i.updateRenderedSchema(n)}),Ee(G(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=_s(e,r,o);i.updateRenderedSchema(e)}),Ee(G(i),"updateSortingList",function(e){var t=i.props.updateSortingList;t&&t(e)}),Ee(G(i),"updateFilterList",function(e){var t=i.props.updateFilterList;t&&t(e)}),Ee(G(i),"onMenuChange",function(e,t){var n,r,o=i.props.sortingList;switch(t){case"sortAsc":ts({sortingList:o,updateSortingList:i.updateSortingList},e,"asc");break;case"sortDesc":ts({sortingList:o,updateSortingList:i.updateSortingList},e,"desc");break;case"unsort":ts({sortingList:o,updateSortingList:i.updateSortingList},e,"unsort");break;case"pinLeft":ns({updateColumnSchema:i.updateColumnSchema},e,"left");break;case"pinRight":ns({updateColumnSchema:i.updateColumnSchema},e,"right");break;case"unpin":ns({updateColumnSchema:i.updateColumnSchema},e,"unpin");break;case"hide":n={updateColumnSchema:i.updateColumnSchema},r=!0,(0,n.updateColumnSchema)(e,{hidden:r})}}),Ee(G(i),"onFilterChange",function(e,t){e=_e(_e({},i.props.filterList),{},Ee({},e,t));i.updateFilterList(e)}),Ee(G(i),"onSelect",function(e,t){var n=i.props.onSelect;n&&n(e,t)}),Ee(G(i),"onSelectAll",function(e){var t=i.props.onSelectAll;t&&t(e.target.checked)}),Ee(G(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=De(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=!fs(f=f)&&l?o:f),f=ke((Ee(o={Grid:"true"},"Grid--".concat(i),i),Ee(o,"Grid--".concat(a),a),o),c);return Se.createElement("div",Oe({className:f},e,{ref:function(e){t.gridRef=e}}),r&&Se.createElement(Cs,{value:_e(_e({},this.props),{},{ref:this.gridRef})},s&&Se.createElement(ds,{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)}),Se.createElement(ms,{key:"".concat(u),schema:l,prevPageInfo:n,updatePrevPageInfo:this.updatePrevPageInfo.bind(this),onSelect:this.onSelect.bind(this)})))}}]),n}()),Ts=(Ee(Ds,"defaultProps",void 0),Ds.defaultProps=o,bs.displayName="GridCell",["children"]),n={type:"data",size:"standard",showHead:!0,showMenu:!0,multipleSorting:!0,headerOptions:{},withPagination:!0,paginationType:"jump",page:1,pageSize:15,draggable:!0,data:[],schema:[],loading:!(Ss.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 Se.createElement(pn,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,Se["Component"]);var o=h(i);function i(e){d(this,i),Ee(G(l=o.call(this,e)),"debounceUpdate",void 0),Ee(G(l),"updateData",function(e){l.state.async&&l.setState({loading:!0}),e?l.debounceUpdate():l.updateDataFn()}),Ee(G(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:ls(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=xe(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=cs(o[r],e),t=cs(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:ls(o,l.props.selectDisabledRow),schema:e,data:o}))}),Ee(G(l),"onSelect",function(e,t){var n=l.state.data,r=l.props.onSelect,o=[e],i=n;0<=e&&(i=ss(n,o,{_selected:t},l.props.selectDisabledRow),l.setState({data:i,selectAll:ls(i,l.props.selectDisabledRow)})),r&&r(o,t,-1===e?[]:i.filter(function(e){return e._selected}))}),Ee(G(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=ss(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:ls(r,l.props.selectDisabledRow)})}),Ee(G(l),"onPageChange",function(e){l.setState({page:e})}),Ee(G(l),"updateSchema",function(e){l.setState({schema:e})}),Ee(G(l),"updateSortingList",function(e){var t=l.props.multipleSorting;l.setState({sortingList:t?xe(e):e.slice(-1),page:1})}),Ee(G(l),"updateFilterList",function(e){l.setState({filterList:e,page:1})}),Ee(G(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:ls([]),searchTerm:void 0},l.debounceUpdate=Ut(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:ls([])})),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:ls([])},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,m=e.pageSize,g=e.pageJumpDebounceDuration,y=e.onRowClick,v=e.loaderSchema,b=e.errorTemplate,w=e.className,e=e.filterPosition,S=De(this.props),_=l.children,l=W(l,Ts),w=w?" ".concat(w):"",E=this.state.totalRecords,O=us(E,m);return Se.createElement("div",Oe({},S,{className:"Table".concat(w),"data-test":"DesignSystem-Table-wrapper"}),u&&Se.createElement("div",{className:"Table-header","data-test":"DesignSystem-Table-header"},Se.createElement(Ss,Oe({},this.state,{updateSchema:this.updateSchema,updateFilterList:this.updateFilterList,updateSearchTerm:this.updateSearchTerm,showHead:t,onSelectAll:this.onSelectAll,withCheckbox:f,withPagination:d,pageSize:m,showFilters:"HEADER"===e},l),_)),Se.createElement("div",{className:"Table-grid"},Se.createElement(Ds,Oe({},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<O,pageSize:m,loaderSchema:v,errorTemplate:b&&b({errorType:this.state.errorType}),onRowClick:y,showFilters:"GRID"===e}))),d&&!this.state.loading&&!this.state.error&&1<O&&Se.createElement("div",{className:"Table-pagination"},Se.createElement(ma,{page:this.state.page,totalPages:us(E,m),type:h,onPageChange:this.onPageChange,pageJumpDebounceDuration:g})))}}]),i}(),Is=(Ee(u,"defaultProps",n),Se.useState,Se.useEffect,Se.useState,{success:"check_circle",info:"info",warning:"warning",alert:"error"}),js=function(e){var t=e.appearance,n=e.className,r=e.description,o=e.size,e=De(e),n=ke(Ee({},"InlineMessage",!0),n),i=ke((Ee(i={},"InlineMessage-icon--warning","warning"===t),Ee(i,"InlineMessage-icon--small","small"===o),Ee(i,"InlineMessage-icon--regular","regular"===o),i)),a=ke(Ee({},"InlineMessage-text--".concat(t),t)),s="small"===o?14:16,c="small"===o?"medium":void 0;return Se.createElement("div",Oe({"data-test":"DesignSystem-InlineMessage"},e,{className:n}),"default"!==t&&Se.createElement(A,{"data-test":"DesignSystem-InlineMessage--Icon",name:Is[t],appearance:t,className:i,size:s}),Se.createElement(Ie,{size:o,weight:c,className:a,"data-test":"DesignSystem-InlineMessage--Description"},r))},Ns=(js.displayName="InlineMessage",js.defaultProps={appearance:"default",description:"",size:"regular"},function(e){var t,n=e.vertical,r=e.appearance,o=e.className,e=De(e),n=ke((Ee(t={},"Divider",!0),Ee(t,"Divider--horizontal",!n),Ee(t,"Divider--vertical",n),Ee(t,"Divider--basic",!n&&"header"!==r),Ee(t,"Divider--header",!n&&"header"===r),t),o);return Se.createElement("hr",Oe({"data-test":"DesignSystem-Divider"},e,{className:n}))}),Ms=(Ns.displayName="Divider",Ns.defaultProps={appearance:"basic",vertical:!1},function(e){var t=e.error,n=e.message,r=e.className,e=De(e),r=ke({"mt-3":!0},r);return n?t?Se.createElement(js,{size:"small",className:r,appearance:"alert",description:n}):Se.createElement("div",Oe({},e,{className:r}),Se.createElement(Ie,{appearance:"subtle",size:"small",weight:"medium"},n)):null}),As=(Ms.displayName="HelpText",["children","type","className","disabled","tabIndex","icon","subtle","size","iconAlign","iconType"]),Ps={tiny:12,regular:16},r=Se.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,f=e.iconType,e=W(e,As),c=ke((Ee(p={},"LinkButton",!0),Ee(p,"LinkButton--".concat(u),u),Ee(p,"LinkButton--default",!c),Ee(p,"LinkButton--subtle",c),Ee(p,"LinkButton--iconAlign-".concat(l),n&&l),Ee(p,"".concat(o),o),p)),p=ke((Ee(o={},"LinkButton-icon",!0),Ee(o,"LinkButton-icon--".concat(l),n&&l),o));return Se.createElement("button",Oe({ref:t,type:r,"data-test":"DesignSystem-LinkButton",className:c,disabled:i,tabIndex:a},e),Se.createElement(Se.Fragment,null,s&&Se.createElement("div",{className:p},Se.createElement(A,{"data-test":"DesignSystem-LinkButton--Icon",name:s,type:f,size:u&&Ps[u]})),n))});r.displayName="LinkButton",r.defaultProps={size:"regular",type:"button",iconAlign:"left"},new Map;function Rs(e){var t=window.getComputedStyle(e);return Math.max(parseInt(t["margin-top"],10),parseInt(t["margin-bottom"],10))+e.getBoundingClientRect().height}function Ls(e,t,n){t=1<arguments.length&&void 0!==t?t:0,n=2<arguments.length&&void 0!==n?n:0;e&&(null===t||null===n?e.style.removeProperty("transform"):e.style.transform="translate(".concat(n,"px, ").concat(t,"px)"))}function Fs(e,t,n){e&&(e.style.transition="transform ".concat(t,"ms").concat(n?" ".concat(n):""))}function zs(r){function e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o=t,i=i||requestAnimationFrame(function(){i=null,r.apply(void 0,xe(o))})}var o,i=null;return e.cancel=function(){i&&cancelAnimationFrame(i)},e}function Bs(t){var e=t.children,n=t.className,r=t.tagName,o=De(t),i=ke({Listbox:!0},n),n=g.a.Children.toArray(e).map(function(e){return g.a.cloneElement(e,{parentProps:_e({},t)})}),a=(e=Ce(g.a.useState(n),2))[0],s=e[1];return g.a.createElement(Gs,{values:a,onChange:function(e){var t,n=e.oldIndex,e=e.newIndex;n=n,e=e,(t=(t=a).slice()).splice(e<0?t.length+e:e,0,t.splice(n,1)[0]),s(t)},renderItem:function(e){var t=e.value,e=e.props;return g.a.createElement("div",Oe({},e,{className:"Listbox-item--draggable"}),t)},renderList:function(e){var t=e.children,e=e.props;return g.a.createElement(r,Oe({"data-test":"DesignSystem-Listbox"},o,{className:i},e),t)}})}function Ks(e){return null==e||null==(e=e.parentNode)||null==(e=e.nextSibling)?void 0:e.firstChild}function Hs(e){return null==e||null==(e=e.parentNode)||null==(e=e.previousSibling)?void 0:e.firstChild}function Us(e,t){for(var n,r=e;r;){if(!(n=r)||"true"!==n.getAttribute("data-disabled")){r.focus();break}r=("down"===t?Ks:Hs)(r)}}function Ws(e){var t,n=e.children,r=e.className,o=e.disabled,i=e.selected,a=e.activated,e=e.tabIndex,s=(u=Se.useContext(ac)).size,c=u.type,u=u.draggable,s=ke((Ee(t={"Listbox-item":!0},"Listbox-item--".concat(s),s),Ee(t,"Listbox-item--".concat(c),c),Ee(t,"Listbox-item--disabled",o),Ee(t,"Listbox-item--selected",i&&"option"===c),Ee(t,"Listbox-item--activated",a&&"resource"===c),t),r);return Se.createElement("div",{"data-disabled":o,"data-test":"DesignSystem-Listbox-ItemWrapper",tabIndex:u?-1:e||0,className:s,onKeyDown:Ys,role:"tablist"},u&&Se.createElement(A,{size:16,appearance:"subtle",name:"drag_indicator",className:"Listbox-item--drag-icon","data-test":"DesignSystem-Listbox-DragIcon"}),n)}function qs(e){return null==(e=e.current)?void 0:e.scrollHeight}var Vs=200,Gs=function(){e(n,Se["Component"]);var t=h(n);function n(e){var a;return d(this,n),Ee(G(a=t.call(this,e)),"listRef",Se.createRef()),Ee(G(a),"ghostRef",Se.createRef()),Ee(G(a),"topOffsets",[]),Ee(G(a),"itemTranslateOffsets",[]),Ee(G(a),"initialYOffset",0),Ee(G(a),"lastScroll",0),Ee(G(a),"lastYOffset",0),Ee(G(a),"lastListYOffset",0),Ee(G(a),"dropTimeout",void 0),Ee(G(a),"needle",-1),Ee(G(a),"afterIndex",-2),Ee(G(a),"state",{itemDragged:-1,itemDraggedOutOfBounds:-1,selectedItem:-1,initialX:0,initialY:0,targetX:0,targetY:0,targetHeight:0,targetWidth:0,scrollingSpeed:0,scrollWindow:!1}),Ee(G(a),"schdOnMouseMove",void 0),Ee(G(a),"schdOnTouchMove",void 0),Ee(G(a),"schdOnEnd",void 0),Ee(G(a),"doScrolling",function(){var e=a.state,t=e.scrollingSpeed,n=e.scrollWindow,r=a.listRef.current;window.requestAnimationFrame(function(){n?window.scrollTo(window.pageXOffset,window.pageYOffset+1.5*t):r.scrollTop+=t,0!==t&&a.doScrolling()})}),Ee(G(a),"getChildren",function(){return a.listRef&&a.listRef.current?Array.from(a.listRef.current.children):[]}),Ee(G(a),"calculateOffsets",function(){a.topOffsets=a.getChildren().map(function(e){return e.getBoundingClientRect().top}),a.itemTranslateOffsets=a.getChildren().map(Rs)}),Ee(G(a),"getTargetIndex",function(t){return a.getChildren().findIndex(function(e){return e===t.target||e.contains(t.target)})}),Ee(G(a),"onMouseOrTouchStart",function(e){a.dropTimeout&&-1<a.state.itemDragged&&(window.clearTimeout(a.dropTimeout),a.finishDrop());var t,n,r,o=(o=e).touches&&o.touches.length||o.changedTouches&&o.changedTouches.length;(o||0===e.button)&&(t=a.getTargetIndex(e),n=a.getChildren()[t],null==(r=e.target)?void 0:r.classList.contains("Listbox-item--drag-icon"))&&(e.preventDefault(),o?(r={passive:!1},n.style.touchAction="none",document.addEventListener("touchend",a.schdOnEnd,r),document.addEventListener("touchmove",a.schdOnTouchMove,r),document.addEventListener("touchcancel",a.schdOnEnd,r)):(document.addEventListener("mousemove",a.schdOnMouseMove),document.addEventListener("mouseup",a.schdOnEnd),(r=a.getChildren()[a.state.itemDragged])&&r.style&&(r.style.touchAction="")),a.onStart(n,(o?e.touches[0]:e).clientX,(o?e.touches[0]:e).clientY,t))}),Ee(G(a),"getYOffset",function(){var e=a.listRef.current?a.listRef.current.scrollTop:0;return window.pageYOffset+e}),Ee(G(a),"onStart",function(e,t,n,r){-1<a.state.selectedItem&&(a.setState({selectedItem:-1}),a.needle=-1);var o=e.getBoundingClientRect(),e=window.getComputedStyle(e);a.calculateOffsets(),a.initialYOffset=a.getYOffset(),a.lastYOffset=window.pageYOffset,a.lastListYOffset=a.listRef.current.scrollTop,a.setState({itemDragged:r,targetX:o.left-parseInt(e["margin-left"],10),targetY:o.top-parseInt(e["margin-top"],10),targetHeight:o.height,targetWidth:o.width,initialX:t,initialY:n})}),Ee(G(a),"onMouseMove",function(e){e.cancelable&&e.preventDefault(),a.onMove(e.clientX,e.clientY)}),Ee(G(a),"onTouchMove",function(e){e.cancelable&&e.preventDefault(),a.onMove(e.touches[0].clientX,e.touches[0].clientY)}),Ee(G(a),"onWheel",function(e){a.state.itemDragged<0||(a.lastScroll=a.listRef.current.scrollTop+=e.deltaY,a.moveOtherItems())}),Ee(G(a),"onMove",function(e,t){if(-1===a.state.itemDragged)return null;Ls(a.ghostRef.current,t-a.state.initialY,a.props.lockVertically?0:e-a.state.initialX),a.autoScrolling(t),a.moveOtherItems()}),Ee(G(a),"moveOtherItems",function(){var e=a.ghostRef.current.getBoundingClientRect(),e=e.top+e.height/2,t=Rs(a.getChildren()[a.state.itemDragged]),n=a.getYOffset();a.initialYOffset!==n&&(a.topOffsets=a.topOffsets.map(function(e){return e-(n-a.initialYOffset)}),a.initialYOffset=n),a.isDraggedItemOutOfBounds()&&a.props.removableByMove?a.afterIndex=a.topOffsets.length+1:a.afterIndex=function(e,t){for(var n,r=0,o=e.length-1;r<=o;){if(!e[(n=Math.floor((o+r)/2))+1]||e[n]<=t&&e[n+1]>=t)return n;e[n]<t&&e[n+1]<t?r=n+1:o=n-1}return-1}(a.topOffsets,e),a.animateItems(-1===a.afterIndex?0:a.afterIndex,a.state.itemDragged,t)}),Ee(G(a),"autoScrolling",function(e){var t=a.listRef.current.getBoundingClientRect(),n=t.top,r=t.bottom,t=t.height,o=window.innerHeight||document.documentElement.clientHeight;o<r&&o-e<Vs?a.setState({scrollingSpeed:Math.round((Vs-(o-e))/10),scrollWindow:!0}):n<0&&e<Vs?a.setState({scrollingSpeed:Math.round((Vs-e)/-10),scrollWindow:!0}):(a.state.scrollWindow&&0!==a.state.scrollingSpeed&&a.setState({scrollingSpeed:0,scrollWindow:!1}),t+20<a.listRef.current.scrollHeight&&(o=0,e-n<Vs?o=Math.round((Vs-(e-n))/-10):r-e<Vs&&(o=Math.round((Vs-(r-e))/10)),a.state.scrollingSpeed!==o)&&a.setState({scrollingSpeed:o}))}),Ee(G(a),"animateItems",function(n,r,o){var i=3<arguments.length&&void 0!==arguments[3]&&arguments[3];a.getChildren().forEach(function(e,t){if(Fs(e,a.props.transitionDuration),r===t&&i){if(r===n)return Ls(e,null);Ls(e,r<n?a.itemTranslateOffsets.slice(r+1,n+1).reduce(function(e,t){return e+t},0):-1*a.itemTranslateOffsets.slice(n,r).reduce(function(e,t){return e+t},0))}else Ls(e,r<n&&r<t&&t<=n?-o:t<r&&n<r&&n<=t?o:null)})}),Ee(G(a),"isDraggedItemOutOfBounds",function(){var e=a.getChildren()[a.state.itemDragged].getBoundingClientRect(),t=a.ghostRef.current.getBoundingClientRect();return Math.abs(e.left-t.left)>t.width?(-1===a.state.itemDraggedOutOfBounds&&a.setState({itemDraggedOutOfBounds:a.state.itemDragged}),!0):(-1<a.state.itemDraggedOutOfBounds&&a.setState({itemDraggedOutOfBounds:-1}),!1)}),Ee(G(a),"onEnd",function(e){e.cancelable&&e.preventDefault(),document.removeEventListener("mousemove",a.schdOnMouseMove),document.removeEventListener("touchmove",a.schdOnTouchMove),document.removeEventListener("mouseup",a.schdOnEnd),document.removeEventListener("touchup",a.schdOnEnd),document.removeEventListener("touchcancel",a.schdOnEnd);e=a.props.removableByMove&&a.isDraggedItemOutOfBounds();!e&&0<a.props.transitionDuration&&-2!==a.afterIndex&&zs(function(){Fs(a.ghostRef.current,a.props.transitionDuration,"cubic-bezier(0.2, 0, 0.38, 0.9)"),a.afterIndex<1&&0===a.state.itemDragged?Ls(a.ghostRef.current,0,0):Ls(a.ghostRef.current,-(window.pageYOffset-a.lastYOffset)-(a.listRef.current.scrollTop-a.lastListYOffset)+(a.state.itemDragged<a.afterIndex?a.itemTranslateOffsets.slice(a.state.itemDragged+1,a.afterIndex+1).reduce(function(e,t){return e+t},0):-1*a.itemTranslateOffsets.slice(a.afterIndex<0?0:a.afterIndex,a.state.itemDragged).reduce(function(e,t){return e+t},0)),0)})(),a.dropTimeout=window.setTimeout(a.finishDrop,e||-2===a.afterIndex?0:a.props.transitionDuration)}),Ee(G(a),"finishDrop",function(){var e=a.props.removableByMove&&a.isDraggedItemOutOfBounds();(e||-2<a.afterIndex&&a.state.itemDragged!==a.afterIndex)&&a.props.onChange({oldIndex:a.state.itemDragged,newIndex:e?-1:Math.max(a.afterIndex,0),targetRect:a.ghostRef.current.getBoundingClientRect()}),a.getChildren().forEach(function(e){Fs(e,0),Ls(e,null),e.style.touchAction=""}),a.setState({itemDragged:-1,scrollingSpeed:0}),a.afterIndex=-2,0<a.lastScroll&&(a.listRef.current.scrollTop=a.lastScroll,a.lastScroll=0)}),Ee(G(a),"onKeyDown",function(e){var t=a.state.selectedItem,n=a.getTargetIndex(e);-1===n||a.props.values[n]&&a.props.values[n].props.disabled||(" "===e.key&&(e.preventDefault(),t===n?(t!==a.needle&&(a.getChildren().forEach(function(e){Fs(e,0),Ls(e,null)}),a.props.onChange({oldIndex:t,newIndex:a.needle,targetRect:a.getChildren()[a.needle].getBoundingClientRect()}),a.getChildren()[a.needle].focus()),a.setState({selectedItem:-1}),a.needle=-1):(a.setState({selectedItem:n}),a.needle=n,a.calculateOffsets())),("ArrowDown"===e.key||"j"===e.key)&&-1<t&&a.needle<a.props.values.length-1&&(e.preventDefault(),n=Rs(a.getChildren()[t]),a.needle++,a.animateItems(a.needle,t,n,!0)),("ArrowUp"===e.key||"k"===e.key)&&-1<t&&0<a.needle&&(e.preventDefault(),n=Rs(a.getChildren()[t]),a.needle--,a.animateItems(a.needle,t,n,!0)),"Escape"===e.key&&-1<t&&(a.getChildren().forEach(function(e){Fs(e,0),Ls(e,null)}),a.setState({selectedItem:-1}),a.needle=-1),("Tab"===e.key||"Enter"===e.key)&&-1<t&&e.preventDefault())}),a.schdOnMouseMove=zs(a.onMouseMove),a.schdOnTouchMove=zs(a.onTouchMove),a.schdOnEnd=zs(a.onEnd),a}return a(n,[{key:"componentDidMount",value:function(){this.calculateOffsets(),document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1,capture:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart)}},{key:"componentDidUpdate",value:function(e,t){t.scrollingSpeed!==this.state.scrollingSpeed&&0===t.scrollingSpeed&&this.doScrolling()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mousedown",this.onMouseOrTouchStart),this.dropTimeout&&window.clearTimeout(this.dropTimeout),this.schdOnMouseMove.cancel(),this.schdOnTouchMove.cancel(),this.schdOnEnd.cancel()}},{key:"render",value:function(){var o=this,i={userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",boxSizing:"border-box",position:"relative"},e=_e(_e({},i),{},{top:this.state.targetY,left:this.state.targetX,width:this.state.targetWidth,height:this.state.targetHeight,backgroundColor:"#ffffff",listStyleType:"none",margin:0,position:"fixed",boxShadow:"0 4px 16px 0 rgba(0, 0, 0, 0.16)"});return Se.createElement(Se.Fragment,null,this.props.renderList({children:this.props.values.map(function(e,t){var n=t===o.state.itemDragged,r=t===o.state.selectedItem,n={key:t,tabIndex:o.props.values[t]&&o.props.values[t].props.disabled?-1:0,onKeyDown:o.onKeyDown,style:_e(_e({},i),{},{visibility:n?"hidden":void 0,zIndex:r?5e3:0})};return o.props.renderItem({value:e,props:n,index:t,isDragged:!1,isSelected:r,isOutOfBounds:!1})}),isDragged:-1<this.state.itemDragged,props:{ref:this.listRef}}),-1<this.state.itemDragged&&v.createPortal(this.props.renderItem({value:this.props.values[this.state.itemDragged],props:{ref:this.ghostRef,style:e,onWheel:this.onWheel},index:this.state.itemDragged,isDragged:!0,isSelected:!1,isOutOfBounds:-1<this.state.itemDraggedOutOfBounds}),document.body))}}]),n}(),Ys=(Ee(Gs,"defaultProps",{transitionDuration:240,lockVertically:!1,removableByMove:!1}),function(e){var t=e.target,n=Ks(t),r=Hs(t);switch(e.key){case"ArrowDown":e.preventDefault(),Us(n,"down");break;case"ArrowUp":e.preventDefault(),Us(r,"up")}}),$s=function(e,t){return t?"nestedList-open-".concat(e," 240ms cubic-bezier(0, 0, 0.38, 0.9)"):"nestedList-close-".concat(e," 160ms cubic-bezier(0.2, 0, 1, 0.9)")},Zs=function(e,t){return"\n @keyframes nestedList-open-".concat(t," {\n from {\n height: 0px;\n }\n to {\n height: ").concat(qs(e),"px;\n }\n }\n\n @keyframes nestedList-close-").concat(t," {\n from {\n height: ").concat(qs(e),"px;\n }\n to {\n height: 0px;\n }\n }\n ")};function Js(e){var t,n,r=e.nestedBody,o=e.expanded,i=(t=o,n=Se.useRef(),Se.useEffect(function(){null!=t&&(n.current=t)},[t]),n.current),a=(e=Ce(Se.useState(o),2))[0],s=e[1],c=(e=Ce(Se.useState(""),2))[0],u=e[1],l=Se.useRef(null),f=Math.random().toString(36).substring(2,6),p=(e=Ce(Se.useState($s(f,o)),2))[0],d=e[1];return Se.useEffect(function(){null!=i&&i!==o&&s(!0),requestAnimationFrame(function(){var e=Zs(l,f);u(e)});var e=$s(f,o);d(e)},[o]),Se.createElement(Se.Fragment,null,Se.createElement("style",null,c),r&&a&&Se.createElement("div",{style:{animation:p,overflow:"hidden",animationFillMode:"forwards"},onAnimationEnd:function(){o||s(!1)},"data-test":"DesignSystem-Listbox--Nested-Item",ref:l},r))}function Xs(e){var t=e.nestedBody,n=e.expanded,r=e.id,o=e.onClick,i=e.value,a=e.tagName,s=W(e,oc),c=(u=Se.useContext(ac)).showDivider,u=u.draggable,u=ke(Ee({},"Listbox-item-wrapper",!u));return Se.createElement(a,Oe({id:r,key:r,"data-test":"DesignSystem-Listbox-Item"},s,{onClick:function(e){o&&o(e,r,i)},"data-value":i,className:u},s),Se.createElement(Ws,e),t&&Se.createElement(Js,{expanded:n,nestedBody:t}),c&&Se.createElement(Ns,{className:"Listbox-divider"}))}function Qs(e){var t=e.children,n=e.className,r=e.draggable,o=e.size,i=e.type,a=e.showDivider,s=e.tagName,c=W(e,ic),u=De(e),n=ke({Listbox:!0},n);return Se.createElement(sc,{value:{size:o,type:i,draggable:r,showDivider:a}},r?Se.createElement(Bs,e):Se.createElement(s,Oe({"data-test":"DesignSystem-Listbox"},u,{className:n},c),t))}function ec(e){var t=(o=Se.useContext(pc)).withSearch,n=o.minHeight,r=o.maxHeight,o=o.multiSelect,i=e.children,e=W(e,dc),t={maxHeight:t?r-33:r,overflowY:"auto",minHeight:n};return Se.createElement(Qs,Oe({"aria-label":"Options item list","aria-multiselectable":o,className:"my-3"},e),Se.createElement("div",{style:t},i))}function tc(e,t,n){var r=null==(r=n.current)?void 0:r.querySelectorAll('[data-test="DesignSystem-Select--Input"]'),n=null==(n=n.current)?void 0:n.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]'),e="down"===e?(null==r?void 0:r[0])||(null==n?void 0:n[0]):null==n?void 0:n[n.length-1];null!=(r=e)&&r.focus(),null!=(n=e)&&n.scrollIntoView({block:"center"}),t&&t(e)}function nc(e){var t=e.children,r=e.option,n=e.checkedState,o=e.onClick,i=void 0===(i=e.withCheckbox)||i,a=e.disabled,e=W(e,yc),s=(w=Se.useContext(pc)).onOptionClick,c=w.selectValue,u=w.setSelectValue,l=w.multiSelect,f=w.setIsOptionSelected,p=w.focusedOption,d=w.setFocusedOption,h=w.setHighlightFirstItem,m=w.setHighlightLastItem,g=w.listRef,y=w.withSearch,v=w.setOpenPopover,b=w.triggerRef,w="checked"===n||-1!==hc(r,c),n="indeterminate"===n;return Se.createElement(Qs.Item,Oe({role:"option",onClick:function(){var e,t,n;a||(o?o(r):(n=l&&Array.isArray(c)?(e=r,t=xe(t=c),-1!==(n=hc(e,t))?t.splice(n,1):t.push(e),t):r,null!=f&&f(!Array.isArray(n)||0!==n.length),null!=u&&u(n),null!=s&&s(n)))},"aria-selected":w,"aria-label":"option item",onKeyDown:function(e){var t=e,n=p,r=d,o=h,i=m,a=g,s=y,c=v,u=b;switch(t.key){case"ArrowUp":t.preventDefault(),gc("up",n,r,a,s);break;case"ArrowDown":t.preventDefault(),gc("down",n,r,a,s);break;case"Enter":mc(n),null!=i&&i(!1),null!=o&&o(!1);break;case"Tab":null!=i&&i(!1),null!=o&&o(!1);break;case"Escape":null!=c&&c(!1),u.current.focus(),null!=r&&r(void 0)}},selected:w,tabIndex:-1,disabled:a,"data-test":"DesignSystem-Select-Option"},e),Se.createElement("div",{className:"d-flex align-items-center"},l&&i&&Se.createElement(Ot,{tabIndex:-1,"aria-checked":n?"mixed":w,checked:w,indeterminate:n}),Se.createElement("div",{className:l?"Select-trigger-text pt-2":"Select-trigger-text"},t)))}function rc(e){var t=e.triggerSize,n=e.placeholder,r=e.withClearButton,o=e.icon,i=e.disabled,a=e.inlineLabel,s=e.iconType,c=e.onClear,u=e.setLabel,e=W(e,vc),l=(b=Se.useContext(pc)).openPopover,f=b.selectValue,p=b.setSelectValue,d=b.isOptionSelected,h=b.setIsOptionSelected,m=b.multiSelect,g=b.setOpenPopover,y=b.setHighlightFirstItem,v=b.setHighlightLastItem,b=b.triggerRef,w=i?"disabled":"default",n=null==n?void 0:n.trim(),u=(f=f,u=u,m?(null==u?void 0:u(f.length))||(f.length<=2?f.map(function(e){return"".concat(e.label)}).join(", "):"".concat(f.length," Selected")):(null==f?void 0:f.label.trim())||""),f=d&&0<u.length?u:n,u=l?"keyboard_arrow_up":"keyboard_arrow_down",t=ke((Ee(n={},"Button",!0),Ee(n,"Select-trigger",!0),Ee(n,"Select-trigger--".concat(t),t),Ee(n,"Select-trigger--placeholder",!d),Ee(n,"Select-trigger--icon",o),Ee(n,"Select-trigger--open",l),n)),n=ke((Ee(n={},"Text",!0),Ee(n,"Text--regular",!0),Ee(n,"Select-trigger-text",!0),n));return Se.createElement("button",Oe({ref:b,onKeyDown:function(e){var t=e,n=g,r=y,o=v;switch(t.key){case"Enter":t.preventDefault(),null!=n&&n(!0),null!=r&&r(!0);break;case"ArrowDown":null!=n&&n(!0),null!=r&&r(!0);break;case"ArrowUp":null!=n&&n(!0),null!=o&&o(!0)}},type:"button",className:t,disabled:i,tabIndex:0,"aria-haspopup":"listbox","aria-expanded":l,"aria-label":"trigger","data-test":"DesignSystem-Select-trigger"},e),Se.createElement("div",{className:"Select-trigger-wrapper"},a&&Se.createElement(Ie,{appearance:"subtle",className:"mr-4 white-space-nowrap"},"".concat(a.trim().charAt(0).toUpperCase()).concat(a.trim().slice(1))),o&&!a&&Se.createElement(A,{appearance:w,className:"d-flex align-items-center mr-4",name:o,type:s}),f&&Se.createElement("span",{className:n},f)),d&&r&&Se.createElement(A,{appearance:w,onClick:function(e){e.stopPropagation(),null!=p&&p(m?[]:{label:"",value:""}),null!=h&&h(!1),c&&c(e)},className:"align-items-center mr-2 ml-3 Select-crossButton",size:12,name:"close","aria-label":"clear selected",type:s,"data-test":"DesignSystem-Select--closeIcon"}),Se.createElement(A,{appearance:w,name:u,type:s}))}var oc=["nestedBody","expanded","id","onClick","value","tagName"],ic=(Xs.displayName="ListboxItem",["children","className","draggable","size","type","showDivider","tagName"]),ac=Se.createContext({size:"standard",type:"resource",draggable:!(Xs.defaultProps={tagName:"li"}),showDivider:!0}),sc=ac.Provider,cc=(Qs.displayName="Listbox",Qs.defaultProps={tagName:"ul",size:"standard",type:"resource",draggable:!1,showDivider:!0},Qs.Item=Xs,Se.createContext({})),uc=function(e){null!=e&&e.click()},lc=function(e,t,n,r,o){var i=null==r?void 0:r.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]'),a=Array.from(i).findIndex(function(e){return e==t});-1===a?"up"===e&&i.length:o&&0===a&&"up"===e||o&&a===i.length-1&&"down"===e?((o=r.current.querySelector('[data-test="DesignSystem-AvatarSelection--Input"]')).focus(),n&&n(o)):((r=i[a="up"===e?(a-1+i.length)%i.length:(a+1)%i.length]).focus(),n&&n(r),r.scrollIntoView({block:"center"}))},p=function(e){return Se.createElement(Qs,e,e.children)},fc=(p.defaultProps={type:"option",showDivider:!{minWidth:256},size:"compressed",tagName:"ul"},["children","value"]),c=function(e){var t=e.children,n=e.value,e=W(e,fc),r=Se.useContext(cc),o=r.setSelectedItems,i=r.selectedItems,a=r.onSelect,l=r.focusedOption,f=r.setFocusedOption,p=r.setHighlightFirstItem,d=r.setHighlightLastItem,h=r.listRef,m=r.withSearch,g=r.setOpenPopover,y=r.triggerRef;return Se.createElement(Qs.Item,Oe({onClick:function(e){var t=n;e.preventDefault(),e=i?xe(i):[],null!=i&&i.includes(t)?e=i.filter(function(e){return e!==t}):e.push(t),null!=o&&o(xe(e)),null!=g&&g(!0),a&&a(e)},onKeyDown:function(e){var t=e,n=l,r=f,o=p,i=d,a=h,s=m,c=g,u=y;switch(t.key){case"ArrowUp":t.preventDefault(),lc("up",n,r,a,s);break;case"ArrowDown":t.preventDefault(),lc("down",n,r,a,s);break;case"Enter":uc(n),null!=i&&i(!1),null!=o&&o(!1);break;case"Escape":null!=c&&c(!1),u.current.focus(),null!=r&&r(void 0)}},selected:null==i?void 0:i.includes(n),"data-test":"DesignSystem-AvatarSelection--Option",tabIndex:-1},e),t)},pc=(c.defaultProps={tagName:"li"},Se.createContext({})),dc=["children"],hc=(ec.defaultProps={type:"option",showDivider:!1,size:"compressed",tagName:"ul"},function(t,e){return Array.isArray(e)?e.findIndex(function(e){return e.value===t.value}):t.value===(null==e?void 0:e.value)?0:-1}),mc=function(e){null!=e&&e.click()},gc=function(e,t,n,r,o){var i=r.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]'),a=Array.from(i).findIndex(function(e){return e==t});-1===a?"up"===e&&i.length:o&&0===a&&"up"===e||o&&a===i.length-1&&"down"===e?((o=r.current.querySelector('[data-test="DesignSystem-Select--Input"]')).focus(),n&&n(o)):((r=i[a="up"===e?(a-1+i.length)%i.length:(a+1)%i.length]).focus(),n&&n(r),r.scrollIntoView({block:"center"}))},yc=["children","option","checkedState","onClick","withCheckbox","disabled"],vc=(nc.defaultProps={withCheckbox:!0},["triggerSize","placeholder","withClearButton","icon","disabled","inlineLabel","iconType","onClear","setLabel"]),bc=(rc.defaultProps={triggerSize:"regular",placeholder:"Select",withClearButton:!0},["onChange","onClear"]),wc=["title","description","children"],Sc=["children"],o=Se.forwardRef(function(e,t){var n=e.children,r=e.onSelect,o=e.width,i=e.maxHeight,a=e.minHeight,s=e.value,c=e.multiSelect,u=void 0!==c&&c,l=e.onOutsideClick,f=e.triggerOptions,c=e.popoverWidth,e=Ce(Se.useState(!1),2),p=e[0],d=e[1],e=(e=s,u?e&&!Array.isArray(e)?[e]:e||[]:e||{label:"",value:""}),e=Ce(Se.useState(e),2),h=e[0],m=e[1],e=Ce(Se.useState(!1),2),g=e[0],y=e[1],e=Se.createRef(),v=Se.useRef(null),b=Ce(Se.useState(!1),2),w=b[0],b=b[1],S=Ce(Se.useState(),2),_=S[0],E=S[1],S=Ce(Se.useState(!1),2),O=S[0],C=S[1],S=Ce(Se.useState(!1),2),x=S[0],k=S[1],S={width:o},c={width:c||o};Se.useImperativeHandle(t,function(){return{setOpen:function(e){null!=d&&d(e)},setFocusFirstItem:function(){p&&(requestAnimationFrame(function(){return tc("down",E,v)}),C(!0))},setFocusLastItem:function(){p&&(requestAnimationFrame(function(){return tc("up",E,v)}),k(!0))}}}),Se.useEffect(function(){p||(C(!1),k(!1))},[p]),Se.useEffect(function(){O&&p&&requestAnimationFrame(function(){return tc("down",E,v)})},[O]),Se.useEffect(function(){x&&p&&requestAnimationFrame(function(){return tc("up",E,v)})},[x]),Se.useEffect(function(){s&&(m(s),y(Array.isArray(s)?0<s.length:0<s.value.trim().length))},[s]);return Se.createElement(pc.Provider,{value:{openPopover:p,setOpenPopover:d,selectValue:h,setSelectValue:m,isOptionSelected:g,setIsOptionSelected:y,onOptionClick:function(e){null!=r&&r(e),u||d(!1)},maxHeight:i,minHeight:a,withSearch:w,setWithSearch:b,multiSelect:u,listRef:v,triggerRef:e,focusedOption:_,setFocusedOption:E,setHighlightFirstItem:C,setHighlightLastItem:k}},Se.createElement("div",{"data-test":"DesignSystem-Select","aria-haspopup":"listbox","aria-expanded":p,style:S},Se.createElement(Ca,{open:p,onToggle:function(e){f&&f.disabled?d(!1):(C(e),d(e))},className:"mt-3",triggerClass:"d-block",customStyle:c,trigger:Se.createElement(rc,Oe({"aria-controls":"select-listbox"},f))},Se.createElement(In,{onOutsideClick:function(){null!=l&&l()}},Se.createElement("div",{role:"listbox",id:"select-listbox",tabIndex:0,ref:v},n)))))});o.displayName="Select",o.defaultProps={maxHeight:256,width:176},o.Option=nc,o.List=ec,o.SearchInput=function(e){var t=Se.useContext(pc),n=t.setWithSearch,r=t.maxHeight,s=t.listRef,c=t.setFocusedOption,u=t.setOpenPopover,l=t.triggerRef,o=e.onChange,i=e.onClear,t=W(e,bc);Se.useEffect(function(){null!=n&&n(!0)},[r]);return Se.createElement("div",{className:"Select-inputWrapper"},Se.createElement(gn,Oe({},t,{icon:"search",onKeyDown:function(e){var t,n=e,e=s,r=c,o=u,i=l,a=null==(e=e.current)?void 0:e.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');switch(n.key){case"ArrowUp":n.preventDefault(),t=a[a.length-1];break;case"ArrowDown":n.preventDefault(),t=a[0];break;case"Escape":null!=o&&o(!1),i.current.focus(),null!=r&&r(void 0)}null!=(e=t)&&e.focus(),null!=(e=t)&&e.scrollIntoView({block:"center"}),r&&r(t)},autoFocus:!0,onChange:function(e){o&&o(e.target.value)},onClear:function(e){i&&i(e)},autoComplete:"off","aria-label":"Search","aria-haspopup":"listbox",className:"Select-input","data-test":"DesignSystem-Select--Input"})))},o.EmptyTemplate=function(e){var t=Se.useContext(pc),n=t.maxHeight,t=t.withSearch,r=e.title,o=e.description,i=e.children,e=W(e,wc);return Se.createElement("div",Oe({className:"px-7 d-flex justify-content-center align-items-center",style:{minHeight:t?n-33:n},"data-test":"DesignSystem-Select-EmptyState--wrapper","aria-live":"polite",role:"alert"},e),Se.createElement("div",{"aria-labelledby":r,"aria-describedby":o,className:"d-flex flex-column justify-content-center align-items-center"},r&&Se.createElement(Ie,{id:r,role:"heading",className:"text-align-center mb-3",weight:"strong"},r),o&&Se.createElement(Ie,{id:o,className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},o),i))},o.Footer=function(e){var t=e.children,e=W(e,Sc);return Se.createElement("div",Oe({className:"Select-buttonWrapper"},e),t)}}.call(this,Ec(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 m(e,t){t=u.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return u.EditorState.push(e,t,"change-block-data")}function g(e){var r=new o.Map({}),t=f(e);if(t&&0<t.size)for(var n=0;n<t.size&&"break"!==function(e){var n=t.get(e).getData();if(!n||0===n.size)return r=r.clear(),"break";if(0===e)r=n;else if(r.forEach(function(e,t){n.get(t)&&n.get(t)===e||(r=r.delete(t))}),0===r.size)return r=r.clear(),"break"}(n);n+=1);return r}var y=Object(o.Map)({code:{element:"pre"}}),v=u.DefaultDraftBlockRenderMap.merge(y);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 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 C(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"===O(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){I[e]["".concat(e.toLowerCase(),"-").concat(n)]=E({},"".concat(t),n)}function T(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(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}({},I.color,{},I.bgcolor,{},I.fontSize,{},I.fontFamily,{CODE:I.CODE,SUPERSCRIPT:I.SUPERSCRIPT,SUBSCRIPT:I.SUBSCRIPT})}var I={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 j(e,t,n){var r=e.getSelection(),o=Object.keys(I[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 N(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 M(e,t,n){e=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(e&&0<e.size)return e.get(0)}function A(n,c){if(n&&c&&0<c.length){var e=function(){var e=n.getSelection(),o={};if(e.isCollapsed())return c.forEach(function(e){o[e]=function(t){var e=n.getCurrentInlineStyle().toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(e&&0<e.size)return e.get(0)}(e)}),{v:o};var i=e.getStartOffset(),a=e.getEndOffset(),s=f(n);if(0<s.size){for(var t=0;t<s.size;t+=1)!function(n){var e=0===n?i:0,t=n===s.size-1?a:s.get(n).getText().length;e===t&&0===e?(e=1,t=2):e===t&&--e;for(var r=e;r<t;r+=1)!function(t){t===e?c.forEach(function(e){o[e]=M(s.get(n),e,t)}):c.forEach(function(e){o[e]&&o[e]!==M(s.get(n),e,t)&&(o[e]=void 0)})}(r)}(t);return{v:o}}}();if("object"===O(e))return e.v}return{}}function P(t){var e=t.getCurrentInlineStyle(),n=t.getCurrentContent();return e.forEach(function(e){n=u.Modifier.removeInlineStyle(n,t.getSelection(),e)}),u.EditorState.push(t,n,"change-inline-style")}t.d(e,"isListBlock",function(){return b}),t.d(e,"changeDepth",function(){return w}),t.d(e,"handleNewLine",function(){return S}),t.d(e,"getEntityRange",function(){return k}),t.d(e,"getCustomStyleMap",function(){return T}),t.d(e,"toggleCustomInlineStyle",function(){return j}),t.d(e,"getSelectionEntity",function(){return x}),t.d(e,"extractInlineStyle",function(){return N}),t.d(e,"removeAllInlineStyles",function(){return P}),t.d(e,"getSelectionInlineStyle",function(){return C}),t.d(e,"getSelectionCustomInlineStyle",function(){return A}),t.d(e,"getSelectedBlocksMap",function(){return l}),t.d(e,"getSelectedBlocksList",function(){return f}),t.d(e,"getSelectedBlock",function(){return c}),t.d(e,"getBlockBeforeSelectedBlock",function(){return n}),t.d(e,"getAllBlocks",function(){return r}),t.d(e,"getSelectedBlocksType",function(){return i}),t.d(e,"removeSelectedBlocksStyle",function(){return a}),t.d(e,"getSelectionText",function(){return s}),t.d(e,"addLineBreakRemovingSelection",function(){return p}),t.d(e,"insertNewUnstyledBlock",function(){return d}),t.d(e,"clearEditorContent",function(){return h}),t.d(e,"setBlockData",function(){return m}),t.d(e,"getSelectedBlocksMetadata",function(){return g}),t.d(e,"blockRenderMap",function(){return v})}],o.c=s,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2))},function(e,t,n){var a;
|
|
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)&&!F(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 F(e){return u(e)||f(e)}function z(e){return!!(e&&e[U])}e(s,c),e(L,c),e(r,c),c.isIterable=l,c.isKeyed=u,c.isIndexed=f,c.isAssociative=F,c.isOrdered=z,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 Te(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 Te(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 Te(e,t,n,r){var o=e._cache;if(o){var i=o.length-1;var a=0;return new y(function(){var e=o[n?i-a:a];return a++>i?g():m(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function je(e,t){return t?Ie(t,e,"",{"":e}):Me(e)}function Ie(n,r,e,t){if(Array.isArray(r))return n.call(t,e,_(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)||z(n)!==z(e))return false;if(n.size===0&&e.size===0)return true;var r=!F(n);if(z(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 Fe(){}function ze(){}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(Fe,Re),e(ze,Re),Re.Keyed=Le,Re.Indexed=Fe,Re.Set=ze;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)&&!z(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 je(e)});r.push(a)}return Ot(e,t,r)}function Et(e,t,n){return e&&e.mergeDeep&&l(t)?e.mergeDeep(t):E(e,t)?e:t}function Ct(o){return function(e,t,n){if(e&&e.mergeDeepWith&&l(t))return e.mergeDeepWith(o,t);var r=o(e,t,n);return E(e,r)?e:r}}function Ot(e,o,n){n=n.filter(function(e){return e.size!==0});if(n.length===0)return e;if(e.size===0&&!e.__ownerID&&n.length===1)return e.constructor(n[0]);return e.withMutations(function(r){var e=o?function(t,n){r.update(n,v,function(e){return e===v?t:o(e,t,n)})}:function(e,t){r.set(t,e)};for(var t=0;t<n.length;t++)n[t].forEach(e)})}function xt(e,t,n,r){var o=e===v;var i=t.next();if(i.done){var a=o?n:e;var s=r(a);return s===a?e:s}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 Tt(e,t,n,r){var o=e.length+1;if(r&&t+1===o){e[t]=n;return e}var i=new Array(o);var a=0;for(var s=0;s<o;s++)if(s===t){i[s]=n;a=-1}else i[s]=e[s+a];return i}function jt(e,t,n){var r=e.length-1;if(n&&t===r){e.pop();return e}var o=new Array(r);var i=0;for(var a=0;a<r;a++){if(a===t)i=1;o[a]=e[a+i]}return o}a[rt]=true,a[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):jt(p,f,y):Tt(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,Fe),n.of=function(){return this(arguments)},n.prototype.toString=function(){return this.__toString("List [","]")},n.prototype.get=function(e,t){e=J(this,e);if(e>=0&&e<this.size){e+=this._origin;var n=Vt(this,e);return n&&n.array[e&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={},Ft,zt;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 Ft||(Ft=Kt(0,0,b))}function Ut(e,t,n){t=J(e,t);if(t!==t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Gt(e,t).set(0,n):Gt(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail;var o=e._root;var i=G(V);if(t>=$t(e._capacity))r=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 je(e)});r.push(s)}if(o>e.size)e=e.setSize(o);return Ot(e,t,r)}function $t(e){return e<p?0:e-1>>>b<<b}function D(t){return t===null||t===undefined?Xt():Zt(t)?t:Xt().withMutations(function(n){var e=s(t);O(e.size);e.forEach(function(e,t){return n.set(t,e)})})}function Zt(e){return nt(e)&&z(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 zt||(zt=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=(z(r)?D():x()).asMutable();r.__iterate(function(t,n){a.update(e.call(o,t,n,r),function(e){return e=e||[],e.push(i?[n,t]:t),e})});var t=Cn(r);return a.map(function(e){return T(r,t(e))})}function fn(s,e,t,c){var n=s.size;if(e!==undefined)e=e|0;if(t!==undefined)t=t|0;if(Q(e,t,n))return s;var u=ee(e,n);var r=te(t,n);if(u!==u||r!==r)return fn(s.toSeq().cacheResult(),e,t,c);var o=r-u;var l;if(o===o)l=o<0?0:o;var i=On(s);i.size=l===0?l:s.size&&l||undefined;if(!c&&_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 T(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 j(r,o){var i;var a=function e(t){if(t instanceof a)return t;if(!(this instanceof a))return new a(t);if(!i){i=true;var n=Object.keys(r);In(s,n);s.size=n.length;s._name=o;s._keys=n;s._defaultValues=r}this._map=x(t)};var s=a.prototype=Object.create(I);s.constructor=a;return a}e(D,x),D.of=function(){return this(arguments)},D.prototype.toString=function(){return this.__toString("OrderedMap {","}")},D.prototype.get=function(e,t){var n=this._map.get(e);return n!==undefined?this._list.get(n)[1]:t},D.prototype.clear=function(){if(this.size===0)return this;if(this.__ownerID){this.size=0;this._map.clear();this._list.clear();return this}return Xt()},D.prototype.set=function(e,t){return Qt(this,e,t)},D.prototype.remove=function(e){return Qt(this,e,v)},D.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},D.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},D.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},D.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);var n=this._list.__ensureOwner(e);if(!e){this.__ownerID=e;this._map=t;this._list=n;return this}return Jt(t,n,e,this.__hash)},D.isOrderedMap=Zt,D.prototype[U]=true,D.prototype[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(j,Le),j.prototype.toString=function(){return this.__toString(jn(this)+" {","}")},j.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},j.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},j.prototype.clear=function(){if(this.__ownerID){this._map&&this._map.clear();return this}var e=this.constructor;return e._empty||(e._empty=Tn(this,ht()))},j.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+jn(this));var n=this._map&&this._map.set(e,t);if(this.__ownerID||n===this._map)return this;return Tn(this,n)},j.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);if(this.__ownerID||t===this._map)return this;return Tn(this,t)},j.prototype.wasAltered=function(){return this._map.wasAltered()},j.prototype.__iterator=function(e,t){var n=this;return s(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},j.prototype.__iterate=function(e,t){var n=this;return s(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},j.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);if(!e){this.__ownerID=e;this._map=t;return this}return Tn(this,t,e)};var I=j.prototype;function Tn(e,t,n){var r=Object.create(Object.getPrototypeOf(e));r._map=t;r.__ownerID=n;return r}function jn(e){return e._name||e.constructor.name||"Record"}function In(e,t){try{t.forEach(Mn.bind(undefined,e))}catch(e){}}function Mn(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){Ae(this.__ownerID,"Cannot set on an immutable record.");this.set(t,e)}})}function M(n){return n===null||n===undefined?Fn():Nn(n)&&!z(n)?n:Fn().withMutations(function(t){var e=r(n);O(e.size);e.forEach(function(e){return t.add(e)})})}function Nn(e){return!!(e&&e[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,ze),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 zn(vn(this,e))},M.prototype.sortBy=function(e,t){return zn(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 Fn(){return An||(An=Ln(ht()))}function zn(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)&&z(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=Fn,N.__make=Ln,e(zn,M),zn.of=function(){return this(arguments)},zn.fromKeys=function(e){return this(s(e).keySeq())},zn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},zn.isOrderedSet=Bn;var Kn=zn.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,Fe),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 Fe.prototype.slice.call(this,e,t);var o=this.size-n;var i=this._head;while(n--)i=i.next;if(this.__ownerID){this.size=o;this._head=i;this.__hash=undefined;this.__altered=true;return this}return $n(o,i)},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 zn(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 T(this,hn(this,e))},includes:function(t){return this.some(function(e){return E(e,t)})},entries:function(){return this.__iterator(oe)},every:function(r,o){O(this.size);var i=true;this.__iterate(function(e,t,n){if(!r.call(o,e,t,n)){i=false;return false}});return i},filter:function(e,t){return T(this,cn(this,e,t,true))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(r,o){var i;this.__iterate(function(e,t,n){if(r.call(o,e,t,n)){i=[t,e];return false}});return i},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){O(this.size);return this.__iterate(t?e.bind(t):e)},join:function(t){O(this.size);t=t!==undefined?""+t:",";var n="";var r=true;this.__iterate(function(e){r?r=false:n+=t;n+=e!==null&&e!==undefined?e.toString():""});return n},keys:function(){return this.__iterator(re)},map:function(e,t){return T(this,an(this,e,t))},reduce:function(r,e,o){O(this.size);var i;var a;if(arguments.length<2)a=true;else i=e;this.__iterate(function(e,t,n){if(a){a=false;i=e}else i=r.call(o,i,e,t,n)});return i},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return T(this,sn(this,true))},slice:function(e,t){return T(this,fn(this,e,t,true))},some:function(e,t){return!this.every(nr(e),t)},sort:function(e){return T(this,vn(this,e))},values:function(){return this.__iterator(d)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size!==undefined?this.size===0:!this.some(function(){return true})},count:function(e,t){return Z(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return un(this,e,t)},equals:function(e){return 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 T(this,mn(this,e,t))},flatten:function(e){return T(this,yn(this,e,true))},fromEntrySeq:function(){return new rn(this)},get:function(n,e){return this.find(function(e,t){return E(t,n)},undefined,e)},getIn:function(e,t){var n=this;var r=Dn(e);var o;while(!(o=r.next()).done){var i=o.value;n=n&&n.get?n.get(i,v):v;if(n===v)return t}return n},groupBy:function(e,t){return ln(this,e,t)},has:function(e){return this.get(e,v)!==v},hasIn:function(e){return this.getIn(e,v)!==v},isSubset:function(t){t=typeof t.includes==="function"?t:c(t);return this.every(function(e){return t.includes(e)})},isSuperset:function(e){e=typeof e.isSubset==="function"?e:c(e);return e.isSubset(this)},keySeq:function(){return this.toSeq().map(er).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return bn(this,e)},maxBy:function(e,t){return bn(this,t,e)},min:function(e){return bn(this,e?rr(e):ar)},minBy:function(e,t){return bn(this,t?rr(t):ar,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return T(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return T(this,dn(this,e,t,true))},skipUntil:function(e,t){return this.skipWhile(nr(e),t)},sortBy:function(e,t){return T(this,vn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return T(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return T(this,pn(this,e,t))},takeUntil:function(e,t){return this.takeWhile(nr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=sr(this))}});var 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 T(this,on(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(t){return this.findKey(function(e){return E(e,t)})},lastKeyOf:function(t){return this.findLastKey(function(e){return E(e,t)})},mapEntries:function(n,r){var o=this;var i=0;return T(this,this.toSeq().map(function(e,t){return n.call(r,[t,e],i++,o)}).fromEntrySeq())},mapKeys:function(n,r){var o=this;return T(this,this.toSeq().flip().map(function(e,t){return n.call(r,e,t,o)}).flip())}});var Xn=s.prototype,Qn;function er(e,t){return t}function tr(e,t){return[t,e]}function nr(e){return function(){return!e.apply(this,arguments)}}function rr(e){return function(){return-e.apply(this,arguments)}}function or(e){return typeof e==="string"?JSON.stringify(e):e}function ir(){return $(arguments)}function ar(e,t){return e<t?1:e>t?-1:0}function sr(e){if(e.size===Infinity)return 0;var t=z(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 T(this,cn(this,e,t,false))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return t===undefined?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return t===undefined?-1:t},reverse:function(){return T(this,sn(this,false))},slice:function(e,t){return T(this,fn(this,e,t,false))},splice:function(e,t){var n=arguments.length;t=Math.max(t|0,0);if(n===0||n===2&&!t)return this;e=ee(e,e<0?this.count():this.size);var r=this.slice(0,e);return T(this,n===1?r:r.concat($(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return n===undefined?-1:n},first:function(){return this.get(0)},flatten:function(e){return T(this,yn(this,e,false))},get:function(n,e){n=J(this,n);return n<0||(this.size===Infinity||this.size!==undefined&&n>this.size)?e:this.find(function(e,t){return t===n},undefined,e)},has:function(e){e=J(this,e);return e>=0&&(this.size!==undefined?this.size===Infinity||e<this.size:this.indexOf(e)!==-1)},interpose:function(e){return T(this,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 T(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return T(this,dn(this,e,t,false))},zip:function(){var e=[this].concat($(arguments));return T(this,Sn(this,ir,e))},zipWith:function(e){var t=$(arguments);t[0]=this;return T(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(Fe,L.prototype),Jn(ze,r.prototype),{Iterable:c,Seq:t,Collection:Re,Map:x,OrderedMap:D,List:n,Stack:P,Set:M,OrderedSet:zn,Record:j,Range:i,Repeat:o,is:E,fromJS:je}}()},function(e,t,n){"use strict";var s=function(e){};e.exports=function(e,t){for(var n,r,o=arguments.length,i=new Array(2<o?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];if(s(t),!e)throw void 0===t?r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."):(n=0,(r=new Error(t.replace(/%s/g,function(){return String(i[n++])}))).name="Invariant Violation"),r.framesToPop=1,r}},function(e,t,n){"use strict";function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);(r="function"==typeof Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})):r).forEach(function(e){o(t,e,n[e])})}return t}function o(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}var h=n(114),i=n(40),l=n(116),a=n(31),n=n(6),s=n.OrderedSet,c=n.Record,f=n.Stack,p=n.OrderedMap,d=n.List,y=c({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:f(),selection:null,treeMap:null,undoStack:f()}),u=function(){u.createEmpty=function(e){return this.createWithText("",e)},u.createWithText=function(e,t){return u.createWithContent(i.createFromText(e),t)},u.createWithContent=function(e,t){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 r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,function(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t,n="";for(t in e)r.call(e,t)&&e[t]&&(n=i(n,t));return n}(n)))}return e}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?e.exports=o.default=o:void 0!==(a=function(){return o}.apply(t,[]))&&(e.exports=a)}()},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)&&!F(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 F(e){return u(e)||f(e)}function z(e){return!!(e&&e[U])}e(s,c),e(L,c),e(r,c),c.isIterable=l,c.isKeyed=u,c.isIndexed=f,c.isAssociative=F,c.isOrdered=z,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 m(e){this.next=e}function g(e,t,n,r){var o=e===0?t:e===1?n:[t,n];r?r.value=o:r={value:o,done:false};return r}function y(){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():Oe(e)}function _(e){return e===null||e===undefined?Ee():!l(e)?Ce(e):u(e)?e.entrySeq():e.toIndexedSeq()}function de(e){return(e===null||e===undefined?Ee():!l(e)?Ce(e):u(e)?e.entrySeq():e).toSetSeq()}m.prototype.toString=function(){return"[Iterator]"},m.KEYS=re,m.VALUES=d,m.ENTRIES=oe,m.prototype.inspect=m.prototype.toSource=function(){return this.toString()},m.prototype[se]=function(){return this},e(t,c),t.of=function(){return t(arguments)},t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){if(!this._cache&&this.__iterateUncached){this._cache=this.entrySeq().toArray();this.size=this._cache.length}return this},t.prototype.__iterate=function(e,t){return De(this,e,t,true)},t.prototype.__iterator=function(e,t){return Te(this,e,t,true)},e(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 Te(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__@@",me,ge,ye;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 me||(me=new ve([]))}function Oe(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 Ce(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 Te(e,t,n,r){var o=e._cache;if(o){var i=o.length-1;var a=0;return new m(function(){var e=o[n?i-a:a];return a++>i?y():g(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function Ie(e,t){return t?je(t,e,"",{"":e}):Ne(e)}function je(n,r,e,t){if(Array.isArray(r))return n.call(t,e,_(r).map(function(e,t){return je(n,e,t,r)}));if(Me(r))return n.call(t,e,S(r).map(function(e,t){return je(n,e,t,r)}));return r}function Ne(e){if(Array.isArray(e))return _(e).map(Ne).toList();if(Me(e))return S(e).map(Ne).toMap();return e}function Me(e){return e&&(e.constructor===Object||e.constructor===undefined)}function E(e,t){if(e===t||e!==e&&t!==t)return true;if(!e||!t)return false;if(typeof e.valueOf==="function"&&typeof t.valueOf==="function"){e=e.valueOf();t=t.valueOf();if(e===t||e!==e&&t!==t)return true;if(!e||!t)return false}if(typeof e.equals==="function"&&typeof t.equals==="function"&&e.equals(t))return true;return false}function Ae(n,e){if(n===e)return true;if(!l(e)||n.size!==undefined&&e.size!==undefined&&n.size!==e.size||n.__hash!==undefined&&e.__hash!==undefined&&n.__hash!==e.__hash||u(n)!==u(e)||f(n)!==f(e)||z(n)!==z(e))return false;if(n.size===0&&e.size===0)return true;var r=!F(n);if(z(n)){var o=n.entries();return e.every(function(e,t){var n=o.next().value;return n&&E(n[1],e)&&(r||E(n[0],t))})&&o.next().done}var i=false;if(n.size===undefined)if(e.size===undefined){if(typeof n.cacheResult==="function")n.cacheResult()}else{i=true;var t=n;n=e;e=t}var a=true;var s=e.__iterate(function(e,t){if(r?!n.has(e):i?!E(e,n.get(t,v)):!E(n.get(t,v),e)){a=false;return false}});return a&&n.size===s}function o(e,t){if(!(this instanceof o))return new o(e,t);this._value=e;this.size=t===undefined?Infinity:Math.max(0,t);if(this.size===0){if(ge)return ge;ge=this}}function Pe(e,t){if(!e)throw new Error(t)}function i(e,t,n){if(!(this instanceof i))return new i(e,t,n);Pe(n!==0,"Cannot step a Range by 0");e=e||0;if(t===undefined)t=Infinity;n=n===undefined?1:Math.abs(n);if(t<e)n=-n;this._start=e;this._end=t;this._step=n;this.size=Math.max(0,Math.ceil((t-e)/n-1)+1);if(this.size===0){if(ye)return ye;ye=this}}function Re(){throw TypeError("Abstract")}function Le(){}function Fe(){}function ze(){}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 m(function(){return o>r?y():g(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 m(function(){var e=o[n?i-a:a];return a++>i?y():g(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 m(y);var o=0;return new m(function(){var e=r.next();return e.done?e:g(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 m(function(){if(o>=r.length){var e=n.next();if(e.done)return e;r[o]=e.value}return g(t,o,r[o++])})},e(o,_),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 m(function(){return r<n.size?g(e,r++,n._value):y()})},o.prototype.equals=function(e){return e instanceof o?E(this._value,e._value):Ae(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 m(function(){var e=i;i+=n?-o:o;return a>r?y():g(t,a++,e)})},i.prototype.equals=function(e){return e instanceof i?this._start===e._start&&this._end===e._end&&this._step===e._step:Ae(this,e)},e(Re,c),e(Le,Re),e(Fe,Re),e(ze,Re),Re.Keyed=Le,Re.Indexed=Fe,Re.Set=ze;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 O(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 C(e){Pe(e!==Infinity,"Cannot perform this action with an infinite size.")}function x(t){return t===null||t===undefined?ht():nt(t)&&!z(t)?t:ht().withMutations(function(n){var e=s(t);C(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 mt(this,e,t)},x.prototype.setIn=function(e,t){return this.updateIn(e,v,function(){return t})},x.prototype.remove=function(e){return mt(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,Ot(e),t)},x.prototype.mergeDeepIn=function(e){var t=R.call(arguments,1);return this.updateIn(e,ht(),function(e){return typeof e.mergeDeep==="function"?e.mergeDeep.apply(e,t):t[t.length-1]})},x.prototype.sort=function(e){return D(vn(this,e))},x.prototype.sortBy=function(e,t){return D(vn(this,t,e))},x.prototype.withMutations=function(e){var t=this.asMutable();e(t);return t.wasAltered()?t.__ensureOwner(this.__ownerID):this},x.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new Y)},x.prototype.asImmutable=function(){return this.__ensureOwner()},x.prototype.wasAltered=function(){return this.__altered},x.prototype.__iterator=function(e,t){return new lt(this,e,t)},x.prototype.__iterate=function(t,e){var n=this;var r=0;this._root&&this._root.iterate(function(e){r++;return t(e[1],e[0],n)},e);return r},x.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;if(!e){this.__ownerID=e;this.__altered=false;return this}return dt(this.size,this._root,e,this.__hash)},x.isMap=nt;var rt="@@__IMMUTABLE_MAP__@@",a=x.prototype,ot;function it(e,t){this.ownerID=e;this.entries=t}function at(e,t,n){this.ownerID=e;this.bitmap=t;this.nodes=n}function st(e,t,n){this.ownerID=e;this.count=t;this.nodes=n}function ct(e,t,n){this.ownerID=e;this.keyHash=t;this.entries=n}function ut(e,t,n){this.ownerID=e;this.keyHash=t;this.entry=n}function lt(e,t,n){this._type=t;this._reverse=n;this._stack=e._root&&pt(e._root)}function ft(e,t){return g(e,t[0],t[1])}function pt(e,t){return{node:e,index:0,__prev:t}}function dt(e,t,n,r){var o=Object.create(a);o.size=e;o._root=t;o.__ownerID=n;o.__hash=r;o.__altered=false;return o}function ht(){return ot||(ot=dt(0))}function mt(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=gt(e._root,e.__ownerID,0,undefined,t,n,i,a);if(!a.value)return e;o=e.size+(i.value?n===v?-1:1:0)}if(e.__ownerID){e.size=o;e._root=r;e.__hash=undefined;e.__altered=true;return e}return r?dt(o,r):ht()}function gt(e,t,n,r,o,i,a,s){if(!e){if(i===v)return e;h(s);h(a);return new ut(t,r,[o,i])}return e.update(t,n,r,o,i,a,s)}function yt(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,O(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 Ie(e)});r.push(a)}return Ct(e,t,r)}function Et(e,t,n){return e&&e.mergeDeep&&l(t)?e.mergeDeep(t):E(e,t)?e:t}function Ot(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 Ct(e,o,n){n=n.filter(function(e){return e.size!==0});if(n.length===0)return e;if(e.size===0&&!e.__ownerID&&n.length===1)return e.constructor(n[0]);return e.withMutations(function(r){var e=o?function(t,n){r.update(n,v,function(e){return e===v?t:o(e,t,n)})}:function(e,t){r.set(t,e)};for(var t=0;t<n.length;t++)n[t].forEach(e)})}function xt(e,t,n,r){var o=e===v;var i=t.next();if(i.done){var a=o?n:e;var s=r(a);return s===a?e:s}Pe(o||e&&e.set,"invalid keyPath");var c=i.value;var u=o?v:e.get(c,v);var l=xt(u,t,n,r);return l===u?e:l===v?e.remove(c):(o?ht():e).set(c,l)}function kt(e){e=e-(e>>1&1431655765);e=(e&858993459)+(e>>2&858993459);e=e+(e>>4)&252645135;e=e+(e>>8);e=e+(e>>16);return e&127}function Dt(e,t,n,r){var o=r?e:$(e);o[t]=n;return o}function Tt(e,t,n,r){var o=e.length+1;if(r&&t+1===o){e[t]=n;return e}var i=new Array(o);var a=0;for(var s=0;s<o;s++)if(s===t){i[s]=n;a=-1}else i[s]=e[s+a];return i}function It(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>=jt)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=O(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=O(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=gt(d,e,t+b,n,r,o,i,a);if(h===d)return this;if(!l&&h&&p.length>=Nt)return St(e,p,u,s,h);if(l&&!h&&p.length===2&&yt(p[f^1]))return p[f^1];if(l&&h&&p.length===1&&yt(h))return h;var m=e&&e===this.ownerID;var g=l?h?u:u^c:u|c;var y=l?h?Dt(p,f,h,m):It(p,f,m):Tt(p,f,h,m);if(m){this.bitmap=g;this.nodes=y;return this}return new at(e,g,y)},st.prototype.get=function(e,t,n,r){if(t===undefined)t=O(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=O(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=gt(l,e,t+b,n,r,o,i,a);if(f===l)return this;var p=this.count;if(!l)p++;else if(!f){p--;if(p<Mt)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=O(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,O(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,m),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 y()};var jt=p/4,Nt=p/2,Mt=p/4;function n(e){var t=Ht();if(e===null||e===undefined)return t;if(At(e))return e;var r=L(e);var o=r.size;if(o===0)return t;C(o);if(o>0&&o<p)return Kt(0,o,b,null,new Rt(r.toArray()));return t.withMutations(function(n){n.setSize(o);r.forEach(function(e,t){return n.set(t,e)})})}function At(e){return!!(e&&e[Pt])}e(n,Fe),n.of=function(){return this(arguments)},n.prototype.toString=function(){return this.__toString("List [","]")},n.prototype.get=function(e,t){e=J(this,e);if(e>=0&&e<this.size){e+=this._origin;var n=Vt(this,e);return n&&n.array[e&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,Ot(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 m(function(){var e=r();return e===Lt?y():g(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=At;var Pt="@@__IMMUTABLE_LIST__@@",k=n.prototype;function Rt(e,t){this.array=e;this.ownerID=t}k[Pt]=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={},Ft,zt;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 Ft||(Ft=Kt(0,0,b))}function Ut(e,t,n){t=J(e,t);if(t!==t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Gt(e,t).set(0,n):Gt(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail;var o=e._root;var i=G(V);if(t>=$t(e._capacity))r=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 m=u;for(var g=c;g>b;g-=b){var y=f>>>g&w;m=m.array[y]=qt(m.array[y],r)}m.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 Ie(e)});r.push(s)}if(o>e.size)e=e.setSize(o);return Ct(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);C(e.size);e.forEach(function(e,t){return n.set(t,e)})})}function Zt(e){return nt(e)&&z(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 zt||(zt=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=Cn(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 m(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=Cn(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 m(function(){var e=o.next();if(e.done)return e;var t=e.value;var n=t[0];return g(r,n,a.call(s,t[1],n,i),e)})};return e}function sn(o,n){var e=Cn(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=Cn(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 m(function(){while(true){var e=i.next();if(e.done)return e;var t=e.value;var n=t[0];var r=t[1];if(c.call(u,r,n,s))return g(o,l?n:a++,r,e)}})};return e}function un(n,r,o){var i=x().asMutable();n.__iterate(function(e,t){i.update(r.call(o,e,t,n),0,function(e){return e+1})});return i.asImmutable()}function ln(r,e,o){var i=u(r);var a=(z(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=On(r);return a.map(function(e){return T(r,t(e))})}function fn(s,e,t,c){var n=s.size;if(e!==undefined)e=e|0;if(t!==undefined)t=t|0;if(Q(e,t,n))return s;var u=ee(e,n);var r=te(t,n);if(u!==u||r!==r)return fn(s.toSeq().cacheResult(),e,t,c);var o=r-u;var l;if(o===o)l=o<0?0:o;var i=Cn(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 m(function(){while(r++<u)n.next();if(++o>l)return y();var e=n.next();if(c||t===d)return e;else if(t===re)return g(t,o-1,undefined,e);else return g(t,o-1,e.value[1],e)})};return i}function pn(t,c,u){var e=Cn(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 m(function(){if(!s)return y();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 y()}return o===oe?e:g(o,n,r,e)})};return e}function dn(t,u,l,f){var e=Cn(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 m(function(){var e,t,n;do{e=a.next();if(e.done)if(f||o===d)return e;else if(o===re)return g(o,c++,undefined,e);else return g(o,c++,e.value[1],e);var r=e.value;t=r[0];n=r[1];s&&(s=u.call(l,n,t,i))}while(s);return o===oe?e:g(o,t,n,e)})};return e}function hn(e,t){var n=u(e);var r=[e].concat(t).map(function(e){if(!l(e))e=n?Oe(e):Ce(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 mn(e,c,u){var t=Cn(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 m(function(){while(o){var e=o.next();if(e.done!==false){o=i.pop();continue}var t=e.value;if(n===oe)t=t[1];if((!c||i.length<c)&&l(t)){i.push(o);o=t.__iterator(n,r)}else return u?e:g(n,a++,t,e)}return y()})};return t}function gn(n,r,o){var i=On(n);return n.toSeq().map(function(e,t){return i(r.call(o,e,t,n))}).flatten(true)}function yn(i,a){var e=Cn(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 m(function(){if(!o||r%2){o=n.next();if(o.done)return o}return r%2?g(e,r++,a):g(e,r++,o.value,o)})};return e}function vn(n,r,o){if(!r)r=kn;var e=u(n);var i=0;var a=n.toSeq().map(function(e,t){return[t,e,i++,o?o(e,t,n):e]}).toArray();a.sort(function(e,t){return r(e[3],t[3])||e[2]-t[2]}).forEach(e?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]});return e?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=Cn(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 m(function(){var e;if(!i){e=r.map(function(e){return e.next()});i=e.some(function(e){return e.done})}if(i)return y();return g(t,o++,a.apply(null,e.map(function(e){return e.value})))})};return t}function T(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){C(e.size);return Z(e)}function On(e){return u(e)?s:f(e)?L:r}function Cn(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 I(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);jn(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(j);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 m(function(){var e=r.next();return e.done?e:g(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 m(function(){var e=n.next();return e.done?e:g(t,r++,e.value,e)})},e(nn,de),nn.prototype.has=function(e){return this._iter.includes(e)},nn.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},nn.prototype.__iterator=function(t,e){var n=this._iter.__iterator(d,e);return new m(function(){var e=n.next();return e.done?e:g(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 m(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 g(r,n?t.get(0):t[0],n?t.get(1):t[1],e)}}})},tn.prototype.cacheResult=en.prototype.cacheResult=nn.prototype.cacheResult=rn.prototype.cacheResult=xn,e(I,Le),I.prototype.toString=function(){return this.__toString(In(this)+" {","}")},I.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},I.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},I.prototype.clear=function(){if(this.__ownerID){this._map&&this._map.clear();return this}var e=this.constructor;return e._empty||(e._empty=Tn(this,ht()))},I.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+In(this));var n=this._map&&this._map.set(e,t);if(this.__ownerID||n===this._map)return this;return Tn(this,n)},I.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);if(this.__ownerID||t===this._map)return this;return Tn(this,t)},I.prototype.wasAltered=function(){return this._map.wasAltered()},I.prototype.__iterator=function(e,t){var n=this;return s(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},I.prototype.__iterate=function(e,t){var n=this;return s(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},I.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);if(!e){this.__ownerID=e;this._map=t;return this}return Tn(this,t,e)};var j=I.prototype;function Tn(e,t,n){var r=Object.create(Object.getPrototypeOf(e));r._map=t;r.__ownerID=n;return r}function In(e){return e._name||e.constructor.name||"Record"}function jn(e,t){try{t.forEach(Nn.bind(undefined,e))}catch(e){}}function Nn(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){Pe(this.__ownerID,"Cannot set on an immutable record.");this.set(t,e)}})}function N(n){return n===null||n===undefined?Fn():Mn(n)&&!z(n)?n:Fn().withMutations(function(t){var e=r(n);C(e.size);e.forEach(function(e){return t.add(e)})})}function Mn(e){return!!(e&&e[An])}j[W]=j.remove,j.deleteIn=j.removeIn=a.removeIn,j.merge=a.merge,j.mergeWith=a.mergeWith,j.mergeIn=a.mergeIn,j.mergeDeep=a.mergeDeep,j.mergeDeepWith=a.mergeDeepWith,j.mergeDeepIn=a.mergeDeepIn,j.setIn=a.setIn,j.update=a.update,j.updateIn=a.updateIn,j.withMutations=a.withMutations,j.asMutable=a.asMutable,j.asImmutable=a.asImmutable,e(N,ze),N.of=function(){return this(arguments)},N.fromKeys=function(e){return this(s(e).keySeq())},N.prototype.toString=function(){return this.__toString("Set {","}")},N.prototype.has=function(e){return this._map.has(e)},N.prototype.add=function(e){return Rn(this,this._map.set(e,true))},N.prototype.remove=function(e){return Rn(this,this._map.remove(e))},N.prototype.clear=function(){return Rn(this,this._map.clear())},N.prototype.union=function(){var n=R.call(arguments,0);n=n.filter(function(e){return e.size!==0});if(n.length===0)return this;if(this.size===0&&!this.__ownerID&&n.length===1)return this.constructor(n[0]);return this.withMutations(function(t){for(var e=0;e<n.length;e++)r(n[e]).forEach(function(e){return t.add(e)})})},N.prototype.intersect=function(){var n=R.call(arguments,0);if(n.length===0)return this;n=n.map(function(e){return 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)})})},N.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)})})},N.prototype.merge=function(){return this.union.apply(this,arguments)},N.prototype.mergeWith=function(e){var t=R.call(arguments,1);return this.union.apply(this,t)},N.prototype.sort=function(e){return zn(vn(this,e))},N.prototype.sortBy=function(e,t){return zn(vn(this,t,e))},N.prototype.wasAltered=function(){return this._map.wasAltered()},N.prototype.__iterate=function(n,e){var r=this;return this._map.__iterate(function(e,t){return n(t,t,r)},e)},N.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},N.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);if(!e){this.__ownerID=e;this._map=t;return this}return this.__make(t,e)},N.isSet=Mn;var An="@@__IMMUTABLE_SET__@@",M=N.prototype,Pn;function Rn(e,t){if(e.__ownerID){e.size=t.size;e._map=t;return e}return t===e._map?e:t.size===0?e.__empty():e.__make(t)}function Ln(e,t){var n=Object.create(M);n.size=e?e.size:0;n._map=e;n.__ownerID=t;return n}function Fn(){return Pn||(Pn=Ln(ht()))}function zn(n){return n===null||n===undefined?Wn():Bn(n)?n:Wn().withMutations(function(t){var e=r(n);C(e.size);e.forEach(function(e){return t.add(e)})})}function Bn(e){return Mn(e)&&z(e)}M[An]=true,M[W]=M.remove,M.mergeDeep=M.merge,M.mergeDeepWith=M.mergeWith,M.withMutations=a.withMutations,M.asMutable=a.asMutable,M.asImmutable=a.asImmutable,M.__empty=Fn,M.__make=Ln,e(zn,N),zn.of=function(){return this(arguments)},zn.fromKeys=function(e){return this(s(e).keySeq())},zn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},zn.isOrderedSet=Bn;var Kn=zn.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 A(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(A,Fe),A.of=function(){return this(arguments)},A.prototype.toString=function(){return this.__toString("Stack [","]")},A.prototype.get=function(e,t){var n=this._head;e=J(this,e);while(n&&e--)n=n.next;return n?n.value:t},A.prototype.peek=function(){return this._head&&this._head.value},A.prototype.push=function(){if(arguments.length===0)return this;var e=this.size+arguments.length;var t=this._head;for(var n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};if(this.__ownerID){this.size=e;this._head=t;this.__hash=undefined;this.__altered=true;return this}return $n(e,t)},A.prototype.pushAll=function(e){e=L(e);if(e.size===0)return this;C(e.size);var t=this.size;var n=this._head;e.reverse().forEach(function(e){t++;n={value:e,next:n}});if(this.__ownerID){this.size=t;this._head=n;this.__hash=undefined;this.__altered=true;return this}return $n(t,n)},A.prototype.pop=function(){return this.slice(1)},A.prototype.unshift=function(){return this.push.apply(this,arguments)},A.prototype.unshiftAll=function(e){return this.pushAll(e)},A.prototype.shift=function(){return this.pop.apply(this,arguments)},A.prototype.clear=function(){if(this.size===0)return this;if(this.__ownerID){this.size=0;this._head=undefined;this.__hash=undefined;this.__altered=true;return this}return Zn()},A.prototype.slice=function(e,t){if(Q(e,t,this.size))return this;var n=ee(e,this.size);var r=te(t,this.size);if(r!==this.size)return Fe.prototype.slice.call(this,e,t);var o=this.size-n;var i=this._head;while(n--)i=i.next;if(this.__ownerID){this.size=o;this._head=i;this.__hash=undefined;this.__altered=true;return this}return $n(o,i)},A.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;if(!e){this.__ownerID=e;this.__altered=false;return this}return $n(this.size,this._head,e,this.__hash)},A.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);var n=0;var r=this._head;while(r){if(e(r.value,n++,this)===false)break;r=r.next}return n},A.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0;var r=this._head;return new m(function(){if(r){var e=r.value;r=r.next;return g(t,n++,e)}return y()})},A.isStack=qn;var Vn="@@__IMMUTABLE_STACK__@@",Gn=A.prototype,Yn;function $n(e,t,n,r){var o=Object.create(Gn);o.size=e;o._head=t;o.__ownerID=n;o.__hash=r;o.__altered=false;return o}function Zn(){return Yn||(Yn=$n(0))}function Jn(t,n){var e=function(e){t.prototype[e]=n[e]};Object.keys(n).forEach(e);Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(n).forEach(e);return t}Gn[Vn]=true,Gn.withMutations=a.withMutations,Gn.asMutable=a.asMutable,Gn.asImmutable=a.asImmutable,Gn.wasAltered=a.wasAltered,c.Iterator=m,Jn(c,{toArray:function(){C(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(){C(this.size);var n={};this.__iterate(function(e,t){n[t]=e});return n},toOrderedMap:function(){return D(this.toKeyedSeq())},toOrderedSet:function(){return zn(u(this)?this.valueSeq():this)},toSet:function(){return N(u(this)?this.valueSeq():this)},toSetSeq:function(){return new nn(this)},toSeq:function(){return f(this)?this.toIndexedSeq():u(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return A(u(this)?this.valueSeq():this)},toList:function(){return n(u(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){if(this.size===0)return e+t;return e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var e=R.call(arguments,0);return T(this,hn(this,e))},includes:function(t){return this.some(function(e){return E(e,t)})},entries:function(){return this.__iterator(oe)},every:function(r,o){C(this.size);var i=true;this.__iterate(function(e,t,n){if(!r.call(o,e,t,n)){i=false;return false}});return i},filter:function(e,t){return T(this,cn(this,e,t,true))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(r,o){var i;this.__iterate(function(e,t,n){if(r.call(o,e,t,n)){i=[t,e];return false}});return i},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){C(this.size);return this.__iterate(t?e.bind(t):e)},join:function(t){C(this.size);t=t!==undefined?""+t:",";var n="";var r=true;this.__iterate(function(e){r?r=false:n+=t;n+=e!==null&&e!==undefined?e.toString():""});return n},keys:function(){return this.__iterator(re)},map:function(e,t){return T(this,an(this,e,t))},reduce:function(r,e,o){C(this.size);var i;var a;if(arguments.length<2)a=true;else i=e;this.__iterate(function(e,t,n){if(a){a=false;i=e}else i=r.call(o,i,e,t,n)});return i},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return T(this,sn(this,true))},slice:function(e,t){return T(this,fn(this,e,t,true))},some:function(e,t){return!this.every(nr(e),t)},sort:function(e){return T(this,vn(this,e))},values:function(){return this.__iterator(d)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size!==undefined?this.size===0:!this.some(function(){return true})},count:function(e,t){return Z(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return un(this,e,t)},equals:function(e){return Ae(this,e)},entrySeq:function(){var e=this;if(e._cache)return new ve(e._cache);var t=e.toSeq().map(tr).toIndexedSeq();t.fromEntrySeq=function(){return e.toSeq()};return t},filterNot:function(e,t){return this.filter(nr(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(X)},flatMap:function(e,t){return T(this,gn(this,e,t))},flatten:function(e){return T(this,mn(this,e,true))},fromEntrySeq:function(){return new rn(this)},get:function(n,e){return this.find(function(e,t){return E(t,n)},undefined,e)},getIn:function(e,t){var n=this;var r=Dn(e);var o;while(!(o=r.next()).done){var i=o.value;n=n&&n.get?n.get(i,v):v;if(n===v)return t}return n},groupBy:function(e,t){return ln(this,e,t)},has:function(e){return this.get(e,v)!==v},hasIn:function(e){return this.getIn(e,v)!==v},isSubset:function(t){t=typeof t.includes==="function"?t:c(t);return this.every(function(e){return t.includes(e)})},isSuperset:function(e){e=typeof e.isSubset==="function"?e:c(e);return e.isSubset(this)},keySeq:function(){return this.toSeq().map(er).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return bn(this,e)},maxBy:function(e,t){return bn(this,t,e)},min:function(e){return bn(this,e?rr(e):ar)},minBy:function(e,t){return bn(this,t?rr(t):ar,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return T(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return T(this,dn(this,e,t,true))},skipUntil:function(e,t){return this.skipWhile(nr(e),t)},sortBy:function(e,t){return T(this,vn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return T(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return T(this,pn(this,e,t))},takeUntil:function(e,t){return this.takeWhile(nr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=sr(this))}});var P=c.prototype;P[B]=true,P[se]=P.values,P.__toJS=P.toArray,P.__toStringMapper=or,P.inspect=P.toSource=function(){return this.toString()},P.chain=P.flatMap,P.contains=P.includes;try{Object.defineProperty(P,"length",{get:function(){if(!c.noLengthWarning){var t;try{throw new Error}catch(e){t=e.stack}if(t.indexOf("_wrapObject")===-1){console&&console.warn&&console.warn("iterable.length has been deprecated, "+"use iterable.size or iterable.count(). "+"This warning will become a silent error in a future version. "+t);return this.size}}}})}catch(e){}Jn(s,{flip:function(){return T(this,on(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(t){return this.findKey(function(e){return E(e,t)})},lastKeyOf:function(t){return this.findLastKey(function(e){return E(e,t)})},mapEntries:function(n,r){var o=this;var i=0;return T(this,this.toSeq().map(function(e,t){return n.call(r,[t,e],i++,o)}).fromEntrySeq())},mapKeys:function(n,r){var o=this;return T(this,this.toSeq().flip().map(function(e,t){return n.call(r,e,t,o)}).flip())}});var Xn=s.prototype,Qn;function er(e,t){return t}function tr(e,t){return[t,e]}function nr(e){return function(){return!e.apply(this,arguments)}}function rr(e){return function(){return-e.apply(this,arguments)}}function or(e){return typeof e==="string"?JSON.stringify(e):e}function ir(){return $(arguments)}function ar(e,t){return e<t?1:e>t?-1:0}function sr(e){if(e.size===Infinity)return 0;var t=z(e);var n=u(e);var r=t?1:0;var o=e.__iterate(n?t?function(e,t){r=31*r+ur(O(e),O(t))|0}:function(e,t){r=r+ur(O(e),O(t))|0}:t?function(e){r=31*r+O(e)|0}:function(e){r=r+O(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]=P.entries,Xn.__toJS=P.toObject,Xn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+or(e)},Jn(L,{toKeyedSeq:function(){return new en(this,false)},filter:function(e,t){return T(this,cn(this,e,t,false))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return t===undefined?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return t===undefined?-1:t},reverse:function(){return T(this,sn(this,false))},slice:function(e,t){return T(this,fn(this,e,t,false))},splice:function(e,t){var n=arguments.length;t=Math.max(t|0,0);if(n===0||n===2&&!t)return this;e=ee(e,e<0?this.count():this.size);var r=this.slice(0,e);return T(this,n===1?r:r.concat($(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return n===undefined?-1:n},first:function(){return this.get(0)},flatten:function(e){return T(this,mn(this,e,false))},get:function(n,e){n=J(this,n);return n<0||(this.size===Infinity||this.size!==undefined&&n>this.size)?e:this.find(function(e,t){return t===n},undefined,e)},has:function(e){e=J(this,e);return e>=0&&(this.size!==undefined?this.size===Infinity||e<this.size:this.indexOf(e)!==-1)},interpose:function(e){return T(this,yn(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 T(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return T(this,dn(this,e,t,false))},zip:function(){var e=[this].concat($(arguments));return T(this,Sn(this,ir,e))},zipWith:function(e){var t=$(arguments);t[0]=this;return T(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=P.includes,Jn(S,s.prototype),Jn(_,L.prototype),Jn(de,r.prototype),Jn(Le,s.prototype),Jn(Fe,L.prototype),Jn(ze,r.prototype),{Iterable:c,Seq:t,Collection:Re,Map:x,OrderedMap:D,List:n,Stack:A,Set:N,OrderedSet:zn,Record:I,Range:i,Repeat:o,is:E,fromJS:Ie}}()},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,m=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:y(t,e.decorator),directionMap:l.getDirectionMap(t)});return new u(new m(e))},u.fromJS=function(e){return new u(new m(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)}))):y(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 g(e,t,!1)},u.forceSelection=function(e,t){return g(e,t=t.getHasFocus()?t:t.set("hasFocus",!0),!0)},u.moveSelectionToEnd=function(e){var t=e.getCurrentContent().getLastBlock(),n=t.getKey(),t=t.getLength();return u.acceptSelection(e,new a({anchorKey:n,anchorOffset:t,focusKey:n,focusOffset:t,isBackward:!1}))},u.moveFocusToEnd=function(e){e=u.moveSelectionToEnd(e);return u.forceSelection(e,e.getSelection())},u.push=function(e,t,n){var r,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 g(e,t,n){return u.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function y(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),m=n(113),g=s.OrderedSet,y={replaceText:function(e,t,n,r,o){e=d(e,t),e=h(e,t),t=i.create({style:r||g(),entity:o||null});return l(e,e.getSelectionAfter(),n,t)},insertText:function(e,t,n,r,o){return t.isCollapsed()||f(!1),y.replaceText(e,t,n,r,o)},moveText:function(e,t,n){var r=a(e,t),e=y.removeRange(e,t,"backward");return y.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 m(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=y},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 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 zn}),t.d(e,"isPlainObject",function(){return dt}),t.d(e,"isRecord",function(){return ne}),t.d(e,"isSeq",function(){return ee}),t.d(e,"isSet",function(){return Fn}),t.d(e,"isStack",function(){return Mn}),t.d(e,"isValueObject",function(){return ke}),t.d(e,"merge",function(){return Mt}),t.d(e,"mergeDeep",function(){return 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 F(){}function z(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?z(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 Te(e){return e>>>1&1073741824|3221225471&e}var je=Object.prototype.valueOf;function k(e){if(null==e)return Ie(e);if("function"==typeof e.hashCode)return Te(e.hashCode(e));var t=(e=e).valueOf!==je&&"function"==typeof e.valueOf?e.valueOf(e):e;if(null==t)return Ie(t);switch(typeof t){case"boolean":return t?1108378657:1108378656;case"number":var n=t;if(n!=n||n===1/0)return 0;var r=0|n;for(r!==n&&(r^=4294967295*n);4294967295<n;)r^=n/=4294967295;return Te(r);case"string":return(t.length>Ke?function(e){var t=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=Fe[i=t])&&(o=Ae(),Fe[i]=o),o;default:if("function"==typeof t.toString)return Me(t.toString());throw new Error("Value type "+typeof t+" cannot be hashed.")}}function Ie(e){return null===e?1108378658:1108378659}function Me(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Te(t)}var Ne=Object.isExtensible,Pe=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Ae(){var e=++ze;return 1073741824&ze&&(ze=0),e}var Re,Le="function"==typeof WeakMap,Fe=(Le&&(Re=new WeakMap),Object.create(null)),ze=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&&z(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&&z(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&&z(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&&z(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 T(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function lt(e,t){if(!e)throw new Error(t)}function j(e){lt(e!==1/0,"Cannot perform this action with an infinite size.")}function ft(e){if(de(e)&&"string"!=typeof e)return e;if(d(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}Ve.prototype.cacheResult=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 T(e);var t,n={};for(t in e)pe.call(e,t)&&(n[t]=e[t]);return n}function bt(e,t){if(!ht(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(p(e)){if(e.remove)return e.remove(t);throw new TypeError("Cannot update immutable value without .remove() method: "+e)}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 Tt(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return It(this,e)}function jt(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return It(this,t,e)}function It(e,t,o){for(var n=[],r=0;r<t.length;r++){var i=f(t[r]);0!==i.size&&n.push(i)}return 0===n.length?e:0!==e.toSeq().size||e.__ownerID||1!==n.length?e.withMutations(function(r){for(var e=o?function(t,n){xt(r,n,_,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 Ft(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Rt(this,e)}function zt(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 F)}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);j(e.size),e.forEach(function(e,t){return n.set(t,e)})})}return r&&(e.__proto__=r),((e.prototype=Object.create(r&&r.prototype)).constructor=e).of=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return I().withMutations(function(e){for(var t=0;t<n.length;t+=2){if(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=Tt,i.mergeWith=jt,i.mergeDeep=Ft,i.mergeDeepWith=zt,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 F;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:T(c);return f?s?u===l-1?i.pop():i[u]=i.pop():i[u]=[r,o]:i.push([r,o]),a?(this.entries=i,this):new $t(e,i)}},Vt.prototype.get=function(e,t,n,r){void 0===t&&(t=k(n));var o=1<<((0===e?t:t>>>e)&b),i=this.bitmap;return 0==(i&o)?r:this.nodes[cn(i&o-1)].get(e+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:T(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:T(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:(j(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 F,o=e._origin,i=e._capacity,a=o+t,t=void 0===n?i:n<0?i+n:o+n;if(a===o&&t===i)return e;if(t<=a)return e.clear();for(var s=e._level,c=e._root,u=0;a+u<0;)c=new 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?Tn():xe(t)?t:Tn().withMutations(function(n){var e=f(t);j(e.size),e.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){e=this._map.get(e);return void 0!==e?this._list.get(e)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):Tn()},t.prototype.set=function(e,t){return jn(this,e,t)},t.prototype.remove=function(e){return jn(this,e,_)},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?Tn():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=n,this))},t}(Yt);function Dn(e,t,n,r){var o=Object.create(N.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Tn(){return kn=kn||Dn(I(),Sn())}function jn(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;j(e.size);var t=this.size,n=this._head;return e.__iterate(function(e){t++,n={value:e,next:n}},!0),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):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 Fn(e){return Boolean(e&&e[Ln])}function zn(e){return Fn(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():Fn(n)&&!d(n)?n:Gn().withMutations(function(t){var e=r(n);j(e.size),e.forEach(function(e){return t.add(e)})})}return r&&(t.__proto__=r),((t.prototype=Object.create(r&&r.prototype)).constructor=t).of=function(){return this(arguments)},t.fromKeys=function(e){return this(f(e).keySeq())},t.intersect=function(e){return(e=u(e).toArray()).length?o.intersect.apply(t(e.pop()),e):Gn()},t.union=function(e){return(e=u(e).toArray()).length?o.union.apply(t(e.pop()),e):Gn()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return 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=Fn,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(){j(this.size);var n={};return this.__iterate(function(e,t){n[t]=e}),n}u.isIterable=l,u.isKeyed=c,u.isIndexed=s,u.isAssociative=Z,u.isOrdered=d,u.Iterator=m,Kn(u,{toArray:function(){j(this.size);var n=new Array(this.size||0),r=c(this),o=0;return this.__iterate(function(e,t){n[o++]=r?[t,e]:e}),n},toIndexedSeq:function(){return new Ve(this)},toJS:function(){return Hn(this)},toKeyedSeq:function(){return new 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){j(this.size);var i=!0;return this.__iterate(function(e,t,n){if(!r.call(o,e,t,n))return i=!1}),i},filter:function(e,t){return D(this,Xe(this,e,t,!0))},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 j(this.size),this.__iterate(t?e.bind(t):e)},join:function(t){j(this.size),t=void 0!==t?""+t:",";var n="",r=!0;return this.__iterate(function(e){r?r=!1:n+=t,n+=null!=e?e.toString():""}),n},keys:function(){return this.__iterator(oe)},map:function(e,t){return D(this,Ze(this,e,t))},reduce:function(e,t,n){return rr(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return rr(this,e,t,n,arguments.length<2,!0)},reverse:function(){return D(this,Je(this,!0))},slice:function(e,t){return D(this,Qe(this,e,t,!0))},some:function(r,o){j(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 z(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=Te((t=De(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+lr(k(e),k(t))|0}:function(e,t){r=r+lr(k(e),k(t))|0}:t?function(e){r=31*r+k(e)|0}:function(e){r=r+k(e)|0}),r)}(this))}});var n=u.prototype,er=(n[G]=!0,n[se]=n.values,n.toJSON=n.toArray,n.__toStringMapper=yt,n.inspect=n.toSource=function(){return this.toString()},n.chain=n.flatMap,n.contains=n.includes,Kn(f,{flip:function(){return D(this,$e(this))},mapEntries:function(n,r){var o=this,i=0;return D(this,this.toSeq().map(function(e,t){return n.call(r,[t,e],i++,o)}).fromEntrySeq())},mapKeys:function(n,r){var o=this;return D(this,this.toSeq().flip().map(function(e,t){return n.call(r,e,t,o)}).flip())}}),f.prototype),tr=(er[Y]=!0,er[se]=n.entries,er.toJSON=Qn,er.__toStringMapper=function(e,t){return yt(t)+": "+yt(e)},Kn(J,{toKeyedSeq:function(){return new 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(T(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){e=this.findLastEntry(e,t);return e?e[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return D(this,tt(this,e,!1))},get:function(n,e){return(n=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(T(arguments)),t=it(this.toSeq(),O.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),D(this,n)},keySeq:function(){return $n(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return D(this,et(this,e,t,!1))},zip:function(){var e=[this].concat(T(arguments));return D(this,it(this,cr,e))},zipAll:function(){var e=[this].concat(T(arguments));return D(this,it(this,cr,e,!0))},zipWith:function(e){var t=T(arguments);return D(t[0]=this,it(this,e,t))}}),J.prototype),nr=(tr[$]=!0,tr[re]=!0,Kn(X,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),X.prototype);function rr(e,r,o,i,a,t){return j(e.size),e.__iterate(function(e,t,n){o=a?(a=!1,e):r.call(i,o,e,t,n)},t),o}function or(e,t){return t}function ir(e,t){return[t,e]}function ar(e){return function(){return!e.apply(this,arguments)}}function sr(e){return function(){return-e.apply(this,arguments)}}function cr(){return T(arguments)}function ur(e,t){return e<t?1:t<e?-1:0}function lr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}nr.has=n.includes,nr.contains=nr.includes,nr.keys=nr.values,Kn(ye,er),Kn(O,tr),Kn(me,nr);var fr,pr=function(e){function t(n){return null==n?yr():zn(n)?n:yr().withMutations(function(t){var e=X(n);j(e.size),e.forEach(function(e){return t.add(e)})})}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).of=function(){return this(arguments)},t.fromKeys=function(e){return this(f(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Wn),dr=(pr.isOrderedSet=zn,pr.prototype);function hr(e,t){var n=Object.create(dr);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function yr(){return fr=fr||hr(Tn())}dr[re]=!0,dr.zip=tr.zip,dr.zipWith=tr.zipWith,dr.zipAll=tr.zipAll,dr.__empty=yr,dr.__make=hr;var 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=Tt,A.mergeWith=jt,A.mergeIn=Bt,A.mergeDeep=Ft,A.mergeDeepWith=zt,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.4",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:Fn,isOrderedSet:zn,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"),T=new RegExp("​?","g"),j=["bold","bolder","500","600","700","800","900"],I=["light","lighter","normal","100","200","300","400"],M=["className","href","rel","target","title"],N=["alt","className","height","src","width"],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<=j.indexOf(n)?e.add("BOLD"):0<=I.indexOf(n)&&e.remove("BOLD"),"italic"===r?e.add("ITALIC"):"normal"===r&&e.remove("ITALIC"),"underline"===o&&e.add("UNDERLINE"),"line-through"===o&&e.add("STRIKETHROUGH"),"none"===o&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))})):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(T,""));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),T=w.isBrowser("IE"),j=!T,I={edit:c,composite:n,drag:s,cut:null,render:null},M=!1,N=function(e){function t(){return e.apply(this,arguments)||this}a(t,e);var n=t.prototype;return n.render=function(){return null},n.componentDidMount=function(){this._update()},n.componentDidUpdate=function(){this._update()},n._update=function(){var e=this.props.editor;e._latestEditorState=this.props.editorState,e._blockSelectEvents=!0},t}(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:j&&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"),T&&(this.editor?this.editor.ownerDocument:r).execCommand("AutoUrlDetect",!1,!1)},n.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestEditorState=this.props.editorState,this._latestCommittedEditorState=this.props.editorState},e}(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,500)}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&&500<e.length?c(e,500):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",T="Firefox",j="Google",F="Microsoft",I="Opera",M="Samsung",N="Sony",z="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,I+" Mini"]],[/\bopr\/([\w\.]+)/i],[b,[n,I]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[b,[n,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\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,/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"]],[/slbrowser\/([\w\.]+)/i],[b,[n,"Smart Lenovo "+k]],[/(avast|avg)\/([\w\.]+)/i],[[n,/(.+)/,"$1 Secure "+k],b],[/\bfocus\/([\w\.]+)/i],[b,[n,T+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[n,I+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[n,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[n,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[n,I+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[n,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[b,[n,T]],[/\bqihu|(qi?ho?o?|360)browser/i],[[n,"360 "+k]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[n,/(.+)/,"$1 "+k],b],[/samsungbrowser\/([\w\.]+)/i],[b,[n,M+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[n,/_/g," "],b],[/metasr[\/ ]?([\d\.]+)/i],[b,[n,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[n,"Sogou Mobile"],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[n,b],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[n],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[n,"Facebook"],b],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\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,T+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/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,M],[o,_]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[g,[v,M],[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 ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[g,/_/g," "],[v,z],[o,S]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[g,/_/g," "],[v,z],[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[1-3]\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,j],[o,_]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[v,j],[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]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[g,[v,"Ulefone"],[o,S]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\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,F],[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,F],[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,M],[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,j],[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,z],[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,F],[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,j],[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|; wv\)|\) 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 (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[n,[b,t,K]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[b,t,K],[n,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\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,T+" 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.37",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),T=n(0),a=n(45),s=n(36),c=n(73),u=n(37),l=n(74),o=n(6),f=n(7),p=n(27),n=(o.List,function(o){var e;function _(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e=o.call.apply(o,[this].concat(n))||this),"wrapperRef",T.createRef()),e}e=o,(t=_).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(T.createElement(s,c,T.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(T.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?T.createElement(p,d({},this.props,{tree:S.getBlockTree(u),blockProps:f.customProps,offsetKey:l,block:t})):T.createElement(k,{block:t,children:c,contentState:b,customStyleFn:r,customStyleMap:o,decorator:n,direction:i,forceSelection:a,hasSelection:h(s,u),selection:s,tree:e});return t.getParentKey()?p:(c=C(t,m).Element,r=x(t,w,l,v,f,this.wrapperRef),T.createElement(c,r,p))},_}(T.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 F(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}var z=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"),T=D.wrapper,D=D.element||t.get("unstyled").element,j=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!==T||null===g||g<j,"public/DraftStyleDefault/depth0":0===j,"public/DraftStyleDefault/depth1":1===j,"public/DraftStyleDefault/depth2":2===j,"public/DraftStyleDefault/depth3":3===j,"public/DraftStyleDefault/depth4":4<=j,"public/DraftStyleDefault/listLTR":"LTR"===E,"public/DraftStyleDefault/listRTL":"RTL"===E}))),C||z),j={className:I,"data-block":!0,"data-editor":s,"data-offset-key":k,key:S},E=(void 0!==x&&(j=F({},j,{contentEditable:x,suppressContentEditableWarning:!0})),K.createElement(D,j,K.createElement(_,L({},O,{key:S}))));m.push({block:E,wrapperTemplate:T,key:S,offsetKey:k}),g=T?w.getDepth():null,v=T}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){e.exports=ReactDOM},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){var n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(R,e,t){"use strict";t.r(e),t.d(e,"Collection",function(){return u}),t.d(e,"Iterable",function(){return Cr}),t.d(e,"List",function(){return gn}),t.d(e,"Map",function(){return Yt}),t.d(e,"OrderedMap",function(){return M}),t.d(e,"OrderedSet",function(){return pr}),t.d(e,"PairSorting",function(){return gr}),t.d(e,"Range",function(){return $n}),t.d(e,"Record",function(){return A}),t.d(e,"Repeat",function(){return Sr}),t.d(e,"Seq",function(){return O}),t.d(e,"Set",function(){return Wn}),t.d(e,"Stack",function(){return An}),t.d(e,"fromJS",function(){return _r}),t.d(e,"get",function(){return yt}),t.d(e,"getIn",function(){return Zn}),t.d(e,"has",function(){return gt}),t.d(e,"hasIn",function(){return Xn}),t.d(e,"hash",function(){return k}),t.d(e,"is",function(){return x}),t.d(e,"isAssociative",function(){return Z}),t.d(e,"isCollection",function(){return l}),t.d(e,"isImmutable",function(){return p}),t.d(e,"isIndexed",function(){return s}),t.d(e,"isKeyed",function(){return c}),t.d(e,"isList",function(){return hn}),t.d(e,"isMap",function(){return Ce}),t.d(e,"isOrdered",function(){return d}),t.d(e,"isOrderedMap",function(){return xe}),t.d(e,"isOrderedSet",function(){return zn}),t.d(e,"isPlainObject",function(){return dt}),t.d(e,"isRecord",function(){return ne}),t.d(e,"isSeq",function(){return ee}),t.d(e,"isSet",function(){return Fn}),t.d(e,"isStack",function(){return Nn}),t.d(e,"isValueObject",function(){return ke}),t.d(e,"merge",function(){return Nt}),t.d(e,"mergeDeep",function(){return At}),t.d(e,"mergeDeepWith",function(){return Pt}),t.d(e,"mergeWith",function(){return Mt}),t.d(e,"remove",function(){return bt}),t.d(e,"removeIn",function(){return Ot}),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 Or});var t="delete",w=5,S=1<<w,b=S-1,_={};function L(){return{value:!1}}function y(e){e&&(e.value=!0)}function F(){}function z(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?z(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:O(e)},f=function(e){function t(e){return c(e)?e:me(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:C(e)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t}(u),X=function(e){function t(e){return l(e)&&!Z(e)?e:ge(e)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t}(u),Q=(u.Keyed=f,u.Indexed=J,u.Set=X,"@@__IMMUTABLE_SEQ__@@");function ee(e){return Boolean(e&&e[Q])}var te="@@__IMMUTABLE_RECORD__@@";function ne(e){return Boolean(e&&e[te])}function p(e){return l(e)||ne(e)}var re="@@__IMMUTABLE_ORDERED__@@";function d(e){return Boolean(e&&e[re])}var oe=0,h=1,m=2,ie="function"==typeof Symbol&&Symbol.iterator,ae="@@iterator",se=ie||ae,g=function(e){this.next=e};function v(e,t,n,r){e=0===e?t:1===e?n:[t,n];return r?r.value=e:r={value:e,done:!1},r}function E(){return{value:void 0,done:!0}}function ce(e){return Array.isArray(e)||fe(e)}function ue(e){return e&&"function"==typeof e.next}function le(e){var t=fe(e);return t&&t.call(e)}function fe(e){e=e&&(ie&&e[ie]||e[ae]);if("function"==typeof e)return e}g.prototype.toString=function(){return"[Iterator]"},g.KEYS=oe,g.VALUES=h,g.ENTRIES=m,g.prototype.inspect=g.prototype.toSource=function(){return this.toString()},g.prototype[se]=function(){return this};var pe=Object.prototype.hasOwnProperty;function de(e){return Array.isArray(e)||"string"==typeof e||e&&"object"==typeof e&&Number.isInteger(e.length)&&0<=e.length&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var he,O=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 g(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),me=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}(O),C=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}(O),ge=function(e){function t(e){return(l(e)&&!Z(e)?e:C(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}(O),ye=(O.isSeq=ee,O.Keyed=me,O.Set=ge,O.Indexed=C,O.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 g(function(){var e;return i===o?E():(e=n?o-++i:i++,v(t,e,r[e]))})},t}(C)),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 g(function(){var e;return a===i?E():(e=o[n?i-++a:a++],v(t,e,r[e]))})},t}(me),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 g(function(){var e=n.next();return e.done?e:v(t,r++,e.value)})):new g(E)},t}(C));function we(){return he=he||new ye([])}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 ye(e):ce(e)?new be(e):void 0}var Oe="@@__IMMUTABLE_MAP__@@";function Ce(e){return Boolean(e&&e[Oe])}function xe(e){return Ce(e)&&d(e)}function ke(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function x(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(ke(e)&&ke(t)&&e.equals(t))}var De="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Te(e){return e>>>1&1073741824|3221225471&e}var Ie=Object.prototype.valueOf;function k(e){if(null==e)return je(e);if("function"==typeof e.hashCode)return Te(e.hashCode(e));var t=(e=e).valueOf!==Ie&&"function"==typeof e.valueOf?e.valueOf(e):e;if(null==t)return je(t);switch(typeof t){case"boolean":return t?1108378657:1108378656;case"number":var n=t;if(n!=n||n===1/0)return 0;var r=0|n;for(r!==n&&(r^=4294967295*n);4294967295<n;)r^=n/=4294967295;return Te(r);case"string":return(t.length>Ke?function(e){var t=We[e];void 0===t&&(t=Ne(e),Ue===He&&(Ue=0,We={}),Ue++,We[e]=t);return t}:Ne)(t);case"object":case"function":var o,i=t;if((!Le||void 0===(o=Re.get(i)))&&void 0===(o=i[Be])){if(!Ae){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=Pe(),Le)Re.set(i,o);else{if(void 0!==Me&&!1===Me(i))throw new Error("Non-extensible objects are not allowed as keys.");if(Ae)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=Fe[i=t])&&(o=Pe(),Fe[i]=o),o;default:if("function"==typeof t.toString)return Ne(t.toString());throw new Error("Value type "+typeof t+" cannot be hashed.")}}function je(e){return null===e?1108378658:1108378659}function Ne(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Te(t)}var Me=Object.isExtensible,Ae=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Pe(){var e=++ze;return 1073741824&ze&&(ze=0),e}var Re,Le="function"==typeof WeakMap,Fe=(Le&&(Re=new WeakMap),Object.create(null)),ze=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}(me),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&&z(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&&z(this),new g(function(){var e=o.next();return e.done?e:v(t,n?r.size-++i:i++,e.value,e)})},t}(C)),Ge=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},t.prototype.__iterator=function(t,e){var n=this._iter.__iterator(h,e);return new g(function(){var e=n.next();return e.done?e:v(t,e.value,e.value,e)})},t}(ge),Ye=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(n,e){var r=this;return this._iter.__iterate(function(e){var t;if(e)return at(e),t=l(e),n(t?e.get(1):e[1],t?e.get(0):e[0],r)},e)},t.prototype.__iterator=function(r,e){var o=this._iter.__iterator(h,e);return new g(function(){for(;;){var e=o.next();if(e.done)return e;var t,n=e.value;if(n)return at(n),t=l(n),v(r,t?n.get(0):n[0],t?n.get(1):n[1],e)}})},t}(me);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===m?(n=o.__iterator(e,t),new g(function(){var e,t=n.next();return t.done||(e=t.value[0],t.value[0]=t.value[1],t.value[1]=e),t})):o.__iterator(e===h?oe:h,t)},e}function Ze(i,a,s){var e=r(i);return e.size=i.size,e.has=function(e){return i.has(e)},e.get=function(e,t){var n=i.get(e,_);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(m,e);return new g(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&&z(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&&z(a),a.__iterator(m,!r));return new g(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(m,e),i=0;return new g(function(){for(;;){var e=o.next();if(e.done)return e;var t=e.value,n=t[0],t=t[1];if(s.call(c,t,n,a))return v(r,u?n:i++,t,e)}})},e}function Qe(s,e,t,c){var 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 g(E):(n=s.__iterator(t,e),o=r=0,new g(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(m,e),a=!0,s=0,new g(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===m?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 g(function(){for(;o;){var e=o.next();if(!1!==e.done)o=i.pop();else{var t=e.value;if(n===m&&(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?me:s(n)?C:ge)(a)}function rt(n,r,o){var e;return r=r||ut,o?(e=n.toSeq().map(function(e,t){return[e,o(e,t,n)]}).reduce(function(e,t){return ot(r,e[1],t[1])?t:e}))&&e[0]:n.reduce(function(e,t){return ot(r,e,t)?t:e})}function ot(e,t,n){e=e(n,t);return 0===e&&n!==t&&(null==n||n!=n)||0<e}function it(e,a,s,c){var e=r(e),t=new ye(s).map(function(e){return e.size});return e.size=c?t.max():t.min(),e.__iterate=function(e,t){for(var n,r=this.__iterator(h,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},e.__iteratorUncached=function(t,n){var r=s.map(function(e){return e=u(e),le(n?e.reverse():e)}),o=0,i=!1;return new g(function(){var e;return i||(e=r.map(function(e){return e.next()}),i=c?e.every(function(e){return e.done}):e.some(function(e){return e.done})),i?E():v(t,o++,a.apply(null,e.map(function(e){return e.value})))})},e}function D(e,t){return e===t?e:ee(e)?t:e.constructor(t)}function at(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function st(e){return c(e)?f:s(e)?J:X}function r(e){return Object.create((c(e)?me:s(e)?C:ge).prototype)}function ct(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function ut(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:t<e?1:e<t?-1:0}function T(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function lt(e,t){if(!e)throw new Error(t)}function I(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 mt(t){try{return"string"==typeof t?JSON.stringify(t):String(t)}catch(e){return JSON.stringify(t)}}function gt(e,t){return p(e)?e.has(t):ht(e)&&pe.call(e,t)}function yt(e,t,n){return p(e)?e.get(t,n):gt(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function vt(e){if(Array.isArray(e))return T(e);var t,n={};for(t in e)pe.call(e,t)&&(n[t]=e[t]);return n}function bt(e,t){if(!ht(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(p(e)){if(e.remove)return e.remove(t);throw new TypeError("Cannot update immutable value without .remove() method: "+e)}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(mt)+"]: "+n);var c=r[o];var u=s?_:yt(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?j():{}: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 Ot(e,t){return St(e,t,function(){return _})}function Ct(e){return Ot(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 Tt(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return jt(this,e)}function It(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 jt(this,t,e)}function jt(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 Nt(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return Lt(e,t)}function Mt(e,t){for(var n=[],r=arguments.length-2;0<r--;)n[r]=arguments[r+2];return Lt(t,n,e)}function At(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];return Rt(e,t)}function Pt(e,t){for(var n=[],r=arguments.length-2;0<r--;)n[r]=arguments[r+2];return Rt(t,n,e)}function Rt(e,t,n){return Lt(e,t,(o=n,function e(t,n,r){return ht(t)&&ht(n)&&function(e,t){return e=O(e),t=O(t),s(e)===s(t)&&c(e)===c(t)}(t,n)?Lt(t,[n],e):o?o(t,n,r):n}));var o}function Lt(r,e,o){if(!ht(r))throw new TypeError("Cannot merge into non-data-structure value: "+r);if(p(r))return"function"==typeof o&&r.mergeWith?r.mergeWith.apply(r,[o].concat(e)):(r.merge||r.concat).apply(r,e);for(var t=Array.isArray(r),i=r,n=t?J:f,a=t?function(e){(i=i===r?vt(i):i).push(e)}:function(e,t){var n=pe.call(i,t),e=n&&o?o(i[t],e,t):e;n&&e===i[t]||((i=i===r?vt(i):i)[t]=e)},s=0;s<e.length;s++)n(e[s]).forEach(a);return i}function Ft(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Rt(this,e)}function zt(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,j(),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,j(),function(e){return Rt(e,t)})}function Ht(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Ut(){return this.__ownerID?this:this.__ensureOwner(new F)}function 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?j():Ce(t)&&!d(t)?t:j().withMutations(function(n){var e=r(t);I(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 j().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):j()},e.prototype.sort=function(e){return M(nt(this,e))},e.prototype.sortBy=function(e,t){return M(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?j():(this.__ownerID=e,this.__altered=!1,this)},e}(f),i=(Yt.isMap=Ce,Yt.prototype),$t=(i[Oe]=!0,i[t]=i.remove,i.removeAll=i.deleteAll,i.setIn=Et,i.removeIn=i.deleteIn=Ct,i.update=kt,i.updateIn=Dt,i.merge=i.concat=Tt,i.mergeWith=It,i.mergeDeep=Ft,i.mergeDeepWith=zt,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(y(a),!s&&f||y(i),!s||1!==c.length){if(!f&&!s&&c.length>=ln){var p=e,d=c,a=r,i=o;p=p||new F;for(var h=new Xt(p,k(a),[a,i]),m=0;m<d.length;m++){var g=d[m];h=h.update(p,0,void 0,g[0],g[1])}return h}a=e&&e===this.ownerID,i=a?c:T(c);return f?s?u===l-1?i.pop():i[u]=i.pop():i[u]=[r,o]:i.push([r,o]),a?(this.entries=i,this):new $t(e,i)}},Vt.prototype.get=function(e,t,n,r){void 0===t&&(t=k(n));var o=1<<((0===e?t:t>>>e)&b),i=this.bitmap;return 0==(i&o)?r:this.nodes[cn(i&o-1)].get(e+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,m=u,r=s,o=t,g=0,y=new Array(S),v=0;0!==m;v++,m>>>=1)y[v]=1&m?h[g++]:void 0;return y[r]=o,new Zt(n,g+1,y)}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),m=0,g=1,y=l.length;m<y;m++,g<<=1){var v=l[m];void 0!==v&&m!==f&&(p|=g,h[d++]=v)}return new Vt(r,p,h)}}else n++;o=e&&e===this.ownerID,i=un(c,s,t,o);return o?(this.count=n,this.nodes=i,this):new Zt(e,n,i)},function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}),Xt=(Jt.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(x(n,o[i][0]))return o[i][1];return r},Jt.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=k(r));var s=o===_;if(n!==this.keyHash)return s?this:(y(a),y(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:(y(a),!s&&t||y(i),s&&2===l?new Xt(e,this.keyHash,c[1^u]):(a=(n=e&&e===this.ownerID)?c:T(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:(y(a),s?void y(i):c?e&&e===this.ownerID?(this.entry[1]=o,this):new Xt(e,this.keyHash,[r,o]):(y(i),sn(this,e,t,k(r),[r,o])))},$t.prototype.iterate=Jt.prototype.iterate=function(e,t){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===e(n[t?o-r:r]))return!1},Vt.prototype.iterate=Zt.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var i=n[t?o-r:r];if(i&&!1===i.iterate(e,t))return!1}},Xt.prototype.iterate=function(e,t){return e(this.entry)},function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&tn(e._root)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,o=void 0;if(n.entry){if(0==r)return en(e,n.entry)}else if(n.entries){if(r<=(o=n.entries.length-1))return en(e,n.entries[this._reverse?o-r:r])}else if(r<=(o=n.nodes.length-1)){n=n.nodes[this._reverse?o-r:r];if(n){if(n.entry)return en(e,n.entry);t=this._stack=tn(n,t)}continue}t=this._stack=this._stack.__prev}return E()},t}(g));function en(e,t){return v(e,t[0],t[1])}function tn(e,t){return{node:e,index:0,__prev:t}}function nn(e,t,n,r){var o=Object.create(i);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function j(){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):j()}function on(e,t,n,r,o,i,a,s){return e?e.update(t,n,r,o,i,a,s):i===_?e:(y(s),y(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:T(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 mn,gn=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:(I(r),0<r&&r<S?wn(0,r,w,null,new yn(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=On(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?Cn(e,r).set(0,o):Cn(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){Cn(e,0,r+n.length);for(var t=0;t<n.length;t++)e.set(r+t,n[t])})},e.prototype.pop=function(){return Cn(this,0,-1)},e.prototype.unshift=function(){var n=arguments;return this.withMutations(function(e){Cn(e,-n.length);for(var t=0;t<n.length;t++)e.set(t,n[t])})},e.prototype.shift=function(){return Cn(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 Cn(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:Cn(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 g(function(){var e=o();return e===vn?E():v(t,n?--r:r++,e)})},e.prototype.__iterate=function(e,t){for(var n,r=t?this.size:0,o=bn(this,t);(n=o())!==vn&&!1!==e(n,t?--r:r++,this););return r},e.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?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),N=(gn.isList=hn,gn.prototype),yn=(N[dn]=!0,N[t]=N.remove,N.merge=N.concat,N.setIn=Et,N.deleteIn=N.removeIn=Ct,N.update=kt,N.updateIn=Dt,N.mergeIn=Bt,N.mergeDeepIn=Kt,N.withMutations=Ht,N.wasAltered=qt,N.asImmutable=Wt,N["@@transducer/init"]=N.asMutable=Ut,N["@@transducer/step"]=function(e,t){return e.push(t)},N["@@transducer/result"]=function(e){return e.asImmutable()},function(e,t){this.array=e,this.ownerID=t}),vn=(yn.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 yn([],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},yn.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 m=e._origin,g=e._capacity,y=xn(g),v=e._tail;return b(e._root,e._level,0);function b(e,t,n){var r,o,i,a,s,c,u,l,f,p,d;return 0===t?(s=e,o=(r=n)===y?v&&v.array:s&&s.array,i=m<r?0:m-r,S<(a=g-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=m<u?0:m-u>>c,S<(d=1+(g-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(N);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 mn=mn||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&&y(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 yn(e?e.array.slice():[],t)}function On(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 Cn(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new F,o=e._origin,i=e._capacity,a=o+t,t=void 0===n?i:n<0?i+n:o+n;if(a===o&&t===i)return e;if(t<=a)return e.clear();for(var s=e._level,c=e._root,u=0;a+u<0;)c=new yn(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 yn(c&&c.array.length?[c]:[],r),s+=w;var n=e._tail,p=f<l?On(e,t-1):l<f?new yn([],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 m=l>>>h&b,d=d.array[m]=En(d.array[m],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 g=a>>>s&b;if(g!=f>>>s&b)break;g&&(u+=(1<<s)*g),s-=w,c=c.array[g]}(c=c&&o<a?c.removeBefore(r,s,a-u):c)&&f<l&&(c=c.removeAfter(r,s,f-u)),u&&(a-=u,t-=u)}return e.__ownerID?(e.size=t-a,e._origin=a,e._capacity=t,e._level=s,e._root=c,e._tail=p,e.__hash=void 0,e.__altered=!0,e):wn(a,t,s,c,p)}function xn(e){return e<S?0:e-1>>>w<<w}var kn,M=function(e){function t(t){return null==t?Tn():xe(t)?t:Tn().withMutations(function(n){var e=f(t);I(e.size),e.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){e=this._map.get(e);return void 0!==e?this._list.get(e)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):Tn()},t.prototype.set=function(e,t){return In(this,e,t)},t.prototype.remove=function(e){return In(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?Tn():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=n,this))},t}(Yt);function Dn(e,t,n,r){var o=Object.create(M.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Tn(){return kn=kn||Dn(j(),Sn())}function In(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)}M.isOrderedMap=xe,M.prototype[re]=!0,M.prototype[t]=M.prototype.remove;var jn="@@__IMMUTABLE_STACK__@@";function Nn(e){return Boolean(e&&e[jn])}var Mn,An=function(o){function e(e){return null==e?Rn():Nn(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):Pn(t,n)},e.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;if(0===this.size&&Nn(e))return e;I(e.size);var t=this.size,n=this._head;return e.__iterate(function(e){t++,n={value:e,next:n}},!0),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Pn(t,n)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Rn()},e.prototype.slice=function(e,t){if(H(e,t,this.size))return this;var n=U(e,this.size);if(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):Pn(e,r)},e.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Pn(this.size,this._head,e,this.__hash):0===this.size?Rn():(this.__ownerID=e,this.__altered=!1,this)},e.prototype.__iterate=function(n,e){var r=this;if(e)return new ye(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 ye(this.toArray()).__iterator(t,e):(n=0,r=this._head,new g(function(){var e;return r?(e=r.value,r=r.next,v(t,n++,e)):E()}))},e}(J),a=(An.isStack=Nn,An.prototype);function Pn(e,t,n,r){var o=Object.create(a);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Rn(){return Mn=Mn||Pn(0)}a[jn]=!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 Fn(e){return Boolean(e&&e[Ln])}function zn(e){return Fn(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=O(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():Fn(n)&&!d(n)?n:Gn().withMutations(function(t){var e=r(n);I(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=Fn,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(j())}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 g(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}(C);function Zn(e,t,n){for(var r=ft(t),o=0;o!==r.length;)if((e=yt(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(){I(this.size);var n={};return this.__iterate(function(e,t){n[t]=e}),n}u.isIterable=l,u.isKeyed=c,u.isIndexed=s,u.isAssociative=Z,u.isOrdered=d,u.Iterator=g,Kn(u,{toArray:function(){I(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 M(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 An(c(this)?this.valueSeq():this)},toList:function(){return gn(c(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return D(this,function(e,t){var n=c(e);if(0===(t=[e].concat(t).map(function(e){return l(e)?n&&(e=f(e)):e=n?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 ye(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(m)},every:function(r,o){I(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 I(this.size),this.__iterate(t?e.bind(t):e)},join:function(t){I(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){I(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 z(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 ye(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)?M: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(m,e),i=!0,new g(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===m?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=Te((t=De(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+lr(k(e),k(t))|0}:function(e,t){r=r+lr(k(e),k(t))|0}:t?function(e){r=31*r+k(e)|0}:function(e){r=r+k(e)|0}),r)}(this))}});var n=u.prototype,er=(n[G]=!0,n[se]=n.values,n.toJSON=n.toArray,n.__toStringMapper=mt,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 mt(t)+": "+mt(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(T(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){e=this.findLastEntry(e,t);return e?e[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return D(this,tt(this,e,!1))},get:function(n,e){return(n=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 g(function(){return(!n||o%2)&&(n=r.next()).done?n:o%2?v(e,o++,a):v(e,o++,n.value,n)})},e));var i,a},interleave:function(){var e=[this].concat(T(arguments)),t=it(this.toSeq(),C.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),D(this,n)},keySeq:function(){return $n(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return D(this,et(this,e,t,!1))},zip:function(){var e=[this].concat(T(arguments));return D(this,it(this,cr,e))},zipAll:function(){var e=[this].concat(T(arguments));return D(this,it(this,cr,e,!0))},zipWith:function(e){var t=T(arguments);return D(t[0]=this,it(this,e,t))}}),J.prototype),nr=(tr[$]=!0,tr[re]=!0,Kn(X,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),X.prototype);function rr(e,r,o,i,a,t){return I(e.size),e.__iterate(function(e,t,n){o=a?(a=!1,e):r.call(i,o,e,t,n)},t),o}function or(e,t){return t}function ir(e,t){return[t,e]}function ar(e){return function(){return!e.apply(this,arguments)}}function sr(e){return function(){return-e.apply(this,arguments)}}function cr(){return T(arguments)}function ur(e,t){return e<t?1:t<e?-1:0}function lr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}nr.has=n.includes,nr.contains=nr.includes,nr.keys=nr.values,Kn(me,er),Kn(C,tr),Kn(ge,nr);var fr,pr=function(e){function t(n){return null==n?mr():zn(n)?n:mr().withMutations(function(t){var e=X(n);I(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=zn,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 mr(){return fr=fr||hr(Tn())}dr[re]=!0,dr.zip=tr.zip,dr.zipWith=tr.zipWith,dr.zipAll=tr.zipAll,dr.__empty=mr,dr.__make=hr;var gr={LeftThenRight:-1,RightThenLeft:1};var A=function(a,s){var c,e=a;if(ne(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(p(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.");function u(e){var r=this;if(e instanceof u)return e;if(!(this instanceof u))return new u(e);if(!c){c=!0;var t=Object.keys(a),n=l._indices={};l._name=s,l._keys=t,l._defaultValues=a;for(var o=0;o<t.length;o++){var i=t[o];n[i]=o,l[i]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+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=gn().withMutations(function(n){n.setSize(r._keys.length),f(e).forEach(function(e,t){n.set(r._indices[t],e===r._defaultValues[t]?void 0:e)})}),this}var l=u.prototype=Object.create(P);return l.constructor=u,s&&(u.displayName=s),u},P=(A.prototype.toString=function(){for(var e,t=vr(this)+" { ",n=this._keys,r=0,o=n.length;r!==o;r++)t+=(r?", ":"")+(e=n[r])+": "+mt(this.get(e));return t+" }"},A.prototype.equals=function(e){return this===e||ne(e)&&br(this).equals(br(e))},A.prototype.hashCode=function(){return br(this).hashCode()},A.prototype.has=function(e){return this._indices.hasOwnProperty(e)},A.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},A.prototype.set=function(e,t){if(this.has(e)){e=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(e!==this._values&&!this.__ownerID)return yr(this,e)}return this},A.prototype.remove=function(e){return this.set(e)},A.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:yr(this,e)},A.prototype.wasAltered=function(){return this._values.wasAltered()},A.prototype.toSeq=function(){return br(this)},A.prototype.toJS=function(){return Hn(this)},A.prototype.entries=function(){return this.__iterator(m)},A.prototype.__iterator=function(e,t){return br(this).__iterator(e,t)},A.prototype.__iterate=function(e,t){return br(this).__iterate(e,t)},A.prototype.__ensureOwner=function(e){var t;return e===this.__ownerID?this:(t=this._values.__ensureOwner(e),e?yr(this,t,e):(this.__ownerID=e,this._values=t,this))},A.isRecord=ne,A.getDescriptiveName=vr,A.prototype);function yr(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)]}))}P[te]=!0,P[t]=P.remove,P.deleteIn=P.removeIn=Ct,P.getIn=Jn,P.hasIn=n.hasIn,P.merge=Tt,P.mergeWith=It,P.mergeIn=Bt,P.mergeDeep=Ft,P.mergeDeepWith=zt,P.mergeDeepIn=Kt,P.setIn=Et,P.update=kt,P.updateIn=Dt,P.withMutations=Ht,P.asMutable=Ut,P.asImmutable=Wt,P[se]=P.entries,P.toJSON=P.toObject=n.toObject,P.inspect=P.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 g(function(){return o===r?E():v(e,t?r-++o:o++,n._value)})},r.prototype.equals=function(e){return e instanceof r?x(this._value,e._value):Bn(e)},r}(C);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,O(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 Or="4.3.5",Cr=u;e.default={version:Or,Collection:u,Iterable:u,Seq:O,Map:Yt,OrderedMap:M,List:gn,Stack:An,Set:Wn,OrderedSet:pr,PairSorting:gr,Record:A,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:Ce,isOrderedMap:xe,isStack:Nn,isSet:Fn,isOrderedSet:zn,isRecord:ne,get:yt,getIn:Zn,has:gt,hasIn:Xn,merge:Nt,mergeDeep:At,mergeWith:Mt,mergeDeepWith:Pt,remove:bt,removeIn:Ot,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 m=n(1),s=n(0),g=function(e,t,n){var r,e=e.textContent;return""===e.trim()?{chunk:(r=n,{text:" ",inlines:[new s.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:e,inlines:Array(e.length).fill(t),entities:Array(e.length).fill(n),blocks:[]}}},y=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"]}}),O={code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",strong:"BOLD",ins:"UNDERLINE",sub:"SUBSCRIPT",sup:"SUPERSCRIPT"};function C(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,m.Entity.__create("MENTION","IMMUTABLE",t)):(t.url=e.getAttribute&&e.getAttribute("href")||e.href,t.title=e.innerHTML,t.targetOption=e.target,m.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=m.Entity.__create(f.type,f.mutability,f.data||{}),{chunk:S(f)};if("#text"===s&&"\n"!==t.textContent)return g(t,n,i);if("br"===s)return{chunk:y()};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=m.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=m.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=m.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,C(t)),k=!1):h=w(f,r,C(t)))),h=h||v(),f=t,c=n,(s=O[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(O.strong),"underline"===a&&e.add(O.ins),"italic"===s&&e.add(O.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,m.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]),m.CharacterMetadata.create(e)}));return a=n,new m.ContentBlock({key:Object(m.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(19),s=n(13),c=n(30),u=n(31),l=n(14),f=n(56),p=n(16),d=n(6),h=n(58),m=d.List,n=d.Record,g=d.Repeat,y=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:m(g(a.EMPTY,e.length))})});return r.createFromBlockArray(e)},r.fromJS=function(e){return new r(o({},e,{blockMap:v(e.blockMap).map(r.createContentBlockFromJS),selectionBefore:new u(e.selectionBefore),selectionAfter:new u(e.selectionAfter)}))},r.createContentBlockFromJS=function(e){var t=e.characterList;return new b(o({},e,{data:y(e.data),characterList:null!=t?m((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(20),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(21);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(21),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(21);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 y(){return(y=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(20),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(),m=this.props.tree.size-1,g=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:g?f.props.selection:null,forceSelection:f.props.forceSelection,text:h.slice(r,e),styleSet:p.getInlineStyleAt(r),customStyleMap:f.props.customStyleMap,customStyleFn:f.props.customStyleFn,isLast:o===m&&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,y({},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(22),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(19),s=t(13),c=t(42),n=t(30),p=t(180),u=t(20),d=t(14),l=t(85),h=t(16),m=t(6),g=m.List,y=m.Map,v=m.OrderedSet,b=t(181),w=t(70),S=t(27),_=t(182),E=h("draft_tree_data_support"),O=new RegExp("\r","g"),C=new RegExp("\n","g"),x=new RegExp("^\n","g"),k=new RegExp(" ","g"),D=new RegExp(" ?","g"),T=new RegExp("​?","g"),I=["bold","bolder","500","600","700","800","900"],j=["light","lighter","normal","100","200","300","400"],N=["className","href","rel","target","title"],M=["alt","className","height","src","width"],A=(o(m={},u("public/DraftStyleDefault/depth0"),0),o(m,u("public/DraftStyleDefault/depth1"),1),o(m,u("public/DraftStyleDefault/depth2"),2),o(m,u("public/DraftStyleDefault/depth3"),3),o(m,u("public/DraftStyleDefault/depth4"),4),m),P=y({b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE",mark:"HIGHLIGHT"}),L=function(){function e(e,t){o(this,"characterList",g()),o(this,"currentBlockType","unstyled"),o(this,"currentDepth",0),o(this,"currentEntity",null),o(this,"currentText",""),o(this,"wrapper",null),o(this,"blockConfigs",[]),o(this,"contentBlocks",[]),o(this,"entityMap",n),o(this,"blockTypeMap",void 0),o(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=e,this.disambiguate=t}var t=e.prototype;return t.clear=function(){this.characterList=g(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=n,this.wrapper=null,this.contentBlocks=[]},t.addDOMNode=function(e){var t;return this.contentBlocks=[],this.currentDepth=0,(t=this.blockConfigs).push.apply(t,this._toBlockConfigs([e],v())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},t.getContentBlocks=function(){return 0===this.contentBlocks.length&&(E?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},t._makeBlockConfig=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=i({key:e.key||d(),type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:g(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=g(),this.currentBlockType="unstyled",this.currentText="",e},t._toBlockConfigs=function(e,t){for(var n=[],r=0;r<e.length;r++){var o,i,a,s,c,u=e[r],l=u.nodeName.toLowerCase();"body"===l||f(l)?(this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig()),o=this.currentDepth,i=this.wrapper,f(l)&&(this.wrapper=l,f(i))&&this.currentDepth++,n.push.apply(n,this._toBlockConfigs(Array.from(u.childNodes),t)),this.currentDepth=o,this.wrapper=i):void 0!==(o=this.blockTypeMap.get(l))?(this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig()),i=this.currentDepth,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(A).some(function(e){t.classList.contains(e)&&(n=A[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<=I.indexOf(n)?e.add("BOLD"):0<=j.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=P.has(l)?s.add(P.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=g()):(this.currentText=this.currentText.slice(t,n),this.characterList=this.characterList.slice(t,n))},t._addTextNode=function(e,t){e=e.textContent;""===e.trim()&&"pre"!==this.wrapper&&(e=" "),"pre"!==this.wrapper&&(e=(e=e.replace(x,"")).replace(C," ")),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={},M.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={},N.forEach(function(e){var t=r.getAttribute(e);t&&(o[e]=t)}),o.url=new p(r.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",o||{}),t.push.apply(t,this._toBlockConfigs(Array.from(e.childNodes),n)),this.currentEntity=null)},t._toContentBlocks=function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,n=e.length-1,r=0;r<=n;r++){var o=e[r];o.parent=t,o.prevSibling=0<r?e[r-1].key:null,o.nextSibling=r<n?e[r+1].key:null,o.children=g(o.childConfigs.map(function(e){return e.key})),this.contentBlocks.push(new s(i({},o))),this._toContentBlocks(o.childConfigs,o.key)}},t._hoistContainersInBlockConfigs=function(e){var t=this;return g(e).flatMap(function(e){return"unstyled"!==e.type||""!==e.text?[e]:t._hoistContainersInBlockConfigs(e.childConfigs)})},t._toFlatContentBlocks=function(e){var r=this;this._hoistContainersInBlockConfigs(e).forEach(function(e){var t=r._extractTextFromBlockConfigs(e.childConfigs),n=t.text,t=t.characterList;r.contentBlocks.push(new a(i({},e,{text:e.text+n,characterList:e.characterList.concat(t)})))})},t._extractTextFromBlockConfigs=function(e){for(var t=e.length-1,n="",r=g(),o=0;o<=t;o++){var i=e[o],i=(n+=i.text,r=r.concat(i.characterList),""!==n&&"unstyled"!==i.type&&(n+="\n",r=r.push(r.last())),this._extractTextFromBlockConfigs(i.childConfigs));n+=i.text,r=r.concat(i.characterList)}return{text:n,characterList:r}},e}();e.exports=function(e){var 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(O,"").replace(k," ").replace(D,"").replace(T,""));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=y(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,m,C){!function(e,t){var n,g,y,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 O(e,t,n){var r=0;for(e=n?b(e/i):e>>1,e+=b(e/t);u*v>>1<e;r+=y)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=y;u<=r&&S("invalid-input"),s=e.charCodeAt(r++),(y<=(s=s-48<10?s-22:s-65<26?s-65:s-97<26?s-97:y)||s>b((g-l)/i))&&S("overflow"),l+=s*i,!(s<(s=a<=p?1:p+v<=a?v:a-p));a+=y)i>b(g/(s=y-s))&&S("overflow"),i*=s;p=O(l-o,t=c.length+1,0==o),b(l/t)>g-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,m=t=0;m<p;++m)(s=e[m])<128&&f.push(w(s));for(n=r=f.length,r&&f.push("-");n<p;){for(o=g,m=0;m<p;++m)d<=(s=e[m])&&s<o&&(o=s);for(o-d>b((g-t)/(c=n+1))&&S("overflow"),t+=(o-d)*c,d=o,m=0;m<p;++m)if((s=e[m])<d&&++t>g&&S("overflow"),s==d){for(i=t,a=y;!(i<(u=a<=h?1:h+v<=a?v:a-h));a+=y)f.push(w(E(u+(l=i-u)%(u=y-u),0))),i=b(l/u);f.push(w(E(i,0))),h=O(t,c,n==r),t=0,++n}++t,++d}return f.join("")}m&&m.nodeType,e&&e.nodeType,(t="object"==typeof t&&t).global!==t&&t.window!==t&&t.self,g=2147483647,v=26,o=38,i=700,r=/^xn--/,a=/[^\x20-\x7E]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,c={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},u=(y=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(m,C,m,e))&&(e.exports=t)}.call(this,C(215)(e),C(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 m(e,t){if(e&&(e.COLOR||e.BGCOLOR||e.FONTSIZE||e.FONTFAMILY)){var n='style="';if(e.COLOR)n+="color: ".concat(e.COLOR,";");if(e.BGCOLOR)n+="background-color: ".concat(e.BGCOLOR,";");if(e.FONTSIZE)n+="font-size: ".concat(e.FONTSIZE).concat(/^\d+$/.test(e.FONTSIZE)?"px":"",";");if(e.FONTFAMILY)n+="font-family: ".concat(e.FONTFAMILY,";");n+='"';return"<span ".concat(n,">").concat(t,"</span>")}return t}function g(e,t,n,r){var o=e[t];if(typeof r==="function"){var i=r(o,n);if(i)return i}if(o.type==="MENTION")return'<a href="'.concat(o.data.url,'" class="wysiwyg-mention" data-mention data-value="').concat(o.data.value,'">').concat(n,"</a>");if(o.type==="LINK"){var a=o.data.targetOption||"_self";return'<a href="'.concat(o.data.url,'" target="').concat(a,'">').concat(n,"</a>")}if(o.type==="IMAGE"){var s=o.data.alignment;if(s&&s.length)return'<div style="text-align:'.concat(s,';"><img src="').concat(o.data.src,'" alt="').concat(o.data.alt,'" style="height: ').concat(o.data.height,";width: ").concat(o.data.width,'"/></div>');return'<img src="'.concat(o.data.src,'" alt="').concat(o.data.alt,'" style="height: ').concat(o.data.height,";width: ").concat(o.data.width,'"/>')}if(o.type==="EMBEDDED_LINK")return'<iframe width="'.concat(o.data.width,'" height="').concat(o.data.height,'" src="').concat(o.data.src,'" frameBorder="0"></iframe>');return n}function y(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=y(e,["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"],t.start,t.end);var r="";n.forEach(function(e){r+=w(e)});r=m(t.styles,r);return r}function _(t,e,n,r){var o=[];var i=y(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=g(e,n.entityKey,a,r)}else if(n.type==="HASHTAG")a='<a href="'.concat(a,'" class="wysiwyg-hashtag">').concat(a,"</a>");return a}function E(r,o,e,i){var a=[];var s=c(r,e);s.forEach(function(e,t){var n=_(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 O(e,t,n,r,o){var i=[];if(u(e))i.push(g(t,e.entityRanges[0].key,undefined,o));else{var a=l(e.type);if(a){i.push("<".concat(a));var s=f(e.data);if(s)i.push(' style="'.concat(s,'"'));if(r)i.push(' dir = "auto"');i.push(">");i.push(E(e,t,n,o));i.push("</".concat(a,">"))}}i.push("\n");return i.join("")}function C(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(C(e.type))c.push(e);else{if(c.length>0){var t=x(c,s,r,i);a.push(t);c=[]}var n=O(e,s,r,o,i);a.push(n)}});if(c.length>0){var n=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 m(e,t){if(!(this instanceof m))return new m(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)}m.prototype.add=function(e,t){return this.__schemas__[e]=t,d(this),this},m.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},m.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__},m.prototype.pretest=function(e){return this.re.pretest.test(e)},m.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},m.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},m.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},m.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},m.prototype.onCompile=function(){},e.exports=m},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(19),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"),m=h?o:r,g=p.List,y=p.Repeat;e.exports={insertAtomicBlock:function(e,t,n){var r=e.getCurrentContent(),o=e.getSelection(),r=u.removeRange(r,o,"backward"),i=r.getSelectionAfter(),r=u.splitBlock(r,i),i=r.getSelectionAfter(),r=u.setBlockType(r,i,"atomic"),t=c.create({entity:t}),t={key:f(),type:"atomic",text:n,characterList:g(y(t,n.length))},n={key:f(),type:"unstyled"},t=(h&&(t=a({},t,{nextSibling:n.key}),n=a({},n,{prevSibling:t.key})),[new m(t),new m(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 m=n(25),g=n(13),r=n(6),y=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 g&&(h.getChildKeys().isEmpty()||v(!1)),1===n.size?function(e,t,n,r,o,i){var a=6<arguments.length&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",s=n.get(o),c=s.getText(),u=s.getCharacterList(),l=o,f=i+r.getText().length,p=null;switch(a){case"MERGE_OLD_DATA_TO_NEW_DATA":p=r.getData().merge(s.getData());break;case"REPLACE_WITH_NEW_DATA":p=r.getData()}a=s.getType(),c&&"unstyled"===a&&(a=r.getType()),c=s.merge({text:c.slice(0,i)+r.getText()+c.slice(i),characterList:y(u,r.getCharacterList(),i),type:a,data:p});return e.merge({blockMap:n.set(o,c),selectionBefore:t,selectionAfter:t.merge({anchorKey:l,anchorOffset:f,focusKey:l,focusOffset:f,isBackward:!1})})}(e,t,f,n.first(),p,d,l):(h=e,l=t,r=n,o=p,i=d,t=(e=f).first()instanceof g,a=[],s=r.size,n=e.get(o),p=r.first(),d=r.last(),f=d.getLength(),d=d.getKey(),c=t&&(!n.getChildKeys().isEmpty()||!p.getChildKeys().isEmpty()),e.forEach(function(e,t){t!==o?a.push(e):(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=m.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},O=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},C=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getNextSiblingKey();r&&!t.get(r);)r=n.get(r).getNextSiblingKey()||null;return r},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,m,g,y;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&&(m=s,g=c,y=n,d=(h=d).withMutations(function(t){var n,e,r,o;_(m.getKey(),t,function(e){return e.merge({nextSibling:C(e,t,y),prevSibling:x(e,t,y)})}),_(g.getKey(),t,function(e){return e.merge({nextSibling:C(e,t,y),prevSibling:x(e,t,y)})}),E(m.getKey(),y).forEach(function(e){return _(e,t,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return t.get(e)}),nextSibling:C(e,t,y),prevSibling:x(e,t,y)})})}),_(m.getNextSiblingKey(),t,function(e){return e.merge({prevSibling:m.getPrevSiblingKey()})}),_(m.getPrevSiblingKey(),t,function(e){return e.merge({nextSibling:C(e,t,y)})}),_(g.getNextSiblingKey(),t,function(e){return e.merge({prevSibling:x(e,t,y)})}),_(g.getPrevSiblingKey(),t,function(e){return e.merge({nextSibling:g.getNextSiblingKey()})}),E(g.getKey(),y).forEach(function(e){_(e,t,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return t.get(e)}),nextSibling:C(e,t,y),prevSibling:x(e,t,y)})})}),O(g,y).forEach(function(e){return _(e,t,function(e){return e.merge({nextSibling:C(e,t,y),prevSibling:x(e,t,y)})})}),null==h.get(m.getKey())&&null!=h.get(g.getKey())&&g.getParentKey()===m.getKey()&&null==g.getPrevSiblingKey()&&(n=m.getPrevSiblingKey(),_(g.getKey(),t,function(e){return e.merge({prevSibling:n})}),_(n,t,function(e){return e.merge({nextSibling:g.getKey()})}),e=n?h.get(n):null,r=e?e.getParentKey():null,m.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(m.getChildKeys())})})),_(m.getChildKeys().find(function(e){return null===h.get(e).getNextSiblingKey()}),t,function(e){return e.merge({nextSibling:m.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),m=n(7),g=n(54),y=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()||m(!1);var n=t.getAnchorKey(),r=e.getBlockMap(),o=r.get(n),i=o.getText();if(!i){var a=o.getType();if("unordered-list-item"===a||"ordered-list-item"===a)return g(e,t,function(e){return e.merge({type:"unstyled",depth:0})})}var s,c,a=t.getAnchorOffset(),u=o.getCharacterList(),l=h(),f=o instanceof d,p=o.merge({text:i.slice(0,a),characterList:u.slice(0,a)}),i=p.merge({key:l,text:i.slice(a),characterList:u.slice(a),data:v()}),u=r.toSeq().takeUntil(function(e){return e===o}),a=r.toSeq().skipUntil(function(e){return e===o}).rest(),r=u.concat([[n,p],[l,i]],a).toOrderedMap();return f&&(o.getChildKeys().isEmpty()||m(!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:y(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),O=n(7),C=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&&O(!1);var o,i,a,s,c,u,l,f,p,d,h=t.getKey(),m=n.getKey(),g=(m===h&&O(!1),e.getBlockMap()),y=n instanceof _,v=[n],b=g.delete(m),g=(y&&(v=[],b=g.withMutations(function(t){var o=n.getNextSiblingKey(),i=E(n,t);t.toSeq().skipUntil(function(e){return e.getKey()===m}).takeWhile(function(e){var t=e.getKey(),n=t===m,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=C();return"before"===r?((o=e.getBlockBefore(h))&&o.getKey()===n.getKey()&&O(!1),S=g.concat([].concat(w,[[h,t]]),b).toOrderedMap()):"after"===r&&((o=e.getBlockAfter(h))&&o.getKey()===m&&O(!1),S=g.concat([[h,t]].concat(w),b).toOrderedMap()),e.merge({blockMap:(o=S,g=n,h=t,w=r,y?(i="after"===w,a=g.getKey(),s=h.getKey(),c=g.getParentKey(),u=g.getNextSiblingKey(),l=g.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:m,focusKey:m})})}},function(e,t,n){"use strict";var r=n(6).List,n=function(){function e(e){var t,n,r;r=void 0,(n="_decorators")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this._decorators=e.slice()}var t=e.prototype;return t.getDecorations=function(t,n){var c=Array(t.getText().length).fill(null);return this._decorators.forEach(function(e,a){var s=0;(0,e.strategy)(t,function(e,t){if(function(e,t,n){for(var r=t;r<n;r++)if(null!=e[r])return;return 1}(c,e,t)){for(var n=c,r=t,o=a+"."+s,i=e;i<r;i++)n[i]=o;s++}},n)}),r(c)},t.getComponentForKey=function(e){e=parseInt(e.split(".")[0],10);return this._decorators[e].component},t.getPropsForKey=function(e){e=parseInt(e.split(".")[0],10);return this._decorators[e].props},e}();e.exports=n},function(A,e,P){"use strict";!function(r){var e=P(17);function p(){return(p=e||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);(r="function"==typeof Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})):r).forEach(function(e){i(t,e,n[e])})}return t}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function a(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}var t=P(42),h=P(59),n=P(121),m=P(129),s=P(146),c=P(149),u=P(185),l=P(186),f=P(71),g=P(8),y=P(0),v=P(45),b=P(36),w=P(11),S=P(20),_=P(14),E=P(87),O=P(37),C=P(16),x=P(7),k=P(27),D=P(10),T=w.isBrowser("IE"),I=!T,j={edit:c,composite:n,drag:s,cut:null,render:null},N=!1,M=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}(y.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||O(t)).x,e=e.y,k(i)||x(!1),i.focus(),t===window?window.scrollTo(n,e):v.setTop(t,e),o||a.update(g.forceSelection(r,r.getSelection())))}),i(o(a),"blur",function(){var e=a.editor;e&&(k(e)||x(!1),e.blur())}),i(o(a),"setMode",function(e){var t=a.props,n=t.onPaste,r=t.onCut,t=t.onCopy,o=d({},j.edit),n=(n&&(o.onPaste=n),r&&(o.onCut=r),t&&(o.onCopy=t),d({},j,{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},y.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 y.createElement("div",{className:u},this._renderPlaceholder(),y.createElement("div",{className:S("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},y.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:I&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},y.createElement(M,{editor:this,editorState:a}),y.createElement(m,p({},t,{key:"contents"+this.state.contentsKey})))))},n.componentDidMount=function(){this._blockSelectEvents=!1,!N&&C("draft_ods_enabled")&&(N=!0,f.initODS()),this.setMode("edit"),T&&(this.editor?this.editor.ownerDocument:r).execCommand("AutoUrlDetect",!1,!1)},n.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestEditorState=this.props.editorState,this._latestCommittedEditorState=this.props.editorState},e}(y.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}),A.exports=w}.call(this,P(23))},function(e,t,n){"use strict";var r=n(122),s=n(9),c=n(15),u=n(8),o=n(35),i=n(11),a=n(62),l=n(64),f=n(65),p=n(43),d=n(10),h=i.isBrowser("IE"),m=!1,g=!1,y=null;var v={onCompositionStart:function(e){g=!0,e=e,y||(y=new r(l(e))).start()},onCompositionEnd:function(e){g=m=!1,setTimeout(function(){m||v.resolveComposition(e)},20)},onSelect:a,onKeyDown:function(e,t){g?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;g||(t=d(y).stopAndFlushMutations(),m=!(y=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===g&&-1!==A(t).indexOf(A(e))}function c(e,t){if(typeof e===g)return e=e.replace(/^\s\s*/,p),typeof t==h?e:e.substring(0,500)}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])===m&&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]===m&&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===m&&(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])===g?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[y]=f,e.type=f,u.call(e,r,i.device),a&&!e.type&&o&&o.mobile&&(e.type=S),a&&"Macintosh"==e[y]&&n&&typeof n.standalone!=h&&n.maxTouchPoints&&2<n.maxTouchPoints&&(e[y]="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===g&&500<e.length?c(e,500):e,this},this.setUA(r),this):new l(e,t).getResult()}var r,p="",d="function",h="undefined",m="object",g="string",y="model",n="name",o="type",v="vendor",b="version",w="architecture",i="console",S="mobile",_="tablet",a="smarttv",E="wearable",O="embedded",C="Amazon",x="Apple",L="BlackBerry",k="Browser",D="Chrome",T="Firefox",I="Google",F="Microsoft",j="Opera",N="Samsung",M="Sony",z="Xiaomi",B="Chromium OS",A=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,j+" Mini"]],[/\bopr\/([\w\.]+)/i],[b,[n,j]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[b,[n,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\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,/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"]],[/slbrowser\/([\w\.]+)/i],[b,[n,"Smart Lenovo "+k]],[/(avast|avg)\/([\w\.]+)/i],[[n,/(.+)/,"$1 Secure "+k],b],[/\bfocus\/([\w\.]+)/i],[b,[n,T+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[n,j+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[n,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[n,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[n,j+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[n,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[b,[n,T]],[/\bqihu|(qi?ho?o?|360)browser/i],[[n,"360 "+k]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[n,/(.+)/,"$1 "+k],b],[/samsungbrowser\/([\w\.]+)/i],[b,[n,N+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[n,/_/g," "],b],[/metasr[\/ ]?([\d\.]+)/i],[b,[n,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[n,"Sogou Mobile"],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[n,b],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[n],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[n,"Facebook"],b],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\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,T+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/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,A]],[/((?: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,A]],[/(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,A]]],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],[y,[v,N],[o,_]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[y,[v,N],[o,S]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[y,[v,x],[o,S]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[y,[v,x],[o,_]],[/(macintosh);/i],[y,[v,x]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[y,[v,"Sharp"],[o,S]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[y,[v,"Huawei"],[o,_]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[y,[v,"Huawei"],[o,S]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[y,/_/g," "],[v,z],[o,S]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[y,/_/g," "],[v,z],[o,_]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[y,[v,"OPPO"],[o,S]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[y,[v,"Vivo"],[o,S]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[y,[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],[y,[v,"Motorola"],[o,S]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[y,[v,"Motorola"],[o,_]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[y,[v,"LG"],[o,_]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[y,[v,"LG"],[o,S]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[y,[v,"Lenovo"],[o,_]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[y,/_/g," "],[v,"Nokia"],[o,S]],[/(pixel c)\b/i],[y,[v,I],[o,_]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[y,[v,I],[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],[y,[v,M],[o,S]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[y,"Xperia Tablet"],[v,M],[o,_]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[y,[v,"OnePlus"],[o,S]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[y,[v,C],[o,_]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[y,/(.+)/g,"Fire Phone $1"],[v,C],[o,S]],[/(playbook);[-\w\),; ]+(rim)/i],[y,v,[o,_]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[y,[v,L],[o,S]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[y,[v,"ASUS"],[o,_]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[y,[v,"ASUS"],[o,S]],[/(nexus 9)/i],[y,[v,"HTC"],[o,_]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[y,/_/g," "],[o,S]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[y,[v,"Acer"],[o,_]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[y,[v,"Meizu"],[o,S]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[y,[v,"Ulefone"],[o,S]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[v,y,[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,y,[o,_]],[/(surface duo)/i],[y,[v,F],[o,_]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[y,[v,"Fairphone"],[o,S]],[/(u304aa)/i],[y,[v,"AT&T"],[o,S]],[/\bsie-(\w*)/i],[y,[v,"Siemens"],[o,S]],[/\b(rct\w+) b/i],[y,[v,"RCA"],[o,_]],[/\b(venue[\d ]{2,7}) b/i],[y,[v,"Dell"],[o,_]],[/\b(q(?:mv|ta)\w+) b/i],[y,[v,"Verizon"],[o,_]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[y,[v,"Barnes & Noble"],[o,_]],[/\b(tm\d{3}\w+) b/i],[y,[v,"NuVision"],[o,_]],[/\b(k88) b/i],[y,[v,"ZTE"],[o,_]],[/\b(nx\d{3}j) b/i],[y,[v,"ZTE"],[o,S]],[/\b(gen\d{3}) b.+49h/i],[y,[v,"Swiss"],[o,S]],[/\b(zur\d{3}) b/i],[y,[v,"Swiss"],[o,_]],[/\b((zeki)?tb.*\b) b/i],[y,[v,"Zeki"],[o,_]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[v,"Dragon Touch"],y,[o,_]],[/\b(ns-?\w{0,9}) b/i],[y,[v,"Insignia"],[o,_]],[/\b((nxa|next)-?\w{0,9}) b/i],[y,[v,"NextBook"],[o,_]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[v,"Voice"],y,[o,S]],[/\b(lvtel\-)?(v1[12]) b/i],[[v,"LvTel"],y,[o,S]],[/\b(ph-1) /i],[y,[v,"Essential"],[o,S]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[y,[v,"Envizen"],[o,_]],[/\b(trio[-\w\. ]+) b/i],[y,[v,"MachSpeed"],[o,_]],[/\btu_(1491) b/i],[y,[v,"Rotor"],[o,_]],[/(shield[\w ]+) b/i],[y,[v,"Nvidia"],[o,_]],[/(sprint) (\w+)/i],[v,y,[o,S]],[/(kin\.[onetw]{3})/i],[[y,/\./g," "],[v,F],[o,S]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[y,[v,"Zebra"],[o,_]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[y,[v,"Zebra"],[o,S]],[/smart-tv.+(samsung)/i],[v,[o,a]],[/hbbtv.+maple;(\d+)/i],[[y,/^/,"SmartTV"],[v,N],[o,a]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,"LG"],[o,a]],[/(apple) ?tv/i],[v,[y,x+" TV"],[o,a]],[/crkey/i],[[y,D+"cast"],[v,I],[o,a]],[/droid.+aft(\w+)( bui|\))/i],[y,[v,C],[o,a]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[y,[v,"Sharp"],[o,a]],[/(bravia[\w ]+)( bui|\))/i],[y,[v,M],[o,a]],[/(mitv-\w{5}) bui/i],[y,[v,z],[o,a]],[/Hbbtv.*(technisat) (.*);/i],[v,y,[o,a]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,c],[y,c],[o,a]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[o,a]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[v,y,[o,i]],[/droid.+; (shield) bui/i],[y,[v,"Nvidia"],[o,i]],[/(playstation [345portablevi]+)/i],[y,[v,M],[o,i]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[y,[v,F],[o,i]],[/((pebble))app/i],[v,y,[o,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[y,[v,x],[o,E]],[/droid.+; (glass) \d/i],[y,[v,I],[o,E]],[/droid.+; (wt63?0{2,3})\)/i],[y,[v,"Zebra"],[o,E]],[/(quest( 2| pro)?)/i],[y,[v,"Facebook"],[o,E]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[o,O]],[/(aeobc)\b/i],[y,[v,C],[o,O]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[y,[o,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[y,[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],[y,[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 (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[n,[b,t,K]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[b,t,K],[n,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\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,T+" 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]]},P=(l.VERSION="0.7.37",l.BROWSER=e([n,b,"major"]),l.CPU=e([w]),l.DEVICE=e([y,v,o,i,S,a,_,E,O]),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));P&&!P.ua&&(r=new l,P.ua=r.getResult(),P.ua.get=function(){return r.getUA()},P.ua.set=function(e){r.setUA(e);var t,n=r.getResult();for(t in n)P.ua[t]=n[t]})}("object"==typeof window?window:this)},function(t,e){!function(e){t.exports=e}.call(this,{})},function(e,t,n){"use strict";var o=n(7),u=/\./,i=/\|\|/,a=/\s+\-\s+/,r=/^(<=|<|=|>=|~>|~|>|)?\s*(.+)/,l=/^(\d*)(.*)/;function s(e,t){var n,r=e.split(i);return 1<r.length?r.some(function(e){return b.contains(e,t)}):(r=e=r[0].trim(),e=t,0<(r=r.split(a)).length&&r.length<=2||o(!1),1===r.length?c(r[0],e):(n=r[0],r=r[1],m(n)&&m(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 m(e){return!d(e).modifier}function g(e,t){for(var n=e.length;n<t;n++)e[n]="0"}function y(e,t){return typeof e!=typeof t&&o(!1),t<e?1:e<t?-1:0}function v(e,t){for(var n,r,o,e=function(e,t){g(e=e.slice(),(t=t.slice()).length);for(var n=0;n<t.length;n++){var r=t[n].match(/^[x*]$/i);if(r&&(t[n]=e[n]="0","*"===r[0])&&n===t.length-1)for(var o=n;o<e.length;o++)e[o]="0"}return g(t,e.length),[e,t]}(e,t),i=e[0],a=e[1],s=0;s<a.length;s++){n=i[s],r=a[s],o=c=o=c=void 0,c=n.match(l)[1],o=r.match(l)[1],c=parseInt(c,10),o=parseInt(o,10);var c=h(c)&&h(o)&&c!==o?y(c,o):y(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 O(){return(O=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 C=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=[],m=u.getBlocksAsArray()[0];m;)var g=m.getKey(),y={blockRenderMap:t,blockRendererFn:n,blockStyleFn:r,contentState:u,customStyleFn:i,customStyleMap:o,decorator:p,editorKey:s,editorState:a,forceSelection:f,selection:l,block:m,direction:c||d.get(g),tree:a.getBlockTree(g)},v=(t.get(m.getType())||t.get("unstyled")).wrapper,y=(h.push({block:k.createElement(C,O({key:g},y)),wrapperTemplate:v,key:g,offsetKey:x.encode(g,0,0)}),m.getNextSiblingKey()),m=y?u.getBlockForKey(y):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 O(e,t){var n=(e=t.get(e.getType())||t.get("unstyled")).wrapper;return{Element:e.element||t.get("unstyled").element,wrapperTemplate:n}}function C(e,t){return(t=t(e))?{CustomComponent:t.component,customProps:t.props,customEditable:t.editable}:{}}function x(e,t,n,r,o,i){return t={"data-block":!0,"data-editor":t,"data-offset-key":n,key:e.getKey(),ref:i},(n=r(e))&&(t.className=n),t=void 0!==o.customEditable?E({},t,{contentEditable:o.customEditable,suppressContentEditableWarning:!0}):t}var k=n(132),D=n(15),T=n(0),a=n(45),s=n(36),c=n(73),u=n(37),l=n(74),o=n(6),f=n(7),p=n(27),n=(o.List,function(o){var e;function _(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e=o.call.apply(o,[this].concat(n))||this),"wrapperRef",T.createRef()),e}e=o,(t=_).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 m=this,e=this.props,t=e.block,g=e.blockRenderMap,y=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=C(r,y),i=o.CustomComponent||_,a=O(r,g),s=a.Element,a=a.wrapperTemplate,c=x(r,w,n,v,o,null),t=E({},m.props,{tree:S.getBlockTree(t),blockProps:o.customProps,offsetKey:n,block:r});if(e.push(T.createElement(s,c,T.createElement(i,t))),a&&(o=b,!(c=(n=r).getNextSiblingKey())||o.getBlockForKey(c).getType()!==n.getType())){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(T.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=C(t,y),p=f.CustomComponent,p=null!=p?T.createElement(p,d({},this.props,{tree:S.getBlockTree(u),blockProps:f.customProps,offsetKey:l,block:t})):T.createElement(k,{block:t,children:c,contentState:b,customStyleFn:r,customStyleMap:o,decorator:n,direction:i,forceSelection:a,hasSelection:h(s,u),selection:s,tree:e});return t.getParentKey()?p:(c=O(t,g).Element,r=x(t,w,l,v,f,this.wrapperRef),T.createElement(c,r,p))},_}(T.Component));e.exports=n},function(e,t,n){"use strict";var y=n(133),v=n(69),b=n(15),r=n(6),w=n(0),o=n(20),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(),m=s.getText(),g=e.size-1,e=this.props.children||e.map(function(e,o){var i=e.get("decoratorKey"),t=e.get("leaves"),a=t.size-1,t=t.map(function(e,t){var n=b.encode(h,o,t),r=e.get("start"),e=e.get("end");return w.createElement(v,{key:n,offsetKey:n,block:s,start:r,selection:p?d:null,forceSelection:f,text:m.slice(r,e),styleSet:s.getInlineStyleAt(r),customStyleMap:u,customStyleFn:c,isLast:i===g&&t===a})}).toArray();return i&&r?w.createElement(y,{block:s,children:t,contentState:n,decorator:r,decoratorKey:i,direction:l,leafSet:e,text:m,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),m=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=m.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(21),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(21),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 m(n,t,r,o){var i=c();if(n.extend&&null!=t&&d(i,t)){r>p(t)&&s.logSelectionStateFailure({anonymizedDom:f(t),extraParams:JSON.stringify({offset:r}),selectionState:JSON.stringify(o.toJS())});var a=t===n.focusNode;try{0<n.rangeCount&&n.extend&&n.extend(t,r)}catch(e){throw s.logSelectionStateFailure({anonymizedDom:f(t,function(e){var t=[];return e===i&&t.push("active element"),e===n.anchorNode&&t.push("selection anchor node"),e===n.focusNode&&t.push("selection focus node"),t}),extraParams:JSON.stringify({activeElementName:i?i.nodeName:null,nodeIsFocus:t===n.focusNode,nodeWasFocus:a,selectionRangeCount:n.rangeCount,selectionAnchorNodeName:n.anchorNode?n.anchorNode.nodeName:null,selectionAnchorOffset:n.anchorOffset,selectionFocusNodeName:n.focusNode?n.focusNode.nodeName:null,selectionFocusOffset:n.focusOffset,message:e?""+e:null,offset:r},null,2),selectionState:JSON.stringify(o.toJS(),null,2)}),e}}else t&&0<n.rangeCount&&((a=n.getRangeAt(0)).setEnd(t,r),n.addRange(a.cloneRange()))}function g(e,t,n,r){var o=h(t).createRange();if(n>p(t)&&(s.logSelectionStateFailure({anonymizedDom:f(t),extraParams:JSON.stringify({offset:n}),selectionState:JSON.stringify(r.toJS())}),i.handleExtensionCausedError()),o.setStart(t,n),u)try{e.addRange(o)}catch(e){}else e.addRange(o)}e.exports={setDraftEditorSelection:function(e,t,n,r,o){var i,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(),g(p,t,i-r,e),m(p,t,a-r,e)):s?(u&&(p.removeAllRanges(),g(p,t,a-r,e)),c&&(l=p.focusNode,f=p.focusOffset,p.removeAllRanges(),g(p,t,i-r,e),m(p,l,f,e))):(c&&(p.removeAllRanges(),g(p,t,i-r,e)),u&&m(p,t,a-r,e)))},addFocusToSelection:m}},function(e,t,n){"use strict";var r=n(137);e.exports=function(e){return r(e)&&3==e.nodeType}},function(e,t,n){"use strict";e.exports=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}},function(e,t,n){"use strict";var r=n(139),o=n(140);function i(e){return null==e?e:String(e)}e.exports=function(e,t){var n;if(window.getComputedStyle&&(n=window.getComputedStyle(e,null)))return i(n.getPropertyValue(o(t)));if(document.defaultView&&document.defaultView.getComputedStyle){if(n=document.defaultView.getComputedStyle(e,null))return i(n.getPropertyValue(o(t)));if("display"===t)return"none"}return e.currentStyle?i("float"===t?e.currentStyle.cssFloat||e.currentStyle.styleFloat:e.currentStyle[r(t)]):i(e.style&&e.style[r(t)])}},function(e,t,n){"use strict";var r=/-(.)/g;e.exports=function(e){return e.replace(r,function(e,t){return t.toUpperCase()})}},function(e,t,n){"use strict";var r=/([A-Z])/g;e.exports=function(e){return e.replace(r,"-$1").toLowerCase()}},function(e,t,n){"use strict";var r=n(44);e.exports=function(e){var t=e.ownerDocument.documentElement;return"getBoundingClientRect"in e&&r(t,e)?(e=e.getBoundingClientRect(),{left:Math.round(e.left)-t.clientLeft,right:Math.round(e.right)-t.clientLeft,top:Math.round(e.top)-t.clientTop,bottom:Math.round(e.bottom)-t.clientTop}):{left:0,right:0,top:0,bottom:0}}},function(e,t,n){"use strict";var r="undefined"!=typeof navigator&&-1<navigator.userAgent.indexOf("AppleWebKit");e.exports=function(e){return(e=e||document).scrollingElement?e.scrollingElement:r||"CSS1Compat"!==e.compatMode?e.body:e.documentElement}},function(e,t,n){"use strict";e.exports=function(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}},function(e,t,n){"use strict";var r=n(17);function L(){return(L=r||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function F(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},t=Object.keys(o);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):t).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return r}var z=n(75),B=n(15),K=n(0),H=n(20),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()),m=l.getBlocksAsArray(),g=[],y=null,v=null,b=0;b<m.length;b++){var w=m[b],S=w.getKey(),_=w.getType(),E=n(w),O=void 0,C=void 0,x=void 0,E=(E&&(O=E.component,C=E.props,x=E.editable),u||h.get(S)),k=B.encode(S,0,0),C={contentState:l,block:w,blockProps:C,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"),T=D.wrapper,D=D.element||t.get("unstyled").element,I=w.getDepth(),j="",_=(r&&(j=r(w)),"li"===D&&(j=U(j,H({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===_,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===_,"public/DraftStyleDefault/reset":v!==T||null===y||y<I,"public/DraftStyleDefault/depth0":0===I,"public/DraftStyleDefault/depth1":1===I,"public/DraftStyleDefault/depth2":2===I,"public/DraftStyleDefault/depth3":3===I,"public/DraftStyleDefault/depth4":4<=I,"public/DraftStyleDefault/listLTR":"LTR"===E,"public/DraftStyleDefault/listRTL":"RTL"===E}))),O||z),I={className:j,"data-block":!0,"data-editor":s,"data-offset-key":k,key:S},E=(void 0!==x&&(I=F({},I,{contentEditable:x,suppressContentEditableWarning:!0})),K.createElement(D,I,K.createElement(_,L({},C,{key:S}))));g.push({block:E,wrapperTemplate:T,key:S,offsetKey:k}),y=T?w.getDepth():null,v=T}for(var N=[],M=0;M<g.length;){var A=g[M];if(A.wrapperTemplate){for(var P=[];P.push(g[M].block),++M<g.length&&g[M].wrapperTemplate===A.wrapperTemplate;);var R=K.cloneElement(A.wrapperTemplate,{key:A.key+"-wrap","data-offset-key":A.offsetKey},P);N.push(R)}else N.push(A.block),M++}return K.createElement("div",{"data-contents":"true"},N)},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 m(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(m(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(m(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),m=r.isBrowser("Chrome"),r=r.isBrowser("Firefox"),m=m||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:m,onKeyUp:m}},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),m=n(152),g="'",y="/",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==g||a==y)),(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,m(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,O=n(33),C=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(O(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?C(v):v;if(t!==c)return e.restoreEditorDOM(),void e.update(t)}}else{var h,m,g,y,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=(y=k?(g=n.anchorOffset,y=n.focusOffset,m=(h=u+Math.min(g,y))+Math.abs(g-y),g=h,m):(f=i.length-d.length,h=v.getStartOffset(),m=v.getEndOffset(),g=o?m+f:h,m+f),t.merge({selectionBefore:p.getSelectionAfter(),selectionAfter:v.merge({anchorOffset:g,focusOffset:y})}));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),m=n(173),g=n(174),y=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 y(t);case"backspace-word":return p(t);case"backspace-to-start-of-line":return f(t,n);case"split-block":return h(t);case"transpose-characters":return b(t);case"move-selection-to-start-of-block":return g(t);case"move-selection-to-end-of-block":return m(t);case"secondary-cut":return u.cut(t);case"secondary-paste":return u.paste(t);default:return t}}(i,r,n))!==r&&t.update(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(22),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(22),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),m=n(8),g=n(86),y=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 m.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:y(t.getCurrentContent(),t.getSelection())}),r=g.getCurrentBlockType(t),e=h.processText(e,n,r),n=l.createFromArray(e),r=d.replaceWithFragment(t.getCurrentContent(),t.getSelection(),n),o.update(m.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:y(s.getCurrentContent(),s.getSelection())}),e=g.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(19),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"),m=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 m(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(21);e.exports=function(e){return!(!e||!e.ownerDocument)&&r(e)&&"A"===e.nodeName}},function(e,t,n){"use strict";var r=n(21);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(18).unstable_flushControlled;e.exports=n},function(e,t,n){"use strict";var o=n(0),i=n(20),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(19),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(22).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(22),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||y(),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||y()})}function m(e,t,n){return t=t.map(function(e){return p({},e,{parentRef:n})}),e.concat(t.reverse())}var r=n(19),g=n(13),s=n(40),c=n(30),u=n(192),l=(n(193),n(31)),o=n(194),a=n(195),f=n(196),y=n(14),v=n(16),b=n(6),w=n(7),S=v("draft_tree_data_support"),_=b.List,E=b.Map,O=b.OrderedMap,C=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 g(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),m([],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 g(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=m(o,u,i)}return e},O())},x=function(e,t){return O(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?C(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(22).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(22),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 y=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=[],m=!1,g=new y.default({flat:!!a});return e.forEach(function(e){var t,n;(0,v.default)(e,f,c)?!0===c.cleanup.split&&(m=!0):(t=g.parse(e),t=O(t,r,i,a,s,c,(0,b.default)()),(f&&f!==e.type||m)&&(_(l,o,u,{prevType:f,prevDepth:p,prevKeys:d,prevData:h},c),h=[],d=[],m=!(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 O=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,F=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,z=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 z: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 T(){return null===a?null===i?(b=!1,i=a=ee()):(b=!0,a=i):a=null===a.next?(b=!1,a.next=ee()):(b=!0,a.next),a}function te(e,t,n,r){for(;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=T(),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 j(){}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=T())){var n=a.memoizedState;if(null!==n&&null!==t){e:{var r=n[1];if(null===r)r=!1;else{for(var o=0;o<r.length&&o<t.length;o++)if(!Q(t[o],r[o])){r=!1;break e}r=!0}}if(r)return n[0]}}return e=e(),a.memoizedState=[e,t],e},useReducer:re,useRef:function(e){v=D();var t=(a=T()).memoizedState;return null===t?a.memoizedState=e={current:e}:t},useState:function(e){return re(ne,e)},useLayoutEffect:function(){},useCallback:function(e){return e},useImperativeHandle:j,useEffect:j,useDebugValue:j,useResponder:function(e,t){return{props:t,responder:e}},useDeferredValue:function(e){return D(),e},useTransition:function(){return D(),[function(e){e()},!1]}},ie="http://www.w3.org/1999/xhtml";function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var se={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},ce=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 F:case l:case z: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.7","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 Eo}),o.d(e,"EditorPreview",function(){return Wo});function L(e,t,n){return t=new RegExp(t,"g"),e.replace(t,n)}var y=o(0),m=o.n(y),e=o(1),d=o.n(e),h=o(2),g=o(4),e=o(39),F=o.n(e),e=o(92),z=o.n(e),B=o(24),e=o(5),v=o.n(e);function K(e){return(K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,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 U(e,t,n){return t&&H(e.prototype,t),n&&H(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var W=U(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 V(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 G(e,t,n){return t&&V(e.prototype,t),n&&V(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Y,$=G(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=[],J={onKeyDown:function(t){Z.forEach(function(e){e(t)})},registerCallBack:function(e){Z.push(e)},deregisterCallBack:function(t){Z=Z.filter(function(e){return e!==t})}},X=function(){Y=!0},Q=function(){Y=!1},ee=function(){return Y};function te(e){e=e.getData()&&e.getData().get("text-align");return e?"rdw-".concat(e,"-aligned-block"):""}function ne(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 re(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 oe(e){return e[e.options[0]].icon}function ie(e,n){var r;return e&&void 0===n?e:(r={},ne(e,function(e,t){"[object Object]"===Object.prototype.toString.call(t)?r[e]=ie(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 ae(e,t,n){(t=ce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function se(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"!==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 ue(e,t){return(ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function le(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=fe(n),t=(e=r?(e=fe(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===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 fe(e){return(fe=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&&ue(t,e);var n,a=le(s);function s(){var i,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(i=a.call.apply(a,[this].concat(r))).onClick=function(){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()((ae(e={},"Editor-option",!0),ae(e,"Editor-option--active",i&&!o),ae(e,"".concat(o),i&&o),ae(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)}}])&&se(t.prototype,e),n&&se(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 pe(e,t,n){(t=he(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function de(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,he(r.key),r)}}function he(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 ye(e,t){return(ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function me(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=ge(n),t=(e=r?(e=ge(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 ge(e){return(ge=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&&ye(t,e);var n,r=me(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()((pe(l={},"Editor-dropdown",!0),pe(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})})))}}])&&de(t.prototype,e),n&&de(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 ve(e,t,n){(t=we(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function be(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,we(r.key),r)}}function we(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 Se(e,t){return(Se=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=Ee(n),t=(e=r?(e=Ee(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 Ee(e){return(Ee=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&&Se(t,e);var n,a=_e(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()((ve(e={},"Editor-dropdown-option",!0),ve(e,"Editor-dropdown-option--active ".concat(c),r&&!s),ve(e,"".concat(t),i),ve(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)}}])&&be(t.prototype,e),n&&be(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 Ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Oe(r.key),r)}}function Oe(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 xe(e,t){return(xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ke(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=De(n),t=(e=r?(e=De(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 De(e){return(De=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 Te=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&&xe(t,e);var n,r=ke(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=Oe(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())}}])&&Ce(t.prototype,e),n&&Ce(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 Ie(e,t){return(Ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Me(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Ne(n),t=(e=r?(e=Ne(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===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 Ne(e){return(Ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Te.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&&Ie(t,e);var n,r=Me(i);function i(e){var o;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(o=r.call(this,e)).expandCollapse=function(){o.setState(function(e){return{expanded:!e.expanded}})},o.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={},ne(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||Te;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 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,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 Ae(e,t){return(Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Re(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"===_(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)}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&&Ae(t,e);var n,r=Re(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)}}])&&Pe(t.prototype,e),n&&Pe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Fe=(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 Be(e,t){return(Be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ke(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=He(n),t=(e=r?(e=He(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===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 He(e){return(He=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&&Be(t,e);var n,r=Ke(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(Fe,{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 Ue(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 We(e,t){return(We=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=Ve(n),t=(e=r?(e=Ve(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 Ve(e){return(Ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ge=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&&We(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}})}))}}])&&Ue(t.prototype,e),n&&Ue(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 Ye(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 $e(e,t){return($e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ze(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=Je(n),t=(e=r?(e=Je(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 Je(e){return(Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ge.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 Xe=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$e(t,e);var n,o=Ze(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||Ge,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})}}])&&Ye(t.prototype,e),n&&Ye(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);Xe.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 Qe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,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 et(e,t){return(et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=nt(n),t=(e=r?(e=nt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===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 nt(e){return(nt=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&&et(t,e);var n,i=tt(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)})))}}])&&Qe(t.prototype,e),n&&Qe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(y.Component),rt=(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 ot(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,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 it(e,t){return(it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function at(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=st(n),t=(e=r?(e=st(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===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 st(e){return(st=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&&it(t,e);var n,o=at(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||rt,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})}}])&&ot(t.prototype,e),n&&ot(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 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,ut(r.key),r)}}function ut(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 lt(e,t){return(lt=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=pt(n),t=(e=r?(e=pt(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 pt(e){return(pt=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 dt=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&<(t,e);var n,a=ft(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=ut(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}))))}}])&&ct(t.prototype,e),n&&ct(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function 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,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 yt(e,t){return(yt=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=gt(n),t=(e=r?(e=gt(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 gt(e){return(gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}dt.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 vt=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&&yt(t,e);var n,o=mt(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(dt,{config:n,translations:r,currentState:{listType:e},expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,className:t})}}])&&ht(t.prototype,e),n&&ht(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);vt.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 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 bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,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 wt(e,t){return(wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function St(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=_t(n),t=(e=r?(e=_t(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 _t(e){return(_t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Et=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&&wt(t,e);var n,r=St(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||oe(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()}}])&&bt(t.prototype,e),n&&bt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component);function Ct(e){return(Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ot(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!==Ct(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"!==Ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Ct(e)?e:String(e)}(r.key),r)}}function xt(e,t){return(xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function kt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Dt(n),t=(e=r?(e=Dt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Ct(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Dt(e){return(Dt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Et.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 Tt=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&&xt(t,e);var n,o=kt(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||Et;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})}}])&&Ot(t.prototype,e),n&&Ot(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 It(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,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 Mt(e,t){return(Mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Nt(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=Pt(n),t=(e=r?(e=Pt(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 Pt(e){return(Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Tt.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var At=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&&Mt(t,e);var n,r=Nt(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()))}}])&&It(t.prototype,e),n&&It(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component),Rt=(At.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},At);function Lt(e){return(Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ft(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!==Lt(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"!==Lt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Lt(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 Bt(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Kt(n),t=(e=r?(e=Kt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Lt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Kt(e){return(Kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var At=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zt(t,e);var n,r=Bt(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||Rt,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}})}}])&&Ft(t.prototype,e),n&&Ft(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),r=(At.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 Ht(e){return(Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ut(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,Wt(r.key),r)}}function Wt(e){e=function(e,t){if("object"!==Ht(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"!==Ht(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Ht(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 Vt(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=Gt(n),t=(e=r?(e=Gt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Ht(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Gt(e){return(Gt=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=Vt(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=Wt(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()))}}])&&Ut(t.prototype,e),n&&Ut(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),Yt=(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 $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 Zt(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,nn(r.key),r)}}function Jt(e,t){return(Jt=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=Qt(n),t=(e=r?(e=Qt(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 Qt(e){return(Qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function en(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 tn(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?en(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=nn(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)):en(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function nn(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)}function rn(e){var t=on.match(e.target);return tn(tn({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var on=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&&Jt(t,e);var n,r=Xt(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||rn)({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(Yt,{config:t,expanded:n,inDropdown:e,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:o,selectionText:r},onChange:this.onChange})}}])&&Zt(t.prototype,e),n&&Zt(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 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 sn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(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)}(r.key),r)}}function cn(e,t){return(cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function un(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=ln(n),t=(e=r?(e=ln(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 ln(e){return(ln=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&&cn(t,e);var n,r=un(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})))}}])&&sn(t.prototype,e),n&&sn(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 fn(e){return(fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dn(r.key),r)}}function dn(e){e=function(e,t){if("object"!==fn(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"!==fn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===fn(e)?e:String(e)}function hn(e,t){return(hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function yn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=mn(n),t=(e=r?(e=mn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===fn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function mn(e){return(mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hn(t,e);var n,a=yn(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=dn(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)}}])&&pn(t.prototype,e),n&&pn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),vn=(gn.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},gn);function bn(e){return(bn="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"!==bn(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"!==bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===bn(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 _n(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=En(n),t=(e=r?(e=En(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===bn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function En(e){return(En=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}gn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sn(t,e);var n,i=_n(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||vn;return m.a.createElement(r,{config:t,translations:e,onChange:this.addEmbeddedLink,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&wn(t.prototype,e),n&&wn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),gn.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 Cn(e){return(Cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function On(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!==Cn(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"!==Cn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Cn(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 kn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Dn(n),t=(e=r?(e=Dn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Cn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Dn(e){return(Dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Tn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xn(t,e);var n,a=kn(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)}}])&&On(t.prototype,e),n&&On(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),jn=(Tn.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,onChange:d.a.func,config:d.a.object,translations:d.a.object},Tn);function In(e){return(In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!==In(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"!==In(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===In(e)?e:String(e)}(r.key),r)}}function Nn(e,t){return(Nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Pn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=An(n),t=(e=r?(e=An(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===In(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 An(e){return(An=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Tn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nn(t,e);var n,a=Pn(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})}}])&&Mn(t.prototype,e),n&&Mn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);function Rn(e){return(Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ln(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fn(r.key),r)}}function Fn(e){e=function(e,t){if("object"!==Rn(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"!==Rn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Rn(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 Bn(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Kn(n),t=(e=r?(e=Kn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Rn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Kn(e){return(Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Tn.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var Hn=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=Bn(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=Fn(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"}))))}}])&&Ln(t.prototype,e),n&&Ln(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Un=(Hn.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},Hn);function Wn(e){return(Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function 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"!==Wn(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"!==Wn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Wn(e)?e:String(e)}(r.key),r)}}function Vn(e,t){return(Vn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Gn(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"===Wn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Yn(e){return(Yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $n(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 Hn=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&&Vn(t,e);var n,r=Gn(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(Un,{config:t,inDropdown:e,onChange:this.addImage})}}])&&qn(t.prototype,e),n&&qn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Zn=(Hn.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,config:d.a.object,inDropdown:d.a.bool},o(211),$n.propTypes={onChange:d.a.func,config:d.a.object,translations:d.a.object},$n);function Jn(e){return(Jn="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 Xn(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"!==Jn(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"!==Jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Jn(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 er(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=tr(n),t=(e=r?(e=tr(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Jn(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 tr(e){return(tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nr=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&&Qn(t,e);var n,a=er(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)}),ne(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||Zn;return m.a.createElement(r,{config:t,translations:e,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Xn(t.prototype,e),n&&Xn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);nr.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 rr(e){return(rr="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 or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!==rr(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"!==rr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===rr(e)?e:String(e)}(r.key),r)}}function ir(e,t){return(ir=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ar(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=sr(n),t=(e=r?(e=sr(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===rr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function sr(e){return(sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cr=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&&ir(t,e);var n,a=ar(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:oe(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()}}])&&or(t.prototype,e),n&&or(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);function ur(e){return(ur="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 lr(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"!==ur(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"!==ur(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ur(e)?e:String(e)}(r.key),r)}}function fr(e,t){return(fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pr(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=dr(n),t=(e=r?(e=dr(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===ur(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 dr(e){return(dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}cr.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 hr=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&&fr(t,e);var n,o=pr(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||cr;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})}}])&&lr(t.prototype,e),n&&lr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);function yr(e){return(yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}hr.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var mr=["config","currentState","onChange"],gr=["config"];function vr(){return(vr=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 br(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 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,function(e){e=function(e,t){if("object"!==yr(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"!==yr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===yr(e)?e:String(e)}(r.key),r)}}function Sr(e,t){return(Sr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _r(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"===yr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Er(e){return(Er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cr=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sr(t,e);var n,r=_r(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,br(e,mr));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=Or[e];return m.a.createElement(e,vr({key:t,config:n,inDropdown:!0,onChange:r.onChange},i))}))}},{key:"render",value:function(){var o=this,e=this.props,i=e.config,a=br(e,gr),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=Or[e];return(o.props.mention||"mention"!==e)&&n.isVisible?m.a.createElement(r,vr({key:t,config:n,inDropdown:!1},a)):null}))}}])&&wr(t.prototype,e),n&&wr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Or=(Cr.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:Xe,insert:Cr,fontFamily:n,list:vt,textAlign:Tt,colorPicker:At,link:r,mention:I,embedded:gn,emoji:Tn,image:Hn,remove:nr,history:hr});function xr(e){return(xr="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 kr(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"!==xr(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"!==xr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===xr(e)?e:String(e)}(r.key),r)}}function Dr(e,t){return(Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Tr(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=jr(n),t=(e=r?(e=jr(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===xr(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 Ir(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"LINK"===n.getEntity(e).getType()},t)}function Mr(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&&Dr(t,e);var n,a=Tr(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"})))}}])&&kr(t.prototype,e),n&&kr(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 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 Pr(){return(Pr=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 Ar(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 Rr(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Ar(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)):Ar(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function Lr(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 Fr(e,t,n){return t&&Lr(e.prototype,t),n&&Lr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function zr(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)}var e=Fr(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=Rr(Rr({type:"input",name:e,clearButton:!1},i.chipOptions),{},{label:t,className:"Editor-mention-chip"}),m.a.createElement(b.c,Pr({},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}),Br=(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 Kr(e){return(Kr="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=Gr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Hr(e,t){return(Hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ur(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=Wr(n),t=(e=r?(e=Wr(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Kr(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 Wr(e){return(Wr=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,Gr(r.key),r)}}function Vr(e,t,n){return t&&qr(e.prototype,t),n&&qr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gr(e){e=function(e,t){if("object"!==Kr(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"!==Kr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Kr(e)?e:String(e)}function Yr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $r(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 Zr=Vr(function e(t){var c=this,n=(Yr(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<re(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&&Hr(t,e);var r=Ur(o);function o(){var l;Yr(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,Q()):"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=re(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 Vr(o,[{key:"componentDidMount",value:function(){var e=this.suggestion.getBoundingClientRect(),t=e.left,e=e.top+25;this.setState({style:{left:t,top:e}}),J.registerCallBack(this.onEditorKeyDown),X(),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),J.deregisterCallBack(this.onEditorKeyDown),Q(),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}}),Jr=function(e){return[new Br(e).getMentionDecorator(),new Zr(e).getSuggestionDecorator()]},Xr=($r.propTypes={block:d.a.object,contentState:d.a.object},$r);function Qr(e,t,n){return Math.min(Math.max(e,t),n)}var N={east:1,north:8,south:2,west:4};function eo(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=Qr(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=Qr(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=Qr(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 to(e){return(to="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 no(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"!==to(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"!==to(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===to(e)?e:String(e)}(r.key),r)}}function ro(e,t){return(ro=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oo(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=ao(n),t=(e=r?(e=ao(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===to(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return io(t)}}function io(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ao(e){return(ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var so=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&&ro(t,e);var n,o=oo(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(io(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(eo,{editor:a,imageRef:this.imageRef,onResizeEnd:this.onResizeEnd}))))}}])&&no(t.prototype,e),n&&no(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);return e.propTypes={block:d.a.object,contentState:d.a.object},e},co=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:so(n),editable:!1};if(t&&"EMBEDDED_LINK"===t.type)return{component:Xr,editable:!1}}}},uo=["var(--text)","var(--secondary)","var(--success)","var(--primary)","var(--alert)","var(--accent1)"],Cr=(t="ctrl",t=((null==(Xe=navigator.userAgentData)?void 0:Xe.platform.toLowerCase())||"linux").includes("mac")?"cmd":t),lo={options:["heading","textDecoration","colorPicker","list","insert"],textDecoration:{max:4,options:["bold","italic","underline","strikethrough"],bold:{icon:"format_bold",title:"Bold (".concat(Cr,"+B)"),label:"Bold"},italic:{icon:"format_italic",title:"Italic (".concat(Cr,"+I)"),label:"Italic"},underline:{icon:"format_underlined",title:"Underline (".concat(Cr,"+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:uo},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},vt={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})},Tt={isVisible:d.a.bool,title:d.a.string},At=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(vt),link:d.a.shape(Tt)})});o(214),o(94),o(95),o(96),o(97),o(98);o(99),o(100),o(101);function fo(e){return(fo="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 po(){return(po=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 ho(e){return function(e){if(Array.isArray(e))return yo(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?yo(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)?yo(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 yo(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 mo(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?mo(Object(n),!0).forEach(function(e){go(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mo(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function go(e,t,n){return(t=bo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vo(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,bo(r.key),r)}}function bo(e){e=function(e,t){if("object"!==fo(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"!==fo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===fo(e)?e:String(e)}function wo(e,t){return(wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function So(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=_o(n),t=(e=r?(e=_o(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===fo(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 _o(e){return(_o=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&&wo(t,e);var n,o=So(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||ee()&&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:Ir,component:Mr({focusHandler:a.focusHandler,getEditorState:a.getEditorState,onChange:a.onChange,onEditLink:a.onEditLink})}];return a.props.mention&&t.push.apply(t,ho(Jr(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!!ee()||(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&&t.includes("<figure")?t: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=F()(e),n=t.getCurrentContent(),i.entityMap.forEach(function(e,t){n=n.mergeEntityData(t,e)}),n=h.Modifier.replaceWithFragment(n,t.getSelection(),new B.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(B.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=ie(lo,e.toolbar),n=e.wrapperId||Math.floor(1e4*Math.random()),n=(a.wrapperId="Editor-wrapper-".concat(n),a.modalHandler=new W,a.focusHandler=new $,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=co({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=ie(lo,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()(go({},"Editor-toolbar",!0),n),n=v()(go({},"Editor-wrapper",!0),i),i=v()((go(i={},"Editor",!0),go(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=Or[e],e=r[e];return m.a.createElement(n,po({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:J.onKeyDown,onMouseDown:this.onEditorMouseDown,id:"RichTextEditorWrapper"},m.a.createElement(h.Editor,po({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:te,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,handlePastedText:this.handlePastedTextFn,ariaLabel:s,blockRenderMap:this.blockRenderMap},this.editorProps))))}}])&&vo(t.prototype,e),n&&vo(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component),Eo=(r.utils={EditorState:h.EditorState,ContentState:h.ContentState,RichUtils:h.RichUtils,convertFromRaw:h.convertFromRaw,convertToRaw:h.convertToRaw,htmlToState:function(e){var e=L(e,'<p><br/></p><p id="RichTextEditor-Image"','<p id="RichTextEditor-Image"'),e=L(e,"<br/>",""),e=L(e,"<p> </p>",""),e=F()(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,void 0,!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:At,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),Co=o(49),Oo=o.n(Co),xo=o(50);function ko(e){return(ko="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 Do(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?Do(Object(n),!0).forEach(function(e){To(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Do(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function To(e,t,n){return(t=function(e){e=function(e,t){if("object"!==ko(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"!==ko(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ko(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 Io(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?Io(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)?Io(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 Io(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 Mo(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 No(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 Po(e,t){var n=void 0===(n=t.entities)?{}:n,r=void 0===(r=t.headings)?{}:r,o=void 0===(o=t.list)?{}:o,t=void 0===(t=t.colors)?[]:t,n=A(A({},Ko),n),r=A(A({},zo),r),o=A(A({},Bo),o),r=A(A(A({},Ho),r),o),o=A(A({},Lo),Uo(t)),t={blocks:r,entities:n,styles:Object(Co.createStylesRenderer)(Fo,o)};return Oo()(e,t,!1)}function Ao(e){var t=e.raw,n=e.entities,r=e.headings,o=e.list,e=e.colors;return(t=t&&Po(t,{entities:n,headings:r,list:o,colors:e}))?m.a.createElement("div",{className:"Preview-wrapper"},t):null}var Ro={paddingLeft:"1.5em",margin:"0px"},Lo={BOLD:{fontWeight:"bold"},ITALIC:{fontStyle:"italic"},UNDERLINE:{textDecoration:"underline"},STRIKETHROUGH:{textDecoration:"line-through"}},Fo=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)})}},Bo={"unordered-list-item":function(e,t){t=t.keys;return m.a.createElement("ul",{style:Ro},Mo(e,t))},"ordered-list-item":function(e,t){t=t.keys;return m.a.createElement("ol",{style:Ro},Mo(e,t))}},Ko={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)}},Ho={unstyled:function(e,t,n){t=t.keys;return No(e,t)},atomic:function(e,t){return e[0]}},Uo=function(e){return[].concat(jo(uo),jo(e)).reduce(function(e,t){var n="color-".concat(t),t={color:t};return A(A({},e),{},To({},n,t))},{})},Wo=(Ao.utils={convertToHTML:function(e){var t,n,r=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return(e=e&&Po(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}))&&Object(xo.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(xo.renderToStaticMarkup)(e))):""}},Ao.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},Ao.defaultProps={entities:{},headings:{},list:{},colors:[]},Ao)}]);
|
|
57
|
+
*/var E=e(17),O=e(0);function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var e="function"==typeof Symbol&&Symbol.for,s=e?Symbol.for("react.portal"):60106,c=e?Symbol.for("react.fragment"):60107,u=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,p=e?Symbol.for("react.provider"):60109,f=e?Symbol.for("react.context"):60110,F=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,z=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 g(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 z: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 g(e.type);case H:return g(e.render);case K:if(e=1===e._status?e._result:null)return g(e)}}return null}var e=O.__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 y(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var m=new Uint16Array(16),t=0;t<15;t++)m[t]=t+1;m[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(C(321));return v}function ee(){if(0<_)throw Error(C(312));return{memoizedState:null,queue:null,next:null}}function T(){return null===a?null===i?(b=!1,i=a=ee()):(b=!0,a=i):a=null===a.next?(b=!1,a.next=ee()):(b=!0,a.next),a}function te(e,t,n,r){for(;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=T(),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(C(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 I(){}var j=0,oe={readContext:function(e){var t=j;return y(e,t),e[t]},useContext:function(e){D();var t=j;return y(e,t),e[t]},useMemo:function(e,t){if(v=D(),t=void 0===t?null:t,null!==(a=T())){var n=a.memoizedState;if(null!==n&&null!==t){e:{var r=n[1];if(null===r)r=!1;else{for(var o=0;o<r.length&&o<t.length;o++)if(!Q(t[o],r[o])){r=!1;break e}r=!0}}if(r)return n[0]}}return e=e(),a.memoizedState=[e,t],e},useReducer:re,useRef:function(e){v=D();var t=(a=T()).memoizedState;return null===t?a.memoizedState=e={current:e}:t},useState:function(e){return re(ne,e)},useLayoutEffect:function(){},useCallback:function(e){return e},useImperativeHandle:I,useEffect:I,useDebugValue:I,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),N={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(N).forEach(function(t){ue.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),N[e]=N[t]})}),/([A-Z])/g),fe=/^ms-/,M=O.Children.toArray,A=e.ReactCurrentDispatcher,pe={listing:!0,pre:!0,textarea:!0},de=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,he={},P={};var me=Object.prototype.hasOwnProperty,ge={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function ye(e,t){if(void 0===e)throw Error(C(152,g(t)||"Component"))}function ve(d,h,m){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 y(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,m,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 ye(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(ye(d=n.render(),t),"function"==typeof n.getChildContext&&"object"==typeof(e=t.childContextTypes)){var f,p=n.getChildContext();for(f in p)if(!(f in e))throw Error(C(108,g(t)||"Unknown",f))}p&&(h=E({},h,p))}for(;O.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,m[e]=m[0],m[0]=e)},e.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,r=this.threadID,o=(y(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=j,n=(j=this.threadID,A.current);A.current=oe;try{for(var r=[""],o=!1;r[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var i=this.threadID;m[i]=m[0],m[0]=i;break}var a=this.stack[this.stack.length-1];if(o||a.childIndex>=a.children.length){var s=a.footer;if(""!==s&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===a.type)this.currentSelectValue=null;else if(null!=a.type&&null!=a.type.type&&a.type.type.$$typeof===p)this.popProvider(a.type);else if(a.type===h){this.suspenseDepth--;var c=r.pop();if(o){var o=!1,u=a.fallbackFrame;if(!u)throw Error(C(303));this.stack.push(u),r[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}r[this.suspenseDepth]+=c}r[this.suspenseDepth]+=s}else{var l=a.children[a.childIndex++],f="";try{f+=this.render(l,a.context,a.domNamespace)}catch(e){if(null!=e&&"function"==typeof e.then)throw Error(C(294));throw e}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=f}}return r[0]}finally{A.current=n,j=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(!O.isValidElement(e)){if(null==e||null==e.$$typeof)return e=M(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";if((n=e.$$typeof)===s)throw Error(C(257));throw Error(C(258,n.toString()))}var r,o=e.type;if("string"==typeof o)return this.renderDOM(e,t,n);switch(o){case u:case F:case l:case z:case c:return e=M(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case h:throw Error(C(294))}if("object"==typeof o&&null!==o)switch(o.$$typeof){case d:v={};var i=o.render(e.props,e.ref),i=te(o.render,e.props,i,e.ref);return i=M(i),this.stack.push({type:null,domNamespace:n,children:i,childIndex:0,context:t,footer:""}),"";case B:return e=[O.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=M(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 y(o,a),o=M(i.children(o[a])),this.stack.push({type:e,domNamespace:n,children:o,childIndex:0,context:t,footer:""}),"";case U:throw Error(C(338));case K:switch(o=e.type,-1===(r=o)._status&&(r._status=0,i=(i=r._ctor)(),(r._result=i).then(function(e){0===r._status&&(e=e.default,r._status=1,r._result=e)},function(e){0===r._status&&(r._status=2,r._result=e)})),o._status){case 1:return e=[O.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(C(295))}case W:throw Error(C(343))}throw Error(C(130,null==o?o:typeof o,""))},e.renderDOM=function(e,t,n){var r=e.type.toLowerCase();if(n===ie&&ae(r),!he.hasOwnProperty(r)){if(!de.test(r))throw Error(C(65,r));he[r]=!0}var o,i,a,s,c,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(C(92));if(Array.isArray(f)){if(!(f.length<=1))throw Error(C(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="",O.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(C(137,r,""));if(null!=l.dangerouslySetInnerHTML){if(null!=l.children)throw Error(C(60));if(!("object"==typeof l.dangerouslySetInnerHTML&&"__html"in l.dangerouslySetInnerHTML))throw Error(C(61))}if(null!=l.style&&"object"!=typeof l.style)throw Error(C(62,""))}for(_ in l=u,f=this.makeStaticMarkup,p=1===this.stack.length,d="<"+e.type,l)if(me.call(l,_)){var m=l[_];if(null!=m){if("style"===_){var g,y,v,b,h=void 0,w="",S="";for(h in m)m.hasOwnProperty(h)&&(g=0===h.indexOf("--"),null!=(y=m[h]))&&(w+=S+(b=g?h:(b=h,P.hasOwnProperty(b)?P[b]:(v=b.replace(le,"-$1").toLowerCase().replace(fe,"-ms-"),P[b]=v)))+":",S=h,w+=g=null==y||"boolean"==typeof y||""===y?"":g||"number"!=typeof y||0===y||N.hasOwnProperty(S)&&N[S]?(""+y).trim():y+"px",S=";");m=w||null}h=null;e:if(y=l,-1===(g=r).indexOf("-"))g="string"==typeof y.is;else switch(g){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":g=!1;break e;default:g=!0}g?ge.hasOwnProperty(_)||(h=Z(h=_)&&null!=m?h+'="'+k(m)+'"':""):(i=_,a=m,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=M(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(C(207))},renderToStaticNodeStream:function(){throw Error(C(208))},version:"16.14.0"};function we(e,t){if(e=O.isValidElement(e)&&(e.type!==c||(e=e.props.children,O.isValidElement(e)))?[e]:M(e),e={type:null,domNamespace:ie,children:e,childIndex:0,context:q,footer:""},0===(n=m[0])){var n,r=m,o=2*(n=r.length);if(!(o<=65536))throw Error(C(304));var i=new Uint16Array(o);for(i.set(r),(m=i)[0]=n+1,r=n;r<o-1;r++)m[r]=r+1;m[o-1]=0}else m[0]=m[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.8","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 ni}),o.d(e,"EditorPreview",function(){return Ei});function L(e,t,n){return t=new RegExp(t,"g"),e.replace(t,n)}var m=o(0),g=o.n(m),e=o(1),d=o.n(e),h=o(2),y=o(4),e=o(39),F=o.n(e),e=o(92),z=o.n(e),B=o(24),e=o(5),v=o.n(e);function K(e){return(K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!=K(e)||!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:e+""}(r.key),r)}}function U(e,t,n){return t&&H(e.prototype,t),n&&H(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var W=U(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 V(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)||!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:e+""}(r.key),r)}}function G(e,t,n){return t&&V(e.prototype,t),n&&V(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Y,$=G(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=[],J={onKeyDown:function(t){Z.forEach(function(e){e(t)})},registerCallBack:function(e){Z.push(e)},deregisterCallBack:function(t){Z=Z.filter(function(e){return e!==t})}},X=function(){Y=!0},Q=function(){Y=!1},ee=function(){return Y};function te(e){e=e.getData()&&e.getData().get("text-align");return e?"rdw-".concat(e,"-aligned-block"):""}function ne(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function i(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function l(e){e.stopPropagation()}function re(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 oe(e){return e[e.options[0]].icon}function ie(e,n){var r;return e&&void 0===n?e:(r={},ne(e,function(e,t){"[object Object]"===Object.prototype.toString.call(t)?r[e]=ie(t,n[e]):r[e]=void 0!==n[e]?n[e]:t}),r)}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ae(e,t,n){return(t=ce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function se(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"!=a(e)||!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:e+""}function ue(e,t,n){t=fe(t);var r=e,t=le()?Reflect.construct(t,n||[],fe(e).constructor):t.apply(e,n);if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(le=function(){return!!e})()}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pe(e,t){return(pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){function a(){var i,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(i=ue(this,a,[].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}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&pe(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.activeClassName,o=e.active,i=e.disabled,e=e["aria-label"],r=v()(ae(ae(ae(ae({},"Editor-option",!0),"Editor-option--active",o&&!r),"".concat(r),o&&r),"Editor-option--disabled",i),n);return g.a.createElement("div",{"aria-label":e,onKeyDown:this.handleKeyDown,tabIndex:0,className:r,onClick:this.onClick,"aria-selected":o},t)}}])&&se(n.prototype,e),t&&se(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.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 s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function de(e,t,n){return(t=me(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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,me(r.key),r)}}function me(e){e=function(e,t){if("object"!=s(e)||!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"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==s(e)?e:e+""}function ge(e,t,n){t=ve(t);var r=e,t=ye()?Reflect.construct(t,n||[],ve(e).constructor):t.apply(e,n);if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function ye(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ye=function(){return!!e})()}function ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function be(e,t){return(be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var w=function(e){function t(e){var i;if(this instanceof t)return(i=ge(this,t,[e])).buttonRef=null,i.listRef=null,i.handleOutsideClick=function(e){i.listRef.current&&!i.listRef.current.contains(e.target)&&i.toggleExpansion()},i.onChange=function(e){var t=i.props.onChange;t&&t(e),i.toggleExpansion()},i.setHighlighted=function(e){i.setState({highlighted:e})},i.focusTrigger=function(){var e;null!=(e=i.buttonRef.current)&&e.focus()},i.focusTriggerOnClose=function(e){"Escape"!==e.key&&"Enter"!==e.key||(i.toggleExpansion(),i.focusTrigger())},i.toggleExpansion=function(){var e=i.props,t=e.doExpand,n=e.doCollapse;(e.expanded?n:t)()},i.handleExpand=function(e){i.props.onExpandEvent(e)},i.handleListKeyDown=function(e){e.preventDefault();var t,n=i.state.highlighted,r=i.props.children[1],o=e.key;"ArrowDown"===o||"ArrowUp"===o?(t=r.length-1,i.setState(function(e){return{highlighted:"ArrowDown"===o?Math.min(e.highlighted+1,t):Math.max(e.highlighted-1,0)}})):"Enter"===o&&(e=r[n].props.value,r=i.props.onChange)&&r(e)},i.buttonRef=g.a.createRef(),i.listRef=g.a.createRef(),i.state={highlighted:-1},i;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&be(r,e),r=t,(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),o=v()(de(de({},"Editor-dropdown",!0),"Editor-dropdown--expanded",t),o);return g.a.createElement("div",{className:o},g.a.createElement(b.a,{ref:this.buttonRef,appearance:"transparent","aria-expanded":t,"aria-label":s||"Editor-dropdown",className:a,onClick:this.handleExpand},r[0],!e&&g.a.createElement(b.f,{name:"keyboard_arrow_down"})),t&&g.a.createElement("ul",{tabIndex:1,ref:this.listRef,onKeyDown:this.handleListKeyDown,className:v()("Editor-dropdown-optionWrapper",i),onClick:l},g.a.Children.map(u,function(e,t){return e&&g.a.cloneElement(e,{onSelect:n.onChange,highlighted:c===t,setHighlighted:n.setHighlighted,highlightedClassName:"Editor-dropdown-option--highlight",index:t})})))}}])&&he(r.prototype,e),n&&he(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.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 we(e,t,n){return(t=_e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Se(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,_e(r.key),r)}}function _e(e){e=function(e,t){if("object"!=c(e)||!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:e+""}function Ee(e,t,n){t=Ce(t);var r=e,t=Oe()?Reflect.construct(t,n||[],Ce(e).constructor):t.apply(e,n);if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Oe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oe=function(){return!!e})()}function Ce(e){return(Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xe(e,t){return(xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}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){function a(){var i,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(i=Ee(this,a,[].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}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&xe(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.active,r=e.disabled,o=e.highlighted,i=e.className,a=e.isCheckbox,s=e.activeClassName,c=e.disabledClassName,e=e.highlightedClassName,s=v()(we(we(we(we({},"Editor-dropdown-option",!0),"Editor-dropdown-option--active ".concat(s),n&&!a),"".concat(e),o),"".concat(c),r),i);return g.a.createElement("li",{tabIndex:1,className:s,onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick},t)}}])&&Se(n.prototype,e),t&&Se(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.Component);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,De(r.key),r)}}function De(e){e=function(e,t){if("object"!=f(e)||!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"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==f(e)?e:e+""}function Te(e,t,n){t=je(t);var r=e,t=Ie()?Reflect.construct(t,n||[],je(e).constructor):t.apply(e,n);if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Ie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ie=function(){return!!e})()}function je(e){return(je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ne(e,t){return(Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}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 Me=function(e){function n(){var e=this,t=n;if(e instanceof t)return Te(this,n,arguments);throw new TypeError("Cannot call a class as a function")}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ne(r,e),r=n,(e=[{key:"renderInDropdown",value:function(){var e=this.props,i=e.config,t=e.expanded,n=e.doExpand,r=e.onExpandEvent,o=e.doCollapse,a=e.currentState,e=e.onChange,s=i.options.length-i.max;return g.a.createElement(b.n,{tooltip:"More formatting"},g.a.createElement(w,{onChange:e,expanded:t,doExpand:n,doCollapse:o,onExpandEvent:r,triggerClassName:"Editor-textDecoration-moreIcon",menu:!0},g.a.createElement(b.f,{name:"more_horizon",size:20}),i.options.slice(i.max,i.options.length).map(function(e,t){var n=!0===a[e]||"MONOSPACE"===e&&a.CODE,r=i[e],o=r.icon,r=(r.title,r.label);return g.a.createElement(S,{key:t,value:e,active:n,isCheckbox:1<s},1<s?g.a.createElement(b.b,{checked:n,label:r}):g.a.createElement(g.a.Fragment,null,g.a.createElement(b.f,{size:20,name:o,className:"mr-4",appearance:n?"white":"default"}),g.a.createElement(b.m,{appearance:n?"white":"default"},r)))})))}},{key:"render",value:function(){var e,t,n=this.props,i=n.config,a=n.currentState,s=n.onChange,n=n.className,r=i.options.length-i.max,o=i.max,c=v()((e={},t=!0,(c=De(c="Editor-textDecoration"))in e?Object.defineProperty(e,c,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[c]=t,e),n);return g.a.createElement("div",{className:c},i.options.slice(0,o).map(function(e,t){var n=!0===a[e]||"MONOSPACE"===e&&a.CODE,r=i[e],o=r.title,r=r.icon;return g.a.createElement(b.n,{tooltip:o},g.a.createElement(u,{"aria-label":"".concat(e," button"),role:"button",tabIndex:0,key:t,value:e,onClick:s,active:n,className:"mr-2"},g.a.createElement(b.f,{name:r,size:20,appearance:n?"info":"default"})))}),0<r&&this.renderInDropdown())}}])&&ke(r.prototype,e),t&&ke(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.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 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,function(e){e=function(e,t){if("object"!=p(e)||!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:e+""}(r.key),r)}}function Pe(e,t,n){t=Le(t);var r=e,t=Re()?Reflect.construct(t,n||[],Le(e).constructor):t.apply(e,n);if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Re=function(){return!!e})()}function Le(e){return(Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Fe(e,t){return(Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Me.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){function n(e){var o;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(o=Pe(this,n,[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(y.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={},ne(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(y.getSelectionInlineStyle)(t)):{}},o}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Fe(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(y.getSelectionInlineStyle)(t))})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.expanded,n=n.currentStyles,o=t.component||Me;return g.a.createElement(o,{config:t,currentState:n,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle,className:e})}}])&&Ae(r.prototype,e),t&&Ae(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.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 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)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:e+""}(r.key),r)}}function Be(e,t,n){t=He(t);var r=e,t=Ke()?Reflect.construct(t,n||[],He(e).constructor):t.apply(e,n);if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Ke(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ke=function(){return!!e})()}function He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ue(e,t){return(Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}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){function t(e){if(this instanceof t)return(e=Be(this,t,[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")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ue(r,e),r=t,(e=[{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config.icon,r=t.currentState.blockType,o=t.expanded,i=t.doExpand,a=t.onExpandEvent,s=t.doCollapse,c=t.onChange,t=t.className;return g.a.createElement("div",{className:t,"aria-label":"Editor-block-control"},g.a.createElement(b.n,{tooltip:"Text style"},g.a.createElement(w,{onChange:c,expanded:o,doExpand:i,doCollapse:s,onExpandEvent:a,triggerClassName:"Editor-heading-trigger"},g.a.createElement(b.f,{name:n,size:20}),e.map(function(e,t){return g.a.createElement(S,{index:t,active:r===e.label,value:e.label,key:t},g.a.createElement(b.e,{size:e.size,className:"Editor-heading-option",appearance:r===e.label?"white":"default"},e.displayName))}))))}},{key:"render",value:function(){var t=this.props.config,e=this.state.blockTypes.filter(function(e){e=e.label;return-1<t.options.indexOf(e)});return this.renderInDropdown(e)}}])&&ze(r.prototype,e),n&&ze(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.Component),We=(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 qe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!=E(e)||!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:e+""}(r.key),r)}}function Ve(e,t,n){t=Ye(t);var r=e,t=Ge()?Reflect.construct(t,n||[],Ye(e).constructor):t.apply(e,n);if(t&&("object"===E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Ge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ge=function(){return!!e})()}function Ye(e){return(Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $e(e,t){return($e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}t=function(e){function t(e){var o;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");(o=Ve(this,t,[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(y.getSelectedBlocksType)(e):"unstyled"},o}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&$e(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(y.getSelectedBlocksType)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.expanded,o=n.currentBlockType,n=this.blocksTypes.find(function(e){return e.style===o});return g.a.createElement(We,{config:t,currentState:{blockType:n&&n.label},onChange:this.toggleBlockType,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,className:e})}}])&&qe(r.prototype,e),n&&qe(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.Component),t.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,config:d.a.object,className:d.a.string};o(201);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 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"!=O(e)||!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:e+""}(r.key),r)}}function Je(e,t,n){t=Qe(t);var r=e,t=Xe()?Reflect.construct(t,n||[],Qe(e).constructor):t.apply(e,n);if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Xe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xe=function(){return!!e})()}function Qe(e){return(Qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function et(e,t){return(et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var tt=function(e){function i(){var e=this,t=i;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=Je(this,i,[].concat(r))).state={defaultFontSize:void 0},e}var t,n=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&et(n,e),n=i,(e=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");e&&0<e.length&&(e=(e=window.getComputedStyle(e[0]).getPropertyValue("font-size")).substring(0,e.length-2),this.setState({defaultFontSize:e}))}},{key:"renderCustomTrigger",value:function(){return g.a.createElement("div",null,"Riya")}},{key:"render",value:function(){var e=this.props,t=e.config,n=(t.icon,t.className),r=(t.dropdownClassName,t.options),t=(t.title,e.onChange),e=(e.expanded,e.doCollapse,e.onExpandEvent,e.doExpand,e.translations,this.props.currentState.fontSize),o=this.state.defaultFontSize,o=Number(o);e||r&&r.indexOf(o);return g.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},g.a.createElement(b.d,{className:v()("rdw-fontsize-dropdown",n),onChange:t,customTrigger:this.renderCustomTrigger,icon:"text_fields",placeholder:"",options:r.map(function(e){return{label:e,value:e,selected:14===e}})}))}}])&&Ze(n.prototype,e),t&&Ze(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.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 nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!=C(e)||!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:e+""}(r.key),r)}}function rt(e,t,n){t=it(t);var r=e,t=ot()?Reflect.construct(t,n||[],it(e).constructor):t.apply(e,n);if(t&&("object"===C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function ot(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ot=function(){return!!e})()}function it(e){return(it=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function at(e,t){return(at=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}tt.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 st=function(e){function n(e){var r;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(r=rt(this,n,[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(y.toggleCustomInlineStyle)(n,"fontSize",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontSize:t?Object(y.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE:void 0},e.registerCallBack(r.expandCollapse),r}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&at(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(y.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||tt,n=n&&Number(n.substring(9));return g.a.createElement(o,{config:t,fontSize:!0,translations:e,currentState:{fontSize:n},onChange:this.toggleFontSize,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&nt(r.prototype,e),t&&nt(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.Component);st.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 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"!=x(e)||!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:e+""}(r.key),r)}}function ut(e,t,n){t=ft(t);var r=e,t=lt()?Reflect.construct(t,n||[],ft(e).constructor):t.apply(e,n);if(t&&("object"===x(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function lt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lt=function(){return!!e})()}function ft(e){return(ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pt(e,t){return(pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var n=function(e){function i(){var e=this,t=i;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=ut(this,i,[].concat(r))).state={defaultFontFamily:void 0},e}var t,n=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&pt(n,e),n=i,(e=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");e&&0<e.length&&(e=window.getComputedStyle(e[0]).getPropertyValue("font-family"),this.setState({defaultFontFamily:e}))}},{key:"render",value:function(){var t=this.state.defaultFontFamily,e=this.props,n=e.config,r=n.className,o=n.dropdownClassName,i=n.options,n=n.title,a=e.translations,s=e.onChange,c=e.expanded,u=e.doCollapse,l=e.onExpandEvent,e=e.doExpand,f=this.props.currentState.fontFamily||i&&t&&i.some(function(e){return e.toLowerCase()===t.toLowerCase()})&&t;return g.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},g.a.createElement(w,{className:v()("rdw-fontfamily-dropdown",r),optionWrapperClassName:v()("rdw-fontfamily-optionwrapper",o),onChange:s,expanded:c,doExpand:e,doCollapse:u,onExpandEvent:l,title:n||a["components.controls.fontfamily.fontfamily"]},g.a.createElement("span",{className:"rdw-fontfamily-placeholder"},f||a["components.controls.fontfamily.fontfamily"]),i.map(function(e,t){return g.a.createElement(S,{active:f===e,value:e,key:t},e)})))}}])&&ct(n.prototype,e),t&&ct(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.Component),dt=(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 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,function(e){e=function(e,t){if("object"!=k(e)||!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:e+""}(r.key),r)}}function mt(e,t,n){t=yt(t);var r=e,t=gt()?Reflect.construct(t,n||[],yt(e).constructor):t.apply(e,n);if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function gt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(gt=function(){return!!e})()}function yt(e){return(yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vt(e,t){return(vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}n=function(e){function n(e){var r;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(r=mt(this,n,[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(y.toggleCustomInlineStyle)(n,"fontFamily",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontFamily:t?Object(y.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY:void 0},e.registerCallBack(r.expandCollapse),r}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&vt(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(y.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||dt,n=n&&n.substring(11);return g.a.createElement(o,{translations:e,config:t,currentState:{fontFamily:n},onChange:this.toggleFontFamily,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&ht(r.prototype,e),t&&ht(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.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 bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wt(r.key),r)}}function wt(e){e=function(e,t){if("object"!=D(e)||!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:e+""}function St(e,t,n){t=Et(t);var r=e,t=_t()?Reflect.construct(t,n||[],Et(e).constructor):t.apply(e,n);if(t&&("object"===D(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function _t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_t=function(){return!!e})()}function Et(e){return(Et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ot(e,t){return(Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}n.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var Ct=function(e){function a(){var t,e=this,n=a;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=St(this,a,[].concat(o))).options=["unordered","ordered"],t.toggleBlockType=function(e){(0,t.props.onChange)(e)},t}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Ot(n,e),n=a,(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=wt(a="d-flex"))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e),n);return g.a.createElement("div",{className:a},g.a.createElement(b.n,{tooltip:i.title},g.a.createElement(u,{value:"unordered",onClick:this.toggleBlockType,active:"unordered"===o,className:"mr-2"},g.a.createElement(b.f,{appearance:"unordered"===o?"info":"default",name:i.icon,size:20}))),g.a.createElement(b.n,{tooltip:r.title},g.a.createElement(u,{value:"ordered",onClick:this.toggleBlockType,active:"ordered"===o},g.a.createElement(b.f,{appearance:"ordered"===o?"info":"default",name:r.icon,size:20}))))}}])&&bt(n.prototype,e),t&&bt(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.Component);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xt(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)||!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:e+""}(r.key),r)}}function kt(e,t,n){t=Tt(t);var r=e,t=Dt()?Reflect.construct(t,n||[],Tt(e).constructor):t.apply(e,n);if(t&&("object"===T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Dt=function(){return!!e})()}function Tt(e){return(Tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function It(e,t){return(It=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Ct.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 jt=function(e){function n(e){var r;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(r=kt(this,n,[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(y.changeDepth)(t,e,4);t&&n(t)},r.isIndentDisabled=function(){var e=r.props.editorState,t=r.state.currentBlock,e=Object(y.getBlockBeforeSelectedBlock)(e);return!e||!Object(y.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(y.isListBlock)(e)||e.get("depth")<=0};var e=r.props,t=e.editorState,e=e.modalHandler;return r.state={expanded:!1,currentBlock:t?Object(y.getSelectedBlock)(t):void 0},e.registerCallBack(r.expandCollapse),r}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&It(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(y.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,t=t.className,o=this.state,i=o.expanded,o=o.currentBlock;return"unordered-list-item"===o.get("type")?e="unordered":"ordered-list-item"===o.get("type")&&(e="ordered"),g.a.createElement(Ct,{config:n,translations:r,currentState:{listType:e},expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,className:t})}}])&&xt(r.prototype,e),t&&xt(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.Component);jt.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 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 Nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!=I(e)||!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:e+""}(r.key),r)}}function Mt(e,t,n){t=Pt(t);var r=e,t=At()?Reflect.construct(t,n||[],Pt(e).constructor):t.apply(e,n);if(t&&("object"===I(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function At(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(At=function(){return!!e})()}function Pt(e){return(Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Rt(e,t){return(Rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Lt=function(e){function n(){var e=this,t=n;if(e instanceof t)return Mt(this,n,arguments);throw new TypeError("Cannot call a class as a function")}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Rt(r,e),r=n,(e=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,o=t.center,i=t.right,a=t.justify,t=t.className,s=e.onChange,c=e.currentState.textAlignment,e=e.translations;return g.a.createElement("div",{className:v()("rdw-text-align-wrapper",t),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&g.a.createElement(u,{value:"left",className:v()(r.className),active:"left"===c,onClick:s,title:r.title||e["components.controls.textalign.left"]},g.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&g.a.createElement(u,{value:"center",className:v()(o.className),active:"center"===c,onClick:s,title:o.title||e["components.controls.textalign.center"]},g.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&g.a.createElement(u,{value:"right",className:v()(i.className),active:"right"===c,onClick:s,title:i.title||e["components.controls.textalign.right"]},g.a.createElement("img",{src:i.icon,alt:""})),0<=n.indexOf("justify")&&g.a.createElement(u,{value:"justify",className:v()(a.className),active:"justify"===c,onClick:s,title:a.title||e["components.controls.textalign.justify"]},g.a.createElement("img",{src:a.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,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,m=t.title;return g.a.createElement(w,{className:v()("rdw-text-align-dropdown",d),optionWrapperClassName:v()(h),onChange:s,expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:m||e["components.controls.textalign.textalign"]},g.a.createElement("img",{src:a&&t[a]&&t[a].icon||oe(t),alt:""}),0<=c.indexOf("left")&&g.a.createElement(S,{value:"left",active:"left"===a,className:v()("rdw-text-align-dropdownOption",u.className),title:u.title||e["components.controls.textalign.left"]},g.a.createElement("img",{src:u.icon,alt:""})),0<=c.indexOf("center")&&g.a.createElement(S,{value:"center",active:"center"===a,className:v()("rdw-text-align-dropdownOption",l.className),title:l.title||e["components.controls.textalign.center"]},g.a.createElement("img",{src:l.icon,alt:""})),0<=c.indexOf("right")&&g.a.createElement(S,{value:"right",active:"right"===a,className:v()("rdw-text-align-dropdownOption",f.className),title:f.title||e["components.controls.textalign.right"]},g.a.createElement("img",{src:f.icon,alt:""})),0<=c.indexOf("justify")&&g.a.createElement(S,{value:"justify",active:"justify"===a,className:v()("rdw-text-align-dropdownOption",p.className),title:p.title||e["components.controls.textalign.justify"]},g.a.createElement("img",{src:p.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Nt(r.prototype,e),t&&Nt(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.Component);function Ft(e){return(Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zt(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"!=Ft(e)||!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"!=Ft(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==Ft(e)?e:e+""}(r.key),r)}}function Bt(e,t,n){t=Ht(t);var r=e,t=Kt()?Reflect.construct(t,n||[],Ht(e).constructor):t.apply(e,n);if(t&&("object"===Ft(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Kt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Kt=function(){return!!e})()}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ut(e,t){return(Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Lt.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 Wt=function(e){function t(e){var r;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");(r=Bt(this,t,[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(y.setBlockData)(n,{"text-align":e}):Object(y.setBlockData)(n,{"text-align":void 0}))};e=r.props.modalHandler;return r.state={currentTextAlignment:void 0},e.registerCallBack(r.expandCollapse),r}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ut(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(y.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||Lt;return g.a.createElement(o,{config:t,translations:e,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:n},onChange:this.addBlockAlignmentData})}}])&&zt(r.prototype,e),n&&zt(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.Component);function qt(e){return(qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function 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"!=qt(e)||!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"!=qt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==qt(e)?e:e+""}(r.key),r)}}function Gt(e,t,n){t=$t(t);var r=e,t=Yt()?Reflect.construct(t,n||[],$t(e).constructor):t.apply(e,n);if(t&&("object"===qt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Yt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yt=function(){return!!e})()}function $t(e){return($t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zt(e,t){return(Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Wt.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var Jt=function(e){function t(e){var o;if(this instanceof t)return(o=Gt(this,t,[e])).onChange=function(e){var t=o.props,n=t.onChange;t.expanded&&n(o.state.currentStyle,e)},o.handleClick=function(e){var t=e.target.getAttribute("data-color");t&&(e.preventDefault(),e.stopPropagation(),o.onChange(t))},o.handleKeyDown=function(e){var t=e.target.getAttribute("data-color");t&&"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),o.onChange(t))},o.renderModal=function(){var e=o.props,t=e.config.colors,e=e.currentState,n=e.color,e=e.bgColor,r="color"===o.state.currentStyle?n:e;return g.a.createElement("div",{className:"Editor-colorPicker",onClick:o.handleClick,onKeyDown:o.handleKeyDown},t.map(function(e,t){return g.a.createElement("div",{className:"Editor-colorPicker-circleWrapper"},g.a.createElement("div",{ref:0===t?o.ref:null,"data-color":e,tabIndex:0,key:t,style:{backgroundColor:e},className:"Editor-colorPicker-circle","aria-selected":r===e}),r===e&&g.a.createElement(b.f,{name:"check",appearance:"white",className:"Editor-colorPicker-selectedCircle"}))}))},o.state={currentStyle:"color"},o.ref=g.a.createRef(),o;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Zt(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&(this.ref.current,this.setState({currentStyle:"color"}))}},{key:"render",value:function(){var e=this.props,t=e.expanded,n=e.onToggle,e=e.className,n=g.a.createElement(b.n,{tooltip:"Text color"},g.a.createElement(u,{tabIndex:0,"aria-label":"Font colors",onClick:n,active:t,activeClassName:"bg-secondary"},g.a.createElement(b.f,{name:"text_format",size:20})));return g.a.createElement("div",{className:e,"aria-haspopup":"true","aria-expanded":t},g.a.createElement(b.l,{trigger:n,position:"bottom-start",open:t},this.renderModal()))}}])&&Vt(r.prototype,e),n&&Vt(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.Component),Xt=(Jt.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},Jt);function Qt(e){return(Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function en(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!=Qt(e)||!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"!=Qt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==Qt(e)?e:e+""}(r.key),r)}}function tn(e,t,n){t=rn(t);var r=e,t=nn()?Reflect.construct(t,n||[],rn(e).constructor):t.apply(e,n);if(t&&("object"===Qt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function nn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nn=function(){return!!e})()}function rn(e){return(rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function on(e,t){return(on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Jt=function(e){function r(e){var i;if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");(i=tn(this,r,[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(y.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(y.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR,expanded:!1}},function(){var e=Object(y.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(y.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR||"color-var(--text)",n.currentBgColor=Object(y.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR),i.state=n,e.registerCallBack(i.expandCollapse),i}var t,n=r;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&on(n,e),n=r,(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||Xt,r=r&&r.substring(6),o=o&&o.substring(8);return g.a.createElement(i,{config:t,className:e,onChange:this.toggleColor,expanded:n,onToggle:this.toggleColorPicker,currentState:{color:r,bgColor:o}})}}])&&en(n.prototype,e),t&&en(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.Component),r=(Jt.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 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 sn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cn(r.key),r)}}function cn(e){e=function(e,t){if("object"!=an(e)||!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:e+""}function un(e,t,n){t=fn(t);var r=e,t=ln()?Reflect.construct(t,n||[],fn(e).constructor):t.apply(e,n);if(t&&("object"===an(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function ln(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ln=function(){return!!e})()}function fn(e){return(fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pn(e,t){return(pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var j=function(e){function a(){var r,e=this,t=a;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=un(this,a,[].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=cn(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}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&pn(n,e),n=a,(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 g.a.createElement("div",{className:"px-6 mt-6 mb-5",onClick:l},g.a.createElement(b.m,{weight:"strong",size:"large"},t?"Edit":"Insert a"," link"),g.a.createElement(b.g,{icon:"insert_link",className:"mt-4",placeholder:"Paste a link to insert",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:r,autoComplete:"off",autoFocus:!0,onClick:l}),g.a.createElement(b.g,{icon:"text_fields",className:"my-5",placeholder:"Text to display",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:n,autoComplete:"off",onClick:l}),g.a.createElement("div",{className:"d-flex justify-content-end"},g.a.createElement(b.a,{onClick:e,className:"mr-4"},"Cancel"),g.a.createElement(b.a,{onClick:this.addLink,disabled:!r||!n,appearance:"primary"},"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?g.a.createElement(S,null,g.a.createElement(b.f,{size:20,name:n,className:"mr-4"}),g.a.createElement(b.m,null,t)):g.a.createElement(b.n,{tooltip:"Link"},g.a.createElement(u,{value:"unordered-list-item",onClick:o,"aria-haspopup":"true","aria-expanded":e,active:e,activeClassName:"bg-secondary"},g.a.createElement(b.f,{name:n,size:20})));return g.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e},g.a.createElement(b.l,{trigger:t,position:r?"right":"bottom",open:e,onToggle:o},this.renderAddLinkModal()))}}])&&sn(n.prototype,e),t&&sn(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.Component),dn=(j.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},j);function hn(e){return(hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_n(r.key),r)}}function gn(e,t,n){t=vn(t);var r=e,t=yn()?Reflect.construct(t,n||[],vn(e).constructor):t.apply(e,n);if(t&&("object"===hn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function yn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(yn=function(){return!!e})()}function vn(e){return(vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bn(e,t){return(bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wn(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 Sn(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?wn(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=_n(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)):wn(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function _n(e){e=function(e,t){if("object"!=hn(e)||!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"!=hn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==hn(e)?e:e+""}function En(e){var t=On.match(e.target);return Sn(Sn({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var On=r()(),j=function(e){function n(e){var s;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(s=gn(this,n,[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||En)({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(y.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(y.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(y.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(y.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(y.getSelectionEntity)(t):void 0},s}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&bn(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.editorState,t=t.linkPopoverOpen;n&&n!==e.editorState&&this.setState({currentEntity:Object(y.getSelectionEntity)(n)}),e.linkPopoverOpen!==t&&t&&this.setState({expanded:t})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.inDropdown,n=this.state.expanded,r=this.getCurrentValues(),o=r.link,r=r.selectionText;return g.a.createElement(dn,{config:t,expanded:n,inDropdown:e,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:o,selectionText:r},onChange:this.onChange})}}])&&mn(r.prototype,e),t&&mn(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.Component),r=(j.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},j);function Cn(e){return(Cn="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 xn(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"!=Cn(e)||!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"!=Cn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==Cn(e)?e:e+""}(r.key),r)}}function kn(e,t,n){t=Tn(t);var r=e,t=Dn()?Reflect.construct(t,n||[],Tn(e).constructor):t.apply(e,n);if(t&&("object"===Cn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Dn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Dn=function(){return!!e})()}function Tn(e){return(Tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function In(e,t){return(In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}j=function(e){function t(e){var i;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");(i=kn(this,t,[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(y.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(y.getSelectionEntity)(e):void 0},i}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&In(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(y.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 g.a.createElement(b.n,{tooltip:r||t},g.a.createElement(u,{value:"unordered-list-item",onClick:this.addLink,className:"mr-2"},g.a.createElement(b.f,{name:n,size:20})))}}])&&xn(r.prototype,e),n&&xn(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.Component),j.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,config:d.a.object,inDropdown:d.a.boolean};o(209);function jn(e){return(jn="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 Nn(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,Mn(r.key),r)}}function Mn(e){e=function(e,t){if("object"!=jn(e)||!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"!=jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==jn(e)?e:e+""}function An(e,t,n){t=Rn(t);var r=e,t=Pn()?Reflect.construct(t,n||[],Rn(e).constructor):t.apply(e,n);if(t&&("object"===jn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Pn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pn=function(){return!!e})()}function Rn(e){return(Rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ln(e,t){return(Ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Fn=function(e){function a(){var r,e=this,t=a;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=An(this,a,[].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=Mn(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t))},r}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Ln(n,e),n=a,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,t=t.config;!n&&e.expanded&&(e=(n=t.defaultSize).height,t=n.width,this.setState({embeddedLink:"",height:e,width:t}))}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,e=e.width,r=this.props,o=r.config.popupClassName,i=r.doCollapse,r=r.translations;return g.a.createElement("div",{className:v()("rdw-embedded-modal",o),onClick:l},g.a.createElement("div",{className:"rdw-embedded-modal-header"},g.a.createElement("span",{className:"rdw-embedded-modal-header-option"},r["components.controls.embedded.embeddedlink"],g.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),g.a.createElement("div",{className:"rdw-embedded-modal-link-section"},g.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},g.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:r["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.a.createElement("div",{className:"rdw-embedded-modal-size"},g.a.createElement("span",null,g.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.a.createElement("span",null,g.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:e,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),g.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},g.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!e},r["generic.add"]),g.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:i},r["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,t=t.title,o=e.expanded,i=e.onExpandEvent,e=e.translations;return g.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-embedded-control"},g.a.createElement(u,{className:v()(r),value:"unordered-list-item",onClick:i,title:t||e["components.controls.embedded.embedded"]},g.a.createElement("img",{src:n,alt:""})),o?this.rendeEmbeddedLinkModal():void 0)}}])&&Nn(n.prototype,e),t&&Nn(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.Component),zn=(Fn.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},Fn);function Bn(e){return(Bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!=Bn(e)||!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"!=Bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==Bn(e)?e:e+""}(r.key),r)}}function Hn(e,t,n){t=Wn(t);var r=e,t=Un()?Reflect.construct(t,n||[],Wn(e).constructor):t.apply(e,n);if(t&&("object"===Bn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Un(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Un=function(){return!!e})()}function Wn(e){return(Wn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qn(e,t){return(qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Fn=function(e){function i(){var a,e=this,t=i;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=Hn(this,i,[].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}var t,n=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&qn(n,e),n=i,(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||zn;return g.a.createElement(r,{config:t,translations:e,onChange:this.addEmbeddedLink,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Kn(n.prototype,e),t&&Kn(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.Component),Fn.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 Vn(e){return(Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!=Vn(e)||!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:e+""}(r.key),r)}}function Yn(e,t,n){t=Zn(t);var r=e,t=$n()?Reflect.construct(t,n||[],Zn(e).constructor):t.apply(e,n);if(t&&("object"===Vn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function $n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($n=function(){return!!e})()}function Zn(e){return(Zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jn(e,t){return(Jn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Xn=function(e){function a(){var t,e=this,n=a;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=Yn(this,a,[].concat(o))).onChange=function(e){(0,t.props.onChange)(e.target.innerHTML)},t}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Jn(n,e),n=a,(e=[{key:"renderEmojiModal",value:function(){var n=this,e=this.props.config,t=e.popupClassName,e=e.emojis;return g.a.createElement("div",{className:v()("rdw-emoji-modal",t),onClick:l},e.map(function(e,t){return g.a.createElement("span",{key:t,className:"rdw-emoji-icon",alt:"",onClick:n.onChange},e)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,t=t.title,o=e.expanded,i=e.onExpandEvent,e=e.translations;return g.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":o,title:t||e["components.controls.emoji.emoji"]},g.a.createElement(u,{className:v()(r),value:"unordered-list-item",onClick:i},g.a.createElement("img",{src:n,alt:""})),o?this.renderEmojiModal():void 0)}}])&&Gn(n.prototype,e),t&&Gn(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.Component),Qn=(Xn.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,onChange:d.a.func,config:d.a.object,translations:d.a.object},Xn);function er(e){return(er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tr(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"!=er(e)||!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"!=er(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==er(e)?e:e+""}(r.key),r)}}function nr(e,t,n){t=or(t);var r=e,t=rr()?Reflect.construct(t,n||[],or(e).constructor):t.apply(e,n);if(t&&("object"===er(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function rr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rr=function(){return!!e})()}function or(e){return(or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ir(e,t){return(ir=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Xn=function(e){function a(){var r,e=this,t=a;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=nr(this,a,[].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}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&ir(n,e),n=a,(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||Qn;return g.a.createElement(r,{config:t,translations:e,onChange:this.addEmoji,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&tr(n.prototype,e),t&&tr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.Component);function ar(e){return(ar="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 sr(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,cr(r.key),r)}}function cr(e){e=function(e,t){if("object"!=ar(e)||!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"!=ar(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==ar(e)?e:e+""}function ur(e,t,n){t=fr(t);var r=e,t=lr()?Reflect.construct(t,n||[],fr(e).constructor):t.apply(e,n);if(t&&("object"===ar(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function lr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lr=function(){return!!e})()}function fr(e){return(fr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pr(e,t){return(pr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Xn.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var dr=function(e){function t(e){var i;if(this instanceof t)return(i=ur(this,t,[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=cr(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=g.a.createRef(),i.state={imgSrc:"",dragEnter:!1,uploadHighlighted:i.props.config.uploadEnabled&&!!i.props.config.uploadCallback,showImageLoading:!1,height:i.props.config.defaultSize.height,width:i.props.config.defaultSize.width,alt:""},i;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&pr(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=(t.className,t.title),t=t.inputAccept,o=e.expanded;return e.inDropdown?g.a.createElement(S,null,g.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},g.a.createElement(b.f,{name:n,size:20,className:"mr-4"}),g.a.createElement(b.m,null,r)),g.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"})):g.a.createElement("div",{"aria-haspopup":"true","aria-expanded":o},g.a.createElement(b.n,{tooltip:r},g.a.createElement(u,{"aria-label":"add image",className:"mr-2",value:"unordered-list-item",onClick:this.fileUploadClick},g.a.createElement("span",null,g.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},g.a.createElement(b.f,{name:n,size:20}))),g.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"}))))}}])&&sr(r.prototype,e),n&&sr(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.Component),hr=(dr.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},dr);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 gr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!=mr(e)||!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:e+""}(r.key),r)}}function yr(e,t,n){t=br(t);var r=e,t=vr()?Reflect.construct(t,n||[],br(e).constructor):t.apply(e,n);if(t&&("object"===mr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function vr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vr=function(){return!!e})()}function br(e){return(br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wr(e,t){return(wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Sr(e){var t=e.config,n=e.onChange,e=e.translations,r=t.icon,o=t.className,t=t.title;return g.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},g.a.createElement(u,{className:v()(o),onClick:n,title:t||e["components.controls.remove.remove"]},g.a.createElement("img",{src:r,alt:""})))}var dr=function(e){function t(e){var s;if(this instanceof t)return(s=yr(this,t,[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")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&wr(r,e),r=t,(e=[{key:"componentWillUnmount",value:function(){}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.inDropdown;return g.a.createElement(hr,{config:t,inDropdown:e,onChange:this.addImage})}}])&&gr(r.prototype,e),n&&gr(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.Component),_r=(dr.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,config:d.a.object,inDropdown:d.a.bool},o(211),Sr.propTypes={onChange:d.a.func,config:d.a.object,translations:d.a.object},Sr);function Er(e){return(Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!=Er(e)||!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"!=Er(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==Er(e)?e:e+""}(r.key),r)}}function Cr(e,t,n){t=kr(t);var r=e,t=xr()?Reflect.construct(t,n||[],kr(e).constructor):t.apply(e,n);if(t&&("object"===Er(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function xr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xr=function(){return!!e})()}function kr(e){return(kr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Dr(e,t){return(Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Tr=function(e){function a(){var n,e=this,t=a;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=Cr(this,a,[].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)}),ne(Object(y.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}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Dr(n,e),n=a,(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||_r;return g.a.createElement(r,{config:t,translations:e,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Or(n.prototype,e),t&&Or(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.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 Ir(e){return(Ir="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 jr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!=Ir(e)||!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"!=Ir(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==Ir(e)?e:e+""}(r.key),r)}}function Nr(e,t,n){t=Ar(t);var r=e,t=Mr()?Reflect.construct(t,n||[],Ar(e).constructor):t.apply(e,n);if(t&&("object"===Ir(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Mr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Mr=function(){return!!e})()}function Ar(e){return(Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pr(e,t){return(Pr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Rr=function(e){function a(){var t,e=this,n=a;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=Nr(this,a,[].concat(o))).onChange=function(e){(0,t.props.onChange)(e)},t}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Pr(n,e),n=a,(e=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,i=e.doCollapse,a=e.currentState,s=a.undoDisabled,a=a.redoDisabled,e=e.translations,c=t.options,u=t.undo,l=t.redo,f=t.className,p=t.dropdownClassName,d=t.title;return g.a.createElement(w,{className:v()("rdw-history-dropdown",f),optionWrapperClassName:v()(p),expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-history-control",title:d||e["components.controls.history.history"]},g.a.createElement("img",{src:oe(t),alt:""}),0<=c.indexOf("undo")&&g.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"]},g.a.createElement("img",{src:u.icon,alt:""})),0<=c.indexOf("redo")&&g.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"]},g.a.createElement("img",{src:l.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,o=t.redo,t=t.className,i=e.currentState,a=i.undoDisabled,i=i.redoDisabled,e=e.translations;return g.a.createElement("div",{className:v()("rdw-history-wrapper",t),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&g.a.createElement(u,{value:"undo",onClick:this.onChange,className:v()(r.className),disabled:a,title:r.title||e["components.controls.history.undo"]},g.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&g.a.createElement(u,{value:"redo",onClick:this.onChange,className:v()(o.className),disabled:i,title:o.title||e["components.controls.history.redo"]},g.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&jr(n.prototype,e),t&&jr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.Component);function Lr(e){return(Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){e=function(e,t){if("object"!=Lr(e)||!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"!=Lr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==Lr(e)?e:e+""}(r.key),r)}}function zr(e,t,n){t=Kr(t);var r=e,t=Br()?Reflect.construct(t,n||[],Kr(e).constructor):t.apply(e,n);if(t&&("object"===Lr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Br(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Br=function(){return!!e})()}function Kr(e){return(Kr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Hr(e,t){return(Hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Rr.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 Ur=function(e){function o(e){var r;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(r=zr(this,o,[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}var t,n=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Hr(n,e),n=o,(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||Rr;return g.a.createElement(i,{config:t,translations:e,currentState:{undoDisabled:r,redoDisabled:o},expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&Fr(n.prototype,e),t&&Fr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.Component);function Wr(e){return(Wr="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)}Ur.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var qr=["config","currentState","onChange"],Vr=["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 Yr(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 $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,function(e){e=function(e,t){if("object"!=Wr(e)||!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"!=Wr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==Wr(e)?e:e+""}(r.key),r)}}function Zr(e,t,n){t=Xr(t);var r=e,t=Jr()?Reflect.construct(t,n||[],Xr(e).constructor):t.apply(e,n);if(t&&("object"===Wr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Jr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jr=function(){return!!e})()}function Xr(e){return(Xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qr(e,t){return(Qr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var eo=function(e){function n(e){var t;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(t=Zr(this,n,[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}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Qr(r,e),r=n,(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,Yr(e,qr));this.state.expanded;return g.a.createElement(w,{expanded:this.state.expanded,doExpand:this.doExpand,doCollapse:this.doCollapse,onExpandEvent:this.onExpandEvent,menu:!0},g.a.createElement(b.f,{name:"more_horizon"}),o.options.slice(o.max,o.options.length).map(function(e,t){var n=o[e],e=to[e];return g.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=Yr(e,Vr),e=i.max;return g.a.createElement("div",{className:"Editor-toolbar-insert"},i.options.slice(0,e).map(function(e,t){var n=i[e],r=to[e];return(o.props.mention||"mention"!==e)&&n.isVisible?g.a.createElement(r,Gr({key:t,config:n,inDropdown:!1},a)):null}))}}])&&$r(r.prototype,e),t&&$r(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.Component),to=(eo.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:st,insert:eo,fontFamily:n,list:jt,textAlign:Wt,colorPicker:Jt,link:r,mention:j,embedded:Fn,emoji:Xn,image:dr,remove:Tr,history:Ur});function no(e){return(no="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 ro(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"!=no(e)||!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"!=no(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==no(e)?e:e+""}(r.key),r)}}function oo(e,t,n){t=ao(t);var r=e,t=io()?Reflect.construct(t,n||[],ao(e).constructor):t.apply(e,n);if(t&&("object"===no(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function io(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(io=function(){return!!e})()}function ao(e){return(ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function so(e,t){return(so=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function co(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"LINK"===n.getEntity(e).getType()},t)}function uo(s){var e=function(e){function a(){var o,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),i=0;i<n;i++)r[i]=arguments[i];return(o=oo(this,a,[].concat(r))).state={open:!1},o.onDeleteLink=function(e){e.preventDefault(),e.stopPropagation();var e=s.getEditorState(),t=e.getSelection(),n=o.props,r=n.contentState,n=n.entityKey,e=Object(y.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");s.onChange(h.EditorState.push(s.getEditorState(),n,"remove-range"))},o.onEditLink=function(e){e.preventDefault(),e.stopPropagation(),s.onEditLink(),o.setState({open:!1})},o.onToggle=function(e){o.setState({open:e})},o}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&so(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.entityKey,e=e.contentState.getEntity(n).getData().url,n=this.state.open,t=g.a.createElement("span",{contentEditable:"false",suppressContentEditableWarning:!0},g.a.createElement(b.m,{appearance:"link"},t));return g.a.createElement(b.l,{trigger:t,appendToBody:!0,open:n,onToggle:this.onToggle},g.a.createElement("div",{contentEditable:"false",suppressContentEditableWarning:!0,className:"d-flex pl-5 py-5 pr-4 align-items-center"},g.a.createElement(b.h,{href:e,target:"_new",className:"Editor-link"},e),g.a.createElement("span",{className:"Editor-seperator"}),g.a.createElement(b.a,{"aria-label":"Edit",onClick:this.onEditLink,appearance:"transparent",icon:"edit"}),g.a.createElement("span",{className:"Editor-seperator"}),g.a.createElement(b.a,{"aria-label":"Delete",onClick:this.onDeleteLink,appearance:"transparent",icon:"delete"})))}}])&&ro(n.prototype,e),t&&ro(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.Component);return e.propTypes={entityKey:d.a.string.isRequired,children:d.a.array,contentState:d.a.object},e}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(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 ho(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?po(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=yo(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)):po(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function mo(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,yo(r.key),r)}}function go(e,t,n){return t&&mo(e.prototype,t),n&&mo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yo(e){e=function(e,t){if("object"!=lo(e)||!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:e+""}var e=go(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=ho(ho({type:"input",name:e,clearButton:!1},i.chipOptions),{},{label:t,className:"Editor-mention-chip"}),g.a.createElement(b.c,fo({},e,{onClose:function(){var e=i.config,t=e.getEditorState(),n=t.getCurrentContent(),r=t.getSelection(),t=Object(y.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}),vo=(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 bo(e){return(bo="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 N(e,t,n){return(t=xo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wo(e,t,n){t=_o(t);var r=e,t=So()?Reflect.construct(t,n||[],_o(e).constructor):t.apply(e,n);if(t&&("object"===bo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function So(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(So=function(){return!!e})()}function _o(e){return(_o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Eo(e,t){return(Eo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Oo(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,xo(r.key),r)}}function Co(e,t,n){return t&&Oo(e.prototype,t),n&&Oo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xo(e){e=function(e,t){if("object"!=bo(e)||!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"!=bo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==bo(e)?e:e+""}function ko(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Do(e){var t=e.block,t=(e=e.contentState.getEntity(t.getEntityAt(0)).getData()).src,n=e.height,e=e.width;return g.a.createElement("iframe",{height:n,width:e,src:t,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}var To=Co(function e(t){var c=this,n=(ko(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<re(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){function r(){var l;ko(this,r);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(l=wo(this,r,[].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,Q()):"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=re(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(y.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=l.state.activeOption;return v()(N(N(N({},"Editor-dropdown-option",!0),"Editor-dropdown-option--highlight",e===t),"Editor-dropdown--keydown",l.state.keyDown))},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),g.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})):g.a.createElement("span",{key:t,spellCheck:!1,onClick:function(){return l.addMention("onMouseSelect")},"data-index":t,onMouseOver:l.onOptionMouseOver,className:l.getOptionClass(t)},o&&g.a.createElement(b.f,{name:o,className:"mr-4"}),g.a.createElement(b.m,null,i))},l}var t=r;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Eo(t,e),Co(r,[{key:"componentDidMount",value:function(){var e=this.suggestion.getBoundingClientRect(),t=e.left,e=e.top+25;this.setState({style:{left:t,top:e}}),J.registerCallBack(this.onEditorKeyDown),X(),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),J.deregisterCallBack(this.onEditorKeyDown),Q(),f.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var n=this,e=this.props.children,t=this.state.showSuggestions,r=f.dropdownOptions,r=(void 0===r?{}:r).dropdownClassName,r=v()(N(N(N(N({},"Popover",!0),"".concat(r),void 0!==r),"Editor-mention-dropdown",!0),"position-fixed",!0));return g.a.createElement("span",{className:"Editor-mention-suggestion",ref:this.setSuggestionReference,onClick:f.modalHandler.onSuggestionClick,"aria-haspopup":"true"},g.a.createElement("span",null,e),t&&g.a.createElement("span",{className:r,style:this.state.style,contentEditable:"false",suppressContentEditableWarning:!0,ref:this.setDropdownReference,onMouseMove:this.enableMouseEvents,onMouseLeave:this.disableMouseEvents,onScroll:this.enableMouseEvents},this.state.showLoader?g.a.createElement("span",{className:"Editor-dropdown-option"},g.a.createElement(b.j,{withImage:!1},g.a.createElement(b.k,{length:"large"}),g.a.createElement(b.k,{length:"large"}),g.a.createElement(b.k,{length:"large"}))):this.filteredSuggestions.map(function(e,t){return n.renderOption(e,t)})))}}])}(m.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}}),Io=function(e){return[new vo(e).getMentionDecorator(),new To(e).getSuggestionDecorator()]},jo=(Do.propTypes={block:d.a.object,contentState:d.a.object},Do);function No(e,t,n){return Math.min(Math.max(e,t),n)}var M={east:1,north:8,south:2,west:4};function Mo(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)===M.east||e===M.west,t=e===M.north||e===M.south,e=e&M.north&&e&M.west||e&M.south&&e&M.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(m.useRef)(),u=Object(m.useRef)({priority:"",value:"default"}),l=Object(m.useRef)({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),f=(Object(m.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&(M.east|M.west),i=r.direction&(M.south|M.north);null!==n&&r.isResizing&&(o&&i?(o=Math.floor(r.startX-e.clientX),o=r.direction&M.east?-o:o,t=(o=No(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&M.south?-t:t,o=No(r.startHeight+t,100,p),n.style.height="".concat(o,"px"),r.currentHeight=o):(i=Math.floor(r.startX-e.clientX),i=r.direction&M.east?-i:i,t=No(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 m.createElement("div",{ref:c},m.createElement("div",{className:"Editor-image-resizer Image-resizer--ne",onPointerDown:function(e){t(e,M.north|M.east)}}),m.createElement("div",{className:"Editor-image-resizer Image-resizer--se",onPointerDown:function(e){t(e,M.south|M.east)}}),m.createElement("div",{className:"Editor-image-resizer Image-resizer--sw",onPointerDown:function(e){t(e,M.south|M.west)}}),m.createElement("div",{className:"Editor-image-resizer Image-resizer--nw",onPointerDown:function(e){t(e,M.north|M.west)}}))}o(213);function Ao(e){return(Ao="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 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,function(e){e=function(e,t){if("object"!=Ao(e)||!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"!=Ao(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==Ao(e)?e:e+""}(r.key),r)}}function Ro(e,t,n){t=Fo(t);var r=e,t=Lo()?Reflect.construct(t,n||[],Fo(e).constructor):t.apply(e,n);if(t&&("object"===Ao(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Lo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Lo=function(){return!!e})()}function Fo(e){return(Fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zo(e,t){return(zo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Bo=function(f){var e=function(e){function t(e){var r;if(this instanceof t)return(r=Ro(this,t,[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=g.a.createRef(),r.onResizeEnd=r.onResizeEnd.bind(r),r;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&zo(r,e),r=t,(e=[{key:"renderAlignmentOptions",value:function(e){return g.a.createElement("div",{className:"Popover d-flex ".concat(e?"mt-4":"")},g.a.createElement("div",{onClick:this.setEntityAlignmentLeft,className:"Editor-image-options"},g.a.createElement(b.f,{name:"format_align_left",size:20})),g.a.createElement("div",{onClick:this.setEntityAlignmentCenter,className:"Editor-image-options"},g.a.createElement(b.f,{name:"format_align_center",size:20})),g.a.createElement("div",{onClick:this.setEntityAlignmentRight,className:"Editor-image-options"},g.a.createElement(b.f,{name:"format_align_right",size:20})),g.a.createElement("div",{onClick:this.removeEntity,className:"Editor-image-options"},g.a.createElement(b.f,{name:"delete",size:20})))}},{key:"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 g.a.createElement("div",{className:s},g.a.createElement("span",{onClick:this.toggleHovered,className:l},g.a.createElement("img",{src:t,alt:e,style:{height:c,width:u},ref:this.imageRef}),!i&&n&&g.a.createElement(g.a.Fragment,null,r()&&this.renderAlignmentOptions(o),o&&g.a.createElement(Mo,{editor:a,imageRef:this.imageRef,onResizeEnd:this.onResizeEnd}))))}}])&&Po(r.prototype,e),n&&Po(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}(m.Component);return e.propTypes={block:d.a.object,contentState:d.a.object},e},Ko=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:Bo(n),editable:!1};if(t&&"EMBEDDED_LINK"===t.type)return{component:jo,editable:!1}}}},Ho=["var(--text)","var(--secondary)","var(--success)","var(--primary)","var(--alert)","var(--accent1)"],eo=(t="ctrl",t=((null==(st=navigator.userAgentData)?void 0:st.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(eo,"+B)"),label:"Bold"},italic:{icon:"format_italic",title:"Italic (".concat(eo,"+I)"),label:"Italic"},underline:{icon:"format_underlined",title:"Underline (".concat(eo,"+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:Ho},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},jt={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})},Wt={isVisible:d.a.bool,title:d.a.string},Jt=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(jt),link:d.a.shape(Wt)})});o(214),o(94),o(95),o(96),o(97),o(98);o(99),o(100),o(101);function Wo(e){return(Wo="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 qo(){return(qo=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 Vo(e){return function(e){if(Array.isArray(e))return Go(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?Go(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)?Go(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 Go(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 A(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){$o(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 $o(e,t,n){return(t=Jo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zo(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,Jo(r.key),r)}}function Jo(e){e=function(e,t){if("object"!=Wo(e)||!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"!=Wo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==Wo(e)?e:e+""}function Xo(e,t,n){t=ei(t);var r=e,t=Qo()?Reflect.construct(t,n||[],ei(e).constructor):t.apply(e,n);if(t&&("object"===Wo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");e=r;if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function Qo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qo=function(){return!!e})()}function ei(e){return(ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ti(e,t){return(ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var r=function(e){function o(e){var a;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(a=Xo(this,o,[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(y.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||ee()&&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(y.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(n&&n(e,a.props.wrapperId),i(a.props,"editorState")?a.afterChange(e):a.setState({editorState:e},a.afterChange(e)))},a.setWrapperReference=function(e){a.wrapper=e},a.setEditorReference=function(e){a.props.editorRef&&a.props.editorRef(e),a.editor=e},a.onCloseLinkPopover=function(){a.setState({linkPopoverOpen:!1})},a.onEditLink=function(){a.setState(A(A({},a.state),{},{linkPopoverOpen:!0}))},a.getCompositeDecorator=function(e){var t=[{strategy:co,component:uo({focusHandler:a.focusHandler,getEditorState:a.getEditorState,onChange:a.onChange,onEditLink:a.onEditLink})}];return a.props.mention&&t.push.apply(t,Vo(Io(A(A({},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 i(a.props,"editorState")?a.props.editorState&&(t=h.EditorState.set(a.props.editorState,{decorator:e})):i(a.props,"defaultEditorState")?a.props.defaultEditorState&&(t=h.EditorState.set(a.props.defaultEditorState,{decorator:e})):i(a.props,"contentState")?a.props.contentState&&(n=Object(h.convertFromRaw)(a.props.contentState),t=h.EditorState.createWithContent(n,e),t=h.EditorState.moveSelectionToEnd(t)):i(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 A(A({},Object(y.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!!ee()||(t=a.state.editorState,!!(t=Object(y.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&&t.includes("<figure")?t:t&&t.includes("DraftStyle")?null:i?i(e,t,o,a.onChange):(i=e,e=t,t=o,o=a.onChange,(r=Object(y.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=F()(e),n=t.getCurrentContent(),i.entityMap.forEach(function(e,t){n=n.mergeEntityData(t,e)}),n=h.Modifier.replaceWithFragment(n,t.getSelection(),new B.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(B.Map)({"header-one":{wrapper:g.a.createElement(b.e,{size:"xxl"},a.props.children)},"header-two":{wrapper:g.a.createElement(b.e,{size:"xl"},a.props.children)},"header-three":{wrapper:g.a.createElement(b.e,{size:"l"},a.props.children)},"header-four":{wrapper:g.a.createElement(b.e,{size:"m"},a.props.children)},unstyled:{element:"p",wrapper:g.a.createElement("div",null,a.props.children)}}));var t=ie(Uo,e.toolbar),n=e.wrapperId||Math.floor(1e4*Math.random()),n=(a.wrapperId="Editor-wrapper-".concat(n),a.modalHandler=new W,a.focusHandler=new $,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=Ko({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(y.extractInlineStyle)(n),a.state={editorState:n,toolbar:t,editorFocused:!1,linkPopoverOpen:!1},a}var t,n=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&ti(n,e),n=o,(e=[{key:"componentDidMount",value:function(){this.props.autoFocus&&this.editor.focus(),this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o;e!==this.props&&(t={},n=(r=this.props).editorState,r=r.contentState,this.state.toolbar||(o=ie(Uo,o),t.toolbar=o),i(this.props,"editorState")&&n!==e.editorState?t.editorState=n?h.EditorState.set(n,{decorator:this.compositeDecorator}):h.EditorState.createEmpty(this.compositeDecorator):i(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(y.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()($o({},"Editor-toolbar",!0),n),n=v()($o({},"Editor-wrapper",!0),i),i=v()($o($o({},"Editor",!0),"hide-placeholder",this.isEmptyListBlock()),o);return g.a.createElement("div",{id:this.wrapperId,className:n,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur},this.props.showToolbar&&g.a.createElement("div",{className:e,onMouseDown:this.preventDefault,"aria-label":"Editor-toolbar",onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=to[e],e=r[e];return g.a.createElement(n,qo({key:t},u,{config:e,mention:c,className:"Editor-toolbar-options"}))})),g.a.createElement("div",{ref:this.setWrapperReference,className:i,style:a,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:J.onKeyDown,onMouseDown:this.onEditorMouseDown,id:"RichTextEditorWrapper"},g.a.createElement(h.Editor,qo({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:te,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,handlePastedText:this.handlePastedTextFn,ariaLabel:s,blockRenderMap:this.blockRenderMap},this.editorProps))))}}])&&Zo(n.prototype,e),t&&Zo(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(m.Component),ni=(r.utils={EditorState:h.EditorState,ContentState:h.ContentState,RichUtils:h.RichUtils,convertFromRaw:h.convertFromRaw,convertToRaw:h.convertToRaw,htmlToState:function(e){var e=L(e,'<p><br/></p><p id="RichTextEditor-Image"','<p id="RichTextEditor-Image"'),e=L(e,"<br/>",""),e=L(e,"<p> </p>",""),e=F()(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,void 0,!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:Jt,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),ri=o(49),oi=o.n(ri),ii=o(50);function ai(e){return(ai="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 si(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?si(Object(n),!0).forEach(function(e){ci(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):si(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ci(e,t,n){return(t=function(e){e=function(e,t){if("object"!=ai(e)||!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"!=ai(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==ai(e)?e:e+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ui(e){return function(e){if(Array.isArray(e))return li(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?li(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)?li(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 li(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 fi(e,n){return g.a.createElement(g.a.Fragment,null,e.map(function(e,t){return g.a.createElement("li",{key:n[t]},e)}))}function pi(e,r){return g.a.createElement(g.a.Fragment,null,e.map(function(e,t){var n=1<e.length&&e[1][0];return n&&n.includes("\n")?(n=n.split("\n"),g.a.createElement(b.i,{key:r[t]},n.map(function(e){return[e,g.a.createElement("br",null)]}))):e&&0===(null==(n=e[1])?void 0:n.length)?g.a.createElement("p",null,g.a.createElement("br",null)):g.a.createElement(b.i,{key:r[t]},e.map(function(e){return[e]}))}))}function di(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=P(P({},wi),n),r=P(P({},vi),r),o=P(P({},bi),o),r=P(P(P({},Si),r),o),o=P(P({},gi),_i(t)),t={blocks:r,entities:n,styles:Object(ri.createStylesRenderer)(yi,o)};return oi()(e,t,!1)}function hi(e){var t=e.raw,n=e.entities,r=e.headings,o=e.list,e=e.colors;return(t=t&&di(t,{entities:n,headings:r,list:o,colors:e}))?g.a.createElement("div",{className:"Preview-wrapper"},t):null}var mi={paddingLeft:"1.5em",margin:"0px"},gi={BOLD:{fontWeight:"bold"},ITALIC:{fontStyle:"italic"},UNDERLINE:{textDecoration:"underline"},STRIKETHROUGH:{textDecoration:"line-through"}},yi=function(e){var t=e.children,n=e.style,e=e.key;return g.a.createElement("span",{key:e,style:n},t)},vi={"header-one":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(b.e,{size:"xxl",key:n[t]},e)})},"header-two":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(b.e,{size:"xl",key:n[t]},e)})},"header-three":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(b.e,{size:"l",key:n[t]},e)})},"header-four":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(b.e,{size:"m",key:n[t]},e)})}},bi={"unordered-list-item":function(e,t){t=t.keys;return g.a.createElement("ul",{style:mi},fi(e,t))},"ordered-list-item":function(e,t){t=t.keys;return g.a.createElement("ol",{style:mi},fi(e,t))}},wi={LINK:function(e,t,n){n=n.key;return g.a.createElement(b.h,{key:n,href:t.url},e)},IMAGE:function(e,t){var n=t.src,r=t.alt,o=t.height,i=t.width,t=t.alignment;return g.a.createElement("p",{id:"RichTextEditor-Image",style:{justifyContent:t||"left",display:"flex"}},g.a.createElement("img",{src:n,alt:r,height:o,width:i}))},MENTION:function(e,t,n){n=n.key;return g.a.createElement("span",{name:t.value,className:"Chip--input Chip d-inline-flex mt-3",key:n},e)}},Si={unstyled:function(e,t,n){t=t.keys;return pi(e,t)},atomic:function(e,t){return e[0]}},_i=function(e){return[].concat(ui(Ho),ui(e)).reduce(function(e,t){var n="color-".concat(t),t={color:t};return P(P({},e),{},ci({},n,t))},{})},Ei=(hi.utils={convertToHTML:function(e){var t,n,r=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return(e=e&&di(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}))&&Object(ii.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(ii.renderToStaticMarkup)(e))):""}},hi.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},hi.defaultProps={entities:{},headings:{},list:{},colors:[]},hi)}]);
|