Current File : /home/gulsvnnd/www/wp-content/plugins/elementor-pro/assets/js/notes/notes.min.js |
/*! For license information please see notes.min.js.LICENSE.txt */
(()=>{"use strict";var t={6058:(t,e,n)=>{var r=n(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},c={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function a(t){return r.isMemo(t)?c:u[t.$$typeof]||o}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[r.Memo]=c;var l=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,y=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(y){var o=d(n);o&&o!==y&&t(e,o,r)}var c=s(n);f&&(c=c.concat(f(n)));for(var u=a(e),v=a(n),m=0;m<c.length;++m){var h=c[m];if(!(i[h]||r&&r[h]||v&&v[h]||u&&u[h])){var g=p(n,h);try{l(e,h,g)}catch(t){}}}}return e}},4883:(t,e)=>{var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,c=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,a=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,s=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,y=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,h=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function R(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case s:case f:case i:case u:case c: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=r,e.ForwardRef=p,e.Fragment=i,e.Lazy=m,e.Memo=v,e.Portal=o,e.Profiler=u,e.StrictMode=c,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===r},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)===u},e.isStrictMode=function(t){return R(t)===c},e.isSuspense=function(t){return R(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===f||t===u||t===c||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===g||t.$$typeof===b||t.$$typeof===w||t.$$typeof===h)},e.typeOf=R},1508:(t,e,n)=>{t.exports=n(4883)},2247:(t,e)=>{var n=60103,r=60106,o=60107,i=60108,c=60114,u=60109,a=60110,l=60112,s=60113,f=60120,p=60115,d=60116,y=60121,v=60122,m=60117,h=60129,g=60131;if("function"==typeof Symbol&&Symbol.for){var b=Symbol.for;n=b("react.element"),r=b("react.portal"),o=b("react.fragment"),i=b("react.strict_mode"),c=b("react.profiler"),u=b("react.provider"),a=b("react.context"),l=b("react.forward_ref"),s=b("react.suspense"),f=b("react.suspense_list"),p=b("react.memo"),d=b("react.lazy"),y=b("react.block"),v=b("react.server.block"),m=b("react.fundamental"),h=b("react.debug_trace_mode"),g=b("react.legacy_hidden")}function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case o:case c:case i:case s:case f:return t;default:switch(t=t&&t.$$typeof){case a:case l:case d:case p:case u:return t;default:return e}}case r:return e}}}},7311:(t,e,n)=>{n(2247)},8003:t=>{t.exports=wp.i18n}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={};n.r(t),n.d(t,{ClearActive:()=>w,Close:()=>O,CopyLink:()=>I,Filter:()=>F,Open:()=>G,SetActive:()=>q,Toggle:()=>H});var e={};n.r(e),n.d(e,{Index:()=>et,ReadStatus:()=>K,Summary:()=>X,Users:()=>Z});var r={};function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function c(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=p(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},d.apply(this,arguments)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function h(t,e){if(e&&("object"===m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}n.r(r),n.d(r,{NotesAddPanelMenuItem:()=>ot});var w=function(t){v(n,$e.modules.CommandBase);var e=b(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{key:"apply",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.id,n=void 0===e?null:e,r=window.top.$e.store,o=r.get("notes"),i=o.actions;r.dispatch(i.clearActive(n))}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var O=function(t){v(n,$e.modules.CommandBase);var e=R(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{key:"apply",value:function(){this.component.close()}}]),n}();function S(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],c=!0,u=!1;try{for(n=n.call(t);!(c=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{c||null==n.return||n.return()}finally{if(u)throw o}}return i}}(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(){u(this,t)}return l(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 n=S(e,2),r=n[0],o=n[1];t[r]=o})),this}}]),t}(),$=n(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var A=function(t){v(n,t);var e=k(n);function n(){var t;u(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return g(s(t=e.call.apply(e,[this].concat(o))),"id",null),g(s(t),"name",""),g(s(t),"slug",""),g(s(t),"avatarUrls",{24:null,48:null,96:null}),g(s(t),"capabilities",{}),t}return l(n,null,[{key:"createFromResponse",value:function(t){var e,r,o,i;return(new n).init({id:t.id,name:t.name,slug:t.slug,avatarUrls:t.avatar_urls,capabilities:{notes:{read:null===(e=t.capabilities)||void 0===e||null===(r=e.notes)||void 0===r?void 0:r.can_read},post:{edit:null===(o=t.capabilities)||void 0===o||null===(i=o.post)||void 0===i?void 0:i.can_edit}}})}},{key:"createDeleted",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=window.top.$e.components.get("notes").config.urls.avatar_defaults;return(new n).init({name:[t,$("(deleted user)","elementor-pro")].join(" "),avatarUrls:e})}}]),n}(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var x=function(t){v(n,t);var e=E(n);function n(){var t;u(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return g(s(t=e.call.apply(e,[this].concat(o))),"id",void 0),g(s(t),"type",void 0),g(s(t),"typeTitle",void 0),t}return l(n,null,[{key:"createFromResponse",value:function(t){return(new n).init({id:t.id,type:t.type,typeTitle:t.type_title})}}]),n}(P);function C(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var j=function(t){v(n,t);var e=C(n);function n(){var t;u(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return g(s(t=e.call.apply(e,[this].concat(o))),"id",null),g(s(t),"parentId",0),g(s(t),"elementId",null),g(s(t),"content",""),g(s(t),"position",{x:0,y:0}),g(s(t),"repliesCount",0),g(s(t),"unreadRepliesCount",0),g(s(t),"replies",[]),g(s(t),"author",null),g(s(t),"readers",[]),g(s(t),"isRead",!1),g(s(t),"isResolved",!1),g(s(t),"routeUrl",""),g(s(t),"routeTitle",""),g(s(t),"userCan",{}),g(s(t),"createdAt",null),g(s(t),"updatedAt",null),g(s(t),"lastActivityAt",null),g(s(t),"_formattedLastActivityAt",""),g(s(t),"_formattedCreatedAt",""),t}return l(n,[{key:"getFormattedLastActivityAt",value:function(){return this._formattedLastActivityAt||(this._formattedLastActivityAt=this.lastActivityAt.toLocaleString()),this._formattedLastActivityAt}},{key:"getFormattedCreatedAt",value:function(){return this._formattedCreatedAt||(this._formattedCreatedAt=this.createdAt.toLocaleString()),this._formattedCreatedAt}},{key:"getURL",value:function(){var t=this.isReply()?this.parentId:this.id;return this.constructor.getURL(t)}},{key:"isUnreadThread",value:function(){return this.isThread()&&(!this.isRead||this.unreadRepliesCount>0)}},{key:"isThread",value:function(){return 0===this.parentId}},{key:"isReply",value:function(){return!this.isThread()}}],[{key:"createFromResponse",value:function(t){return(new n).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 n.createFromResponse(t)})),author:t.author?A.createFromResponse(t.author):A.createDeleted(t.author_display_name),document:t.document?x.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)}}]),n}(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var I=function(t){v(n,$e.modules.CommandBase);var e=B(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{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(j.getURL(t.id))}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var F=function(t){v(n,$e.modules.CommandBase);var e=T(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{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,n=e.get("notes").actions,r=t.overwrite?n.setFilters:n.modifyFilters;e.dispatch(r(t.filters))}}]),n}();const D=React;"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?D.useLayoutEffect:D.useEffect;n(6058),n(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var G=function(t){v(n,$e.modules.CommandBase);var e=U(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{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}}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var q=function(t){v(n,$e.modules.CommandBase);var e=V(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{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,n=t.data,r=window.top.$e.store;if(!(r.getState().notes.formsInWritingMode.length>0)){var o=r.get("notes").actions;r.dispatch(o.setActive({type:e,data:n}))}}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var H=function(t){v(n,$e.modules.CommandBase);var e=z(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{key:"apply",value:function(){this.component.isOpen?window.top.$e.run("notes/close"):window.top.$e.run("notes/open")}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var K=function(t){v(n,$e.modules.CommandData);var e=J(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,null,[{key:"getEndpointFormat",value:function(){return"notes/read-status"}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var X=function(t){v(n,$e.modules.CommandData);var e=Q(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,null,[{key:"getEndpointFormat",value:function(){return"notes/summary"}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var Z=function(t){v(n,$e.modules.CommandData);var e=Y(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,null,[{key:"getEndpointFormat",value:function(){return"notes/users"}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var et=function(t){v(n,$e.modules.CommandData);var e=tt(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,null,[{key:"getEndpointFormat",value:function(){return"notes/{id}"}}]),n}(),nt=n(8003).__;function rt(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var ot=function(t){v(n,$e.modules.hookUI.After);var e=rt(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{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:nt("Notes","elementor-pro"),callback:function(){return window.top.$e.run("notes/open")}},"navigate_from_page","finder")}}]),n}();var it=n(8003).__;function ct(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ut(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ct(Object(n),!0).forEach((function(e){g(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function at(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var lt=function(n){v(i,$e.modules.ComponentBase);var o=at(i);function i(t){var e;return u(this,i),g(s(e=o.call(this,t)),"config",{}),window.addEventListener("message",(function(t){"elementor-pro/notes/config"===t.data.name&&(e.config=ut(ut({},e.config),t.data.payload),e.isInEditor()||window.top.$e.extras.hashCommands.runOnce(),e.contextMenuNotesGroup())})),window.addEventListener("DOMContentLoaded",(function(){var t=document.getElementById("wp-admin-bar-elementor_notes");t&&t.addEventListener("click",(function(t){t.preventDefault(),window.top.$e.run("notes/toggle")}))})),e}return l(i,[{key:"getNamespace",value:function(){return"notes"}},{key:"defaultRoutes",value:function(){return{"":function(){}}}},{key:"defaultCommands",value:function(){var e=["create","reply","edit","delete","resolve","re-open","cancel-create","cancel-reply","cancel-edit","choose-mention","open-note-actions","close-note-actions","open-panel-filters","close-panel-filters","refresh-panel"].reduce((function(t,e){return ut(ut({},t),{},g({},e,(function(){})))}),{});return ut(ut({},this.importCommands(t)),e)}},{key:"defaultData",value:function(){return this.importCommands(e)}},{key:"defaultHooks",value:function(){return this.importHooks(r)}},{key:"defaultShortcuts",value:function(){return{toggle:{keys:"shift+c",exclude:["input","textarea"]}}}},{key:"defaultStates",value:function(){return{"":{initialState:{active:null,formsInWritingMode:[],filters:{is_resolved:null,only_unread:null,only_relevant:null}},reducers:{setFilters:function(t,e){var n=e.payload;return ut(ut({},t),{},{filters:n})},modifyFilters:function(t,e){var n=e.payload;return ut(ut({},t),{},{filters:ut(ut({},t.filters),n)})},setActive:function(t,e){var n=e.payload;return ut(ut({},t),{},{active:{type:n.type,data:n.data},formsInWritingMode:[]})},clearActive:function(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.payload,i=!o||(null===(e=t.active)||void 0===e||null===(n=e.data)||void 0===n?void 0:n.noteId)===o;return i?ut(ut({},t),{},{active:null,formsInWritingMode:[]}):t},addFormToWritingMode:function(t,e){var n=e.payload;return ut(ut({},t),{},{formsInWritingMode:[].concat(c(t.formsInWritingMode),[n])})},removeFormFromWritingMode:function(t,e){var n=e.payload;return ut(ut({},t),{},{formsInWritingMode:t.formsInWritingMode.filter((function(t){return t!==n}))})}}}}}},{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!!d(f(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"}),n=t.indexOf(e),r={name:"open_notes",title:it("Notes","elementor-pro"),shortcut:"⇧+C",isEnabled:function(){return!0},callback:function(){return $e.route("notes")}};if(-1===n){var o=_.findWhere(t,{name:"delete"}),i=t.indexOf(o),c=-1!==i?i:t.length;return t.splice(c,0,{name:"notes",actions:[r]}),t}var u=_.findWhere(e.actions,{name:"open_notes"}),a=e.actions.indexOf(u);return t[n].actions[a]=r,t}}]),i}();g(lt,"NOTES_MODE_OPEN","open"),g(lt,"NOTES_MODE_CLOSE","close"),window.top.$e.components.register(new lt)})()})();