var devowlWp_realUtils;(()=>{"use strict";var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var o in s)t.o(s,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{RatingPointer:()=>d,isRatable:()=>i});const s=devowlWp_utils,o=()=>window[s.BaseOptions.getPureSlug("real-utils",!0)].others;function i(t){return o().canBeRated.indexOf(t)>-1}let a,n;const r=(...t)=>(n||(n=(0,s.createLocalizationFactory)("".concat("devowl-wp","-").concat("real-utils")))).__(...t),l=jQuery;var c=t.n(l);const u={path:"/rating/:slug/dismiss",method:s.RouteHttpVerb.DELETE};class d{constructor(t,e,s,o){this.slug=void 0,this.$handler=void 0,this.description=void 0,this.className=void 0,this.slug=t,this.$handler=e,this.description=s,this.className=o,this.init()}close(t,e){if(t.preventDefault(),this.$handler.pointer("close"),this.$handler.pointer("destroy"),e){const t=o().rateLinks[this.slug];window.open(t,"_blank")}((...t)=>{(a||(a=(0,s.createRequestFactory)(window[s.BaseOptions.getPureSlug("real-utils",!0)]))).request(...t)})({location:u,params:{slug:this.slug,force:e}})}buttons(){const t=c()('<a class="button" href="#">'.concat(r("Not now"),"</a>")).click((t=>{this.close(t,!1)})),e=c()('<a class="button button-primary" href="#">'.concat(r("Give it a rating"),"</a>")).click((t=>{this.close(t,!0)}));return c()('<div class="real-utils-pointer-buttons" />').append(e,t)}init(){const{canBeRated:t}=o();t.splice(t.indexOf(this.slug),1);const e=r("Do us a favor!"),s=this.description||r("Awesome, you have just used a functionality of <strong>%s</strong>. Do you like it? Please do us a favor and rate us!",o().names[this.slug]);this.$handler.pointer({pointerClass:"wp-pointer real-utils-rate-pointer ".concat(this.className?this.className:""),content:"<h3>".concat(e,"</h3><p>").concat(s,"</p>"),buttons:this.buttons.bind(this)}).pointer("open")}}devowlWp_realUtils=e})();
//# sourceMappingURL=helper.js.map