(()=>{"use strict";vare,t={45:(e,t,r)=>{varo=r(609);constn=window.wp.element,s=e=>{lett;constr=newSet,o=(e,o)=>{constn="function"==typeofe?e(t):e;if(!Object.is(n,t)){conste=t;t=(null!=o?o:"object"!=typeofn||null===n)?n:Object.assign({},t,n),r.forEach((r=>r(t,e)))}},n=()=>t,s={setState:o,getState:n,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},a=t=e(o,n,s);returns};vara=r(79);const{useDebugValue:l}=o,{useSyncExternalStoreWithSelector:i}=a;letc=!1;constd=e=>e,u=e=>{"function"!=typeofe&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");constt="function"==typeofe?(e=>e?s(e):s)(e):e,r=(e,r)=>function(e,t=d,r){r&&!c&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),c=!0);consto=i(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);returnl(o),o}(t,e,r);returnObject.assign(r,t),r},p="SET_CURRENT_STEP",m="SET_NPS_RATING",b="SET_SHOW_NPS",f=document.querySelectorAll('[data-id^="nps-survey-"]'),g={};Array.from(f).forEach((e=>{constt=JSON.parse(e.getAttribute("data-vars"));t.npsId=e.dataset.id,g[t.npsId]={showNps:t?.show_if,currentStep:"plugin-rating"===t?.nps_status?.dismiss_step?"plugin-rating":"nps-rating",npsRating:null,npsId:t.npsId}}));consth=(G=(e,{type:t,payload:r,npsId:o})=>{switch(t){caseb:return{...e,[o]:{...e[o],showNps:r}};casep:return{...e,[o]:{...e[o],currentStep:r}};casem:return{...e,[o]:{...e[o],npsRating:r}};default:returne}},A=g,(R=(e,t,r)=>(r.dispatch=t=>(e((e=>G(e,t)),!1,t),t),r.dispatchFromDevtools=!0,{dispatch:(...e)=>r.dispatch(...e),...A}))?u(R):u),y=({children:e})=>(0,o.createElement)("p",{className:"mt-1 mx-0 mb-0 text-base leading-6 font-normal text-zip-body-text"},e),v=({children:e})=>(0,o.createElement)("h3",{className:"my-0 text-lg font-bold leading-7 text-zip-app-heading"},e),x=window.wp.i18n,w=function(e){const{allow_review:t=!1,message:{logo:r,plugin_name:s,nps_rating_title:a,nps_rating_message:l,rating_min_label:i,rating_max_label:c},npsId:d}=e,{dispatch:u}=h(),p=Array.from({length:10},((e,t)=>t+1)),[m,b]=(0,n.useState)(null);return(0,o.createElement)("div",null,(0,o.createElement)("div",{className:"flex items-center justify-start gap-2"},(0,o.createElement)("img",{className:"size-6",src:r,alt:"Brand Logo"}),(0,o.createElement)(v,null,a||s)),(0,o.createElement)(y,null,l.replaceAll("#pluginname",s)),(0,o.createElement)("div",{className:"mt-5"},(0,o.createElement)("span",{className:"isolate inline-flex gap-2 w-full"},p.map((e=>(0,o.createElement)("button",{type:"button",key:e,onClick:()=>asyncfunction(e){null===m&&(b(e),u({npsId:d,type:"SET_NPS_RATING",payload:e}),u(t&&e>=8?{npsId:d,type:"SET_CURRENT_STEP",payload:"plugin-rating"}:{npsId:d,type:"SET_CURRENT_STEP",payload:"comment"}))}(e),className:"relative flex-1 inline-flex items-center justify-center bg-white py-1.5 text-sm font-medium text-nps-button-text hover:bg-gray-50 focus:z-10 border border-solid border-button-disabled rounded-md transition-colors ease-in-out duration-150 hover:cursor-pointer"},e))))),(0,o.createElement)("div",{className:"mt-3 flex items-center justify-between"},(0,o.createElement)("span",{className:"text-secondary-text text-xs font-medium leading-5"},i||(0,x.__)("Very unlikely","nps-survey")),(0,o.createElement)("span",{className:"text-secondary-text text-xs font-medium leading-5"},c||(0,x.__)("Very likely","nps-survey"))))},E=e=>{constt=N(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:e=>{constr=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),k(r,t)||_(e)},getConflictingClassGroupIds:(e,t)=>{constn=r[e]||[];ret