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}const n=jQuery;var a=t.n(n);let r;const l=(...t)=>(r||(r=(0,s.createLocalizationFactory)("devowl-wp-real-utils"))).__(...t);let u;const c={path:"/rating/:slug/dismiss",method:s.RouteHttpVerb.DELETE};class d{constructor(t,e,s,o){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)=>{(u||(u=(0,s.createRequestFactory)(window[s.BaseOptions.getPureSlug("real-utils",!0)]))).request(...t)})({location:c,params:{slug:this.slug,force:e}})}buttons(){const t=a()(`<a class="button" href="#">${l("Not now")}</a>`).click(t=>{this.close(t,!1)}),e=a()(`<a class="button button-primary" href="#">${l("Give it a rating")}</a>`).click(t=>{this.close(t,!0)});return a()('<div class="real-utils-pointer-buttons" />').append(e,t)}init(){const{canBeRated:t}=o();t.splice(t.indexOf(this.slug),1);const e=l("Do us a favor!"),s=this.description||l("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 ${this.className?this.className:""}`,content:`<h3>${e}</h3><p>${s}</p>`,buttons:this.buttons.bind(this)}).pointer("open")}}devowlWp_realUtils=e})();
//# sourceMappingURL=https://sourcemap.devowl.io/real-cookie-banner/5.2.28/dedd07dd749e491737179f9f3bfc8332/helper.js.map
