← Back
Editing: feature-Feedback-legacy.js
(function(){System.register([`./rolldown-runtime-legacy.js?v=1795169270504`,`./vendor-utils-legacy.js?v=1795169270504`,`./vendor-vue-legacy.js?v=1795169270504`,`./vendor-naive-legacy.js?v=1795169270504`,`./app-legacy.js?v=1795169270504`,`./app-components-legacy.js?v=1795169270504`,`./app-shared-legacy.js?v=1795169270504`,`./vendor-pdf-legacy.js?v=1795169270504`],function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,ee,h,g,_,v,te,y,b,x,ne,re,ie,ae,oe,se,S,ce,C,w,T,E,D,O,k,A,j,le,ue,de,fe,pe,me,he,M,N,P,F,I,L,R,z,ge,B,_e,V,ve,ye,H,U,W,be,xe,Se,Ce,we,G,K,q,J,Te,Y,X;function Z(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ee(e){if(Array.isArray(e))return Z(e)}function De(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function Q(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){De(a,r,i,o,s,`next`,e)}function s(e){De(a,r,i,o,s,`throw`,e)}o(void 0)})}}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ke(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ae(){throw TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function je(e){return Ee(e)||ke(e)||Me(e)||Ae()}function $(e,t){var n,r,i,a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype),s=Object.defineProperty;return s(o,`next`,{value:c(0)}),s(o,`throw`,{value:c(1)}),s(o,`return`,{value:c(2)}),typeof Symbol==`function`&&s(o,Symbol.iterator,{value:function(){return this}}),o;function c(e){return function(t){return l([e,t])}}function l(s){if(n)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=s[0]&2?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(s[0]===6&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Me(e,t){if(e){if(typeof e==`string`)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(n);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z(e,t)}}return e({n:void 0,r:void 0,t:void 0}),{setters:[function(e){c=e.r},function(e){o=e._n,w=e.Cn,T=e.wn,E=e.Tn,D=e.En,O=e.kn,k=e.An,A=e.jn,j=e.Mn,N=e.gr,P=e.Ln,F=e.Br,R=e.yr,B=e.$r,V=e.Zn,H=e.Sr,U=e.wr,W=e.$n,G=e.ii,K=e.Mr,Te=e.sr,X=e.fr},function(e){Se=e.p,q=e.l,Y=e.o},function(e){n=e._t,r=e.R,i=e.I,a=e.L,s=e.Z},function(e){S=e.Jf,ce=e.qf,fe=e.cf,pe=e.lf,me=e.i,I=e.Tp,L=e.Op,ge=e.Gf,be=e.Ef,xe=e.Df,J=e.Hf},function(e){C=e.B},function(e){z=e.af},function(e){l=e.i,M=e.a}],execute:function(){u=document.createElement(`style`),u.textContent=`.banner[data-v-dc691a66]{background:url(/static/vite/images/banner.png) top/100% no-repeat;width:100%;height:92px;position:relative}.banner .banner-title[data-v-dc691a66]{color:#fff;font-size:17px;position:absolute;top:16px;left:32px}.rating-item[data-v-c528e412]{cursor:pointer;border-radius:2px;justify-content:center;align-items:center;width:40px;height:40px;font-size:1.25rem;font-weight:700;line-height:1.75rem;display:flex}.danger-item[data-v-c528e412]{--un-bg-opacity:1;background-color:rgba(247,207,206,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(239,133,129,var(--un-text-opacity))}.danger-item[data-v-c528e412]:not(:last-child){border-right:1px solid #f8d7d6}.danger-item.active[data-v-c528e412],.danger-item[data-v-c528e412]:hover{--un-bg-opacity:1;background-color:rgba(255,0,0,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(255,255,255,var(--un-text-opacity));border-style:none;transform:scaleY(1.2)}.warning-item[data-v-c528e412]{--un-bg-opacity:1;background-color:rgba(247,230,206,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(247,190,86,var(--un-text-opacity))}.warning-item[data-v-c528e412]:not(:last-child){border-right:1px solid #fceed3}.warning-item.active[data-v-c528e412],.warning-item[data-v-c528e412]:hover{--un-bg-opacity:1;background-color:rgba(255,170,44,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(255,255,255,var(--un-text-opacity));border-style:none;transform:scaleY(1.2)}.success-item[data-v-c528e412]{--un-bg-opacity:1;background-color:rgba(199,247,206,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(105,190,61,var(--un-text-opacity))}.success-item[data-v-c528e412]:not(:last-child){border-right:1px solid #e4f5da}.success-item.active[data-v-c528e412],.success-item[data-v-c528e412]:hover{--un-bg-opacity:1;background-color:rgba(32,165,58,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(255,255,255,var(--un-text-opacity));border-style:none;transform:scaleY(1.2)}.rating-label[data-v-c528e412]{text-align:center;padding-top:10px;padding-bottom:10px;font-size:14px}.danger-text[data-v-c528e412]{--un-text-opacity:1;color:rgba(239,133,129,var(--un-text-opacity));background:linear-gradient(#ffdfdd,#fff)}.warning-text[data-v-c528e412]{--un-text-opacity:1;color:rgba(247,190,86,var(--un-text-opacity));background:linear-gradient(#fff7e6,#fff)}.success-text[data-v-c528e412]{--un-text-opacity:1;color:rgba(105,190,61,var(--un-text-opacity));background:linear-gradient(#d9f7d0,#fff)}.banner[data-v-cedd4689]{background:url(/static/vite/images/banner.png) top/100% no-repeat;width:100%;height:92px;position:relative}.banner .banner-title[data-v-cedd4689]{color:#fff;font-size:17px;position:absolute;top:16px;left:32px}.nps-container[data-v-b35ffb44]{color:var(--border-hover-focus-color);cursor:pointer;background:var(--color-bg-2);border-top-left-radius:8px;border-bottom-left-radius:8px;position:absolute;bottom:10em;right:1px;overflow:hidden;box-shadow:0 0 10px rgba(0,0,0,.1)}.nps-container .nps-box[data-v-b35ffb44]{flex-direction:column;justify-content:center;align-items:center;padding:15px 10px;display:flex}.nps-container .nps-box[data-v-b35ffb44]:hover{color:#fff;background:var(--nps-box-hover-bg)}.nps-container .nps-box:hover span[data-v-b35ffb44]{color:#fff}.nps-container .nps-box span[data-v-b35ffb44]{color:var(--border-hover-focus-color)} /*$vite$:1*/`,document.head.appendChild(u),P(),F(),N(),m={class:`banner`},g={class:`banner-title`},te={class:`ml-8px`},x={class:`pt-24px px-32px`},ie={class:`mt-16px text-primary`},se={class:`flex justify-center mt-20px`},we=j({__name:`submit`,props:{entryId:{}},emits:[`close`],setup:function(e,t){var r=t.emit,i=q().t,a=Y(),o=r,s=``,c=e,l=U(``),u=function(){var e=a.currentRoute.value.path,t={site:502,wp:503,ftp:504,database:505,docker:506,security:507,waf:508,mail:509,files:510,logs:511,ssl_domain:512,aapanelsub:513,terminal:514,crontab:515,softs:516,setting:517,control:518};for(var n in t)if(e.includes(n))return t[n];return 501},d=function(){return{questions:Oe({},s,l.value),submit_entry:c.entryId||u()}},f=function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return l.value.trim()===``?(ge.error(i(`Component.Feedback.index_5`)),[2]):[4,be(d())];case 1:return e.sent(),o(`close`),p(),[2]}})})()},p=function(){var e=J({hideClose:!0,content:function(){return k(`div`,{class:`flex-center flex-col w-230px h-124px bg-#F1F9F3`},[k(`img`,{class:`w-56px`,src:z},null),k(`div`,{class:`mt-16px`},[i(`Component.Feedback.index_6`)])])}});setTimeout(function(){e.hide()},3e3)};return function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,fe()];case 1:return e=t.sent().message,L(e)&&I(e.res)&&e.res.length>0&&(s=e.res[0].id),[2]}})})()}(),function(e,t){var r=C,i=n;return V(),D(`div`,null,[w(`div`,m,[w(`div`,g,[w(`span`,te,G(e.$t(`Component.Feedback.index_1`)),1)])]),w(`div`,x,[k(r,{value:K(l),"onUpdate:value":t[0]||(t[0]=function(e){return R(l)?l.value=e:null}),rows:6},{default:X(function(){return[w(`p`,null,G(e.$t(`Component.Feedback.index_2`)),1),w(`p`,null,G(e.$t(`Component.Feedback.index_3`)),1)]}),_:1},8,[`value`]),w(`div`,ie,G(e.$t(`Component.Feedback.index_4`)),1),w(`div`,se,[k(i,{type:`primary`,class:`w-120px`,onClick:f},{default:X(function(){return[O(G(e.$t(`Public.Btn.Submit`)),1)]}),_:1})])])])}}}),e(`r`,c({default:function(){return Ce}})),Ce=S(we,[[`__scopeId`,`data-v-dc691a66`]]),P(),F(),p={class:`flex border-1px border-solid border-#f3adaa`},h=[`onClick`],v={class:`flex border-1px border-solid border-#f4cf8f`},b=[`onClick`],re={class:`flex border-1px border-solid border-#b8e29f`},oe=[`onClick`],ye=j({__name:`rating`,props:{value:{},valueModifiers:{}},emits:[`update:value`],setup:function(e){var t=Te(e,`value`),n=function(e){t.value=e};return function(e,i){var a=r;return V(),T(a,{class:`justify-center! mb-16px`,size:20},{default:X(function(){return[w(`div`,null,[w(`div`,p,[(V(),D(o,null,W(6,function(e){return w(`div`,{key:e,class:B([`rating-item`,`danger-item`,{active:t.value===e}]),onClick:function(t){return n(e)}},[w(`span`,null,G(e),1)],10,h)}),64))]),i[0]||(i[0]=w(`div`,{class:`rating-label danger-text`},`No`,-1))]),w(`div`,null,[w(`div`,v,[(V(),D(o,null,W(2,function(e){return w(`div`,{key:e+6,class:B([`rating-item`,`warning-item`,{active:t.value===e+6}]),onClick:function(t){return n(e+6)}},[w(`span`,null,G(e+6),1)],10,b)}),64))]),i[1]||(i[1]=w(`div`,{class:`rating-label warning-text`},`Yes`,-1))]),w(`div`,null,[w(`div`,re,[(V(),D(o,null,W(2,function(e){return w(`div`,{key:e+8,class:B([`rating-item`,`success-item`,{active:t.value===e+8}]),onClick:function(t){return n(e+8)}},[w(`span`,null,G(e+8),1)],10,oe)}),64))]),i[2]||(i[2]=w(`div`,{class:`rating-label success-text`},`Must`,-1))])]}),_:1})}}}),ve=S(ye,[[`__scopeId`,`data-v-c528e412`]]),P(),F(),N(),f={class:`banner`},ee={class:`banner-title`},_={class:`ml-8px`},y={key:0,class:`px-24px`},ne={class:`text-primary`},ae={class:`flex justify-center my-20px`},de=j({__name:`form`,emits:[`close`],setup:function(e,t){var r=t.emit,s=q().t,c=U(0),l=r,u=H({}),d=H({}),p=U(null),m=U([]),h=function(){return Q(function(){var e,t;return $(this,function(n){switch(n.label){case 0:return[4,(e=p.value)==null?void 0:e.validate()];case 1:return n.sent(),t={questions:JSON.stringify(m.value.reduce(function(e,t){return e[t.id]=u[t.id],e},{})),rate:c.value,product_type:1},[4,xe(t)];case 2:return n.sent(),l(`close`),g(),[2]}})})()},g=function(){var e=J({hideClose:!0,content:function(){return k(`div`,{class:`flex-center flex-col w-230px h-124px bg-#F1F9F3`},[k(`img`,{class:`w-56px`,src:z},null),k(`div`,{class:`mt-16px`},[s(`Component.Feedback.index_6`)])])}});setTimeout(function(){e.hide()},3e3)};return function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,pe()];case 1:return e=t.sent().message,L(e)&&(m.value=e.res,e.res.forEach(function(e){u[e.id]=``}),e.res.forEach(function(e){e.required===1&&(d[e.id]={required:!0,message:e.question,trigger:[`blur`,`change`]})})),[2]}})})()}(),function(e,t){var r=C,s=i,l=a,g=n;return V(),D(`div`,null,[w(`div`,f,[w(`div`,ee,[w(`span`,_,G(e.$t(`Component.Feedback.index_1`)),1)])]),t[1]||(t[1]=w(`div`,{class:`text-center text-20px font-bold my-20px`},`Would you recommend aaPanel?`,-1)),k(ve,{value:K(c),"onUpdate:value":t[0]||(t[0]=function(e){return R(c)?c.value=e:null})},null,8,[`value`]),K(c)?(V(),D(`div`,y,[k(l,{model:K(u),rules:K(d),ref_key:`formRef`,ref:p},{default:X(function(){return[(V(!0),D(o,null,W(K(m),function(e){return V(),T(s,{label:e.question,path:e.id,key:e.id},{default:X(function(){return[k(r,{value:K(u)[e.id],"onUpdate:value":function(t){return K(u)[e.id]=t},placeholder:e.hint},null,8,[`value`,`onUpdate:value`,`placeholder`])]}),_:2},1032,[`label`,`path`])}),128))]}),_:1},8,[`model`,`rules`]),w(`div`,ne,G(e.$t(`Component.Feedback.index_4`)),1),w(`div`,ae,[k(g,{type:`primary`,class:`w-120px`,onClick:h},{default:X(function(){return[O(G(e.$t(`Public.Btn.Submit`)),1)]}),_:1})])])):E(``,!0)])}}}),ue=c({default:function(){return le}}),le=S(de,[[`__scopeId`,`data-v-cedd4689`]]),P(),N(),M(),d={class:`nps-container`},he=j({__name:`index`,setup:function(e){var t=Se(me()).aiAssistant,n=Y(),r=function(){J({width:600,component:A(function(){return l(function(){return Promise.resolve().then(function(){return ue})},void 0)})})},i=function(){return Q(function(){return $(this,function(e){return n.push(`/ai/chat`),[2]})})()};return function(e,n){var a=s,o=ce;return V(),D(`div`,d,[K(t).isShow?(V(),T(a,{key:0,trigger:`hover`,placement:`left`},{trigger:X(function(){return[w(`div`,{class:`nps-box`,onClick:i},je(n[0]||(n[0]=[w(`i`,{class:`i-common-ai w-18px h-18px`},null,-1)])))]}),default:X(function(){return[n[1]||(n[1]=w(`span`,null,`Click open AI Assistant`,-1))]}),_:1})):E(``,!0),k(a,{trigger:`hover`,placement:`left`},{trigger:X(function(){return[w(`div`,{class:`nps-box`,onClick:r},[k(o,{name:`common-demand`,size:18})])]}),default:X(function(){return[n[2]||(n[2]=w(`span`,null,`Click open survey`,-1))]}),_:1})])}}}),e(`n`,c({default:function(){return _e}})),e(`t`,_e=S(he,[[`__scopeId`,`data-v-b35ffb44`]]))}}})})();
Save File
Cancel