/*! For license information please see notes.min.js.LICENSE.txt */ (()=>{"use strict";var t={6058:(t,e,r)=>{var n=r(1508),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function a(t){return n.isMemo(t)?u:c[t.$$typeof]||o}c[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[n.Memo]=u;var l=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,y=Object.prototype;t.exports=function t(e,r,n){if("string"!=typeof r){if(y){var o=d(r);o&&o!==y&&t(e,o,n)}var u=s(r);f&&(u=u.concat(f(r)));for(var c=a(e),v=a(r),m=0;m{var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,a=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,s=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,h=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,g=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function R(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case s:case f:case i:case c:case u:case d:return t;default:switch(t=t&&t.$$typeof){case l:case p:case m:case v:case a:return t;default:return e}}case o:return e}}}function O(t){return R(t)===f}e.AsyncMode=s,e.ConcurrentMode=f,e.ContextConsumer=l,e.ContextProvider=a,e.Element=n,e.ForwardRef=p,e.Fragment=i,e.Lazy=m,e.Memo=v,e.Portal=o,e.Profiler=c,e.StrictMode=u,e.Suspense=d,e.isAsyncMode=function(t){return O(t)||R(t)===s},e.isConcurrentMode=O,e.isContextConsumer=function(t){return R(t)===l},e.isContextProvider=function(t){return R(t)===a},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return R(t)===p},e.isFragment=function(t){return R(t)===i},e.isLazy=function(t){return R(t)===m},e.isMemo=function(t){return R(t)===v},e.isPortal=function(t){return R(t)===o},e.isProfiler=function(t){return R(t)===c},e.isStrictMode=function(t){return R(t)===u},e.isSuspense=function(t){return R(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===f||t===c||t===u||t===d||t===y||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===v||t.$$typeof===a||t.$$typeof===l||t.$$typeof===p||t.$$typeof===b||t.$$typeof===g||t.$$typeof===w||t.$$typeof===h)},e.typeOf=R},1508:(t,e,r)=>{t.exports=r(4883)},2247:(t,e)=>{var r=60103,n=60106,o=60107,i=60108,u=60114,c=60109,a=60110,l=60112,s=60113,f=60120,p=60115,d=60116,y=60121,v=60122,m=60117,h=60129,b=60131;if("function"==typeof Symbol&&Symbol.for){var g=Symbol.for;r=g("react.element"),n=g("react.portal"),o=g("react.fragment"),i=g("react.strict_mode"),u=g("react.profiler"),c=g("react.provider"),a=g("react.context"),l=g("react.forward_ref"),s=g("react.suspense"),f=g("react.suspense_list"),p=g("react.memo"),d=g("react.lazy"),y=g("react.block"),v=g("react.server.block"),m=g("react.fundamental"),h=g("react.debug_trace_mode"),b=g("react.legacy_hidden")}function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case o:case u:case i:case s:case f:return t;default:switch(t=t&&t.$$typeof){case a:case l:case d:case p:case c:return t;default:return e}}case n:return e}}}},7311:(t,e,r)=>{r(2247)},8003:t=>{t.exports=wp.i18n}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={};r.r(t),r.d(t,{ClearActive:()=>w,Close:()=>O,CopyLink:()=>I,Filter:()=>F,Open:()=>G,SetActive:()=>q,Toggle:()=>H});var e={};r.r(e),r.d(e,{Index:()=>et,ReadStatus:()=>K,Summary:()=>X,Users:()=>Z});var n={};function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rot});var w=function(t){m(r,$e.modules.CommandBase);var e=g(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"apply",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).id,e=void 0===t?null:t,r=window.top.$e.store,n=r.get("notes").actions;r.dispatch(n.clearActive(e))}}]),r}();function R(t){var e=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(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var O=function(t){m(r,$e.modules.CommandBase);var e=R(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"apply",value:function(){this.component.close()}}]),r}();function S(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,c=[],a=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);a=!0);}catch(t){l=!0,o=t}finally{try{if(!a&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return c}}(t,e)||i(t,e)||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.")}()}var P=function(){function t(){c(this,t)}return f(t,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).forEach((function(e){var r=S(e,2),n=r[0],o=r[1];t[n]=o})),this}}]),t}(),$=r(8003).__;function k(t){var e=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(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var A=function(t){m(r,t);var e=k(r);function r(){var t;c(this,r);for(var n=arguments.length,o=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:"",e=window.top.$e.components.get("notes").config.urls.avatar_defaults;return(new r).init({name:[t,$("(deleted user)","elementor-pro")].join(" "),avatarUrls:e})}}]),r}(P);function E(t){var e=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(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var j=function(t){m(r,t);var e=E(r);function r(){var t;c(this,r);for(var n=arguments.length,o=new Array(n),i=0;i0)}},{key:"isThread",value:function(){return 0===this.parentId}},{key:"isReply",value:function(){return!this.isThread()}}],[{key:"createFromResponse",value:function(t){return(new r).init({id:t.id,parentId:t.parent_id,elementId:t.element_id,content:t.content,position:t.position,repliesCount:t.replies_count,unreadRepliesCount:t.unread_replies_count,replies:t.replies.map((function(t){return r.createFromResponse(t)})),author:t.author?A.createFromResponse(t.author):A.createDeleted(t.author_display_name),document:t.document?j.createFromResponse(t.document):null,readers:t.readers?t.readers.map((function(t){return A.createFromResponse(t)})):[],isRead:t.is_read,isResolved:t.is_resolved,routeUrl:t.route_url,routeTitle:t.route_title,userCan:t.user_can,createdAt:new Date(t.created_at),updatedAt:new Date(t.updated_at),lastActivityAt:new Date(t.last_activity_at)})}},{key:"getURL",value:function(t){return window.top.$e.components.get("notes").config.route.note_url_pattern.replace("{{NOTE_ID}}",t)}}]),r}(P);function M(t){if(null===(e=navigator)||void 0===e||!e.clipboard)throw new Error("Cannot copy to clipboard, please make sure you are using SSL in your website.");var e;navigator.clipboard.writeText(t)}function B(t){var e=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(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var I=function(t){m(r,$e.modules.CommandBase);var e=B(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"validateArgs",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.requireArgumentType("id","number",t)}},{key:"apply",value:function(t){return M(C.getURL(t.id))}}]),r}();function T(t){var e=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(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var F=function(t){m(r,$e.modules.CommandBase);var e=T(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"validateArgs",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.requireArgument("filters",t)}},{key:"apply",value:function(t){var e=window.top.$e.store,r=e.get("notes").actions,n=t.overwrite?r.setFilters:r.modifyFilters;e.dispatch(n(t.filters))}}]),r}();const D=React;"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?D.useLayoutEffect:D.useEffect;r(6058),r(7311);const L=ReactDOM;var N;N=L.unstable_batchedUpdates;var W="thread";function U(t){var e=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(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var G=function(t){m(r,$e.modules.CommandBase);var e=U(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"apply",value:function(t){window.top.$e.route(this.component.getNamespace());var e=parseInt(t.id||"0");e>0&&window.top.$e.run("notes/set-active",{type:W,data:{noteId:e}})}}],[{key:"getInfo",value:function(){return{isSafe:!0,isSafeWithArgs:!0}}}]),r}();function V(t){var e=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(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var q=function(t){m(r,$e.modules.CommandBase);var e=V(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"validateArgs",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.requireArgument("type",t),this.requireArgument("data",t)}},{key:"apply",value:function(t){var e=t.type,r=t.data,n=window.top.$e.store;if(!(n.getState().notes.formsInWritingMode.length>0)){var o=n.get("notes").actions;n.dispatch(o.setActive({type:e,data:r}))}}}]),r}();function z(t){var e=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(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var H=function(t){m(r,$e.modules.CommandBase);var e=z(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"apply",value:function(){this.component.isOpen?window.top.$e.run("notes/close"):window.top.$e.run("notes/open")}}]),r}();function J(t){var e=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(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var K=function(t){m(r,$e.modules.CommandData);var e=J(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,null,[{key:"getEndpointFormat",value:function(){return"notes/read-status"}}]),r}();function Q(t){var e=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(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var X=function(t){m(r,$e.modules.CommandData);var e=Q(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,null,[{key:"getEndpointFormat",value:function(){return"notes/summary"}}]),r}();function Y(t){var e=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(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var Z=function(t){m(r,$e.modules.CommandData);var e=Y(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,null,[{key:"getEndpointFormat",value:function(){return"notes/users"}}]),r}();function tt(t){var e=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(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var et=function(t){m(r,$e.modules.CommandData);var e=tt(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,null,[{key:"getEndpointFormat",value:function(){return"notes/{id}"}}]),r}(),rt=r(8003).__;function nt(t){var e=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(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var ot=function(t){m(r,$e.modules.hookUI.After);var e=nt(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"getCommand",value:function(){return"panel/state-ready"}},{key:"getId",value:function(){return"notes-add-panel-menu-item"}},{key:"apply",value:function(){elementor.modules.layouts.panel.pages.menu.Menu.addItem({name:"notes",icon:"eicon-commenting-o",title:rt("Notes","elementor-pro"),callback:function(){return window.top.$e.run("notes/open")}},"navigate_from_page","finder")}}]),r}();var it=r(8003).__;function ut(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ct(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{}).payload;return!n||(null===(e=t.active)||void 0===e||null===(r=e.data)||void 0===r?void 0:r.noteId)===n?ct(ct({},t),{},{active:null,formsInWritingMode:[]}):t},addFormToWritingMode:function(t,e){var r=e.payload;return ct(ct({},t),{},{formsInWritingMode:[].concat(u(t.formsInWritingMode),[r])})},removeFormFromWritingMode:function(t,e){var r=e.payload;return ct(ct({},t),{},{formsInWritingMode:t.formsInWritingMode.filter((function(t){return t!==r}))})}}}}}},{key:"open",value:function(){return!this.isOpen&&(this.isInEditor()&&this.updateEditorState(this.constructor.NOTES_MODE_OPEN),this.getPreviewFrame().postMessage({name:"elementor-pro/notes/open"},"*"),!0)}},{key:"close",value:function(){return!!y(d(i.prototype),"close",this).call(this)&&(this.isInEditor()&&this.updateEditorState(this.constructor.NOTES_MODE_CLOSE),this.getPreviewFrame().postMessage({name:"elementor-pro/notes/close"},"*"),!0)}},{key:"isInEditor",value:function(){return!!window.elementor}},{key:"updateEditorState",value:function(t){var e=this;switch(t){case this.constructor.NOTES_MODE_OPEN:elementor.getPanelView().modeSwitcher.currentView.setMode("preview"),elementor.channels.dataEditMode.once("switch",(function(){e.isOpen&&window.top.$e.run("notes/close")}));break;case this.constructor.NOTES_MODE_CLOSE:elementor.getPanelView().modeSwitcher.currentView.setMode("editor");break;default:throw new Error("mode '".concat(t,"' is not supported."))}}},{key:"getPreviewFrame",value:function(){return this.isInEditor()?elementor.$preview[0].contentWindow:window}},{key:"contextMenuNotesGroup",value:function(){var t=this;if(this.isInEditor()){["widget","section","column","container"].forEach((function(e){elementor.hooks.addFilter("elements/".concat(e,"/contextMenuGroups"),t.contextMenuAddGroup)}))}}},{key:"contextMenuAddGroup",value:function(t){var e=_.findWhere(t,{name:"notes"}),r=t.indexOf(e),n={name:"open_notes",title:it("Notes","elementor-pro"),shortcut:"⇧+C",isEnabled:function(){return!0},callback:function(){return $e.route("notes")}};if(-1===r){var o=_.findWhere(t,{name:"delete"}),i=t.indexOf(o),u=-1!==i?i:t.length;return t.splice(u,0,{name:"notes",actions:[n]}),t}var c=_.findWhere(e.actions,{name:"open_notes"}),a=e.actions.indexOf(c);return t[r].actions[a]=n,t}}]),i}();b(lt,"NOTES_MODE_OPEN","open"),b(lt,"NOTES_MODE_CLOSE","close"),window.top.$e.components.register(new lt)})()})();