Socket
Socket
Sign inDemoInstall

richlagetest

Package Overview
Dependencies
Maintainers
1
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

richlagetest - npm Package Compare versions

Comparing version 0.0.0-00f8dddc44fd82f2d21396aebcac5d11f74a298c to 0.0.0-09b87b046fae0e0cd11e7abfb50826eaaf8e7800

dist/lib/contentAnalytics.cjs.js

4

dist/module.cjs.js

@@ -1,2 +0,4 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _inheritsLoose=require("@babel/runtime/helpers/inheritsLoose"),React=require("react"),lodash=require("lodash");function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _inheritsLoose__default=_interopDefaultLegacy(_inheritsLoose),React__default=_interopDefaultLegacy(React),styles_toolbar="_2M9cT",styles_button="_1lTtq",getSelectionRects=function(selection){var range=selection.getRangeAt(0),innerRects=function(range){for(var _iterator=document.createNodeIterator(range.commonAncestorContainer,NodeFilter.SHOW_ALL),innerSelectionNodes=[];_iterator.nextNode()&&_iterator.referenceNode!==range.startContainer;);for(;_iterator.nextNode()&&_iterator.referenceNode!==range.endContainer;)_iterator.referenceNode.nodeType===Node.TEXT_NODE&&innerSelectionNodes.push(_iterator.referenceNode);return innerSelectionNodes}(range).map((function(n){var r=document.createRange();return r.selectNodeContents(n),r.getBoundingClientRect()})),clientRects=range.getClientRects();return[clientRects[0]].concat(innerRects,[clientRects[clientRects.length-1]])};function addTextSelectionListener(container,callback){var handleSelection=function(){var selectedText,position,selection=document.getSelection(),selectionAnchor=null==selection?void 0:selection.anchorNode,selectionFocus=null==selection?void 0:selection.focusNode;selection&&selection.rangeCount>0&&!selection.isCollapsed&&container.contains(selectionAnchor)&&container.contains(selectionFocus)&&(selectedText=function(selection){return selection.toString().replace(/(\r\n|\r|\n){2,}/g," ")}(selection),position=function(selection){var rects=getSelectionRects(selection),left=999999,right=0;rects.forEach((function(rect){left=Math.min(left,rect.left),right=Math.max(right,rect.right)}));var y=rects[0].top+window.scrollY;return{x:(left+right)/2+window.scrollX,y:y}}(selection)),callback(selectedText,position)};return document.addEventListener("selectionchange",handleSelection),function(){return document.removeEventListener("selectionchange",handleSelection)}}var TextSelectionToolbar=function(_React$Component){function TextSelectionToolbar(props){var _this;return(_this=_React$Component.call(this,props)||this).addTextSelectionListener=function(container){container&&!_this.removeTextSelectionListener&&(_this.removeTextSelectionListener=addTextSelectionListener(container,_this.setSelectedText))},_this.setSelectedText=lodash.debounce((function(selectedText,selectedTextPosition){return _this.setState({selectedText:selectedText,selectedTextPosition:selectedTextPosition})}),50),_this.state={selectedText:""},_this}_inheritsLoose__default.default(TextSelectionToolbar,_React$Component);var _proto=TextSelectionToolbar.prototype;return _proto.componentDidMount=function(){this.addTextSelectionListener(this.props.container)},_proto.componentWillUnmount=function(){this.removeTextSelectionListener()},_proto.componentWillReceiveProps=function(nextPros){this.addTextSelectionListener(nextPros.container)},_proto.render=function(){var _this$state=this.state,selectedText=_this$state.selectedText,selectedTextPosition=_this$state.selectedTextPosition,_this$props=this.props,container=_this$props.container,children=_this$props.children;if(!selectedText||!selectedTextPosition)return null;var left=container.getBoundingClientRect().left,containerOffset=this.props.container.getBoundingClientRect().top,style={top:selectedTextPosition.y-containerOffset-5-window.scrollY,left:selectedTextPosition.x-left};return React__default.default.createElement("div",{className:styles_toolbar,style:style},children(selectedText))},TextSelectionToolbar}(React__default.default.Component),twitter=function(props){return React__default.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},props),React__default.default.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M17.653 4.268c.854-.52 1.493-1.336 1.8-2.297-.804.483-1.683.825-2.6 1.01-1.153-1.245-2.939-1.65-4.506-1.023-1.566.627-2.597 2.16-2.6 3.867.001.318.037.636.106.946-3.298-.168-6.37-1.748-8.453-4.346-.37.633-.563 1.355-.56 2.09-.117 1.34.452 2.647 1.507 3.463C1.608 7.87.88 7.696.173 7.458v.052c.142 2.038 1.63 3.717 3.614 4.077-.298.098-.608.147-.92.146-.233.001-.466-.024-.694-.074.55 1.699 2.103 2.858 3.867 2.888-1.446 1.158-3.237 1.786-5.08 1.78-.32 0-.641-.02-.96-.058 3.593 2.332 8.156 2.492 11.9.417 3.744-2.076 6.073-6.056 6.073-10.381 0-.18-.013-.36-.013-.54.801-.588 1.492-1.316 2.04-2.15-.745.336-1.536.556-2.347.653z"}))};exports.TextSelectionToolbar=TextSelectionToolbar,exports.TwitterButton=function(_ref){var selectedText=_ref.selectedText,onClick=_ref.onClick,handleOnClick=function(selectedText){null==onClick||onClick(selectedText),function(selectedText){var text="“"+selectedText+"“—",url=window.location.href;text.length+url.length>279&&(text=function(text,maxTextLength){var content=text.substring(0,maxTextLength-2);return(content=content.slice(0,content.lastIndexOf(" ")))+"…“—"}(text,279-url.length));var TWEET_ON_TWITTER_URL="https://twitter.com/intent/tweet?text="+encodeURI(text)+"&url="+encodeURI(url);window.open(TWEET_ON_TWITTER_URL)}(selectedText)};return React__default.default.createElement("button",{"data-hook":"twitter-button",className:styles_button,onClick:function(){return handleOnClick(selectedText)}},React__default.default.createElement(twitter,null))};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var ricosContent=require("ricos-content"),_inheritsLoose=require("@babel/runtime/helpers/inheritsLoose"),React=require("react"),reactIntersectionObserver=require("react-intersection-observer"),classNames=require("classnames"),_extends=require("@babel/runtime/helpers/extends"),lodash=require("lodash"),_objectWithoutPropertiesLoose=require("@babel/runtime/helpers/objectWithoutPropertiesLoose"),_asyncToGenerator=require("@babel/runtime/helpers/asyncToGenerator"),_regeneratorRuntime=require("@babel/runtime/regenerator"),reactI18next=require("react-i18next"),i18next=require("i18next");function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(k){if("default"!==k){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:!0,get:function(){return e[k]}})}})),n.default=e,Object.freeze(n)}var _inheritsLoose__default=_interopDefaultLegacy(_inheritsLoose),React__default=_interopDefaultLegacy(React),classNames__default=_interopDefaultLegacy(classNames),_extends__default=_interopDefaultLegacy(_extends),_objectWithoutPropertiesLoose__default=_interopDefaultLegacy(_objectWithoutPropertiesLoose),_asyncToGenerator__default=_interopDefaultLegacy(_asyncToGenerator),_regeneratorRuntime__default=_interopDefaultLegacy(_regeneratorRuntime),__assign$r=function(){return(__assign$r=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t}).apply(this,arguments)};var _DRAFT_TO_RICOS_DOC_T,ButtonType,ModifierKey,ToolbarType,DisplayMode,DecorationMode,baseLink={target:"SELF"},Link_fromJSON=function(object){var message=__assign$r({},baseLink);return void 0!==object.url&&null!==object.url?message.url=String(object.url):message.url=void 0,void 0!==object.anchor&&null!==object.anchor?message.anchor=String(object.anchor):message.anchor=void 0,void 0!==object.target&&null!==object.target?message.target=function(object){switch(object){case 0:case"SELF":return"SELF";case 1:case"BLANK":return"BLANK";case 2:case"PARENT":return"PARENT";case 3:case"TOP":return"TOP";case-1:case"UNRECOGNIZED":default:return"UNRECOGNIZED"}}(object.target):message.target="SELF",void 0!==object.rel&&null!==object.rel?message.rel=Link_Rel.fromJSON(object.rel):message.rel=void 0,void 0!==object.customData&&null!==object.customData?message.customData=String(object.customData):message.customData=void 0,message},Link_toJSON=function(message){var obj={};return void 0!==message.url&&(obj.url=message.url),void 0!==message.anchor&&(obj.anchor=message.anchor),void 0!==message.target&&(obj.target=function(object){switch(object){case"SELF":return"SELF";case"BLANK":return"BLANK";case"PARENT":return"PARENT";case"TOP":return"TOP";default:return"UNKNOWN"}}(message.target)),void 0!==message.rel&&(obj.rel=message.rel?Link_Rel.toJSON(message.rel):void 0),void 0!==message.customData&&(obj.customData=message.customData),obj},baseLink_Rel={},Link_Rel={fromJSON:function(object){var message=__assign$r({},baseLink_Rel);return void 0!==object.nofollow&&null!==object.nofollow?message.nofollow=Boolean(object.nofollow):message.nofollow=void 0,void 0!==object.sponsored&&null!==object.sponsored?message.sponsored=Boolean(object.sponsored):message.sponsored=void 0,void 0!==object.ugc&&null!==object.ugc?message.ugc=Boolean(object.ugc):message.ugc=void 0,message},toJSON:function(message){var obj={};return void 0!==message.nofollow&&(obj.nofollow=message.nofollow),void 0!==message.sponsored&&(obj.sponsored=message.sponsored),void 0!==message.ugc&&(obj.ugc=message.ugc),obj}},__assign$n=function(){return(__assign$n=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t}).apply(this,arguments)},baseLinkData={},LinkData={fromJSON:function(object){var message=__assign$n({},baseLinkData);return void 0!==object.link&&null!==object.link?message.link=Link_fromJSON(object.link):message.link=void 0,message},toJSON:function(message){var obj={};return void 0!==message.link&&(obj.link=message.link?Link_toJSON(message.link):void 0),obj}},DRAFT_TO_RICOS_DOC_TYPE=((_DRAFT_TO_RICOS_DOC_T={})[ricosContent.HEADER_BLOCK.ONE]="headerOne",_DRAFT_TO_RICOS_DOC_T[ricosContent.HEADER_BLOCK.TWO]="headerTwo",_DRAFT_TO_RICOS_DOC_T[ricosContent.HEADER_BLOCK.THREE]="headerThree",_DRAFT_TO_RICOS_DOC_T[ricosContent.HEADER_BLOCK.FOUR]="headerFour",_DRAFT_TO_RICOS_DOC_T[ricosContent.HEADER_BLOCK.FIVE]="headerFive",_DRAFT_TO_RICOS_DOC_T[ricosContent.HEADER_BLOCK.SIX]="headerSix",_DRAFT_TO_RICOS_DOC_T[ricosContent.HEADER_BLOCK.PARAGRAPH]="paragraph",_DRAFT_TO_RICOS_DOC_T);exports.ButtonType=void 0,(ButtonType=exports.ButtonType||(exports.ButtonType={})).CUSTOM="custom",ButtonType.FILES="file",ButtonType.TOGGLE="toggle",ButtonType.PANEL="panel",ButtonType.INLINE_PANEL="inline-panel",ButtonType.EXTERNAL_MODAL="external-modal",ButtonType.DROPDOWN="dropdown",ButtonType.SEPARATOR="separator",ButtonType.SIZE_ORIGINAL="size-original",ButtonType.SIZE_CONTENT_CENTER="size-content-center",ButtonType.SIZE_SMALL_CENTER="size-small-center",ButtonType.SIZE_SMALL_LEFT="size-small-left",ButtonType.SIZE_SMALL_RIGHT="size-small-right",ButtonType.ALIGN_LEFT="align-left",ButtonType.ALIGN_RIGHT="align-right",ButtonType.ALIGN_CENTER="align-center",ButtonType.SIZE_CONTENT="size-content",ButtonType.SIZE_FULL_WIDTH="size-full-width",ButtonType.SIZE_SMALL="size-small",ButtonType.SIZE_MEDIUM="size-medium",ButtonType.SIZE_LARGE="size-large",ButtonType.TEXT_ALIGN_LEFT="alignment-left",ButtonType.TEXT_ALIGN_CENTER="alignment-center",ButtonType.TEXT_ALIGN_RIGHT="alignment-right",ButtonType.WIDTH="width",ButtonType.HEIGHT="height",ButtonType.LINK="link",ButtonType.SPOILER="spoiler",ButtonType.DELETE="delete",ButtonType.LINK_PREVIEW="link-preview",ButtonType.VIDEO_SETTINGS="video-settings",exports.ModifierKey=void 0,(ModifierKey=exports.ModifierKey||(exports.ModifierKey={})).COMMAND="command",ModifierKey.CTRL="ctrl",ModifierKey.OPTION="option",ModifierKey.SHIFT="shift",ModifierKey.ALT="alt",exports.ToolbarType=void 0,(ToolbarType=exports.ToolbarType||(exports.ToolbarType={})).SIDE="SIDE",ToolbarType.MOBILE="MOBILE",ToolbarType.FOOTER="FOOTER",ToolbarType.STATIC="STATIC",ToolbarType.INLINE="INLINE",ToolbarType.PLUGIN="PLUGIN",ToolbarType.FORMATTING="FORMATTING",ToolbarType.INSERT_PLUGIN="INSERT_PLUGIN",ToolbarType.TEXT="ALL-TEXT-TOOLBARS",ToolbarType.SHORTCUT="SHORTCUT",ToolbarType.LINK="LINK",exports.DisplayMode=void 0,(DisplayMode=exports.DisplayMode||(exports.DisplayMode={})).NORMAL="NORMAL",DisplayMode.FLOATING="FLOATING",exports.DecorationMode=void 0,(DecorationMode=exports.DecorationMode||(exports.DecorationMode={})).PREPEND="PREPEND",DecorationMode.WRAP="WRAP",DecorationMode.APPEND="APPEND";var noOutlineStyle_noOutline="_1-vl0",AccessibilityListener=function(_Component){function AccessibilityListener(){var _this;return(_this=_Component.apply(this,arguments)||this).handleTabKeyUp=function(e){9===e.which&&document.body.classList.contains(noOutlineStyle_noOutline)&&document.body.classList.remove(noOutlineStyle_noOutline)},_this.handleClick=function(){document.body.classList.contains(noOutlineStyle_noOutline)||document.body.classList.add(noOutlineStyle_noOutline)},_this.render=function(){return null},_this}_inheritsLoose__default.default(AccessibilityListener,_Component);var _proto=AccessibilityListener.prototype;return _proto.componentDidMount=function(){document.body.classList.add(noOutlineStyle_noOutline),this.props.isMobile||(document.addEventListener("keyup",this.handleTabKeyUp),document.addEventListener("click",this.handleClick))},_proto.componentWillUnmount=function(){this.props.isMobile||(document.removeEventListener("keyup",this.handleTabKeyUp),document.removeEventListener("click",this.handleClick))},AccessibilityListener}(React.Component),cssClassMerger=function(defaultStyleClassName,themeClassName){return defaultStyleClassName+" "+themeClassName},mergeStyles=function(_ref){var styles=_ref.styles,theme=_ref.theme;if(!theme)return console.warn("mergeStyles invoked without theme!"),styles;var themeStyles=lodash.pickBy(theme),themeStylesToMerge=lodash.pickBy(themeStyles,(function(_,key){return lodash.has(styles,key)}));return lodash.mergeWith(_extends__default.default({},styles),themeStylesToMerge,cssClassMerger)},isSSR=function(){return"undefined"==typeof window},styles={placeholder:"_2bUeE"},ViewportRenderer=function(_Component){function ViewportRenderer(){return _Component.apply(this,arguments)||this}return _inheritsLoose__default.default(ViewportRenderer,_Component),ViewportRenderer.prototype.render=function(){var _this=this,_this$props=this.props,children=_this$props.children,placeholderStyle=_this$props.placeholderStyle,placeholderClass=_this$props.placeholderClass,containerStyle=_this$props.containerStyle,containerClass=_this$props.containerClass,theme=this.props.theme;return this.styles=this.styles||mergeStyles({styles:styles,theme:theme}),isSSR()||void 0===window.IntersectionObserver?children:React__default.default.createElement(reactIntersectionObserver.InView,{triggerOnce:!0},(function(_ref){var inView=_ref.inView,ref=_ref.ref;return inView?React__default.default.createElement("div",{ref:ref,style:containerStyle,className:containerClass},children):React__default.default.createElement("div",{ref:ref,className:classNames__default.default(_this.styles.placeholder,placeholderClass),style:placeholderStyle})}))},ViewportRenderer}(React.Component);function i18n(_ref){var _resources,locale=_ref.locale,localeResource=_ref.localeResource;return i18next.createInstance().init({lng:locale,keySeparator:"$",interpolation:{escapeValue:!1},react:{wait:!0},resources:(_resources={},_resources[locale]={translation:localeResource},_resources)})}function getDisplayName(Component){return Component.displayName||Component.name||"Component"}function createHocName(hocComponentName,WrappedComponent){return hocComponentName+"("+getDisplayName(WrappedComponent)+")"}ViewportRenderer.defaultProps={placeholderStyle:{},containerStyle:{},alwaysRenderChildren:!1,placeholderClass:"",containerClass:""};var memoizedNow,_excluded=["forwardedRef"],safeJsonParse=function(jsonString){try{return JSON.parse(jsonString)}catch(e){return}};function t(t){return"object"==typeof t&&null!=t&&1===t.nodeType}function e(t,e){return(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function n(t,n){if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){var r=getComputedStyle(t,null);return e(r.overflowY,n)||e(r.overflowX,n)||function(t){var e=function(t){if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}}(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)}(t)}return!1}function r(t,e,n,r,i,o,l,d){return o<t&&l>e||o>t&&l<e?0:o<=t&&d<=n||l>=e&&d>=n?o-t-r:l>e&&d<n||o<t&&d>n?l-e+i:0}function compute(e,i){var o=window,l=i.scrollMode,d=i.block,u=i.inline,h=i.boundary,a=i.skipOverflowHiddenElements,c="function"==typeof h?h:function(t){return t!==h};if(!t(e))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,s=[],p=e;t(p)&&c(p);){if((p=p.parentElement)===f){s.push(p);break}null!=p&&p===document.body&&n(p)&&!n(document.documentElement)||null!=p&&n(p,a)&&s.push(p)}for(var m=o.visualViewport?o.visualViewport.width:innerWidth,g=o.visualViewport?o.visualViewport.height:innerHeight,w=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,W=e.getBoundingClientRect(),b=W.height,H=W.width,y=W.top,E=W.right,M=W.bottom,V=W.left,x="start"===d||"nearest"===d?y:"end"===d?M:y+b/2,I="center"===u?V+H/2:"end"===u?E:V,C=[],T=0;T<s.length;T++){var k=s[T],B=k.getBoundingClientRect(),D=B.height,O=B.width,R=B.top,X=B.right,Y=B.bottom,L=B.left;if("if-needed"===l&&y>=0&&V>=0&&M<=g&&E<=m&&y>=R&&M<=Y&&V>=L&&E<=X)return C;var S=getComputedStyle(k),j=parseInt(S.borderLeftWidth,10),q=parseInt(S.borderTopWidth,10),z=parseInt(S.borderRightWidth,10),A=parseInt(S.borderBottomWidth,10),F=0,G=0,J="offsetWidth"in k?k.offsetWidth-k.clientWidth-j-z:0,K="offsetHeight"in k?k.offsetHeight-k.clientHeight-q-A:0;if(f===k)F="start"===d?x:"end"===d?x-g:"nearest"===d?r(v,v+g,g,q,A,v+x,v+x+b,b):x-g/2,G="start"===u?I:"center"===u?I-m/2:"end"===u?I-m:r(w,w+m,m,j,z,w+I,w+I+H,H),F=Math.max(0,F+v),G=Math.max(0,G+w);else{F="start"===d?x-R-q:"end"===d?x-Y+A+K:"nearest"===d?r(R,Y,D,q,A+K,x,x+b,b):x-(R+D/2)+K/2,G="start"===u?I-L-j:"center"===u?I-(L+O/2)+J/2:"end"===u?I-X+z+J:r(L,X,O,j,z+J,I,I+H,H);var N=k.scrollLeft,P=k.scrollTop;x+=P-(F=Math.max(0,Math.min(P+F,k.scrollHeight-D+K))),I+=N-(G=Math.max(0,Math.min(N+G,k.scrollWidth-O+J)))}C.push({el:k,top:F,left:G})}return C}function isOptionsObject(options){return options===Object(options)&&0!==Object.keys(options).length}function scrollIntoView$1(target,options){var targetIsDetached=!target.ownerDocument.documentElement.contains(target);if(isOptionsObject(options)&&"function"==typeof options.behavior)return options.behavior(targetIsDetached?[]:compute(target,options));if(!targetIsDetached){var computeOptions=function(options){return!1===options?{block:"end",inline:"nearest"}:isOptionsObject(options)?options:{block:"start",inline:"nearest"}}(options);return function(actions,behavior){void 0===behavior&&(behavior="auto");var canSmoothScroll="scrollBehavior"in document.body.style;actions.forEach((function(_ref){var el=_ref.el,top=_ref.top,left=_ref.left;el.scroll&&canSmoothScroll?el.scroll({top:top,left:left,behavior:behavior}):(el.scrollTop=top,el.scrollLeft=left)}))}(compute(target,computeOptions),computeOptions.behavior)}}var now=function(){return memoizedNow||(memoizedNow="performance"in window?performance.now.bind(performance):Date.now),memoizedNow()};function step(context){var time=now(),elapsed=Math.min((time-context.startTime)/context.duration,1),value=context.ease(elapsed),currentX=context.startX+(context.x-context.startX)*value,currentY=context.startY+(context.y-context.startY)*value;context.method(currentX,currentY),currentX!==context.x||currentY!==context.y?requestAnimationFrame((function(){return step(context)})):context.cb()}function smoothScroll(el,x,y,duration,ease,cb){var scrollable,startX,startY;void 0===duration&&(duration=600),void 0===ease&&(ease=function(t){return 1+--t*t*t*t*t}),scrollable=el,startX=el.scrollLeft,startY=el.scrollTop,step({scrollable:scrollable,method:function(x,y){el.scrollLeft=Math.ceil(x),el.scrollTop=Math.ceil(y)},startTime:now(),startX:startX,startY:startY,x:x,y:y,duration:duration,ease:ease,cb:cb})}var scrollIntoView=function(target,options){var overrides=options||{};return function(options){return options&&!options.behavior||"smooth"===options.behavior}(overrides)?scrollIntoView$1(target,{block:overrides.block,inline:overrides.inline,scrollMode:overrides.scrollMode,boundary:overrides.boundary,behavior:function(actions){return Promise.all(actions.reduce((function(results,_ref){var el=_ref.el,left=_ref.left,top=_ref.top,startLeft=el.scrollLeft,startTop=el.scrollTop;return startLeft===left&&startTop===top?results:[].concat(results,[new Promise((function(resolve){return smoothScroll(el,left,top,overrides.duration,overrides.ease,(function(){return resolve({el:el,left:[startLeft,left],top:[startTop,top]})}))}))])}),[]))}}):Promise.resolve(scrollIntoView$1(target,options))},anchorScrollUsingSmoothScrollIntoViewIfNeeded=function(element,fixedElementsOffset){var _element$style=element.style,paddingTop=_element$style.paddingTop,marginTop=_element$style.marginTop;element.style.marginTop="-"+fixedElementsOffset+"px",element.style.paddingTop=fixedElementsOffset+"px",scrollIntoView(element,{block:"start",inline:"start"}),element.style.marginTop=marginTop,element.style.paddingTop=paddingTop},anchorScrollUsingScrollIntoView=function(element,fixedElementsOffset){var _element$style2=element.style,paddingTop=_element$style2.paddingTop,marginTop=_element$style2.marginTop;element.style.marginTop="-"+fixedElementsOffset+"px",element.style.paddingTop=fixedElementsOffset+"px",element.scrollIntoView({behavior:"smooth"}),element.style.marginTop=marginTop,element.style.paddingTop=paddingTop},getLinkRangesInBlock=function(block,contentState){var ranges=[];return block.entityRanges.forEach((function(entityRange){var _contentState$entityM,entityType=null===(_contentState$entityM=contentState.entityMap[entityRange.key])||void 0===_contentState$entityM?void 0:_contentState$entityM.type;if("LINK"===entityType||"wix-draft-plugin-external-link"===entityType){var start=entityRange.offset,end=start+entityRange.length;ranges.push([start,end])}})),ranges},contentStateSchema={definitions:{inlineStyleDef:{definitions:{},$schema:"http://json-schema.org/draft-07/schema#",$id:"https://wix-rich-content/inline-style.json",type:"object",title:"inline style",required:["offset","length","style"],properties:{offset:{$id:"#/properties/offset",type:"integer",title:"offset",default:0,min:0,examples:[0]},length:{$id:"#/properties/length",type:"integer",title:"length",default:0,min:0,examples:[4]},style:{$id:"#/properties/style",type:"string",title:"style",default:"",examples:["color4"],pattern:"^(.*)$"}}},entityRangeDef:{definitions:{},$schema:"http://json-schema.org/draft-07/schema#",$id:"https://wix-rich-content/entity-range.json",type:"object",title:"inline style",required:["offset","length","key"],properties:{offset:{$id:"#/properties/offset",type:"integer",title:"offset",default:0,min:0,examples:[0]},length:{$id:"#/properties/length",type:"integer",title:"length",default:0,min:0,examples:[4]},key:{$id:"#/properties/style",type:"integer",title:"key",default:"",examples:[0]}}},entityDef:{definitions:{},$schema:"http://json-schema.org/draft-07/schema#",$id:"https://wix-rich-content/entity-range.json",type:"object",title:"entity",required:["type","data"],properties:{type:{$id:"#/properties/type",enum:["IMAGE","VIDEO-EMBED","LINK","mention","wix-draft-plugin-image","wix-draft-plugin-link-button","wix-draft-plugin-action-button","wix-draft-plugin-video","wix-draft-plugin-gallery","wix-draft-plugin-link","wix-draft-plugin-html","wix-draft-plugin-sound-cloud","wix-draft-plugin-hashtag","wix-draft-plugin-divider","wix-draft-plugin-emoji","wix-draft-plugin-giphy","wix-draft-plugin-map","wix-draft-plugin-file-upload","wix-draft-plugin-vertical-embed","wix-draft-plugin-poll","wix-draft-plugin-link-preview","ANCHOR","wix-rich-content-plugin-table"],title:"entity type",examples:["wix-draft-plugin-image"]},mutability:{$id:"#/properties/mutability",type:"string",enum:["MUTABLE","IMMUTABLE","SEGMENTED"],title:"entity mutability",examples:["IMMUTABLE"]},data:{$id:"#/properties/data",type:"object",title:"entity data"}},anyOf:[{}]}},$schema:"http://json-schema.org/draft-07/schema#",$id:"https://wix-rich-content/content-state-schema.json",type:"object",title:"content state",required:["blocks","entityMap","VERSION"],properties:{blocks:{$id:"#/properties/blocks",type:"array",title:"blocks",items:{$id:"#/properties/blocks/items",type:"object",title:"block",required:["key","text","type","inlineStyleRanges","entityRanges","data"],properties:{key:{$id:"#/properties/blocks/items/properties/key",type:"string",title:"block key",default:"",examples:["45qkg"],pattern:"^(.*)$"},text:{$id:"#/properties/blocks/items/properties/text",type:"string",title:"text",default:"",examples:["test"]},type:{$id:"#/properties/blocks/items/properties/type",type:"string",title:"block type",default:"",examples:["unstyled"],enum:["unstyled","header-one","header-two","header-three","header-four","header-five","header-six","unordered-list-item","ordered-list-item","blockquote","atomic","code-block","figure"]},depth:{$id:"#/properties/blocks/items/properties/depth",type:"integer",title:"depth",maximum:10,default:0,examples:[0]},inlineStyleRanges:{$id:"#/properties/blocks/items/properties/inlineStyleRanges",type:"array",title:"inline style ranges",items:{$ref:"#/definitions/inlineStyleDef"}},entityRanges:{$id:"#/properties/blocks/items/properties/entityRanges",type:"array",title:"entity ranges",default:null,items:{$ref:"#/definitions/entityRangeDef"}},data:{$id:"#/properties/blocks/items/properties/data",type:"object",title:"data",default:null}}}},entityMap:{$id:"#/properties/entityMap",type:"object",title:"entity map",patternProperties:{"[0-9]+":{$ref:"#/definitions/entityDef"}}}}},LTR="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",isRtlRegex=new RegExp("^[^"+LTR+"]*[֑-߿יִ-﷽ﹰ-ﻼ]"),isLtrRegex=new RegExp("^[^֑-߿יִ-﷽ﹰ-ﻼ]*["+LTR+"]"),emojiRegex=/\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]/g,GlobalContext=React__default.default.createContext({isMobile:!1,experiments:{}}),isHexColor=function(str){return/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(str)},rtlLangs=["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"],isRtl=function(locale){return!!locale&&rtlLangs.includes(locale.split("-|_")[0].toLowerCase())},getBlocksFromContentState=function(contentState){var entityMap,rceInRcePlugins,innerRCEBlocks=(entityMap=contentState.entityMap,rceInRcePlugins=["wix-rich-content-plugin-table","wix-rich-content-plugin-collapsible-list"],Object.values(entityMap).some((function(entity){return rceInRcePlugins.includes(entity.type)}))?getInnerRCEBlocks(contentState.entityMap):[]);return[].concat(contentState.blocks,innerRCEBlocks)};function getInnerRCEBlocks(object){var result=[];if(object instanceof Array)Array.prototype.forEach.call(object,(function(arrayElement){var innerBlocks=getInnerRCEBlocks(arrayElement);innerBlocks&&(result=[].concat(result,innerBlocks))}));else for(var _i=0,_Object$entries=Object.entries(object);_i<_Object$entries.length;_i++){var _Object$entries$_i=_Object$entries[_i],key=_Object$entries$_i[0],value=_Object$entries$_i[1];if("blocks"===key)return value;if(value instanceof Object||value instanceof Array){var innerBlocks=getInnerRCEBlocks(value);innerBlocks&&(result=[].concat(result,innerBlocks))}}return result}var _INLINE_STYLE_TYPES,_RICOS_TO_DRAFT_TYPE,_dynamicStyleParsers,_defaultStyleFnMapper,_defaultStyleSelectio;function isInEditor(contentBlock){return contentBlock.toJS}function isInLink(i,block,contentState){var entityKey=function(i,block){var _block$entityRanges$f;return isInEditor(block)?block.getEntityAt(i):null===(_block$entityRanges$f=block.entityRanges.find((function(_ref){var offset=_ref.offset,length=_ref.length;return i>offset&&i<offset+length})))||void 0===_block$entityRanges$f?void 0:_block$entityRanges$f.key}(i,block);return function(type){return"LINK"===type||"ricos-plugin-custom-link"===type}(function(block,contentState,entityKey){var _contentState$entityM;return isInEditor(block)?null!==entityKey&&contentState.getEntity(entityKey).getType():null===(_contentState$entityM=contentState.entityMap[entityKey])||void 0===_contentState$entityM?void 0:_contentState$entityM.type}(block,contentState,entityKey))}var INLINE_STYLE_TYPES=((_INLINE_STYLE_TYPES={})[ricosContent.RICOS_TEXT_COLOR_TYPE]="FG",_INLINE_STYLE_TYPES[ricosContent.RICOS_TEXT_HIGHLIGHT_TYPE]="BG",_INLINE_STYLE_TYPES[ricosContent.RICOS_FONT_SIZE_TYPE]="font-size",_INLINE_STYLE_TYPES),RICOS_TO_DRAFT_TYPE=((_RICOS_TO_DRAFT_TYPE={})[ricosContent.RICOS_TEXT_COLOR_TYPE]=ricosContent.TEXT_COLOR_TYPE,_RICOS_TO_DRAFT_TYPE[ricosContent.RICOS_TEXT_HIGHLIGHT_TYPE]=ricosContent.TEXT_HIGHLIGHT_TYPE,_RICOS_TO_DRAFT_TYPE),parseStyleByType=function(style,type){var property=INLINE_STYLE_TYPES[type],cssRule=safeJsonParse(style);return null==cssRule?void 0:cssRule[property]},dynamicStyleParsers=((_dynamicStyleParsers={})[ricosContent.RICOS_TEXT_COLOR_TYPE]=function(style,styleSelectionPredicate){var color=parseStyleByType(style,ricosContent.RICOS_TEXT_COLOR_TYPE);if(styleSelectionPredicate){var parsedStyle=color||style;return styleSelectionPredicate(parsedStyle)&&parsedStyle}return color||isHexColor(style)&&style},_dynamicStyleParsers[ricosContent.RICOS_TEXT_HIGHLIGHT_TYPE]=function(style,styleSelectionPredicate){var color=parseStyleByType(style,ricosContent.RICOS_TEXT_HIGHLIGHT_TYPE);return styleSelectionPredicate?styleSelectionPredicate(color)&&color:color},_dynamicStyleParsers[ricosContent.RICOS_FONT_SIZE_TYPE]=function(style){return parseStyleByType(style,ricosContent.RICOS_FONT_SIZE_TYPE)},_dynamicStyleParsers),defaultStyleFnMapper=((_defaultStyleFnMapper={})[ricosContent.RICOS_TEXT_COLOR_TYPE]=function(style){var parsedStyle=dynamicStyleParsers[ricosContent.RICOS_TEXT_COLOR_TYPE](style,isHexColor);return parsedStyle?{color:parsedStyle}:void 0},_defaultStyleFnMapper[ricosContent.RICOS_TEXT_HIGHLIGHT_TYPE]=function(style){var parsedStyle=dynamicStyleParsers[ricosContent.RICOS_TEXT_HIGHLIGHT_TYPE](style,isHexColor);return parsedStyle?{backgroundColor:parsedStyle}:void 0},_defaultStyleFnMapper[ricosContent.RICOS_FONT_SIZE_TYPE]=function(style){var parsedStyle=dynamicStyleParsers[ricosContent.RICOS_FONT_SIZE_TYPE](style);return parsedStyle?{fontSize:parsedStyle}:void 0},_defaultStyleFnMapper[ricosContent.RICOS_BOLD_TYPE]=function(style){return"NOT_BOLD"===style?{fontWeight:"normal"}:void 0},_defaultStyleFnMapper[ricosContent.RICOS_ITALIC_TYPE]=function(style){return"NOT_ITALIC"===style?{fontStyle:"normal"}:void 0},_defaultStyleFnMapper),defaultStyleSelectionPredicates=((_defaultStyleSelectio={})[ricosContent.RICOS_TEXT_COLOR_TYPE]=isHexColor,_defaultStyleSelectio[ricosContent.RICOS_TEXT_HIGHLIGHT_TYPE]=isHexColor,_defaultStyleSelectio);Object.defineProperty(exports,"Trans",{enumerable:!0,get:function(){return reactI18next.Trans}}),Object.defineProperty(exports,"translate",{enumerable:!0,get:function(){return reactI18next.translate}}),exports.ADD_PLUGIN_LINK_BI="addPluginLink",exports.ANCHOR_CATEGORY="section",exports.ANCHOR_VIEWER_DATA_HOOK="anchorViewer",exports.AccessibilityListener=AccessibilityListener,exports.CUSTOM_LINK="custom-link",exports.DRAFT_TO_RICOS_DOC_TYPE=DRAFT_TO_RICOS_DOC_TYPE,exports.DROPDOWN_OPTIONS_TO_DOC_STYLE_TYPE={P:"paragraph",H1:"headerOne",H2:"headerTwo",H3:"headerThree",H4:"headerFour",H5:"headerFive",H6:"headerSix"},exports.GlobalContext=GlobalContext,exports.INLINE_STYLE_TYPES=INLINE_STYLE_TYPES,exports.LINK_VIEWER_DATA_HOOK="linkViewer",exports.LinkData=LinkData,exports.Link_Rel=Link_Rel,exports.RicosTranslate=function(_ref3){var children=_ref3.children,locale=_ref3.locale,localeResource=_ref3.localeResource,i18nInstance=React.useRef(i18n({locale:locale,localeResource:localeResource})),_React$useState=React__default.default.useState(0),forceCounter=_React$useState[0],forceUpdate=_React$useState[1];return React.useEffect((function(){i18nInstance.current.addResourceBundle(locale,"translation",localeResource),i18nInstance.current.changeLanguage(locale,(function(err){err||forceUpdate(forceCounter+1)}))}),[locale,localeResource]),React__default.default.createElement(reactI18next.I18nextProvider,{i18n:i18nInstance.current},React__default.default.createElement(reactI18next.I18n,{i18n:i18nInstance.current,wait:!0,initialLanguage:locale},(function(t){return children(t)})))},exports.ViewportRenderer=ViewportRenderer,exports.WEB_ADDRESS_CATEGORY="web_address",exports.addAnchorTagToUrl=function(anchorString){var url=new URL(window.location.href);url.hash=anchorString,history.pushState({},"",url.href)},exports.alignmentClassName=function(componentData,theme,styles){var alignment=(componentData.config||{}).alignment;if(!alignment)return"";var key="align"+lodash.upperFirst(alignment);return classNames__default.default(styles[key],theme[key])},exports.anchorScroll=function(element,experiments){var _document$querySelect,_document$querySelect2,_document$querySelect3,_document$querySelect4,_experiments$anchorSc,fixedElementsOffset=((null===(_document$querySelect=document.querySelector('[id="SITE_HEADER"]'))||void 0===_document$querySelect?void 0:_document$querySelect.clientHeight)||0)+((null===(_document$querySelect2=document.querySelector('[id="WIX_ADS"]'))||void 0===_document$querySelect2?void 0:_document$querySelect2.clientHeight)||0)+((null===(_document$querySelect3=document.querySelector('[data-hook="mobileToolbar"]'))||void 0===_document$querySelect3?void 0:_document$querySelect3.clientHeight)||(null===(_document$querySelect4=document.querySelector('[data-hook="ricos-editor-toolbars"]'))||void 0===_document$querySelect4?void 0:_document$querySelect4.clientHeight)||0);null!=experiments&&null!==(_experiments$anchorSc=experiments.anchorScrollWithSmoothScrollIntoViewIfNeeded)&&void 0!==_experiments$anchorSc&&_experiments$anchorSc.enabled?anchorScrollUsingSmoothScrollIntoViewIfNeeded(element,fixedElementsOffset):anchorScrollUsingScrollIntoView(element,fixedElementsOffset)},exports.convertRelObjectToString=function(relObject){if(relObject){var relString="";return relObject.nofollow&&(relString+="nofollow "),relObject.sponsored&&(relString+="sponsored "),relObject.ugc&&(relString+="ugc"),relString.trim()}},exports.convertRelStringToObject=function(rel){var relObject={};return rel?(rel.includes("nofollow")&&(relObject.nofollow=!0),rel.includes("sponsored")&&(relObject.sponsored=!0),rel.includes("ugc")&&(relObject.ugc=!0),relObject):relObject},exports.convertTargetBooleanToString=function(targetBlank){return targetBlank?"_blank":"_top"},exports.convertTargetStringToBoolean=function(target){return"_blank"===target},exports.createHocName=createHocName,exports.createJustificationFixDecorator=function(){var isTextJustified=function(contentBlock){return"justify"===function(contentBlock){var _contentBlock$data;return isInEditor(contentBlock)?contentBlock.getData().get("textAlignment"):null==contentBlock||null===(_contentBlock$data=contentBlock.data)||void 0===_contentBlock$data?void 0:_contentBlock$data.textAlignment}(contentBlock)};return{strategy:function(contentBlock,callback,contentState){if(!isSSR()&&(isSSR()||!window.chrome)&&isTextJustified(contentBlock))for(var match,regex=/\s[^\s]/g,str=contentBlock.getText();null!==(match=regex.exec(str));)isInLink(match.index,contentBlock,contentState)||callback(match.index,match.index+1)},component:function(props){return React__default.default.createElement("span",{style:{whiteSpace:"normal"}},props.children)}}},exports.defaultStyleFnMapper=defaultStyleFnMapper,exports.depthClassName=function(depth){return"public-DraftStyleDefault-block-depth"+depth},exports.draftDecorationsToCss={BOLD:{"font-weight":"bold"},ITALIC:{"font-style":"italic"},NOT_BOLD:{"font-weight":"normal"},NOT_ITALIC:{"font-style":"normal"}},exports.dynamicStyleParsers=dynamicStyleParsers,exports.generateKey=function(){return Math.random().toString(36).substr(2,9)},exports.getBlocksFromContentState=getBlocksFromContentState,exports.getContentStateSchema=function(pluginDataSchemas){void 0===pluginDataSchemas&&(pluginDataSchemas={});var schema=contentStateSchema;return schema.definitions.entityDef.anyOf=Object.keys(pluginDataSchemas).map((function(pluginType){return{properties:{type:{const:pluginType},data:pluginDataSchemas[pluginType]}}})),schema},exports.getDirectionFromAlignmentAndTextDirection=function(textAlignment,textDirection){return"right"===textAlignment?"rtl":"left"===textAlignment?"ltr":textDirection&&"rtl"===textDirection?textDirection:"ltr"},exports.getDisplayName=getDisplayName,exports.getDynamicInlineStyleMapper=function(type){return function(config,raw){var settings=config[RICOS_TO_DRAFT_TYPE[type]||""]||{},styleParser=dynamicStyleParsers[type],styleSelectionPredicate=settings.styleSelectionPredicate?function(style){return!!styleParser(style,settings.styleSelectionPredicate)}:function(style){return!!styleParser(style,defaultStyleSelectionPredicates[type])},customStyleFn=settings.customStyleFn?function(style){return settings.customStyleFn(styleParser(style,settings.styleSelectionPredicate))}:defaultStyleFnMapper[type],mapper=getBlocksFromContentState(raw).reduce((function(map,block){return block.inlineStyleRanges&&block.inlineStyleRanges.filter((function(range){return styleSelectionPredicate(range.style)})).forEach((function(range){map[range.style]=function(children,_ref){var key=_ref.key;return React__default.default.createElement("span",{key:key,style:customStyleFn(range.style)},children)}})),map}),{});return function(){return mapper}}},exports.getLangDir=function(locale){return isRtl(locale)?"rtl":"ltr"},exports.getLinkRangesInBlock=getLinkRangesInBlock,exports.getRelValue=function(rel){return("noopener noreferrer "+(rel||"")).trim()},exports.getTextDirection=function(text){var result="neutral";if(!text)return result;var plainText=text.replace(emojiRegex,"");return isRtlRegex.test(plainText)?result="rtl":isLtrRegex.test(plainText)&&(result="ltr"),result},exports.hasLinksInBlock=function(block,contentState){return getLinkRangesInBlock(block,contentState).length>0},exports.isHexColor=isHexColor,exports.isNewTab=function(target){return"_blank"===target},exports.isRtl=isRtl,exports.isSSR=isSSR,exports.mergeStyles=mergeStyles,exports.parseStyleByType=parseStyleByType,exports.safeJsonParse=safeJsonParse,exports.simplePubsub=function(initialState){var state=initialState||{},listeners={},subscribe=function(key,callback){if("function"!=typeof callback)throw"Callback for key "+key+" is not a function";return listeners[key]=listeners[key]||[],listeners[key].push(callback),function(){listeners[key]=listeners[key].filter((function(listener){return listener!==callback}))}},update=function(key,newData,blockKey){var data=get(key),newItem=lodash.merge({},data,newData);blockKey?_setSingle(key,newItem,blockKey):set(key,newItem)},_setSingle=function(key,item,blockKey){var _extends2;state=_extends__default.default({},state,((_extends2={})[key]=item,_extends2)),listeners[key]&&listeners[key].forEach((function(listener){return listener(state[key],blockKey)}))},_setBatch=function(updates){state=_extends__default.default({},state,updates),Object.keys(updates).forEach((function(key){listeners[key]&&listeners[key].forEach((function(listener){return listener(state[key])}))}))},set=function(){1===arguments.length?_setBatch(arguments.length<=0?void 0:arguments[0]):_setSingle.apply(void 0,arguments)},setBlockHandler=function(key,blockKey,item){_setSingle(blockHandlerKey(key,blockKey),item)},get=function(key){return state[key]},getBlockHandler=function(key,blockKey){return void 0===blockKey&&(blockKey=state.focusedBlock),state[blockHandlerKey(key,blockKey)]},blockHandlerKey=function(key,blockKey){return blockKey+"_"+key};return{subscribe:subscribe,unsubscribe:function(key,callback){listeners[key]=listeners[key].filter((function(listener){return listener!==callback}))},update:update,set:set,setBlockHandler:setBlockHandler,get:get,getBlockHandler:getBlockHandler,store:{get:get,getBlockHandler:getBlockHandler,update:update,set:set,setBlockHandler:setBlockHandler},getBlockData:function(_ref3){var key=_ref3.key,_ref3$blockKey=_ref3.blockKey,blockKey=void 0===_ref3$blockKey?state.focusedBlock:_ref3$blockKey;return state[blockHandlerKey(key,blockKey)]},setBlockData:function(_ref2){var key=_ref2.key,_ref2$blockKey=_ref2.blockKey,blockKey=void 0===_ref2$blockKey?state.focusedBlock:_ref2$blockKey,item=_ref2.item;_setSingle(blockHandlerKey(key,blockKey),item)},subscribeOnBlock:function(_ref){var key=_ref.key,_ref$blockKey=_ref.blockKey,blockKey=void 0===_ref$blockKey?state.focusedBlock:_ref$blockKey,callback=_ref.callback;return subscribe(blockHandlerKey(key,blockKey),callback)}}},exports.sizeClassName=function(componentData,theme,styles){var size=(componentData.config||{}).size;if(!size)return"";var key="size"+lodash.upperFirst(lodash.camelCase(size));return classNames__default.default(styles[key],theme[key])},exports.textWrapClassName=function(componentData,theme,styles){var textWrap=(componentData.config||{}).textWrap;if(!textWrap)return"";var key="textWrap"+lodash.upperFirst(lodash.camelCase(textWrap));return classNames__default.default(styles[key],theme[key])},exports.uuid=function(){var d=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(c){var r=(d+16*Math.random())%16|0;return d=Math.floor(d/16),("x"===c?r:3&r|8).toString(16)}))},exports.validate=function(data,schema){return!0},exports.withI18n=function(Component,defaultLocaleResource,_temp){var _ref$forceRemount=(void 0===_temp?{}:_temp).forceRemount,forceRemount=void 0===_ref$forceRemount||_ref$forceRemount,Translated=reactI18next.translate(void 0,{withRef:!0})(Component),I18nWrapper=function(_PureComponent){function I18nWrapper(props){var _this;_this=_PureComponent.call(this,props)||this;var locale=props.locale,localeResource=props.localeResource;return _this.i18n=i18n({locale:locale,localeResource:localeResource}),_this.state={key:I18nWrapper.displayName+"-"+locale},_this}_inheritsLoose__default.default(I18nWrapper,_PureComponent);var _proto=I18nWrapper.prototype;return _proto.componentDidMount=function(){var _componentDidMount=_asyncToGenerator__default.default(_regeneratorRuntime__default.default.mark((function _callee(){var _yield$this$getResour,locale,localeResource;return _regeneratorRuntime__default.default.wrap((function(_context){for(;;)switch(_context.prev=_context.next){case 0:if("en"===this.props.locale){_context.next=7;break}return _context.next=3,this.getResourceByLocale(this.props.locale);case 3:_yield$this$getResour=_context.sent,locale=_yield$this$getResour.locale,localeResource=_yield$this$getResour.localeResource,this.changeLocale({locale:locale,localeResource:localeResource});case 7:case"end":return _context.stop()}}),_callee,this)})));return function(){return _componentDidMount.apply(this,arguments)}}(),_proto.componentWillReceiveProps=function(nextProps){this.props.locale!==nextProps.locale&&this.changeLocale(nextProps)},_proto.getResourceByLocale=function(){var _getResourceByLocale=_asyncToGenerator__default.default(_regeneratorRuntime__default.default.mark((function _callee2(locale){var localeResource;return _regeneratorRuntime__default.default.wrap((function(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:return _context2.prev=0,_context2.next=3,function(t){return Promise.resolve().then((function(){return _interopNamespace(require(t))}))}(
/* webpackChunkName: "messages_[request]" */
"wix-rich-content-common/dist/statics/locale/messages_"+locale+".json").then((function(res){return res.default}));case 3:return localeResource=_context2.sent,_context2.abrupt("return",{locale:locale,localeResource:localeResource});case 7:throw _context2.prev=7,_context2.t0=_context2.catch(0),new Error("error while loading locale "+locale+":\n"+_context2.t0);case 10:case"end":return _context2.stop()}}),_callee2,null,[[0,7]])})));return function(_x){return _getResourceByLocale.apply(this,arguments)}}(),_proto.changeLocale=function(_ref2){var _this2=this,locale=_ref2.locale,localeResource=_ref2.localeResource;this.i18n.addResourceBundle(locale,"translation",localeResource),this.i18n.changeLanguage(locale,(function(err){err||(forceRemount?_this2.setState({key:I18nWrapper.displayName+"-"+_this2.i18n.language}):_this2.forceUpdate())}))},_proto.render=function(){var _this$props=this.props,forwardedRef=_this$props.forwardedRef,rest=_objectWithoutPropertiesLoose__default.default(_this$props,_excluded);return React__default.default.createElement(reactI18next.I18nextProvider,{i18n:this.i18n},React__default.default.createElement(Translated,Object.assign({key:this.state.key},rest,{ref:forwardedRef})))},I18nWrapper}(React.PureComponent);return I18nWrapper.defaultProps={locale:"en",localeResource:defaultLocaleResource},I18nWrapper.displayName=createHocName("I18nWrapper",Component),React__default.default.forwardRef((function(props,ref){return React__default.default.createElement(I18nWrapper,Object.assign({},props,{forwardedRef:ref}))}))},Object.keys(ricosContent).forEach((function(k){"default"===k||exports.hasOwnProperty(k)||Object.defineProperty(exports,k,{enumerable:!0,get:function(){return ricosContent[k]}})}));
//# sourceMappingURL=module.cjs.js.map

@@ -1,2 +0,4 @@

import _inheritsLoose from"@babel/runtime/helpers/inheritsLoose";import React from"react";import{debounce}from"lodash";var styles_toolbar="_2M9cT",styles_button="_1lTtq",getSelectionRects=function(selection){var range=selection.getRangeAt(0),innerRects=function(range){for(var _iterator=document.createNodeIterator(range.commonAncestorContainer,NodeFilter.SHOW_ALL),innerSelectionNodes=[];_iterator.nextNode()&&_iterator.referenceNode!==range.startContainer;);for(;_iterator.nextNode()&&_iterator.referenceNode!==range.endContainer;)_iterator.referenceNode.nodeType===Node.TEXT_NODE&&innerSelectionNodes.push(_iterator.referenceNode);return innerSelectionNodes}(range).map((function(n){var r=document.createRange();return r.selectNodeContents(n),r.getBoundingClientRect()})),clientRects=range.getClientRects();return[clientRects[0]].concat(innerRects,[clientRects[clientRects.length-1]])};function addTextSelectionListener(container,callback){var handleSelection=function(){var selectedText,position,selection=document.getSelection(),selectionAnchor=null==selection?void 0:selection.anchorNode,selectionFocus=null==selection?void 0:selection.focusNode;selection&&selection.rangeCount>0&&!selection.isCollapsed&&container.contains(selectionAnchor)&&container.contains(selectionFocus)&&(selectedText=function(selection){return selection.toString().replace(/(\r\n|\r|\n){2,}/g," ")}(selection),position=function(selection){var rects=getSelectionRects(selection),left=999999,right=0;rects.forEach((function(rect){left=Math.min(left,rect.left),right=Math.max(right,rect.right)}));var y=rects[0].top+window.scrollY;return{x:(left+right)/2+window.scrollX,y:y}}(selection)),callback(selectedText,position)};return document.addEventListener("selectionchange",handleSelection),function(){return document.removeEventListener("selectionchange",handleSelection)}}var TextSelectionToolbar=function(_React$Component){function TextSelectionToolbar(props){var _this;return(_this=_React$Component.call(this,props)||this).addTextSelectionListener=function(container){container&&!_this.removeTextSelectionListener&&(_this.removeTextSelectionListener=addTextSelectionListener(container,_this.setSelectedText))},_this.setSelectedText=debounce((function(selectedText,selectedTextPosition){return _this.setState({selectedText:selectedText,selectedTextPosition:selectedTextPosition})}),50),_this.state={selectedText:""},_this}_inheritsLoose(TextSelectionToolbar,_React$Component);var _proto=TextSelectionToolbar.prototype;return _proto.componentDidMount=function(){this.addTextSelectionListener(this.props.container)},_proto.componentWillUnmount=function(){this.removeTextSelectionListener()},_proto.componentWillReceiveProps=function(nextPros){this.addTextSelectionListener(nextPros.container)},_proto.render=function(){var _this$state=this.state,selectedText=_this$state.selectedText,selectedTextPosition=_this$state.selectedTextPosition,_this$props=this.props,container=_this$props.container,children=_this$props.children;if(!selectedText||!selectedTextPosition)return null;var left=container.getBoundingClientRect().left,containerOffset=this.props.container.getBoundingClientRect().top,style={top:selectedTextPosition.y-containerOffset-5-window.scrollY,left:selectedTextPosition.x-left};return React.createElement("div",{className:styles_toolbar,style:style},children(selectedText))},TextSelectionToolbar}(React.Component),twitter=function(props){return React.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},props),React.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M17.653 4.268c.854-.52 1.493-1.336 1.8-2.297-.804.483-1.683.825-2.6 1.01-1.153-1.245-2.939-1.65-4.506-1.023-1.566.627-2.597 2.16-2.6 3.867.001.318.037.636.106.946-3.298-.168-6.37-1.748-8.453-4.346-.37.633-.563 1.355-.56 2.09-.117 1.34.452 2.647 1.507 3.463C1.608 7.87.88 7.696.173 7.458v.052c.142 2.038 1.63 3.717 3.614 4.077-.298.098-.608.147-.92.146-.233.001-.466-.024-.694-.074.55 1.699 2.103 2.858 3.867 2.888-1.446 1.158-3.237 1.786-5.08 1.78-.32 0-.641-.02-.96-.058 3.593 2.332 8.156 2.492 11.9.417 3.744-2.076 6.073-6.056 6.073-10.381 0-.18-.013-.36-.013-.54.801-.588 1.492-1.316 2.04-2.15-.745.336-1.536.556-2.347.653z"}))};var TwitterButton=function(_ref){var selectedText=_ref.selectedText,onClick=_ref.onClick,handleOnClick=function(selectedText){null==onClick||onClick(selectedText),function(selectedText){var text="“"+selectedText+"“—",url=window.location.href;text.length+url.length>279&&(text=function(text,maxTextLength){var content=text.substring(0,maxTextLength-2);return(content=content.slice(0,content.lastIndexOf(" ")))+"…“—"}(text,279-url.length));var TWEET_ON_TWITTER_URL="https://twitter.com/intent/tweet?text="+encodeURI(text)+"&url="+encodeURI(url);window.open(TWEET_ON_TWITTER_URL)}(selectedText)};return React.createElement("button",{"data-hook":"twitter-button",className:styles_button,onClick:function(){return handleOnClick(selectedText)}},React.createElement(twitter,null))};export{TextSelectionToolbar,TwitterButton};
import{HEADER_BLOCK,RICOS_TEXT_COLOR_TYPE,RICOS_TEXT_HIGHLIGHT_TYPE,RICOS_FONT_SIZE_TYPE,TEXT_COLOR_TYPE,TEXT_HIGHLIGHT_TYPE,RICOS_BOLD_TYPE,RICOS_ITALIC_TYPE}from"ricos-content";export*from"ricos-content";import _inheritsLoose from"@babel/runtime/helpers/inheritsLoose";import React,{Component,PureComponent,useRef,useEffect}from"react";import{InView}from"react-intersection-observer";import classNames from"classnames";import _extends from"@babel/runtime/helpers/extends";import{pickBy,has,mergeWith,upperFirst,camelCase,merge}from"lodash";import _objectWithoutPropertiesLoose from"@babel/runtime/helpers/objectWithoutPropertiesLoose";import _asyncToGenerator from"@babel/runtime/helpers/asyncToGenerator";import _regeneratorRuntime from"@babel/runtime/regenerator";import{translate,I18nextProvider,I18n}from"react-i18next";export{Trans,translate}from"react-i18next";import{createInstance}from"i18next";var __assign$r=function(){return(__assign$r=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t}).apply(this,arguments)};var _DRAFT_TO_RICOS_DOC_T,ButtonType,ModifierKey,ToolbarType,DisplayMode,DecorationMode,baseLink={target:"SELF"},Link_fromJSON=function(object){var message=__assign$r({},baseLink);return void 0!==object.url&&null!==object.url?message.url=String(object.url):message.url=void 0,void 0!==object.anchor&&null!==object.anchor?message.anchor=String(object.anchor):message.anchor=void 0,void 0!==object.target&&null!==object.target?message.target=function(object){switch(object){case 0:case"SELF":return"SELF";case 1:case"BLANK":return"BLANK";case 2:case"PARENT":return"PARENT";case 3:case"TOP":return"TOP";case-1:case"UNRECOGNIZED":default:return"UNRECOGNIZED"}}(object.target):message.target="SELF",void 0!==object.rel&&null!==object.rel?message.rel=Link_Rel.fromJSON(object.rel):message.rel=void 0,void 0!==object.customData&&null!==object.customData?message.customData=String(object.customData):message.customData=void 0,message},Link_toJSON=function(message){var obj={};return void 0!==message.url&&(obj.url=message.url),void 0!==message.anchor&&(obj.anchor=message.anchor),void 0!==message.target&&(obj.target=function(object){switch(object){case"SELF":return"SELF";case"BLANK":return"BLANK";case"PARENT":return"PARENT";case"TOP":return"TOP";default:return"UNKNOWN"}}(message.target)),void 0!==message.rel&&(obj.rel=message.rel?Link_Rel.toJSON(message.rel):void 0),void 0!==message.customData&&(obj.customData=message.customData),obj},baseLink_Rel={},Link_Rel={fromJSON:function(object){var message=__assign$r({},baseLink_Rel);return void 0!==object.nofollow&&null!==object.nofollow?message.nofollow=Boolean(object.nofollow):message.nofollow=void 0,void 0!==object.sponsored&&null!==object.sponsored?message.sponsored=Boolean(object.sponsored):message.sponsored=void 0,void 0!==object.ugc&&null!==object.ugc?message.ugc=Boolean(object.ugc):message.ugc=void 0,message},toJSON:function(message){var obj={};return void 0!==message.nofollow&&(obj.nofollow=message.nofollow),void 0!==message.sponsored&&(obj.sponsored=message.sponsored),void 0!==message.ugc&&(obj.ugc=message.ugc),obj}},__assign$n=function(){return(__assign$n=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t}).apply(this,arguments)},baseLinkData={},LinkData={fromJSON:function(object){var message=__assign$n({},baseLinkData);return void 0!==object.link&&null!==object.link?message.link=Link_fromJSON(object.link):message.link=void 0,message},toJSON:function(message){var obj={};return void 0!==message.link&&(obj.link=message.link?Link_toJSON(message.link):void 0),obj}},DROPDOWN_OPTIONS_TO_DOC_STYLE_TYPE={P:"paragraph",H1:"headerOne",H2:"headerTwo",H3:"headerThree",H4:"headerFour",H5:"headerFive",H6:"headerSix"},DRAFT_TO_RICOS_DOC_TYPE=((_DRAFT_TO_RICOS_DOC_T={})[HEADER_BLOCK.ONE]="headerOne",_DRAFT_TO_RICOS_DOC_T[HEADER_BLOCK.TWO]="headerTwo",_DRAFT_TO_RICOS_DOC_T[HEADER_BLOCK.THREE]="headerThree",_DRAFT_TO_RICOS_DOC_T[HEADER_BLOCK.FOUR]="headerFour",_DRAFT_TO_RICOS_DOC_T[HEADER_BLOCK.FIVE]="headerFive",_DRAFT_TO_RICOS_DOC_T[HEADER_BLOCK.SIX]="headerSix",_DRAFT_TO_RICOS_DOC_T[HEADER_BLOCK.PARAGRAPH]="paragraph",_DRAFT_TO_RICOS_DOC_T);!function(ButtonType){ButtonType.CUSTOM="custom",ButtonType.FILES="file",ButtonType.TOGGLE="toggle",ButtonType.PANEL="panel",ButtonType.INLINE_PANEL="inline-panel",ButtonType.EXTERNAL_MODAL="external-modal",ButtonType.DROPDOWN="dropdown",ButtonType.SEPARATOR="separator",ButtonType.SIZE_ORIGINAL="size-original",ButtonType.SIZE_CONTENT_CENTER="size-content-center",ButtonType.SIZE_SMALL_CENTER="size-small-center",ButtonType.SIZE_SMALL_LEFT="size-small-left",ButtonType.SIZE_SMALL_RIGHT="size-small-right",ButtonType.ALIGN_LEFT="align-left",ButtonType.ALIGN_RIGHT="align-right",ButtonType.ALIGN_CENTER="align-center",ButtonType.SIZE_CONTENT="size-content",ButtonType.SIZE_FULL_WIDTH="size-full-width",ButtonType.SIZE_SMALL="size-small",ButtonType.SIZE_MEDIUM="size-medium",ButtonType.SIZE_LARGE="size-large",ButtonType.TEXT_ALIGN_LEFT="alignment-left",ButtonType.TEXT_ALIGN_CENTER="alignment-center",ButtonType.TEXT_ALIGN_RIGHT="alignment-right",ButtonType.WIDTH="width",ButtonType.HEIGHT="height",ButtonType.LINK="link",ButtonType.SPOILER="spoiler",ButtonType.DELETE="delete",ButtonType.LINK_PREVIEW="link-preview",ButtonType.VIDEO_SETTINGS="video-settings"}(ButtonType||(ButtonType={})),function(ModifierKey){ModifierKey.COMMAND="command",ModifierKey.CTRL="ctrl",ModifierKey.OPTION="option",ModifierKey.SHIFT="shift",ModifierKey.ALT="alt"}(ModifierKey||(ModifierKey={})),function(ToolbarType){ToolbarType.SIDE="SIDE",ToolbarType.MOBILE="MOBILE",ToolbarType.FOOTER="FOOTER",ToolbarType.STATIC="STATIC",ToolbarType.INLINE="INLINE",ToolbarType.PLUGIN="PLUGIN",ToolbarType.FORMATTING="FORMATTING",ToolbarType.INSERT_PLUGIN="INSERT_PLUGIN",ToolbarType.TEXT="ALL-TEXT-TOOLBARS",ToolbarType.SHORTCUT="SHORTCUT",ToolbarType.LINK="LINK"}(ToolbarType||(ToolbarType={})),function(DisplayMode){DisplayMode.NORMAL="NORMAL",DisplayMode.FLOATING="FLOATING"}(DisplayMode||(DisplayMode={})),function(DecorationMode){DecorationMode.PREPEND="PREPEND",DecorationMode.WRAP="WRAP",DecorationMode.APPEND="APPEND"}(DecorationMode||(DecorationMode={}));var CUSTOM_LINK="custom-link",noOutlineStyle_noOutline="_1-vl0",AccessibilityListener=function(_Component){function AccessibilityListener(){var _this;return(_this=_Component.apply(this,arguments)||this).handleTabKeyUp=function(e){9===e.which&&document.body.classList.contains(noOutlineStyle_noOutline)&&document.body.classList.remove(noOutlineStyle_noOutline)},_this.handleClick=function(){document.body.classList.contains(noOutlineStyle_noOutline)||document.body.classList.add(noOutlineStyle_noOutline)},_this.render=function(){return null},_this}_inheritsLoose(AccessibilityListener,_Component);var _proto=AccessibilityListener.prototype;return _proto.componentDidMount=function(){document.body.classList.add(noOutlineStyle_noOutline),this.props.isMobile||(document.addEventListener("keyup",this.handleTabKeyUp),document.addEventListener("click",this.handleClick))},_proto.componentWillUnmount=function(){this.props.isMobile||(document.removeEventListener("keyup",this.handleTabKeyUp),document.removeEventListener("click",this.handleClick))},AccessibilityListener}(Component),cssClassMerger=function(defaultStyleClassName,themeClassName){return defaultStyleClassName+" "+themeClassName},mergeStyles=function(_ref){var styles=_ref.styles,theme=_ref.theme;if(!theme)return console.warn("mergeStyles invoked without theme!"),styles;var themeStyles=pickBy(theme),themeStylesToMerge=pickBy(themeStyles,(function(_,key){return has(styles,key)}));return mergeWith(_extends({},styles),themeStylesToMerge,cssClassMerger)},isSSR=function(){return"undefined"==typeof window},styles={placeholder:"_2bUeE"},ViewportRenderer=function(_Component){function ViewportRenderer(){return _Component.apply(this,arguments)||this}return _inheritsLoose(ViewportRenderer,_Component),ViewportRenderer.prototype.render=function(){var _this=this,_this$props=this.props,children=_this$props.children,placeholderStyle=_this$props.placeholderStyle,placeholderClass=_this$props.placeholderClass,containerStyle=_this$props.containerStyle,containerClass=_this$props.containerClass,theme=this.props.theme;return this.styles=this.styles||mergeStyles({styles:styles,theme:theme}),isSSR()||void 0===window.IntersectionObserver?children:React.createElement(InView,{triggerOnce:!0},(function(_ref){var inView=_ref.inView,ref=_ref.ref;return inView?React.createElement("div",{ref:ref,style:containerStyle,className:containerClass},children):React.createElement("div",{ref:ref,className:classNames(_this.styles.placeholder,placeholderClass),style:placeholderStyle})}))},ViewportRenderer}(Component);function i18n(_ref){var _resources,locale=_ref.locale,localeResource=_ref.localeResource;return createInstance().init({lng:locale,keySeparator:"$",interpolation:{escapeValue:!1},react:{wait:!0},resources:(_resources={},_resources[locale]={translation:localeResource},_resources)})}function getDisplayName(Component){return Component.displayName||Component.name||"Component"}function createHocName(hocComponentName,WrappedComponent){return hocComponentName+"("+getDisplayName(WrappedComponent)+")"}ViewportRenderer.defaultProps={placeholderStyle:{},containerStyle:{},alwaysRenderChildren:!1,placeholderClass:"",containerClass:""};var memoizedNow,_excluded=["forwardedRef"],withI18n=function(Component,defaultLocaleResource,_temp){var _ref$forceRemount=(void 0===_temp?{}:_temp).forceRemount,forceRemount=void 0===_ref$forceRemount||_ref$forceRemount,Translated=translate(void 0,{withRef:!0})(Component),I18nWrapper=function(_PureComponent){function I18nWrapper(props){var _this;_this=_PureComponent.call(this,props)||this;var locale=props.locale,localeResource=props.localeResource;return _this.i18n=i18n({locale:locale,localeResource:localeResource}),_this.state={key:I18nWrapper.displayName+"-"+locale},_this}_inheritsLoose(I18nWrapper,_PureComponent);var _proto=I18nWrapper.prototype;return _proto.componentDidMount=function(){var _componentDidMount=_asyncToGenerator(_regeneratorRuntime.mark((function _callee(){var _yield$this$getResour,locale,localeResource;return _regeneratorRuntime.wrap((function(_context){for(;;)switch(_context.prev=_context.next){case 0:if("en"===this.props.locale){_context.next=7;break}return _context.next=3,this.getResourceByLocale(this.props.locale);case 3:_yield$this$getResour=_context.sent,locale=_yield$this$getResour.locale,localeResource=_yield$this$getResour.localeResource,this.changeLocale({locale:locale,localeResource:localeResource});case 7:case"end":return _context.stop()}}),_callee,this)})));return function(){return _componentDidMount.apply(this,arguments)}}(),_proto.componentWillReceiveProps=function(nextProps){this.props.locale!==nextProps.locale&&this.changeLocale(nextProps)},_proto.getResourceByLocale=function(){var _getResourceByLocale=_asyncToGenerator(_regeneratorRuntime.mark((function _callee2(locale){var localeResource;return _regeneratorRuntime.wrap((function(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:return _context2.prev=0,_context2.next=3,import(
/* webpackChunkName: "messages_[request]" */
"wix-rich-content-common/dist/statics/locale/messages_"+locale+".json").then((function(res){return res.default}));case 3:return localeResource=_context2.sent,_context2.abrupt("return",{locale:locale,localeResource:localeResource});case 7:throw _context2.prev=7,_context2.t0=_context2.catch(0),new Error("error while loading locale "+locale+":\n"+_context2.t0);case 10:case"end":return _context2.stop()}}),_callee2,null,[[0,7]])})));return function(_x){return _getResourceByLocale.apply(this,arguments)}}(),_proto.changeLocale=function(_ref2){var _this2=this,locale=_ref2.locale,localeResource=_ref2.localeResource;this.i18n.addResourceBundle(locale,"translation",localeResource),this.i18n.changeLanguage(locale,(function(err){err||(forceRemount?_this2.setState({key:I18nWrapper.displayName+"-"+_this2.i18n.language}):_this2.forceUpdate())}))},_proto.render=function(){var _this$props=this.props,forwardedRef=_this$props.forwardedRef,rest=_objectWithoutPropertiesLoose(_this$props,_excluded);return React.createElement(I18nextProvider,{i18n:this.i18n},React.createElement(Translated,Object.assign({key:this.state.key},rest,{ref:forwardedRef})))},I18nWrapper}(PureComponent);return I18nWrapper.defaultProps={locale:"en",localeResource:defaultLocaleResource},I18nWrapper.displayName=createHocName("I18nWrapper",Component),React.forwardRef((function(props,ref){return React.createElement(I18nWrapper,Object.assign({},props,{forwardedRef:ref}))}))},RicosTranslate=function(_ref3){var children=_ref3.children,locale=_ref3.locale,localeResource=_ref3.localeResource,i18nInstance=useRef(i18n({locale:locale,localeResource:localeResource})),_React$useState=React.useState(0),forceCounter=_React$useState[0],forceUpdate=_React$useState[1];return useEffect((function(){i18nInstance.current.addResourceBundle(locale,"translation",localeResource),i18nInstance.current.changeLanguage(locale,(function(err){err||forceUpdate(forceCounter+1)}))}),[locale,localeResource]),React.createElement(I18nextProvider,{i18n:i18nInstance.current},React.createElement(I18n,{i18n:i18nInstance.current,wait:!0,initialLanguage:locale},(function(t){return children(t)})))},alignmentClassName=function(componentData,theme,styles){var alignment=(componentData.config||{}).alignment;if(!alignment)return"";var key="align"+upperFirst(alignment);return classNames(styles[key],theme[key])},sizeClassName=function(componentData,theme,styles){var size=(componentData.config||{}).size;if(!size)return"";var key="size"+upperFirst(camelCase(size));return classNames(styles[key],theme[key])},textWrapClassName=function(componentData,theme,styles){var textWrap=(componentData.config||{}).textWrap;if(!textWrap)return"";var key="textWrap"+upperFirst(camelCase(textWrap));return classNames(styles[key],theme[key])},depthClassName=function(depth){return"public-DraftStyleDefault-block-depth"+depth},convertRelObjectToString=function(relObject){if(relObject){var relString="";return relObject.nofollow&&(relString+="nofollow "),relObject.sponsored&&(relString+="sponsored "),relObject.ugc&&(relString+="ugc"),relString.trim()}},convertRelStringToObject=function(rel){var relObject={};return rel?(rel.includes("nofollow")&&(relObject.nofollow=!0),rel.includes("sponsored")&&(relObject.sponsored=!0),rel.includes("ugc")&&(relObject.ugc=!0),relObject):relObject},convertTargetStringToBoolean=function(target){return"_blank"===target},convertTargetBooleanToString=function(targetBlank){return targetBlank?"_blank":"_top"},getRelValue=function(rel){return("noopener noreferrer "+(rel||"")).trim()},safeJsonParse=function(jsonString){try{return JSON.parse(jsonString)}catch(e){return}};function t(t){return"object"==typeof t&&null!=t&&1===t.nodeType}function e(t,e){return(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function n(t,n){if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){var r=getComputedStyle(t,null);return e(r.overflowY,n)||e(r.overflowX,n)||function(t){var e=function(t){if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}}(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)}(t)}return!1}function r(t,e,n,r,i,o,l,d){return o<t&&l>e||o>t&&l<e?0:o<=t&&d<=n||l>=e&&d>=n?o-t-r:l>e&&d<n||o<t&&d>n?l-e+i:0}function compute(e,i){var o=window,l=i.scrollMode,d=i.block,u=i.inline,h=i.boundary,a=i.skipOverflowHiddenElements,c="function"==typeof h?h:function(t){return t!==h};if(!t(e))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,s=[],p=e;t(p)&&c(p);){if((p=p.parentElement)===f){s.push(p);break}null!=p&&p===document.body&&n(p)&&!n(document.documentElement)||null!=p&&n(p,a)&&s.push(p)}for(var m=o.visualViewport?o.visualViewport.width:innerWidth,g=o.visualViewport?o.visualViewport.height:innerHeight,w=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,W=e.getBoundingClientRect(),b=W.height,H=W.width,y=W.top,E=W.right,M=W.bottom,V=W.left,x="start"===d||"nearest"===d?y:"end"===d?M:y+b/2,I="center"===u?V+H/2:"end"===u?E:V,C=[],T=0;T<s.length;T++){var k=s[T],B=k.getBoundingClientRect(),D=B.height,O=B.width,R=B.top,X=B.right,Y=B.bottom,L=B.left;if("if-needed"===l&&y>=0&&V>=0&&M<=g&&E<=m&&y>=R&&M<=Y&&V>=L&&E<=X)return C;var S=getComputedStyle(k),j=parseInt(S.borderLeftWidth,10),q=parseInt(S.borderTopWidth,10),z=parseInt(S.borderRightWidth,10),A=parseInt(S.borderBottomWidth,10),F=0,G=0,J="offsetWidth"in k?k.offsetWidth-k.clientWidth-j-z:0,K="offsetHeight"in k?k.offsetHeight-k.clientHeight-q-A:0;if(f===k)F="start"===d?x:"end"===d?x-g:"nearest"===d?r(v,v+g,g,q,A,v+x,v+x+b,b):x-g/2,G="start"===u?I:"center"===u?I-m/2:"end"===u?I-m:r(w,w+m,m,j,z,w+I,w+I+H,H),F=Math.max(0,F+v),G=Math.max(0,G+w);else{F="start"===d?x-R-q:"end"===d?x-Y+A+K:"nearest"===d?r(R,Y,D,q,A+K,x,x+b,b):x-(R+D/2)+K/2,G="start"===u?I-L-j:"center"===u?I-(L+O/2)+J/2:"end"===u?I-X+z+J:r(L,X,O,j,z+J,I,I+H,H);var N=k.scrollLeft,P=k.scrollTop;x+=P-(F=Math.max(0,Math.min(P+F,k.scrollHeight-D+K))),I+=N-(G=Math.max(0,Math.min(N+G,k.scrollWidth-O+J)))}C.push({el:k,top:F,left:G})}return C}function isOptionsObject(options){return options===Object(options)&&0!==Object.keys(options).length}function scrollIntoView$1(target,options){var targetIsDetached=!target.ownerDocument.documentElement.contains(target);if(isOptionsObject(options)&&"function"==typeof options.behavior)return options.behavior(targetIsDetached?[]:compute(target,options));if(!targetIsDetached){var computeOptions=function(options){return!1===options?{block:"end",inline:"nearest"}:isOptionsObject(options)?options:{block:"start",inline:"nearest"}}(options);return function(actions,behavior){void 0===behavior&&(behavior="auto");var canSmoothScroll="scrollBehavior"in document.body.style;actions.forEach((function(_ref){var el=_ref.el,top=_ref.top,left=_ref.left;el.scroll&&canSmoothScroll?el.scroll({top:top,left:left,behavior:behavior}):(el.scrollTop=top,el.scrollLeft=left)}))}(compute(target,computeOptions),computeOptions.behavior)}}var now=function(){return memoizedNow||(memoizedNow="performance"in window?performance.now.bind(performance):Date.now),memoizedNow()};function step(context){var time=now(),elapsed=Math.min((time-context.startTime)/context.duration,1),value=context.ease(elapsed),currentX=context.startX+(context.x-context.startX)*value,currentY=context.startY+(context.y-context.startY)*value;context.method(currentX,currentY),currentX!==context.x||currentY!==context.y?requestAnimationFrame((function(){return step(context)})):context.cb()}function smoothScroll(el,x,y,duration,ease,cb){var scrollable,startX,startY;void 0===duration&&(duration=600),void 0===ease&&(ease=function(t){return 1+--t*t*t*t*t}),scrollable=el,startX=el.scrollLeft,startY=el.scrollTop,step({scrollable:scrollable,method:function(x,y){el.scrollLeft=Math.ceil(x),el.scrollTop=Math.ceil(y)},startTime:now(),startX:startX,startY:startY,x:x,y:y,duration:duration,ease:ease,cb:cb})}var scrollIntoView=function(target,options){var overrides=options||{};return function(options){return options&&!options.behavior||"smooth"===options.behavior}(overrides)?scrollIntoView$1(target,{block:overrides.block,inline:overrides.inline,scrollMode:overrides.scrollMode,boundary:overrides.boundary,behavior:function(actions){return Promise.all(actions.reduce((function(results,_ref){var el=_ref.el,left=_ref.left,top=_ref.top,startLeft=el.scrollLeft,startTop=el.scrollTop;return startLeft===left&&startTop===top?results:[].concat(results,[new Promise((function(resolve){return smoothScroll(el,left,top,overrides.duration,overrides.ease,(function(){return resolve({el:el,left:[startLeft,left],top:[startTop,top]})}))}))])}),[]))}}):Promise.resolve(scrollIntoView$1(target,options))},anchorScroll=function(element,experiments){var _document$querySelect,_document$querySelect2,_document$querySelect3,_document$querySelect4,_experiments$anchorSc,fixedElementsOffset=((null===(_document$querySelect=document.querySelector('[id="SITE_HEADER"]'))||void 0===_document$querySelect?void 0:_document$querySelect.clientHeight)||0)+((null===(_document$querySelect2=document.querySelector('[id="WIX_ADS"]'))||void 0===_document$querySelect2?void 0:_document$querySelect2.clientHeight)||0)+((null===(_document$querySelect3=document.querySelector('[data-hook="mobileToolbar"]'))||void 0===_document$querySelect3?void 0:_document$querySelect3.clientHeight)||(null===(_document$querySelect4=document.querySelector('[data-hook="ricos-editor-toolbars"]'))||void 0===_document$querySelect4?void 0:_document$querySelect4.clientHeight)||0);null!=experiments&&null!==(_experiments$anchorSc=experiments.anchorScrollWithSmoothScrollIntoViewIfNeeded)&&void 0!==_experiments$anchorSc&&_experiments$anchorSc.enabled?anchorScrollUsingSmoothScrollIntoViewIfNeeded(element,fixedElementsOffset):anchorScrollUsingScrollIntoView(element,fixedElementsOffset)},anchorScrollUsingSmoothScrollIntoViewIfNeeded=function(element,fixedElementsOffset){var _element$style=element.style,paddingTop=_element$style.paddingTop,marginTop=_element$style.marginTop;element.style.marginTop="-"+fixedElementsOffset+"px",element.style.paddingTop=fixedElementsOffset+"px",scrollIntoView(element,{block:"start",inline:"start"}),element.style.marginTop=marginTop,element.style.paddingTop=paddingTop},anchorScrollUsingScrollIntoView=function(element,fixedElementsOffset){var _element$style2=element.style,paddingTop=_element$style2.paddingTop,marginTop=_element$style2.marginTop;element.style.marginTop="-"+fixedElementsOffset+"px",element.style.paddingTop=fixedElementsOffset+"px",element.scrollIntoView({behavior:"smooth"}),element.style.marginTop=marginTop,element.style.paddingTop=paddingTop},addAnchorTagToUrl=function(anchorString){var url=new URL(window.location.href);url.hash=anchorString,history.pushState({},"",url.href)},isNewTab=function(target){return"_blank"===target},hasLinksInBlock=function(block,contentState){return getLinkRangesInBlock(block,contentState).length>0},getLinkRangesInBlock=function(block,contentState){var ranges=[];return block.entityRanges.forEach((function(entityRange){var _contentState$entityM,entityType=null===(_contentState$entityM=contentState.entityMap[entityRange.key])||void 0===_contentState$entityM?void 0:_contentState$entityM.type;if("LINK"===entityType||"wix-draft-plugin-external-link"===entityType){var start=entityRange.offset,end=start+entityRange.length;ranges.push([start,end])}})),ranges},contentStateSchema={definitions:{inlineStyleDef:{definitions:{},$schema:"http://json-schema.org/draft-07/schema#",$id:"https://wix-rich-content/inline-style.json",type:"object",title:"inline style",required:["offset","length","style"],properties:{offset:{$id:"#/properties/offset",type:"integer",title:"offset",default:0,min:0,examples:[0]},length:{$id:"#/properties/length",type:"integer",title:"length",default:0,min:0,examples:[4]},style:{$id:"#/properties/style",type:"string",title:"style",default:"",examples:["color4"],pattern:"^(.*)$"}}},entityRangeDef:{definitions:{},$schema:"http://json-schema.org/draft-07/schema#",$id:"https://wix-rich-content/entity-range.json",type:"object",title:"inline style",required:["offset","length","key"],properties:{offset:{$id:"#/properties/offset",type:"integer",title:"offset",default:0,min:0,examples:[0]},length:{$id:"#/properties/length",type:"integer",title:"length",default:0,min:0,examples:[4]},key:{$id:"#/properties/style",type:"integer",title:"key",default:"",examples:[0]}}},entityDef:{definitions:{},$schema:"http://json-schema.org/draft-07/schema#",$id:"https://wix-rich-content/entity-range.json",type:"object",title:"entity",required:["type","data"],properties:{type:{$id:"#/properties/type",enum:["IMAGE","VIDEO-EMBED","LINK","mention","wix-draft-plugin-image","wix-draft-plugin-link-button","wix-draft-plugin-action-button","wix-draft-plugin-video","wix-draft-plugin-gallery","wix-draft-plugin-link","wix-draft-plugin-html","wix-draft-plugin-sound-cloud","wix-draft-plugin-hashtag","wix-draft-plugin-divider","wix-draft-plugin-emoji","wix-draft-plugin-giphy","wix-draft-plugin-map","wix-draft-plugin-file-upload","wix-draft-plugin-vertical-embed","wix-draft-plugin-poll","wix-draft-plugin-link-preview","ANCHOR","wix-rich-content-plugin-table"],title:"entity type",examples:["wix-draft-plugin-image"]},mutability:{$id:"#/properties/mutability",type:"string",enum:["MUTABLE","IMMUTABLE","SEGMENTED"],title:"entity mutability",examples:["IMMUTABLE"]},data:{$id:"#/properties/data",type:"object",title:"entity data"}},anyOf:[{}]}},$schema:"http://json-schema.org/draft-07/schema#",$id:"https://wix-rich-content/content-state-schema.json",type:"object",title:"content state",required:["blocks","entityMap","VERSION"],properties:{blocks:{$id:"#/properties/blocks",type:"array",title:"blocks",items:{$id:"#/properties/blocks/items",type:"object",title:"block",required:["key","text","type","inlineStyleRanges","entityRanges","data"],properties:{key:{$id:"#/properties/blocks/items/properties/key",type:"string",title:"block key",default:"",examples:["45qkg"],pattern:"^(.*)$"},text:{$id:"#/properties/blocks/items/properties/text",type:"string",title:"text",default:"",examples:["test"]},type:{$id:"#/properties/blocks/items/properties/type",type:"string",title:"block type",default:"",examples:["unstyled"],enum:["unstyled","header-one","header-two","header-three","header-four","header-five","header-six","unordered-list-item","ordered-list-item","blockquote","atomic","code-block","figure"]},depth:{$id:"#/properties/blocks/items/properties/depth",type:"integer",title:"depth",maximum:10,default:0,examples:[0]},inlineStyleRanges:{$id:"#/properties/blocks/items/properties/inlineStyleRanges",type:"array",title:"inline style ranges",items:{$ref:"#/definitions/inlineStyleDef"}},entityRanges:{$id:"#/properties/blocks/items/properties/entityRanges",type:"array",title:"entity ranges",default:null,items:{$ref:"#/definitions/entityRangeDef"}},data:{$id:"#/properties/blocks/items/properties/data",type:"object",title:"data",default:null}}}},entityMap:{$id:"#/properties/entityMap",type:"object",title:"entity map",patternProperties:{"[0-9]+":{$ref:"#/definitions/entityDef"}}}}},validate=function(data,schema){return!0},getContentStateSchema=function(pluginDataSchemas){void 0===pluginDataSchemas&&(pluginDataSchemas={});var schema=contentStateSchema;return schema.definitions.entityDef.anyOf=Object.keys(pluginDataSchemas).map((function(pluginType){return{properties:{type:{const:pluginType},data:pluginDataSchemas[pluginType]}}})),schema},LTR="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",isRtlRegex=new RegExp("^[^"+LTR+"]*[֑-߿יִ-﷽ﹰ-ﻼ]"),isLtrRegex=new RegExp("^[^֑-߿יִ-﷽ﹰ-ﻼ]*["+LTR+"]"),emojiRegex=/\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]/g,getTextDirection=function(text){var result="neutral";if(!text)return result;var plainText=text.replace(emojiRegex,"");return isRtlRegex.test(plainText)?result="rtl":isLtrRegex.test(plainText)&&(result="ltr"),result},getDirectionFromAlignmentAndTextDirection=function(textAlignment,textDirection){return"right"===textAlignment?"rtl":"left"===textAlignment?"ltr":textDirection&&"rtl"===textDirection?textDirection:"ltr"},GlobalContext=React.createContext({isMobile:!1,experiments:{}}),isHexColor=function(str){return/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(str)},rtlLangs=["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"],isRtl=function(locale){return!!locale&&rtlLangs.includes(locale.split("-|_")[0].toLowerCase())},getLangDir=function(locale){return isRtl(locale)?"rtl":"ltr"},simplePubsub=function(initialState){var state=initialState||{},listeners={},subscribe=function(key,callback){if("function"!=typeof callback)throw"Callback for key "+key+" is not a function";return listeners[key]=listeners[key]||[],listeners[key].push(callback),function(){listeners[key]=listeners[key].filter((function(listener){return listener!==callback}))}},update=function(key,newData,blockKey){var data=get(key),newItem=merge({},data,newData);blockKey?_setSingle(key,newItem,blockKey):set(key,newItem)},_setSingle=function(key,item,blockKey){var _extends2;state=_extends({},state,((_extends2={})[key]=item,_extends2)),listeners[key]&&listeners[key].forEach((function(listener){return listener(state[key],blockKey)}))},_setBatch=function(updates){state=_extends({},state,updates),Object.keys(updates).forEach((function(key){listeners[key]&&listeners[key].forEach((function(listener){return listener(state[key])}))}))},set=function(){1===arguments.length?_setBatch(arguments.length<=0?void 0:arguments[0]):_setSingle.apply(void 0,arguments)},setBlockHandler=function(key,blockKey,item){_setSingle(blockHandlerKey(key,blockKey),item)},get=function(key){return state[key]},getBlockHandler=function(key,blockKey){return void 0===blockKey&&(blockKey=state.focusedBlock),state[blockHandlerKey(key,blockKey)]},blockHandlerKey=function(key,blockKey){return blockKey+"_"+key};return{subscribe:subscribe,unsubscribe:function(key,callback){listeners[key]=listeners[key].filter((function(listener){return listener!==callback}))},update:update,set:set,setBlockHandler:setBlockHandler,get:get,getBlockHandler:getBlockHandler,store:{get:get,getBlockHandler:getBlockHandler,update:update,set:set,setBlockHandler:setBlockHandler},getBlockData:function(_ref3){var key=_ref3.key,_ref3$blockKey=_ref3.blockKey,blockKey=void 0===_ref3$blockKey?state.focusedBlock:_ref3$blockKey;return state[blockHandlerKey(key,blockKey)]},setBlockData:function(_ref2){var key=_ref2.key,_ref2$blockKey=_ref2.blockKey,blockKey=void 0===_ref2$blockKey?state.focusedBlock:_ref2$blockKey,item=_ref2.item;_setSingle(blockHandlerKey(key,blockKey),item)},subscribeOnBlock:function(_ref){var key=_ref.key,_ref$blockKey=_ref.blockKey,blockKey=void 0===_ref$blockKey?state.focusedBlock:_ref$blockKey,callback=_ref.callback;return subscribe(blockHandlerKey(key,blockKey),callback)}}},generateKey=function(){return Math.random().toString(36).substr(2,9)},getBlocksFromContentState=function(contentState){var entityMap,rceInRcePlugins,innerRCEBlocks=(entityMap=contentState.entityMap,rceInRcePlugins=["wix-rich-content-plugin-table","wix-rich-content-plugin-collapsible-list"],Object.values(entityMap).some((function(entity){return rceInRcePlugins.includes(entity.type)}))?getInnerRCEBlocks(contentState.entityMap):[]);return[].concat(contentState.blocks,innerRCEBlocks)};function getInnerRCEBlocks(object){var result=[];if(object instanceof Array)Array.prototype.forEach.call(object,(function(arrayElement){var innerBlocks=getInnerRCEBlocks(arrayElement);innerBlocks&&(result=[].concat(result,innerBlocks))}));else for(var _i=0,_Object$entries=Object.entries(object);_i<_Object$entries.length;_i++){var _Object$entries$_i=_Object$entries[_i],key=_Object$entries$_i[0],value=_Object$entries$_i[1];if("blocks"===key)return value;if(value instanceof Object||value instanceof Array){var innerBlocks=getInnerRCEBlocks(value);innerBlocks&&(result=[].concat(result,innerBlocks))}}return result}var _INLINE_STYLE_TYPES,_RICOS_TO_DRAFT_TYPE,_dynamicStyleParsers,_defaultStyleFnMapper,_defaultStyleSelectio,ADD_PLUGIN_LINK_BI="addPluginLink",WEB_ADDRESS_CATEGORY="web_address",ANCHOR_CATEGORY="section",LINK_VIEWER_DATA_HOOK="linkViewer",ANCHOR_VIEWER_DATA_HOOK="anchorViewer";function isInEditor(contentBlock){return contentBlock.toJS}function isInLink(i,block,contentState){var entityKey=function(i,block){var _block$entityRanges$f;return isInEditor(block)?block.getEntityAt(i):null===(_block$entityRanges$f=block.entityRanges.find((function(_ref){var offset=_ref.offset,length=_ref.length;return i>offset&&i<offset+length})))||void 0===_block$entityRanges$f?void 0:_block$entityRanges$f.key}(i,block);return function(type){return"LINK"===type||"ricos-plugin-custom-link"===type}(function(block,contentState,entityKey){var _contentState$entityM;return isInEditor(block)?null!==entityKey&&contentState.getEntity(entityKey).getType():null===(_contentState$entityM=contentState.entityMap[entityKey])||void 0===_contentState$entityM?void 0:_contentState$entityM.type}(block,contentState,entityKey))}function createJustificationFixDecorator(){var isTextJustified=function(contentBlock){return"justify"===function(contentBlock){var _contentBlock$data;return isInEditor(contentBlock)?contentBlock.getData().get("textAlignment"):null==contentBlock||null===(_contentBlock$data=contentBlock.data)||void 0===_contentBlock$data?void 0:_contentBlock$data.textAlignment}(contentBlock)};return{strategy:function(contentBlock,callback,contentState){if(!isSSR()&&(isSSR()||!window.chrome)&&isTextJustified(contentBlock))for(var match,regex=/\s[^\s]/g,str=contentBlock.getText();null!==(match=regex.exec(str));)isInLink(match.index,contentBlock,contentState)||callback(match.index,match.index+1)},component:function(props){return React.createElement("span",{style:{whiteSpace:"normal"}},props.children)}}}var INLINE_STYLE_TYPES=((_INLINE_STYLE_TYPES={})[RICOS_TEXT_COLOR_TYPE]="FG",_INLINE_STYLE_TYPES[RICOS_TEXT_HIGHLIGHT_TYPE]="BG",_INLINE_STYLE_TYPES[RICOS_FONT_SIZE_TYPE]="font-size",_INLINE_STYLE_TYPES),RICOS_TO_DRAFT_TYPE=((_RICOS_TO_DRAFT_TYPE={})[RICOS_TEXT_COLOR_TYPE]=TEXT_COLOR_TYPE,_RICOS_TO_DRAFT_TYPE[RICOS_TEXT_HIGHLIGHT_TYPE]=TEXT_HIGHLIGHT_TYPE,_RICOS_TO_DRAFT_TYPE),parseStyleByType=function(style,type){var property=INLINE_STYLE_TYPES[type],cssRule=safeJsonParse(style);return null==cssRule?void 0:cssRule[property]},dynamicStyleParsers=((_dynamicStyleParsers={})[RICOS_TEXT_COLOR_TYPE]=function(style,styleSelectionPredicate){var color=parseStyleByType(style,RICOS_TEXT_COLOR_TYPE);if(styleSelectionPredicate){var parsedStyle=color||style;return styleSelectionPredicate(parsedStyle)&&parsedStyle}return color||isHexColor(style)&&style},_dynamicStyleParsers[RICOS_TEXT_HIGHLIGHT_TYPE]=function(style,styleSelectionPredicate){var color=parseStyleByType(style,RICOS_TEXT_HIGHLIGHT_TYPE);return styleSelectionPredicate?styleSelectionPredicate(color)&&color:color},_dynamicStyleParsers[RICOS_FONT_SIZE_TYPE]=function(style){return parseStyleByType(style,RICOS_FONT_SIZE_TYPE)},_dynamicStyleParsers),draftDecorationsToCss={BOLD:{"font-weight":"bold"},ITALIC:{"font-style":"italic"},NOT_BOLD:{"font-weight":"normal"},NOT_ITALIC:{"font-style":"normal"}},defaultStyleFnMapper=((_defaultStyleFnMapper={})[RICOS_TEXT_COLOR_TYPE]=function(style){var parsedStyle=dynamicStyleParsers[RICOS_TEXT_COLOR_TYPE](style,isHexColor);return parsedStyle?{color:parsedStyle}:void 0},_defaultStyleFnMapper[RICOS_TEXT_HIGHLIGHT_TYPE]=function(style){var parsedStyle=dynamicStyleParsers[RICOS_TEXT_HIGHLIGHT_TYPE](style,isHexColor);return parsedStyle?{backgroundColor:parsedStyle}:void 0},_defaultStyleFnMapper[RICOS_FONT_SIZE_TYPE]=function(style){var parsedStyle=dynamicStyleParsers[RICOS_FONT_SIZE_TYPE](style);return parsedStyle?{fontSize:parsedStyle}:void 0},_defaultStyleFnMapper[RICOS_BOLD_TYPE]=function(style){return"NOT_BOLD"===style?{fontWeight:"normal"}:void 0},_defaultStyleFnMapper[RICOS_ITALIC_TYPE]=function(style){return"NOT_ITALIC"===style?{fontStyle:"normal"}:void 0},_defaultStyleFnMapper),defaultStyleSelectionPredicates=((_defaultStyleSelectio={})[RICOS_TEXT_COLOR_TYPE]=isHexColor,_defaultStyleSelectio[RICOS_TEXT_HIGHLIGHT_TYPE]=isHexColor,_defaultStyleSelectio),getDynamicInlineStyleMapper=function(type){return function(config,raw){var settings=config[RICOS_TO_DRAFT_TYPE[type]||""]||{},styleParser=dynamicStyleParsers[type],styleSelectionPredicate=settings.styleSelectionPredicate?function(style){return!!styleParser(style,settings.styleSelectionPredicate)}:function(style){return!!styleParser(style,defaultStyleSelectionPredicates[type])},customStyleFn=settings.customStyleFn?function(style){return settings.customStyleFn(styleParser(style,settings.styleSelectionPredicate))}:defaultStyleFnMapper[type],mapper=getBlocksFromContentState(raw).reduce((function(map,block){return block.inlineStyleRanges&&block.inlineStyleRanges.filter((function(range){return styleSelectionPredicate(range.style)})).forEach((function(range){map[range.style]=function(children,_ref){var key=_ref.key;return React.createElement("span",{key:key,style:customStyleFn(range.style)},children)}})),map}),{});return function(){return mapper}}},uuid=function(){var d=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(c){var r=(d+16*Math.random())%16|0;return d=Math.floor(d/16),("x"===c?r:3&r|8).toString(16)}))};export{ADD_PLUGIN_LINK_BI,ANCHOR_CATEGORY,ANCHOR_VIEWER_DATA_HOOK,AccessibilityListener,ButtonType,CUSTOM_LINK,DRAFT_TO_RICOS_DOC_TYPE,DROPDOWN_OPTIONS_TO_DOC_STYLE_TYPE,DecorationMode,DisplayMode,GlobalContext,INLINE_STYLE_TYPES,LINK_VIEWER_DATA_HOOK,LinkData,Link_Rel,ModifierKey,RicosTranslate,ToolbarType,ViewportRenderer,WEB_ADDRESS_CATEGORY,addAnchorTagToUrl,alignmentClassName,anchorScroll,convertRelObjectToString,convertRelStringToObject,convertTargetBooleanToString,convertTargetStringToBoolean,createHocName,createJustificationFixDecorator,defaultStyleFnMapper,depthClassName,draftDecorationsToCss,dynamicStyleParsers,generateKey,getBlocksFromContentState,getContentStateSchema,getDirectionFromAlignmentAndTextDirection,getDisplayName,getDynamicInlineStyleMapper,getLangDir,getLinkRangesInBlock,getRelValue,getTextDirection,hasLinksInBlock,isHexColor,isNewTab,isRtl,isSSR,mergeStyles,parseStyleByType,safeJsonParse,simplePubsub,sizeClassName,textWrapClassName,uuid,validate,withI18n};
//# sourceMappingURL=module.js.map

@@ -1,4 +0,27 @@

import TextSelectionToolbar from './TextSelectionToolbar';
import TwitterButton from './TwitterButton';
export { TextSelectionToolbar, TwitterButton };
export * from './types';
export { default as AccessibilityListener } from './Components/AccessibilityListener';
export { default as ViewportRenderer } from './Components/ViewportRenderer';
export { default as withI18n, translate, Trans, RicosTranslate } from './Utils/withI18n';
export { default as createHocName } from './Utils/createHocName';
export { sizeClassName, alignmentClassName, textWrapClassName, depthClassName, } from './Utils/classNameStrategies';
export { mergeStyles } from './Utils/mergeStyles';
export { convertRelObjectToString, convertRelStringToObject, convertTargetStringToBoolean, convertTargetBooleanToString, getRelValue, } from './Utils/linkConverters';
export { safeJsonParse } from './Utils/jsonUtils';
export { anchorScroll, addAnchorTagToUrl, isNewTab } from './Utils/anchor';
export * from 'ricos-content';
export { default as getDisplayName } from './Utils/getDisplayName';
export { hasLinksInBlock, getLinkRangesInBlock } from './Utils/draftUtils';
export { validate, getContentStateSchema } from './Utils/data-schema-validator';
export { isSSR } from './Utils/ssrUtils';
export { getTextDirection, getDirectionFromAlignmentAndTextDirection } from './Utils/textDirection';
export { GlobalContext } from './Utils/contexts';
export { isHexColor } from './Utils/colorUtils';
export { isRtl, getLangDir } from './Utils/rtlUtils';
export { simplePubsub, Pubsub, Store } from './Utils/simplePubsub';
export { generateKey } from './Utils/generateKey';
export { getBlocksFromContentState } from './Utils/innerRCEBlocksUtils';
export * from './consts';
export { default as createJustificationFixDecorator } from './draftDecorators/createJustificationFixDecorator';
export { parseStyleByType, CustomInlineStyleType, INLINE_STYLE_TYPES, defaultStyleFnMapper, dynamicStyleParsers, getDynamicInlineStyleMapper, draftDecorationsToCss, } from './Utils/viewerUtils';
export { default as uuid } from './Utils/uuid';
//# sourceMappingURL=index.d.ts.map

@@ -1,1 +0,1 @@

{"name":"richlagetest","version":"0.0.0-00f8dddc44fd82f2d21396aebcac5d11f74a298c"}
{"name":"richlagetest","version":"0.0.0-09b87b046fae0e0cd11e7abfb50826eaaf8e7800"}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc