From b4a47714c75bca4e1d11f9d5bc2e6fa9081d2e84 Mon Sep 17 00:00:00 2001 From: GithubAction Date: Thu, 15 Aug 2024 14:17:10 +0000 Subject: [PATCH] deploy with Github Action --- CNAME | 1 + assets/AssistantDetail.1fffdb7f.css | 1 + assets/AssistantDetail.de50d25e.js | 1 + assets/AssistantList.18ee9590.js | 1 + assets/AssistantList.90a8bcc8.css | 1 + assets/CourseDetail.714e0361.js | 1 + assets/CourseList.14009eb9.js | 1 + assets/CoursesSurveys.8ca81c48.css | 1 + assets/CoursesSurveys.cdddf115.js | 6 ++ assets/Editor.86746698.css | 1 + assets/Editor.925d2886.js | 54 +++++++++++ assets/Email.7cb9fcda.js | 1 + assets/Group.67b1b29b.js | 1 + assets/Group.ef60d323.css | 1 + assets/GroupDetail.1b887e39.js | 1 + assets/GroupDetail.6e8f4b29.css | 1 + assets/LoginVertify.6f28bdda.js | 1 + assets/Message.62489297.js | 1 + assets/Message.ccbb6705.css | 1 + assets/SurveysDetail.0a67fffd.css | 1 + assets/SurveysDetail.76127e41.js | 3 + assets/SurveysList.9a5dfef4.js | 1 + assets/SurveysManage.6cae3bb4.js | 1 + assets/Tag.b37fedca.js | 1 + assets/TaskDetail.18b9d897.js | 1 + assets/TaskDetail.5b81e0f0.css | 1 + assets/TaskList.61046ad0.js | 1 + assets/TaskList.7a05c82b.css | 1 + assets/Title.6dabcd7d.js | 1 + assets/TitleDetail.1a506190.js | 1 + assets/TrainingDetail.0132ccae.css | 1 + assets/TrainingDetail.da056f6e.js | 10 ++ assets/TrainingList.b1d29442.css | 1 + assets/TrainingList.d740d369.js | 1 + assets/UserDetail.32738f2e.js | 1 + assets/UserGroupDetail.2bff92de.js | 1 + assets/UserGroupList.b6f36eee.js | 1 + assets/assistant.75b6582c.js | 1 + assets/bsTab.2b88d9c2.js | 1 + assets/courses.e53b42ef.js | 1 + assets/date.27781dd8.js | 1 + assets/index.18edd2cb.js | 88 ++++++++++++++++++ assets/index.b733d6eb.css | 6 ++ assets/logo-rpg.b1e0a696.svg | 1 + assets/material-icons-outlined.35dca8a7.woff2 | Bin 0 -> 155276 bytes assets/material-icons-outlined.8e94758c.woff | Bin 0 -> 182028 bytes assets/material-icons-round.1c135b15.woff | Bin 0 -> 206260 bytes assets/material-icons-round.c948f126.woff2 | Bin 0 -> 173620 bytes assets/material-icons-sharp.d31bfb81.woff2 | Bin 0 -> 135984 bytes assets/material-icons-sharp.fa3888ef.woff | Bin 0 -> 156236 bytes assets/material-icons-two-tone.1e673ba8.woff2 | Bin 0 -> 215704 bytes assets/material-icons-two-tone.3d34f30a.woff | Bin 0 -> 339600 bytes assets/material-icons.8265f647.woff2 | Bin 0 -> 128352 bytes assets/material-icons.fd84f88b.woff | Bin 0 -> 164912 bytes assets/notification.4467b384.js | 1 + assets/surveys.c02433fb.js | 1 + assets/tab.68fa44ea.js | 5 + assets/task-tags.fad0dc56.js | 1 + assets/task.8f86f14f.js | 1 + assets/training.1136c2ba.js | 1 + assets/vue-select.b0fac2a1.css | 1 + favicon.ico | Bin 0 -> 4286 bytes font/NotoSansTC-Regular.otf | Bin 0 -> 5766468 bytes images/hexschool_logo.svg | 1 + images/template1.svg | 1 + images/template2.svg | 1 + index.html | 15 +++ 67 files changed, 234 insertions(+) create mode 100644 CNAME create mode 100644 assets/AssistantDetail.1fffdb7f.css create mode 100644 assets/AssistantDetail.de50d25e.js create mode 100644 assets/AssistantList.18ee9590.js create mode 100644 assets/AssistantList.90a8bcc8.css create mode 100644 assets/CourseDetail.714e0361.js create mode 100644 assets/CourseList.14009eb9.js create mode 100644 assets/CoursesSurveys.8ca81c48.css create mode 100644 assets/CoursesSurveys.cdddf115.js create mode 100644 assets/Editor.86746698.css create mode 100644 assets/Editor.925d2886.js create mode 100644 assets/Email.7cb9fcda.js create mode 100644 assets/Group.67b1b29b.js create mode 100644 assets/Group.ef60d323.css create mode 100644 assets/GroupDetail.1b887e39.js create mode 100644 assets/GroupDetail.6e8f4b29.css create mode 100644 assets/LoginVertify.6f28bdda.js create mode 100644 assets/Message.62489297.js create mode 100644 assets/Message.ccbb6705.css create mode 100644 assets/SurveysDetail.0a67fffd.css create mode 100644 assets/SurveysDetail.76127e41.js create mode 100644 assets/SurveysList.9a5dfef4.js create mode 100644 assets/SurveysManage.6cae3bb4.js create mode 100644 assets/Tag.b37fedca.js create mode 100644 assets/TaskDetail.18b9d897.js create mode 100644 assets/TaskDetail.5b81e0f0.css create mode 100644 assets/TaskList.61046ad0.js create mode 100644 assets/TaskList.7a05c82b.css create mode 100644 assets/Title.6dabcd7d.js create mode 100644 assets/TitleDetail.1a506190.js create mode 100644 assets/TrainingDetail.0132ccae.css create mode 100644 assets/TrainingDetail.da056f6e.js create mode 100644 assets/TrainingList.b1d29442.css create mode 100644 assets/TrainingList.d740d369.js create mode 100644 assets/UserDetail.32738f2e.js create mode 100644 assets/UserGroupDetail.2bff92de.js create mode 100644 assets/UserGroupList.b6f36eee.js create mode 100644 assets/assistant.75b6582c.js create mode 100644 assets/bsTab.2b88d9c2.js create mode 100644 assets/courses.e53b42ef.js create mode 100644 assets/date.27781dd8.js create mode 100644 assets/index.18edd2cb.js create mode 100644 assets/index.b733d6eb.css create mode 100644 assets/logo-rpg.b1e0a696.svg create mode 100644 assets/material-icons-outlined.35dca8a7.woff2 create mode 100644 assets/material-icons-outlined.8e94758c.woff create mode 100644 assets/material-icons-round.1c135b15.woff create mode 100644 assets/material-icons-round.c948f126.woff2 create mode 100644 assets/material-icons-sharp.d31bfb81.woff2 create mode 100644 assets/material-icons-sharp.fa3888ef.woff create mode 100644 assets/material-icons-two-tone.1e673ba8.woff2 create mode 100644 assets/material-icons-two-tone.3d34f30a.woff create mode 100644 assets/material-icons.8265f647.woff2 create mode 100644 assets/material-icons.fd84f88b.woff create mode 100644 assets/notification.4467b384.js create mode 100644 assets/surveys.c02433fb.js create mode 100644 assets/tab.68fa44ea.js create mode 100644 assets/task-tags.fad0dc56.js create mode 100644 assets/task.8f86f14f.js create mode 100644 assets/training.1136c2ba.js create mode 100644 assets/vue-select.b0fac2a1.css create mode 100644 favicon.ico create mode 100644 font/NotoSansTC-Regular.otf create mode 100644 images/hexschool_logo.svg create mode 100644 images/template1.svg create mode 100644 images/template2.svg create mode 100644 index.html diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..98e90d3 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +rpg-admin.hexschool.com diff --git a/assets/AssistantDetail.1fffdb7f.css b/assets/AssistantDetail.1fffdb7f.css new file mode 100644 index 0000000..1d70afb --- /dev/null +++ b/assets/AssistantDetail.1fffdb7f.css @@ -0,0 +1 @@ +.card-body-height{height:300px;overflow:hidden;overflow-y:auto}.vs__dropdown-menu{max-height:200px} diff --git a/assets/AssistantDetail.de50d25e.js b/assets/AssistantDetail.de50d25e.js new file mode 100644 index 0000000..45c4a7c --- /dev/null +++ b/assets/AssistantDetail.de50d25e.js @@ -0,0 +1 @@ +import{l as ps,D as bs,r as n,s as H,m as J,o as ms,z as K,a as d,c,b as s,A as Q,f as gs,h as v,g as P,F as b,q as m,w as G,C as D,p as ks,x as g,E as fs,G as ys,$ as ws}from"./index.18edd2cb.js";/* empty css */import{b as Ls}from"./bsTab.2b88d9c2.js";import{a as xs}from"./assistant.75b6582c.js";import{a as Ts}from"./task.8f86f14f.js";import"./tab.68fa44ea.js";const Cs={class:"about px-4 mt-4"},As={class:"border-bottom border-light pb-2 mb-4"},$s={"aria-label":"breadcrumb"},Gs={class:"breadcrumb"},Ds={class:"breadcrumb-item"},Vs=s("li",{class:"breadcrumb-item active","aria-current":"page"},"\u7DE8\u8F2F\u52A9\u6559",-1),Es=s("h1",{class:"fs-4 mb-0"},"\u7DE8\u8F2F\u52A9\u6559",-1),Ss={id:"assistantDetail",class:"col-md-5"},Ns={class:"assistant card shadow-sm rounded-4 overflow-hidden mb-4"},Us={class:"card-header bg-white py-3"},Ms=s("div",{style:{width:"60px",height:"60px"},class:"rounded-circle mx-auto bg-light mb-1"},null,-1),Ps={class:"text-center mb-0"},zs={class:"card-body"},Bs={class:"d-flex align-items-center"},js=s("span",{class:"material-icons-outlined me-1"},"email",-1),Fs={class:"d-flex"},Is=s("span",{class:"material-icons-outlined me-1"},"face",-1),Rs={class:"col-md-12"},qs={class:"nav nav-tabs",role:"tablist"},Os=["id","aria-controls","data-bs-target","onClick"],Hs={class:"tab-content mb-5",id:"myTabContent"},Js={class:"tab-pane fade show active",id:"assistantTab",role:"tabpanel","aria-labelledby":"assistant-tab"},Ks={class:"mt-4 card shadow-sm rounded-4 overflow-hidden mb-4"},Qs=s("div",{class:"card-header bg-white py-3"},[s("h2",{class:"fs-6 mb-0 lh-base"},"\u52A9\u6559\u7A31\u865F")],-1),Ws={class:"card-body card-body-height"},Xs={class:"list list-unstyled"},Ys={class:"form-check"},Zs=["id","value","checked"],se=["for"],ee=s("hr",null,null,-1),te={class:"card-footer bg-white text-end py-3"},ae={class:"tab-pane fade",id:"coursesTab",role:"tabpanel","aria-labelledby":"courses-tab"},oe={class:"mt-4 row position-relative align-items-start"},le={class:"col-md-4 users-sticky-md-top",style:{top:"80px"}},ie={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},ne=s("div",{class:"card-header bg-white py-3"},[s("h2",{class:"fs-6 mb-0 lh-base"},"\u53EF\u6279\u6539\u7684\u4F5C\u696D\u5217\u8868")],-1),de={class:"card-body card-body-height"},ce={class:"list list-unstyled"},re=s("hr",null,null,-1),ue={class:"col-md-8"},he={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},_e={class:"card-header bg-white py-3"},ve={class:"form-check"},pe=s("label",{class:"h2 fs-6 mb-0 lh-base",for:"assistantAll"},"\u6279\u6539\u8AB2\u7A0B\u8A2D\u5B9A",-1),be={class:"card-body card-body-height"},me={class:"list list-unstyled"},ge={class:"form-check"},ke=["id","value","checked"],fe=["for"],ye=s("hr",null,null,-1),we={class:"card-footer bg-white text-end py-3"},Le={class:"tab-pane fade",id:"tasksTab",role:"tabpanel","aria-labelledby":"tasks-tab"},xe={class:"mt-4 row position-relative align-items-start"},Te={class:"col-md-4 users-sticky-md-top",style:{top:"80px"}},Ce={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Ae=s("div",{class:"card-header bg-white py-3"},[s("h2",{class:"fs-6 mb-0 lh-base"},"\u53EF\u6279\u6539\u7684\u4EFB\u52D9\u5217\u8868")],-1),$e={class:"card-body card-body-height"},Ge={id:"task-group",class:"list-unstyled mb-0"},De=["aria-controls","href"],Ve={class:"fw-bold"},Ee=["id"],Se={class:"list list-unstyled"},Ne={class:"col-md-8"},Ue={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Me=s("div",{class:"card-header bg-white py-3 fw-bold"}," \u6279\u6539\u4EFB\u52D9\u8A2D\u5B9A ",-1),Pe={class:"card-body card-body-height"},ze={key:0,class:"form-check"},Be=s("label",{class:"h2 fs-6 mb-0 lh-base",for:"tasksAll"},"\u5168\u9078",-1),je={id:"task-list",class:"list list-unstyled mt-3"},Fe={class:"form-check"},Ie=["id","value"],Re=["for"],qe=s("hr",null,null,-1),Oe={class:"card-footer bg-white text-end py-3"},st={__name:"AssistantDetail",setup(He){const{apiGetVideoCoursesList:W,apiGetAssistantDetail:X,apiPutAssistantDetail:Y,apiGetAssistantsTitles:Z,apiPutAssistantTasks:ss,apiDeleteAssistantTasks:es}=xs,{apiGetTaskGroupsList:ts,apiGetTasks:as}=Ts,os=ps(),k=bs.useLoading(),S=(a,t,o)=>a.map(r=>(r[t]=o,r)),y=n([]),h=n([]),_=n([]),w=n(!1),ls=()=>{w.value?(_.value=[],y.value.forEach(a=>{_.value.push(a.id)})):_.value=[]};H(()=>_.value,()=>{y.value.length!==0&&_.value.length===y.value.length?w.value=!0:w.value=!1},{deep:!0});const is=()=>{y.value.forEach(a=>{h.value.video_courses.forEach(t=>{a.id===t.id&&(a.isChecked=!0,_.value.push(a.id))})})},ns=async()=>{const a=k.show();try{_.value=[];const{courses:t}=await W();y.value=S(t,"isChecked",!1),is()}catch(t){g("danger","\u53D6\u5F97\u8AB2\u7A0B\u5217\u8868\u5931\u6557",`${t.response.data.statusCode}:${t.response.data.message}`)}finally{a.hide()}},N=n([]),L=n([]),ds=()=>{N.value.forEach(a=>{h.value.assistant_titles.forEach(t=>{a.id===t.id&&(a.isChecked=!0,L.value.push(a.id))})})},cs=async()=>{const a=k.show();try{L.value=[];const{assistant_titles:t}=await Z();N.value=S(t,"isChecked",!1),ds()}catch(t){g("danger","\u53D6\u5F97\u52A9\u6559\u7A31\u865F\u5931\u6557",`${t.response.data.statusCode}:${t.response.data.message}`)}finally{a.hide()}},p=n(""),U=n([]),x=n({taskGroupsList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),V=n(1),rs=async(a=1)=>{var o,r,e,i;const t=k.show();try{const{task_groups:l,pagination:f}=await ts({count:150,page:a});x.value.taskGroupsList=l,x.value.pagination=f,V.value=f.current_page,U.value=[...U.value,...x.value.taskGroupsList]}catch(l){g("danger","\u53D6\u5F97\u4EFB\u52D9\u7FA4\u7D44\u5217\u8868\u5931\u6557",`${(r=(o=l==null?void 0:l.response)==null?void 0:o.data)==null?void 0:r.statusCode} : ${(i=(e=l==null?void 0:l.response)==null?void 0:e.data)==null?void 0:i.message}`)}finally{t.hide()}},z=async(a=1)=>{await rs(a),x.value.pagination.total_page!==0&&V.value!==x.value.pagination.total_page&&(V.value+=1,z(V.value))},T=n([]),C=n({tasksList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),E=n(1),B=n(null),us=async(a=1)=>{var o,r,e,i;const t=k.show();try{const{tasks:l,pagination:f}=await as({count:100,page:a,scoped:B.value});C.value.tasksList=S(l,"isChecked",!1),C.value.tasksList=l,C.value.pagination=f,E.value=f.current_page,T.value=[...T.value,...l]}catch(l){g("danger","\u53D6\u5F97\u6307\u5B9A\u7684\u4EFB\u52D9\u7FA4\u7D44\u4EFB\u52D9\u5217\u8868\u5931\u6557",`${(r=(o=l==null?void 0:l.response)==null?void 0:o.data)==null?void 0:r.statusCode} : ${(i=(e=l==null?void 0:l.response)==null?void 0:e.data)==null?void 0:i.message}`)}finally{t.hide()}},j=n(""),u=n([]),M=async a=>{var o,r;const t=k.show();try{const e=await X(a);h.value=e,u.value=[],e.task_groups.forEach(i=>{i.tasks&&i.tasks.forEach(l=>{u.value.push({id:l.id,task_group_id:i.id})})}),ns(),cs()}catch(e){g("danger","\u53D6\u5F97\u52A9\u6559\u8CC7\u8A0A\u5931\u6557",`${(o=e.response)==null?void 0:o.data.statusCode}:${(r=e.response)==null?void 0:r.data.message}`)}finally{t.hide()}},F=async(a=1)=>{await us(a),C.value.pagination.total_page!==0&&E.value!==C.value.pagination.total_page&&(E.value+=1,F(E.value))},hs=async a=>{j.value=a,B.value=`&filter=task_group&task_group_id=${j.value}`,T.value=[],await F()},I=async a=>{const t=k.show();try{const o={video_course_list:_.value,assistant_title_list:L.value};await Y(a,o),g("success","\u66F4\u65B0\u6210\u529F","\u5DF2\u6210\u529F\u7DE8\u8F2F\u52A9\u6559\u8A2D\u5B9A"),M(a)}catch(o){g("danger","\u66F4\u65B0\u52A9\u6559\u8CC7\u8A0A\u5931\u6557",`${o.response.data.statusCode}:${o.response.data.message}`)}finally{t.hide()}},A=n([]),$=n(!1),R=()=>{var a;if(A.value=T.value.map(t=>({id:t.id,task_group_id:p.value})),$.value)u.value.length===0&&u.value.push(...A.value),A.value.forEach(t=>{u.value.findIndex(r=>r.id===t.id)===-1&&u.value.push(t)});else{const t=A.value.map(o=>o.id);u.value=(a=u.value)==null?void 0:a.filter(o=>{if(!t.includes(o.id))return o}),A.value=[]}},_s=()=>{u.value.some(t=>p.value===t.task_group_id)?($.value=!0,R()):$.value=!1},vs=async a=>{const t=k.show();try{let o=[];u.value.length>0?(o=u.value.reduce((e,i)=>{let l=e.find(f=>f.task_group_id===i.task_group_id);return l||(l={id:i.task_group_id,task_ids:[]},e.push(l)),l.task_ids.push(i.id),e},[]),await ss(a,{task_groups:o})):await es(a),M(a)}catch(o){g("danger","\u66F4\u65B0\u52A9\u6559\u53EF\u6279\u6539\u4EFB\u52D9\u8A2D\u5B9A\u5931\u6557",`${o.response.data.statusCode}:${o.response.data.message}`)}finally{t.hide()}},q=J([]),O=J([{id:"assistant-tab",name:"\u52A9\u6559\u7A31\u865F\u8A2D\u5B9A",target:"assistantTab",active:!0,danger:!1,element:null},{id:"courses-tab",name:"\u6279\u6539\u8AB2\u7A0B\u8A2D\u5B9A",target:"coursesTab",active:!1,danger:!1,element:null},{id:"tasks-tab",name:"\u6279\u6539\u4EFB\u52D9\u8A2D\u5B9A",target:"tasksTab",active:!1,danger:!1,element:null}]);return ms(()=>{const a=os.params.id;M(a),z(),Ls(q,O)}),H(()=>p.value,async()=>{p.value&&(await hs(p.value),_s())}),(a,t)=>{const o=K("router-link"),r=K("v-select");return d(),c("div",Cs,[s("header",As,[s("nav",$s,[s("ol",Gs,[s("li",Ds,[Q(o,{to:"/admin/assistants/list"},{default:gs(()=>[P(" \u52A9\u6559\u7BA1\u7406 ")]),_:1})]),Vs])]),Es]),s("div",Ss,[s("div",Ns,[s("div",Us,[Ms,s("h5",Ps,v(h.value.nickname),1)]),s("div",zs,[s("p",Bs,[js,P(" "+v(h.value.email),1)]),s("div",Fs,[Is,s("div",null,[(d(!0),c(b,null,m(h.value.assistant_titles,e=>(d(),c("span",{key:e.id,class:"badge bg-light text-dark me-1"},v(e.name),1))),128))])])])])]),s("div",Rs,[s("ul",qs,[(d(!0),c(b,null,m(O,e=>(d(),c("li",{class:"nav-item",role:"presentation",key:e.id},[s("button",{class:fs(["nav-link border",{active:e.active,"text-danger bg-danger bg-opacity-10":e.danger}]),id:e.id,type:"button",role:"tab","aria-controls":e.id,"aria-selected":"true","data-bs-target":`#${e.target}`,ref_for:!0,ref:i=>q.push(i),onClick:ys(i=>e.element.show(),["prevent"])},v(e.name),11,Os)]))),128))])]),s("div",Hs,[s("div",Js,[s("div",Ks,[Qs,s("div",Ws,[s("ul",Xs,[(d(!0),c(b,null,m(N.value,e=>(d(),c("li",{key:e.id,class:"list-item"},[s("div",Ys,[G(s("input",{id:e.name,"onUpdate:modelValue":t[0]||(t[0]=i=>L.value=i),class:"form-check-input",type:"checkbox",value:e.id,checked:e.isChecked},null,8,Zs),[[D,L.value]]),s("span",{class:"d-inline-block rounded-pill me-1",style:ws([{width:"10px",height:"10px"},`background-color:${e.color_code}`])},null,4),s("label",{class:"form-check-label",for:e.name},v(e.name),9,se)]),ee]))),128))])]),s("div",te,[s("button",{type:"button",class:"btn btn-primary",onClick:t[1]||(t[1]=e=>I(h.value.user_id))}," \u66F4\u65B0 ")])])]),s("div",ae,[s("div",oe,[s("div",le,[s("div",ie,[ne,s("div",de,[s("ul",ce,[(d(!0),c(b,null,m(h.value.video_courses,e=>(d(),c("li",{key:e.id,class:"list-item"},[P(v(e.name)+" ",1),re]))),128))])])])]),s("div",ue,[s("div",he,[s("div",_e,[s("div",ve,[G(s("input",{id:"assistantAll","onUpdate:modelValue":t[2]||(t[2]=e=>w.value=e),class:"form-check-input",type:"checkbox",onChange:ls},null,544),[[D,w.value]]),pe])]),s("div",be,[s("ul",me,[(d(!0),c(b,null,m(y.value,e=>(d(),c("li",{key:e.id,class:"list-item"},[s("div",ge,[G(s("input",{id:e.id,"onUpdate:modelValue":t[3]||(t[3]=i=>_.value=i),class:"form-check-input",type:"checkbox",value:e.id,checked:e.isChecked},null,8,ke),[[D,_.value]]),s("label",{class:"form-check-label",for:e.id},v(e.name),9,fe)]),ye]))),128))])]),s("div",we,[s("button",{type:"button",class:"btn btn-primary",onClick:t[4]||(t[4]=e=>I(h.value.user_id))}," \u66F4\u65B0 ")])])])])]),s("div",Le,[s("div",xe,[s("div",Te,[s("div",Ce,[Ae,s("div",$e,[s("ul",Ge,[(d(!0),c(b,null,m(h.value.task_groups,e=>(d(),c("li",{key:e.id,class:"mb-2 task-group"},[s("a",{class:"d-flex justify-content-between align-items-center text-decoration-none bg-light text-primary rounded mb-1 px-2 py-1","data-bs-toggle":"collapse",role:"button","aria-expanded":"false","aria-controls":e.id,href:`#checkedTaskList-${e.id}`},[s("span",Ve,v(e.name),1)],8,De),s("div",{class:"collapse",id:`checkedTaskList-${e.id}`},[s("ul",Se,[(d(!0),c(b,null,m(e.tasks,i=>(d(),c("li",{key:i.id,class:"list-item px-1 mb-1 task-item"},v(i.name),1))),128))])],8,Ee)]))),128))])])])]),s("div",Ne,[s("div",Ue,[Me,s("div",Pe,[Q(r,{id:"v-select",class:"mb-2",modelValue:p.value,"onUpdate:modelValue":t[5]||(t[5]=e=>p.value=e),options:U.value,label:"name",clearable:!1,reduce:e=>e.id},null,8,["modelValue","options","reduce"]),p.value?(d(),c("div",ze,[G(s("input",{id:"tasksAll","onUpdate:modelValue":t[6]||(t[6]=e=>$.value=e),class:"form-check-input",type:"checkbox",onChange:R},null,544),[[D,$.value]]),Be])):ks("",!0),s("ul",je,[(d(!0),c(b,null,m(T.value,e=>(d(),c("li",{class:"list-item",key:e.id},[s("div",Fe,[G(s("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[7]||(t[7]=i=>u.value=i),id:e.id,value:{task_group_id:p.value,id:e.id}},null,8,Ie),[[D,u.value]]),s("label",{class:"form-check-label",for:e.id},v(e.name),9,Re)]),qe]))),128))])]),s("div",Oe,[s("button",{type:"button",class:"btn btn-primary",onClick:t[8]||(t[8]=e=>vs(h.value.user_id))}," \u66F4\u65B0\u4EFB\u52D9 ")])])])])])])])}}};export{st as default}; diff --git a/assets/AssistantList.18ee9590.js b/assets/AssistantList.18ee9590.js new file mode 100644 index 0000000..e08df74 --- /dev/null +++ b/assets/AssistantList.18ee9590.js @@ -0,0 +1 @@ +import{_ as w,D as k,r as b,o as L,z as A,a as t,c as e,b as s,F as p,q as u,x as g,h as r,G as C,A as $,f as B,g as I,S,T as D}from"./index.18edd2cb.js";import{a as G}from"./assistant.75b6582c.js";const _=i=>(S("data-v-07e438cb"),i=i(),D(),i),M={class:"about px-4 mt-4 position-relative"},N=_(()=>s("header",{class:"d-flex align-items-center justify-content-between border-bottom border-light pb-2 mb-4"},[s("h1",{class:"fs-4 mb-0"}," \u52A9\u6559\u7BA1\u7406 ")],-1)),V={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},z={class:"card-body p-0"},F={class:"table-responsive"},T={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},j=_(()=>s("thead",{class:"bg-light"},[s("tr",null,[s("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"}," \u66B1\u7A31 "),s("th",{scope:"col",class:"py-3 text-muted border-0"}," \u6279\u6539\u5217\u8868 "),s("th",{scope:"col",class:"py-3 text-muted border-0"}," \u52A9\u6559\u7A31\u865F "),s("th",{scope:"col",class:"py-3 text-muted pe-3 border-0"}," \u7DE8\u8F2F ")])],-1)),q={class:"text-nowrap"},E={scope:"row",class:"ps-4"},O={class:"fs-6 mb-0"},H={class:"mb-0 text-muted"},J={class:"dropdown"},K=["onClick"],P={class:"dropdown-menu","aria-labelledby":"dropdownCourseButton"},Q={key:1,class:"p-1"},R=_(()=>s("small",null,"\u9084\u6C92\u6709\u52A0\u5165\u8AB2\u7A0B\u5594\uFF01",-1)),U=[R],W={style:{"max-width":"100px"}},X={class:"d-flex flex-wrap"},Y={class:"pe-3"},Z=_(()=>s("span",{class:"material-icons align-middle fs-6"}," edit ",-1)),ss={__name:"AssistantList",setup(i){const{apiGetAssistantList:v,apiGetAssistantDetail:y}=G,h=k.useLoading(),m=b([]);L(async()=>{const l=h.show();try{const{assistants:o}=await v();m.value=o}catch(o){g("danger","\u53D6\u5F97\u52A9\u6559\u5217\u8868\u5931\u6557",`${o.response.data.statusCode}:${o.response.data.message}`)}finally{l.hide()}});const c=b([]),f=async l=>{const o=h.show();try{c.value={};const{video_courses:a}=await y(l);c.value=a}catch(a){g("danger","\u53D6\u5F97\u52A9\u6559\u8CC7\u8A0A\u5931\u6557",`${a.response.data.statusCode}:${a.response.data.message}`)}finally{o.hide()}};return(l,o)=>{const a=A("router-link");return t(),e("div",M,[N,s("div",V,[s("div",z,[s("div",F,[s("table",T,[j,s("tbody",q,[(t(!0),e(p,null,u(m.value,n=>(t(),e("tr",{key:n.user_id,class:"align-middle"},[s("td",E,[s("h5",O,r(n.nickname),1),s("p",H,r(n.email),1)]),s("td",null,[s("div",J,[s("a",{id:"dropdownCourseButton",href:"#","data-bs-toggle":"dropdown",onClick:C(d=>f(n.user_id),["prevent"])}," \u5C55\u958B\u5217\u8868 ",8,K),s("ul",P,[c.value.length?(t(!0),e(p,{key:0},u(c.value,d=>(t(),e("li",{key:d.id,class:"p-1"},[s("small",null,r(d.name),1)]))),128)):(t(),e("li",Q,U))])])]),s("td",W,[s("div",X,[(t(!0),e(p,null,u(n.assistant_titles,(d,x)=>(t(),e("span",{key:x,class:"badge bg-light text-dark me-1 mb-1"},r(d),1))),128))])]),s("td",Y,[$(a,{to:`/admin/assistants/list/${n.user_id}`,class:"btn btn-sm btn-outline-gray"},{default:B(()=>[Z,I(" \u7DE8\u8F2F ")]),_:2},1032,["to"])])]))),128))])])])])])])}}},as=w(ss,[["__scopeId","data-v-07e438cb"]]);export{as as default}; diff --git a/assets/AssistantList.90a8bcc8.css b/assets/AssistantList.90a8bcc8.css new file mode 100644 index 0000000..2126960 --- /dev/null +++ b/assets/AssistantList.90a8bcc8.css @@ -0,0 +1 @@ +.dropdown-menu[data-v-07e438cb]{max-height:150px;overflow:auto} diff --git a/assets/CourseDetail.714e0361.js b/assets/CourseDetail.714e0361.js new file mode 100644 index 0000000..543f996 --- /dev/null +++ b/assets/CourseDetail.714e0361.js @@ -0,0 +1 @@ +import{l as R,D as j,m as $,r as U,o as z,z as w,a as r,c,b as e,A as o,f as y,F as v,q as f,p as V,x as b,g as H,E as _,G as P,h as p,w as T,R as O,C as J}from"./index.18edd2cb.js";import{b as K}from"./bsTab.2b88d9c2.js";import{a as Q}from"./courses.e53b42ef.js";import{a as W}from"./assistant.75b6582c.js";import"./tab.68fa44ea.js";const X={class:"about px-4 mt-4"},Y={class:"border-bottom border-light pb-2 mb-4"},Z={"aria-label":"breadcrumb"},ee={class:"breadcrumb"},se={class:"breadcrumb-item"},ae=e("li",{class:"breadcrumb-item active","aria-current":"page"}," \u7DE8\u8F2F\u8AB2\u7A0B ",-1),te=e("h1",{class:"fs-4 mb-0"}," \u7DE8\u8F2F\u8AB2\u7A0B ",-1),le={class:"row"},oe={class:"col-md-4"},ie={id:"list-tab",class:"list-group mb-3 mb-md-0",role:"tablist"},de=["id","href","aria-controls","onClick"],ne={class:"col-md-8"},re={id:"nav-tabContent",class:"tab-content"},ce={id:"list-home","data-bs-target":"list-home",class:"tab-pane fade show active",role:"tabpanel","aria-labelledby":"list-home-list"},ue={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},me=e("div",{class:"card-header bg-white py-3"},[e("h2",{class:"fs-6 mb-0 lh-base"}," \u8AB2\u7A0B\u8A2D\u5B9A ")],-1),_e={class:"card-body"},be={class:"mb-3"},he=e("label",{for:"name",class:"form-label"},"\u8AB2\u7A0B\u540D\u7A31",-1),ve={class:"mb-3"},fe=e("label",{for:"assistants",class:"form-label"},"\u9810\u8A2D\u52A9\u6559",-1),pe=e("option",{value:"",disabled:""}," \u8ACB\u9078\u64C7\u52A9\u6559 ",-1),ye=["value"],ge={class:"text-end"},we=["disabled"],Ve={key:0,id:"udemy_info","data-bs-target":"udemy_info",class:"tab-pane fade",role:"tabpanel","aria-labelledby":"list-udemy-list"},ke={class:"card shadow-sm rounded-4 overflow-hidden mb-4",role:"tabpanel","aria-labelledby":"list-home-list"},Ce=e("div",{class:"card-header bg-white py-3"},[e("h2",{class:"fs-6 mb-0 lh-base"}," Udemy \u8A2D\u5B9A ")],-1),xe={class:"card-body"},De={class:"mb-3"},$e=e("label",{for:"udemy-name",class:"form-label"},"\u8AB2\u7A0B\u540D\u7A31",-1),Ue={class:"mb-3"},Te=e("label",{for:"description",class:"form-label"},"\u8AB2\u7A0B\u63CF\u8FF0",-1),Me=["innerHTML"],qe={class:"mb-3"},Le=e("label",{for:"abbr-name",class:"form-label"},"\u8AB2\u7A0B\u7E2E\u5BEB",-1),Se={class:"mb-3"},Ie=e("label",{for:"amount",class:"form-label"},"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",-1),Ae={key:1,id:"teachable_info","data-bs-target":"teachable_info",class:"tab-pane fade",role:"tabpanel","aria-labelledby":"list-teachable-list"},Fe={class:"card shadow-sm rounded-4 overflow-hidden mb-4",role:"tabpanel","aria-labelledby":"list-home-list"},Ne=e("div",{class:"card-header bg-white py-3"},[e("h2",{class:"fs-6 mb-0 lh-base"}," Teachable \u8A2D\u5B9A ")],-1),Ee={class:"card-body"},Be={class:"mb-3"},Ge=e("label",{for:"teachableId",class:"form-label"},"Teachable ID",-1),Re={class:"mb-3"},je=e("label",{for:"teachableName",class:"form-label"},"\u8AB2\u7A0B\u540D\u7A31",-1),ze={class:"mb-3"},He=e("label",{for:"teachableAmount",class:"form-label"},"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",-1),Pe={id:"list-lectures","data-bs-target":"list-teachable",class:"tab-pane fade",role:"tabpanel","aria-labelledby":"list-lectures-list"},Oe={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Je=e("div",{class:"card-header bg-white py-3 d-flex"},[e("h2",{class:"fs-6 mb-0 lh-base",style:{"margin-right":"260px"}}," Teachable \u7AE0\u7BC0 "),e("h2",{class:"fs-6 mb-0 lh-base"}," Udemy \u7AE0\u7BC0 ")],-1),Ke={class:"card-body pt-2"},Qe={class:"row"},We={class:"col-md-6"},Xe={class:"list-group list-group-numbered"},Ye={class:"w-100"},Ze={class:"fw-bold mb-2"},es={class:"list-group mb-3"},ss={class:"col-md-6"},as={class:"list-group list-group-numbered"},ts={class:"w-100"},ls={class:"fw-bold mb-2"},os={class:"list-group mb-3"},is={id:"list-surveys","data-bs-target":"list-surveys",class:"tab-pane fade",role:"tabpanel","aria-labelledby":"list-surveys-list"},ds={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},ns=e("div",{class:"card-header bg-white py-3"},[e("h2",{class:"fs-6 mb-0 lh-base"}," \u8A55\u50F9\u8A2D\u5B9A ")],-1),rs={class:"card-body"},cs={class:"mb-3"},us=e("p",null,"\u8A55\u50F9\u529F\u80FD",-1),ms={class:"form-check form-switch"},_s=e("label",{class:"form-check-label",for:"flexSwitchCheckDefault"},"\u958B\u555F/\u95DC\u9589",-1),bs={class:"mb-3"},hs=e("label",{for:"course-seconds",class:"form-label"},"\u8A72\u8AB2\u7A0B\u6709\u88AB\u8A55\u50F9\u7684\u6642\u6578\u9577\u5EA6(\u79D2)",-1),vs=e("div",{class:"form-text"}," \u8ACB\u5230 Teachable \u8A08\u7B97\u4E94\u500B\u7AE0\u7BC0\u7684\u5F71\u97F3\u7AE0\u7BC0\u5F71\u7247\u9577\u5EA6 ",-1),fs={class:"mb-3"},ps=e("label",{for:"course-completion",class:"form-label"},"\u8AB2\u7A0B\u5B8C\u6210\u5EA6(%)",-1),ys={key:1,class:"text-end"},gs=["disabled"],$s={__name:"CourseDetail",setup(ws){const{apiGetCourseDetail:M,apiPutCourseDetail:q,apiPutCourseSurveys:L,apiDeleteCourseSurveys:S}=Q,{apiGetAssistantList:I}=W,A=R(),F=j.useLoading(),k=$([]),C=$([{id:"list-home-list",name:"\u8AB2\u7A0B\u8A2D\u5B9A",target:"list-home",active:!0,danger:!1,element:null},{id:"list-udemy-list",name:"Udemy \u8A2D\u5B9A",target:"udemy_info",active:!1,danger:!1,element:null},{id:"list-teachable-list",name:"Teachable \u8A2D\u5B9A",target:"teachable_info",active:!1,danger:!1,element:null},{id:"list-lectures-list",name:"\u7AE0\u7BC0\u5C0D\u61C9",target:"list-lectures",active:!1,danger:!1,element:null},{id:"list-surveys-list",name:"\u8A55\u50F9\u8A2D\u5B9A",target:"list-surveys",active:!1,danger:!1,element:null}]),s=U({teachable_info:{},udemy_info:{},surveys_info:{},default_assistants:[{}],lectures:[]}),x=U([]),g=async i=>{var m,d;const a=F.show();try{const{course:n}=await M(i),h=n.default_assistants;s.value={...n,default_assistants:h.length===0?[{user_id:""}]:h}}catch(n){b("danger","\u53D6\u5F97\u8AB2\u7A0B\u5931\u6557",`${(m=n.response.data)==null?void 0:m.statusCode}:${(d=n.response.data)==null?void 0:d.message}`)}finally{a.hide()}},N=async i=>{var m,d;const a={name:s.value.name};s.value.default_assistants&&(a.default_assistant_user_id=s.value.default_assistants[0].user_id);try{await q(i,a),b("success","\u66F4\u65B0\u8AB2\u7A0B\u6210\u529F","\u5DF2\u6210\u529F\u7DE8\u8F2F\u8AB2\u7A0B"),g(i)}catch(n){b("danger","\u66F4\u65B0\u8AB2\u7A0B\u5931\u6557",`${(m=n.response.data)==null?void 0:m.statusCode}:${(d=n.response.data)==null?void 0:d.message}`)}},D=async i=>{const a={review_threshold_sec:s.value.review_threshold_sec||1200,percent_complete_threshold_of_review:s.value.percent_complete_threshold_of_review||5};try{await L(i,a),b("success","\u66F4\u65B0\u8AB2\u7A0B\u6210\u529F","\u5DF2\u6210\u529F\u7DE8\u8F2F\u8AB2\u7A0B\u8A55\u50F9"),g(i)}catch(m){b("danger","\u66F4\u65B0\u8AB2\u7A0B\u5931\u6557",`${m.response.data.statusCode}:${m.response.data.message}`)}},E=async i=>{try{await S(i),b("success","\u66F4\u65B0\u8AB2\u7A0B\u6210\u529F","\u5DF2\u6210\u529F\u95DC\u9589\u8AB2\u7A0B\u8A55\u50F9"),g(i)}catch(a){b("danger","\u66F4\u65B0\u8AB2\u7A0B\u5931\u6557",`${a.response.data.statusCode}:${a.response.data.message}`)}},B=async()=>{try{const{assistants:i}=await I();x.value=i}catch(i){b("danger","\u7372\u53D6\u52A9\u6559\u5217\u8868\u5931\u6557",`${i.response.data.statusCode}:${i.response.data.message}`)}};z(()=>{const{id:i}=A.params;g(i),B(),K(k,C)});const G=(i,a)=>{let m=!1;return a.forEach(d=>{i===d&&(m=!s.value[d])}),m};return(i,a)=>{const m=w("router-link"),d=w("Field"),n=w("ErrorMessage"),h=w("VForm");return r(),c("div",X,[e("header",Y,[e("nav",Z,[e("ol",ee,[e("li",se,[o(m,{to:"/admin/courses"},{default:y(()=>[H(" \u8AB2\u7A0B\u7BA1\u7406 ")]),_:1})]),ae])]),te]),e("div",le,[e("div",oe,[e("div",ie,[(r(!0),c(v,null,f(C,t=>(r(),c("a",{id:t.id,class:_(["list-group-item list-group-item-action",{active:t.active,disabled:G(t.target,["udemy_info","teachable_info"])}]),href:`#${t.target}`,role:"tab","aria-controls":t.target,key:t.id,ref_for:!0,ref:l=>k.push(l),onClick:P(l=>t.element.show(),["prevent"])},p(t.name),11,de))),128))])]),e("div",ne,[e("div",re,[e("div",ce,[e("div",ue,[me,e("div",_e,[o(h,{onSubmit:a[2]||(a[2]=t=>N(s.value.id))},{default:y(({errors:t,invalid:l})=>[e("div",be,[he,o(d,{id:"name",modelValue:s.value.name,"onUpdate:modelValue":a[0]||(a[0]=u=>s.value.name=u),name:"\u8AB2\u7A0B\u540D\u7A31",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required"},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u540D\u7A31",class:"invalid-feedback"})]),e("div",ve,[fe,T(e("select",{id:"assistants","onUpdate:modelValue":a[1]||(a[1]=u=>s.value.default_assistants[0].user_id=u),name:"\u9810\u8A2D\u52A9\u6559",class:"form-control"},[pe,(r(!0),c(v,null,f(x.value,u=>(r(),c("option",{key:u.user_id,value:u.user_id},p(u.nickname),9,ye))),128))],512),[[O,s.value.default_assistants[0].user_id]])]),e("div",ge,[e("button",{type:"submit",class:"btn btn-primary",disabled:l}," \u5132\u5B58 ",8,we)])]),_:1})])])]),s.value.udemy_info?(r(),c("div",Ve,[e("div",ke,[Ce,e("div",xe,[o(h,null,{default:y(({errors:t})=>[e("div",De,[$e,o(d,{id:"udemy-name",modelValue:s.value.udemy_info.name,"onUpdate:modelValue":a[3]||(a[3]=l=>s.value.udemy_info.name=l),name:"\u8AB2\u7A0B\u540D\u7A31",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u540D\u7A31",class:"invalid-feedback"})]),e("div",Ue,[Te,e("div",{class:"bg-light p-3",innerHTML:s.value.udemy_info.description},null,8,Me)]),e("div",qe,[Le,o(d,{id:"abbr-name",modelValue:s.value.udemy_info.headline,"onUpdate:modelValue":a[4]||(a[4]=l=>s.value.udemy_info.headline=l),name:"\u8AB2\u7A0B\u7E2E\u5BEB",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u7E2E\u5BEB}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u7E2E\u5BEB",class:"invalid-feedback"})]),e("div",Se,[Ie,o(d,{id:"amount",modelValue:s.value.udemy_info.enrollments_count,"onUpdate:modelValue":a[5]||(a[5]=l=>s.value.udemy_info.enrollments_count=l),name:"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",class:"invalid-feedback"})])]),_:1})])])])):V("",!0),s.value.teachable_info?(r(),c("div",Ae,[e("div",Fe,[Ne,e("div",Ee,[o(h,null,{default:y(({errors:t})=>[e("div",Be,[Ge,o(d,{id:"teachableId",modelValue:s.value.teachable_info.id,"onUpdate:modelValue":a[6]||(a[6]=l=>s.value.teachable_info.id=l),name:"Teachable ID",type:"text",class:_(["form-control",{"is-invalid":t["Teachable ID"]}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"Teachable ID",class:"invalid-feedback"})]),e("div",Re,[je,o(d,{id:"teachableName",modelValue:s.value.teachable_info.name,"onUpdate:modelValue":a[7]||(a[7]=l=>s.value.teachable_info.name=l),name:"\u8AB2\u7A0B\u540D\u7A31",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u540D\u7A31",class:"invalid-feedback"})]),e("div",ze,[He,o(d,{id:"teachableAmount",modelValue:s.value.teachable_info.enrollments_count,"onUpdate:modelValue":a[8]||(a[8]=l=>s.value.teachable_info.enrollments_count=l),name:"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",class:"invalid-feedback"})])]),_:1})])])])):V("",!0),e("div",Pe,[e("div",Oe,[Je,e("div",Ke,[e("div",Qe,[e("div",We,[e("ol",Xe,[(r(!0),c(v,null,f(s.value.lectures,t=>(r(),c("li",{key:t.id,class:"d-flex justify-content-between align-items-start"},[e("div",Ye,[e("div",Ze,p(t.name),1),e("ul",es,[(r(!0),c(v,null,f(t.sub_lectures,l=>(r(),c("li",{key:l.id,class:"list-group-item"},p(l.hasTeachable?l.name:"-"),1))),128))])])]))),128))])]),e("div",ss,[e("ol",as,[(r(!0),c(v,null,f(s.value.lectures,t=>(r(),c("li",{key:t.id,class:"d-flex justify-content-between align-items-start"},[e("div",ts,[e("div",ls,p(t.name),1),e("ul",os,[(r(!0),c(v,null,f(t.sub_lectures,l=>(r(),c("li",{key:l.id,class:"list-group-item"},p(l.hasUdemy?l.name:"-"),1))),128))])])]))),128))])])])])])]),e("div",is,[e("div",ds,[ns,e("div",rs,[o(h,{onSubmit:a[13]||(a[13]=t=>D(s.value.id))},{default:y(({errors:t,invalid:l})=>[e("div",cs,[us,e("div",ms,[T(e("input",{id:"flexSwitchCheckDefault","onUpdate:modelValue":a[9]||(a[9]=u=>s.value.enable_review=u),class:"form-check-input",type:"checkbox",role:"switch",onClick:a[10]||(a[10]=u=>s.value.enable_review?E(s.value.id):D(s.value.id))},null,512),[[J,s.value.enable_review]]),_s])]),s.value.enable_review?(r(),c(v,{key:0},[e("div",bs,[hs,o(d,{id:"course-seconds",modelValue:s.value.review_threshold_sec,"onUpdate:modelValue":a[11]||(a[11]=u=>s.value.review_threshold_sec=u),modelModifiers:{number:!0},name:"\u8A72\u8AB2\u7A0B\u53EF\u88AB\u8A55\u50F9\u7684\u6642\u6578\u9577\u5EA6",type:"number",min:"1",class:_(["form-control",{"is-invalid":t.\u8A72\u8AB2\u7A0B\u53EF\u88AB\u8A55\u50F9\u7684\u6642\u6578\u9577\u5EA6}]),rules:"required"},null,8,["modelValue","class"]),vs,o(n,{name:"\u8A72\u8AB2\u7A0B\u53EF\u88AB\u8A55\u50F9\u7684\u6642\u6578\u9577\u5EA6",class:"invalid-feedback"})]),e("div",fs,[ps,o(d,{id:"course-completion",modelValue:s.value.percent_complete_threshold_of_review,"onUpdate:modelValue":a[12]||(a[12]=u=>s.value.percent_complete_threshold_of_review=u),modelModifiers:{number:!0},name:"\u8AB2\u7A0B\u5B8C\u6210\u5EA6",type:"number",min:"1",max:"100",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u5B8C\u6210\u5EA6}]),rules:"required"},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u5B8C\u6210\u5EA6",class:"invalid-feedback"})])],64)):V("",!0),s.value.enable_review?(r(),c("div",ys,[e("button",{type:"submit",class:"btn btn-primary",disabled:l}," \u7DE8\u8F2F ",8,gs)])):V("",!0)]),_:1})])])])])])])])}}};export{$s as default}; diff --git a/assets/CourseList.14009eb9.js b/assets/CourseList.14009eb9.js new file mode 100644 index 0000000..7170210 --- /dev/null +++ b/assets/CourseList.14009eb9.js @@ -0,0 +1 @@ +import{r,o as F,B as T,z as y,a as o,e as U,f as C,A as h,M as q,b as e,E as G,w as j,c as l,F as V,q as N,h as L,R as I,x as M,D as O,p as w,g as A}from"./index.18edd2cb.js";import{a as B}from"./courses.e53b42ef.js";import{a as P}from"./assistant.75b6582c.js";const H={class:"mb-3"},J=e("label",{for:"addName",class:"form-label text-dark"},"\u8AB2\u7A0B\u540D\u7A31",-1),K={class:"mb-3"},Q=e("label",{for:"addAssistants",class:"form-label text-dark"},"\u9810\u8A2D\u52A9\u6559",-1),W=e("option",{value:"",disabled:""}," \u8ACB\u9078\u64C7\u52A9\u6559 ",-1),X=["value"],Y=["disabled"],Z={__name:"CreateCourseModal",emits:["createCourseMethod"],setup(D,{expose:g,emit:f}){const{apiPostCreateCourse:b}=B,{apiGetAssistantList:v}=P,c=r(),p=r(""),u=r(""),n=async()=>{try{const t={name:p.value};u.value&&(t.default_assistant_user_id=u.value),await b(t),f("createCourseMethod",{target:"import",type:"\u6210\u529F"}),c.value.resetForm()}catch(t){f("createCourseMethod",{target:"import",type:"\u5931\u6557",error:`${t.response.status}:${t.response.statusText}`})}},a=r([]),k=async()=>{var t,d;try{const{assistants:m}=await v();a.value=m}catch(m){M("danger","\u7372\u53D6\u52A9\u6559\u5217\u8868\u5931\u6557",`${(t=m.response.data)==null?void 0:t.statusCode}:${(d=m.response.data)==null?void 0:d.message}`)}},s=r(null),_=r(null);return F(()=>{k(),_.value=new T(s.value.hModal)}),g({openModal:()=>{_.value.show()},hideModal:()=>{_.value.hide()}}),(t,d)=>{const m=y("Field"),R=y("ErrorMessage"),E=y("VForm");return o(),U(E,{ref_key:"refs",ref:c,onSubmit:n},{default:C(({errors:z,meta:S})=>[h(q,{id:"createCourseModal",ref_key:"createCourseModalRef",ref:s,"has-footer":!0,title:"\u65B0\u589E\u8AB2\u7A0B","class-list":""},{body:C(()=>[e("div",H,[J,h(m,{id:"addName",modelValue:p.value,"onUpdate:modelValue":d[0]||(d[0]=i=>p.value=i),name:"\u8AB2\u7A0B\u540D\u7A31",type:"text",class:G(["form-control",{"is-invalid":z.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required"},null,8,["modelValue","class"]),h(R,{name:"\u8AB2\u7A0B\u540D\u7A31",class:"invalid-feedback"})]),e("div",K,[Q,j(e("select",{id:"addAssistants","onUpdate:modelValue":d[1]||(d[1]=i=>u.value=i),name:"\u9810\u8A2D\u52A9\u6559",class:"form-control text-dark"},[W,(o(!0),l(V,null,N(a.value,i=>(o(),l("option",{key:i.user_id,value:i.user_id},L(i.nickname),9,X))),128))],512),[[I,u.value]])])]),footer:C(()=>[e("button",{type:"submit",disabled:!S.valid,class:"btn btn-primary"}," \u5EFA\u7ACB ",8,Y)]),_:2},1536)]),_:1},512)}}},ee={class:"about px-4 mt-4 position-relative"},se={class:"d-flex align-items-center justify-content-between"},te=e("h1",{class:"fs-4 mb-0"}," \u8AB2\u7A0B\u7BA1\u7406 ",-1),ae=e("hr",null,null,-1),oe={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},ne={class:"card-body p-0"},re={class:"table-responsive"},le={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},de=e("thead",{class:"bg-light"},[e("tr",null,[e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"}," \u8AB2\u7A0B\u540D\u7A31 "),e("th",{scope:"col",class:"py-3 text-muted border-0"}," \u52A9\u6559\u6578 "),e("th",{scope:"col",class:"py-3 text-muted border-0"}," \u5C0D\u61C9\u7684\u8AB2\u7A0B "),e("th",{scope:"col",class:"py-3 text-muted pe-3 border-0"}," \u7DE8\u8F2F ")])],-1),ie={class:"text-nowrap"},ce={scope:"row",class:"ps-4"},ue={class:"fs-6 mb-0"},_e=["href"],me=["href"],pe={class:"pe-3"},he=e("span",{class:"material-icons align-middle fs-6"},"edit",-1),ye={__name:"CourseList",setup(D){const{apiGetCourseList:g}=B,f=O.useLoading(),b=r([]),v=async()=>{const n=f.show();try{const{courses:a}=await g();b.value=a}catch(a){M("danger","\u53D6\u5F97\u8AB2\u7A0B\u5217\u8868\u5931\u6557",`${a.response.data.statusCode}:${a.response.data.message}`)}finally{n.hide()}};F(v);const c=r(null),p=()=>{c.value.openModal()},u=n=>{n.type==="\u6210\u529F"?M("success","\u5EFA\u7ACB\u8AB2\u7A0B\u6210\u529F","\u5DF2\u6210\u529F\u5EFA\u7ACB\u8AB2\u7A0B"):n.type==="\u5931\u6557"&&M("danger","\u5EFA\u7ACB\u8AB2\u7A0B\u5931\u6557",n.error),c.value.hideModal(),v()};return(n,a)=>{const k=y("router-link");return o(),l("div",ee,[e("header",se,[te,e("button",{class:"btn btn-primary",onClick:a[0]||(a[0]=s=>p())}," \u65B0\u589E\u8AB2\u7A0B ")]),ae,e("div",oe,[e("div",ne,[e("div",re,[e("table",le,[de,e("tbody",ie,[(o(!0),l(V,null,N(b.value,s=>{var _,x,$,t;return o(),l("tr",{key:s.id,class:"align-middle"},[e("td",ce,[e("h5",ue,L(s.name),1)]),e("td",null,L(s.assistant_count),1),e("td",null,[(_=s.teachable_info)!=null&&_.id?(o(),l("a",{key:0,href:s.teachable_info.url,target:"_blank"}," Teachable \u9023\u7D50 ",8,_e)):w("",!0),((x=s.udemy_info)==null?void 0:x.id)&&(($=s.teachable_info)==null?void 0:$.id)?(o(),l(V,{key:1},[A(" | ")],64)):w("",!0),(t=s.udemy_info)!=null&&t.id?(o(),l("a",{key:2,href:s.udemy_info.url,target:"_blank"}," Udemy \u9023\u7D50 ",8,me)):w("",!0)]),e("td",pe,[h(k,{to:`/admin/courses/${s.id}`,class:"btn btn-sm btn-outline-gray"},{default:C(()=>[he,A("\u7DE8\u8F2F ")]),_:2},1032,["to"])])])}),128))])])])])]),h(Z,{ref_key:"createCourseModalComponentRef",ref:c,onCreateCourseMethod:u},null,512)])}}};export{ye as default}; diff --git a/assets/CoursesSurveys.8ca81c48.css b/assets/CoursesSurveys.8ca81c48.css new file mode 100644 index 0000000..a18f6aa --- /dev/null +++ b/assets/CoursesSurveys.8ca81c48.css @@ -0,0 +1 @@ +.progress[data-v-1bd672ba]{border-radius:24px}.progress-bar[data-v-1bd672ba]:first-child{border-top-left-radius:24px;border-bottom-left-radius:24px}.progress-bar[data-v-1bd672ba]:last-child{border-top-right-radius:24px;border-bottom-right-radius:24px}.progress-bar-text[data-v-1bd672ba]{left:0;right:0;bottom:-20px}[data-v-1bd672ba] span.vue-star-rating-star{display:flex} diff --git a/assets/CoursesSurveys.cdddf115.js b/assets/CoursesSurveys.cdddf115.js new file mode 100644 index 0000000..ffec6b7 --- /dev/null +++ b/assets/CoursesSurveys.cdddf115.js @@ -0,0 +1,6 @@ +import{a0 as K,V as J,_ as X,n as Y,j as q,m as Z,z as Q,a as M,c as j,b as f,A as W,f as $,h as N,i as P,F as D,q as F,$ as U,g as tt,p as H,S as et,T as rt}from"./index.18edd2cb.js";var G={exports:{}};(function(T){T.exports=function(_){var c={};function s(e){if(c[e])return c[e].exports;var l=c[e]={i:e,l:!1,exports:{}};return _[e].call(l.exports,l,l.exports,s),l.l=!0,l.exports}return s.m=_,s.c=c,s.d=function(e,l,p){s.o(e,l)||Object.defineProperty(e,l,{enumerable:!0,get:p})},s.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,l){if(l&1&&(e=s(e)),l&8||l&4&&typeof e=="object"&&e&&e.__esModule)return e;var p=Object.create(null);if(s.r(p),Object.defineProperty(p,"default",{enumerable:!0,value:e}),l&2&&typeof e!="string")for(var r in e)s.d(p,r,function(h){return e[h]}.bind(null,r));return p},s.n=function(e){var l=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(l,"a",l),l},s.o=function(e,l){return Object.prototype.hasOwnProperty.call(e,l)},s.p="",s(s.s="fb15")}({"0a04":function(_,c,s){var e=s("4bad");c=e(!1),c.push([_.i,".vue-star-rating-star[data-v-f675a548]{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent}.vue-star-rating-pointer[data-v-f675a548]{cursor:pointer}.vue-star-rating[data-v-f675a548]{display:flex;align-items:center}.vue-star-rating-inline[data-v-f675a548]{display:inline-flex}.vue-star-rating-rating-text[data-v-f675a548]{margin-left:7px}.vue-star-rating-rtl[data-v-f675a548]{direction:rtl}.vue-star-rating-rtl .vue-star-rating-rating-text[data-v-f675a548]{margin-right:10px;direction:rtl}.sr-only[data-v-f675a548]{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}",""]),_.exports=c},"0fde":function(_,c,s){var e=s("4bad");c=e(!1),c.push([_.i,".vue-star-rating-star[data-v-11edf2d6]{overflow:visible!important}.vue-star-rating-star-rotate[data-v-11edf2d6]{transition:all .25s}.vue-star-rating-star-rotate[data-v-11edf2d6]:hover{transition:transform .25s;transform:rotate(-15deg) scale(1.3)}",""]),_.exports=c},"499e":function(_,c,s){s.r(c),s.d(c,"default",function(){return b});function e(i,o){for(var t=[],u={},n=0;nt.parts.length&&(u.parts.length=t.parts.length)}else{for(var a=[],n=0;n([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),x=b.replace(O,"$1").trim());for(var w=0;w[Object(r.createVNode)("span",null,"Rated "+Object(r.toDisplayString)(n.selectedRating)+" stars out of "+Object(r.toDisplayString)(t.maxRating),1)])]),Object(r.createVNode)("div",{class:"vue-star-rating",onMouseleave:o[2]||(o[2]=(...A)=>a.resetRating(...A))},[(Object(r.openBlock)(!0),Object(r.createBlock)(r.Fragment,null,Object(r.renderList)(t.maxRating,A=>(Object(r.openBlock)(),Object(r.createBlock)("span",{key:A,class:[{"vue-star-rating-pointer":!t.readOnly},"vue-star-rating-star"],style:{"margin-right":a.margin+"px"}},[Object(r.createVNode)(g,{fill:n.fillLevel[A-1],size:t.starSize,points:t.starPoints,"star-id":A,step:n.step,"active-color":a.currentActiveColor,"inactive-color":t.inactiveColor,"border-color":t.borderColor,"active-border-color":a.currentActiveBorderColor,"border-width":t.borderWidth,"rounded-corners":t.roundedCorners,rtl:t.rtl,glow:t.glow,"glow-color":t.glowColor,animate:t.animate,"onStar-selected":o[1]||(o[1]=I=>a.setRating(I,!0)),"onStar-mouse-move":a.setRating},null,8,["fill","size","points","star-id","step","active-color","inactive-color","border-color","active-border-color","border-width","rounded-corners","rtl","glow","glow-color","animate","onStar-mouse-move"])],6))),128)),t.showRating?(Object(r.openBlock)(),Object(r.createBlock)("span",{key:0,class:["vue-star-rating-rating-text",t.textClass]},Object(r.toDisplayString)(a.formattedRating),3)):Object(r.createCommentVNode)("",!0)],32)],2)}),R=Object(r.withScopeId)("data-v-11edf2d6");Object(r.pushScopeId)("data-v-11edf2d6");const S=Object(r.createVNode)("feMerge",null,[Object(r.createVNode)("feMergeNode",{in:"coloredBlur"}),Object(r.createVNode)("feMergeNode",{in:"SourceGraphic"})],-1);Object(r.popScopeId)();const B=R(function(i,o,t,u,n,a){return Object(r.openBlock)(),Object(r.createBlock)("svg",{class:["vue-star-rating-star",{"vue-star-rating-star-rotate":a.shouldAnimate}],height:a.starSize,width:a.starSize,viewBox:a.viewBox,onMousemove:o[1]||(o[1]=(...g)=>a.mouseMoving(...g)),onClick:o[2]||(o[2]=(...g)=>a.selected(...g)),onTouchstart:o[3]||(o[3]=(...g)=>a.touchStart(...g)),onTouchend:o[4]||(o[4]=(...g)=>a.touchEnd(...g))},[Object(r.createVNode)("linearGradient",{id:n.grad,x1:"0",x2:"100%",y1:"0",y2:"0"},[Object(r.createVNode)("stop",{offset:a.starFill,"stop-color":t.rtl?a.getColor(t.inactiveColor):a.getColor(t.activeColor),"stop-opacity":t.rtl?a.getOpacity(t.inactiveColor):a.getOpacity(t.activeColor)},null,8,["offset","stop-color","stop-opacity"]),Object(r.createVNode)("stop",{offset:a.starFill,"stop-color":t.rtl?a.getColor(t.activeColor):a.getColor(t.inactiveColor),"stop-opacity":t.rtl?a.getOpacity(t.activeColor):a.getOpacity(t.inactiveColor)},null,8,["offset","stop-color","stop-opacity"])],8,["id"]),Object(r.createVNode)("filter",{id:n.glowId,height:"130%",width:"130%",filterUnits:"userSpaceOnUse"},[Object(r.createVNode)("feGaussianBlur",{stdDeviation:t.glow,result:"coloredBlur"},null,8,["stdDeviation"]),S],8,["id"]),Object(r.withDirectives)(Object(r.createVNode)("polygon",{points:a.starPointsToString,fill:a.gradId,stroke:t.glowColor,filter:"url(#"+n.glowId+")","stroke-width":a.border},null,8,["points","fill","stroke","filter","stroke-width"]),[[r.vShow,t.glowColor&&t.glow>0&&t.fill>0]]),Object(r.createVNode)("polygon",{points:a.starPointsToString,fill:a.gradId,stroke:a.getBorderColor,"stroke-width":a.border,"stroke-linejoin":a.strokeLinejoin},null,8,["points","fill","stroke","stroke-width","stroke-linejoin"]),Object(r.createVNode)("polygon",{points:a.starPointsToString,fill:a.gradId},null,8,["points","fill"])],42,["height","width","viewBox"])});var m=s("d4aa"),b=s.n(m),O={name:"Star",props:{fill:{type:Number,default:0},points:{type:Array,default(){return[]}},size:{type:Number,default:50},starId:{type:Number,required:!0},activeColor:{type:String,required:!0},inactiveColor:{type:String,required:!0},borderColor:{type:String,default:"#000"},activeBorderColor:{type:String,default:"#000"},borderWidth:{type:Number,default:0},roundedCorners:{type:Boolean,default:!1},rtl:{type:Boolean,default:!1},glow:{type:Number,default:0},glowColor:{type:String,default:null,required:!1},animate:{type:Boolean,default:!1}},emits:["star-mouse-move","star-selected"],data(){return{starPoints:[19.8,2.2,6.6,43.56,39.6,17.16,0,17.16,33,43.56],grad:"",glowId:"",isStarActive:!0}},computed:{starPointsToString(){return this.starPoints.join(",")},gradId(){return"url(#"+this.grad+")"},starSize(){const d=this.roundedCorners&&this.borderWidth<=0?parseInt(this.size)-parseInt(this.border):this.size;return parseInt(d)+parseInt(this.border)},starFill(){return this.rtl?100-this.fill+"%":this.fill+"%"},border(){return this.roundedCorners&&this.borderWidth<=0?6:this.borderWidth},getBorderColor(){return this.roundedCorners&&this.borderWidth<=0?this.fill<=0?this.inactiveColor:this.activeColor:this.fill<=0?this.borderColor:this.activeBorderColor},maxSize(){return this.starPoints.reduce(function(d,i){return Math.max(d,i)})},viewBox(){return"0 0 "+this.maxSize+" "+this.maxSize},shouldAnimate(){return this.animate&&this.isStarActive},strokeLinejoin(){return this.roundedCorners?"round":"miter"}},created(){this.starPoints=this.points.length?this.points:this.starPoints,this.calculatePoints(),this.grad=this.getRandomId(),this.glowId=this.getRandomId()},methods:{mouseMoving(d){d.touchAction!=="undefined"&&this.$emit("star-mouse-move",{event:d,position:this.getPosition(d),id:this.starId})},touchStart(){this.$nextTick(()=>{this.isStarActive=!0})},touchEnd(){this.$nextTick(()=>{this.isStarActive=!1})},getPosition(d){var i=.92*this.size;const o=this.rtl?Math.min(d.offsetX,45):Math.max(d.offsetX,1);var t=Math.round(100/i*o);return Math.min(t,100)},selected(d){this.$emit("star-selected",{id:this.starId,position:this.getPosition(d)})},getRandomId(){return Math.random().toString(36).substring(7)},calculatePoints(){this.starPoints=this.starPoints.map((d,i)=>{const o=i%2===0?this.border*1.5:0;return this.size/this.maxSize*d+o})},getColor(d){return new b.a(d).parseAlphaColor().color},getOpacity(d){return new b.a(d).parseAlphaColor().opacity}}};s("d1b1"),O.render=B,O.__scopeId="data-v-11edf2d6";var x=O,y={name:"VueStarRating",components:{Star:x},props:{increment:{type:Number,default:1},rating:{type:Number,default:0},roundStartRating:{type:Boolean,default:!0},activeColor:{type:[String,Array],default:"#ffd055"},inactiveColor:{type:String,default:"#d8d8d8"},maxRating:{type:Number,default:5},starPoints:{type:Array,default(){return[]}},starSize:{type:Number,default:50},showRating:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},textClass:{type:String,default:""},inline:{type:Boolean,default:!1},borderColor:{type:String,default:"#999"},activeBorderColor:{type:[String,Array],default:null},borderWidth:{type:Number,default:0},roundedCorners:{type:Boolean,default:!1},padding:{type:Number,default:0},rtl:{type:Boolean,default:!1},fixedPoints:{type:Number,default:null},glow:{type:Number,default:0},glowColor:{type:String,default:"#fff"},clearable:{type:Boolean,default:!1},activeOnClick:{type:Boolean,default:!1},animate:{type:Boolean,default:!1}},emits:["update:rating","hover:rating"],data(){return{step:0,fillLevel:[],currentRating:0,selectedRating:0,ratingSelected:!1}},computed:{formattedRating(){return this.fixedPoints===null?this.currentRating:this.currentRating.toFixed(this.fixedPoints)},shouldRound(){return this.ratingSelected||this.roundStartRating},margin(){return this.padding+this.borderWidth},activeColors(){return Array.isArray(this.activeColor)?this.padColors(this.activeColor,this.maxRating,this.activeColor.slice(-1)[0]):new Array(this.maxRating).fill(this.activeColor)},currentActiveColor(){return this.activeOnClick?this.selectedRating>0?this.activeColors[Math.ceil(this.selectedRating)-1]:this.inactiveColor:this.currentRating>0?this.activeColors[Math.ceil(this.currentRating)-1]:this.inactiveColor},activeBorderColors(){if(Array.isArray(this.activeBorderColor))return this.padColors(this.activeBorderColor,this.maxRating,this.activeBorderColor.slice(-1)[0]);let d=this.activeBorderColor?this.activeBorderColor:this.borderColor;return new Array(this.maxRating).fill(d)},currentActiveBorderColor(){return this.activeOnClick?this.selectedRating>0?this.activeBorderColors[Math.ceil(this.selectedRating)-1]:this.borderColor:this.currentRating>0?this.activeBorderColors[Math.ceil(this.currentRating)-1]:this.borderColor}},watch:{rating(d){this.currentRating=d,this.selectedRating=d,this.createStars(this.shouldRound)}},created(){this.step=this.increment*100,this.currentRating=this.rating,this.selectedRating=this.currentRating,this.createStars(this.roundStartRating)},methods:{setRating(d,i){if(!this.readOnly){const o=this.rtl?(100-d.position)/100:d.position/100;this.currentRating=(d.id+o-1).toFixed(2),this.currentRating=this.currentRating>this.maxRating?this.maxRating:this.currentRating,i?(this.createStars(!0,!0),this.clearable&&this.currentRating===this.selectedRating?this.selectedRating=0:this.selectedRating=this.currentRating,this.$emit("update:rating",this.selectedRating),this.ratingSelected=!0):(this.createStars(!0,!this.activeOnClick),this.$emit("hover:rating",this.currentRating))}},resetRating(){this.readOnly||(this.currentRating=this.selectedRating,this.createStars(this.shouldRound))},createStars(d=!0,i=!0){d&&this.round();for(var o=0;o1?100:(this.currentRating-o)*100),i&&(this.fillLevel[o]=Math.round(t))}},round(){var d=1/this.increment;this.currentRating=Math.min(this.maxRating,Math.ceil(this.currentRating*d)/d)},padColors(d,i,o){return Object.assign(new Array(i).fill(o),d)}}};s("9ff5"),y.render=C,y.__scopeId="data-v-f675a548";var w=y,z=w;c.default=z}})})(G);const ot=J(G.exports);const L=T=>(et("data-v-1bd672ba"),T=T(),rt(),T),it={class:"card"},at={class:"card-header bg-primary"},st={class:"h4 m-2"},nt={class:"card-body bg-light"},lt={class:"row"},dt={class:"col-md-4 d-flex"},ct={class:"card w-50 shadow-sm"},ut=L(()=>f("div",{class:"card-header bg-white text-muted border-bottom-0"}," \u8A55\u50F9 ",-1)),pt={class:"card-body"},_t={class:"card w-50 ms-4 shadow-sm"},ht=L(()=>f("div",{class:"card-header bg-white text-muted border-bottom-0"}," \u8AB2\u7A0B\u5E73\u5747\u5206\u6578 ",-1)),gt={class:"card-body"},ft={class:"col-md-8"},vt={class:"list-unstyled"},bt={class:"progress w-100 me-3 rounded-pill"},mt={class:"mb-0 text-end",style:{width:"60px"}},yt=L(()=>f("h5",{class:"text-muted mb-0 mt-5"}," \u8AB2\u7A0B\u7D30\u7BC0\u8868\u73FE ",-1)),Ct={class:"list-unstyled mt-3"},St={class:"me-4 mb-0 w-25"},Rt={class:"progress w-100 overflow-visible",style:{height:"24px"}},xt={class:"position-absolute text-dark progress-bar-text"},wt={key:0,style:{width:"60px"},class:"flex-shrink-0 mb-0 ms-4 text-end"},Ot={key:1,style:{width:"60px"},class:"flex-shrink-0 mb-0 ms-4 text-end"},Bt={__name:"CoursesSurveys",props:{data:{type:Object,default(){return{}}}},setup(T){const _=T,c={starSize:24,readOnly:!0,activeColor:"#2A8356",showRating:!1},{id:s,name:e,review_count:l,rating_distribution:p,average_rating:r,questionnaires:h}=Y(_.data),v=q(()=>p.value.reverse()),C=Z(["#DADEDD","#B5BEBB","#798B86","#3D5950"]);return(R,S)=>{const B=Q("RouterLink");return M(),j("div",it,[f("div",at,[W(B,{class:"text-white text-decoration-none",to:{name:"SurveysDetail",params:{id:P(s)}}},{default:$(()=>[f("h2",st,N(P(e)),1)]),_:1},8,["to"])]),f("div",nt,[f("div",lt,[f("div",dt,[f("div",ct,[ut,f("div",pt,[f("h2",null,N(P(l)?`${P(l)} \u5247`:"\u7121"),1)])]),f("div",_t,[ht,f("div",gt,[f("h2",null,N(P(r)||"\u7121"),1)])])]),f("div",ft,[f("ul",vt,[(M(!0),j(D,null,F(P(v),(m,b)=>(M(),j("li",{key:`progress-bar${b}`,class:"d-flex align-items-center mb-1"},[f("div",bt,[f("div",{class:"progress-bar bg-primary",role:"progressbar",style:U(`width: ${m.percent}%`)},null,4)]),W(P(ot),{rating:m.rating,"star-size":c.starSize,"read-only":c.readOnly,"show-rating":c.showRating,"active-color":c.activeColor},null,8,["rating","star-size","read-only","show-rating","active-color"]),f("p",mt,N(Math.floor(m.percent))+"% ",1)]))),128))])])]),P(h).length?(M(),j(D,{key:0},[yt,f("ul",Ct,[(M(!0),j(D,null,F(P(h),(m,b)=>{var O;return M(),j("li",{key:`questionnaires${b}`,class:"mb-4 d-flex align-items-center"},[f("p",St,N(m.question),1),f("div",Rt,[(M(!0),j(D,null,F(m.rating_distribution,(x,y)=>(M(),j(D,null,[Number(x.percent)?(M(),j("div",{key:P(p)+y,class:"progress-bar position-relative overflow-visible",style:U(`width: ${x.percent}%; background-color: ${P(C)[y]};`)},[tt(N(Math.floor(x.percent))+"%("+N(x.count)+") ",1),f("span",xt,N(x.rating)+" \u5206",1)],4)):H("",!0)],64))),256))]),(O=m.rating_distribution[b])!=null&&O.avg_rating?(M(),j("p",wt,N(m.rating_distribution[b].avg_rating)+" \u5206 ",1)):(M(),j("p",Ot," \u7121 "))])}),128))])],64)):H("",!0)])])}}},It=X(Bt,[["__scopeId","data-v-1bd672ba"]]);export{It as C,ot as V}; diff --git a/assets/Editor.86746698.css b/assets/Editor.86746698.css new file mode 100644 index 0000000..39e5590 --- /dev/null +++ b/assets/Editor.86746698.css @@ -0,0 +1 @@ +.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor ul,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:"\2022"}.ql-editor ul[data-checked=true],.ql-editor ul[data-checked=false]{pointer-events:none}.ql-editor ul[data-checked=true]>li *,.ql-editor ul[data-checked=false]>li *{pointer-events:all}.ql-editor ul[data-checked=true]>li:before,.ql-editor ul[data-checked=false]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:"\2611"}.ql-editor ul[data-checked=false]>li:before{content:"\2610"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:"";display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px;margin-left:1px;margin-right:1px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar button:focus,.ql-snow .ql-toolbar button:focus,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover{background-color:#f3f4f6}.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected{background-color:#dbeafe;color:#2563eb}.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill{fill:#2563eb}.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter{stroke:#2563eb}@media (pointer: coarse){.ql-snow.ql-toolbar button:hover:not(.ql-active),.ql-snow .ql-toolbar button:hover:not(.ql-active){color:#4b5563}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#4b5563}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#4b5563}}.ql-snow,.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:"";display:table}.ql-snow .ql-stroke{fill:none;stroke:#4b5563;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#4b5563;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#4b5563}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-thin,.ql-snow .ql-stroke.ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#4b5563;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle;margin-right:1px;margin-left:1px}.ql-snow .ql-picker-label{cursor:pointer;display:flex;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding:5px 8px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#d1d5db;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#d1d5db}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#d1d5db}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:3px}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px;margin:2px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-label:before,.ql-snow .ql-picker.ql-header .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{content:"Heading 1"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{content:"Heading 2"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{content:"Heading 3"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{content:"Heading 4"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{content:"Heading 5"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{content:"Heading 6"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-label:before,.ql-snow .ql-picker.ql-font .ql-picker-item:before{content:"Sans Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{content:"Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{content:"Monospace"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-label:before,.ql-snow .ql-picker.ql-size .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{content:"Small"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{content:"Large"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{content:"Huge"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border:1px solid #d1d5db;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:#0003 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#d1d5db}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0px}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #d1d5db;box-shadow:0 0 5px #d1d5db;color:#4b5563;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip:before{content:"Visit URL:";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #d1d5db;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-right:1px solid #d1d5db;content:"Edit";margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:"Remove";margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-right:0px;content:"Save";padding-right:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:"Enter link:"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:"Enter formula:"}.ql-snow .ql-tooltip[data-mode=video]:before{content:"Enter video:"}.ql-snow a{color:#2563eb}.ql-container.ql-snow{border:1px solid #d1d5db}.image-uploading{position:relative;display:inline-block}.image-uploading img{max-width:98%!important;filter:blur(5px);opacity:.3}.image-uploading:before{content:"";box-sizing:border-box;position:absolute;top:50%;left:50%;width:30px;height:30px;margin-top:-15px;margin-left:-15px;border-radius:50%;border:3px solid #ccc;border-top-color:#1e986c;z-index:1;animation:spinner .6s linear infinite}@keyframes spinner{to{transform:rotate(360deg)}}.quill-height-300px{height:300px} diff --git a/assets/Editor.925d2886.js b/assets/Editor.925d2886.js new file mode 100644 index 0000000..8868d60 --- /dev/null +++ b/assets/Editor.925d2886.js @@ -0,0 +1,54 @@ +import{N as Te,V as nr,W as rr,o as ir,X as or,r as $t,s as Mn,Y as ar,Z as lr,a as ur,e as sr,i as fr,x as cr,d as Hn}from"./index.18edd2cb.js";var Vn={exports:{}};/*! + * Quill Editor v1.3.7 + * https://quilljs.com/ + * Copyright (c) 2014, Jason Chen + * Copyright (c) 2013, salesforce.com + */(function(R,B){(function(d,s){R.exports=s()})(typeof self<"u"?self:Te,function(){return function(y){var d={};function s(E){if(d[E])return d[E].exports;var m=d[E]={i:E,l:!1,exports:{}};return y[E].call(m.exports,m,m.exports,s),m.l=!0,m.exports}return s.m=y,s.c=d,s.d=function(E,m,_){s.o(E,m)||Object.defineProperty(E,m,{configurable:!1,enumerable:!0,get:_})},s.n=function(E){var m=E&&E.__esModule?function(){return E.default}:function(){return E};return s.d(m,"a",m),m},s.o=function(E,m){return Object.prototype.hasOwnProperty.call(E,m)},s.p="",s(s.s=109)}([function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(17),m=s(18),_=s(19),p=s(45),g=s(46),h=s(47),o=s(48),e=s(49),t=s(12),f=s(32),a=s(33),u=s(31),r=s(1),i={Scope:r.Scope,create:r.create,find:r.find,query:r.query,register:r.register,Container:E.default,Format:m.default,Leaf:_.default,Embed:o.default,Scroll:p.default,Block:h.default,Inline:g.default,Text:e.default,Attributor:{Attribute:t.default,Class:f.default,Style:a.default,Store:u.default}};d.default=i},function(y,d,s){var E=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var c in i)i.hasOwnProperty(c)&&(r[c]=i[c])};return function(r,i){u(r,i);function c(){this.constructor=r}r.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=function(u){E(r,u);function r(i){var c=this;return i="[Parchment] "+i,c=u.call(this,i)||this,c.message=i,c.name=c.constructor.name,c}return r}(Error);d.ParchmentError=m;var _={},p={},g={},h={};d.DATA_KEY="__blot";var o;(function(u){u[u.TYPE=3]="TYPE",u[u.LEVEL=12]="LEVEL",u[u.ATTRIBUTE=13]="ATTRIBUTE",u[u.BLOT=14]="BLOT",u[u.INLINE=7]="INLINE",u[u.BLOCK=11]="BLOCK",u[u.BLOCK_BLOT=10]="BLOCK_BLOT",u[u.INLINE_BLOT=6]="INLINE_BLOT",u[u.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",u[u.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",u[u.ANY=15]="ANY"})(o=d.Scope||(d.Scope={}));function e(u,r){var i=f(u);if(i==null)throw new m("Unable to create "+u+" blot");var c=i,n=u instanceof Node||u.nodeType===Node.TEXT_NODE?u:c.create(r);return new c(n,r)}d.create=e;function t(u,r){return r===void 0&&(r=!1),u==null?null:u[d.DATA_KEY]!=null?u[d.DATA_KEY].blot:r?t(u.parentNode,r):null}d.find=t;function f(u,r){r===void 0&&(r=o.ANY);var i;if(typeof u=="string")i=h[u]||_[u];else if(u instanceof Text||u.nodeType===Node.TEXT_NODE)i=h.text;else if(typeof u=="number")u&o.LEVEL&o.BLOCK?i=h.block:u&o.LEVEL&o.INLINE&&(i=h.inline);else if(u instanceof HTMLElement){var c=(u.getAttribute("class")||"").split(/\s+/);for(var n in c)if(i=p[c[n]],i)break;i=i||g[u.tagName]}return i==null?null:r&o.LEVEL&i.scope&&r&o.TYPE&i.scope?i:null}d.query=f;function a(){for(var u=[],r=0;r1)return u.map(function(n){return a(n)});var i=u[0];if(typeof i.blotName!="string"&&typeof i.attrName!="string")throw new m("Invalid definition");if(i.blotName==="abstract")throw new m("Cannot register abstract class");if(h[i.blotName||i.attrName]=i,typeof i.keyName=="string")_[i.keyName]=i;else if(i.className!=null&&(p[i.className]=i),i.tagName!=null){Array.isArray(i.tagName)?i.tagName=i.tagName.map(function(n){return n.toUpperCase()}):i.tagName=i.tagName.toUpperCase();var c=Array.isArray(i.tagName)?i.tagName:[i.tagName];c.forEach(function(n){(g[n]==null||i.className==null)&&(g[n]=i)})}return i}d.register=a},function(y,d,s){var E=s(51),m=s(11),_=s(3),p=s(20),g=String.fromCharCode(0),h=function(o){Array.isArray(o)?this.ops=o:o!=null&&Array.isArray(o.ops)?this.ops=o.ops:this.ops=[]};h.prototype.insert=function(o,e){var t={};return o.length===0?this:(t.insert=o,e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(t.attributes=e),this.push(t))},h.prototype.delete=function(o){return o<=0?this:this.push({delete:o})},h.prototype.retain=function(o,e){if(o<=0)return this;var t={retain:o};return e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(t.attributes=e),this.push(t)},h.prototype.push=function(o){var e=this.ops.length,t=this.ops[e-1];if(o=_(!0,{},o),typeof t=="object"){if(typeof o.delete=="number"&&typeof t.delete=="number")return this.ops[e-1]={delete:t.delete+o.delete},this;if(typeof t.delete=="number"&&o.insert!=null&&(e-=1,t=this.ops[e-1],typeof t!="object"))return this.ops.unshift(o),this;if(m(o.attributes,t.attributes)){if(typeof o.insert=="string"&&typeof t.insert=="string")return this.ops[e-1]={insert:t.insert+o.insert},typeof o.attributes=="object"&&(this.ops[e-1].attributes=o.attributes),this;if(typeof o.retain=="number"&&typeof t.retain=="number")return this.ops[e-1]={retain:t.retain+o.retain},typeof o.attributes=="object"&&(this.ops[e-1].attributes=o.attributes),this}}return e===this.ops.length?this.ops.push(o):this.ops.splice(e,0,o),this},h.prototype.chop=function(){var o=this.ops[this.ops.length-1];return o&&o.retain&&!o.attributes&&this.ops.pop(),this},h.prototype.filter=function(o){return this.ops.filter(o)},h.prototype.forEach=function(o){this.ops.forEach(o)},h.prototype.map=function(o){return this.ops.map(o)},h.prototype.partition=function(o){var e=[],t=[];return this.forEach(function(f){var a=o(f)?e:t;a.push(f)}),[e,t]},h.prototype.reduce=function(o,e){return this.ops.reduce(o,e)},h.prototype.changeLength=function(){return this.reduce(function(o,e){return e.insert?o+p.length(e):e.delete?o-e.delete:o},0)},h.prototype.length=function(){return this.reduce(function(o,e){return o+p.length(e)},0)},h.prototype.slice=function(o,e){o=o||0,typeof e!="number"&&(e=1/0);for(var t=[],f=p.iterator(this.ops),a=0;a0&&t.next(a.retain-u)}for(var r=new h(f);e.hasNext()||t.hasNext();)if(t.peekType()==="insert")r.push(t.next());else if(e.peekType()==="delete")r.push(e.next());else{var i=Math.min(e.peekLength(),t.peekLength()),c=e.next(i),n=t.next(i);if(typeof n.retain=="number"){var v={};typeof c.retain=="number"?v.retain=i:v.insert=c.insert;var O=p.attributes.compose(c.attributes,n.attributes,typeof c.retain=="number");if(O&&(v.attributes=O),r.push(v),!t.hasNext()&&m(r.ops[r.ops.length-1],v)){var A=new h(e.rest());return r.concat(A).chop()}}else typeof n.delete=="number"&&typeof c.retain=="number"&&r.push(n)}return r.chop()},h.prototype.concat=function(o){var e=new h(this.ops.slice());return o.ops.length>0&&(e.push(o.ops[0]),e.ops=e.ops.concat(o.ops.slice(1))),e},h.prototype.diff=function(o,e){if(this.ops===o.ops)return new h;var t=[this,o].map(function(i){return i.map(function(c){if(c.insert!=null)return typeof c.insert=="string"?c.insert:g;var n=i===o?"on":"with";throw new Error("diff() called "+n+" non-document")}).join("")}),f=new h,a=E(t[0],t[1],e),u=p.iterator(this.ops),r=p.iterator(o.ops);return a.forEach(function(i){for(var c=i[1].length;c>0;){var n=0;switch(i[0]){case E.INSERT:n=Math.min(r.peekLength(),c),f.push(r.next(n));break;case E.DELETE:n=Math.min(c,u.peekLength()),u.next(n),f.delete(n);break;case E.EQUAL:n=Math.min(u.peekLength(),r.peekLength(),c);var v=u.next(n),O=r.next(n);m(v.insert,O.insert)?f.retain(n,p.attributes.diff(v.attributes,O.attributes)):f.push(O).delete(n);break}c-=n}}),f.chop()},h.prototype.eachLine=function(o,e){e=e||` +`;for(var t=p.iterator(this.ops),f=new h,a=0;t.hasNext();){if(t.peekType()!=="insert")return;var u=t.peek(),r=p.length(u)-t.peekLength(),i=typeof u.insert=="string"?u.insert.indexOf(e,r)-r:-1;if(i<0)f.push(t.next());else if(i>0)f.push(t.next(i));else{if(o(f,t.next(1).attributes||{},a)===!1)return;a+=1,f=new h}}f.length()>0&&o(f,{},a)},h.prototype.transform=function(o,e){if(e=!!e,typeof o=="number")return this.transformPosition(o,e);for(var t=p.iterator(this.ops),f=p.iterator(o.ops),a=new h;t.hasNext()||f.hasNext();)if(t.peekType()==="insert"&&(e||f.peekType()!=="insert"))a.retain(p.length(t.next()));else if(f.peekType()==="insert")a.push(f.next());else{var u=Math.min(t.peekLength(),f.peekLength()),r=t.next(u),i=f.next(u);if(r.delete)continue;i.delete?a.push(i):a.retain(u,p.attributes.transform(r.attributes,i.attributes,e))}return a.chop()},h.prototype.transformPosition=function(o,e){e=!!e;for(var t=p.iterator(this.ops),f=0;t.hasNext()&&f<=o;){var a=t.peekLength(),u=t.peekType();if(t.next(),u==="delete"){o-=Math.min(a,o-f);continue}else u==="insert"&&(f"u"||s.call(t,u)},h=function(t,f){m&&f.name==="__proto__"?m(t,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):t[f.name]=f.newValue},o=function(t,f){if(f==="__proto__")if(s.call(t,f)){if(_)return _(t,f).value}else return;return t[f]};y.exports=function e(){var t,f,a,u,r,i,c=arguments[0],n=1,v=arguments.length,O=!1;for(typeof c=="boolean"&&(O=c,c=arguments[1]||{},n=2),(c==null||typeof c!="object"&&typeof c!="function")&&(c={});n0&&(L1&&arguments[1]!==void 0?arguments[1]:!1;if(D&&(L===0||L>=this.length()-A)){var z=this.clone();return L===0?(this.parent.insertBefore(z,this),this):(this.parent.insertBefore(z,this.next),z)}else{var $=m(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"split",this).call(this,L,D);return this.cache={},$}}}]),w}(e.default.Block);P.blotName="block",P.tagName="P",P.defaultChild="break",P.allowedChildren=[u.default,e.default.Embed,i.default];function T(b){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return b==null||(typeof b.formats=="function"&&(w=(0,p.default)(w,b.formats())),b.parent==null||b.parent.blotName=="scroll"||b.parent.statics.scope!==b.statics.scope)?w:T(b.parent,w)}d.bubbleFormats=T,d.BlockEmbed=N,d.default=P},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.overload=d.expandConfig=void 0;var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},m=function(){function H(j,k){var I=[],M=!0,K=!1,F=void 0;try{for(var q=j[Symbol.iterator](),U;!(M=(U=q.next()).done)&&(I.push(U.value),!(k&&I.length===k));M=!0);}catch(G){K=!0,F=G}finally{try{!M&&q.return&&q.return()}finally{if(K)throw F}}return I}return function(j,k){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return H(j,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(){function H(j,k){for(var I=0;I2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof k!="string"){var F=k.attrName||k.blotName;typeof F=="string"?this.register("formats/"+F,k,I):Object.keys(k).forEach(function(q){M.register(q,k[q],I)})}else this.imports[k]!=null&&!K&&x.warn("Overwriting "+k+" with",I),this.imports[k]=I,(k.startsWith("blots/")||k.startsWith("formats/"))&&I.blotName!=="abstract"?r.default.register(I):k.startsWith("modules")&&typeof I.register=="function"&&I.register()}}]);function H(j){var k=this,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(w(this,H),this.options=D(j,I),this.container=this.options.container,this.container==null)return x.error("Invalid Quill container",j);this.options.debug&&H.debug(this.options.debug);var M=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new t.default,this.scroll=r.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new o.default(this.scroll),this.selection=new c.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(t.default.events.EDITOR_CHANGE,function(F){F===t.default.events.TEXT_CHANGE&&k.root.classList.toggle("ql-blank",k.editor.isBlank())}),this.emitter.on(t.default.events.SCROLL_UPDATE,function(F,q){var U=k.selection.lastRange,G=U&&U.length===0?U.index:void 0;z.call(k,function(){return k.editor.update(null,q,G)},F)});var K=this.clipboard.convert(`
`+M+"


");this.setContents(K),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return _(H,[{key:"addContainer",value:function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof k=="string"){var M=k;k=document.createElement("div"),k.classList.add(M)}return this.container.insertBefore(k,I),k}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(k,I,M){var K=this,F=$(k,I,M),q=m(F,4);return k=q[0],I=q[1],M=q[3],z.call(this,function(){return K.editor.deleteText(k,I)},M,k,-1*I)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(k),this.container.classList.toggle("ql-disabled",!k)}},{key:"focus",value:function(){var k=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=k,this.scrollIntoView()}},{key:"format",value:function(k,I){var M=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.default.sources.API;return z.call(this,function(){var F=M.getSelection(!0),q=new g.default;if(F==null)return q;if(r.default.query(k,r.default.Scope.BLOCK))q=M.editor.formatLine(F.index,F.length,b({},k,I));else{if(F.length===0)return M.selection.format(k,I),q;q=M.editor.formatText(F.index,F.length,b({},k,I))}return M.setSelection(F,t.default.sources.SILENT),q},K)}},{key:"formatLine",value:function(k,I,M,K,F){var q=this,U=void 0,G=$(k,I,M,K,F),V=m(G,4);return k=V[0],I=V[1],U=V[2],F=V[3],z.call(this,function(){return q.editor.formatLine(k,I,U)},F,k,0)}},{key:"formatText",value:function(k,I,M,K,F){var q=this,U=void 0,G=$(k,I,M,K,F),V=m(G,4);return k=V[0],I=V[1],U=V[2],F=V[3],z.call(this,function(){return q.editor.formatText(k,I,U)},F,k,0)}},{key:"getBounds",value:function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=void 0;typeof k=="number"?M=this.selection.getBounds(k,I):M=this.selection.getBounds(k.index,k.length);var K=this.container.getBoundingClientRect();return{bottom:M.bottom-K.top,height:M.height,left:M.left-K.left,right:M.right-K.left,top:M.top-K.top,width:M.width}}},{key:"getContents",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,M=$(k,I),K=m(M,2);return k=K[0],I=K[1],this.editor.getContents(k,I)}},{key:"getFormat",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof k=="number"?this.editor.getFormat(k,I):this.editor.getFormat(k.index,k.length)}},{key:"getIndex",value:function(k){return k.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(k){return this.scroll.leaf(k)}},{key:"getLine",value:function(k){return this.scroll.line(k)}},{key:"getLines",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof k!="number"?this.scroll.lines(k.index,k.length):this.scroll.lines(k,I)}},{key:"getModule",value:function(k){return this.theme.modules[k]}},{key:"getSelection",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return k&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,M=$(k,I),K=m(M,2);return k=K[0],I=K[1],this.editor.getText(k,I)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(k,I,M){var K=this,F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:H.sources.API;return z.call(this,function(){return K.editor.insertEmbed(k,I,M)},F,k)}},{key:"insertText",value:function(k,I,M,K,F){var q=this,U=void 0,G=$(k,0,M,K,F),V=m(G,4);return k=V[0],U=V[2],F=V[3],z.call(this,function(){return q.editor.insertText(k,I,U)},F,k,I.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(k,I,M){this.clipboard.dangerouslyPasteHTML(k,I,M)}},{key:"removeFormat",value:function(k,I,M){var K=this,F=$(k,I,M),q=m(F,4);return k=q[0],I=q[1],M=q[3],z.call(this,function(){return K.editor.removeFormat(k,I)},M,k)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(k){var I=this,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.default.sources.API;return z.call(this,function(){k=new g.default(k);var K=I.getLength(),F=I.editor.deleteText(0,K),q=I.editor.applyDelta(k),U=q.ops[q.ops.length-1];U!=null&&typeof U.insert=="string"&&U.insert[U.insert.length-1]===` +`&&(I.editor.deleteText(I.getLength()-1,1),q.delete(1));var G=F.compose(q);return G},M)}},{key:"setSelection",value:function(k,I,M){if(k==null)this.selection.setRange(null,I||H.sources.API);else{var K=$(k,I,M),F=m(K,4);k=F[0],I=F[1],M=F[3],this.selection.setRange(new i.Range(k,I),M),M!==t.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.default.sources.API,M=new g.default().insert(k);return this.setContents(M,I)}},{key:"update",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.default.sources.USER,I=this.scroll.update(k);return this.selection.update(k),I}},{key:"updateContents",value:function(k){var I=this,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.default.sources.API;return z.call(this,function(){return k=new g.default(k),I.editor.applyDelta(k,M)},M,!0)}}]),H}();L.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},L.events=t.default.events,L.sources=t.default.sources,L.version="1.3.7",L.imports={delta:g.default,parchment:r.default,"core/module":a.default,"core/theme":P.default};function D(H,j){if(j=(0,v.default)(!0,{container:H,modules:{clipboard:!0,keyboard:!0,history:!0}},j),!j.theme||j.theme===L.DEFAULTS.theme)j.theme=P.default;else if(j.theme=L.import("themes/"+j.theme),j.theme==null)throw new Error("Invalid theme "+j.theme+". Did you register it?");var k=(0,v.default)(!0,{},j.theme.DEFAULTS);[k,j].forEach(function(K){K.modules=K.modules||{},Object.keys(K.modules).forEach(function(F){K.modules[F]===!0&&(K.modules[F]={})})});var I=Object.keys(k.modules).concat(Object.keys(j.modules)),M=I.reduce(function(K,F){var q=L.import("modules/"+F);return q==null?x.error("Cannot load "+F+" module. Are you sure you registered it?"):K[F]=q.DEFAULTS||{},K},{});return j.modules!=null&&j.modules.toolbar&&j.modules.toolbar.constructor!==Object&&(j.modules.toolbar={container:j.modules.toolbar}),j=(0,v.default)(!0,{},L.DEFAULTS,{modules:M},k,j),["bounds","container","scrollingContainer"].forEach(function(K){typeof j[K]=="string"&&(j[K]=document.querySelector(j[K]))}),j.modules=Object.keys(j.modules).reduce(function(K,F){return j.modules[F]&&(K[F]=j.modules[F]),K},{}),j}function z(H,j,k,I){if(this.options.strict&&!this.isEnabled()&&j===t.default.sources.USER)return new g.default;var M=k==null?null:this.getSelection(),K=this.editor.delta,F=H();if(M!=null&&(k===!0&&(k=M.index),I==null?M=J(M,F,j):I!==0&&(M=J(M,k,I,j)),this.setSelection(M,t.default.sources.SILENT)),F.length()>0){var q,U=[t.default.events.TEXT_CHANGE,F,K,j];if((q=this.emitter).emit.apply(q,[t.default.events.EDITOR_CHANGE].concat(U)),j!==t.default.sources.SILENT){var G;(G=this.emitter).emit.apply(G,U)}}return F}function $(H,j,k,I,M){var K={};return typeof H.index=="number"&&typeof H.length=="number"?typeof j!="number"?(M=I,I=k,k=j,j=H.length,H=H.index):(j=H.length,H=H.index):typeof j!="number"&&(M=I,I=k,k=j,j=0),(typeof k>"u"?"undefined":E(k))==="object"?(K=k,M=I):typeof k=="string"&&(I!=null?K[k]=I:M=k),M=M||t.default.sources.API,[H,j,K,M]}function J(H,j,k,I){if(H==null)return null;var M=void 0,K=void 0;if(j instanceof g.default){var F=[H.index,H.index+H.length].map(function(V){return j.transformPosition(V,I!==t.default.sources.USER)}),q=m(F,2);M=q[0],K=q[1]}else{var U=[H.index,H.index+H.length].map(function(V){return V=0?V+k:Math.max(j,V+k)}),G=m(U,2);M=G[0],K=G[1]}return new i.Range(M,K-M)}d.expandConfig=D,d.overload=$,d.default=L},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function u(r,i){for(var c=0;c0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(c,n){var v=r.order.indexOf(c),O=r.order.indexOf(n);return v>=0||O>=0?v-O:c===n?0:c1?O-1:0),N=1;N1&&arguments[1]!==void 0?arguments[1]:{};E(this,_),this.quill=p,this.options=g};m.DEFAULTS={},d.default=m},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=["error","warn","log","info"],m="warn";function _(g){if(E.indexOf(g)<=E.indexOf(m)){for(var h,o=arguments.length,e=Array(o>1?o-1:0),t=1;t0&&typeof e[0]!="number")}function o(e,t,f){var a,u;if(g(e)||g(t)||e.prototype!==t.prototype)return!1;if(_(e))return _(t)?(e=E.call(e),t=E.call(t),p(e,t,f)):!1;if(h(e)){if(!h(t)||e.length!==t.length)return!1;for(a=0;a=0;a--)if(r[a]!=i[a])return!1;for(a=r.length-1;a>=0;a--)if(u=r[a],!p(e[u],t[u],f))return!1;return typeof e==typeof t}},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(1),m=function(){function _(p,g,h){h===void 0&&(h={}),this.attrName=p,this.keyName=g;var o=E.Scope.TYPE&E.Scope.ATTRIBUTE;h.scope!=null?this.scope=h.scope&E.Scope.LEVEL|o:this.scope=E.Scope.ATTRIBUTE,h.whitelist!=null&&(this.whitelist=h.whitelist)}return _.keys=function(p){return[].map.call(p.attributes,function(g){return g.name})},_.prototype.add=function(p,g){return this.canAdd(p,g)?(p.setAttribute(this.keyName,g),!0):!1},_.prototype.canAdd=function(p,g){var h=E.query(p,E.Scope.BLOT&(this.scope|E.Scope.TYPE));return h==null?!1:this.whitelist==null?!0:typeof g=="string"?this.whitelist.indexOf(g.replace(/["']/g,""))>-1:this.whitelist.indexOf(g)>-1},_.prototype.remove=function(p){p.removeAttribute(this.keyName)},_.prototype.value=function(p){var g=p.getAttribute(this.keyName);return this.canAdd(p,g)&&g?g:""},_}();d.default=m},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.Code=void 0;var E=function(){function N(P,T){var b=[],w=!0,x=!1,L=void 0;try{for(var D=P[Symbol.iterator](),z;!(w=(z=D.next()).done)&&(b.push(z.value),!(T&&b.length===T));w=!0);}catch($){x=!0,L=$}finally{try{!w&&D.return&&D.return()}finally{if(x)throw L}}return b}return function(P,T){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return N(P,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function(){function N(P,T){for(var b=0;b=b+w)){var z=this.newlineIndex(b,!0)+1,$=D-z+1,J=this.isolate(z,$),H=J.next;J.format(x,L),H instanceof P&&H.formatAt(0,b-z+w-$,x,L)}}}},{key:"insertAt",value:function(b,w,x){if(x==null){var L=this.descendant(r.default,b),D=E(L,2),z=D[0],$=D[1];z.insertAt($,w)}}},{key:"length",value:function(){var b=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` +`)?b:b+1}},{key:"newlineIndex",value:function(b){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(w)return this.domNode.textContent.slice(0,b).lastIndexOf(` +`);var x=this.domNode.textContent.slice(b).indexOf(` +`);return x>-1?b+x:-1}},{key:"optimize",value:function(b){this.domNode.textContent.endsWith(` +`)||this.appendChild(o.default.create("text",` +`)),_(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"optimize",this).call(this,b);var w=this.next;w!=null&&w.prev===this&&w.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===w.statics.formats(w.domNode)&&(w.optimize(b),w.moveChildren(this),w.remove())}},{key:"replace",value:function(b){_(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"replace",this).call(this,b),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(w){var x=o.default.find(w);x==null?w.parentNode.removeChild(w):x instanceof o.default.Embed?x.remove():x.unwrap()})}}],[{key:"create",value:function(b){var w=_(P.__proto__||Object.getPrototypeOf(P),"create",this).call(this,b);return w.setAttribute("spellcheck",!1),w}},{key:"formats",value:function(){return!0}}]),P}(t.default);A.blotName="code-block",A.tagName="PRE",A.TAB=" ",d.Code=O,d.default=A},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},m=function(){function H(j,k){var I=[],M=!0,K=!1,F=void 0;try{for(var q=j[Symbol.iterator](),U;!(M=(U=q.next()).done)&&(I.push(U.value),!(k&&I.length===k));M=!0);}catch(G){K=!0,F=G}finally{try{!M&&q.return&&q.return()}finally{if(K)throw F}}return I}return function(j,k){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return H(j,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(){function H(j,k){for(var I=0;I=K&&!V.endsWith(` +`)&&(M=!0),I.scroll.insertAt(F,V);var X=I.scroll.line(F),ne=m(X,2),ie=ne[0],ae=ne[1],fe=(0,b.default)({},(0,i.bubbleFormats)(ie));if(ie instanceof c.default){var he=ie.descendant(t.default.Leaf,ae),me=m(he,1),ge=me[0];fe=(0,b.default)(fe,(0,i.bubbleFormats)(ge))}G=o.default.attributes.diff(fe,G)||{}}else if(E(q.insert)==="object"){var W=Object.keys(q.insert)[0];if(W==null)return F;I.scroll.insertAt(F,W,q.insert[W])}K+=U}return Object.keys(G).forEach(function(Y){I.scroll.formatAt(F,U,Y,G[Y])}),F+U},0),k.reduce(function(F,q){return typeof q.delete=="number"?(I.scroll.deleteAt(F,q.delete),F):F+(q.retain||q.insert.length||1)},0),this.scroll.batchEnd(),this.update(k)}},{key:"deleteText",value:function(k,I){return this.scroll.deleteAt(k,I),this.update(new g.default().retain(k).delete(I))}},{key:"formatLine",value:function(k,I){var M=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(K).forEach(function(F){if(!(M.scroll.whitelist!=null&&!M.scroll.whitelist[F])){var q=M.scroll.lines(k,Math.max(I,1)),U=I;q.forEach(function(G){var V=G.length();if(!(G instanceof a.default))G.format(F,K[F]);else{var X=k-G.offset(M.scroll),ne=G.newlineIndex(X+U)-X+1;G.formatAt(X,ne,F,K[F])}U-=V})}}),this.scroll.optimize(),this.update(new g.default().retain(k).retain(I,(0,A.default)(K)))}},{key:"formatText",value:function(k,I){var M=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(K).forEach(function(F){M.scroll.formatAt(k,I,F,K[F])}),this.update(new g.default().retain(k).retain(I,(0,A.default)(K)))}},{key:"getContents",value:function(k,I){return this.delta.slice(k,k+I)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(k,I){return k.concat(I.delta())},new g.default)}},{key:"getFormat",value:function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=[],K=[];I===0?this.scroll.path(k).forEach(function(q){var U=m(q,1),G=U[0];G instanceof c.default?M.push(G):G instanceof t.default.Leaf&&K.push(G)}):(M=this.scroll.lines(k,I),K=this.scroll.descendants(t.default.Leaf,k,I));var F=[M,K].map(function(q){if(q.length===0)return{};for(var U=(0,i.bubbleFormats)(q.shift());Object.keys(U).length>0;){var G=q.shift();if(G==null)return U;U=$((0,i.bubbleFormats)(G),U)}return U});return b.default.apply(b.default,F)}},{key:"getText",value:function(k,I){return this.getContents(k,I).filter(function(M){return typeof M.insert=="string"}).map(function(M){return M.insert}).join("")}},{key:"insertEmbed",value:function(k,I,M){return this.scroll.insertAt(k,I,M),this.update(new g.default().retain(k).insert(x({},I,M)))}},{key:"insertText",value:function(k,I){var M=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return I=I.replace(/\r\n/g,` +`).replace(/\r/g,` +`),this.scroll.insertAt(k,I),Object.keys(K).forEach(function(F){M.scroll.formatAt(k,I.length,F,K[F])}),this.update(new g.default().retain(k).insert(I,(0,A.default)(K)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var k=this.scroll.children.head;return k.statics.blotName!==c.default.blotName||k.children.length>1?!1:k.children.head instanceof v.default}},{key:"removeFormat",value:function(k,I){var M=this.getText(k,I),K=this.scroll.line(k+I),F=m(K,2),q=F[0],U=F[1],G=0,V=new g.default;q!=null&&(q instanceof a.default?G=q.newlineIndex(U)-U+1:G=q.length()-U,V=q.delta().slice(U,U+G-1).insert(` +`));var X=this.getContents(k,I+G),ne=X.diff(new g.default().insert(M).concat(V)),ie=new g.default().retain(k).concat(ne);return this.applyDelta(ie)}},{key:"update",value:function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,K=this.delta;if(I.length===1&&I[0].type==="characterData"&&I[0].target.data.match(D)&&t.default.find(I[0].target)){var F=t.default.find(I[0].target),q=(0,i.bubbleFormats)(F),U=F.offset(this.scroll),G=I[0].oldValue.replace(r.default.CONTENTS,""),V=new g.default().insert(G),X=new g.default().insert(F.value()),ne=new g.default().retain(U).concat(V.diff(X,M));k=ne.reduce(function(ie,ae){return ae.insert?ie.insert(ae.insert,q):ie.push(ae)},new g.default),this.delta=K.compose(k)}else this.delta=this.getDelta(),(!k||!(0,P.default)(K.compose(k),this.delta))&&(k=K.diff(this.delta,M));return k}}]),H}();function $(H,j){return Object.keys(j).reduce(function(k,I){return H[I]==null||(j[I]===H[I]?k[I]=j[I]:Array.isArray(j[I])?j[I].indexOf(H[I])<0&&(k[I]=j[I].concat([H[I]])):k[I]=[j[I],H[I]]),k},{})}function J(H){return H.reduce(function(j,k){if(k.insert===1){var I=(0,A.default)(k.attributes);return delete I.image,j.insert({image:k.attributes.image},I)}if(k.attributes!=null&&(k.attributes.list===!0||k.attributes.bullet===!0)&&(k=(0,A.default)(k),k.attributes.list?k.attributes.list="ordered":(k.attributes.list="bullet",delete k.attributes.bullet)),typeof k.insert=="string"){var M=k.insert.replace(/\r\n/g,` +`).replace(/\r/g,` +`);return j.insert(M,k.attributes)}return j.push(k)},new g.default)}d.default=z},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.Range=void 0;var E=function(){function N(P,T){var b=[],w=!0,x=!1,L=void 0;try{for(var D=P[Symbol.iterator](),z;!(w=(z=D.next()).done)&&(b.push(z.value),!(T&&b.length===T));w=!0);}catch($){x=!0,L=$}finally{try{!w&&D.return&&D.return()}finally{if(x)throw L}}return b}return function(P,T){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return N(P,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function(){function N(P,T){for(var b=0;b1&&arguments[1]!==void 0?arguments[1]:0;c(this,N),this.index=P,this.length=T},O=function(){function N(P,T){var b=this;c(this,N),this.emitter=T,this.scroll=P,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=p.default.create("cursor",this),this.lastRange=this.savedRange=new v(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){b.mouseDown||setTimeout(b.update.bind(b,f.default.sources.USER),1)}),this.emitter.on(f.default.events.EDITOR_CHANGE,function(w,x){w===f.default.events.TEXT_CHANGE&&x.length()>0&&b.update(f.default.sources.SILENT)}),this.emitter.on(f.default.events.SCROLL_BEFORE_UPDATE,function(){if(!!b.hasFocus()){var w=b.getNativeRange();w!=null&&w.start.node!==b.cursor.textNode&&b.emitter.once(f.default.events.SCROLL_UPDATE,function(){try{b.setNativeRange(w.start.node,w.start.offset,w.end.node,w.end.offset)}catch{}})}}),this.emitter.on(f.default.events.SCROLL_OPTIMIZE,function(w,x){if(x.range){var L=x.range,D=L.startNode,z=L.startOffset,$=L.endNode,J=L.endOffset;b.setNativeRange(D,z,$,J)}}),this.update(f.default.sources.SILENT)}return m(N,[{key:"handleComposition",value:function(){var T=this;this.root.addEventListener("compositionstart",function(){T.composing=!0}),this.root.addEventListener("compositionend",function(){if(T.composing=!1,T.cursor.parent){var b=T.cursor.restore();if(!b)return;setTimeout(function(){T.setNativeRange(b.startNode,b.startOffset,b.endNode,b.endOffset)},1)}})}},{key:"handleDragging",value:function(){var T=this;this.emitter.listenDOM("mousedown",document.body,function(){T.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){T.mouseDown=!1,T.update(f.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(T,b){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[T])){this.scroll.update();var w=this.getNativeRange();if(!(w==null||!w.native.collapsed||p.default.query(T,p.default.Scope.BLOCK))){if(w.start.node!==this.cursor.textNode){var x=p.default.find(w.start.node,!1);if(x==null)return;if(x instanceof p.default.Leaf){var L=x.split(w.start.offset);x.parent.insertBefore(this.cursor,L)}else x.insertBefore(this.cursor,w.start.node);this.cursor.attach()}this.cursor.format(T,b),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(T){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=this.scroll.length();T=Math.min(T,w-1),b=Math.min(T+b,w-1)-T;var x=void 0,L=this.scroll.leaf(T),D=E(L,2),z=D[0],$=D[1];if(z==null)return null;var J=z.position($,!0),H=E(J,2);x=H[0],$=H[1];var j=document.createRange();if(b>0){j.setStart(x,$);var k=this.scroll.leaf(T+b),I=E(k,2);if(z=I[0],$=I[1],z==null)return null;var M=z.position($,!0),K=E(M,2);return x=K[0],$=K[1],j.setEnd(x,$),j.getBoundingClientRect()}else{var F="left",q=void 0;return x instanceof Text?($0&&(F="right")),{bottom:q.top+q.height,height:q.height,left:q[F],right:q[F],top:q.top,width:0}}}},{key:"getNativeRange",value:function(){var T=document.getSelection();if(T==null||T.rangeCount<=0)return null;var b=T.getRangeAt(0);if(b==null)return null;var w=this.normalizeNative(b);return n.info("getNativeRange",w),w}},{key:"getRange",value:function(){var T=this.getNativeRange();if(T==null)return[null,null];var b=this.normalizedToRange(T);return[b,T]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(T){var b=this,w=[[T.start.node,T.start.offset]];T.native.collapsed||w.push([T.end.node,T.end.offset]);var x=w.map(function(z){var $=E(z,2),J=$[0],H=$[1],j=p.default.find(J,!0),k=j.offset(b.scroll);return H===0?k:j instanceof p.default.Container?k+j.length():k+j.index(J,H)}),L=Math.min(Math.max.apply(Math,i(x)),this.scroll.length()-1),D=Math.min.apply(Math,[L].concat(i(x)));return new v(D,L-D)}},{key:"normalizeNative",value:function(T){if(!A(this.root,T.startContainer)||!T.collapsed&&!A(this.root,T.endContainer))return null;var b={start:{node:T.startContainer,offset:T.startOffset},end:{node:T.endContainer,offset:T.endOffset},native:T};return[b.start,b.end].forEach(function(w){for(var x=w.node,L=w.offset;!(x instanceof Text)&&x.childNodes.length>0;)if(x.childNodes.length>L)x=x.childNodes[L],L=0;else if(x.childNodes.length===L)x=x.lastChild,L=x instanceof Text?x.data.length:x.childNodes.length+1;else break;w.node=x,w.offset=L}),b}},{key:"rangeToNative",value:function(T){var b=this,w=T.collapsed?[T.index]:[T.index,T.index+T.length],x=[],L=this.scroll.length();return w.forEach(function(D,z){D=Math.min(L-1,D);var $=void 0,J=b.scroll.leaf(D),H=E(J,2),j=H[0],k=H[1],I=j.position(k,z!==0),M=E(I,2);$=M[0],k=M[1],x.push($,k)}),x.length<2&&(x=x.concat(x)),x}},{key:"scrollIntoView",value:function(T){var b=this.lastRange;if(b!=null){var w=this.getBounds(b.index,b.length);if(w!=null){var x=this.scroll.length()-1,L=this.scroll.line(Math.min(b.index,x)),D=E(L,1),z=D[0],$=z;if(b.length>0){var J=this.scroll.line(Math.min(b.index+b.length,x)),H=E(J,1);$=H[0]}if(!(z==null||$==null)){var j=T.getBoundingClientRect();w.topj.bottom&&(T.scrollTop+=w.bottom-j.bottom)}}}}},{key:"setNativeRange",value:function(T,b){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:T,x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:b,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(n.info("setNativeRange",T,b,w,x),!(T!=null&&(this.root.parentNode==null||T.parentNode==null||w.parentNode==null))){var D=document.getSelection();if(D!=null)if(T!=null){this.hasFocus()||this.root.focus();var z=(this.getNativeRange()||{}).native;if(z==null||L||T!==z.startContainer||b!==z.startOffset||w!==z.endContainer||x!==z.endOffset){T.tagName=="BR"&&(b=[].indexOf.call(T.parentNode.childNodes,T),T=T.parentNode),w.tagName=="BR"&&(x=[].indexOf.call(w.parentNode.childNodes,w),w=w.parentNode);var $=document.createRange();$.setStart(T,b),$.setEnd(w,x),D.removeAllRanges(),D.addRange($)}}else D.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(T){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.default.sources.API;if(typeof b=="string"&&(w=b,b=!1),n.info("setRange",T),T!=null){var x=this.rangeToNative(T);this.setNativeRange.apply(this,i(x).concat([b]))}else this.setNativeRange(null);this.update(w)}},{key:"update",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f.default.sources.USER,b=this.lastRange,w=this.getRange(),x=E(w,2),L=x[0],D=x[1];if(this.lastRange=L,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,e.default)(b,this.lastRange)){var z;!this.composing&&D!=null&&D.native.collapsed&&D.start.node!==this.cursor.textNode&&this.cursor.restore();var $=[f.default.events.SELECTION_CHANGE,(0,h.default)(this.lastRange),(0,h.default)(b),T];if((z=this.emitter).emit.apply(z,[f.default.events.EDITOR_CHANGE].concat($)),T!==f.default.sources.SILENT){var J;(J=this.emitter).emit.apply(J,$)}}}}]),N}();function A(N,P){try{P.parentNode}catch{return!1}return P instanceof Text&&(P=P.parentNode),N.contains(P)}d.Range=v,d.default=O},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;r0&&(t+=1),[this.parent.domNode,t]},h.prototype.value=function(){var o;return o={},o[this.statics.blotName]=this.statics.value(this.domNode)||!0,o},h.scope=_.Scope.INLINE_BLOT,h}(m.default);d.default=p},function(y,d,s){var E=s(11),m=s(3),_={attributes:{compose:function(g,h,o){typeof g!="object"&&(g={}),typeof h!="object"&&(h={});var e=m(!0,{},h);o||(e=Object.keys(e).reduce(function(f,a){return e[a]!=null&&(f[a]=e[a]),f},{}));for(var t in g)g[t]!==void 0&&h[t]===void 0&&(e[t]=g[t]);return Object.keys(e).length>0?e:void 0},diff:function(g,h){typeof g!="object"&&(g={}),typeof h!="object"&&(h={});var o=Object.keys(g).concat(Object.keys(h)).reduce(function(e,t){return E(g[t],h[t])||(e[t]=h[t]===void 0?null:h[t]),e},{});return Object.keys(o).length>0?o:void 0},transform:function(g,h,o){if(typeof g!="object")return h;if(typeof h=="object"){if(!o)return h;var e=Object.keys(h).reduce(function(t,f){return g[f]===void 0&&(t[f]=h[f]),t},{});return Object.keys(e).length>0?e:void 0}}},iterator:function(g){return new p(g)},length:function(g){return typeof g.delete=="number"?g.delete:typeof g.retain=="number"?g.retain:typeof g.insert=="string"?g.insert.length:1}};function p(g){this.ops=g,this.index=0,this.offset=0}p.prototype.hasNext=function(){return this.peekLength()<1/0},p.prototype.next=function(g){g||(g=1/0);var h=this.ops[this.index];if(h){var o=this.offset,e=_.length(h);if(g>=e-o?(g=e-o,this.index+=1,this.offset=0):this.offset+=g,typeof h.delete=="number")return{delete:g};var t={};return h.attributes&&(t.attributes=h.attributes),typeof h.retain=="number"?t.retain=g:typeof h.insert=="string"?t.insert=h.insert.substr(o,g):t.insert=h.insert,t}else return{retain:1/0}},p.prototype.peek=function(){return this.ops[this.index]},p.prototype.peekLength=function(){return this.ops[this.index]?_.length(this.ops[this.index])-this.offset:1/0},p.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},p.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var g=this.offset,h=this.index,o=this.next(),e=this.ops.slice(this.index);return this.offset=g,this.index=h,[o].concat(e)}else return[]},y.exports=_},function(y,d){var s=function(){function E(a,u){return u!=null&&a instanceof u}var m;try{m=Map}catch{m=function(){}}var _;try{_=Set}catch{_=function(){}}var p;try{p=Promise}catch{p=function(){}}function g(a,u,r,i,c){typeof u=="object"&&(r=u.depth,i=u.prototype,c=u.includeNonEnumerable,u=u.circular);var n=[],v=[],O=typeof Buffer<"u";typeof u>"u"&&(u=!0),typeof r>"u"&&(r=1/0);function A(N,P){if(N===null)return null;if(P===0)return N;var T,b;if(typeof N!="object")return N;if(E(N,m))T=new m;else if(E(N,_))T=new _;else if(E(N,p))T=new p(function(j,k){N.then(function(I){j(A(I,P-1))},function(I){k(A(I,P-1))})});else if(g.__isArray(N))T=[];else if(g.__isRegExp(N))T=new RegExp(N.source,f(N)),N.lastIndex&&(T.lastIndex=N.lastIndex);else if(g.__isDate(N))T=new Date(N.getTime());else{if(O&&Buffer.isBuffer(N))return Buffer.allocUnsafe?T=Buffer.allocUnsafe(N.length):T=new Buffer(N.length),N.copy(T),T;E(N,Error)?T=Object.create(N):typeof i>"u"?(b=Object.getPrototypeOf(N),T=Object.create(b)):(T=Object.create(i),b=i)}if(u){var w=n.indexOf(N);if(w!=-1)return v[w];n.push(N),v.push(T)}E(N,m)&&N.forEach(function(j,k){var I=A(k,P-1),M=A(j,P-1);T.set(I,M)}),E(N,_)&&N.forEach(function(j){var k=A(j,P-1);T.add(k)});for(var x in N){var L;b&&(L=Object.getOwnPropertyDescriptor(b,x)),!(L&&L.set==null)&&(T[x]=A(N[x],P-1))}if(Object.getOwnPropertySymbols)for(var D=Object.getOwnPropertySymbols(N),x=0;x0){if($ instanceof e.BlockEmbed||k instanceof e.BlockEmbed){this.optimize();return}if($ instanceof r.default){var I=$.newlineIndex($.length(),!0);if(I>-1&&($=$.split(I+1),$===k)){this.optimize();return}}else if(k instanceof r.default){var M=k.newlineIndex(0);M>-1&&k.split(M+1)}var K=k.children.head instanceof a.default?null:k.children.head;$.moveChildren(k,K),$.remove()}this.optimize()}},{key:"enable",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",x)}},{key:"formatAt",value:function(x,L,D,z){this.whitelist!=null&&!this.whitelist[D]||(_(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,x,L,D,z),this.optimize())}},{key:"insertAt",value:function(x,L,D){if(!(D!=null&&this.whitelist!=null&&!this.whitelist[L])){if(x>=this.length())if(D==null||g.default.query(L,g.default.Scope.BLOCK)==null){var z=g.default.create(this.statics.defaultChild);this.appendChild(z),D==null&&L.endsWith(` +`)&&(L=L.slice(0,-1)),z.insertAt(0,L,D)}else{var $=g.default.create(L,D);this.appendChild($)}else _(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertAt",this).call(this,x,L,D);this.optimize()}}},{key:"insertBefore",value:function(x,L){if(x.statics.scope===g.default.Scope.INLINE_BLOT){var D=g.default.create(this.statics.defaultChild);D.appendChild(x),x=D}_(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertBefore",this).call(this,x,L)}},{key:"leaf",value:function(x){return this.path(x).pop()||[null,-1]}},{key:"line",value:function(x){return x===this.length()?this.line(x-1):this.descendant(N,x)}},{key:"lines",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,D=function z($,J,H){var j=[],k=H;return $.children.forEachAt(J,H,function(I,M,K){N(I)?j.push(I):I instanceof g.default.Container&&(j=j.concat(z(I,M,k))),k-=K}),j};return D(this,x,L)}},{key:"optimize",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(_(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,x,L),x.length>0&&this.emitter.emit(o.default.events.SCROLL_OPTIMIZE,x,L))}},{key:"path",value:function(x){return _(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"path",this).call(this,x).slice(1)}},{key:"update",value:function(x){if(this.batch!==!0){var L=o.default.sources.USER;typeof x=="string"&&(L=x),Array.isArray(x)||(x=this.observer.takeRecords()),x.length>0&&this.emitter.emit(o.default.events.SCROLL_BEFORE_UPDATE,L,x),_(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"update",this).call(this,x.concat([])),x.length>0&&this.emitter.emit(o.default.events.SCROLL_UPDATE,L,x)}}}]),b}(g.default.Scroll);P.blotName="scroll",P.className="ql-editor",P.tagName="DIV",P.defaultChild="block",P.allowedChildren=[t.default,e.BlockEmbed,c.default],d.default=P},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.SHORTKEY=d.default=void 0;var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},m=function(){function q(U,G){var V=[],X=!0,ne=!1,ie=void 0;try{for(var ae=U[Symbol.iterator](),fe;!(X=(fe=ae.next()).done)&&(V.push(fe.value),!(G&&V.length===G));X=!0);}catch(he){ne=!0,ie=he}finally{try{!X&&ae.return&&ae.return()}finally{if(ne)throw ie}}return V}return function(U,G){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return q(U,G);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(){function q(U,G){for(var V=0;V1&&arguments[1]!==void 0?arguments[1]:{},ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ie=F(V);if(ie==null||ie.key==null)return D.warn("Attempted to add invalid keyboard binding",ie);typeof X=="function"&&(X={handler:X}),typeof ne=="function"&&(ne={handler:ne}),ie=(0,t.default)(ie,X,ne),this.bindings[ie.key]=this.bindings[ie.key]||[],this.bindings[ie.key].push(ie)}},{key:"listen",value:function(){var V=this;this.quill.root.addEventListener("keydown",function(X){if(!X.defaultPrevented){var ne=X.which||X.keyCode,ie=(V.bindings[ne]||[]).filter(function(de){return U.match(X,de)});if(ie.length!==0){var ae=V.quill.getSelection();if(!(ae==null||!V.quill.hasFocus())){var fe=V.quill.getLine(ae.index),he=m(fe,2),me=he[0],ge=he[1],W=V.quill.getLeaf(ae.index),Y=m(W,2),ee=Y[0],te=Y[1],Q=ae.length===0?[ee,te]:V.quill.getLeaf(ae.index+ae.length),se=m(Q,2),oe=se[0],le=se[1],Ne=ee instanceof c.default.Text?ee.value().slice(0,te):"",Oe=oe instanceof c.default.Text?oe.value().slice(le):"",pe={collapsed:ae.length===0,empty:ae.length===0&&me.length()<=1,format:V.quill.getFormat(ae),offset:ge,prefix:Ne,suffix:Oe},Ze=ie.some(function(de){if(de.collapsed!=null&&de.collapsed!==pe.collapsed||de.empty!=null&&de.empty!==pe.empty||de.offset!=null&&de.offset!==pe.offset)return!1;if(Array.isArray(de.format)){if(de.format.every(function(je){return pe.format[je]==null}))return!1}else if(E(de.format)==="object"&&!Object.keys(de.format).every(function(je){return de.format[je]===!0?pe.format[je]!=null:de.format[je]===!1?pe.format[je]==null:(0,o.default)(de.format[je],pe.format[je])}))return!1;return de.prefix!=null&&!de.prefix.test(pe.prefix)||de.suffix!=null&&!de.suffix.test(pe.suffix)?!1:de.handler.call(V,ae,pe)!==!0});Ze&&X.preventDefault()}}}})}}]),U}(P.default);$.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},$.DEFAULTS={bindings:{bold:K("bold"),italic:K("italic"),underline:K("underline"),indent:{key:$.keys.TAB,format:["blockquote","indent","list"],handler:function(U,G){if(G.collapsed&&G.offset!==0)return!0;this.quill.format("indent","+1",v.default.sources.USER)}},outdent:{key:$.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(U,G){if(G.collapsed&&G.offset!==0)return!0;this.quill.format("indent","-1",v.default.sources.USER)}},"outdent backspace":{key:$.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(U,G){G.format.indent!=null?this.quill.format("indent","-1",v.default.sources.USER):G.format.list!=null&&this.quill.format("list",!1,v.default.sources.USER)}},"indent code-block":M(!0),"outdent code-block":M(!1),"remove tab":{key:$.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(U){this.quill.deleteText(U.index-1,1,v.default.sources.USER)}},tab:{key:$.keys.TAB,handler:function(U){this.quill.history.cutoff();var G=new a.default().retain(U.index).delete(U.length).insert(" ");this.quill.updateContents(G,v.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(U.index+1,v.default.sources.SILENT)}},"list empty enter":{key:$.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(U,G){this.quill.format("list",!1,v.default.sources.USER),G.format.indent&&this.quill.format("indent",!1,v.default.sources.USER)}},"checklist enter":{key:$.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(U){var G=this.quill.getLine(U.index),V=m(G,2),X=V[0],ne=V[1],ie=(0,t.default)({},X.formats(),{list:"checked"}),ae=new a.default().retain(U.index).insert(` +`,ie).retain(X.length()-ne-1).retain(1,{list:"unchecked"});this.quill.updateContents(ae,v.default.sources.USER),this.quill.setSelection(U.index+1,v.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:$.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(U,G){var V=this.quill.getLine(U.index),X=m(V,2),ne=X[0],ie=X[1],ae=new a.default().retain(U.index).insert(` +`,G.format).retain(ne.length()-ie-1).retain(1,{header:null});this.quill.updateContents(ae,v.default.sources.USER),this.quill.setSelection(U.index+1,v.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(U,G){var V=G.prefix.length,X=this.quill.getLine(U.index),ne=m(X,2),ie=ne[0],ae=ne[1];if(ae>V)return!0;var fe=void 0;switch(G.prefix.trim()){case"[]":case"[ ]":fe="unchecked";break;case"[x]":fe="checked";break;case"-":case"*":fe="bullet";break;default:fe="ordered"}this.quill.insertText(U.index," ",v.default.sources.USER),this.quill.history.cutoff();var he=new a.default().retain(U.index-ae).delete(V+1).retain(ie.length()-2-ae).retain(1,{list:fe});this.quill.updateContents(he,v.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(U.index-V,v.default.sources.SILENT)}},"code exit":{key:$.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(U){var G=this.quill.getLine(U.index),V=m(G,2),X=V[0],ne=V[1],ie=new a.default().retain(U.index+X.length()-ne-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(ie,v.default.sources.USER)}},"embed left":J($.keys.LEFT,!1),"embed left shift":J($.keys.LEFT,!0),"embed right":J($.keys.RIGHT,!1),"embed right shift":J($.keys.RIGHT,!0)}};function J(q,U){var G,V=q===$.keys.LEFT?"prefix":"suffix";return G={key:q,shiftKey:U,altKey:null},b(G,V,/^$/),b(G,"handler",function(ne){var ie=ne.index;q===$.keys.RIGHT&&(ie+=ne.length+1);var ae=this.quill.getLeaf(ie),fe=m(ae,1),he=fe[0];return he instanceof c.default.Embed?(q===$.keys.LEFT?U?this.quill.setSelection(ne.index-1,ne.length+1,v.default.sources.USER):this.quill.setSelection(ne.index-1,v.default.sources.USER):U?this.quill.setSelection(ne.index,ne.length+1,v.default.sources.USER):this.quill.setSelection(ne.index+ne.length+1,v.default.sources.USER),!1):!0}),G}function H(q,U){if(!(q.index===0||this.quill.getLength()<=1)){var G=this.quill.getLine(q.index),V=m(G,1),X=V[0],ne={};if(U.offset===0){var ie=this.quill.getLine(q.index-1),ae=m(ie,1),fe=ae[0];if(fe!=null&&fe.length()>1){var he=X.formats(),me=this.quill.getFormat(q.index-1,1);ne=r.default.attributes.diff(he,me)||{}}}var ge=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(U.prefix)?2:1;this.quill.deleteText(q.index-ge,ge,v.default.sources.USER),Object.keys(ne).length>0&&this.quill.formatLine(q.index-ge,ge,ne,v.default.sources.USER),this.quill.focus()}}function j(q,U){var G=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(U.suffix)?2:1;if(!(q.index>=this.quill.getLength()-G)){var V={},X=0,ne=this.quill.getLine(q.index),ie=m(ne,1),ae=ie[0];if(U.offset>=ae.length()-1){var fe=this.quill.getLine(q.index+1),he=m(fe,1),me=he[0];if(me){var ge=ae.formats(),W=this.quill.getFormat(q.index,1);V=r.default.attributes.diff(ge,W)||{},X=me.length()}}this.quill.deleteText(q.index,G,v.default.sources.USER),Object.keys(V).length>0&&this.quill.formatLine(q.index+X-1,G,V,v.default.sources.USER)}}function k(q){var U=this.quill.getLines(q),G={};if(U.length>1){var V=U[0].formats(),X=U[U.length-1].formats();G=r.default.attributes.diff(X,V)||{}}this.quill.deleteText(q,v.default.sources.USER),Object.keys(G).length>0&&this.quill.formatLine(q.index,1,G,v.default.sources.USER),this.quill.setSelection(q.index,v.default.sources.SILENT),this.quill.focus()}function I(q,U){var G=this;q.length>0&&this.quill.scroll.deleteAt(q.index,q.length);var V=Object.keys(U.format).reduce(function(X,ne){return c.default.query(ne,c.default.Scope.BLOCK)&&!Array.isArray(U.format[ne])&&(X[ne]=U.format[ne]),X},{});this.quill.insertText(q.index,` +`,V,v.default.sources.USER),this.quill.setSelection(q.index+1,v.default.sources.SILENT),this.quill.focus(),Object.keys(U.format).forEach(function(X){V[X]==null&&(Array.isArray(U.format[X])||X!=="link"&&G.quill.format(X,U.format[X],v.default.sources.USER))})}function M(q){return{key:$.keys.TAB,shiftKey:!q,format:{"code-block":!0},handler:function(G){var V=c.default.query("code-block"),X=G.index,ne=G.length,ie=this.quill.scroll.descendant(V,X),ae=m(ie,2),fe=ae[0],he=ae[1];if(fe!=null){var me=this.quill.getIndex(fe),ge=fe.newlineIndex(he,!0)+1,W=fe.newlineIndex(me+he+ne),Y=fe.domNode.textContent.slice(ge,W).split(` +`);he=0,Y.forEach(function(ee,te){q?(fe.insertAt(ge+he,V.TAB),he+=V.TAB.length,te===0?X+=V.TAB.length:ne+=V.TAB.length):ee.startsWith(V.TAB)&&(fe.deleteAt(ge+he,V.TAB.length),he-=V.TAB.length,te===0?X-=V.TAB.length:ne-=V.TAB.length),he+=ee.length+1}),this.quill.update(v.default.sources.USER),this.quill.setSelection(X,ne,v.default.sources.SILENT)}}}}function K(q){return{key:q[0].toUpperCase(),shortKey:!0,handler:function(G,V){this.quill.format(q,!V.format[q],v.default.sources.USER)}}}function F(q){if(typeof q=="string"||typeof q=="number")return F({key:q});if((typeof q>"u"?"undefined":E(q))==="object"&&(q=(0,g.default)(q,!1)),typeof q.key=="string")if($.keys[q.key.toUpperCase()]!=null)q.key=$.keys[q.key.toUpperCase()];else if(q.key.length===1)q.key=q.key.toUpperCase().charCodeAt(0);else return null;return q.shortKey&&(q[z]=q.shortKey,delete q.shortKey),q}d.default=$,d.SHORTKEY=z},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function r(i,c){var n=[],v=!0,O=!1,A=void 0;try{for(var N=i[Symbol.iterator](),P;!(v=(P=N.next()).done)&&(n.push(P.value),!(c&&n.length===c));v=!0);}catch(T){O=!0,A=T}finally{try{!v&&N.return&&N.return()}finally{if(O)throw A}}return n}return function(i,c){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return r(i,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function r(i,c,n){i===null&&(i=Function.prototype);var v=Object.getOwnPropertyDescriptor(i,c);if(v===void 0){var O=Object.getPrototypeOf(i);return O===null?void 0:r(O,c,n)}else{if("value"in v)return v.value;var A=v.get;return A===void 0?void 0:A.call(n)}},_=function(){function r(i,c){for(var n=0;n-1}d.default=t,d.sanitize=f},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},m=function(){function u(r,i){for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:!1,n=this.container.querySelector(".ql-selected");if(i!==n&&(n!=null&&n.classList.remove("ql-selected"),i!=null&&(i.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(i.parentNode.children,i),i.hasAttribute("data-value")?this.label.setAttribute("data-value",i.getAttribute("data-value")):this.label.removeAttribute("data-value"),i.hasAttribute("data-label")?this.label.setAttribute("data-label",i.getAttribute("data-label")):this.label.removeAttribute("data-label"),c))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":E(Event))==="object"){var v=document.createEvent("Event");v.initEvent("change",!0,!0),this.select.dispatchEvent(v)}this.close()}}},{key:"update",value:function(){var i=void 0;if(this.select.selectedIndex>-1){var c=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];i=this.select.options[this.select.selectedIndex],this.selectItem(c)}else this.selectItem(null);var n=i!=null&&i!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),u}();d.default=a},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(0),m=D(E),_=s(5),p=D(_),g=s(4),h=D(g),o=s(16),e=D(o),t=s(25),f=D(t),a=s(24),u=D(a),r=s(35),i=D(r),c=s(6),n=D(c),v=s(22),O=D(v),A=s(7),N=D(A),P=s(55),T=D(P),b=s(42),w=D(b),x=s(23),L=D(x);function D(z){return z&&z.__esModule?z:{default:z}}p.default.register({"blots/block":h.default,"blots/block/embed":g.BlockEmbed,"blots/break":e.default,"blots/container":f.default,"blots/cursor":u.default,"blots/embed":i.default,"blots/inline":n.default,"blots/scroll":O.default,"blots/text":N.default,"modules/clipboard":T.default,"modules/history":w.default,"modules/keyboard":L.default}),m.default.register(h.default,e.default,u.default,n.default,O.default,N.default),d.default=p.default},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(1),m=function(){function _(p){this.domNode=p,this.domNode[E.DATA_KEY]={blot:this}}return Object.defineProperty(_.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),_.create=function(p){if(this.tagName==null)throw new E.ParchmentError("Blot definition missing tagName");var g;return Array.isArray(this.tagName)?(typeof p=="string"&&(p=p.toUpperCase(),parseInt(p).toString()===p&&(p=parseInt(p))),typeof p=="number"?g=document.createElement(this.tagName[p-1]):this.tagName.indexOf(p)>-1?g=document.createElement(p):g=document.createElement(this.tagName[0])):g=document.createElement(this.tagName),this.className&&g.classList.add(this.className),g},_.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},_.prototype.clone=function(){var p=this.domNode.cloneNode(!1);return E.create(p)},_.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[E.DATA_KEY]},_.prototype.deleteAt=function(p,g){var h=this.isolate(p,g);h.remove()},_.prototype.formatAt=function(p,g,h,o){var e=this.isolate(p,g);if(E.query(h,E.Scope.BLOT)!=null&&o)e.wrap(h,o);else if(E.query(h,E.Scope.ATTRIBUTE)!=null){var t=E.create(this.statics.scope);e.wrap(t),t.format(h,o)}},_.prototype.insertAt=function(p,g,h){var o=h==null?E.create("text",g):E.create(g,h),e=this.split(p);this.parent.insertBefore(o,e)},_.prototype.insertInto=function(p,g){g===void 0&&(g=null),this.parent!=null&&this.parent.children.remove(this);var h=null;p.children.insertBefore(this,g),g!=null&&(h=g.domNode),(this.domNode.parentNode!=p.domNode||this.domNode.nextSibling!=h)&&p.domNode.insertBefore(this.domNode,h),this.parent=p,this.attach()},_.prototype.isolate=function(p,g){var h=this.split(p);return h.split(g),h},_.prototype.length=function(){return 1},_.prototype.offset=function(p){return p===void 0&&(p=this.parent),this.parent==null||this==p?0:this.parent.children.offset(this)+this.parent.offset(p)},_.prototype.optimize=function(p){this.domNode[E.DATA_KEY]!=null&&delete this.domNode[E.DATA_KEY].mutations},_.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},_.prototype.replace=function(p){p.parent!=null&&(p.parent.insertBefore(this,p.next),p.remove())},_.prototype.replaceWith=function(p,g){var h=typeof p=="string"?E.create(p,g):p;return h.replace(this),h},_.prototype.split=function(p,g){return p===0?this:this.next},_.prototype.update=function(p,g){},_.prototype.wrap=function(p,g){var h=typeof p=="string"?E.create(p,g):p;return this.parent!=null&&this.parent.insertBefore(h,this.next),h.appendChild(this),h},_.blotName="abstract",_}();d.default=m},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(12),m=s(32),_=s(33),p=s(1),g=function(){function h(o){this.attributes={},this.domNode=o,this.build()}return h.prototype.attribute=function(o,e){e?o.add(this.domNode,e)&&(o.value(this.domNode)!=null?this.attributes[o.attrName]=o:delete this.attributes[o.attrName]):(o.remove(this.domNode),delete this.attributes[o.attrName])},h.prototype.build=function(){var o=this;this.attributes={};var e=E.default.keys(this.domNode),t=m.default.keys(this.domNode),f=_.default.keys(this.domNode);e.concat(t).concat(f).forEach(function(a){var u=p.query(a,p.Scope.ATTRIBUTE);u instanceof E.default&&(o.attributes[u.attrName]=u)})},h.prototype.copy=function(o){var e=this;Object.keys(this.attributes).forEach(function(t){var f=e.attributes[t].value(e.domNode);o.format(t,f)})},h.prototype.move=function(o){var e=this;this.copy(o),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},h.prototype.values=function(){var o=this;return Object.keys(this.attributes).reduce(function(e,t){return e[t]=o.attributes[t].value(o.domNode),e},{})},h}();d.default=g},function(y,d,s){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var e in o)o.hasOwnProperty(e)&&(h[e]=o[e])};return function(h,o){g(h,o);function e(){this.constructor=h}h.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(12);function _(g,h){var o=g.getAttribute("class")||"";return o.split(/\s+/).filter(function(e){return e.indexOf(h+"-")===0})}var p=function(g){E(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.keys=function(o){return(o.getAttribute("class")||"").split(/\s+/).map(function(e){return e.split("-").slice(0,-1).join("-")})},h.prototype.add=function(o,e){return this.canAdd(o,e)?(this.remove(o),o.classList.add(this.keyName+"-"+e),!0):!1},h.prototype.remove=function(o){var e=_(o,this.keyName);e.forEach(function(t){o.classList.remove(t)}),o.classList.length===0&&o.removeAttribute("class")},h.prototype.value=function(o){var e=_(o,this.keyName)[0]||"",t=e.slice(this.keyName.length+1);return this.canAdd(o,t)?t:""},h}(m.default);d.default=p},function(y,d,s){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var e in o)o.hasOwnProperty(e)&&(h[e]=o[e])};return function(h,o){g(h,o);function e(){this.constructor=h}h.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(12);function _(g){var h=g.split("-"),o=h.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("");return h[0]+o}var p=function(g){E(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.keys=function(o){return(o.getAttribute("style")||"").split(";").map(function(e){var t=e.split(":");return t[0].trim()})},h.prototype.add=function(o,e){return this.canAdd(o,e)?(o.style[_(this.keyName)]=e,!0):!1},h.prototype.remove=function(o){o.style[_(this.keyName)]="",o.getAttribute("style")||o.removeAttribute("style")},h.prototype.value=function(o){var e=o.style[_(this.keyName)];return this.canAdd(o,e)?e:""},h}(m.default);d.default=p},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function p(g,h){for(var o=0;oP&&this.stack.undo.length>0){var T=this.stack.undo.pop();N=N.compose(T.undo),O=T.redo.compose(O)}else this.lastRecorded=P;this.stack.undo.push({redo:O,undo:N}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(O){this.stack.undo.forEach(function(A){A.undo=O.transform(A.undo,!0),A.redo=O.transform(A.redo,!0)}),this.stack.redo.forEach(function(A){A.undo=O.transform(A.undo,!0),A.redo=O.transform(A.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),n}(o.default);u.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function r(c){var n=c.ops[c.ops.length-1];return n==null?!1:n.insert!=null?typeof n.insert=="string"&&n.insert.endsWith(` +`):n.attributes!=null?Object.keys(n.attributes).some(function(v){return _.default.query(v,_.default.Scope.BLOCK)!=null}):!1}function i(c){var n=c.reduce(function(O,A){return O+=A.delete||0,O},0),v=c.length()-n;return r(c)&&(v-=1),v}d.default=u,d.getLastChangeIndex=i},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.BaseTooltip=void 0;var E=function(){function I(M,K){for(var F=0;F0&&arguments[0]!==void 0?arguments[0]:"link",q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),q!=null?this.textbox.value=q:F!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+F)||""),this.root.setAttribute("data-mode",F)}},{key:"restoreFocus",value:function(){var F=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=F}},{key:"save",value:function(){var F=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var q=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",F,e.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",F,e.default.sources.USER)),this.quill.root.scrollTop=q;break}case"video":F=j(F);case"formula":{if(!F)break;var U=this.quill.getSelection(!0);if(U!=null){var G=U.index+U.length;this.quill.insertEmbed(G,this.root.getAttribute("data-mode"),F,e.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(G+1," ",e.default.sources.USER),this.quill.setSelection(G+2,e.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),M}(N.default);function j(I){var M=I.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||I.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return M?(M[1]||"https")+"://www.youtube.com/embed/"+M[2]+"?showinfo=0":(M=I.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(M[1]||"https")+"://player.vimeo.com/video/"+M[2]+"/":I}function k(I,M){var K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;M.forEach(function(F){var q=document.createElement("option");F===K?q.setAttribute("selected","selected"):q.setAttribute("value",F),I.appendChild(q)})}d.BaseTooltip=H,d.default=J},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function m(){this.head=this.tail=null,this.length=0}return m.prototype.append=function(){for(var _=[],p=0;p1&&this.append.apply(this,_.slice(1))},m.prototype.contains=function(_){for(var p,g=this.iterator();p=g();)if(p===_)return!0;return!1},m.prototype.insertBefore=function(_,p){!_||(_.next=p,p!=null?(_.prev=p.prev,p.prev!=null&&(p.prev.next=_),p.prev=_,p===this.head&&(this.head=_)):this.tail!=null?(this.tail.next=_,_.prev=this.tail,this.tail=_):(_.prev=null,this.head=this.tail=_),this.length+=1)},m.prototype.offset=function(_){for(var p=0,g=this.head;g!=null;){if(g===_)return p;p+=g.length(),g=g.next}return-1},m.prototype.remove=function(_){!this.contains(_)||(_.prev!=null&&(_.prev.next=_.next),_.next!=null&&(_.next.prev=_.prev),_===this.head&&(this.head=_.next),_===this.tail&&(this.tail=_.prev),this.length-=1)},m.prototype.iterator=function(_){return _===void 0&&(_=this.head),function(){var p=_;return _!=null&&(_=_.next),p}},m.prototype.find=function(_,p){p===void 0&&(p=!1);for(var g,h=this.iterator();g=h();){var o=g.length();if(_f?g(t,_-f,Math.min(p,f+u-_)):g(t,0,Math.min(u,_+p-f)),f+=u}},m.prototype.map=function(_){return this.reduce(function(p,g){return p.push(_(g)),p},[])},m.prototype.reduce=function(_,p){for(var g,h=this.iterator();g=h();)p=_(p,g);return p},m}();d.default=E},function(y,d,s){var E=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var f in t)t.hasOwnProperty(f)&&(e[f]=t[f])};return function(e,t){o(e,t);function f(){this.constructor=e}e.prototype=t===null?Object.create(t):(f.prototype=t.prototype,new f)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(17),_=s(1),p={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},g=100,h=function(o){E(e,o);function e(t){var f=o.call(this,t)||this;return f.scroll=f,f.observer=new MutationObserver(function(a){f.update(a)}),f.observer.observe(f.domNode,p),f.attach(),f}return e.prototype.detach=function(){o.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(t,f){this.update(),t===0&&f===this.length()?this.children.forEach(function(a){a.remove()}):o.prototype.deleteAt.call(this,t,f)},e.prototype.formatAt=function(t,f,a,u){this.update(),o.prototype.formatAt.call(this,t,f,a,u)},e.prototype.insertAt=function(t,f,a){this.update(),o.prototype.insertAt.call(this,t,f,a)},e.prototype.optimize=function(t,f){var a=this;t===void 0&&(t=[]),f===void 0&&(f={}),o.prototype.optimize.call(this,f);for(var u=[].slice.call(this.observer.takeRecords());u.length>0;)t.push(u.pop());for(var r=function(v,O){O===void 0&&(O=!0),!(v==null||v===a)&&v.domNode.parentNode!=null&&(v.domNode[_.DATA_KEY].mutations==null&&(v.domNode[_.DATA_KEY].mutations=[]),O&&r(v.parent))},i=function(v){v.domNode[_.DATA_KEY]==null||v.domNode[_.DATA_KEY].mutations==null||(v instanceof m.default&&v.children.forEach(i),v.optimize(f))},c=t,n=0;c.length>0;n+=1){if(n>=g)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach(function(v){var O=_.find(v.target,!0);O!=null&&(O.domNode===v.target&&(v.type==="childList"?(r(_.find(v.previousSibling,!1)),[].forEach.call(v.addedNodes,function(A){var N=_.find(A,!1);r(N,!1),N instanceof m.default&&N.children.forEach(function(P){r(P,!1)})})):v.type==="attributes"&&r(O.prev)),r(O))}),this.children.forEach(i),c=[].slice.call(this.observer.takeRecords()),u=c.slice();u.length>0;)t.push(u.pop())}},e.prototype.update=function(t,f){var a=this;f===void 0&&(f={}),t=t||this.observer.takeRecords(),t.map(function(u){var r=_.find(u.target,!0);return r==null?null:r.domNode[_.DATA_KEY].mutations==null?(r.domNode[_.DATA_KEY].mutations=[u],r):(r.domNode[_.DATA_KEY].mutations.push(u),null)}).forEach(function(u){u==null||u===a||u.domNode[_.DATA_KEY]==null||u.update(u.domNode[_.DATA_KEY].mutations||[],f)}),this.domNode[_.DATA_KEY].mutations!=null&&o.prototype.update.call(this,this.domNode[_.DATA_KEY].mutations,f),this.optimize(t,f)},e.blotName="scroll",e.defaultChild="block",e.scope=_.Scope.BLOCK_BLOT,e.tagName="DIV",e}(m.default);d.default=h},function(y,d,s){var E=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,e){o.__proto__=e}||function(o,e){for(var t in e)e.hasOwnProperty(t)&&(o[t]=e[t])};return function(o,e){h(o,e);function t(){this.constructor=o}o.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(18),_=s(1);function p(h,o){if(Object.keys(h).length!==Object.keys(o).length)return!1;for(var e in h)if(h[e]!==o[e])return!1;return!0}var g=function(h){E(o,h);function o(){return h!==null&&h.apply(this,arguments)||this}return o.formats=function(e){if(e.tagName!==o.tagName)return h.formats.call(this,e)},o.prototype.format=function(e,t){var f=this;e===this.statics.blotName&&!t?(this.children.forEach(function(a){a instanceof m.default||(a=a.wrap(o.blotName,!0)),f.attributes.copy(a)}),this.unwrap()):h.prototype.format.call(this,e,t)},o.prototype.formatAt=function(e,t,f,a){if(this.formats()[f]!=null||_.query(f,_.Scope.ATTRIBUTE)){var u=this.isolate(e,t);u.format(f,a)}else h.prototype.formatAt.call(this,e,t,f,a)},o.prototype.optimize=function(e){h.prototype.optimize.call(this,e);var t=this.formats();if(Object.keys(t).length===0)return this.unwrap();var f=this.next;f instanceof o&&f.prev===this&&p(t,f.formats())&&(f.moveChildren(this),f.remove())},o.blotName="inline",o.scope=_.Scope.INLINE_BLOT,o.tagName="SPAN",o}(m.default);d.default=g},function(y,d,s){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var e in o)o.hasOwnProperty(e)&&(h[e]=o[e])};return function(h,o){g(h,o);function e(){this.constructor=h}h.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(18),_=s(1),p=function(g){E(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.formats=function(o){var e=_.query(h.blotName).tagName;if(o.tagName!==e)return g.formats.call(this,o)},h.prototype.format=function(o,e){_.query(o,_.Scope.BLOCK)!=null&&(o===this.statics.blotName&&!e?this.replaceWith(h.blotName):g.prototype.format.call(this,o,e))},h.prototype.formatAt=function(o,e,t,f){_.query(t,_.Scope.BLOCK)!=null?this.format(t,f):g.prototype.formatAt.call(this,o,e,t,f)},h.prototype.insertAt=function(o,e,t){if(t==null||_.query(e,_.Scope.INLINE)!=null)g.prototype.insertAt.call(this,o,e,t);else{var f=this.split(o),a=_.create(e,t);f.parent.insertBefore(a,f)}},h.prototype.update=function(o,e){navigator.userAgent.match(/Trident/)?this.build():g.prototype.update.call(this,o,e)},h.blotName="block",h.scope=_.Scope.BLOCK_BLOT,h.tagName="P",h}(m.default);d.default=p},function(y,d,s){var E=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,h){g.__proto__=h}||function(g,h){for(var o in h)h.hasOwnProperty(o)&&(g[o]=h[o])};return function(g,h){p(g,h);function o(){this.constructor=g}g.prototype=h===null?Object.create(h):(o.prototype=h.prototype,new o)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(19),_=function(p){E(g,p);function g(){return p!==null&&p.apply(this,arguments)||this}return g.formats=function(h){},g.prototype.format=function(h,o){p.prototype.formatAt.call(this,0,this.length(),h,o)},g.prototype.formatAt=function(h,o,e,t){h===0&&o===this.length()?this.format(e,t):p.prototype.formatAt.call(this,h,o,e,t)},g.prototype.formats=function(){return this.statics.formats(this.domNode)},g}(m.default);d.default=_},function(y,d,s){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var e in o)o.hasOwnProperty(e)&&(h[e]=o[e])};return function(h,o){g(h,o);function e(){this.constructor=h}h.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(19),_=s(1),p=function(g){E(h,g);function h(o){var e=g.call(this,o)||this;return e.text=e.statics.value(e.domNode),e}return h.create=function(o){return document.createTextNode(o)},h.value=function(o){var e=o.data;return e.normalize&&(e=e.normalize()),e},h.prototype.deleteAt=function(o,e){this.domNode.data=this.text=this.text.slice(0,o)+this.text.slice(o+e)},h.prototype.index=function(o,e){return this.domNode===o?e:-1},h.prototype.insertAt=function(o,e,t){t==null?(this.text=this.text.slice(0,o)+e+this.text.slice(o),this.domNode.data=this.text):g.prototype.insertAt.call(this,o,e,t)},h.prototype.length=function(){return this.text.length},h.prototype.optimize=function(o){g.prototype.optimize.call(this,o),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof h&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},h.prototype.position=function(o,e){return[this.domNode,o]},h.prototype.split=function(o,e){if(e===void 0&&(e=!1),!e){if(o===0)return this;if(o===this.length())return this.next}var t=_.create(this.domNode.splitText(o));return this.parent.insertBefore(t,this.next),this.text=this.statics.value(this.domNode),t},h.prototype.update=function(o,e){var t=this;o.some(function(f){return f.type==="characterData"&&f.target===t.domNode})&&(this.text=this.statics.value(this.domNode))},h.prototype.value=function(){return this.text},h.blotName="text",h.scope=_.Scope.INLINE_BLOT,h}(m.default);d.default=p},function(y,d,s){var E=document.createElement("div");if(E.classList.toggle("test-class",!1),E.classList.contains("test-class")){var m=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(_,p){return arguments.length>1&&!this.contains(_)==!p?p:m.call(this,_)}}String.prototype.startsWith||(String.prototype.startsWith=function(_,p){return p=p||0,this.substr(p,_.length)===_}),String.prototype.endsWith||(String.prototype.endsWith=function(_,p){var g=this.toString();(typeof p!="number"||!isFinite(p)||Math.floor(p)!==p||p>g.length)&&(p=g.length),p-=_.length;var h=g.indexOf(_,p);return h!==-1&&h===p}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(p){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof p!="function")throw new TypeError("predicate must be a function");for(var g=Object(this),h=g.length>>>0,o=arguments[1],e,t=0;tv.length?n:v,N=n.length>v.length?v:n,P=A.indexOf(N);if(P!=-1)return O=[[E,A.substring(0,P)],[m,N],[E,A.substring(P+N.length)]],n.length>v.length&&(O[0][0]=O[2][0]=s),O;if(N.length==1)return[[s,n],[E,v]];var T=t(n,v);if(T){var b=T[0],w=T[1],x=T[2],L=T[3],D=T[4],z=_(b,x),$=_(w,L);return z.concat([[m,D]],$)}return g(n,v)}function g(n,v){for(var O=n.length,A=v.length,N=Math.ceil((O+A)/2),P=N,T=2*N,b=new Array(T),w=new Array(T),x=0;xO)$+=2;else if(K>A)z+=2;else if(D){var F=P+L-k;if(F>=0&&F=q)return h(n,v,M,K)}}}for(var U=-j+J;U<=j-H;U+=2){var F=P+U,q;U==-j||U!=j&&w[F-1]O)H+=2;else if(G>A)J+=2;else if(!D){var I=P+L-U;if(I>=0&&I=q)return h(n,v,M,K)}}}}return[[s,n],[E,v]]}function h(n,v,O,A){var N=n.substring(0,O),P=v.substring(0,A),T=n.substring(O),b=v.substring(A),w=_(N,P),x=_(T,b);return w.concat(x)}function o(n,v){if(!n||!v||n.charAt(0)!=v.charAt(0))return 0;for(var O=0,A=Math.min(n.length,v.length),N=A,P=0;Ov.length?n:v,A=n.length>v.length?v:n;if(O.length<4||A.length*2=$.length?[M,K,F,q,I]:null}var P=N(O,A,Math.ceil(O.length/4)),T=N(O,A,Math.ceil(O.length/2)),b;if(!P&&!T)return null;T?P?b=P[4].length>T[4].length?P:T:b=T:b=P;var w,x,L,D;n.length>v.length?(w=b[0],x=b[1],L=b[2],D=b[3]):(L=b[0],D=b[1],w=b[2],x=b[3]);var z=b[4];return[w,x,L,D,z]}function f(n){n.push([m,""]);for(var v=0,O=0,A=0,N="",P="",T;v1?(O!==0&&A!==0&&(T=o(P,N),T!==0&&(v-O-A>0&&n[v-O-A-1][0]==m?n[v-O-A-1][1]+=P.substring(0,T):(n.splice(0,0,[m,P.substring(0,T)]),v++),P=P.substring(T),N=N.substring(T)),T=e(P,N),T!==0&&(n[v][1]=P.substring(P.length-T)+n[v][1],P=P.substring(0,P.length-T),N=N.substring(0,N.length-T))),O===0?n.splice(v-A,O+A,[E,P]):A===0?n.splice(v-O,O+A,[s,N]):n.splice(v-O-A,O+A,[s,N],[E,P]),v=v-O-A+(O?1:0)+(A?1:0)+1):v!==0&&n[v-1][0]==m?(n[v-1][1]+=n[v][1],n.splice(v,1)):v++,A=0,O=0,N="",P="";break}n[n.length-1][1]===""&&n.pop();var b=!1;for(v=1;v0&&A.splice(N+2,0,[T[0],b]),c(A,N,3)}else return n}function i(n){for(var v=!1,O=function(T){return T.charCodeAt(0)>=56320&&T.charCodeAt(0)<=57343},A=function(T){return T.charCodeAt(T.length-1)>=55296&&T.charCodeAt(T.length-1)<=56319},N=2;N0&&P.push(n[N]);return P}function c(n,v,O){for(var A=v+O-1;A>=0&&A>=v-1;A--)if(A+1\r?\n +\<"),this.convert();var Q=this.quill.getFormat(this.quill.selection.savedRange.index);if(Q[A.default.blotName]){var se=this.container.innerText;return this.container.innerHTML="",new o.default().insert(se,x({},A.default.blotName,Q[A.default.blotName]))}var oe=this.prepareMatching(),le=m(oe,2),Ne=le[0],Oe=le[1],pe=U(this.container,Ne,Oe);return F(pe,` +`)&&pe.ops[pe.ops.length-1].attributes==null&&(pe=pe.compose(new o.default().retain(pe.length()-1).delete(1))),$.log("convert",this.container.innerHTML,pe),this.container.innerHTML="",pe}},{key:"dangerouslyPasteHTML",value:function(te,Q){var se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:a.default.sources.API;if(typeof te=="string")this.quill.setContents(this.convert(te),Q),this.quill.setSelection(0,a.default.sources.SILENT);else{var oe=this.convert(Q);this.quill.updateContents(new o.default().retain(te).concat(oe),se),this.quill.setSelection(te+oe.length(),a.default.sources.SILENT)}}},{key:"onPaste",value:function(te){var Q=this;if(!(te.defaultPrevented||!this.quill.isEnabled())){var se=this.quill.getSelection(),oe=new o.default().retain(se.index),le=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(a.default.sources.SILENT),setTimeout(function(){oe=oe.concat(Q.convert()).delete(se.length),Q.quill.updateContents(oe,a.default.sources.USER),Q.quill.setSelection(oe.length()-se.length,a.default.sources.SILENT),Q.quill.scrollingContainer.scrollTop=le,Q.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var te=this,Q=[],se=[];return this.matchers.forEach(function(oe){var le=m(oe,2),Ne=le[0],Oe=le[1];switch(Ne){case Node.TEXT_NODE:se.push(Oe);break;case Node.ELEMENT_NODE:Q.push(Oe);break;default:[].forEach.call(te.container.querySelectorAll(Ne),function(pe){pe[J]=pe[J]||[],pe[J].push(Oe)});break}}),[Q,se]}}]),Y}(c.default);I.DEFAULTS={matchers:[],matchVisual:!0};function M(W,Y,ee){return(typeof Y>"u"?"undefined":E(Y))==="object"?Object.keys(Y).reduce(function(te,Q){return M(te,Q,Y[Q])},W):W.reduce(function(te,Q){return Q.attributes&&Q.attributes[Y]?te.push(Q):te.insert(Q.insert,(0,g.default)({},x({},Y,ee),Q.attributes))},new o.default)}function K(W){if(W.nodeType!==Node.ELEMENT_NODE)return{};var Y="__ql-computed-style";return W[Y]||(W[Y]=window.getComputedStyle(W))}function F(W,Y){for(var ee="",te=W.ops.length-1;te>=0&&ee.length-1}function U(W,Y,ee){return W.nodeType===W.TEXT_NODE?ee.reduce(function(te,Q){return Q(W,te)},new o.default):W.nodeType===W.ELEMENT_NODE?[].reduce.call(W.childNodes||[],function(te,Q){var se=U(Q,Y,ee);return Q.nodeType===W.ELEMENT_NODE&&(se=Y.reduce(function(oe,le){return le(Q,oe)},se),se=(Q[J]||[]).reduce(function(oe,le){return le(Q,oe)},se)),te.concat(se)},new o.default):new o.default}function G(W,Y,ee){return M(ee,W,!0)}function V(W,Y){var ee=t.default.Attributor.Attribute.keys(W),te=t.default.Attributor.Class.keys(W),Q=t.default.Attributor.Style.keys(W),se={};return ee.concat(te).concat(Q).forEach(function(oe){var le=t.default.query(oe,t.default.Scope.ATTRIBUTE);le!=null&&(se[le.attrName]=le.value(W),se[le.attrName])||(le=j[oe],le!=null&&(le.attrName===oe||le.keyName===oe)&&(se[le.attrName]=le.value(W)||void 0),le=k[oe],le!=null&&(le.attrName===oe||le.keyName===oe)&&(le=k[oe],se[le.attrName]=le.value(W)||void 0))}),Object.keys(se).length>0&&(Y=M(Y,se)),Y}function X(W,Y){var ee=t.default.query(W);if(ee==null)return Y;if(ee.prototype instanceof t.default.Embed){var te={},Q=ee.value(W);Q!=null&&(te[ee.blotName]=Q,Y=new o.default().insert(te,ee.formats(W)))}else typeof ee.formats=="function"&&(Y=M(Y,ee.blotName,ee.formats(W)));return Y}function ne(W,Y){return F(Y,` +`)||Y.insert(` +`),Y}function ie(){return new o.default}function ae(W,Y){var ee=t.default.query(W);if(ee==null||ee.blotName!=="list-item"||!F(Y,` +`))return Y;for(var te=-1,Q=W.parentNode;!Q.classList.contains("ql-clipboard");)(t.default.query(Q)||{}).blotName==="list"&&(te+=1),Q=Q.parentNode;return te<=0?Y:Y.compose(new o.default().retain(Y.length()-1).retain(1,{indent:te}))}function fe(W,Y){return F(Y,` +`)||(q(W)||Y.length()>0&&W.nextSibling&&q(W.nextSibling))&&Y.insert(` +`),Y}function he(W,Y){if(q(W)&&W.nextElementSibling!=null&&!F(Y,` + +`)){var ee=W.offsetHeight+parseFloat(K(W).marginTop)+parseFloat(K(W).marginBottom);W.nextElementSibling.offsetTop>W.offsetTop+ee*1.5&&Y.insert(` +`)}return Y}function me(W,Y){var ee={},te=W.style||{};return te.fontStyle&&K(W).fontStyle==="italic"&&(ee.italic=!0),te.fontWeight&&(K(W).fontWeight.startsWith("bold")||parseInt(K(W).fontWeight)>=700)&&(ee.bold=!0),Object.keys(ee).length>0&&(Y=M(Y,ee)),parseFloat(te.textIndent||0)>0&&(Y=new o.default().insert(" ").concat(Y)),Y}function ge(W,Y){var ee=W.data;if(W.parentNode.tagName==="O:P")return Y.insert(ee.trim());if(ee.trim().length===0&&W.parentNode.classList.contains("ql-clipboard"))return Y;if(!K(W.parentNode).whiteSpace.startsWith("pre")){var te=function(se,oe){return oe=oe.replace(/[^\u00a0]/g,""),oe.length<1&&se?" ":oe};ee=ee.replace(/\r\n/g," ").replace(/\n/g," "),ee=ee.replace(/\s\s+/g,te.bind(te,!0)),(W.previousSibling==null&&q(W.parentNode)||W.previousSibling!=null&&q(W.previousSibling))&&(ee=ee.replace(/^\s+/,te.bind(te,!1))),(W.nextSibling==null&&q(W.parentNode)||W.nextSibling!=null&&q(W.nextSibling))&&(ee=ee.replace(/\s+$/,te.bind(te,!1)))}return Y.insert(ee)}d.default=I,d.matchAttributor=V,d.matchBlot=X,d.matchNewline=fe,d.matchSpacing=he,d.matchText=ge},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;r '},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;rt.right&&(a=t.right-f.right,this.root.style.left=o+a+"px"),f.leftt.bottom){var u=f.bottom-f.top,r=h.bottom-h.top+u;this.root.style.top=e-r+"px",this.root.classList.add("ql-flip")}return a}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),p}();d.default=_},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function T(b,w){var x=[],L=!0,D=!1,z=void 0;try{for(var $=b[Symbol.iterator](),J;!(L=(J=$.next()).done)&&(x.push(J.value),!(w&&x.length===w));L=!0);}catch(H){D=!0,z=H}finally{try{!L&&$.return&&$.return()}finally{if(D)throw z}}return x}return function(b,w){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return T(b,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function T(b,w,x){b===null&&(b=Function.prototype);var L=Object.getOwnPropertyDescriptor(b,w);if(L===void 0){var D=Object.getPrototypeOf(b);return D===null?void 0:T(D,w,x)}else{if("value"in L)return L.value;var z=L.get;return z===void 0?void 0:z.call(x)}},_=function(){function T(b,w){for(var x=0;x','','',''].join(""),d.default=N},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(29),m=Q(E),_=s(36),p=s(38),g=s(64),h=s(65),o=Q(h),e=s(66),t=Q(e),f=s(67),a=Q(f),u=s(37),r=s(26),i=s(39),c=s(40),n=s(56),v=Q(n),O=s(68),A=Q(O),N=s(27),P=Q(N),T=s(69),b=Q(T),w=s(70),x=Q(w),L=s(71),D=Q(L),z=s(72),$=Q(z),J=s(73),H=Q(J),j=s(13),k=Q(j),I=s(74),M=Q(I),K=s(75),F=Q(K),q=s(57),U=Q(q),G=s(41),V=Q(G),X=s(28),ne=Q(X),ie=s(59),ae=Q(ie),fe=s(60),he=Q(fe),me=s(61),ge=Q(me),W=s(108),Y=Q(W),ee=s(62),te=Q(ee);function Q(se){return se&&se.__esModule?se:{default:se}}m.default.register({"attributors/attribute/direction":p.DirectionAttribute,"attributors/class/align":_.AlignClass,"attributors/class/background":u.BackgroundClass,"attributors/class/color":r.ColorClass,"attributors/class/direction":p.DirectionClass,"attributors/class/font":i.FontClass,"attributors/class/size":c.SizeClass,"attributors/style/align":_.AlignStyle,"attributors/style/background":u.BackgroundStyle,"attributors/style/color":r.ColorStyle,"attributors/style/direction":p.DirectionStyle,"attributors/style/font":i.FontStyle,"attributors/style/size":c.SizeStyle},!0),m.default.register({"formats/align":_.AlignClass,"formats/direction":p.DirectionClass,"formats/indent":g.IndentClass,"formats/background":u.BackgroundStyle,"formats/color":r.ColorStyle,"formats/font":i.FontClass,"formats/size":c.SizeClass,"formats/blockquote":o.default,"formats/code-block":k.default,"formats/header":t.default,"formats/list":a.default,"formats/bold":v.default,"formats/code":j.Code,"formats/italic":A.default,"formats/link":P.default,"formats/script":b.default,"formats/strike":x.default,"formats/underline":D.default,"formats/image":$.default,"formats/video":H.default,"formats/list/item":f.ListItem,"modules/formula":M.default,"modules/syntax":F.default,"modules/toolbar":U.default,"themes/bubble":Y.default,"themes/snow":te.default,"ui/icons":V.default,"ui/picker":ne.default,"ui/icon-picker":he.default,"ui/color-picker":ae.default,"ui/tooltip":ge.default},!0),d.default=m.default},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.IndentClass=void 0;var E=function(){function a(u,r){for(var i=0;i0&&this.children.tail.format(A,N)}},{key:"formats",value:function(){return f({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(A,N){if(A instanceof i)m(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertBefore",this).call(this,A,N);else{var P=N==null?this.length():N.offset(this),T=this.split(P);T.parent.insertBefore(A,T)}}},{key:"optimize",value:function(A){m(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,A);var N=this.next;N!=null&&N.prev===this&&N.statics.blotName===this.statics.blotName&&N.domNode.tagName===this.domNode.tagName&&N.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(N.moveChildren(this),N.remove())}},{key:"replace",value:function(A){if(A.statics.blotName!==this.statics.blotName){var N=p.default.create(this.statics.defaultChild);A.moveChildren(N),this.appendChild(N)}m(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"replace",this).call(this,A)}}]),v}(e.default);c.blotName="list",c.scope=p.default.Scope.BLOCK_BLOT,c.tagName=["OL","UL"],c.defaultChild="list-item",c.allowedChildren=[i],d.ListItem=i,d.default=c},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(56),m=_(E);function _(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function h(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(e){h(t,e);function t(){return p(this,t),g(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return t}(m.default);o.blotName="italic",o.tagName=["EM","I"],d.default=o},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;r-1?n?this.domNode.setAttribute(c,n):this.domNode.removeAttribute(c):m(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,c,n)}}],[{key:"create",value:function(c){var n=m(r.__proto__||Object.getPrototypeOf(r),"create",this).call(this,c);return typeof c=="string"&&n.setAttribute("src",this.sanitize(c)),n}},{key:"formats",value:function(c){return f.reduce(function(n,v){return c.hasAttribute(v)&&(n[v]=c.getAttribute(v)),n},{})}},{key:"match",value:function(c){return/\.(jpe?g|gif|png)$/.test(c)||/^data:image\/.+;base64/.test(c)}},{key:"sanitize",value:function(c){return(0,g.sanitize)(c,["http","https","data"])?c:"//:0"}},{key:"value",value:function(c){return c.getAttribute("src")}}]),r}(p.default.Embed);a.blotName="image",a.tagName="IMG",d.default=a},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function u(r,i){for(var c=0;c-1?n?this.domNode.setAttribute(c,n):this.domNode.removeAttribute(c):m(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,c,n)}}],[{key:"create",value:function(c){var n=m(r.__proto__||Object.getPrototypeOf(r),"create",this).call(this,c);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(c)),n}},{key:"formats",value:function(c){return f.reduce(function(n,v){return c.hasAttribute(v)&&(n[v]=c.getAttribute(v)),n},{})}},{key:"sanitize",value:function(c){return g.default.sanitize(c)}},{key:"value",value:function(c){return c.getAttribute("src")}}]),r}(_.BlockEmbed);a.blotName="video",a.className="ql-video",a.tagName="IFRAME",d.default=a},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.FormulaBlot=void 0;var E=function(){function c(n,v){for(var O=0;O0||this.cachedText==null)&&(this.domNode.innerHTML=P(T),this.domNode.normalize(),this.attach()),this.cachedText=T)}}]),A}(f.default);c.className="ql-syntax";var n=new p.default.Attributor.Class("token","hljs",{scope:p.default.Scope.INLINE}),v=function(O){i(A,O),E(A,null,[{key:"register",value:function(){h.default.register(n,!0),h.default.register(c,!0)}}]);function A(N,P){u(this,A);var T=r(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,N,P));if(typeof T.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var b=null;return T.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(b),b=setTimeout(function(){T.highlight(),b=null},T.options.interval)}),T.highlight(),T}return E(A,[{key:"highlight",value:function(){var P=this;if(!this.quill.selection.composing){this.quill.update(h.default.sources.USER);var T=this.quill.getSelection();this.quill.scroll.descendants(c).forEach(function(b){b.highlight(P.options.highlight)}),this.quill.update(h.default.sources.SILENT),T!=null&&this.quill.setSelection(T,h.default.sources.SILENT)}}}]),A}(e.default);v.DEFAULTS={highlight:function(){return window.hljs==null?null:function(O){var A=window.hljs.highlightAuto(O);return A.value}}(),interval:1e3},d.CodeBlock=c,d.CodeToken=n,d.default=v},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.BubbleTooltip=void 0;var E=function A(N,P,T){N===null&&(N=Function.prototype);var b=Object.getOwnPropertyDescriptor(N,P);if(b===void 0){var w=Object.getPrototypeOf(N);return w===null?void 0:A(w,P,T)}else{if("value"in b)return b.value;var x=b.get;return x===void 0?void 0:x.call(T)}},m=function(){function A(N,P){for(var T=0;T0&&D===h.default.sources.USER){b.show(),b.root.style.left="0px",b.root.style.width="",b.root.style.width=b.root.offsetWidth+"px";var z=b.quill.getLines(x.index,x.length);if(z.length===1)b.position(b.quill.getBounds(x));else{var $=z[z.length-1],J=b.quill.getIndex($),H=Math.min($.length()-1,x.index+x.length-J),j=b.quill.getBounds(new t.Range(J,H));b.position(j)}}else document.activeElement!==b.textbox&&b.quill.hasFocus()&&b.hide()}),b}return m(N,[{key:"listen",value:function(){var T=this;E(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){T.root.classList.remove("ql-editing")}),this.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!T.root.classList.contains("ql-hidden")){var b=T.quill.getSelection();b!=null&&T.position(T.quill.getBounds(b))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(T){var b=E(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"position",this).call(this,T),w=this.root.querySelector(".ql-tooltip-arrow");if(w.style.marginLeft="",b===0)return b;w.style.marginLeft=-1*b-w.offsetWidth/2+"px"}}]),N}(o.BaseTooltip);O.TEMPLATE=['','
','','',"
"].join(""),d.BubbleTooltip=O,d.default=v},function(y,d,s){y.exports=s(63)}]).default})})(Vn);const tt=nr(Vn.exports);var Ue=-1,De=1,Re=0;function wt(R,B,y,d){if(R===B)return R?[[Re,R]]:[];if(y!=null){var s=yr(R,B,y);if(s)return s}var E=Bn(R,B),m=R.substring(0,E);R=R.substring(E),B=B.substring(E),E=Cn(R,B);var _=R.substring(R.length-E);R=R.substring(0,R.length-E),B=B.substring(0,B.length-E);var p=hr(R,B);return m&&p.unshift([Re,m]),_&&p.push([Re,_]),Zn(p,d),p}function hr(R,B){var y;if(!R)return[[De,B]];if(!B)return[[Ue,R]];var d=R.length>B.length?R:B,s=R.length>B.length?B:R,E=d.indexOf(s);if(E!==-1)return y=[[De,d.substring(0,E)],[Re,s],[De,d.substring(E+s.length)]],R.length>B.length&&(y[0][0]=y[2][0]=Ue),y;if(s.length===1)return[[Ue,R],[De,B]];var m=vr(R,B);if(m){var _=m[0],p=m[1],g=m[2],h=m[3],o=m[4],e=wt(_,g),t=wt(p,h);return e.concat([[Re,o]],t)}return dr(R,B)}function dr(R,B){for(var y=R.length,d=B.length,s=Math.ceil((y+d)/2),E=s,m=2*s,_=new Array(m),p=new Array(m),g=0;gy)t+=2;else if(n>d)e+=2;else if(o){var v=E+h-r;if(v>=0&&v=O)return zn(R,B,c,n)}}}for(var A=-u+f;A<=u-a;A+=2){var v=E+A,O;A===-u||A!==u&&p[v-1]y)a+=2;else if(N>d)f+=2;else if(!o){var i=E+h-A;if(i>=0&&i=O)return zn(R,B,c,n)}}}}return[[Ue,R],[De,B]]}function zn(R,B,y,d){var s=R.substring(0,y),E=B.substring(0,d),m=R.substring(y),_=B.substring(d),p=wt(s,E),g=wt(m,_);return p.concat(g)}function Bn(R,B){if(!R||!B||R.charAt(0)!==B.charAt(0))return 0;for(var y=0,d=Math.min(R.length,B.length),s=d,E=0;yB.length?R:B,d=R.length>B.length?B:R;if(y.length<4||d.length*2=t.length?[c,n,v,O,i]:null}var E=s(y,d,Math.ceil(y.length/4)),m=s(y,d,Math.ceil(y.length/2)),_;if(!E&&!m)return null;m?E?_=E[4].length>m[4].length?E:m:_=m:_=E;var p,g,h,o;R.length>B.length?(p=_[0],g=_[1],h=_[2],o=_[3]):(h=_[0],o=_[1],p=_[2],g=_[3]);var e=_[4];return[p,g,h,o,e]}function Zn(R,B){R.push([Re,""]);for(var y=0,d=0,s=0,E="",m="",_;y=0&&Qn(R[p][1])){var g=R[p][1].slice(-1);if(R[p][1]=R[p][1].slice(0,-1),E=g+E,m=g+m,!R[p][1]){R.splice(p,1),y--;var h=p-1;R[h]&&R[h][0]===De&&(s++,m=R[h][1]+m,h--),R[h]&&R[h][0]===Ue&&(d++,E=R[h][1]+E,h--),p=h}}if(Xn(R[y][1])){var g=R[y][1].charAt(0);R[y][1]=R[y][1].slice(1),E+=g,m+=g}}if(y0||m.length>0){E.length>0&&m.length>0&&(_=Bn(m,E),_!==0&&(p>=0?R[p][1]+=m.substring(0,_):(R.splice(0,0,[Re,m.substring(0,_)]),y++),m=m.substring(_),E=E.substring(_)),_=Cn(m,E),_!==0&&(R[y][1]=m.substring(m.length-_)+R[y][1],m=m.substring(0,m.length-_),E=E.substring(0,E.length-_)));var o=s+d;E.length===0&&m.length===0?(R.splice(y-o,o),y=y-o):E.length===0?(R.splice(y-o,o,[De,m]),y=y-o+1):m.length===0?(R.splice(y-o,o,[Ue,E]),y=y-o+1):(R.splice(y-o,o,[Ue,E],[De,m]),y=y-o+2)}y!==0&&R[y-1][0]===Re?(R[y-1][1]+=R[y][1],R.splice(y,1)):y++,s=0,d=0,E="",m="";break}}R[R.length-1][1]===""&&R.pop();var e=!1;for(y=1;y=55296&&R<=56319}function Yn(R){return R>=56320&&R<=57343}function Xn(R){return Yn(R.charCodeAt(0))}function Qn(R){return Wn(R.charCodeAt(R.length-1))}function pr(R){for(var B=[],y=0;y0&&B.push(R[y]);return B}function jn(R,B,y,d){return Qn(R)||Xn(d)?null:pr([[Re,R],[Ue,B],[De,y],[Re,d]])}function yr(R,B,y){var d=typeof y=="number"?{index:y,length:0}:y.oldRange,s=typeof y=="number"?null:y.newRange,E=R.length,m=B.length;if(d.length===0&&(s===null||s.length===0)){var _=d.index,p=R.slice(0,_),g=R.slice(_),h=s?s.index:null;e:{var o=_+m-E;if(h!==null&&h!==o||o<0||o>m)break e;var e=B.slice(0,o),t=B.slice(o);if(t!==g)break e;var f=Math.min(_,o),a=p.slice(0,f),u=e.slice(0,f);if(a!==u)break e;var r=p.slice(f),i=e.slice(f);return jn(a,r,i,g)}e:{if(h!==null&&h!==_)break e;var c=_,e=B.slice(0,c),t=B.slice(c);if(e!==p)break e;var n=Math.min(E-c,m-c),v=g.slice(g.length-n),O=t.slice(t.length-n);if(v!==O)break e;var r=g.slice(0,g.length-n),i=t.slice(0,t.length-n);return jn(p,r,i,v)}}if(d.length>0&&s&&s.length===0){e:{var a=R.slice(0,d.index),v=R.slice(d.index+d.length),f=a.length,n=v.length;if(m-1}function rn(l,S){var C=this.__data__,Z=at(C,l);return Z<0?C.push([l,S]):C[Z][1]=S,this}Ee.prototype.clear=Jt,Ee.prototype.delete=en,Ee.prototype.get=tn,Ee.prototype.has=nn,Ee.prototype.set=rn;function ke(l){var S=-1,C=l?l.length:0;for(this.clear();++S-1&&l%1==0&&l-1&&l%1==0&&l<=s}function Fe(l){var S=typeof l;return!!l&&(S=="object"||S=="function")}function Ct(l){return!!l&&typeof l=="object"}function Et(l){return st(l)?ot(l):bn(l)}function qn(){return[]}function Rn(){return!1}R.exports=It})(Gt,Gt.exports);var Vt={exports:{}};(function(R,B){var y=200,d="__lodash_hash_undefined__",s=1,E=2,m=9007199254740991,_="[object Arguments]",p="[object Array]",g="[object AsyncFunction]",h="[object Boolean]",o="[object Date]",e="[object Error]",t="[object Function]",f="[object GeneratorFunction]",a="[object Map]",u="[object Number]",r="[object Null]",i="[object Object]",c="[object Promise]",n="[object Proxy]",v="[object RegExp]",O="[object Set]",A="[object String]",N="[object Symbol]",P="[object Undefined]",T="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",x="[object Float32Array]",L="[object Float64Array]",D="[object Int8Array]",z="[object Int16Array]",$="[object Int32Array]",J="[object Uint8Array]",H="[object Uint8ClampedArray]",j="[object Uint16Array]",k="[object Uint32Array]",I=/[\\^$.*+?()[\]{}|]/g,M=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,F={};F[x]=F[L]=F[D]=F[z]=F[$]=F[J]=F[H]=F[j]=F[k]=!0,F[_]=F[p]=F[b]=F[h]=F[w]=F[o]=F[e]=F[t]=F[a]=F[u]=F[i]=F[v]=F[O]=F[A]=F[T]=!1;var q=typeof Te=="object"&&Te&&Te.Object===Object&&Te,U=typeof self=="object"&&self&&self.Object===Object&&self,G=q||U||Function("return this")(),V=B&&!B.nodeType&&B,X=V&&!0&&R&&!R.nodeType&&R,ne=X&&X.exports===V,ie=ne&&q.process,ae=function(){try{return ie&&ie.binding&&ie.binding("util")}catch{}}(),fe=ae&&ae.isTypedArray;function he(l,S){for(var C=-1,Z=l==null?0:l.length,ue=0,re=[];++C-1}function sn(l,S){var C=this.__data__,Z=lt(C,l);return Z<0?(++this.size,C.push([l,S])):C[Z][1]=S,this}ke.prototype.clear=on,ke.prototype.delete=an,ke.prototype.get=ln,ke.prototype.has=un,ke.prototype.set=sn;function Le(l){var S=-1,C=l==null?0:l.length;for(this.clear();++Sve))return!1;var ye=re.get(l);if(ye&&re.get(S))return ye==S;var Se=-1,qe=!0,_e=C&E?new ot:void 0;for(re.set(l,S),re.set(S,l);++Se-1&&l%1==0&&l-1&&l%1==0&&l<=m}function Bt(l){var S=typeof l;return l!=null&&(S=="object"||S=="function")}function Fe(l){return l!=null&&typeof l=="object"}var Ct=fe?Y(fe):En;function Et(l){return _t(l)?bn(l):An(l)}function qn(){return[]}function Rn(){return!1}R.exports=Ln})(Vt,Vt.exports);var Fn={},Jn=Te&&Te.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(Fn,"__esModule",{value:!0});var mr=Jn(Gt.exports),br=Jn(Vt.exports),Dn;(function(R){function B(E,m,_){E===void 0&&(E={}),m===void 0&&(m={}),typeof E!="object"&&(E={}),typeof m!="object"&&(m={});var p=mr.default(m);_||(p=Object.keys(p).reduce(function(h,o){return p[o]!=null&&(h[o]=p[o]),h},{}));for(var g in E)E[g]!==void 0&&m[g]===void 0&&(p[g]=E[g]);return Object.keys(p).length>0?p:void 0}R.compose=B;function y(E,m){E===void 0&&(E={}),m===void 0&&(m={}),typeof E!="object"&&(E={}),typeof m!="object"&&(m={});var _=Object.keys(E).concat(Object.keys(m)).reduce(function(p,g){return br.default(E[g],m[g])||(p[g]=m[g]===void 0?null:m[g]),p},{});return Object.keys(_).length>0?_:void 0}R.diff=y;function d(E,m){E===void 0&&(E={}),m===void 0&&(m={}),E=E||{};var _=Object.keys(m).reduce(function(p,g){return m[g]!==E[g]&&E[g]!==void 0&&(p[g]=m[g]),p},{});return Object.keys(E).reduce(function(p,g){return E[g]!==m[g]&&m[g]===void 0&&(p[g]=null),p},_)}R.invert=d;function s(E,m,_){if(_===void 0&&(_=!1),typeof E!="object")return m;if(typeof m=="object"){if(!_)return m;var p=Object.keys(m).reduce(function(g,h){return E[h]===void 0&&(g[h]=m[h]),g},{});return Object.keys(p).length>0?p:void 0}}R.transform=s})(Dn||(Dn={}));Fn.default=Dn;var Ht={},zt={},Kn;function _r(){if(Kn)return zt;Kn=1;var R=Te&&Te.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(zt,"__esModule",{value:!0});var B=R(er()),y=function(){function d(s){this.ops=s,this.index=0,this.offset=0}return d.prototype.hasNext=function(){return this.peekLength()<1/0},d.prototype.next=function(s){s||(s=1/0);var E=this.ops[this.index];if(E){var m=this.offset,_=B.default.length(E);if(s>=_-m?(s=_-m,this.index+=1,this.offset=0):this.offset+=s,typeof E.delete=="number")return{delete:s};var p={};return E.attributes&&(p.attributes=E.attributes),typeof E.retain=="number"?p.retain=s:typeof E.insert=="string"?p.insert=E.insert.substr(m,s):p.insert=E.insert,p}else return{retain:1/0}},d.prototype.peek=function(){return this.ops[this.index]},d.prototype.peekLength=function(){return this.ops[this.index]?B.default.length(this.ops[this.index])-this.offset:1/0},d.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},d.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var s=this.offset,E=this.index,m=this.next(),_=this.ops.slice(this.index);return this.offset=s,this.index=E,[m].concat(_)}else return[]},d}();return zt.default=y,zt}var $n;function er(){if($n)return Ht;$n=1;var R=Te&&Te.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Ht,"__esModule",{value:!0});var B=R(_r()),y;return function(d){function s(m){return new B.default(m)}d.iterator=s;function E(m){return typeof m.delete=="number"?m.delete:typeof m.retain=="number"?m.retain:typeof m.insert=="string"?m.insert.length:1}d.length=E}(y||(y={})),Ht.default=y,Ht}var Tt=Te&&Te.__importDefault||function(R){return R&&R.__esModule?R:{default:R}},Kt=Tt(gr),Or=Tt(Gt.exports),In=Tt(Vt.exports),At=Tt(Fn),we=Tt(er()),Er=String.fromCharCode(0);(function(){function R(B){Array.isArray(B)?this.ops=B:B!=null&&Array.isArray(B.ops)?this.ops=B.ops:this.ops=[]}return R.prototype.insert=function(B,y){var d={};return typeof B=="string"&&B.length===0?this:(d.insert=B,y!=null&&typeof y=="object"&&Object.keys(y).length>0&&(d.attributes=y),this.push(d))},R.prototype.delete=function(B){return B<=0?this:this.push({delete:B})},R.prototype.retain=function(B,y){if(B<=0)return this;var d={retain:B};return y!=null&&typeof y=="object"&&Object.keys(y).length>0&&(d.attributes=y),this.push(d)},R.prototype.push=function(B){var y=this.ops.length,d=this.ops[y-1];if(B=Or.default(B),typeof d=="object"){if(typeof B.delete=="number"&&typeof d.delete=="number")return this.ops[y-1]={delete:d.delete+B.delete},this;if(typeof d.delete=="number"&&B.insert!=null&&(y-=1,d=this.ops[y-1],typeof d!="object"))return this.ops.unshift(B),this;if(In.default(B.attributes,d.attributes)){if(typeof B.insert=="string"&&typeof d.insert=="string")return this.ops[y-1]={insert:d.insert+B.insert},typeof B.attributes=="object"&&(this.ops[y-1].attributes=B.attributes),this;if(typeof B.retain=="number"&&typeof d.retain=="number")return this.ops[y-1]={retain:d.retain+B.retain},typeof B.attributes=="object"&&(this.ops[y-1].attributes=B.attributes),this}}return y===this.ops.length?this.ops.push(B):this.ops.splice(y,0,B),this},R.prototype.chop=function(){var B=this.ops[this.ops.length-1];return B&&B.retain&&!B.attributes&&this.ops.pop(),this},R.prototype.filter=function(B){return this.ops.filter(B)},R.prototype.forEach=function(B){this.ops.forEach(B)},R.prototype.map=function(B){return this.ops.map(B)},R.prototype.partition=function(B){var y=[],d=[];return this.forEach(function(s){var E=B(s)?y:d;E.push(s)}),[y,d]},R.prototype.reduce=function(B,y){return this.ops.reduce(B,y)},R.prototype.changeLength=function(){return this.reduce(function(B,y){return y.insert?B+we.default.length(y):y.delete?B-y.delete:B},0)},R.prototype.length=function(){return this.reduce(function(B,y){return B+we.default.length(y)},0)},R.prototype.slice=function(B,y){B===void 0&&(B=0),y===void 0&&(y=1/0);for(var d=[],s=we.default.iterator(this.ops),E=0;E0&&d.next(E.retain-m)}for(var _=new R(s);y.hasNext()||d.hasNext();)if(d.peekType()==="insert")_.push(d.next());else if(y.peekType()==="delete")_.push(y.next());else{var p=Math.min(y.peekLength(),d.peekLength()),g=y.next(p),h=d.next(p);if(typeof h.retain=="number"){var o={};typeof g.retain=="number"?o.retain=p:o.insert=g.insert;var e=At.default.compose(g.attributes,h.attributes,typeof g.retain=="number");if(e&&(o.attributes=e),_.push(o),!d.hasNext()&&In.default(_.ops[_.ops.length-1],o)){var t=new R(y.rest());return _.concat(t).chop()}}else typeof h.delete=="number"&&typeof g.retain=="number"&&_.push(h)}return _.chop()},R.prototype.concat=function(B){var y=new R(this.ops.slice());return B.ops.length>0&&(y.push(B.ops[0]),y.ops=y.ops.concat(B.ops.slice(1))),y},R.prototype.diff=function(B,y){if(this.ops===B.ops)return new R;var d=[this,B].map(function(p){return p.map(function(g){if(g.insert!=null)return typeof g.insert=="string"?g.insert:Er;var h=p===B?"on":"with";throw new Error("diff() called "+h+" non-document")}).join("")}),s=new R,E=Kt.default(d[0],d[1],y),m=we.default.iterator(this.ops),_=we.default.iterator(B.ops);return E.forEach(function(p){for(var g=p[1].length;g>0;){var h=0;switch(p[0]){case Kt.default.INSERT:h=Math.min(_.peekLength(),g),s.push(_.next(h));break;case Kt.default.DELETE:h=Math.min(g,m.peekLength()),m.next(h),s.delete(h);break;case Kt.default.EQUAL:h=Math.min(m.peekLength(),_.peekLength(),g);var o=m.next(h),e=_.next(h);In.default(o.insert,e.insert)?s.retain(h,At.default.diff(o.attributes,e.attributes)):s.push(e).delete(h);break}g-=h}}),s.chop()},R.prototype.eachLine=function(B,y){y===void 0&&(y=` +`);for(var d=we.default.iterator(this.ops),s=new R,E=0;d.hasNext();){if(d.peekType()!=="insert")return;var m=d.peek(),_=we.default.length(m)-d.peekLength(),p=typeof m.insert=="string"?m.insert.indexOf(y,_)-_:-1;if(p<0)s.push(d.next());else if(p>0)s.push(d.next(p));else{if(B(s,d.next(1).attributes||{},E)===!1)return;E+=1,s=new R}}s.length()>0&&B(s,{},E)},R.prototype.invert=function(B){var y=new R;return this.reduce(function(d,s){if(s.insert)y.delete(we.default.length(s));else{if(s.retain&&s.attributes==null)return y.retain(s.retain),d+s.retain;if(s.delete||s.retain&&s.attributes){var E=s.delete||s.retain,m=B.slice(d,d+E);return m.forEach(function(_){s.delete?y.push(_):s.retain&&s.attributes&&y.retain(we.default.length(_),At.default.invert(s.attributes,_.attributes))}),d+E}}return d},0),y.chop()},R.prototype.transform=function(B,y){if(y===void 0&&(y=!1),y=!!y,typeof B=="number")return this.transformPosition(B,y);for(var d=B,s=we.default.iterator(this.ops),E=we.default.iterator(d.ops),m=new R;s.hasNext()||E.hasNext();)if(s.peekType()==="insert"&&(y||E.peekType()!=="insert"))m.retain(we.default.length(s.next()));else if(E.peekType()==="insert")m.push(E.next());else{var _=Math.min(s.peekLength(),E.peekLength()),p=s.next(_),g=E.next(_);if(p.delete)continue;g.delete?m.push(g):m.retain(_,At.default.transform(p.attributes,g.attributes,y))}return m.chop()},R.prototype.transformPosition=function(B,y){y===void 0&&(y=!1),y=!!y;for(var d=we.default.iterator(this.ops),s=0;d.hasNext()&&s<=B;){var E=d.peekLength(),m=d.peekType();if(d.next(),m==="delete"){B-=Math.min(E,B-s);continue}else m==="insert"&&(s{}},contentType:{type:String,default:"delta",validator:R=>["delta","html","text"].includes(R)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:R=>["snow","bubble",""].includes(R)},toolbar:{type:[String,Array,Object],required:!1,validator:R=>typeof R=="string"&&R!==""?R.charAt(0)==="#"?!0:Object.keys(Gn).indexOf(R)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(R,B)=>{ir(()=>{E()}),or(()=>{y=null});let y,d;const s=$t(),E=()=>{var O;if(!!s.value){if(d=m(),R.modules)if(Array.isArray(R.modules))for(const A of R.modules)tt.register(`modules/${A.name}`,A.module);else tt.register(`modules/${R.modules.name}`,R.modules.module);y=new tt(s.value,d),a(R.content),y.on("text-change",_),y.on("selection-change",g),y.on("editor-change",h),R.theme!=="bubble"&&s.value.classList.remove("ql-bubble"),R.theme!=="snow"&&s.value.classList.remove("ql-snow"),(O=y.getModule("toolbar"))===null||O===void 0||O.container.addEventListener("mousedown",A=>{A.preventDefault()}),B.emit("ready",y)}},m=()=>{const O={};if(R.theme!==""&&(O.theme=R.theme),R.readOnly&&(O.readOnly=R.readOnly),R.placeholder&&(O.placeholder=R.placeholder),R.toolbar&&R.toolbar!==""&&(O.modules={toolbar:(()=>{if(typeof R.toolbar=="object")return R.toolbar;if(typeof R.toolbar=="string")return R.toolbar.charAt(0)==="#"?R.toolbar:Gn[R.toolbar]})()}),R.modules){const A=(()=>{var N,P;const T={};if(Array.isArray(R.modules))for(const b of R.modules)T[b.name]=(N=b.options)!==null&&N!==void 0?N:{};else T[R.modules.name]=(P=R.modules.options)!==null&&P!==void 0?P:{};return T})();O.modules=Object.assign({},O.modules,A)}return Object.assign({},R.globalOptions,R.options,O)},_=(O,A,N)=>{B.emit("update:content",f()),B.emit("textChange",{delta:O,oldContents:A,source:N})},p=$t(),g=(O,A,N)=>{p.value=!!(y!=null&&y.hasFocus()),B.emit("selectionChange",{range:O,oldRange:A,source:N})};Mn(p,O=>{O?B.emit("focus",s):B.emit("blur",s)});const h=(...O)=>{O[0]==="text-change"&&B.emit("editorChange",{name:O[0],delta:O[1],oldContents:O[2],source:O[3]}),O[0]==="selection-change"&&B.emit("editorChange",{name:O[0],range:O[1],oldRange:O[2],source:O[3]})},o=()=>s.value,e=()=>{var O;return(O=y==null?void 0:y.getModule("toolbar"))===null||O===void 0?void 0:O.container},t=()=>{if(y)return y;throw`The quill editor hasn't been instantiated yet, + make sure to call this method when the editor ready + or use v-on:ready="onReady(quill)" event instead.`},f=(O,A)=>R.contentType==="html"?i():R.contentType==="text"?u(O,A):y==null?void 0:y.getContents(O,A),a=(O,A="api")=>{R.contentType==="html"?c(O):R.contentType==="text"?r(O,A):y==null||y.setContents(O,A)},u=(O,A)=>{var N;return(N=y==null?void 0:y.getText(O,A))!==null&&N!==void 0?N:""},r=(O,A="api")=>{y==null||y.setText(O,A)},i=()=>{var O;return(O=y==null?void 0:y.root.innerHTML)!==null&&O!==void 0?O:""},c=O=>{y&&(y.root.innerHTML=O)},n=(O,A="api")=>{const N=y==null?void 0:y.clipboard.convert(O);N&&(y==null||y.setContents(N,A))},v=()=>{lr(()=>{var O;!B.slots.toolbar&&y&&((O=y.getModule("toolbar"))===null||O===void 0||O.container.remove()),E()})};return Mn(()=>R.enable,O=>{y&&y.enable(O)}),{editor:s,getEditor:o,getToolbar:e,getQuill:t,getContents:f,setContents:a,getHTML:i,setHTML:c,pasteHTML:n,getText:u,setText:r,reinit:v}},render(){var R,B;return[(B=(R=this.$slots).toolbar)===null||B===void 0?void 0:B.call(R),ar("div",{ref:"editor",...this.$attrs})]}});const wr=tt.import("blots/block");class Nt extends wr{static create(B){const y=super.create(B);if(B===!0)return y;const d=document.createElement("img");return d.setAttribute("src",B),y.appendChild(d),y}deleteAt(B,y){super.deleteAt(B,y),this.cache={}}static value(B){const{src:y,custom:d}=B.dataset;return{src:y,custom:d}}}Nt.blotName="imageBlot";Nt.className="image-uploading";Nt.tagName="span";tt.register({"formats/imageBlot":Nt});class tr{constructor(B,y){this.quill=B,this.options=y,this.range=null,typeof this.options.upload!="function"&&console.warn("[Missing config] upload function that returns a promise is required");var d=this.quill.getModule("toolbar");d.addHandler("image",this.selectLocalImage.bind(this)),this.handleDrop=this.handleDrop.bind(this),this.handlePaste=this.handlePaste.bind(this),this.quill.root.addEventListener("drop",this.handleDrop,!1),this.quill.root.addEventListener("paste",this.handlePaste,!1)}selectLocalImage(){this.quill.focus(),this.range=this.quill.getSelection(),this.fileHolder=document.createElement("input"),this.fileHolder.setAttribute("type","file"),this.fileHolder.setAttribute("accept","image/*"),this.fileHolder.setAttribute("style","visibility:hidden"),this.fileHolder.onchange=this.fileChanged.bind(this),document.body.appendChild(this.fileHolder),this.fileHolder.click(),window.requestAnimationFrame(()=>{document.body.removeChild(this.fileHolder)})}handleDrop(B){if(B.stopPropagation(),B.preventDefault(),B.dataTransfer&&B.dataTransfer.files&&B.dataTransfer.files.length){if(document.caretRangeFromPoint){const d=document.getSelection(),s=document.caretRangeFromPoint(B.clientX,B.clientY);d&&s&&d.setBaseAndExtent(s.startContainer,s.startOffset,s.startContainer,s.startOffset)}else{const d=document.getSelection(),s=document.caretPositionFromPoint(B.clientX,B.clientY);d&&s&&d.setBaseAndExtent(s.offsetNode,s.offset,s.offsetNode,s.offset)}this.quill.focus(),this.range=this.quill.getSelection();let y=B.dataTransfer.files[0];setTimeout(()=>{this.quill.focus(),this.range=this.quill.getSelection(),this.readAndUploadFile(y)},0)}}handlePaste(B){let y=B.clipboardData||window.clipboardData;if(y&&(y.items||y.files)){let d=y.items||y.files;const s=/^image\/(jpe?g|gif|png|svg|webp)$/i;for(let E=0;E{this.quill.focus(),this.range=this.quill.getSelection(),this.readAndUploadFile(m)},0))}}}readAndUploadFile(B){let y=!1;const d=new FileReader;d.addEventListener("load",()=>{if(!y){let s=d.result;this.insertBase64Image(s)}},!1),B&&d.readAsDataURL(B),this.options.upload(B).then(s=>{this.insertToEditor(s)},s=>{y=!0,this.removeBase64Image(),console.warn(s)})}fileChanged(){const B=this.fileHolder.files[0];this.readAndUploadFile(B)}insertBase64Image(B){const y=this.range;this.quill.insertEmbed(y.index,Nt.blotName,`${B}`,"user")}insertToEditor(B){const y=this.range;this.quill.deleteText(y.index,3,"user"),this.quill.insertEmbed(y.index,"image",`${B}`,"user"),y.index++,this.quill.setSelection(y,"user")}removeBase64Image(){const B=this.range;this.quill.deleteText(B.index,3,"user")}}window.ImageUploader=tr;const Nr={__name:"Editor",props:{content:{type:String,default:""}},setup(R,{expose:B}){const y=R;tt.imports["modules/ImageUploader"]||tt.register("modules/ImageUploader",tr);const d=$t(null),s=$t("");Mn(()=>y.content,()=>{s.value=y.content,d.value.setHTML(s.value)});const E=o=>({"image/png":"png","image/jpeg":"jpeg"})[o],m=(o,e)=>{cr("danger",o,e)},_=o=>new Promise((e,t)=>{const f=new FileReader;f.readAsArrayBuffer(o),f.onload=a=>{const{result:u}=a.target;e(u)},f.onerror=t}),h={modules:{ImageUploader:{upload(o){return new Promise((e,t)=>{const{type:f,size:a}=o;if(!E(f)){m("\u5716\u7247\u4E0A\u50B3\u5931\u6557","\u50C5\u9650\u4E0A\u50B3 png\u3001jpg \u8207 jpeg \u6A94\u6848\u683C\u5F0F"),t(new Error("\u50C5\u9650\u4E0A\u50B3 png\u3001jpg \u8207 jpeg \u6A94\u6848\u683C\u5F0F"));return}const u=1024*1024*3;if(a>=u){m("\u5716\u7247\u4E0A\u50B3\u5931\u6557","\u5716\u7247\u5927\u5C0F\u4E0D\u5F97\u8D85\u904E 3MB\u3002"),t(new Error("\u5716\u7247\u5927\u5C0F\u4E0D\u5F97\u8D85\u904E 3MB\u3002"));return}async function r(){if(o){const i=new FileReader;i.onload=c=>{const n=new Image;n.onload=()=>{const O=`/v1/common/upload/image/${o.type.split("/")[1]}`;(async()=>{try{const N=await _(o),{data:P}=await Hn.get(O),T=P.image_url,b=P.upload_url,w={transformRequest(x,L){return delete L.common.Authorization,x},headers:{"Content-Type":o.type},withCredentials:!1};await Hn.put(b,N,w),e(T)}catch{m("\u5716\u7247\u4E0A\u50B3\u5931\u6557","\u5716\u7247\u4E0A\u50B3\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u4E0A\u50B3\u3002"),t(new Error("\u5716\u7247\u4E0A\u50B3\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u4E0A\u50B3\u3002"))}})()},n.src=c.target.result},i.readAsDataURL(o)}}r()})}},toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike"],["code","code-block"],[{list:"ordered"},{list:"bullet"}],["image","link"],["clean"]]},placeholder:"\u8ACB\u8F38\u5165\u5167\u5BB9..."};return B({editorContent:s}),(o,e)=>(ur(),sr(fr(Ar),{ref_key:"editorRef",ref:d,content:s.value,"onUpdate:content":e[0]||(e[0]=t=>s.value=t),theme:"snow","content-type":"html",options:h,placeholder:"\u8ACB\u8F38\u5165\u5167\u5BB9...",class:"quill-height-300px"},null,8,["content"]))}};export{tr as I,Nr as _}; diff --git a/assets/Email.7cb9fcda.js b/assets/Email.7cb9fcda.js new file mode 100644 index 0000000..de0d8a2 --- /dev/null +++ b/assets/Email.7cb9fcda.js @@ -0,0 +1 @@ +import{n as D,a as d,c as r,b as e,h,i as a,F as w,q as x,w as p,v as f,R as U,r as m,o as L,A as T,x as _,L as C,E as P,G as A}from"./index.18edd2cb.js";import{a as S}from"./notification.4467b384.js";const B={class:"card shadow-sm rounded-4 overflow-hidden mb-4 position-relative"},G={class:"card-body"},I={class:"card-title mb-3"},z={class:"mb-3 border-bottom"},F=e("h6",null,"\u89F8\u767C\u689D\u4EF6",-1),H={class:"mb-3 border-bottom"},N=e("h6",null,"\u53EF\u7528\u6B04\u4F4D",-1),R={class:"table table-borderless"},q=e("thead",null,[e("tr",null,[e("th",{width:"100"}," \u6B04\u4F4D\u540D\u7A31 "),e("th",{width:"200"}," \u8B8A\u6578 "),e("th",null,"\u6E2C\u8A66\u5C08\u7528\u6E2C\u8A66\u6587\u5B57")])],-1),O=["id","onUpdate:modelValue"],J={class:"row"},K={class:"col-md-6"},Q={class:"mb-3"},W=e("label",{for:"mail_to",class:"form-label"},"\u767C\u9001\u4FE1\u7BB1",-1),X={class:"mb-3"},Y=e("label",{for:"mail_title",class:"form-label"},"\u4FE1\u4EF6\u6A19\u984C",-1),Z={class:"mb-3"},ee=e("label",{for:"mail_time",class:"form-label"},"\u767C\u9001\u9031\u671F",-1),te=["value"],se={class:"mb-3"},le=e("label",{for:"mail_content",class:"form-label"},"\u8A0A\u606F\u5167\u5BB9",-1),ae=e("br",null,null,-1),oe=["innerHTML"],ne={class:"d-flex justify-content-between mt-5"},ie={__name:"Email",props:{data:{type:Object,default:()=>({})},schedulesList:{type:Array,default:()=>[]}},emits:["emailTest","editEmail"],setup(y,{emit:v}){const g=y,{data:l}=D(g),E=(u,s)=>{const t=[];s.forEach(c=>{t.push({id:c.id,content:c.replace_keyword})}),v("emailTest",u,t)},i=(u,s)=>{const t={cht_name:s.cht_name,content:s.content,subject:s.subject,schedule_id:s.schedule_id};v("editEmail",u,t)};return(u,s)=>(d(),r("div",B,[e("div",G,[e("h4",I,h(a(l).cht_name)+"\u56DE\u994B ",1),e("div",z,[F,e("p",null,h(a(l).trigger_description),1)]),e("div",H,[N,e("table",R,[q,e("tbody",null,[(d(!0),r(w,null,x(a(l).variables,t=>(d(),r("tr",{key:`email_${t.id}`},[e("td",null,h(t.cht_name),1),e("td",null,"{% "+h(t.name)+" %}",1),e("td",null,[p(e("input",{id:t.name,"onUpdate:modelValue":c=>t.replace_keyword=c,type:"text",class:"form-control"},null,8,O),[[f,t.replace_keyword]])])]))),128))])])]),e("div",J,[e("div",K,[e("div",Q,[W,p(e("input",{id:"mail_to","onUpdate:modelValue":s[0]||(s[0]=t=>a(l).sender_mail=t),disabled:"",type:"text",class:"form-control",placeholder:"no-reply@hexschool.com"},null,512),[[f,a(l).sender_mail]])]),e("div",X,[Y,p(e("input",{id:"mail_title","onUpdate:modelValue":s[1]||(s[1]=t=>a(l).subject=t),type:"text",class:"form-control",placeholder:"\u4F5C\u696D\u88AB\u6279\u6539"},null,512),[[f,a(l).subject]])]),e("div",Z,[ee,p(e("select",{id:"mail_time","onUpdate:modelValue":s[2]||(s[2]=t=>a(l).schedule_id=t),class:"form-select","aria-label":"Default select example"},[(d(!0),r(w,null,x(y.schedulesList,t=>(d(),r("option",{key:`schedule_${t.id}`,value:t.id},h(t.cht_name),9,te))),128))],512),[[U,a(l).schedule_id]])])])]),e("div",se,[le,p(e("textarea",{"onUpdate:modelValue":s[3]||(s[3]=t=>a(l).content=t),class:"form-control",rows:"20"},null,512),[[f,a(l).content]]),ae,e("div",{innerHTML:a(l).content},null,8,oe)]),e("div",ne,[e("button",{type:"button",class:"btn btn-outline-primary",onClick:s[4]||(s[4]=t=>E(a(l).id,a(l).variables,a(l).content))}," \u6E2C\u8A66\u767C\u9001 "),e("button",{type:"button",class:"btn btn-secondary",onClick:s[5]||(s[5]=t=>i(a(l).id,a(l)))}," \u78BA\u8A8D\u66F4\u65B0 ")])])]))}},ce={class:"px-4 mt-4"},de=e("h4",{class:"mb-3"}," Email \u8A0A\u606F\u7BA1\u7406 ",-1),re={class:"row"},ue={class:"col-md-3"},me={class:"list-group"},_e=["onClick"],he={class:"col-md-9"},fe={__name:"Email",setup(y){const{apiGetEmailList:v,apiPutEmailTemplate:g,apiGetSchedules:l,apiPostEmailTest:E}=S,i=m(!1),u=m(!0),s=m(1),t=m(null),c=m({}),$=async()=>{try{i.value=!0;const{templates:o}=await v();t.value=o,[c.value]=o}catch(o){_("success","Email \u5217\u8868\u51FA\u73FE\u932F\u8AA4",o.response.data.message)}finally{i.value=!1}};L(()=>{$()});const k=m(null),V=async()=>{try{i.value=!0;const{schedules:o}=await l();k.value=o}catch(o){_("danger","\u9031\u671F\u6E05\u55AE\u51FA\u73FE\u932F\u8AA4",o.response.data.message)}finally{i.value=!1}};L(()=>{V()});const M=async(o,b)=>{try{i.value=!0;const{message:n}=await E(o,b);_("success","Email \u767C\u9001\u7D50\u679C",n)}catch(n){_("danger","\u6E2C\u8A66 API \u51FA\u73FE\u932F\u8AA4",n.response.data.message)}finally{i.value=!1}},j=async(o,b)=>{try{i.value=!0;const{message:n}=await g(o,b);_("success","Eamil \u6A23\u677F\u7DE8\u8F2F\u7D50\u679C",n),s.value=1,$()}catch(n){_("danger","\u7DE8\u8F2F Email \u6A23\u677F\u51FA\u73FE\u932F\u8AA4",n.response.data.message)}finally{i.value=!1}};return(o,b)=>(d(),r("div",ce,[T(a(C),{active:i.value,"is-full-page":u.value,"z-index":1021},null,8,["active","is-full-page"]),de,e("div",re,[e("div",ue,[e("div",me,[(d(!0),r(w,null,x(t.value,n=>(d(),r("a",{key:n.id,href:"#",class:P(["list-group-item",s.value===n.id?"active":""]),"aria-current":"true",onClick:A(pe=>(c.value=n,s.value=n.id),["prevent"])},h(n.cht_name),11,_e))),128))])]),e("div",he,[T(ie,{data:c.value,"schedules-list":k.value,onEmailTest:M,onEditEmail:j},null,8,["data","schedules-list"])])])]))}};export{fe as default}; diff --git a/assets/Group.67b1b29b.js b/assets/Group.67b1b29b.js new file mode 100644 index 0000000..6032fb0 --- /dev/null +++ b/assets/Group.67b1b29b.js @@ -0,0 +1 @@ +import{r as d,s as X,z as P,a as c,e as j,f as C,A as u,b as e,E as L,w as K,C as H,M as Y,_ as Z,D as ee,o as se,c as _,v as te,O as ae,F as N,q as R,i as oe,x as B,B as le,G as ne,h as x,p as z,g as I,P as ie,S as de,T as re}from"./index.18edd2cb.js";import{a as J}from"./task.8f86f14f.js";import{a as ce}from"./task-tags.fad0dc56.js";const ue={class:"row"},pe={class:"col-6"},ve={class:"mb-3"},me=e("label",{for:"taskGroupName",class:"form-label text-dark"},"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",-1),_e={class:"col-6"},ke={class:"mb-3"},be=e("label",{for:"taskGroupKeyword",class:"form-label text-dark"},"\u82F1\u6587\u540D\u7A31",-1),fe={class:"mb-3"},ge=e("label",{for:"taskGroupDescription",class:"form-label text-dark"},"\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0",-1),ye={class:"mb-3"},he=e("label",{for:"taskGroupEndDate",class:"form-label text-dark"},"\u5230\u671F\u65E5",-1),we={class:"form-check"},xe=e("label",{for:"taskGroupEnable",class:"form-check-label text-dark"},"\u662F\u5426\u986F\u793A",-1),Ge=["disabled"],$e={__name:"CreateTaskGroupModal",props:{tempTaskGroupData:{type:Object,default(){return{}}}},emits:["createTaskGroupMethod"],setup(G,{expose:q,emit:S}){const E=G,{apiPostTaskGroup:k}=J,m=d(),t=d({name:"",keyword:"",description:"",expired_at:"",enable:!1}),U=d(null);X(()=>{t.value=E.tempTaskGroupData});const V=async()=>{let g={};try{t.value.expired_at?g={name:t.value.name,keyword:t.value.keyword,description:t.value.description,expired_at:new Date(t.value.expired_at).toISOString(),enable:t.value.enable}:g={name:t.value.name,keyword:t.value.keyword,description:t.value.description,enable:t.value.enable},await k(g),S("createTaskGroupMethod",{target:"import",type:"\u6210\u529F"}),m.value.resetForm(),t.value.enable=!1}catch(n){S("createTaskGroupMethod",{target:"import",type:"\u5931\u6557",error:`${n.response.status}:${n.response.data.message}`})}};return q({createTaskGroupModalRef:U}),(g,n)=>{const y=P("Field"),$=P("ErrorMessage"),T=P("VForm");return c(),j(T,{ref_key:"formRef",ref:m,onSubmit:V},{default:C(({errors:b,invalid:M})=>[u(Y,{id:"createTaskGroupModal",ref_key:"createTaskGroupModalRef",ref:U,"has-footer":!0,title:"\u65B0\u589E\u4EFB\u52D9\u7FA4\u7D44","class-list":""},{body:C(()=>[e("div",ue,[e("div",pe,[e("div",ve,[me,u(y,{id:"taskGroupName",modelValue:t.value.name,"onUpdate:modelValue":n[0]||(n[0]=p=>t.value.name=p),name:"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",type:"text",class:L(["form-control",{"is-invalid":b.\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31}]),rules:"required"},null,8,["modelValue","class"]),u($,{name:"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",class:"invalid-feedback"})])]),e("div",_e,[e("div",ke,[be,u(y,{id:"taskGroupKeyword",modelValue:t.value.keyword,"onUpdate:modelValue":n[1]||(n[1]=p=>t.value.keyword=p),name:"\u82F1\u6587\u540D\u7A31",type:"text",class:L(["form-control",{"is-invalid":b.\u82F1\u6587\u540D\u7A31}]),rules:"required"},null,8,["modelValue","class"]),u($,{name:"\u82F1\u6587\u540D\u7A31",class:"invalid-feedback"})])])]),e("div",fe,[ge,u(y,{id:"taskGroupDescription",modelValue:t.value.description,"onUpdate:modelValue":n[2]||(n[2]=p=>t.value.description=p),as:"textarea",name:"\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0",type:"text",class:L(["form-control",{"is-invalid":b.\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0}]),rules:"required"},null,8,["modelValue","class"]),u($,{name:"\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0",class:"invalid-feedback"})]),e("div",ye,[he,u(y,{id:"taskGroupEndDate",modelValue:t.value.expired_at,"onUpdate:modelValue":n[3]||(n[3]=p=>t.value.expired_at=p),name:"\u5230\u671F\u65E5",type:"date",class:L(["form-control",{"is-invalid":b.\u5230\u671F\u65E5}])},null,8,["modelValue","class"]),u($,{name:"\u5230\u671F\u65E5",class:"invalid-feedback"})]),e("div",we,[K(e("input",{type:"checkbox",id:"taskGroupEnable",class:"form-check-input","onUpdate:modelValue":n[4]||(n[4]=p=>t.value.enable=p)},null,512),[[H,t.value.enable]]),xe])]),footer:C(()=>[e("button",{type:"submit",disabled:M,class:"btn btn-primary"}," \u5EFA\u7ACB ",8,Ge)]),_:2},1536)]),_:1},512)}}};const D=G=>(de("data-v-9c41d8b7"),G=G(),re(),G),Te={class:"taskGroups px-4 mt-4"},Me=D(()=>e("h1",{class:"fs-4 mb-3"},"\u4EFB\u52D9\u7FA4\u7D44",-1)),Ve={class:"d-flex justify-content-between align-items-center mb-3"},Le={class:"row w-75"},Ce={class:"col-md-6"},De=D(()=>e("p",{class:"mb-1"},"\u6A19\u7C64\u7BE9\u9078",-1)),Se={class:"list-unstyled d-flex flex-wrap mb-2"},Ee=["value","onClick","id"],Ue=["for"],Fe={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Ne={class:"card-body p-0"},Re={class:"table-responsive"},Be={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},Pe=D(()=>e("thead",{class:"bg-light"},[e("tr",null,[e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"}," \u7FA4\u7D44\u540D\u7A31 "),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u82F1\u6587\u540D\u7A31"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u4F7F\u7528\u8005\u7FA4\u7D44"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u5206\u985E\u6A19\u7C64"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u662F\u5426\u986F\u793A"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u5230\u671F\u6642\u9593"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u7DE8\u8F2F")])],-1)),qe={class:"text-nowrap"},Ae={scope:"row",class:"ps-4"},Ie={scope:"row",class:"ps-4"},Ke={scope:"row",class:"ps-4"},Oe={key:0},ze={key:0},je={scope:"row",class:"ps-4"},He={scope:"row",class:"ps-4"},Je={scope:"row",class:"ps-4"},Qe=D(()=>e("span",{class:"material-icons align-middle fs-6"}," edit ",-1)),We=["onClick"],Xe=D(()=>e("span",{class:"material-icons align-middle fs-6"}," content_copy ",-1)),Ye={class:"card-footer bg-white py-3"},Ze={class:"d-flex flex-wrap align-items-start"},es={__name:"Group",setup(G){const{apiGetTaskGroupsList:q}=J,{apiGetTaskTags:S}=ce,E=ee.useLoading(),k=d({taskGroupsList:[],pagination:{total:10,count:10,total_page:10,current_page:1}}),m=d(""),t=async(o=1)=>{var f,s,i,w;const a=E.show();try{const{task_groups:l,pagination:F}=await q({page:o,scoped:m.value});k.value.taskGroupsList=l,k.value.pagination=F}catch(l){B("danger","\u53D6\u5F97\u4EFB\u52D9\u7FA4\u7D44\u5217\u8868\u5931\u6557",`${(s=(f=l==null?void 0:l.response)==null?void 0:f.data)==null?void 0:s.statusCode} : ${(w=(i=l==null?void 0:l.response)==null?void 0:i.data)==null?void 0:w.message}`)}finally{a.hide()}},U=o=>{t(o)},V=d(""),g=d(null),n=d({}),y=(o,a)=>{o==="copy"?n.value={...a}:o==="add"&&(n.value={}),V.value.show()},$=o=>{o.type==="\u6210\u529F"?B("success","\u5EFA\u7ACB\u4EFB\u52D9\u7FA4\u7D44\u6210\u529F","\u5DF2\u6210\u529F\u5EFA\u7ACB\u4EFB\u52D9\u7FA4\u7D44"):o.type==="\u5931\u6557"&&B("danger","\u5EFA\u7ACB\u4EFB\u52D9\u7FA4\u7D44\u5931\u6557",o.error),V.value.hide(),t()},T=d({tagList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),b=d([]),M=d(1),p=async(o=1)=>{var f,s,i,w;const a=E.show();try{const{task_tags:l,pagination:F}=await S({page:o,count:100});T.value.tagList=l,T.value.pagination=F,M.value=F.current_page,b.value=[...b.value,...l]}catch(l){B("danger","\u53D6\u5F97\u5206\u985E\u6A19\u7C64\u5217\u8868\u5931\u6557",`${(s=(f=l==null?void 0:l.response)==null?void 0:f.data)==null?void 0:s.statusCode}:${(w=(i=l==null?void 0:l.response)==null?void 0:i.data)==null?void 0:w.message}`)}finally{a.hide()}},O=async(o=1)=>{await p(o),T.value.pagination.total_page!==0&&M.value!==T.value.pagination.total_page&&(M.value+=1,O(M.value))},A=d(!1),r=d(""),h=d([]),v=d(""),Q=()=>{r.value=r.value.trim(),v.value&&r.value?m.value=`&keyword=${r.value}&task_tags=${v.value}`:v.value||r.value?m.value=`${r.value?`&keyword=${r.value}`:""}${v.value?`&task_tags=${v.value}`:""}`:m.value="",t()},W=o=>{h.value.includes(o)?h.value=h.value.filter(a=>a!==o):h.value.push(o),v.value=h.value.toString(),v.value&&r.value?m.value=`&keyword=${r.value}&task_tags=${v.value}`:v.value||r.value?m.value=`${r.value?`&keyword=${r.value}`:""}${v.value?`&task_tags=${v.value}`:""}`:m.value="",t()};return se(async()=>{await t(),O(),V.value=new le(g.value.createTaskGroupModalRef.hModal)}),(o,a)=>{const f=P("router-link");return c(),_("div",Te,[Me,e("div",Ve,[e("div",Le,[e("div",Ce,[K(e("input",{onCompositionstart:a[0]||(a[0]=s=>A.value=!0),onCompositionend:a[1]||(a[1]=s=>A.value=!1),placeholder:"\u641C\u5C0B\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31\u3001\u82F1\u6587\u540D\u7A31",class:"form-control",type:"text","onUpdate:modelValue":a[2]||(a[2]=s=>r.value=s),onKeydown:a[3]||(a[3]=ae(ne(()=>{A.value||Q()},["prevent"]),["enter"]))},null,544),[[te,r.value]])])]),e("button",{type:"button",class:"btn btn-primary",onClick:a[4]||(a[4]=s=>y("add"))}," \u65B0\u589E\u7FA4\u7D44 ")]),De,e("ul",Se,[(c(!0),_(N,null,R(b.value,s=>(c(),_("li",{key:s.id,class:"me-2 mb-2"},[K(e("input",{type:"checkbox",class:"btn-check","onUpdate:modelValue":a[5]||(a[5]=i=>h.value=i),value:s.id,onClick:i=>W(s.id),id:`btn-tag-${s.id}`},null,8,Ee),[[H,h.value]]),e("label",{class:"btn btn-sm custom-btn-primary-tag",for:`btn-tag-${s.id}`},x(s.name),9,Ue)]))),128))]),e("div",Fe,[e("div",Ne,[e("div",Re,[e("table",Be,[Pe,e("tbody",qe,[(c(!0),_(N,null,R(k.value.taskGroupsList,s=>(c(),_("tr",{key:s.id,class:"align-middle"},[e("td",Ae,x(s.name),1),e("td",Ie,x(s.keyword),1),e("td",Ke,[s.user_groups.length===0?(c(),_("span",Oe,"\u7121")):z("",!0),(c(!0),_(N,null,R(s.user_groups,(i,w)=>(c(),j(f,{key:i.id,target:"_blank",to:`/admin/users/groups/${i.id}`},{default:C(()=>[I(x(i.name)+" ",1),s.user_groups.length>1&&w(c(),_("span",{key:i,class:"badge bg-light text-primary me-1"},x(i),1))),128))]),e("td",{scope:"row",class:L(["ps-4",{"text-success":s.enable}])},x(s.enable?"\u662F":"\u5426"),3),e("td",He,x(new Date(s.expired_at).toLocaleDateString("sv-SE")),1),e("td",Je,[u(f,{to:`/admin/task/group/${s.id}`,class:"btn btn-sm btn-outline-gray ms-1"},{default:C(()=>[Qe,I(" \u7DE8\u8F2F ")]),_:2},1032,["to"]),e("button",{class:"btn btn-sm btn-outline-gray ms-1",type:"button",onClick:i=>y("copy",s)},[Xe,I(" \u8907\u88FD ")],8,We)])]))),128))])])])]),e("div",Ye,[e("div",Ze,[u(oe(ie),{modelValue:k.value.pagination.current_page,"onUpdate:modelValue":a[6]||(a[6]=s=>k.value.pagination.current_page=s),records:k.value.pagination.total,"per-page":10,options:{chunk:6},onPaginate:U},null,8,["modelValue","records"])])])]),u($e,{ref_key:"createTaskGroupModalComponentRef",ref:g,"temp-task-group-data":n.value,onCreateTaskGroupMethod:$},null,8,["temp-task-group-data"])])}}},ls=Z(es,[["__scopeId","data-v-9c41d8b7"]]);export{ls as default}; diff --git a/assets/Group.ef60d323.css b/assets/Group.ef60d323.css new file mode 100644 index 0000000..5300a16 --- /dev/null +++ b/assets/Group.ef60d323.css @@ -0,0 +1 @@ +.custom-btn-primary-tag[data-v-9c41d8b7]{background-color:var(--bs-gray-100);color:var(--bs-primary)}.custom-btn-primary-tag[data-v-9c41d8b7]:hover{background-color:var(--bs-gray-200)}.btn-check:checked+.custom-btn-primary-tag[data-v-9c41d8b7]{background-color:var(--bs-primary);color:var(--bs-gray-300)} diff --git a/assets/GroupDetail.1b887e39.js b/assets/GroupDetail.1b887e39.js new file mode 100644 index 0000000..61fc315 --- /dev/null +++ b/assets/GroupDetail.1b887e39.js @@ -0,0 +1 @@ +import{_ as le,l as ne,D as ie,r,s as re,o as ce,z as D,a as _,c as v,b as e,A as m,f as z,x as k,g as j,E as T,F as S,q as $,w as h,C as N,h as F,v as M,R as de,S as ue,T as pe,y as _e}from"./index.18edd2cb.js";import{a as ve}from"./task.8f86f14f.js";import{a as he}from"./task-tags.fad0dc56.js";const i=y=>(ue("data-v-1ed1d075"),y=y(),pe(),y),me={class:"taskGroupDetail px-4 mt-4"},fe={class:"border-bottom border-light pb-2 mb-3"},ge={"aria-label":"breadcrumb"},be={class:"breadcrumb"},ke={class:"breadcrumb-item"},ye=i(()=>e("li",{class:"breadcrumb-item active","aria-current":"page"}," \u7DE8\u8F2F\u4EFB\u52D9\u7FA4\u7D44 ",-1)),Ge=i(()=>e("h1",{class:"fs-4"},"\u7DE8\u8F2F\u4EFB\u52D9\u7FA4\u7D44",-1)),Le={class:"row"},we={class:"col-md-6"},xe={class:"mb-3"},De=i(()=>e("label",{for:"taskGroupInfoName",class:"form-label"},"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",-1)),Ce={class:"col-md-6"},Ee={class:"mb-3"},Ve=i(()=>e("label",{for:"taskGroupInfoKeyword",class:"form-label"},"\u82F1\u6587\u540D\u7A31",-1)),Ue={class:"card shadow-sm rounded-4 overflow-hidden mb-3"},Ie=i(()=>e("div",{class:"card-header bg-white py-3"}," \u5206\u985E\u6A19\u7C64 ",-1)),Te={class:"list-unstyled mb-0"},Se={class:"form-check"},$e=["value","id","checked"],Ne=["for"],Fe=i(()=>e("hr",null,null,-1)),Me={class:"mb-3"},Re=i(()=>e("label",{for:"taskGroupDescription",class:"form-label"},"\u63CF\u8FF0",-1)),Ke={class:"row"},He={class:"col-md-6"},qe={class:"mb-3"},Ae=i(()=>e("label",{class:"form-label",for:"groupEnd"},"\u5230\u671F\u65E5",-1)),Be={class:"form-check mb-3"},Oe=["checked"],Pe=i(()=>e("label",{class:"form-check-label",for:"showCheck"}," \u662F\u5426\u986F\u793A ",-1)),ze=i(()=>e("hr",null,null,-1)),je={class:"my-3"},Je=i(()=>e("label",{class:"form-label",for:"userGroup"},"\u5C0D\u61C9\u4F7F\u7528\u8005\u7FA4\u7D44",-1)),Qe=i(()=>e("option",{value:"choose"},"\u9078\u64C7\u4F7F\u7528\u8005\u7FA4\u7D44",-1)),We=i(()=>e("option",{value:""},"\u4E0D\u8A2D\u5B9A",-1)),Xe=[Qe,We],Ye={class:"card-header bg-white py-3"},Ze={class:"row align-items-center justify-content-between"},es={class:"col"},ss=i(()=>e("p",{class:"mb-sm-0"},"\u4F7F\u7528\u8005\u7FA4\u7D44\u5217\u8868",-1)),as={class:"small my-1"},os={class:"col-sm-6"},ts={class:"input-group"},ls={class:"list-unstyled mb-0"},ns={class:"form-check"},is=["value","id","checked"],rs=["for"],cs=i(()=>e("hr",null,null,-1)),ds=i(()=>e("button",{type:"submit",class:"btn btn-primary d-block ms-auto"}," \u78BA\u8A8D\u66F4\u65B0 ",-1)),us={__name:"GroupDetail",setup(y){const{apiGetTaskGroupDetail:J,apiPutTaskGroupDetail:Q}=ve,{apiGetUserGroups:W}=_e,{apiGetTaskTags:X}=he,Y=ne(),C=ie.useLoading(),u=r(""),p=r([]),t=r({}),R=async a=>{var c,n;const s=C.show();try{const{task_group:l}=await J(a);t.value={...l},t.value.expired_at=new Date(t.value.expired_at).toLocaleDateString("sv-SE"),t.value.user_groups.length!==0&&(u.value="choose",t.value.user_groups.forEach(d=>{p.value.push(d.id)}))}catch(l){k("danger","\u53D6\u5F97\u4EFB\u52D9\u7FA4\u7D44\u5931\u6557",`${(c=l.response)==null?void 0:c.data.statusCode}:${(n=l.response)==null?void 0:n.data.message}`)}finally{s.hide()}},Z=()=>{u.value===""&&(p.value=[])},f=r([]),ee=()=>{f.value.forEach(a=>{t.value.user_groups.forEach(s=>{a.id===s.id&&(a.isChecked=!0,p.value.includes(a.id)||p.value.push(a.id))})})},G=r({userGroupsList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),K=r(1),E=r(!1),L=r(""),V=async({page:a=1,keyword:s=""}={})=>{const c=C.show();E.value=!0;try{const{groups:n,pagination:l}=await W({page:a,keyword:s});n.forEach(d=>{d.isChecked=!1}),G.value.userGroupsList=n,G.value.pagination=l,K.value=l.current_page,a===1?f.value=n:f.value=[...f.value,...n],ee()}catch(n){k("danger","\u53D6\u5F97\u4F7F\u7528\u8005\u7FA4\u7D44\u5217\u8868\u5931\u6557",`${n.response.data.statusCode}:${n.response.data.message}`)}finally{c.hide(),E.value=!1}},H=r(null),q=()=>{const a=H.value;a.addEventListener("scroll",s=>{if(s.target.clientHeight+s.target.scrollTop>=a.scrollHeight){if(E.value||G.value.pagination.current_page===G.value.pagination.total_page)return;V({page:K.value+1,keyword:L.value})}})};re(u,a=>{a==="choose"&&q()});const g=r([]),w=r([]),se=()=>{w.value.forEach(a=>{t.value.tags.forEach(s=>{a.name===s&&g.value.indexOf(a.id)===-1&&(a.isChecked=!0,g.value.push(a.id))})})},x=r({tagsList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),A=r(1),U=r(!1),B=async(a=1)=>{var c,n;const s=C.show();U.value=!0;try{const{task_tags:l,pagination:d}=await X({page:a});l.forEach(b=>{b.isChecked=!1}),x.value.tagsList=l,x.value.pagination=d,A.value=d.current_page,w.value=[...w.value,...l],se()}catch(l){k("danger","\u53D6\u5F97\u5206\u985E\u6A19\u7C64\u5217\u8868\u5931\u6557",`${(c=l.response)==null?void 0:c.data.statusCode}:${(n=l.response)==null?void 0:n.data.message}`)}finally{s.hide(),U.value=!1}},O=r(null),ae=()=>{const a=O.value;a.addEventListener("scroll",s=>{if(s.target.clientHeight+s.target.scrollTop>=a.scrollHeight){if(U.value||x.value.pagination.current_page===x.value.pagination.total_page)return;B(A.value+1)}})},oe=async a=>{try{const s={name:t.value.name,tag_ids:[...g.value],description:t.value.description,expired_at:new Date(t.value.expired_at).toISOString(),user_group_ids:[...p.value],enable:!!t.value.enable};await Q(a,s),k("success","\u66F4\u65B0\u4EFB\u52D9\u7FA4\u7D44\u6210\u529F","\u5DF2\u6210\u529F\u7DE8\u8F2F\u4EFB\u52D9\u7FA4\u7D44"),R(a)}catch(s){k("danger","\u66F4\u65B0\u4EFB\u52D9\u7FA4\u7D44\u5931\u6557",`${s.response.data.statusCode}:${s.response.data.message}`)}},te=()=>{V({page:1,keyword:L.value})};return ce(async()=>{const{id:a}=Y.params;await R(a),V(),B(),u.value==="choose"&&q(),ae()}),(a,s)=>{const c=D("router-link"),n=D("Field"),l=D("ErrorMessage"),d=D("VForm");return _(),v("div",me,[e("header",fe,[e("nav",ge,[e("ol",be,[e("li",ke,[m(c,{to:"/admin/task/group"},{default:z(()=>[j(" \u4EFB\u52D9\u7FA4\u7D44 ")]),_:1})]),ye])]),Ge]),m(d,{ref:"taskGroupForm",onSubmit:s[9]||(s[9]=b=>oe(t.value.id))},{default:z(({errors:b})=>{var P;return[e("div",Le,[e("div",we,[e("div",xe,[De,m(n,{id:"taskGroupInfoName",modelValue:t.value.name,"onUpdate:modelValue":s[0]||(s[0]=o=>t.value.name=o),name:"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",type:"text",class:T(["form-control",{"is-invalid":b.taskGroupInfoName}]),rules:"required"},null,8,["modelValue","class"]),m(l,{name:"taskGroupInfoName",class:"invalid-feedback"})])]),e("div",Ce,[e("div",Ee,[Ve,m(n,{disabled:"",id:"taskGroupInfoKeyword",modelValue:t.value.keyword,"onUpdate:modelValue":s[1]||(s[1]=o=>t.value.keyword=o),name:"taskGroupInfoKeyword",label:"\u82F1\u6587\u540D\u7A31",type:"text",class:T(["form-control",{"is-invalid":b.taskGroupInfoKeyword}]),rules:{required:!0}},null,8,["modelValue","class"]),m(l,{name:"taskGroupInfoKeyword",class:"invalid-feedback"})])])]),e("div",Ue,[Ie,e("div",{class:"card-body",ref_key:"tagListRef",ref:O},[e("ul",Te,[(_(!0),v(S,null,$(w.value,o=>(_(),v("li",{key:o.id},[e("div",Se,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[2]||(s[2]=I=>g.value=I),value:o.id,id:o.id,checked:o.isChecked},null,8,$e),[[N,g.value]]),e("label",{class:"form-check-label",for:o.id},F(o.name),9,Ne)]),Fe]))),128))])],512)]),e("div",Me,[Re,h(e("textarea",{class:"form-control",id:"taskGroupDescription","onUpdate:modelValue":s[3]||(s[3]=o=>t.value.description=o),placeholder:"\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0"},null,512),[[M,t.value.description]])]),e("div",Ke,[e("div",He,[e("div",qe,[Ae,h(e("input",{type:"date",class:"form-control",id:"groupEnd","onUpdate:modelValue":s[4]||(s[4]=o=>t.value.expired_at=o)},null,512),[[M,t.value.expired_at]])])])]),e("div",Be,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[5]||(s[5]=o=>t.value.enable=o),checked:t.value.enable,id:"showCheck"},null,8,Oe),[[N,t.value.enable]]),Pe]),ze,e("div",je,[Je,h(e("select",{class:"form-select",id:"userGroup",onChange:Z,"onUpdate:modelValue":s[6]||(s[6]=o=>u.value=o)},Xe,544),[[de,u.value]])]),e("div",{class:T(["card shadow-sm rounded-4 overflow-hidden mb-4",u.value?"d-block":"d-none"])},[e("div",Ye,[e("div",Ze,[e("div",es,[ss,e("p",as,[j(" \u5DF2\u9078\u64C7\u7684\u7FA4\u7D44\uFF1A "),(_(!0),v(S,null,$((P=t.value)==null?void 0:P.user_groups,o=>(_(),v("span",{key:o.id,class:"badge rounded-pill bg-dark mx-1"},F(o.name),1))),128))])]),e("div",os,[e("div",ts,[h(e("input",{type:"text",class:"form-control",placeholder:"\u641C\u5C0B\u4F7F\u7528\u8005\u7FA4\u7D44","onUpdate:modelValue":s[7]||(s[7]=o=>L.value=o)},null,512),[[M,L.value]]),e("button",{class:"btn btn-secondary",type:"button",onClick:te},"\u641C\u5C0B")])])])]),e("div",{class:"card-body",ref_key:"userGroupsListRef",ref:H},[e("ul",ls,[(_(!0),v(S,null,$(f.value,o=>(_(),v("li",{key:o.id},[e("div",ns,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[8]||(s[8]=I=>p.value=I),value:o.id,id:o.id,checked:o.isChecked},null,8,is),[[N,p.value]]),e("label",{class:"form-check-label",for:o.id},F(o.name),9,rs)]),cs]))),128))])],512)],2),ds]}),_:1},512)])}}},ms=le(us,[["__scopeId","data-v-1ed1d075"]]);export{ms as default}; diff --git a/assets/GroupDetail.6e8f4b29.css b/assets/GroupDetail.6e8f4b29.css new file mode 100644 index 0000000..dcef1b0 --- /dev/null +++ b/assets/GroupDetail.6e8f4b29.css @@ -0,0 +1 @@ +.card-body[data-v-1ed1d075]{height:200px;overflow-y:auto} diff --git a/assets/LoginVertify.6f28bdda.js b/assets/LoginVertify.6f28bdda.js new file mode 100644 index 0000000..22e3c4c --- /dev/null +++ b/assets/LoginVertify.6f28bdda.js @@ -0,0 +1 @@ +import{_ as c,r as d,u as r,o as l,a as _,c as f,b as e,w as u,v as m,d as v}from"./index.18edd2cb.js";const y={name:"LoginVertify",setup(){const s=d(""),o=d(""),i=r();function t(){v.put("/v1/user/login/verify",{account:s.value,verify_code:o.value}).then(n=>{n.data.message==="\u6210\u529F"&&(document.cookie=`h_MqhC49RxFRI6pR3Z_token=${n.data.access_token};`,i.push("/"))})}return l(()=>{s.value=window.sessionStorage.getItem("H_temp_mail_store")}),{verifyCode:o,verify:t}}},h={class:"container"},p={class:"row justify-content-center"},b={class:"col-md-6"},w={class:"card shadow-sm rounded-4 overflow-hidden mt-5"},g=e("div",{class:"card-header bg-white d-flex justify-content-between align-items-center py-3"},[e("h5",{class:"mb-0"}," \u767B\u5165\u9A57\u8B49 ")],-1),x={class:"card-body display-12 fw-normal"},k={class:"mb-3"},C=e("label",{for:"add_mail",class:"form-label"},"\u9A57\u8B49\u78BC",-1),R={class:"d-flex justify-content-end"};function V(s,o,i,t,n,j){return _(),f("div",h,[e("div",p,[e("div",b,[e("div",w,[g,e("div",x,[e("div",k,[C,u(e("input",{id:"add_mail","onUpdate:modelValue":o[0]||(o[0]=a=>t.verifyCode=a),type:"email",class:"form-control"},null,512),[[m,t.verifyCode]])]),e("div",R,[e("button",{class:"btn btn-primary",onClick:o[1]||(o[1]=(...a)=>t.verify&&t.verify(...a))}," \u9A57\u8B49 ")])])])])])])}const M=c(y,[["render",V]]);export{M as default}; diff --git a/assets/Message.62489297.js b/assets/Message.62489297.js new file mode 100644 index 0000000..30b3427 --- /dev/null +++ b/assets/Message.62489297.js @@ -0,0 +1 @@ +import{r as f,n as P,a as c,c as d,b as e,h as y,i as _,F as L,q as C,w as H,v as N,A as T,k as B,_ as G,j as I,G as $,E as k,p as R,S as z,T as O,D as q,o as V,x as m}from"./index.18edd2cb.js";import{_ as J}from"./Editor.925d2886.js";import{g as j}from"./date.27781dd8.js";import{a as K}from"./notification.4467b384.js";const Q={class:"card shadow-sm rounded-4 overflow-hidden mb-4 position-relative"},W={class:"card-body"},X={class:"card-title mb-3"},Y={class:"mb-3 border-bottom"},Z=e("h6",null,"\u89F8\u767C\u689D\u4EF6",-1),ee={class:"mb-3 border-bottom"},se=e("h6",null,"\u53EF\u7528\u6B04\u4F4D",-1),te={class:"table table-borderless"},ae=e("thead",null,[e("tr",null,[e("th",{width:"100"}," \u6B04\u4F4D\u540D\u7A31 "),e("th",{width:"200"}," \u8B8A\u6578 "),e("th",null,"\u6E2C\u8A66\u5C08\u7528\u6E2C\u8A66\u6587\u5B57")])],-1),ne=["id","onUpdate:modelValue"],oe=B('
',1),ie={class:"mb-3"},le=e("label",{for:"mail_content",class:"form-label"},"\u8A0A\u606F\u5167\u5BB9",-1),ce={class:"d-flex justify-content-between mt-5"},de={__name:"Message",props:{data:{type:Object,default:()=>({})}},emits:["messageTest","editMessage"],setup(h,{emit:v}){const b=h,g=f(null),{data:o}=P(b),u=(i,a)=>{const s=[];a.forEach(t=>{s.push({id:t.id,content:t.replace_keyword})}),v("messageTest",i,s)},w=(i,a)=>{const s={cht_name:a.cht_name,content:g.value.editorContent};v("editMessage",i,s)};return(i,a)=>(c(),d("div",Q,[e("div",W,[e("h4",X,y(_(o).cht_name)+"\u56DE\u994B ",1),e("div",Y,[Z,e("p",null,y(_(o).trigger_description),1)]),e("div",ee,[se,e("table",te,[ae,e("tbody",null,[(c(!0),d(L,null,C(_(o).variables,s=>(c(),d("tr",{key:`message_${s.id}`},[e("td",null,y(s.cht_name),1),e("td",null,"{% "+y(s.name)+" %}",1),e("td",null,[H(e("input",{id:s.name,"onUpdate:modelValue":t=>s.replace_keyword=t,type:"text",class:"form-control"},null,8,ne),[[N,s.replace_keyword]])])]))),128))])])]),oe,e("div",ie,[le,T(J,{ref_key:"editorRef",ref:g,content:_(o).content},null,8,["content"])]),e("div",ce,[e("button",{type:"button",class:"btn btn-outline-primary",onClick:a[0]||(a[0]=s=>u(_(o).id,_(o).variables,_(o).content))}," \u6E2C\u8A66\u767C\u9001 "),e("button",{type:"button",class:"btn btn-secondary",onClick:a[1]||(a[1]=s=>w(_(o).id,h.data))}," \u78BA\u8A8D\u66F4\u65B0 ")])])]))}};const D=h=>(z("data-v-16a97308"),h=h(),O(),h),re={class:"mt-5"},_e={class:"right dropdown-container expanded"},ue={id:"notification",class:"position-fixed",style:{bottom:"30px",right:"40px","z-index":"10000"}},he=D(()=>e("span",{class:"material-icons"}," notifications ",-1)),pe=[he],me={class:"tabs"},ve={class:"h_tabs-nav d-flex p-0 list-unstyled"},ge={class:"h_notice_content"},fe={key:0,id:"h_unread_notice",class:"h_notice_area"},ye={class:"d-flex"},be=D(()=>e("div",{class:"d-flex flex-column align-items-center"},[e("img",{src:"https://fakeimg.pl/300/",alt:"",width:"48",height:"48",class:"rounded-circle"})],-1)),we={class:"media-body ms-2"},Me=["innerHTML"],xe={class:"d-inline-block text-muted"},$e={style:{width:"10px"}},ke=["onClick"],Le={key:1,id:"h_all_notice",class:"h_notice_area"},Ce={class:"d-flex"},Te=D(()=>e("div",{class:"d-flex flex-column align-items-center"},[e("img",{src:"https://fakeimg.pl/300/",alt:"",width:"48",height:"48",class:"rounded-circle"})],-1)),De={class:"media-body ms-2"},Ue=["innerHTML"],Ie={class:"d-inline-block text-muted"},Re=["onClick"],Ve={__name:"MessageFront",props:{data:{type:Array}},emits:["readMessage","unreadMessage"],setup(h,{emit:v}){const b=h,{data:g}=P(b),o=f(!1),u=f("h_unread_notice"),w=I(()=>g.value.filter(a=>!!a.has_read).reverse()),i=I(()=>g.value.filter(a=>!a.has_read).reverse());return(a,s)=>(c(),d("div",re,[e("div",_e,[e("div",ue,[e("a",{href:"#","data-dropdown":"notificationMenu",class:"notification-icon d-flex align-items-center justify-content-center rounded-circle text-decoration-none text-primary",onClick:s[0]||(s[0]=$(t=>o.value=!o.value,["prevent"]))},pe)]),e("ul",{name:"notificationMenu",class:k(["h_dropdown shadow bg-white m-0 p-0 rounded-4 overflow-hidden",{show:o.value}])},[e("div",me,[e("ul",ve,[e("li",{class:k(["flex-fill",{"tab-active":u.value=="h_unread_notice"}])},[e("a",{href:"#h_unread_notice",onClick:s[1]||(s[1]=$(t=>u.value="h_unread_notice",["prevent"]))}," \u672A\u8B80\u901A\u77E5 ")],2),e("li",{class:k(["flex-fill",{"tab-active":u.value=="h_all_notice"}])},[e("a",{href:"#h_all_notice",onClick:s[2]||(s[2]=$(t=>u.value="h_all_notice",["prevent"]))}," \u5DF2\u8B80\u901A\u77E5 ")],2)]),e("div",ge,[u.value=="h_unread_notice"?(c(),d("div",fe,[e("div",null,[(c(!0),d(L,null,C(_(i),t=>(c(),d("li",{key:t.id,class:"notification-group p-2 d-flex justify-content-between"},[e("div",ye,[be,e("div",we,[e("p",{class:"mt-0 mb-0",innerHTML:t.content},null,8,Me),e("small",null,[e("span",xe,y(_(j)(t.create_time)),1)])])]),e("div",$e,[e("span",{class:"un read",onClick:M=>v("readMessage",t.id)},null,8,ke)])]))),128))])])):R("",!0),u.value=="h_all_notice"?(c(),d("div",Le,[e("div",null,[(c(!0),d(L,null,C(_(w),t=>(c(),d("li",{key:t.id,class:"notification-group p-2 d-flex justify-content-between"},[e("div",Ce,[Te,e("div",De,[e("p",{class:"mt-0 mb-0",innerHTML:t.content},null,8,Ue),e("small",null,[e("span",Ie,y(_(j)(t.create_time)),1)])])]),e("span",{class:"read",onClick:M=>v("unreadMessage",t.id)},null,8,Re)]))),128))])])):R("",!0)])])],2)])]))}},je=G(Ve,[["__scopeId","data-v-16a97308"]]),Pe={class:"px-4 mt-4"},Se=e("h4",{class:"mb-3"}," \u7AD9\u5167\u901A\u77E5\u8A0A\u606F ",-1),Fe={class:"row"},Ae={class:"col-md-3"},Ee={class:"list-group"},He=["onClick"],Ne={class:"col-md-9"},qe={__name:"Message",setup(h){const{apiGetMessageList:v,apiGetUserMessageList:b,apiPutUserMessageRead:g,apiPutUserMessageUnread:o,apiPostMessageTest:u,apiPutMessageTemplate:w}=K,i=q.useLoading(),a=f(1),s=f(null),t=f({}),M=async()=>{const r=i.show();try{const{templates:n}=await v();s.value=n,[t.value]=s.value}catch(n){m("danger","\u901A\u77E5\u5217\u8868\u51FA\u73FE\u932F\u8AA4",n.response.data.message)}finally{r.hide()}};V(()=>{M()});const U=f([]),x=async()=>{const r=i.show();try{const{messages:n}=await b();U.value=n}catch(n){m("danger","\u53D6\u5F97\u7AD9\u5167\u8A0A\u606F\u5931\u6557",n.response.data.message)}finally{r.hide()}};V(()=>{x()});const S=async r=>{const n=i.show();try{await g(r),x()}catch(l){m("danger","\u5DF2\u8B80\u5931\u6557",l.response.data.message)}finally{n.hide()}},F=async r=>{const n=i.show();try{await o(r),x()}catch(l){m("danger","\u5DF2\u8B80\u5931\u6557",l.response.data.message)}finally{n.hide()}},A=async(r,n)=>{const l=i.show();try{const{message:p}=await u(r,n);m("success","\u901A\u77E5\u6E2C\u8A66\u7D50\u679C",p),x()}catch(p){m("danger","\u6E2C\u8A66 API \u51FA\u73FE\u932F\u8AA4",p.response.data.message)}finally{l.hide()}},E=async(r,n)=>{const l=i.show();try{const{message:p}=await w(r,n);m("success","\u901A\u77E5\u6A23\u677F\u66F4\u65B0\u7D50\u679C",p),a.value=1,M()}catch(p){m("danger","\u7DE8\u8F2F\u7AD9\u5167\u8A0A\u606F\u6A23\u677F\u51FA\u73FE\u932F\u8AA4",p.response.data.message)}finally{l.hide()}};return(r,n)=>(c(),d("div",Pe,[Se,e("div",Fe,[e("div",Ae,[e("div",Ee,[(c(!0),d(L,null,C(s.value,l=>(c(),d("a",{key:l.id,href:"#",class:k(["list-group-item",a.value===l.id?"active":""]),onClick:$(p=>(t.value=l,a.value=l.id),["prevent"])},y(l.cht_name),11,He))),128))])]),e("div",Ne,[T(de,{data:t.value,onMessageTest:A,onEditMessage:E},null,8,["data"]),T(je,{data:U.value,onReadMessage:S,onUnreadMessage:F},null,8,["data"])])])]))}};export{qe as default}; diff --git a/assets/Message.ccbb6705.css b/assets/Message.ccbb6705.css new file mode 100644 index 0000000..4f410a6 --- /dev/null +++ b/assets/Message.ccbb6705.css @@ -0,0 +1 @@ +.notification-icon[data-v-16a97308]{width:52px;height:52px;font-size:22px;border:4px solid;background-color:var(--bs-gray-100)}.notification-icon[data-v-16a97308]:hover{background-color:var(--bs-gray-300)}.h_dropdown[data-v-16a97308]{z-index:100000;position:fixed;right:40px;bottom:110px;max-width:350px;min-width:350px;display:none}.h_dropdown.show[data-v-16a97308]{display:block}.h_tabs-nav li.tab-active a[data-v-16a97308]{background:transparent;border-bottom:2px solid var(--bs-primary);color:var(--bs-primary);cursor:default}.h_tabs-nav li a[data-v-16a97308]{background:var(--bs-gray-300);border-bottom:2px solid var(--bs-gray-300);color:var(--bs-secondary);display:block;padding:10px 0;text-align:center;text-decoration:none}.h_notice_content[data-v-16a97308]{height:auto;max-height:250px;overflow-y:auto}.notification-group[data-v-16a97308]{border-bottom:1px solid #e9ecef;overflow:hidden;min-height:65px;cursor:pointer}.read[data-v-16a97308]{width:12px;display:block;height:12px;border-radius:50%;border:2px solid var(--bs-primary)}.read.un[data-v-16a97308]{background:var(--bs-primary)} diff --git a/assets/SurveysDetail.0a67fffd.css b/assets/SurveysDetail.0a67fffd.css new file mode 100644 index 0000000..bbf1035 --- /dev/null +++ b/assets/SurveysDetail.0a67fffd.css @@ -0,0 +1 @@ +.rounded-box[data-v-84aaa1f9]{min-width:36px;min-height:36px}.progress[data-v-84aaa1f9]{border-radius:24px}.progress-bar[data-v-84aaa1f9]:first-child{border-top-left-radius:24px;border-bottom-left-radius:24px}.progress-bar[data-v-84aaa1f9]:last-child{border-top-right-radius:24px;border-bottom-right-radius:24px}.progress-bar-text[data-v-84aaa1f9]{left:0;right:0;bottom:-20px}[data-v-84aaa1f9] span.vue-star-rating-star{display:flex}.pre-line[data-v-84aaa1f9]{white-space:pre-line}.rotate-90[data-v-84aaa1f9]{transform:rotate(-90deg)}.transition-all[data-v-84aaa1f9]{transition:all .5s} diff --git a/assets/SurveysDetail.76127e41.js b/assets/SurveysDetail.76127e41.js new file mode 100644 index 0000000..53a635e --- /dev/null +++ b/assets/SurveysDetail.76127e41.js @@ -0,0 +1,3 @@ +import{d as We,a1 as Fe,_ as Ae,D as Ze,l as He,r as C,m as Xe,o as Je,a as r,c as u,b as t,F,q as A,e as Ke,p as f,A as Ce,i as q,x as g,Z,h as b,g as P,G as H,w as ke,v as $e,E as z,P as Qe,S as Ye,T as Ie,a2 as es}from"./index.18edd2cb.js";import{C as ss,V as ts}from"./CoursesSurveys.cdddf115.js";import{g as X}from"./date.27781dd8.js";import{a as as}from"./surveys.c02433fb.js";const J=We.create({baseURL:"https://best-hex-user.hexschool.com",withCredentials:!0,xsrfHeaderName:"xsrf-token",xsrfCookieName:"xsrf-token",withXSRFToken:!0,headers:{Authorization:`Bearer ${Fe("h_MqhC49RxFRI6pR3Z_token")}`}}),ls=w=>{const[B,E]=window.location.href.split("#"),{status:G}=w.response;switch(G){case 401:window.location.href=`https://rpg.hexschool.com/#/login?h_redirect=${B}&h_path=${E}`;break}return Promise.reject(w)};J.interceptors.request.use(w=>w,w=>Promise.reject(w));J.interceptors.response.use(w=>w.data,w=>ls(w));const is=()=>J.get("/v1/user/personal/profile"),os={apiGetUserPersonalInfo:is};const k=w=>(Ye("data-v-84aaa1f9"),w=w(),Ie(),w),ns={class:"surveys px-4 mt-4 position-relative"},ds=k(()=>t("h1",{class:"fs-4 mb-0"}," \u8AB2\u7A0B\u8A55\u50F9 ",-1)),cs={class:"row gx-3 gy-2 align-items-center my-2"},rs={class:"col-md-6"},us={class:"row gx-3 gy-2 align-items-center"},ps={class:"col-md-8 d-flex align-items-center"},hs=k(()=>t("label",{for:"inputState",class:"form-label flex-shrink-0 me-2 mb-0"},"\u7BE9\u9078\u65B9\u5F0F",-1)),vs=k(()=>t("option",{value:""}," \u5168\u90E8\u8A55\u50F9 ",-1)),_s=k(()=>t("option",{value:"has_reply=0"}," \u672A\u56DE\u8986 ",-1)),ys=k(()=>t("option",{value:"has_reply=1"}," \u5DF2\u56DE\u8986 ",-1)),gs=k(()=>t("option",{value:"has_content=1"}," \u6709\u8A55\u8AD6 ",-1)),ws=["value"],fs={class:"card mt-4"},bs=k(()=>t("div",{class:"card-header bg-primary text-white"},[t("h2",{class:"h4 m-2"}," \u5B78\u54E1\u56DE\u994B ")],-1)),Cs={class:"card-body bg-light"},ks={class:"list-unstyled"},$s={class:"card"},ms={class:"card-body d-flex shadow-sm"},xs=["src","alt"],Vs={class:"ms-2"},Rs={class:"d-flex align-items-center m-0",style:{height:"40px"}},Ss=["onClick"],Ds=k(()=>t("span",{class:"material-icons align-bottom ms-2 text-muted"}," disabled_visible ",-1)),Ps=[Ds],Ts=["onClick"],Ls=k(()=>t("span",{class:"material-icons align-bottom ms-2"}," disabled_visible ",-1)),qs={class:"d-flex align-items-center my-2"},Us={class:"text-muted ms-1"},js=["onClick"],zs={key:1,class:"card bg-light",style:{width:"752px"}},Bs={class:"card-body"},Es={class:"d-flex align-items-center"},Gs=["src"],Ms={class:"ms-2 mb-0"},Os={key:0,class:"text-muted"},Ns={key:0,class:"mt-3"},Ws={class:"pre-line"},Fs={key:1},As=k(()=>t("p",null,[t("small",{class:"text-muted"}," \u9650\u5236 200 \u500B\u5B57\uFF0C\u50C5\u80FD\u8F38\u5165\u6578\u5B57\u3001\u82F1\u6587\u3001\u4E2D\u6587\u5B57\u3001\u6A19\u9EDE\u7B26\u865F\uFF08\u9017\u865F\u3001\u53E5\u865F\u3001\u9A5A\u5606\u865F\u3001\u554F\u865F\u3001\u9813\u865F\uFF09 ")],-1)),Zs=["onClick"],Hs={key:3,class:"d-flex justify-content-between"},Xs=["onClick"],Js={class:"mb-0"},Ks=["onClick"],Qs={class:"card-footer bg-white d-flex"},Ys={class:"ms-5"},Is={class:"my-3"},et=["onClick"],st={key:0},tt={class:"row"},at={class:"rounded-box bg-primary text-white d-flex justify-content-center align-items-center rounded-pill me-2"},lt={class:"m-0"},it={key:0},ot=k(()=>t("p",{class:"text-muted"}," \u7D66\u8001\u5E2B\u7684\u6084\u6084\u8A71 ",-1)),nt=["onClick"],dt={key:1,class:"card bg-light",style:{width:"752px"}},ct={class:"card-body"},rt={class:"d-flex align-items-center"},ut=["src"],pt={class:"ms-2 mb-0"},ht={key:0,class:"text-muted"},vt={key:0,class:"mt-3"},_t={class:"pre-line"},yt={key:1},gt=k(()=>t("p",null,[t("small",{class:"text-muted"}," \u9650\u5236 200 \u500B\u5B57\uFF0C\u50C5\u80FD\u8F38\u5165\u6578\u5B57\u3001\u82F1\u6587\u3001\u4E2D\u6587\u5B57\u3001\u6A19\u9EDE\u7B26\u865F\uFF08\u9017\u865F\u3001\u53E5\u865F\u3001\u9A5A\u5606\u865F\u3001\u554F\u865F\u3001\u9813\u865F\uFF09 ")],-1)),wt=["onClick"],ft={key:3,class:"d-flex justify-content-between"},bt=["onClick"],Ct={class:"mb-0"},kt=["onClick"],$t={class:"d-flex justify-content-end"},mt={__name:"SurveysDetail",setup(w){const{apiGetVideoCoursesDetail:B,apiGetVideoCoursesComments:E,apiGetVideoCoursesComment:G,apiPutVideoCoursesCommentsDisplay:me,apiDeleteVideoCoursesCommentsDisplay:xe,apiPostVideoCoursesCommentsReplys:Ve,apiPutVideoCoursesCommentsReplys:Re,apiPostVideoCoursesWhispers:Se,apiPutVideoCoursesWhispers:De}=as,{apiGetUserPersonalInfo:Pe}=os,m=Ze.useLoading(),Te=He(),U={starSize:24,readOnly:!0,activeColor:"#2A8356",showRating:!1},p=C({new:!1,edit:!1,id:null}),h=C({new:!1,edit:!1,id:null}),K=C(null),Q=C(null),M=Xe({}),x=C(null),O=C({}),Le=async l=>{var e,s,c,i;const d=m.show();try{const{review:a}=await B(l);O.value=a}catch(a){g("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.statusCode}:${(i=(c=a==null?void 0:a.response)==null?void 0:c.data)==null?void 0:i.message}`)}finally{d.hide()}},Y=C([]);let N=[];const qe=()=>{const l=[];Y.value.forEach(e=>{e&&l.push(e)}),N=[].slice.call(l).map(e=>new es(e))},I=C([]),V=C({current_page:1,total:0}),D=async(l,d=M.name)=>{var s,c,i,a;const e=m.show();try{const{comments:o,pagination:_}=await E({videoCourseId:x.value,page:l,scoped:d});I.value=o,V.value=_}catch(o){g("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(c=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:c.statusCode}:${(a=(i=o==null?void 0:o.response)==null?void 0:i.data)==null?void 0:a.message}`)}finally{e.hide(),await Z(),qe()}},T=C({}),Ue=async()=>{var d,e,s,c;const l=m.show();try{const{profile:i}=await Pe();T.value=i}catch(i){g("danger","\u53D6\u5F97\u4F7F\u7528\u8005\u8CC7\u8A0A\u5931\u6557",`${(e=(d=i==null?void 0:i.response)==null?void 0:d.data)==null?void 0:e.statusCode}:${(c=(s=i==null?void 0:i.response)==null?void 0:s.data)==null?void 0:c.message}`)}finally{l.hide()}};Je(async()=>{const{id:l}=Te.params;x.value=l,await D(),Le(l),Ue()});const je=async l=>{var e,s,c,i;const d=m.show();try{await me(x.value,l),await D(V.value.current_page),g("success","\u66F4\u65B0\u6210\u529F","\u5DF2\u89E3\u9664\u96B1\u85CF")}catch(a){g("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.statusCode}:${(i=(c=a==null?void 0:a.response)==null?void 0:c.data)==null?void 0:i.message}`)}finally{d.hide()}},ze=async l=>{var e,s,c,i;const d=m.show();try{await xe(x.value,l),await D(V.value.current_page),g("success","\u66F4\u65B0\u6210\u529F","\u5DF2\u96B1\u85CF")}catch(a){g("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.statusCode}:${(i=(c=a==null?void 0:a.response)==null?void 0:c.data)==null?void 0:i.message}`)}finally{d.hide()}},R=C(""),Be=async l=>{var e,s,c,i;const d=m.show();try{await Ve(x.value,l,{content:R.value}),p.value.new=!1,p.value.id="",await D(V.value.current_page),g("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch(a){g("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.statusCode}:${(i=(c=a==null?void 0:a.response)==null?void 0:c.data)==null?void 0:i.message}`)}finally{d.hide()}},Ee=async(l,d)=>{var s,c,i,a;const e=m.show();try{const o={videoCourseId:x.value,commentId:l,replyId:d,body:{content:R.value}};await Re(o),p.value.edit=!1,p.value.id="",await D(V.value.current_page),g("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch(o){g("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(c=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:c.statusCode}:${(a=(i=o==null?void 0:o.response)==null?void 0:i.data)==null?void 0:a.message}`)}finally{e.hide()}},j=async l=>{await Z(),l==="whisper"&&Q.value[0].focus(),l==="comment"&&K.value[0].focus()},n=C([]),W=async(l,d)=>{var s,c,i,a;const e=m.show();try{const{review:o}=await G(x.value,l);o.status=!0,n.value[d]=o}catch(o){g("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(c=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:c.statusCode}:${(a=(i=o==null?void 0:o.response)==null?void 0:i.data)==null?void 0:a.message}`)}finally{e.hide(),await Z(),N[d].show()}},Ge=l=>{M.name=l.target.value,n.value=[],D(1,M.name)},S=C(""),Me=async(l,d,e)=>{var c,i,a,o;const s=m.show();try{const _={videoCourseId:x.value,commentId:l,whisperId:d,body:{content:S.value}};await Se(_),h.value.new=!1,h.value.id=null,await W(l,e),g("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch(_){g("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(i=(c=_==null?void 0:_.response)==null?void 0:c.data)==null?void 0:i.statusCode}:${(o=(a=_==null?void 0:_.response)==null?void 0:a.data)==null?void 0:o.message}`)}finally{s.hide()}},Oe=async(l,d,e,s)=>{var i,a,o,_;const c=m.show();try{const $={videoCourseId:x.value,commentId:l,whisperId:d,replyId:e,body:{content:S.value}};await De($),h.value.edit=!1,h.value.id=null,await W(l,s),g("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch($){g("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(a=(i=$==null?void 0:$.response)==null?void 0:i.data)==null?void 0:a.statusCode}:${(_=(o=$==null?void 0:$.response)==null?void 0:o.data)==null?void 0:_.message}`)}finally{c.hide()}},Ne=l=>{n.value[l].status=!n.value[l].status,N[l].toggle()},ee=(l,d,e)=>l?d||"https://fakeimg.pl/300/":e&&e||"https://fakeimg.pl/300/";return(l,d)=>(r(),u("div",ns,[ds,t("form",cs,[t("div",rs,[t("div",us,[t("div",ps,[hs,t("select",{class:"form-select",onChange:d[0]||(d[0]=e=>Ge(e))},[vs,_s,ys,gs,(r(),u(F,null,A(5,e=>t("option",{key:`sating${e}`,value:`rating=${6-e}`},b(6-e)+"\u661F\u8A55\u8AD6 ",9,ws)),64))],32)])])])]),O.value.id?(r(),Ke(ss,{key:0,data:O.value},null,8,["data"])):f("",!0),t("div",fs,[bs,t("div",Cs,[t("ul",ks,[(r(!0),u(F,null,A(I.value,(e,s)=>{var c,i,a,o,_,$,se,te,ae,le,ie,oe,ne,de,ce,re,ue,pe,he,ve,_e,ye,ge,we,fe;return r(),u("li",{key:e.id,class:"mb-4"},[t("div",$s,[t("div",ms,[t("img",{src:e.avatar,width:"40",height:"40",class:"rounded-pill",alt:e.nickname},null,8,xs),t("div",Vs,[t("p",Rs,[P(b(e.nickname)+" ",1),e.display?(r(),u("a",{key:0,href:"#",title:"\u96B1\u85CF\u8A55\u8AD6",onClick:H(v=>ze(e.id),["prevent"])},Ps,8,Ss)):(r(),u("a",{key:1,href:"#",title:"\u986F\u793A\u8A55\u8AD6",class:"text-danger text-decoration-none",onClick:H(v=>je(e.id),["prevent"])},[Ls,P(" \u53D6\u6D88\u96B1\u85CF ")],8,Ts))]),t("p",qs,[Ce(q(ts),{rating:e.rating,"star-size":U.starSize,"read-only":U.readOnly,"show-rating":U.showRating,"active-color":U.activeColor},null,8,["rating","star-size","read-only","show-rating","active-color"]),t("span",Us,b(q(X)(e.create_time)),1)]),t("p",null,b(e.content),1),p.value.id!==e.id&&!e.reply?(r(),u("button",{key:0,type:"button",class:"btn btn-outline-primary",onClick:v=>{p.value.new=!0,p.value.edit=!1,p.value.id=e.id,R.value="",j("comment")}}," \u56DE\u8986 ",8,js)):f("",!0),p.value.new&&p.value.id===e.id||e.reply?(r(),u("div",zs,[t("div",Bs,[t("div",Es,[t("img",{src:ee((c=e.reply)==null?void 0:c.id,(i=e.reply)==null?void 0:i.avatar,T.value.avatar),width:"40",height:"40",class:"rounded-pill"},null,8,Gs),t("p",Ms,[P(b(((a=e.reply)==null?void 0:a.nickname)||T.value.nickname)+" ",1),p.value.new?f("",!0):(r(),u("span",Os,b(q(X)((o=e.reply)==null?void 0:o.create_time)),1))])]),((_=e.reply)==null?void 0:_.content)&&!p.value.edit||p.value.id!==e.id?(r(),u("p",Ns,[t("pre",Ws," "+b(($=e.reply)==null?void 0:$.content)+` + `,1)])):(r(),u("div",Fs,[ke(t("textarea",{ref_for:!0,ref_key:"commentTextareaRef",ref:K,"onUpdate:modelValue":d[1]||(d[1]=v=>R.value=v),class:"my-3 form-control bg-light border-1 form-control",placeholder:"\u8ACB\u8F38\u5165\u56DE\u8986\u5167\u5BB9...",rows:"3"},null,512),[[$e,R.value]]),As])),p.value.new&&p.value.id===e.id?(r(),u("button",{key:2,type:"button",class:"btn btn-primary",onClick:v=>Be(e.id)}," \u65B0\u589E\u56DE\u8986 ",8,Zs)):f("",!0),p.value.edit&&((se=e.reply)==null?void 0:se.content)&&p.value.id===e.id?(r(),u("div",Hs,[t("button",{type:"button",class:"btn btn-primary",onClick:v=>Ee(e.id,e.reply.id)}," \u9001\u51FA\u56DE\u8986 ",8,Xs),t("p",Js,[t("span",{class:z({"text-danger":R.value.length>200})},b(R.value.length),3),P("/200 ")])])):f("",!0),!p.value.edit&&((te=e.reply)==null?void 0:te.content)||p.value.id!==e.id?(r(),u("button",{key:4,class:"btn btn-primary",type:"button",onClick:v=>{var y;p.value.new=!1,p.value.edit=!0,p.value.id=e.id,R.value=(y=e.reply)==null?void 0:y.content,j("comment")}}," \u4FEE\u6539\u56DE\u8986 ",8,Ks)):f("",!0)])])):f("",!0)])]),t("div",Qs,[t("div",Ys,[t("p",Is,[t("a",{class:"d-flex fw-bold text-dark text-decoration-none",href:"#",role:"button","aria-expanded":"false","aria-controls":"collapseExample",onClick:H(v=>{var y;return(y=n.value[s])!=null&&y.id?Ne(s):W(e.id,s)},["prevent"])},[t("span",{class:z(["material-icons align-middle transition-all",{"rotate-90":!((ae=n.value[s])!=null&&ae.status)}])}," keyboard_arrow_down ",2),P(" \u67E5\u770B\u500B\u5225\u8A55\u5206 "),e.has_whisper?(r(),u("span",st,"(\u6709\u6084\u6084\u8A71)")):f("",!0)],8,et)]),t("div",{ref_for:!0,ref:v=>Y.value[s]=v,class:"collapse show mt-3"},[t("div",tt,[(r(!0),u(F,null,A((le=n.value[s])==null?void 0:le.questionnaires,(v,y)=>{var L,be;return r(),u("div",{key:`questionnaires${y}`,class:z(["d-flex align-items-center mb-3",{"col-md-6":((L=n.value[s])==null?void 0:L.questionnaires.length)<=2,"col-md-4":((be=n.value[s])==null?void 0:be.questionnaires.length)>=3}])},[t("span",at,b(v.rating),1),t("p",lt,b(v.question),1)],2)}),128))]),(ie=n.value[s])!=null&&ie.whisper?(r(),u("div",it,[ot,t("p",null,b(n.value[s].whisper.content),1),h.value.id!==((oe=n.value[s])==null?void 0:oe.whisper.id)&&!n.value[s].whisper.reply?(r(),u("button",{key:0,class:"btn btn-outline-primary",type:"button",onClick:v=>{var y;h.value.new=!0,h.value.edit=!1,h.value.id=(y=n.value[s])==null?void 0:y.whisper.id,S.value="",j("whisper")}}," \u56DE\u8986 ",8,nt)):f("",!0),h.value.new&&h.value.id===((ne=n.value[s])==null?void 0:ne.whisper.id)||n.value[s].whisper.reply?(r(),u("div",dt,[t("div",ct,[t("div",rt,[t("img",{src:ee((de=n.value[s].whisper.reply)==null?void 0:de.id,(ce=n.value[s].whisper.reply)==null?void 0:ce.avatar,T.value.avatar),width:"40",height:"40",class:"rounded-pill"},null,8,ut),t("p",pt,[P(b(((re=n.value[s].whisper.reply)==null?void 0:re.nickname)||T.value.nickname)+" ",1),h.value.new?f("",!0):(r(),u("span",ht,b(q(X)((ue=n.value[s].whisper.reply)==null?void 0:ue.create_time)),1))])]),((pe=n.value[s].whisper.reply)==null?void 0:pe.content)&&!h.value.edit||h.value.id!==((he=n.value[s].whisper)==null?void 0:he.id)?(r(),u("p",vt,[t("pre",_t," "+b((ve=n.value[s].whisper.reply)==null?void 0:ve.content)+` + `,1)])):(r(),u("div",yt,[ke(t("textarea",{ref_for:!0,ref_key:"whisperTextareaRef",ref:Q,"onUpdate:modelValue":d[2]||(d[2]=v=>S.value=v),class:"my-3 form-control bg-light border-1 form-control",placeholder:"\u8ACB\u8F38\u5165\u56DE\u8986\u5167\u5BB9...",type:"text",rows:"3"},null,512),[[$e,S.value]]),gt])),h.value.new&&h.value.id===((_e=n.value[s])==null?void 0:_e.whisper.id)?(r(),u("button",{key:2,type:"button",class:"btn btn-primary",onClick:v=>Me(e.id,n.value[s].whisper.id,s)}," \u65B0\u589E\u56DE\u8986 ",8,wt)):f("",!0),h.value.edit&&((ye=n.value[s].whisper.reply)==null?void 0:ye.content)&&h.value.id===((ge=n.value[s].whisper)==null?void 0:ge.id)?(r(),u("div",ft,[t("button",{type:"button",class:"btn btn-primary",onClick:v=>{var y;return Oe(e.id,n.value[s].whisper.id,(y=n.value[s].whisper.reply)==null?void 0:y.id,s)}}," \u9001\u51FA\u56DE\u8986 ",8,bt),t("p",Ct,[t("span",{class:z({"text-danger":S.value.length>200})},b(S.value.length),3),P("/200 ")])])):f("",!0),!h.value.edit&&((we=n.value[s].whisper.reply)==null?void 0:we.content)||h.value.id!==((fe=n.value[s].whisper)==null?void 0:fe.id)?(r(),u("button",{key:4,class:"btn btn-primary",type:"button",onClick:v=>{var y,L;h.value.new=!1,h.value.edit=!0,h.value.id=(y=n.value[s].whisper)==null?void 0:y.id,S.value=(L=n.value[s].whisper.reply)==null?void 0:L.content,j("whisper")}}," \u4FEE\u6539\u56DE\u8986 ",8,kt)):f("",!0)])])):f("",!0)])):f("",!0)],512)])])])])}),128))]),t("div",$t,[Ce(q(Qe),{modelValue:V.value.current_page,"onUpdate:modelValue":d[3]||(d[3]=e=>V.value.current_page=e),records:V.value.total,"per-page":20,options:{chunk:6},onPaginate:D},null,8,["modelValue","records"])])])])]))}},Pt=Ae(mt,[["__scopeId","data-v-84aaa1f9"]]);export{Pt as default}; diff --git a/assets/SurveysList.9a5dfef4.js b/assets/SurveysList.9a5dfef4.js new file mode 100644 index 0000000..c252ee7 --- /dev/null +++ b/assets/SurveysList.9a5dfef4.js @@ -0,0 +1 @@ +import{D as S,r as _,o as b,a as d,c as u,b as o,F as h,q as f,A as C,i as B,x as v,h as D,P as G}from"./index.18edd2cb.js";import{C as P}from"./CoursesSurveys.cdddf115.js";import{a as A}from"./surveys.c02433fb.js";const F={class:"surveys px-4 mt-4 position-relative"},M=o("h1",{class:"fs-4 mb-0"}," \u8AB2\u7A0B\u8A55\u50F9\u5217\u8868 ",-1),N={class:"row gx-3 gy-2 align-items-center my-2"},j={class:"col-md-12"},q={class:"row"},E={class:"col-md-4"},O=["value"],U={class:"list-unstyled mb-0"},z={class:"d-flex justify-content-end"},R={__name:"SurveysList",setup(H){const{apiGetVideoCoursesList:w,apiGetVideoCoursesDetail:V,apiGetVideoCoursesSelector:L}=A,g=S.useLoading(),m=_([]),r=_({current_page:1,total:0}),p=async(c,t)=>{var n,l,e,a;const s=g.show();try{const{courses:i,pagination:x}=await w(c,t);m.value=i,r.value=x}catch(i){v("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(l=(n=i==null?void 0:i.response)==null?void 0:n.data)==null?void 0:l.statusCode}:${(a=(e=i==null?void 0:i.response)==null?void 0:e.data)==null?void 0:a.message}`)}finally{s.hide()}},y=_([]),$=async()=>{var t,s,n,l;const c=g.show();try{const{courses:e}=await L();y.value=e}catch(e){v("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(s=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:s.statusCode}:${(l=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:l.message}`)}finally{c.hide()}},k=async c=>{var s,n,l,e;const t=g.show();try{if(c.target.value){const{review:a}=await V(c.target.value);m.value=Array(a)}else p()}catch(a){v("danger","\u8AB2\u7A0B\u8CC7\u8A0A\u53D6\u5F97\u5931\u6557",`${(n=(s=a==null?void 0:a.response)==null?void 0:s.data)==null?void 0:n.statusCode}:${(e=(l=a==null?void 0:a.response)==null?void 0:l.data)==null?void 0:e.message}`)}finally{t.hide()}};return b(async()=>{await p(),await $()}),(c,t)=>(d(),u("div",F,[M,o("form",N,[o("div",j,[o("div",q,[o("div",E,[o("select",{class:"form-select w-50",onChange:k},[o("option",{selected:"",value:"",onClick:p}," \u5168\u90E8\u8AB2\u7A0B "),(d(!0),u(h,null,f(y.value,s=>(d(),u("option",{key:s.id,value:s.id},D(s.name),9,O))),128))],32)])])])]),o("ul",U,[(d(!0),u(h,null,f(m.value,s=>(d(),u("li",{key:s,class:"mb-4"},[C(P,{data:s},null,8,["data"])]))),128))]),o("div",z,[C(B(G),{modelValue:r.value.current_page,"onUpdate:modelValue":t[0]||(t[0]=s=>r.value.current_page=s),records:r.value.total,"per-page":20,options:{chunk:6},onPaginate:p},null,8,["modelValue","records"])])]))}};export{R as default}; diff --git a/assets/SurveysManage.6cae3bb4.js b/assets/SurveysManage.6cae3bb4.js new file mode 100644 index 0000000..b314f39 --- /dev/null +++ b/assets/SurveysManage.6cae3bb4.js @@ -0,0 +1 @@ +import{r as g,a as i,e as I,f as P,b as s,M as A,D as F,o as Q,c as u,F as O,q as S,g as T,A as j,B as E,x as c,w as M,C as G,p as y,v as z}from"./index.18edd2cb.js";import{a as H}from"./surveys.c02433fb.js";const J=s("p",{class:"text-danger mb-2"},"\u8ACB\u6CE8\u610F\uFF01\u522A\u9664\u5F8C\u5C07\u7121\u6CD5\u5FA9\u539F",-1),K={class:"d-flex justify-content-end"},W=s("button",{type:"button",class:"btn btn-primary me-2","data-bs-dismiss":"modal"}," \u53D6\u6D88 ",-1),X={__name:"AlertModal",emits:["deleteQuestionnaire"],setup(V,{expose:f,emit:w}){const r=g(null);return f({modalRef:r}),(k,b)=>(i(),I(A,{ref_key:"modalRef",ref:r,title:"\u662F\u5426\u522A\u9664\u6B64\u554F\u5238\uFF1F","has-footer":!0},{body:P(()=>[J,s("div",K,[W,s("button",{type:"button",class:"btn btn-danger",onClick:b[0]||(b[0]=v=>w("deleteQuestionnaire"))}," \u522A\u9664 ")])]),_:1},512))}},Y={class:"px-4 mt-4"},Z=s("h1",{class:"fs-4 mb-3"}," \u8A55\u50F9\u7BA1\u7406 ",-1),q={class:"card shadow-sm rounded"},ee=s("div",{class:"card-header"},[s("h5",{class:"text-secondary my-2"}," \u8A55\u50F9\u5167\u5BB9\u8A2D\u5B9A ")],-1),te={class:"card-body"},se={class:"table table-borderless"},ae=s("thead",null,[s("tr",{class:"text-secondary"},[s("th",{style:{width:"100px"}}," \u555F\u7528\u72C0\u614B "),s("th",null,"\u8A55\u50F9\u540D\u7A31"),s("th",{class:"w-25"})])],-1),oe={class:"align-middle"},ne={class:"form-check form-switch"},le=["onUpdate:modelValue","checked","onChange"],de=["onUpdate:modelValue","disabled"],ce={class:"d-flex align-items-center"},ie=["onClick"],ue=["onClick"],he=["onClick"],pe=s("span",{class:"material-icons-outlined"}," close ",-1),_e=[pe],re=s("td",null,null,-1),be=s("span",{class:"material-icons-outlined me-1"}," add_circle_outline ",-1),we={__name:"SurveysManage",setup(V){const{apiGetVideoCoursesQuestionnaires:f,apiPostVideoCoursesQuestionnaires:w,apiPutVideoCoursesQuestionnaires:r,apiDeleteVideoCoursesQuestionnaires:k,apiPutVideoCoursesOpenQuestionnaires:b,apiDeleteVideoCoursesCloseQuestionnaires:v}=H,h=F.useLoading(),$=g(null);let C=null;Q(()=>{C=new E($.value.modalRef.hModal)});const m=g([]),p=async()=>{var l,e,n,a;const d=h.show();try{const{questionnaires:t}=await f();m.value=t}catch(t){c("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(e=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:e.statusCode}:${(a=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:a.message}`)}finally{d.hide()}};Q(p);const B=async d=>{var e,n,a,t;const l=h.show();try{await w(d),await p(),c("success","\u66F4\u65B0\u554F\u5377\u6210\u529F","\u5DF2\u6210\u529F\u65B0\u589E\u554F\u5377")}catch(o){c("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(n=(e=o==null?void 0:o.response)==null?void 0:e.data)==null?void 0:n.statusCode}:${(t=(a=o==null?void 0:o.response)==null?void 0:a.data)==null?void 0:t.message}`)}finally{l.hide()}},D=async(d,l)=>{var n,a,t,o;const e=h.show();try{await r(d,{question:l.question}),await p(),c("success","\u66F4\u65B0\u554F\u5377\u6210\u529F","\u5DF2\u6210\u529F\u66F4\u65B0\u554F\u5377")}catch(_){c("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(a=(n=_==null?void 0:_.response)==null?void 0:n.data)==null?void 0:a.statusCode}:${(o=(t=_==null?void 0:_.response)==null?void 0:t.data)==null?void 0:o.message}`)}finally{e.hide()}};let x=null;const R=async()=>{var l,e,n,a;const d=h.show();try{C.hide(),await k(x),await p(),c("success","\u66F4\u65B0\u554F\u5377\u6210\u529F","\u5DF2\u6210\u529F\u522A\u9664\u554F\u5377")}catch(t){c("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(e=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:e.statusCode}:${(a=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:a.message}`)}finally{d.hide()}},L=async d=>{var e,n,a,t;const l=h.show();try{await b(d),await p(),c("success","\u66F4\u65B0\u554F\u5377\u6210\u529F","\u5DF2\u6210\u529F\u958B\u555F\u554F\u5377")}catch(o){c("danger","\u554F\u5377\u958B\u555F\u5931\u6557",`${(n=(e=o==null?void 0:o.response)==null?void 0:e.data)==null?void 0:n.statusCode}:${(t=(a=o==null?void 0:o.response)==null?void 0:a.data)==null?void 0:t.message}`)}finally{l.hide()}},N=async d=>{var e,n,a,t;const l=h.show();try{await v(d),await p(),c("success","\u66F4\u65B0\u554F\u5377\u6210\u529F","\u5DF2\u6210\u529F\u95DC\u9589\u554F\u5377")}catch(o){c("danger","\u554F\u5377\u95DC\u9589\u5931\u6557",`${(n=(e=o==null?void 0:o.response)==null?void 0:e.data)==null?void 0:n.statusCode}:${(t=(a=o==null?void 0:o.response)==null?void 0:a.data)==null?void 0:t.message}`)}finally{l.hide()}},U=d=>{x=d,C.show()};return(d,l)=>(i(),u("div",Y,[Z,s("div",q,[ee,s("div",te,[s("table",se,[ae,s("tbody",null,[(i(!0),u(O,null,S(m.value,(e,n)=>(i(),u("tr",{key:e.id},[s("td",oe,[s("div",ne,[e.id?M((i(),u("input",{key:0,id:"flexSwitchCheckDefault","onUpdate:modelValue":a=>e.enable=a,class:"form-check-input",type:"checkbox",role:"switch","true-value":1,"false-value":0,checked:e.enable,onChange:a=>e.enable?L(e.id):N(e.id)},null,40,le)),[[G,e.enable]]):y("",!0)])]),s("td",null,[M(s("input",{"onUpdate:modelValue":a=>e.question=a,type:"text",class:"form-control",placeholder:"\u8ACB\u8F38\u5165\u5167\u5BB9",disabled:e.id?e.enable:null},null,8,de),[[z,e.question]])]),s("td",ce,[e.id&&!e.enable?(i(),u("button",{key:0,type:"button",class:"btn btn-outline-dark",onClick:a=>D(e.id,e)}," \u5B8C\u6210 ",8,ie)):y("",!0),e.id?y("",!0):(i(),u("button",{key:1,type:"button",class:"btn btn-outline-primary",onClick:a=>B(e)}," \u65B0\u589E ",8,ue)),!e.enable||!e.id?(i(),u("button",{key:2,type:"button",class:"btn d-flex",onClick:a=>e.id?U(e.id):m.value.splice(n,1)},_e,8,he)):y("",!0)])]))),128)),s("tr",null,[re,s("td",null,[s("button",{type:"button",class:"btn d-flex text-primary d-flex",onClick:l[0]||(l[0]=e=>m.value.push({question:""}))},[be,T(" \u65B0\u589E\u8A55\u50F9 ")])])])])])])]),j(X,{ref_key:"alertRef",ref:$,onDeleteQuestionnaire:R},null,512)]))}};export{we as default}; diff --git a/assets/Tag.b37fedca.js b/assets/Tag.b37fedca.js new file mode 100644 index 0000000..feab5e5 --- /dev/null +++ b/assets/Tag.b37fedca.js @@ -0,0 +1 @@ +import{r as n,a as r,e as W,f as A,b as e,h as V,M as X,s as K,o as N,z as G,A as f,E as Q,c as _,F as P,q as U,g as Y,p as j,D as ee,m as te,w as se,v as ae,O as oe,i as le,B as H,x as I,G as ne,P as ie}from"./index.18edd2cb.js";import{B as de}from"./tab.68fa44ea.js";import{a as Z}from"./task-tags.fad0dc56.js";const ce={class:"h4 text-dark mb-3 fw-bold"},re=e("p",{class:"text-danger mb-2"},"\u8ACB\u6CE8\u610F\uFF01\u522A\u9664\u5F8C\u5C07\u7121\u6CD5\u5FA9\u539F",-1),pe={class:"d-flex justify-content-end"},ue=e("button",{type:"button",class:"btn btn-primary me-2","data-bs-dismiss":"modal"}," \u53D6\u6D88 ",-1),me={__name:"TagDeleteModal",props:{name:{type:String,default:""}},emits:["delete"],setup(D,{expose:B,emit:w}){const b=D,g=n(null);return B({modalRef:g}),(x,v)=>(r(),W(X,{ref_key:"modalRef",ref:g,title:"\u662F\u5426\u522A\u9664\u6B64\u6A19\u7C64\uFF1F","has-footer":!0},{body:A(()=>[e("h5",ce,V(b.name),1),re,e("div",pe,[ue,e("button",{type:"button",class:"btn btn-danger",onClick:v[0]||(v[0]=y=>w("delete"))}," \u522A\u9664 ")])]),_:1},512))}},_e={class:"mb-3"},be=e("label",{for:"name",class:"form-label"},"\u6A19\u7C64\u540D\u7A31",-1),ve={class:"mb-3"},ye=e("label",{for:"description",class:"form-label"},"\u63CF\u8FF0",-1),fe={key:0,class:"mt-4"},ge={class:"card shadow-sm rounded-4 overflow-hidden h-100"},he=e("div",{class:"card-header bg-white py-2 d-flex align-items-center justify-content-between"},[e("h2",{class:"h6 mb-0 lh-base"},"\u5DF2\u5957\u7528\u6B64\u6A19\u7C64"),e("ul",{class:"nav nav-pills",id:"pills-tab",role:"tablist"},[e("li",{class:"nav-item",role:"presentation"},[e("button",{class:"nav-link active",id:"pills-home-tab","data-bs-toggle":"pill","data-bs-target":"#pills-home",type:"button",role:"tab","aria-controls":"pills-home","aria-selected":"true"}," \u4EFB\u52D9\u7FA4\u7D44 ")]),e("li",{class:"nav-item",role:"presentation"},[e("button",{class:"nav-link",id:"pills-profile-tab","data-bs-toggle":"pill","data-bs-target":"#pills-profile",type:"button",role:"tab","aria-controls":"pills-profile","aria-selected":"false"}," \u4EFB\u52D9 ")])])],-1),ke={class:"card-body",style:{"max-height":"230px","overflow-y":"scroll"}},$e={class:"tab-content",id:"pills-tabContent"},we={class:"tab-pane fade show active",id:"pills-home",role:"tabpanel","aria-labelledby":"pills-home-tab",tabindex:"0"},xe={class:"list-unstyled"},Te={class:"tab-pane fade",id:"pills-profile",role:"tabpanel","aria-labelledby":"pills-profile-tab",tabindex:"0"},Me={class:"list-unstyled"},Ce=e("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," \u53D6\u6D88 ",-1),Ve=["disabled"],Be={__name:"TagModal",props:{type:{type:String,default:""},data:{type:Object,default:()=>({id:"",name:"",description:""})}},emits:["update"],setup(D,{expose:B,emit:w}){const b=D,{apiGetTaskTagById:g,apiPostTaskTags:x,apiPutTaskTagById:v}=Z,y=n(null),R=n(null);B({tagContentModalRef:R});const i=n("create"),T=n(""),p=n({name:"",description:""});K(()=>{var o;return(o=b.data)==null?void 0:o.id},()=>{var o;(o=b.data)!=null&&o.id?(i.value="edit",T.value=b.data.id,p.value=JSON.parse(JSON.stringify(b.data))):(i.value="create",T.value="",p.value={name:"",description:""},y.value.resetForm())});const h=n({tasksApply:[],taskGroupsApply:[]}),L=async o=>{var d,l,m,c;try{const{task_tag:u}=await g(o);h.value={tasksApply:u.tasks_apply,taskGroupsApply:u.task_groups_apply}}catch(u){w("update",{type:"\u5931\u6557",status:i.value,error:`${(l=(d=u==null?void 0:u.response)==null?void 0:d.data)==null?void 0:l.statusCode}:${(c=(m=u==null?void 0:u.response)==null?void 0:m.data)==null?void 0:c.message}`})}};K(()=>T.value,o=>{o&&L(o)});const k=n(!1),E=async()=>{var o,d,l,m;k.value=!0;try{if(i.value==="create")await x(p.value),p.value={name:"",description:""};else{const c={name:p.value.name,description:p.value.description};await v(T.value,c)}k.value=!1,w("update",{type:"\u6210\u529F",status:i.value})}catch(c){k.value=!1,p.value.name=b.data.name,p.value.description=b.data.description,w("update",{type:"\u5931\u6557",status:i.value,error:`${(d=(o=c==null?void 0:c.response)==null?void 0:o.data)==null?void 0:d.statusCode}: ${(m=(l=c==null?void 0:c.response)==null?void 0:l.data)==null?void 0:m.message}`})}},F=n();return N(()=>{F.value=document.querySelectorAll("#myTab button"),F.value.forEach(o=>{const d=new de(o);o.addEventListener("click",l=>{l.preventDefault(),d.show()})})}),(o,d)=>{const l=G("Field"),m=G("ErrorMessage"),c=G("router-link"),u=G("VForm");return r(),W(u,{ref_key:"tagForm",ref:y,onSubmit:E},{default:A(({errors:S})=>[f(X,{ref_key:"tagContentModalRef",ref:R,title:i.value==="create"?"\u65B0\u589E\u6A19\u7C64":"\u7DE8\u8F2F\u6A19\u7C64","has-footer":!0},{body:A(()=>[e("div",_e,[be,f(l,{id:"name",modelValue:p.value.name,"onUpdate:modelValue":d[0]||(d[0]=t=>p.value.name=t),name:"name",label:"\u6A19\u7C64\u540D\u7A31",type:"text",class:Q(["form-control",{"is-invalid":S.name}]),rules:{required:!0}},null,8,["modelValue","class"]),f(m,{name:"name",class:"invalid-feedback"})]),e("div",ve,[ye,f(l,{as:"textarea",id:"description",modelValue:p.value.description,"onUpdate:modelValue":d[1]||(d[1]=t=>p.value.description=t),name:"description",label:"\u63CF\u8FF0",type:"text",rules:{required:!0},class:Q(["form-control",{"is-invalid":S.description}])},null,8,["modelValue","class"]),f(m,{name:"description",class:"invalid-feedback"})]),i.value==="edit"?(r(),_("div",fe,[e("div",ge,[he,e("div",ke,[e("div",$e,[e("div",we,[e("ul",xe,[(r(!0),_(P,null,U(h.value.taskGroupsApply,t=>(r(),_("li",{class:"mb-2",key:t.id},V(t.name),1))),128))])]),e("div",Te,[e("ul",Me,[(r(!0),_(P,null,U(h.value.tasksApply,t=>(r(),_("li",{class:"mb-2",key:t.id},[f(c,{target:"_blank",to:`/admin/task/list/${t.id}`},{default:A(()=>[Y(V(t.name),1)]),_:2},1032,["to"])]))),128))])])])])])])):j("",!0)]),footer:A(()=>[Ce,e("button",{type:"submit",class:"btn btn-primary",disabled:k.value},V(i.value==="create"?"\u65B0\u589E":"\u7DE8\u8F2F"),9,Ve)]),_:2},1032,["title"])]),_:1},512)}}},Re={class:"taskTag px-4 mt-4"},Fe=e("h1",{class:"fs-4 mb-3"},"\u6A19\u7C64\u7BA1\u7406",-1),Ie={class:"d-flex justify-content-between align-items-center mb-3"},Ae={class:"row w-75"},De={class:"col-md-6"},Le={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Se={class:"card-body p-0"},Ge={class:"table-responsive"},Ne={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},Pe=e("thead",{class:"bg-light"},[e("tr",null,[e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"}," \u6A19\u7C64\u540D\u7A31 "),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u63CF\u8FF0"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u4F7F\u7528\u72C0\u614B"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u7DE8\u8F2F")])],-1),Ue={class:"text-nowrap"},je={scope:"row",class:"ps-4"},Ee={scope:"row",class:"ps-4"},Oe={scope:"row",class:"ps-4"},qe={key:0,class:"text-success"},ze={key:1,class:"text-secondary"},Je={scope:"row",class:"ps-4"},Ke=["onClick"],Qe=e("span",{class:"material-icons align-middle fs-6"}," edit ",-1),He=["onClick"],We={key:0,class:"card-footer bg-white py-3"},Xe={class:"d-flex flex-wrap align-items-start"},tt={__name:"Tag",setup(D){const{apiGetTaskTags:B,apiDeleteTaskTagById:w}=Z,b=ee.useLoading(),g=n(!1),x=n(""),v=n(""),y=n({current_page:1,total_page:0,total:30}),R=n([]),i=async(t=1,s=10)=>{var O,q,z,J;v.value!==""?x.value=`name=${v.value}`:x.value="";const a=b.show(),{task_tags:M,pagination:$}=await B({page:t,count:s,scoped:x.value});try{R.value=M,y.value=$}catch(C){I("danger","\u53D6\u5F97\u5206\u985E\u6A19\u7C64\u5217\u8868\u5931\u6557",`${(q=(O=C==null?void 0:C.response)==null?void 0:O.data)==null?void 0:q.statusCode}:${(J=(z=C==null?void 0:C.response)==null?void 0:z.data)==null?void 0:J.message}`)}finally{a.hide()}},T=t=>{i(t)};N(async()=>{await i()});const h=te({type:"",data:{}}),L=n(null);let k=null;N(()=>{k=new H(L.value.tagContentModalRef.hModal)});const F=(t,s={})=>{h.type=t,h.data=s,k.show()},o=t=>{const s=t.status==="created"?"\u5EFA\u7ACB":"\u7DE8\u8F2F";t.type==="\u6210\u529F"?I("success",`${s}\u6A19\u7C64\u6210\u529F`,`\u5DF2\u6210\u529F${s}\u6A19\u7C64`):t.type==="\u5931\u6557"&&I("danger",`${s}\u6A19\u7C64\u5931\u6557`,t.error),k.hide(),i()},d=n(null),l=n({id:"",name:""});let m=null;N(()=>{m=new H(d.value.modalRef.hModal)});const u=(t,s)=>{l.value.id=t,l.value.name=s,m.show()},S=async()=>{var t,s,a,M;try{await w(l.value.id),I("success","\u522A\u9664\u6A19\u7C64\u6210\u529F","\u5DF2\u6210\u529F\u522A\u9664\u6A19\u7C64")}catch($){I("danger","\u522A\u9664\u6A19\u7C64\u5931\u6557",`${(s=(t=$==null?void 0:$.response)==null?void 0:t.data)==null?void 0:s.statusCode}:${(M=(a=$==null?void 0:$.response)==null?void 0:a.data)==null?void 0:M.message}`)}finally{m.hide(),l.value.id="",l.value.name="",i()}};return(t,s)=>(r(),_("div",Re,[Fe,e("div",Ie,[e("div",Ae,[e("div",De,[se(e("input",{"onUpdate:modelValue":s[0]||(s[0]=a=>v.value=a),onCompositionstart:s[1]||(s[1]=a=>g.value=!0),onCompositionend:s[2]||(s[2]=a=>g.value=!1),placeholder:"\u641C\u5C0B\u4EFB\u52D9\u6A19\u7C64",class:"form-control",onKeydown:s[3]||(s[3]=oe(ne(()=>{g.value||i(1)},["prevent"]),["enter"]))},null,544),[[ae,v.value]])])]),e("button",{class:"btn btn-primary",onClick:s[4]||(s[4]=a=>F("create"))}," \u65B0\u589E\u6A19\u7C64 ")]),e("div",Le,[e("div",Se,[e("div",Ge,[e("table",Ne,[Pe,e("tbody",Ue,[(r(!0),_(P,null,U(R.value,a=>(r(),_("tr",{key:a.id,class:"align-middle"},[e("td",je,V(a.name),1),e("td",Ee,V(a.description),1),e("td",Oe,[a.is_used?(r(),_("span",qe,"\u5DF2\u4F7F\u7528")):(r(),_("span",ze,"\u672A\u4F7F\u7528"))]),e("td",Je,[e("button",{class:"btn btn-sm btn-outline-gray ms-1",onClick:M=>F("edit",a)},[Qe,Y(" \u7DE8\u8F2F ")],8,Ke),a.is_used?j("",!0):(r(),_("button",{key:0,class:"btn btn-sm btn-outline-danger ms-2",onClick:M=>u(a.id,a.name)},"\u522A\u9664",8,He))])]))),128))])])])]),y.value.total_page>1?(r(),_("div",We,[e("div",Xe,[f(le(ie),{modelValue:y.value.current_page,"onUpdate:modelValue":s[5]||(s[5]=a=>y.value.current_page=a),records:y.value.total,"per-page":10,options:{chunk:6},onPaginate:T},null,8,["modelValue","records"])])])):j("",!0)]),f(me,{ref_key:"alertRef",ref:d,onDelete:S,name:l.value.name},null,8,["name"]),f(Be,{ref_key:"tagModalRef",ref:L,type:h.type,data:h.data,onUpdate:o},null,8,["type","data"])]))}};export{tt as default}; diff --git a/assets/TaskDetail.18b9d897.js b/assets/TaskDetail.18b9d897.js new file mode 100644 index 0000000..ecd8f8e --- /dev/null +++ b/assets/TaskDetail.18b9d897.js @@ -0,0 +1 @@ +import{d as G,D as pe,l as ve,u as be,r as v,s as ge,o as he,z as B,a as r,c as d,b as e,A as m,f as q,h as y,x as A,g as Q,E as F,F as C,q as L,a3 as fe,a4 as ke,w as b,v as $,i as ye,p as E,C as N,R as we}from"./index.18edd2cb.js";import{I as xe,_ as Ve}from"./Editor.925d2886.js";/* empty css */import{a as Ue}from"./task.8f86f14f.js";import{a as Te}from"./task-tags.fad0dc56.js";const ae=h=>({"image/png":"png","image/jpg":"jpeg","image/jpeg":"jpeg"})[h],Ce=h=>new Promise((p,w)=>{const g=new FileReader;g.readAsArrayBuffer(h),g.onload=I=>{const{result:S}=I.target;p(S)},g.onerror=w}),Le={name:"ImageUploader",module:xe,options:{upload(h){return new Promise((p,w)=>{const{type:g,size:I}=h;if(!ae(g)){postMessage("danger","\u5716\u7247\u683C\u5F0F\u932F\u8AA4","\u50C5\u9650\u4E0A\u50B3 png\u3001jpg \u8207 jpeg \u6A94\u6848\u683C\u5F0F"),w(new Error("\u50C5\u9650\u4E0A\u50B3 png\u3001jpg \u8207 jpeg \u6A94\u6848\u683C\u5F0F"));return}const S=1024*1024*3;if(I>=S){postMessage("danger","\u5716\u7247\u904E\u5927","\u5716\u7247\u5927\u5C0F\u4E0D\u5F97\u8D85\u904E 3MB\u3002"),w(new Error("\u5716\u7247\u5927\u5C0F\u4E0D\u5F97\u8D85\u904E 3MB\u3002"));return}const O=`/v1/common/upload/image/${ae(g)}`;(async()=>{try{const x=await Ce(h),{data:V}=await G.get(O),P=V.image_url,R=V.upload_url,U={transformRequest(a,M){return delete M.common.Authorization,a},headers:{"Content-Type":g},withCredentials:!1};await G.put(R,x,U),p(P)}catch{postMessage("danger","\u5716\u7247\u4E0A\u50B3\u5931\u6557","\u5716\u7247\u4E0A\u50B3\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u4E0A\u50B3\u3002"),w(new Error("\u5716\u7247\u4E0A\u50B3\u5931\u6557\u3002"))}})()})}}};const $e={class:"about task-detail px-4 mt-4"},Ie={class:"border-bottom border-light pb-2 mb-4"},Se={"aria-label":"breadcrumb"},Me={class:"breadcrumb"},Be={class:"breadcrumb-item"},Fe={class:"breadcrumb-item active","aria-current":"page"},Re={class:"fs-4 mb-3"},je={class:"my-3"},qe={class:"row"},Ae={class:"col-md-6"},Ee={class:"mb-3"},Ne=e("label",{class:"form-label",for:"name"},"\u4EFB\u52D9\u540D\u7A31",-1),Ge={class:"col-md-6"},Oe={class:"mb-3"},Pe=e("label",{class:"form-label",for:"taskGroupName"},"\u6240\u5C6C\u7FA4\u7D44",-1),ze={class:"position-relative"},De=["value"],Je=["required"],He={class:"col-md-6"},Ke={class:"mb-3"},Qe=e("label",{class:"form-label",for:"image_url"},"\u4EFB\u52D9\u5716\u7247 (1200 x 628)",-1),We={class:"mt-2"},Xe=["src"],Ye={key:1,class:"preview-block"},Ze={class:"col-md-6"},et={class:"mb-3"},tt=e("label",{class:"form-label",for:"taskPoint"},"\u4EFB\u52D9\u7A4D\u5206",-1),st={class:"mb-3"},at=e("label",{class:"form-label",for:"abstract"},"\u6458\u8981",-1),ot={class:"mb-3"},lt=e("label",{class:"form-label",for:"description"},"\u4EFB\u52D9\u5167\u5BB9\u8AAA\u660E",-1),nt={class:"mt-3 position-relative"},it={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},rt={class:"card-header bg-white py-3"},dt={key:0},ct={class:"card-body card-body-height"},ut={class:"list list-unstyled"},_t={class:"form-check"},mt=["id","value"],pt=["for"],vt=e("hr",null,null,-1),bt={class:"row"},gt={class:"col-md-6"},ht={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},ft=e("div",{class:"card-header bg-white py-3"},"\u4EFB\u52D9\u5B8C\u6210\u5F8C\u6703\u7372\u5F97\u7684\u6280\u80FD",-1),kt={class:"card-body card-body-height"},yt={class:"mb-3"},wt=e("label",{class:"form-label d-block h5",for:"summary"},null,-1),xt=["onUpdate:modelValue"],Vt=["onClick"],Ut={class:"col-md-6"},Tt={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Ct=e("div",{class:"card-header bg-white py-3"},"\u4EFB\u52D9\u5B8C\u6210\u689D\u4EF6",-1),Lt={class:"card-body card-body-height"},$t={class:"mb-3"},It=["onUpdate:modelValue"],St=["onClick"],Mt=e("hr",null,null,-1),Bt=e("h5",null,"\u662F\u5426\u5305\u542B\u7B49\u7D1A",-1),Ft={class:"form-check mb-3"},Rt=e("label",{class:"form-check-label",for:"task-has-level"}," \u986F\u793A\u4EFB\u52D9\u5206\u968E\u7B49\u7D1A ",-1),jt={key:0,class:"my-3"},qt=["onUpdate:modelValue"],At=["onClick"],Et=e("hr",null,null,-1),Nt=e("h5",null,"\u662F\u5426\u9700\u8981\u524D\u7F6E\u4EFB\u52D9",-1),Gt={class:"form-check mb-3"},Ot=e("label",{class:"form-check-label",for:"beforeStart"}," \u662F\u5426\u9700\u8981\u524D\u7F6E\u4EFB\u52D9 ",-1),Pt={key:1,class:"mb-3"},zt=e("label",{class:"form-label",for:"predecessor_task_id"},"\u524D\u7F6E\u4EFB\u52D9",-1),Dt=["value"],Jt=e("hr",null,null,-1),Ht={class:"row"},Kt={class:"col-md-6"},Qt={class:"mb-3"},Wt=e("label",{class:"form-label",for:"task_start_at"},"\u958B\u59CB\u6642\u9593",-1),Xt={class:"col-md-6"},Yt={class:"mb-3"},Zt=e("label",{class:"form-label",for:"task_expired_at"},"\u5230\u671F\u6642\u9593",-1),es={class:"form-check mb-3"},ts=e("label",{class:"form-check-label",for:"enable"}," \u662F\u5426\u555F\u7528\u4EFB\u52D9 ",-1),ss={class:"d-flex justify-content-end"},as={class:"d-flex flex-column align-items-end"},os=["disabled"],ls=e("i",{class:"fas fa-save"},null,-1),ns={key:0,class:"mb-0 mt-2 text-danger"},ps={__name:"TaskDetail",props:{type:{type:String}},setup(h){const p=h,{apiGetTasks:w,apiGetTaskGroupsList:g,apiGetTaskById:I,apiPostTask:S,apiPutTaskById:O}=Ue,{apiGetTaskTags:W}=Te,x=pe.useLoading(),V=ve(),P=be(),R=v(null),U=v(!1),a=v({name:"",task_group_id:"",image_url:"",tag_ids:[],rewarded_skills:[{content:""}],completion_criteria:[{content:""}],level:[]}),M=n=>{a.value[n].push({content:""})},z=(n,t)=>{a.value[n].splice(t,1)},j=v(""),D=v([]),J=v([]),H=v({current_page:1,total_page:1,total:0}),oe=async()=>{const n=x.show(),{task_groups:t}=await g({page:1,count:150}),{task_tags:o,pagination:i}=await W({page:1,count:150});D.value=t,J.value=o,H.value=i,n.hide()},T=v(!1),X=v([]),le=async n=>{const t=x.show(),{tasks:o}=await w({count:100,page:1,scoped:n});X.value=o.filter(i=>i.id!==j.value),t.hide()};ge(()=>T.value,n=>{if(n){const t=a.value.task_group_id;if(!t)A("danger","\u8ACB\u5148\u9078\u64C7\u4EFB\u52D9\u7FA4\u7D44","\u56E0\u524D\u7F6E\u4EFB\u52D9\u8981\u548C\u6B64\u4EFB\u52D9\u5728\u540C\u4E00\u500B\u7FA4\u7D44\u4E0B\uFF0C\u8ACB\u5148\u9078\u64C7\u4EFB\u52D9\u7FA4\u7D44");else{const o=`&filter=task_group&task_group_id=${t}`;le(o)}}});const Y=async n=>{var i,l,f,k;const t=x.show(),{task:o}=await I(n);a.value={name:o.name,task_group_id:(i=o==null?void 0:o.task_group)==null?void 0:i.id,predecessor_task_id:(l=o==null?void 0:o.predecessor_task)==null?void 0:l.id,tag_ids:o.tags.map(c=>c.id),rewarded_point:o.rewarded_point,abstract:o.abstract,description:o.description,rewarded_skills:o.rewarded_skills.map(c=>({content:c})),completion_criteria:o.completion_criteria.map(c=>({content:c})),level:o.level?o.level.map(c=>({content:c})):[],start_at:o.start_at?new Date(o.start_at).toLocaleDateString("sv-SE"):null,expired_at:o.expired_at?new Date(o.expired_at).toLocaleDateString("sv-SE"):null,enable:o.enable,image_url:o.image_url},(o==null?void 0:o.level)&&((f=o.level)==null?void 0:f.length)>0&&(U.value=!0),(o==null?void 0:o.predecessor_task)&&((k=o.predecessor_task)==null?void 0:k.id)&&(T.value=!0),t.hide()};he(async()=>{const{id:n}=V.params,{task_copy_id:t}=V.query;oe(),j.value=n,j.value&&Y(n),t&&!n&&Y(t)});const ne=async()=>{var i;a.value.description=R.value.editorContent,T.value||delete a.value.predecessor_task_id;const n=JSON.parse(JSON.stringify(a.value.completion_criteria.filter(l=>l.content!=="")));a.value.completion_criteria=n.map(l=>l.content);const t=JSON.parse(JSON.stringify(a.value.rewarded_skills.filter(l=>l.content!=="")));a.value.rewarded_skills=t==null?void 0:t.map(l=>l.content),((i=a.value.level)==null?void 0:i.length)===0?delete a.value.level:a.value.level=a.value.level?a.value.level.map(l=>l.content):[];const o=p.type==="create"?"\u65B0\u589E":"\u7DE8\u8F2F";try{Object.keys(a.value).forEach(l=>{a.value[l]===null&&delete a.value[l]}),p.type==="create"&&await S(a.value),p.type==="edit"&&await O(j.value,a.value),A("success",`${o}\u6210\u529F`,`${o}\u4EFB\u52D9\u6210\u529F`),P.push({name:"TaskList",query:V.query})}catch(l){A("danger",`${o}\u5931\u6557`,`${l.response.data.statusCode}:${l.response.data.message}`)}},Z=v(!1),ee=v(null),ie=n=>new Promise((t,o)=>{const i=new FileReader;i.readAsArrayBuffer(n),i.onload=l=>{const{result:f}=l.target;t(f)},i.onerror=o}),K=(n,t)=>{Z.value=!1,n.target.value="",A("danger","\u5716\u7247\u4E0A\u50B3\u5931\u6557",`${t}`)},re=n=>{const t=x.show({container:ee.value,width:30,height:30}),o=n.target.files[0],i=3*1024*1024;if(o.size>i){K(n,"\u5716\u7247\u5927\u5C0F\u4E0D\u80FD\u8D85\u904E 3MB");return}if(o){const l=new FileReader;l.onload=f=>{const k=new Image;k.onload=()=>{const{width:c,height:s}=k;if(c===1200&&s===628){const _=`/v1/common/upload/image/${o.type.split("/")[1]}`;(async()=>{try{const te=await ie(o),{data:se}=await G.get(_),de=se.image_url,ce=se.upload_url,ue={transformRequest(_e,me){return delete me.common.Authorization,_e},headers:{"Content-Type":o.type},withCredentials:!1};await G.put(ce,te,ue),a.value.image_url=de,t.hide()}catch{K(n,"\u5716\u7247\u4E0A\u50B3\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u4E0A\u50B3\u3002")}})()}else K(n,"\u5716\u7247\u5BEC\u9AD8\u9700\u7B26\u5408 1200 x 628")},k.src=f.target.result},l.readAsDataURL(o)}};return(n,t)=>{const o=B("router-link"),i=B("Field"),l=B("ErrorMessage"),f=B("v-select"),k=B("VForm");return r(),d("div",$e,[e("header",Ie,[e("nav",Se,[e("ol",Me,[e("li",Be,[m(o,{to:"/admin/task/list"},{default:q(()=>[Q(" \u4EFB\u52D9\u5217\u8868 ")]),_:1})]),e("li",Fe,y(p.type==="create"?"\u65B0\u589E\u4EFB\u52D9":"\u7DE8\u8F2F\u4EFB\u52D9"),1)])])]),e("h1",Re,y(p.type==="create"?"\u65B0\u589E\u4EFB\u52D9":"\u7DE8\u8F2F\u4EFB\u52D9"),1),e("div",je,[m(k,{ref:"myForm",onSubmit:ne},{default:q(({errors:c})=>[e("div",qe,[e("div",Ae,[e("div",Ee,[Ne,m(i,{id:"name",modelValue:a.value.name,"onUpdate:modelValue":t[0]||(t[0]=s=>a.value.name=s),name:"name",label:"\u4EFB\u52D9\u540D\u7A31",type:"text",class:F(["form-control",{"is-invalid":c.name}]),rules:{required:!0}},null,8,["modelValue","class"]),m(l,{name:"name",class:"invalid-feedback"})])]),e("div",Ge,[e("div",Oe,[Pe,e("div",ze,[m(i,{as:"select",id:"taskGroupName",modelValue:a.value.task_group_id,"onUpdate:modelValue":t[1]||(t[1]=s=>a.value.task_group_id=s),name:"task_group_id",class:F(["form-select",{"is-invalid":c.task_group_id}]),label:"\u6240\u5C6C\u7FA4\u7D44",rules:{required:!0}},{default:q(()=>[(r(!0),d(C,null,L(D.value,s=>(r(),d("option",{key:s.id,value:s.id},y(s.name),9,De))),128))]),_:2},1032,["modelValue","class"]),m(f,{options:D.value,label:"name",class:"form-select position-absolute",modelValue:a.value.task_group_id,"onUpdate:modelValue":t[2]||(t[2]=s=>a.value.task_group_id=s),clearable:!1,reduce:s=>s.id,style:{border:"0",padding:"0",background:"white",width:"calc(100% - 2px)",left:"1px",top:"1px"}},{search:q(({attributes:s,events:u})=>[e("input",fe({class:"vs__search",required:!a.value.task_group_id},s,ke(u,!0)),null,16,Je)]),_:1},8,["options","modelValue","reduce"])]),m(l,{name:"task_group_id",class:"invalid-feedback"}),e("span",{class:F(["invalid-feedback",{"d-block":c.task_group_id}])},"\u6240\u5C6C\u7FA4\u7D44 \u70BA\u5FC5\u586B",2)])]),e("div",He,[e("div",Ke,[Qe,e("div",{class:"position-relative",ref_key:"imageLoadingRef",ref:ee},[e("input",{ref:"uploadTaskImageRef",type:"file",class:"form-control mb-2",accept:".png,.jpg,.jpeg",onChange:re},null,544)],512),m(i,{id:"image_url",modelValue:a.value.image_url,"onUpdate:modelValue":t[3]||(t[3]=s=>a.value.image_url=s),name:"image_url",label:"\u4EFB\u52D9\u5716\u7247",type:"text",disabled:Z.value,class:F(["form-control",{"is-invalid":c.image_url}]),rules:{required:!0}},null,8,["modelValue","disabled","class"]),m(l,{name:"image_url",class:"invalid-feedback"}),e("div",We,[a.value.image_url?(r(),d("img",{key:0,src:a.value.image_url,alt:"\u4EFB\u52D9\u5716\u7247",width:"300"},null,8,Xe)):(r(),d("div",Ye))])])]),e("div",Ze,[e("div",et,[tt,m(i,{id:"taskPoint",modelValue:a.value.rewarded_point,"onUpdate:modelValue":t[4]||(t[4]=s=>a.value.rewarded_point=s),modelModifiers:{number:!0},name:"rewarded_point",label:"\u4EFB\u52D9\u7A4D\u5206",type:"number",class:F(["form-control",{"is-invalid":c.rewarded_point}]),rules:{required:!0,min_value:10}},null,8,["modelValue","class"]),m(l,{name:"rewarded_point",class:"invalid-feedback"})])])]),e("div",st,[at,b(e("textarea",{class:"form-control",id:"abstract",placeholder:"","onUpdate:modelValue":t[5]||(t[5]=s=>a.value.abstract=s)},null,512),[[$,a.value.abstract]])]),e("div",ot,[lt,m(Ve,{ref_key:"editorRef",ref:R,content:a.value.description,modules:ye(Le)},null,8,["content","modules"])]),e("div",nt,[e("div",it,[e("div",rt,[Q("\u4EFB\u52D9\u6A19\u7C64 "),H.value.total>0?(r(),d("small",dt," \uFF5C\u5DF2\u8F09\u5165 "+y(J.value.length)+" \u500B / \u5171 "+y(H.value.total)+" \u500B",1)):E("",!0)]),e("div",ct,[e("ul",ut,[(r(!0),d(C,null,L(J.value,(s,u)=>(r(),d("li",{key:`group-${u}`,class:"list-item"},[e("div",_t,[b(e("input",{"onUpdate:modelValue":t[6]||(t[6]=_=>a.value.tag_ids=_),name:"tag_ids",id:s.id,class:"form-check-input",type:"checkbox",value:s.id},null,8,mt),[[N,a.value.tag_ids]]),e("label",{class:"form-check-label",for:s.id},y(s.name),9,pt)]),vt]))),128))])])])]),e("div",bt,[e("div",gt,[e("div",ht,[ft,e("div",kt,[e("div",yt,[wt,(r(!0),d(C,null,L(a.value.rewarded_skills,(s,u)=>(r(),d("div",{class:"input-group mb-3",key:`skill_${u}`},[b(e("input",{type:"text",class:"form-control","onUpdate:modelValue":_=>s.content=_,placeholder:"\u6280\u80FD\u63CF\u8FF0","aria-label":"\u6280\u80FD\u63CF\u8FF0","aria-describedby":"button-addon2"},null,8,xt),[[$,s.content]]),e("button",{class:"btn btn-outline-danger",type:"button",id:"button-addon2",onClick:_=>z("rewarded_skills",u)}," \u522A\u9664 ",8,Vt)]))),128)),e("button",{type:"button",class:"btn btn-sm btn-outline-primary",onClick:t[7]||(t[7]=s=>M("rewarded_skills"))}," \u65B0\u589E\u4E00\u5217 ")])])])]),e("div",Ut,[e("div",Tt,[Ct,e("div",Lt,[e("div",$t,[(r(!0),d(C,null,L(a.value.completion_criteria,(s,u)=>(r(),d("div",{class:"input-group mb-3",key:`complete_${u}`},[b(e("input",{type:"text",class:"form-control",placeholder:"\u5B8C\u6210\u689D\u4EF6","aria-label":"\u5B8C\u6210\u689D\u4EF6","onUpdate:modelValue":_=>s.content=_,"aria-describedby":"button-addon2"},null,8,It),[[$,s.content]]),e("button",{class:"btn btn-outline-danger",type:"button",id:"button-addon2",onClick:_=>z("completion_criteria",u)}," \u522A\u9664 ",8,St)]))),128)),e("button",{type:"button",class:"btn btn-sm btn-outline-primary",onClick:t[8]||(t[8]=s=>M("completion_criteria"))}," \u65B0\u589E\u4E00\u5217 ")])])])])]),Mt,Bt,e("div",Ft,[b(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[9]||(t[9]=s=>U.value=s),id:"task-has-level","true-value":!0,"false-value":!1},null,512),[[N,U.value]]),Rt]),U.value?(r(),d("div",jt,[(r(!0),d(C,null,L(a.value.level,(s,u)=>(r(),d("div",{class:"input-group mb-3",key:`level_${u}`},[b(e("input",{type:"text",class:"form-control",placeholder:"\u7B49\u7D1A\u5167\u5BB9","aria-label":"\u7B49\u7D1A\u5167\u5BB9","onUpdate:modelValue":_=>s.content=_,"aria-describedby":"button-addon2"},null,8,qt),[[$,s.content]]),e("button",{class:"btn btn-outline-danger",type:"button",id:"button-addon2",onClick:_=>z("level",u)}," \u522A\u9664 ",8,At)]))),128)),e("button",{type:"button",class:"btn btn-sm btn-outline-primary",onClick:t[10]||(t[10]=s=>M("level"))}," \u65B0\u589E\u4E00\u5217 ")])):E("",!0),Et,Nt,e("div",Gt,[b(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[11]||(t[11]=s=>T.value=s),id:"beforeStart","true-value":!0,"false-value":!1},null,512),[[N,T.value]]),Ot]),T.value?(r(),d("div",Pt,[zt,b(e("select",{class:"form-select",id:"predecessor_task_id","onUpdate:modelValue":t[12]||(t[12]=s=>a.value.predecessor_task_id=s),"aria-label":"Floating label select example"},[(r(!0),d(C,null,L(X.value,s=>(r(),d("option",{value:s.id,key:s.id},y(s.name),9,Dt))),128))],512),[[we,a.value.predecessor_task_id]])])):E("",!0),Jt,e("div",Ht,[e("div",Kt,[e("div",Qt,[Wt,b(e("input",{type:"date",class:"form-control",id:"task_start_at","onUpdate:modelValue":t[13]||(t[13]=s=>a.value.start_at=s),placeholder:""},null,512),[[$,a.value.start_at]])])]),e("div",Xt,[e("div",Yt,[Zt,b(e("input",{type:"date",class:"form-control",id:"task_expired_at","onUpdate:modelValue":t[14]||(t[14]=s=>a.value.expired_at=s),placeholder:""},null,512),[[$,a.value.expired_at]])])])]),e("div",es,[b(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[15]||(t[15]=s=>a.value.enable=s),id:"enable","true-value":!0,"false-value":!1},null,512),[[N,a.value.enable]]),ts]),e("div",ss,[e("div",as,[e("button",{type:"submit",class:"btn btn-lg btn-primary mt-2",disabled:Object.keys(c).length>0},[ls,Q(" "+y(p.type==="create"?"\u5EFA\u7ACB\u4EFB\u52D9":"\u5132\u5B58\u66F4\u65B0"),1)],8,os),Object.keys(c).length>0?(r(),d("p",ns," \u8ACB\u78BA\u8A8D\u4EFB\u52D9\u5FC5\u586B\u9805\u76EE\u662F\u5426\u586B\u5BEB\u5B8C\u6574\u3002 ")):E("",!0)])])]),_:1},512)])])}}};export{ps as default}; diff --git a/assets/TaskDetail.5b81e0f0.css b/assets/TaskDetail.5b81e0f0.css new file mode 100644 index 0000000..6a2fd90 --- /dev/null +++ b/assets/TaskDetail.5b81e0f0.css @@ -0,0 +1 @@ +@charset "UTF-8";.card-body-height{height:250px;overflow:hidden;overflow-y:auto}.nav-tabs .nav-link.active{background-color:#b0cc9759;color:#3d5950;font-weight:500}.preview-block{width:300px;height:157px;background-color:#b0cc9759;position:relative}.preview-block:after{content:"\8acb\4e0a\50b3\4e00\5f35\4efb\52d9\5716\7247";position:absolute;top:50%;left:50%;color:#3d5950;transform:translate(-50%,-50%);display:block}.task-detail .vs__dropdown-toggle{border:0!important} diff --git a/assets/TaskList.61046ad0.js b/assets/TaskList.61046ad0.js new file mode 100644 index 0000000..73ee0fd --- /dev/null +++ b/assets/TaskList.61046ad0.js @@ -0,0 +1 @@ +import{_ as K,D as Q,u as W,l as X,r,s as R,m as Y,o as Z,z as U,a as o,c as l,b as s,w as B,R as ss,A as b,f as L,v as ts,p as $,F as G,q as V,i as es,g as h,E as as,h as g,G as os,P as ls,S as ns,T as cs,x as is}from"./index.18edd2cb.js";/* empty css */import{a as ds}from"./task.8f86f14f.js";import{a as rs}from"./task-tags.fad0dc56.js";const u=f=>(ns("data-v-daeda8d6"),f=f(),cs(),f),_s={class:"task px-4 mt-4 position-relative"},us=u(()=>s("h1",{class:"fs-4 mb-0"},"\u4EFB\u52D9\u5217\u8868",-1)),ps={class:"d-flex align-items-center justify-content-between my-3"},ms={class:"row align-items-center w-75"},vs={class:"col-md-6"},gs=u(()=>s("option",{selected:"",value:"default"},"\u5168\u90E8\u4EFB\u52D9",-1)),hs=u(()=>s("option",{value:"task_group"},[h("\u4EE5"),s("b",null,"\u4EFB\u52D9\u7FA4\u7D44"),h("\u7BE9\u9078")],-1)),ks=u(()=>s("option",{value:"task_tags"},[h("\u4EE5"),s("b",null,"\u4EFB\u52D9\u6A19\u7C64"),h("\u7BE9\u9078")],-1)),ys=[gs,hs,ks],bs={key:0},fs={class:"row align-items-center w-75 my-3"},ws=u(()=>s("p",{class:"mb-1"},"\u5148\u9078\u64C7\u4EFB\u52D9\u7FA4\u7D44\u5F8C\uFF0C\u518D\u8F38\u5165\u4EFB\u52D9\u540D\u7A31\u3002",-1)),xs={class:"col-lg-6"},Ts={class:"col-lg-4"},Ls={class:"mb-0"},$s=["disabled"],Gs={key:1,class:"w-75 my-3"},Vs={class:"d-flex flex-wrap"},Cs=["onClick"],Ss={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},qs={class:"card-body p-0"},Ds={class:"table-responsive"},Ms={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},Rs=u(()=>s("thead",{class:"bg-light"},[s("tr",null,[s("th",{scope:"col",width:"60",class:"ps-4 py-3 text-muted border-0"}),s("th",{scope:"col",width:"130",class:"ps-4 py-3 text-muted border-0"}," \u5206\u985E\u7FA4\u7D44 "),s("th",{scope:"col",class:"py-3 text-muted border-0"},"\u540D\u7A31"),s("th",{scope:"col",class:"py-3 text-muted border-0"},"\u5206\u985E\u6A19\u7C64"),s("th",{scope:"col",class:"py-3 text-muted border-0"},"\u662F\u5426\u555F\u7528"),s("th",{scope:"col",class:"py-3 text-muted border-0"},"\u958B\u59CB\u6642\u9593"),s("th",{scope:"col",class:"py-3 text-muted border-0"},"\u5230\u671F\u6642\u9593"),s("th",{scope:"col",class:"py-3 text-muted pe-3 border-0"},"\u7DE8\u8F2F")])],-1)),Us={class:"text-nowrap"},Bs={scope:"row",class:"ps-4"},Es={scope:"row",class:"ps-4"},Is={scope:"row",class:"ps-2"},Ns=["onClick"],Ps={scope:"row",class:"ps-2"},zs={scope:"row",class:"ps-2"},As={key:0,class:"text-success"},js={key:1,class:"text-muted"},Fs={scope:"row",class:"ps-2"},Os={key:0},Hs={key:1,class:"text-muted"},Js={scope:"row",class:"ps-2"},Ks={key:0},Qs={key:1,class:"text-muted"},Ws={class:"pe-3"},Xs=u(()=>s("span",{class:"material-icons align-middle fs-6"}," edit ",-1)),Ys=u(()=>s("span",{class:"material-icons align-middle fs-6"}," content_copy ",-1)),Zs={key:0,class:"card-footer bg-white py-3"},st={class:"d-flex flex-wrap align-items-start"},tt={__name:"TaskList",setup(f){const{apiGetTaskGroupsList:E,apiGetTasks:I}=ds,{apiGetTaskTags:N}=rs,x=Q.useLoading(),C=W(),w=X(),T=r([]),d=r(null),p=r({current_page:1,total_page:1}),k=async(e=1)=>{var i,v,t,y;const a=x.show();try{const{tasks:c,pagination:J}=await I({count:20,page:e,scoped:d.value});T.value=c,p.value=J}catch(c){is("danger","\u53D6\u5F97\u4EFB\u52D9\u5217\u8868\u5931\u6557",`${(v=(i=c==null?void 0:c.response)==null?void 0:i.data)==null?void 0:v.statusCode}:${(y=(t=c==null?void 0:c.response)==null?void 0:t.data)==null?void 0:y.message}`)}finally{a.hide()}},P=r([]);R(T,e=>{const a=e.map(i=>i.category);P.value=[...new Set(a)]});const _=r("default"),S=r([]),q=r(!1),z=async()=>{const e=x.show(),{task_groups:a}=await E({page:1,count:150});S.value=a,q.value=!0,e.hide()},D=r([]),M=r(!1),A=async()=>{const e=x.show(),{task_tags:a}=await N({page:1,count:150});D.value=a,M.value=!0,e.hide()};R(_,async e=>{e==="task_group"&&!q.value&&await z(),e==="task_tags"&&!M.value&&await A(),e==="default"&&(d.value="",C.replace({name:"TaskList",query:{}}),k())});const j=e=>{k(e),C.replace({name:"TaskList",query:{}})},n=Y({task_group_id:"",task_name:"",task_tags:""}),F=()=>{d.value=`&filter=${_.value}&task_group_id=${n.task_group_id}`,n.task_name&&(d.value+=`&task_name=${n.task_name}`),k()};Z(async()=>{var e,a,i,v;((e=w.query)==null?void 0:e.filter)==="task_group"&&(_.value="task_group",n.task_group_id=(a=w.query)==null?void 0:a.task_group_id,n.task_name=(i=w.query)==null?void 0:i.task_name,d.value=`&filter=${_.value}&task_group_id=${n.task_group_id}`,n.task_name&&(d.value+=`&task_name=${n.task_name}`)),await k(((v=w.query)==null?void 0:v.page)||1)});const m=r([]),O=e=>{m.value.includes(e)?m.value=m.value.filter(a=>a!==e):m.value.push(e),m.value.length>0?(n.task_tags=m.value.join(","),d.value=`&filter=${_.value}&task_tags=${n.task_tags}`,k()):(d.value=null,k())},H=e=>{window.open(`https://rpg.hexschool.com/#/tasks/${e}?preview=1`,"_blank")};return(e,a)=>{const i=U("router-link"),v=U("v-select");return o(),l("div",_s,[us,s("div",ps,[s("div",ms,[s("div",vs,[B(s("select",{class:"form-select w-100",placeholder:"\u9078\u64C7\u8981\u7BE9\u9078\u7684\u985E\u5225","onUpdate:modelValue":a[0]||(a[0]=t=>_.value=t)},ys,512),[[ss,_.value]])])]),b(i,{to:"/admin/task/list/create",class:"btn btn-primary"},{default:L(()=>[h(" \u65B0\u589E\u4EFB\u52D9 ")]),_:1})]),_.value==="task_group"?(o(),l("div",bs,[s("div",fs,[ws,s("div",xs,[b(v,{modelValue:n.task_group_id,"onUpdate:modelValue":a[1]||(a[1]=t=>n.task_group_id=t),options:S.value,label:"name",clearable:!1,reduce:t=>t.id},null,8,["modelValue","options","reduce"])]),s("div",Ts,[s("div",Ls,[B(s("input",{id:"search","onUpdate:modelValue":a[2]||(a[2]=t=>n.task_name=t),type:"text",placeholder:"\u641C\u5C0B\u4EFB\u52D9\uFF08\u540D\u7A31\uFF09",class:"form-control",disabled:!n.task_group_id},null,8,$s),[[ts,n.task_name]])])])]),s("div",{class:"mb-4"},[s("button",{type:"button",class:"btn btn-primary",onClick:F}," \u641C\u5C0B ")])])):$("",!0),_.value==="task_tags"?(o(),l("div",Gs,[s("div",Vs,[(o(!0),l(G,null,V(D.value,t=>(o(),l("button",{key:t.id,type:"button",onClick:y=>O(t.id),class:as([{active:m.value.includes(t.id)},"btn btn-sm btn-outline-primary custom-btn-tag border-0 mx-2 mb-1"])},g(t.name),11,Cs))),128))])])):$("",!0),s("div",Ss,[s("div",qs,[s("div",Ds,[s("table",Ms,[Rs,s("tbody",Us,[(o(!0),l(G,null,V(T.value,(t,y)=>(o(),l("tr",{key:t.id,class:"align-middle"},[s("td",Bs,g((p.value.current_page-1)*20+(y+1)),1),s("td",Es,g(t.task_group_name),1),s("td",Is,[s("a",{href:"#",onClick:os(c=>H(t.id),["prevent"])},g(t.name),9,Ns)]),s("td",Ps,[(o(!0),l(G,null,V(t.tags,c=>(o(),l("span",{key:c,class:"badge bg-light text-dark me-1"},g(c),1))),128))]),s("td",zs,[t.enable?(o(),l("span",As,"\u662F")):(o(),l("span",js,"\u5426"))]),s("td",Fs,[t.start_at?(o(),l("span",Os,g(new Date(t.start_at).toLocaleDateString("sv-SE")),1)):(o(),l("span",Hs,"\u672A\u8A2D\u5B9A"))]),s("td",Js,[t.expired_at?(o(),l("span",Ks,g(new Date(t.expired_at).toLocaleDateString("sv-SE")),1)):(o(),l("span",Qs,"\u672A\u8A2D\u5B9A"))]),s("td",Ws,[b(i,{to:`/admin/task/list/${t.id}?page=${p.value.current_page}${d.value?d.value:""}`,class:"btn btn-sm btn-outline-gray"},{default:L(()=>[Xs,h(" \u7DE8\u8F2F ")]),_:2},1032,["to"]),b(i,{to:`/admin/task/list/create?task_copy_id=${t.id}`,class:"btn btn-sm btn-outline-gray ms-1"},{default:L(()=>[Ys,h(" \u8907\u88FD ")]),_:2},1032,["to"])])]))),128))])])])]),p.value.total_page>1?(o(),l("div",Zs,[s("div",st,[b(es(ls),{modelValue:p.value.current_page,"onUpdate:modelValue":a[3]||(a[3]=t=>p.value.current_page=t),records:p.value.total,"per-page":10,options:{chunk:6},onPaginate:j},null,8,["modelValue","records"])])])):$("",!0)])])}}},ct=K(tt,[["__scopeId","data-v-daeda8d6"]]);export{ct as default}; diff --git a/assets/TaskList.7a05c82b.css b/assets/TaskList.7a05c82b.css new file mode 100644 index 0000000..3786661 --- /dev/null +++ b/assets/TaskList.7a05c82b.css @@ -0,0 +1 @@ +.custom-btn-tag[data-v-daeda8d6]{background-color:#f8f9fa;color:var(--bs-dark-rgb)}.custom-btn-tag[data-v-daeda8d6]:hover{background-color:#ececec}.custom-btn-tag.active[data-v-daeda8d6]{background-color:var(--bs-dark);color:#f8f9fa} diff --git a/assets/Title.6dabcd7d.js b/assets/Title.6dabcd7d.js new file mode 100644 index 0000000..c64eab3 --- /dev/null +++ b/assets/Title.6dabcd7d.js @@ -0,0 +1 @@ +import{a as C}from"./assistant.75b6582c.js";import{r as d,s as F,z as f,a as h,e as A,f as y,A as l,b as e,E as v,M as B,D,o as V,B as q,c as x,F as R,q as z,x as k,$ as E,g as M,h as w}from"./index.18edd2cb.js";const N={class:"mb-3"},U=e("label",{for:"addTitle",class:"form-label text-dark"},"\u7A31\u865F",-1),S={class:"mb-3"},j=e("label",{for:"titleLevel",class:"form-label text-dark"},"\u7B49\u7D1A",-1),O={class:"mb-3"},G=e("label",{for:"titleColor",class:"form-label text-dark"},"\u4EE3\u8868\u8272",-1),P={class:"mb-3"},H=e("label",{for:"titleDescription",class:"form-label text-dark"},"\u63CF\u8FF0",-1),I=["disabled"],J={__name:"CreateTitleModal",props:{tempTitle:{type:Object,default(){return{}}}},emits:["createTitleMethod"],setup($,{expose:g,emit:r}){const _=$,{apiPostAssistantTitleDetail:b}=C,m=d(),s=d({}),u=d(null);F(()=>_.tempTitle.name,()=>{s.value=_.tempTitle});const T=async()=>{try{const n={name:s.value.name,level:Number(s.value.level),color_code:s.value.color_code,description:s.value.description};await b(n),r("createTitleMethod",{target:"import",type:"\u6210\u529F"}),m.value.resetForm()}catch(n){r("createTitleMethod",{target:"import",type:"\u5931\u6557",error:`${n.response.data.statusCode}:${n.response.data.message}`})}};return g({createTitleModalRef:u}),(n,t)=>{const o=f("Field"),c=f("ErrorMessage"),a=f("VForm");return h(),A(a,{ref_key:"refs",ref:m,onSubmit:T},{default:y(({errors:p,meta:L})=>[l(B,{ref_key:"createTitleModalRef",ref:u,"has-footer":!0,title:"\u65B0\u589E\u52A9\u6559\u7A31\u865F","class-list":""},{body:y(()=>[e("div",N,[U,l(o,{id:"addTitle",modelValue:s.value.name,"onUpdate:modelValue":t[0]||(t[0]=i=>s.value.name=i),name:"\u7A31\u865F",type:"text",class:v(["form-control",{"is-invalid":p.\u7A31\u865F}]),rules:"required"},null,8,["modelValue","class"]),l(c,{name:"\u7A31\u865F",class:"invalid-feedback"})]),e("div",S,[j,l(o,{id:"titleLevel",modelValue:s.value.level,"onUpdate:modelValue":t[1]||(t[1]=i=>s.value.level=i),name:"\u7B49\u7D1A",type:"text",class:v(["form-control",{"is-invalid":p.\u7B49\u7D1A}]),rules:"required|numeric"},null,8,["modelValue","class"]),l(c,{name:"\u7B49\u7D1A",class:"invalid-feedback"})]),e("div",O,[G,l(o,{id:"titleColor",modelValue:s.value.color_code,"onUpdate:modelValue":t[2]||(t[2]=i=>s.value.color_code=i),name:"\u4EE3\u8868\u8272",type:"color",class:v(["form-control form-control-color",{"is-invalid":p.\u4EE3\u8868\u8272}]),rules:"required"},null,8,["modelValue","class"]),l(c,{name:"\u4EE3\u8868\u8272",class:"invalid-feedback"})]),e("div",P,[H,l(o,{id:"titleDescription",modelValue:s.value.description,"onUpdate:modelValue":t[3]||(t[3]=i=>s.value.description=i),as:"textarea",name:"\u63CF\u8FF0",type:"text",class:v(["form-control",{"is-invalid":p.\u63CF\u8FF0}]),rules:"required"},null,8,["modelValue","class"]),l(c,{name:"\u63CF\u8FF0",class:"invalid-feedback"})])]),footer:y(()=>[e("button",{type:"submit",disabled:!L.valid,class:"btn btn-primary"}," \u5EFA\u7ACB ",8,I)]),_:2},1536)]),_:1},512)}}},K={class:"about px-4 mt-4 position-relative"},Q={class:"d-flex align-items-center justify-content-between"},W=e("h1",{class:"fs-4 mb-0"}," \u52A9\u6559\u7A31\u865F ",-1),X=e("hr",null,null,-1),Y={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Z={class:"card-body p-0"},ee={class:"table-responsive"},te={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},se=e("thead",{class:"bg-light"},[e("tr",null,[e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"}," \u7A31\u865F "),e("th",{scope:"col",class:"py-3 text-muted border-0"}," \u7B49\u7D1A "),e("th",{scope:"col",class:"py-3 text-muted pe-3 border-0"}," \u7DE8\u8F2F ")])],-1),oe={class:"text-nowrap"},le={scope:"row",class:"ps-4"},ae={class:"pe-3"},ne=e("span",{class:"material-icons align-middle fs-6"}," edit",-1),ie=["onClick"],de=e("span",{class:"material-icons align-middle fs-6"}," content_copy ",-1),me={__name:"Title",setup($){const{apiGetAssistantsTitles:g}=C,r=d(""),_=D.useLoading(),b=d([]),m=async()=>{const t=_.show();try{const{assistant_titles:o}=await g();b.value=o}catch(o){k("danger","\u53D6\u5F97\u52A9\u6559\u7A31\u865F\u5217\u8868\u5931\u6557",`${o.response.data.statusCode}:${o.response.data.message}`)}finally{t.hide()}};V(m);const s=d({}),u=(t,o)=>{t==="copy"?s.value={...o}:t==="add"&&(s.value={}),r.value.show()},T=t=>{t.type==="\u6210\u529F"?k("success","\u5EFA\u7ACB\u52A9\u6559\u7A31\u865F\u6210\u529F","\u5DF2\u6210\u529F\u5EFA\u7ACB\u52A9\u6559\u7A31\u865F"):t.type==="\u5931\u6557"&&k("danger","\u5EFA\u7ACB\u52A9\u6559\u7A31\u865F\u5931\u6557",t.error),r.value.hide(),m()},n=d(null);return V(()=>{r.value=new q(n.value.createTitleModalRef.hModal)}),(t,o)=>{const c=f("router-link");return h(),x("div",K,[e("header",Q,[W,e("button",{type:"button",class:"btn btn-primary",onClick:o[0]||(o[0]=a=>u("add"))}," \u65B0\u589E\u7A31\u865F ")]),X,e("div",Y,[e("div",Z,[e("div",ee,[e("table",te,[se,e("tbody",oe,[(h(!0),x(R,null,z(b.value,a=>(h(),x("tr",{key:a.id,class:"align-middle"},[e("td",le,[e("span",{class:"d-inline-block rounded-pill",style:E([{width:"10px",height:"10px"},`background-color:${a.color_code}`])},null,4),M(" "+w(a.name),1)]),e("td",null,w(a.level),1),e("td",ae,[l(c,{to:`/admin/assistants/title/${a.id}`,class:"btn btn-sm btn-outline-gray me-2"},{default:y(()=>[M(" \u7DE8\u8F2F"),ne]),_:2},1032,["to"]),e("button",{type:"button",class:"btn btn-sm btn-outline-gray me-2",onClick:p=>u("copy",a)},[M(" \u8907\u88FD"),de],8,ie)])]))),128))])])])])]),l(J,{ref_key:"createTitleModalComponentRef",ref:n,"temp-title":s.value,onCreateTitleMethod:T},null,8,["temp-title"])])}}};export{me as default}; diff --git a/assets/TitleDetail.1a506190.js b/assets/TitleDetail.1a506190.js new file mode 100644 index 0000000..10ae1a4 --- /dev/null +++ b/assets/TitleDetail.1a506190.js @@ -0,0 +1 @@ +import{t as I,r as m,o as $,B as L,j as R,a as U,e as q,f as w,b as e,h as _,i as p,w as F,v as j,M as N,D as S,l as z,u as O,z as V,c as G,A as o,x as v,g as P,E as k}from"./index.18edd2cb.js";import{a as H}from"./assistant.75b6582c.js";const J={class:"mb-4"},K={for:"title"},Q=["disabled"],W={__name:"DangerActionsModal",props:{body:{type:Object,default(){return{userId:String,type:String}}}},emits:["danger-user-method"],setup(A,{expose:x,emit:T}){const d=I(A,"body"),r=m(""),b=m(null),t=m(null);$(()=>{b.value=new L(t.value.hModal),t.value.hModal.addEventListener("hidden.bs.modal",()=>{r.value=""})});const i=R(()=>{const{type:c}=d.value;return c==="deleteTitle"?{title:"\u662F\u5426\u522A\u9664\u4EE5\u4E0B\u52A9\u6559\u7A31\u865F\uFF1F",body:{label:"\u8ACB\u518D\u6B21\u8F38\u5165\u52A9\u6559\u7A31\u865F",btn:"\u522A\u9664"}}:{body:{}}}),f=()=>{b.value.show()},h=()=>{b.value.hide()},D=()=>{const{type:c,userId:u}=d.value;T("danger-user-method",{userId:u,type:c})};return x({openModal:f,hideModal:h}),(c,u)=>(U(),q(N,{id:"userDangerActions",ref_key:"myModal",ref:t,"has-footer":!0,title:p(i).title},{body:w(()=>[e("p",J,_(p(d).name),1),e("label",K,_(p(i).body.label),1),F(e("input",{id:"title","onUpdate:modelValue":u[0]||(u[0]=l=>r.value=l),type:"text",class:"form-control"},null,512),[[j,r.value]])]),footer:w(()=>[e("button",{type:"button",class:"btn btn-primary",onClick:h},"\u53D6\u6D88"),e("button",{disabled:r.value!==p(d).name,type:"button",class:"btn btn-danger",onClick:D},_(p(i).body.btn),9,Q)]),_:1},8,["title"]))}},X={class:"about px-4 mt-4"},Y={"aria-label":"breadcrumb"},Z={class:"breadcrumb"},ee={class:"breadcrumb-item"},te=e("li",{class:"breadcrumb-item active","aria-current":"page"}," \u7DE8\u8F2F\u52A9\u6559\u7A31\u865F ",-1),se=e("h1",{class:"fs-4 mb-0"},"\u7DE8\u8F2F\u52A9\u6559\u7A31\u865F",-1),ae=e("hr",null,null,-1),oe={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},le={class:"card-header bg-white py-3"},ne={class:"fs-6 mb-0 lh-base"},de={class:"mb-0"},ie={class:"card-body"},re={class:"mb-3"},ce=e("label",{for:"name",class:"form-label"},"\u7A31\u865F",-1),ue={class:"mb-3"},me=e("label",{for:"level",class:"form-label"},"\u7B49\u7D1A",-1),be={class:"mb-3"},pe=e("label",{for:"colorCode",class:"form-label"},"\u4EE3\u8868\u8272",-1),ve={class:"mb-3"},_e=e("label",{for:"description",class:"form-label"},"\u63CF\u8FF0",-1),fe={class:"card-footer bg-white py-3 d-flex justify-content-between"},he=["disabled"],Me={__name:"TitleDetail",setup(A){const{apiGetAssistantTitleDetail:x,apiPutAssistantTitleDetail:T,apiDeleteAssistantTitle:C}=H,d=S.useLoading(),r=z(),b=O(),t=m({}),i=m(null),f=m({}),h=({type:l,name:s})=>{i.value.openModal(),f.value={type:l,name:s}},D=async({type:l})=>{try{l==="deleteTitle"&&await C(t.value.id),v("success","\u5371\u96AA\u64CD\u4F5C\u6210\u529F\uFF0C3 \u79D2\u5F8C\u8DF3\u56DE\u52A9\u6559\u7A31\u865F, \u52A9\u6559\u7A31\u865F\u5DF2\u7D93\u88AB\u522A\u9664\u3002"),setTimeout(()=>{b.push("/admin/assistants/title")},3e3)}catch(s){v("danger","\u5371\u96AA\u64CD\u4F5C\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u64CD\u4F5C",s)}finally{i.value.hideModal()}},c=async l=>{const s=d.show();try{const a={name:t.value.name,level:t.value.level,color_code:t.value.color_code,description:t.value.description};await T(l,a),v("success","\u66F4\u65B0\u6210\u529F","\u5DF2\u6210\u529F\u66F4\u65B0\u52A9\u6559\u7A31\u865F")}catch(a){v("danger","\u64CD\u4F5C\u5931\u6557",`${a.response.data.statusCode}:${a.response.data.message}`)}finally{s.hide()}},u=async l=>{const s=d.show();try{const{assistant_title_info:a}=await x(l);t.value=a}catch(a){v("danger","\u53D6\u5F97\u52A9\u6559\u7A31\u865F\u5931\u6557",`${a.response.data.statusCode}:${a.response.data.message}`)}finally{s.hide()}};return $(()=>{u(r.params.id)}),(l,s)=>{const a=V("router-link"),y=V("Field"),g=V("ErrorMessage"),B=V("VForm");return U(),G("div",X,[e("header",null,[e("nav",Y,[e("ol",Z,[e("li",ee,[o(a,{to:"/admin/assistants/title"},{default:w(()=>[P(" \u52A9\u6559\u7A31\u865F ")]),_:1})]),te])]),se,ae]),o(B,{ref:"refs"},{default:w(({errors:M,meta:E})=>[e("div",oe,[e("div",le,[e("h2",ne,_(t.value.name),1),e("p",de,[e("small",null,"\u76EE\u524D\u5171\u6709 "+_(t.value.apply_count)+" \u4EBA\u5957\u7528\u6B64\u7A31\u865F",1)])]),e("div",ie,[e("div",re,[ce,o(y,{id:"name",modelValue:t.value.name,"onUpdate:modelValue":s[0]||(s[0]=n=>t.value.name=n),name:"\u7A31\u865F",type:"text",class:k(["form-control",{"is-invalid":M.\u7A31\u865F}]),rules:"required"},null,8,["modelValue","class"]),o(g,{name:"\u7A31\u865F",class:"invalid-feedback"})]),e("div",ue,[me,o(y,{id:"level",modelValue:t.value.level,"onUpdate:modelValue":s[1]||(s[1]=n=>t.value.level=n),name:"\u7B49\u7D1A",type:"text",class:k(["form-control",{"is-invalid":M.\u7B49\u7D1A}]),rules:"required|numeric"},null,8,["modelValue","class"]),o(g,{name:"\u7B49\u7D1A",class:"invalid-feedback"})]),e("div",be,[pe,o(y,{id:"colorCode",modelValue:t.value.color_code,"onUpdate:modelValue":s[2]||(s[2]=n=>t.value.color_code=n),name:"\u4EE3\u8868\u8272",type:"color",class:k(["form-control form-control-color",{"is-invalid":M.\u4EE3\u8868\u8272}]),rules:"required"},null,8,["modelValue","class"]),o(g,{name:"\u4EE3\u8868\u8272",class:"invalid-feedback"})]),e("div",ve,[_e,o(y,{id:"description",modelValue:t.value.description,"onUpdate:modelValue":s[3]||(s[3]=n=>t.value.description=n),as:"textarea",name:"\u63CF\u8FF0",type:"text",class:k(["form-control",{"is-invalid":M.\u63CF\u8FF0}]),rules:"required"},null,8,["modelValue","class"]),o(g,{name:"\u63CF\u8FF0",class:"invalid-feedback"})])]),e("div",fe,[e("button",{type:"button",class:"btn btn-outline-danger",onClick:s[4]||(s[4]=n=>h({type:"deleteTitle",name:t.value.name}))}," \u522A\u9664 "),e("button",{type:"button",disabled:!E.valid,class:"btn btn-primary",onClick:s[5]||(s[5]=n=>c(t.value.id))}," \u66F4\u65B0 ",8,he)])])]),_:1},512),o(W,{ref_key:"dangerActionsModalRef",ref:i,body:f.value,onDangerUserMethod:D},null,8,["body"])])}}};export{Me as default}; diff --git a/assets/TrainingDetail.0132ccae.css b/assets/TrainingDetail.0132ccae.css new file mode 100644 index 0000000..dd6acf6 --- /dev/null +++ b/assets/TrainingDetail.0132ccae.css @@ -0,0 +1 @@ +[data-v-50d0b977] .content img{max-width:100%;display:block}[data-v-50d0b977] .content code,[data-v-50d0b977] .content pre{background-color:#f0f0f0;padding:2px;border-radius:3px}[data-v-50d0b977] .content pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}[data-v-50d0b977] .content pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.custom-form-check-input[data-v-3a8382f7]{font-size:22px;transform:translateY(50%)}.form-check-input[data-v-3a8382f7]:checked{background-color:#fff;border-color:var(--bs-success);border-width:2px}.form-check-input:checked[type=radio][data-v-3a8382f7]{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%232A8356'/%3e%3c/svg%3e")}.checked .form-check-label[data-v-3a8382f7],.checked .btn-link[data-v-3a8382f7]{color:var(--bs-success)}.form-check-label[data-v-3a8382f7]:hover,.form-check-label:hover+.btn-link[data-v-3a8382f7]{color:var(--bs-success);cursor:pointer}.list-group[data-v-a71f8236]{border-radius:0}.list-group-item[data-v-a71f8236]{border:none}.list-group-item.active[data-v-a71f8236],.list-group-item[data-v-a71f8236]:hover{background-color:#edf0ef;color:#00251a}.cursor-grabbing[data-v-93322c6e]{cursor:grabbing!important}.cursor-not-allowed[data-v-93322c6e]{cursor:not-allowed!important}.ghost[data-v-93322c6e]{opacity:.5;background:#c8ebfb}.drag[data-v-93322c6e]{height:74px!important;border:1px solid var(--bs-primary)!important;border-radius:var(--bs-border-radius)!important}input[type=radio][data-v-162f359f]{visibility:hidden}input[data-v-1b46ba3d]{padding-top:9px;padding-bottom:9px}.inputFile[data-v-1b46ba3d]{position:relative}.inputFile[data-v-1b46ba3d]::-webkit-file-upload-button{position:absolute;top:0;bottom:0;right:-13px;background-color:#3d5950;color:#fff}.inputFile[data-v-1b46ba3d]:hover::-webkit-file-upload-button{background-color:#314740!important} diff --git a/assets/TrainingDetail.da056f6e.js b/assets/TrainingDetail.da056f6e.js new file mode 100644 index 0000000..c0e549f --- /dev/null +++ b/assets/TrainingDetail.da056f6e.js @@ -0,0 +1,10 @@ +import{r as W,s as Pn,z as ie,a as B,c as k,A as H,f as Rt,b as d,E as Dt,h as Ct,x as ct,_ as He,D as on,o as le,F as Vt,q as te,w as ye,a5 as fn,i as _t,p as It,e as ae,M as Me,B as Le,S as rn,T as sn,g as _e,v as ya,a6 as La,u as Na,m as Tn,G as Ae,a7 as Fa,a8 as ja,a0 as Ua,N as Va,V as Ga,U as Yt,l as ba,j as Sa,Z as Pe,a3 as ta,C as Ba,a2 as Ka,R as ea,d as na}from"./index.18edd2cb.js";import{a as ln}from"./training.1136c2ba.js";import{f as Hn,a as Wn}from"./date.27781dd8.js";import{_ as Ha}from"./Editor.925d2886.js";import{b as Wa}from"./bsTab.2b88d9c2.js";/* empty css */import"./tab.68fa44ea.js";const ka={class:"rounded-4 border border-1 border-custom-color p-4"},Xa={class:"row"},Ya={class:"col-md-6"},za={class:"mb-3"},Ja=d("label",{for:"title",class:"form-label"},"\u6D3B\u52D5\u540D\u7A31",-1),Za={class:"row"},Qa={class:"col-md-6"},_a={class:"mb-3"},qa=d("label",{for:"start_at",class:"form-label"},"\u958B\u59CB\u6642\u9593",-1),to={class:"col-md-6"},eo={class:"mb-3"},no=d("label",{for:"end_at",class:"form-label"},"\u7D50\u675F\u6642\u9593",-1),ao={class:"d-flex justify-content-end mt-3"},oo=["disabled"],aa={__name:"CalendarCreate",props:{id:{type:String,default:""},editData:{type:Object,default:()=>({})}},emits:["refresh","close"],setup(r,{emit:e}){const a=r,{apiPostTrainingCalendar:s,apiPutTrainingCalendar:n}=ln,c=W(null),t=W(""),o=W({name:"",start_at:"",end_at:"",content:""});Pn(()=>a.editData,f=>{f.id&&(t.value=f.id,o.value={name:f.name,start_at:f.start_at,end_at:f.end_at,content:f.content})},{deep:!0});const i=W(null),l=()=>{i.value.resetForm(),e("close")},u=async()=>{const f=t.value!==""?"\u66F4\u65B0":"\u5EFA\u7ACB";o.value.content=c.value.editorContent,o.value.start_at=Hn(o.value.start_at),o.value.end_at=Hn(o.value.end_at);try{t.value!==""?await n(a.id,t.value,o.value):await s(a.id,o.value),ct("success",`\u884C\u4E8B\u66C6${f}\u6210\u529F`,`${o.value.name}\u5DF2\u7D93${f}\u6210\u529F`),e("refresh")}catch(v){const h=v.response.data;ct("danger",`\u884C\u4E8B\u66C6${f}\u5931\u6557`,`${h.statusCode}: ${h.message}`)}l()};return(f,v)=>{const h=ie("Field"),p=ie("ErrorMessage"),y=ie("VForm");return B(),k("div",ka,[H(y,{ref_key:"formRef",ref:i,onSubmit:u},{default:Rt(({errors:m,meta:g})=>[d("div",Xa,[d("div",Ya,[d("div",za,[Ja,H(h,{id:"title",name:"title",label:"\u57F9\u8A13\u73ED\u540D\u7A31",type:"text",class:Dt([{"is-invalid":m.title},"form-control"]),modelValue:o.value.name,"onUpdate:modelValue":v[0]||(v[0]=x=>o.value.name=x),placeholder:"ex: Vue \u76F4\u64AD\u73ED 2022 \u6625\u5B63\u73ED",rules:"required"},null,8,["class","modelValue"]),H(p,{name:"title",class:"invalid-feedback"})])])]),d("div",Za,[d("div",Qa,[d("div",_a,[qa,H(h,{id:"start_at",name:"start_at",label:"\u958B\u59CB\u6642\u9593",type:"datetime-local",modelValue:o.value.start_at,"onUpdate:modelValue":v[1]||(v[1]=x=>o.value.start_at=x),class:Dt([{"is-invalid":m.start_at},"form-control"]),placeholder:"ex: Vue \u76F4\u64AD\u73ED 2022 \u6625\u5B63\u73ED",rules:"required","format-value":"yyyy-MM-ddTHH:mm"},null,8,["modelValue","class"]),H(p,{name:"start_at",class:"invalid-feedback"})])]),d("div",to,[d("div",eo,[no,H(h,{id:"end_at",name:"end_at",label:"\u7D50\u675F\u6642\u9593",type:"datetime-local",class:Dt([{"is-invalid":m.end_at},"form-control"]),modelValue:o.value.end_at,"onUpdate:modelValue":v[2]||(v[2]=x=>o.value.end_at=x),rules:"required","format-value":"yyyy-MM-ddTHH:mm"},null,8,["class","modelValue"]),H(p,{name:"end_at",class:"invalid-feedback"})])])]),d("div",null,[H(Ha,{ref_key:"editorComponentRef",ref:c,content:o.value.content},null,8,["content"])]),d("div",ao,[d("button",{type:"button",class:"btn btn-outline-secondary me-2",onClick:l}," \u53D6\u6D88 "),d("button",{type:"submit",class:"btn btn-primary",disabled:!g.valid},Ct(t.value!==""?"\u66F4\u65B0":"\u78BA\u8A8D\u65B0\u589E"),9,oo)])]),_:1},512)])}}};const Ne=r=>(rn("data-v-50d0b977"),r=r(),sn(),r),ro={class:"mb-5"},so={class:"table-responsive mb-3"},io={class:"table custom-table-style mb-0"},lo=Ne(()=>d("thead",null,[d("tr",{class:"text-nowrap bg-soft border-0"},[d("th",null,"\u6A19\u984C"),d("th",{width:"150"}),d("th",{width:"200"},"\u6D3B\u52D5\u6642\u9593"),d("th",{width:"150"})])],-1)),co={class:"text-nowrap"},uo=["onClick"],fo={class:"mt-2"},vo={key:0,colspan:"4",class:"border-0"},ho=["onClick"],po=["onClick"],mo={key:0,class:"text-center"},go=Ne(()=>d("span",{class:"material-icons align-bottom"}," add ",-1)),yo=[go],bo=Ne(()=>d("p",{class:"text-dark mb-2"},"\u6D3B\u52D5\u6A19\u984C",-1)),So={class:"text-primary"},xo={class:"d-flex mt-3"},Eo={class:"col-md-6"},Co=Ne(()=>d("p",{class:"text-dark mb-2"},"\u6D3B\u52D5\u958B\u59CB\u6642\u9593",-1)),To={class:"text-primary"},$o={class:"col-md-6"},Oo=Ne(()=>d("p",{class:"text-dark mb-2"},"\u6D3B\u52D5\u7D50\u675F\u6642\u9593",-1)),Io={class:"text-primary"},Do={class:"mt-3"},wo=Ne(()=>d("p",{class:"text-dark mb-2"},"\u6D3B\u52D5\u5167\u5BB9\u63CF\u8FF0",-1)),Po=["innerHTML"],Ao={class:"h4 text-dark mb-3 fw-bold"},Ro=Ne(()=>d("p",{class:"text-danger mb-2"},"\u8ACB\u6CE8\u610F\uFF01\u522A\u9664\u5F8C\u5C07\u7121\u6CD5\u5FA9\u539F",-1)),Mo={class:"d-flex justify-content-end"},Lo={__name:"Calendar",props:{trainingId:{type:String,required:!0}},setup(r,{expose:e}){const a=r,{apiGetTrainingCalendar:s,apiGetTrainingCalendarDetail:n,apiDeleteTrainingCalendar:c}=ln,t=on.useLoading(),o=W([]),i=W({}),l=W(null),u=W(null),f=W(null),v=W(null);le(()=>{f.value=new Le(l.value.hModal),v.value=new Le(u.value.hModal)});const p=()=>{f.value.show()};e({openModal:p,hideModal:()=>{f.value.hide(),i.value={}}});const m=async()=>{const j=t.show(),{calendar:D}=await s(a.trainingId);o.value=D,j.hide()};le(()=>{m()});const g=async j=>{const D=t.show(),{calendar:w}=await n(a.trainingId,j);i.value=w,D.hide()},x=async j=>{await g(j),p()},b=W({name:"",id:""}),E=async j=>{const D=t.show();try{await c(a.trainingId,j),ct("success","\u522A\u9664\u6210\u529F",`${b.value.name}\u5DF2\u7D93\u522A\u9664\u6210\u529F`),m()}catch(w){const X=w.response.data;ct("danger","\u522A\u9664\u5931\u6557",`${X.statusCode}: ${b.value.name}\u522A\u9664\u5931\u6557\uFF5C${X.message}`)}D.hide(),v.value.hide()},I=j=>{v.value.show(),b.value=o.value.find(D=>D.id===j)},C=W(""),N=W(""),R=W({});function S(j){const D=new Date(j),w=D.getFullYear(),X=(D.getMonth()+1).toString().padStart(2,"0"),L=D.getDate().toString().padStart(2,"0"),Y=D.getHours().toString().padStart(2,"0"),st=D.getMinutes().toString().padStart(2,"0");return`${w}-${X}-${L}T${Y}:${st}`}const P=async j=>{await g(j),R.value={id:j,name:i.value.name,start_at:S(i.value.start_at),end_at:S(i.value.end_at),content:i.value.content}},M=(j="",D="")=>{C.value=j,N.value=D,j==="edit"?P(D):(R.value={name:"",start_at:"",end_at:"",content:""},setTimeout(()=>{window.scrollTo(0,document.body.scrollHeight)},300))};return(j,D)=>(B(),k(Vt,null,[d("div",ro,[d("div",so,[d("table",io,[lo,d("tbody",co,[(B(!0),k(Vt,null,te(o.value,w=>(B(),k("tr",{class:"align-middle",key:w.id},[ye(d("td",null,Ct(w.name),513),[[fn,!(C.value==="edit"&&N.value===w.id)]]),ye(d("td",null,[d("button",{type:"button",class:"btn btn-link link-success text-decoration-none fw-bold",onClick:X=>x(w.id)},"\u8A73\u7D30\u5167\u5BB9",8,uo)],512),[[fn,!(C.value==="edit"&&N.value===w.id)]]),ye(d("td",null,[d("p",fo,Ct(_t(Wn)(w.start_at)),1),d("p",null,Ct(_t(Wn)(w.end_at)),1)],512),[[fn,!(C.value==="edit"&&N.value===w.id)]]),C.value==="edit"&&N.value===w.id?(B(),k("td",vo,[H(aa,{id:r.trainingId,"edit-data":R.value,onRefresh:m,onClose:M},null,8,["id","edit-data"])])):It("",!0),ye(d("td",null,[d("button",{type:"button",class:"btn btn-outline-dark me-2",onClick:X=>M("edit",w.id)},"\u7DE8\u8F2F",8,ho),d("button",{type:"button",class:"btn btn-outline-danger",onClick:X=>I(w.id)},"\u522A\u9664",8,po)],512),[[fn,!(C.value==="edit"&&N.value===w.id)]])]))),128))])])]),C.value!=="create"?(B(),k("div",mo,[d("button",{type:"button",class:"btn btn-outline-soft border-dashed rounded-circle p-2",onClick:D[0]||(D[0]=w=>M("create"))},yo)])):It("",!0),C.value==="create"?(B(),ae(aa,{key:1,id:r.trainingId,"edit-data":{},onRefresh:m,onClose:M},null,8,["id"])):It("",!0)]),H(Me,{ref_key:"modalDetailRef",ref:l,title:"",modalSize:"modal-lg","has-footer":!1},{body:Rt(()=>[d("div",null,[bo,d("p",So,Ct(i.value.name),1)]),d("div",xo,[d("div",Eo,[Co,d("p",To,Ct(new Date(i.value.start_at).toLocaleString("sv-SE")),1)]),d("div",$o,[Oo,d("p",Io,Ct(new Date(i.value.end_at).toLocaleString("sv-SE")),1)])]),d("div",Do,[wo,d("div",{class:"content text-primary",innerHTML:i.value.content},null,8,Po)])]),_:1},512),H(Me,{ref_key:"modalDeleteRef",ref:u,title:"\u662F\u5426\u522A\u9664\u6B64\u6D3B\u52D5\uFF1F",modalSize:"modal-md",hasFooter:!0},{body:Rt(()=>[d("h5",Ao,Ct(b.value.name),1),Ro,d("div",Mo,[d("button",{type:"button",class:"btn btn-primary me-2",onClick:D[1]||(D[1]=w=>v.value.hide())},"\u53D6\u6D88"),d("button",{type:"button",class:"btn btn-danger",onClick:D[2]||(D[2]=w=>E(b.value.id))},"\u522A\u9664\u6D3B\u52D5")])]),_:1},512)],64))}},No=He(Lo,[["__scopeId","data-v-50d0b977"]]);function oa(r){return typeof r=="function"?r():_t(r)}const ra=()=>{};function Fo(r,e){function a(...s){return new Promise((n,c)=>{Promise.resolve(r(()=>e.apply(this,s),{fn:e,thisArg:this,args:s})).then(n).catch(c)})}return a}const jo=r=>r();function Uo(r,e={}){let a,s,n=ra;const c=o=>{clearTimeout(o),n(),n=ra};return o=>{const i=oa(r),l=oa(e.maxWait);return a&&c(a),i<=0||l!==void 0&&l<=0?(s&&(c(s),s=null),Promise.resolve(o())):new Promise((u,f)=>{n=e.rejectOnCancel?f:u,l&&!s&&(s=setTimeout(()=>{a&&c(a),s=null,u(o())},l)),a=setTimeout(()=>{s&&c(s),s=null,u(o())},i)})}}function Vo(r,e,a={}){const{eventFilter:s=jo,...n}=a;return Pn(r,Fo(s,e),n)}function Go(r,e,a={}){const{debounce:s=0,maxWait:n=void 0,...c}=a;return Vo(r,e,{...c,eventFilter:Uo(s,{maxWait:n})})}const We=r=>(rn("data-v-3a8382f7"),r=r(),sn(),r),Bo=We(()=>d("h4",{class:"text-dark mb-3"},"\u4F7F\u7528\u8005\u7FA4\u7D44\u8A2D\u5B9A",-1)),Ko={key:0,class:"text-primary"},Ho=We(()=>d("span",{class:"material-icons align-middle"},"open_in_new",-1)),Wo={class:"row"},ko={class:"col-lg-4 col-md-7"},Xo={class:"form-floating mb-2"},Yo=We(()=>d("label",{for:"training-name"},"\u641C\u5C0B\u4F7F\u7528\u8005\u7FA4\u7D44",-1)),zo={class:"card rounded-4"},Jo={class:"card-body"},Zo=["id","value"],Qo={class:"d-flex align-items-center"},_o=["for"],qo=We(()=>d("span",{class:"material-icons align-middle"},"open_in_new",-1)),tr={class:"mb-0 text-dark",style:{"font-size":"14px"}},er={key:0},nr={key:1,class:"text-muted"},ar={key:0},or={class:"my-5"},rr={class:"mb-3"},sr={class:"table custom-table-style mb-0"},ir=We(()=>d("thead",null,[d("tr",{class:"text-nowrap bg-soft border-0"},[d("th",null,"\u6A19\u984C"),d("th",null,"\u4EFB\u52D9\u7FA4\u7D44"),d("th",null,"\u5F8C\u53F0\u9023\u7D50"),d("th",null,"\u524D\u53F0\u9023\u7D50")])],-1)),lr=We(()=>d("td",null,"-",-1)),cr={__name:"UserGroup",props:{trainingId:{type:String,required:!0},userGroups:{type:Array,required:!0}},emits:["refresh"],setup(r,{emit:e}){const a=r,{apiGetTrainingUserGroup:s,apiGetTrainingTask:n,apiPutTrainingUserGroups:c}=ln,t=on.useLoading(),o=W(!1),i=W([]),l=W(""),u=W({total:0,total_page:0,current_page:1}),f=W(""),v=async({keyword:b,page:E}={})=>{const I=t.show();o.value=!0;try{const{user_groups:C,pagination:N}=await s({keyword:b,page:E});E===1?(i.value=[],i.value=C):i.value=[...i.value,...C],u.value=N}catch{ct("danger","\u53D6\u5F97\u4F7F\u7528\u8005\u7FA4\u7D44\u5217\u8868\u5931\u6557","\u53D6\u5F97\u4F7F\u7528\u8005\u7FA4\u7D44\u5217\u8868\u5931\u6557")}finally{I.hide(),o.value=!1}},h=W([]),p=W(!1),y=async()=>{p.value=!0;const b=t.show();try{const{tasks:E}=await n(a.trainingId);h.value=E}catch{ct("danger","\u53D6\u5F97\u57F9\u8A13\u73ED\u4EFB\u52D9\u6E05\u55AE\u5931\u6557","\u53D6\u5F97\u57F9\u8A13\u73ED\u4EFB\u52D9\u6E05\u55AE\u5931\u6557")}finally{b.hide(),p.value=!1}};le(()=>{v(),y()}),Pn(()=>a.userGroups,b=>{l.value=b[0].id},{immediate:!0});const m=W(null);le(()=>{const b=m.value;b.addEventListener("scroll",E=>{if(E.target.clientHeight+E.target.scrollTop>b.scrollHeight-1){if(o.value||u.value.current_page===u.value.total_page)return;v({keyword:f.value,page:u.value.current_page+1})}})}),Go(f,()=>{v({keyword:f.value,page:1})},{debounce:1e3,maxWait:1300});const x=async()=>{const b=[];b.push(l.value);try{await c(a.trainingId,{user_group_ids:b}),ct("success","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u6210\u529F","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u6210\u529F"),y(),e("refresh")}catch{ct("danger","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u5931\u6557","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u5931\u6557")}};return(b,E)=>{const I=ie("router-link");return B(),k(Vt,null,[d("div",null,[Bo,a.userGroups.length>0?(B(),k("p",Ko,[_e(" \u76EE\u524D\u5DF2\u9078\u64C7\u7684\u4F7F\u7528\u8005\u7FA4\u7D44\uFF1A"),H(I,{target:"_blank",to:{name:"UserGroupDetail",params:{id:a.userGroups[0].id}},class:"btn btn-link p-0 ms-1"},{default:Rt(()=>[d("b",null,Ct(a.userGroups[0].name),1),Ho]),_:1},8,["to"])])):It("",!0),d("div",Wo,[d("div",ko,[d("div",Xo,[ye(d("input",{type:"text",class:"form-control",id:"training-name",placeholder:"\u641C\u5C0B\u4F7F\u7528\u8005\u7FA4\u7D44","onUpdate:modelValue":E[0]||(E[0]=C=>f.value=C)},null,512),[[ya,f.value]]),Yo])])])]),d("div",zo,[d("div",Jo,[d("ul",{class:"list-group border-bottom mb-3 overflow-y-scroll",ref_key:"userGroupListRef",ref:m,style:{"max-height":"500px"}},[(B(!0),k(Vt,null,te(i.value,C=>(B(),k("li",{class:"list-group-item border-0",key:C.id},[d("div",{class:Dt(["form-check",{checked:l.value===C.id}])},[ye(d("input",{type:"radio",class:"form-check-input custom-form-check-input",name:"user-group",id:C.id,"onUpdate:modelValue":E[1]||(E[1]=N=>l.value=N),value:C.id},null,8,Zo),[[La,l.value]]),d("div",Qo,[d("label",{for:C.id,class:"form-check-label"},Ct(C.name),9,_o),H(I,{target:"_blank",to:{name:"UserGroupDetail",params:{id:C.id}},class:"btn btn-link p-0 ms-1"},{default:Rt(()=>[qo]),_:2},1032,["to"])]),d("p",tr,[C.task_groups.length>0?(B(),k("span",er,"\u5DF2\u5305\u542B\u4EFB\u52D9\u7FA4\u7D44")):(B(),k("span",nr,"\u76EE\u524D\u672A\u5305\u542B\u4EFB\u52D9\u7FA4\u7D44")),(B(!0),k(Vt,null,te(C.task_groups,(N,R)=>(B(),k("span",{key:N.id},[_e(" \u300C"+Ct(N.name)+" \u300D ",1),R(B(),k("tr",{class:"align-middle",key:C.id},[d("td",null,Ct(C.name),1),d("td",null,Ct(C.task_group_name),1),d("td",null,[H(I,{target:"_blank",to:{name:"TaskDetail",params:{id:C.id}},class:"btn btn-link text-decoration-none link-success fw-bold"},{default:Rt(()=>[_e(" \u9023\u7D50 ")]),_:2},1032,["to"])]),lr]))),128))])])])],64)}}},dr=He(cr,[["__scopeId","data-v-3a8382f7"]]);const ur={key:0,class:"text-dark mb-4"},fr={class:"row"},vr={class:"col-md-3"},hr={class:"list-group"},pr=["href","onClick"],mr={class:"material-icons-outlined me-2"},gr={class:"col-md-9"},yr={class:"tab-content"},br={__name:"ListGroup",props:{title:{type:String,default:""},tabList:{type:Array,default:()=>[{id:1,name:"home",cht_icon:"settings",cht_name:"\u5217\u88681"}]}},setup(r,{expose:e}){const a=r,s=Na(),n=Tn(a.tabList),c=W(1),t=Tn([]),o=i=>{i.element.show(),c.value=i.id};return le(()=>{Wa(t,n)}),e({tabShow:o}),(i,l)=>(B(),k(Vt,null,[a.title?(B(),k("h4",ur,Ct(a.title),1)):It("",!0),d("div",fr,[d("div",vr,[d("div",hr,[(B(!0),k(Vt,null,te(n,(u,f)=>(B(),k("a",{key:u.id,href:`#${u.name}`,ref_for:!0,ref:v=>t.push(v),class:Dt(["list-group-item d-flex align-items-center mb-1",c.value===u.id?"active":""]),onClick:Ae(()=>{o(u),_t(s).replace({query:{menuId:f}})},["prevent"])},[d("span",mr,Ct(u.cht_icon),1),_e(" "+Ct(u.cht_name),1)],10,pr))),128))])]),d("div",gr,[d("div",yr,[Fa(i.$slots,"body",{nowId:c.value},void 0,!0)])])])],64))}},Sr=He(br,[["__scopeId","data-v-a71f8236"]]);var xa={exports:{}};/**! + * Sortable 1.14.0 + * @author RubaXa + * @author owenm + * @license MIT + */function sa(r,e){var a=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);e&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),a.push.apply(a,s)}return a}function Se(r){for(var e=1;e=0)&&(a[n]=r[n]);return a}function Cr(r,e){if(r==null)return{};var a=Er(r,e),s,n;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);for(n=0;n=0)&&(!Object.prototype.propertyIsEnumerable.call(r,s)||(a[s]=r[s]))}return a}function Tr(r){return $r(r)||Or(r)||Ir(r)||Dr()}function $r(r){if(Array.isArray(r))return kn(r)}function Or(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Ir(r,e){if(!!r){if(typeof r=="string")return kn(r,e);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return kn(r,e)}}function kn(r,e){(e==null||e>r.length)&&(e=r.length);for(var a=0,s=new Array(e);a"&&(e=e.substring(1)),r)try{if(r.matches)return r.matches(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e)}catch{return!1}return!1}}function Ar(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function pe(r,e,a,s){if(r){a=a||document;do{if(e!=null&&(e[0]===">"?r.parentNode===a&&$n(r,e):$n(r,e))||s&&r===a)return r;if(r===a)break}while(r=Ar(r))}return null}var la=/\s+/g;function Ut(r,e,a){if(r&&e)if(r.classList)r.classList[a?"add":"remove"](e);else{var s=(" "+r.className+" ").replace(la," ").replace(" "+e+" "," ");r.className=(s+(a?" "+e:"")).replace(la," ")}}function Q(r,e,a){var s=r&&r.style;if(s){if(a===void 0)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(a=r.currentStyle),e===void 0?a:a[e];!(e in s)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),s[e]=a+(typeof a=="string"?"":"px")}}function Re(r,e){var a="";if(typeof r=="string")a=r;else do{var s=Q(r,"transform");s&&s!=="none"&&(a=s+" "+a)}while(!e&&(r=r.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(a)}function Ta(r,e,a){if(r){var s=r.getElementsByTagName(e),n=0,c=s.length;if(a)for(;n=c:t=n<=c,!t)return s;if(s===be())break;s=Oe(s,!1)}return!1}function Ke(r,e,a,s){for(var n=0,c=0,t=r.children;c2&&arguments[2]!==void 0?arguments[2]:{},n=s.evt,c=Cr(s,Ur);dn.pluginEvent.bind(dt)(e,a,Se({dragEl:K,parentEl:Gt,ghostEl:gt,rootEl:Ft,nextEl:we,lastDownEl:Sn,cloneEl:Bt,cloneHidden:$e,dragStarted:Je,putSortable:Qt,activeSortable:dt.active,originalEvent:n,oldIndex:Be,oldDraggableIndex:en,newIndex:de,newDraggableIndex:Te,hideGhostForTarget:Pa,unhideGhostForTarget:Aa,cloneNowHidden:function(){$e=!0},cloneNowShown:function(){$e=!1},dispatchSortableEvent:function(o){ne({sortable:a,name:o,originalEvent:n})}},c))};function ne(r){ze(Se({putSortable:Qt,cloneEl:Bt,targetEl:K,rootEl:Ft,oldIndex:Be,oldDraggableIndex:en,newIndex:de,newDraggableIndex:Te},r))}var K,Gt,gt,Ft,we,Sn,Bt,$e,Be,de,en,Te,vn,Qt,Ge=!1,On=!1,In=[],Ie,ve,Fn,jn,fa,va,Je,Ue,nn,an=!1,hn=!1,xn,qt,Un=[],Xn=!1,Dn=[],An=typeof document<"u",pn=Ea,ha=cn||Ce?"cssFloat":"float",Vr=An&&!Pr&&!Ea&&"draggable"in document.createElement("div"),Ia=function(){if(!!An){if(Ce)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),Da=function(e,a){var s=Q(e),n=parseInt(s.width)-parseInt(s.paddingLeft)-parseInt(s.paddingRight)-parseInt(s.borderLeftWidth)-parseInt(s.borderRightWidth),c=Ke(e,0,a),t=Ke(e,1,a),o=c&&Q(c),i=t&&Q(t),l=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+jt(c).width,u=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+jt(t).width;if(s.display==="flex")return s.flexDirection==="column"||s.flexDirection==="column-reverse"?"vertical":"horizontal";if(s.display==="grid")return s.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(c&&o.float&&o.float!=="none"){var f=o.float==="left"?"left":"right";return t&&(i.clear==="both"||i.clear===f)?"vertical":"horizontal"}return c&&(o.display==="block"||o.display==="flex"||o.display==="table"||o.display==="grid"||l>=n&&s[ha]==="none"||t&&s[ha]==="none"&&l+u>n)?"vertical":"horizontal"},Gr=function(e,a,s){var n=s?e.left:e.top,c=s?e.right:e.bottom,t=s?e.width:e.height,o=s?a.left:a.top,i=s?a.right:a.bottom,l=s?a.width:a.height;return n===o||c===i||n+t/2===o+l/2},Br=function(e,a){var s;return In.some(function(n){var c=n[ee].options.emptyInsertThreshold;if(!(!c||Zn(n))){var t=jt(n),o=e>=t.left-c&&e<=t.right+c,i=a>=t.top-c&&a<=t.bottom+c;if(o&&i)return s=n}}),s},wa=function(e){function a(c,t){return function(o,i,l,u){var f=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(c==null&&(t||f))return!0;if(c==null||c===!1)return!1;if(t&&c==="clone")return c;if(typeof c=="function")return a(c(o,i,l,u),t)(o,i,l,u);var v=(t?o:i).options.group.name;return c===!0||typeof c=="string"&&c===v||c.join&&c.indexOf(v)>-1}}var s={},n=e.group;(!n||bn(n)!="object")&&(n={name:n}),s.name=n.name,s.checkPull=a(n.pull,!0),s.checkPut=a(n.put),s.revertClone=n.revertClone,e.group=s},Pa=function(){!Ia&>&&Q(gt,"display","none")},Aa=function(){!Ia&>&&Q(gt,"display","")};An&&document.addEventListener("click",function(r){if(On)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),On=!1,!1},!0);var De=function(e){if(K){e=e.touches?e.touches[0]:e;var a=Br(e.clientX,e.clientY);if(a){var s={};for(var n in e)e.hasOwnProperty(n)&&(s[n]=e[n]);s.target=s.rootEl=a,s.preventDefault=void 0,s.stopPropagation=void 0,a[ee]._onDragOver(s)}}},Kr=function(e){K&&K.parentNode[ee]._isOutsideThisEl(e.target)};function dt(r,e){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=e=fe({},e),r[ee]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Da(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,o){t.setData("Text",o.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:dt.supportPointer!==!1&&"PointerEvent"in window&&!qe,emptyInsertThreshold:5};dn.initializePlugins(this,r,a);for(var s in a)!(s in e)&&(e[s]=a[s]);wa(e);for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this));this.nativeDraggable=e.forceFallback?!1:Vr,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?xt(r,"pointerdown",this._onTapStart):(xt(r,"mousedown",this._onTapStart),xt(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(xt(r,"dragover",this),xt(r,"dragenter",this)),In.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),fe(this,Nr())}dt.prototype={constructor:dt,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ue=null)},_getDirection:function(e,a){return typeof this.options.direction=="function"?this.options.direction.call(this,e,a,K):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var a=this,s=this.el,n=this.options,c=n.preventOnFilter,t=e.type,o=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,i=(o||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||i,u=n.filter;if(Zr(s),!K&&!(/mousedown|pointerdown/.test(t)&&e.button!==0||n.disabled)&&!l.isContentEditable&&!(!this.nativeDraggable&&qe&&i&&i.tagName.toUpperCase()==="SELECT")&&(i=pe(i,n.draggable,s,!1),!(i&&i.animated)&&Sn!==i)){if(Be=Kt(i),en=Kt(i,n.draggable),typeof u=="function"){if(u.call(this,e,i,this)){ne({sortable:a,rootEl:l,name:"filter",targetEl:i,toEl:s,fromEl:s}),re("filter",a,{evt:e}),c&&e.cancelable&&e.preventDefault();return}}else if(u&&(u=u.split(",").some(function(f){if(f=pe(l,f.trim(),s,!1),f)return ne({sortable:a,rootEl:f,name:"filter",targetEl:i,fromEl:s,toEl:s}),re("filter",a,{evt:e}),!0}),u)){c&&e.cancelable&&e.preventDefault();return}n.handle&&!pe(l,n.handle,s,!1)||this._prepareDragStart(e,o,i)}}},_prepareDragStart:function(e,a,s){var n=this,c=n.el,t=n.options,o=c.ownerDocument,i;if(s&&!K&&s.parentNode===c){var l=jt(s);if(Ft=c,K=s,Gt=K.parentNode,we=K.nextSibling,Sn=s,vn=t.group,dt.dragged=K,Ie={target:K,clientX:(a||e).clientX,clientY:(a||e).clientY},fa=Ie.clientX-l.left,va=Ie.clientY-l.top,this._lastX=(a||e).clientX,this._lastY=(a||e).clientY,K.style["will-change"]="all",i=function(){if(re("delayEnded",n,{evt:e}),dt.eventCanceled){n._onDrop();return}n._disableDelayedDragEvents(),!ia&&n.nativeDraggable&&(K.draggable=!0),n._triggerDragStart(e,a),ne({sortable:n,name:"choose",originalEvent:e}),Ut(K,t.chosenClass,!0)},t.ignore.split(",").forEach(function(u){Ta(K,u.trim(),Vn)}),xt(o,"dragover",De),xt(o,"mousemove",De),xt(o,"touchmove",De),xt(o,"mouseup",n._onDrop),xt(o,"touchend",n._onDrop),xt(o,"touchcancel",n._onDrop),ia&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),re("delayStart",this,{evt:e}),t.delay&&(!t.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(cn||Ce))){if(dt.eventCanceled){this._onDrop();return}xt(o,"mouseup",n._disableDelayedDrag),xt(o,"touchend",n._disableDelayedDrag),xt(o,"touchcancel",n._disableDelayedDrag),xt(o,"mousemove",n._delayedDragTouchMoveHandler),xt(o,"touchmove",n._delayedDragTouchMoveHandler),t.supportPointer&&xt(o,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(i,t.delay)}else i()}},_delayedDragTouchMoveHandler:function(e){var a=e.touches?e.touches[0]:e;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Vn(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;bt(e,"mouseup",this._disableDelayedDrag),bt(e,"touchend",this._disableDelayedDrag),bt(e,"touchcancel",this._disableDelayedDrag),bt(e,"mousemove",this._delayedDragTouchMoveHandler),bt(e,"touchmove",this._delayedDragTouchMoveHandler),bt(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,a){a=a||e.pointerType=="touch"&&e,!this.nativeDraggable||a?this.options.supportPointer?xt(document,"pointermove",this._onTouchMove):a?xt(document,"touchmove",this._onTouchMove):xt(document,"mousemove",this._onTouchMove):(xt(K,"dragend",this),xt(Ft,"dragstart",this._onDragStart));try{document.selection?En(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,a){if(Ge=!1,Ft&&K){re("dragStarted",this,{evt:a}),this.nativeDraggable&&xt(document,"dragover",Kr);var s=this.options;!e&&Ut(K,s.dragClass,!1),Ut(K,s.ghostClass,!0),dt.active=this,e&&this._appendGhost(),ne({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(ve){this._lastX=ve.clientX,this._lastY=ve.clientY,Pa();for(var e=document.elementFromPoint(ve.clientX,ve.clientY),a=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ve.clientX,ve.clientY),e!==a);)a=e;if(K.parentNode[ee]._isOutsideThisEl(e),a)do{if(a[ee]){var s=void 0;if(s=a[ee]._onDragOver({clientX:ve.clientX,clientY:ve.clientY,target:e,rootEl:a}),s&&!this.options.dragoverBubble)break}e=a}while(a=a.parentNode);Aa()}},_onTouchMove:function(e){if(Ie){var a=this.options,s=a.fallbackTolerance,n=a.fallbackOffset,c=e.touches?e.touches[0]:e,t=gt&&Re(gt,!0),o=gt&&t&&t.a,i=gt&&t&&t.d,l=pn&&qt&&da(qt),u=(c.clientX-Ie.clientX+n.x)/(o||1)+(l?l[0]-Un[0]:0)/(o||1),f=(c.clientY-Ie.clientY+n.y)/(i||1)+(l?l[1]-Un[1]:0)/(i||1);if(!dt.active&&!Ge){if(s&&Math.max(Math.abs(c.clientX-this._lastX),Math.abs(c.clientY-this._lastY))=0&&(ne({rootEl:Gt,name:"add",toEl:Gt,fromEl:Ft,originalEvent:e}),ne({sortable:this,name:"remove",toEl:Gt,originalEvent:e}),ne({rootEl:Gt,name:"sort",toEl:Gt,fromEl:Ft,originalEvent:e}),ne({sortable:this,name:"sort",toEl:Gt,originalEvent:e})),Qt&&Qt.save()):de!==Be&&de>=0&&(ne({sortable:this,name:"update",toEl:Gt,originalEvent:e}),ne({sortable:this,name:"sort",toEl:Gt,originalEvent:e})),dt.active&&((de==null||de===-1)&&(de=Be,Te=en),ne({sortable:this,name:"end",toEl:Gt,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){re("nulling",this),Ft=K=Gt=gt=we=Bt=Sn=$e=Ie=ve=Je=de=Te=Be=en=Ue=nn=Qt=vn=dt.dragged=dt.ghost=dt.clone=dt.active=null,Dn.forEach(function(e){e.checked=!0}),Dn.length=Fn=jn=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":K&&(this._onDragOver(e),Hr(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],a,s=this.el.children,n=0,c=s.length,t=this.options;ns.right+n||r.clientX<=s.right&&r.clientY>s.bottom&&r.clientX>=s.left:r.clientX>s.right&&r.clientY>s.top||r.clientX<=s.right&&r.clientY>s.bottom+n}function Yr(r,e,a,s,n,c,t,o){var i=s?r.clientY:r.clientX,l=s?a.height:a.width,u=s?a.top:a.left,f=s?a.bottom:a.right,v=!1;if(!t){if(o&&xnu+l*c/2:if-xn)return-nn}else if(i>u+l*(1-n)/2&&if-l*c/2)?i>u+l/2?1:-1:0}function zr(r){return Kt(K)1&&(mt.forEach(function(o){c.addAnimationState({target:o,rect:se?jt(o):t}),Ln(o),o.fromRect=t,s.removeAnimationState(o)}),se=!1,es(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(a){var s=a.sortable,n=a.isOwner,c=a.insertion,t=a.activeSortable,o=a.parentEl,i=a.putSortable,l=this.options;if(c){if(n&&t._hideClone(),Xe=!1,l.animation&&mt.length>1&&(se||!n&&!t.options.sort&&!i)){var u=jt(Nt,!1,!0,!0);mt.forEach(function(v){v!==Nt&&(ua(v,u),o.appendChild(v))}),se=!0}if(!n)if(se||yn(),mt.length>1){var f=gn;t._showClone(s),t.options.animation&&!gn&&f&&ce.forEach(function(v){t.addAnimationState({target:v,rect:Ye}),v.fromRect=Ye,v.thisAnimationDuration=null})}else t._showClone(s)}},dragOverAnimationCapture:function(a){var s=a.dragRect,n=a.isOwner,c=a.activeSortable;if(mt.forEach(function(o){o.thisAnimationDuration=null}),c.options.animation&&!n&&c.multiDrag.isMultiDrag){Ye=fe({},s);var t=Re(Nt,!0);Ye.top-=t.f,Ye.left-=t.e}},dragOverAnimationComplete:function(){se&&(se=!1,yn())},drop:function(a){var s=a.originalEvent,n=a.rootEl,c=a.parentEl,t=a.sortable,o=a.dispatchSortableEvent,i=a.oldIndex,l=a.putSortable,u=l||this.sortable;if(!!s){var f=this.options,v=c.children;if(!Ve)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Ut(Nt,f.selectedClass,!~mt.indexOf(Nt)),~mt.indexOf(Nt))mt.splice(mt.indexOf(Nt),1),ke=null,ze({sortable:t,rootEl:n,name:"deselect",targetEl:Nt,originalEvt:s});else{if(mt.push(Nt),ze({sortable:t,rootEl:n,name:"select",targetEl:Nt,originalEvt:s}),s.shiftKey&&ke&&t.el.contains(ke)){var h=Kt(ke),p=Kt(Nt);if(~h&&~p&&h!==p){var y,m;for(p>h?(m=h,y=p):(m=p,y=h+1);m1){var g=jt(Nt),x=Kt(Nt,":not(."+this.options.selectedClass+")");if(!Xe&&f.animation&&(Nt.thisAnimationDuration=null),u.captureAnimationState(),!Xe&&(f.animation&&(Nt.fromRect=g,mt.forEach(function(E){if(E.thisAnimationDuration=null,E!==Nt){var I=se?jt(E):g;E.fromRect=I,u.addAnimationState({target:E,rect:I})}})),yn(),mt.forEach(function(E){v[x]?c.insertBefore(E,v[x]):c.appendChild(E),x++}),i===Kt(Nt))){var b=!1;mt.forEach(function(E){if(E.sortableIndex!==Kt(E)){b=!0;return}}),b&&o("update")}mt.forEach(function(E){Ln(E)}),u.animateAll()}he=u}(n===c||l&&l.lastPutMode!=="clone")&&ce.forEach(function(E){E.parentNode&&E.parentNode.removeChild(E)})}},nullingGlobal:function(){this.isMultiDrag=Ve=!1,ce.length=0},destroyGlobal:function(){this._deselectMultiDrag(),bt(document,"pointerup",this._deselectMultiDrag),bt(document,"mouseup",this._deselectMultiDrag),bt(document,"touchend",this._deselectMultiDrag),bt(document,"keydown",this._checkKeyDown),bt(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(a){if(!(typeof Ve<"u"&&Ve)&&he===this.sortable&&!(a&&pe(a.target,this.options.draggable,this.sortable.el,!1))&&!(a&&a.button!==0))for(;mt.length;){var s=mt[0];Ut(s,this.options.selectedClass,!1),mt.shift(),ze({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:s,originalEvt:a})}},_checkKeyDown:function(a){a.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(a){a.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},fe(r,{pluginName:"multiDrag",utils:{select:function(a){var s=a.parentNode[ee];!s||!s.options.multiDrag||~mt.indexOf(a)||(he&&he!==s&&(he.multiDrag._deselectMultiDrag(),he=s),Ut(a,s.options.selectedClass,!0),mt.push(a))},deselect:function(a){var s=a.parentNode[ee],n=mt.indexOf(a);!s||!s.options.multiDrag||!~n||(Ut(a,s.options.selectedClass,!1),mt.splice(n,1))}},eventProperties:function(){var a=this,s=[],n=[];return mt.forEach(function(c){s.push({multiDragElement:c,index:c.sortableIndex});var t;se&&c!==Nt?t=-1:se?t=Kt(c,":not(."+a.options.selectedClass+")"):t=Kt(c),n.push({multiDragElement:c,index:t})}),{items:Tr(mt),clones:[].concat(ce),oldIndicies:s,newIndicies:n}},optionListeners:{multiDragKey:function(a){return a=a.toLowerCase(),a==="ctrl"?a="Control":a.length>1&&(a=a.charAt(0).toUpperCase()+a.substr(1)),a}}})}function es(r,e){mt.forEach(function(a,s){var n=e.children[a.sortableIndex+(r?Number(s):0)];n?e.insertBefore(a,n):e.appendChild(a)})}function ma(r,e){ce.forEach(function(a,s){var n=e.children[a.sortableIndex+(r?Number(s):0)];n?e.insertBefore(a,n):e.appendChild(a)})}function yn(){mt.forEach(function(r){r!==Nt&&r.parentNode&&r.parentNode.removeChild(r)})}dt.mount(new Qr);dt.mount(qn,_n);const ns=Object.freeze(Object.defineProperty({__proto__:null,default:dt,MultiDrag:ts,Sortable:dt,Swap:_r},Symbol.toStringTag,{value:"Module"})),as=ja(ns);(function(r,e){(function(s,n){r.exports=n(Ua,as)})(typeof self<"u"?self:Va,function(a,s){return function(n){var c={};function t(o){if(c[o])return c[o].exports;var i=c[o]={i:o,l:!1,exports:{}};return n[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=n,t.c=c,t.d=function(o,i,l){t.o(o,i)||Object.defineProperty(o,i,{enumerable:!0,get:l})},t.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},t.t=function(o,i){if(i&1&&(o=t(o)),i&8||i&4&&typeof o=="object"&&o&&o.__esModule)return o;var l=Object.create(null);if(t.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:o}),i&2&&typeof o!="string")for(var u in o)t.d(l,u,function(f){return o[f]}.bind(null,u));return l},t.n=function(o){var i=o&&o.__esModule?function(){return o.default}:function(){return o};return t.d(i,"a",i),i},t.o=function(o,i){return Object.prototype.hasOwnProperty.call(o,i)},t.p="",t(t.s="fb15")}({"00ee":function(n,c,t){var o=t("b622"),i=o("toStringTag"),l={};l[i]="z",n.exports=String(l)==="[object z]"},"0366":function(n,c,t){var o=t("1c0b");n.exports=function(i,l,u){if(o(i),l===void 0)return i;switch(u){case 0:return function(){return i.call(l)};case 1:return function(f){return i.call(l,f)};case 2:return function(f,v){return i.call(l,f,v)};case 3:return function(f,v,h){return i.call(l,f,v,h)}}return function(){return i.apply(l,arguments)}}},"057f":function(n,c,t){var o=t("fc6a"),i=t("241c").f,l={}.toString,u=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],f=function(v){try{return i(v)}catch{return u.slice()}};n.exports.f=function(h){return u&&l.call(h)=="[object Window]"?f(h):i(o(h))}},"06cf":function(n,c,t){var o=t("83ab"),i=t("d1e7"),l=t("5c6c"),u=t("fc6a"),f=t("c04e"),v=t("5135"),h=t("0cfb"),p=Object.getOwnPropertyDescriptor;c.f=o?p:function(m,g){if(m=u(m),g=f(g,!0),h)try{return p(m,g)}catch{}if(v(m,g))return l(!i.f.call(m,g),m[g])}},"0cfb":function(n,c,t){var o=t("83ab"),i=t("d039"),l=t("cc12");n.exports=!o&&!i(function(){return Object.defineProperty(l("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(n,c,t){var o=t("23e7"),i=t("d58f").left,l=t("a640"),u=t("ae40"),f=l("reduce"),v=u("reduce",{1:0});o({target:"Array",proto:!0,forced:!f||!v},{reduce:function(p){return i(this,p,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(n,c,t){var o=t("c6b6"),i=t("9263");n.exports=function(l,u){var f=l.exec;if(typeof f=="function"){var v=f.call(l,u);if(typeof v!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return v}if(o(l)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return i.call(l,u)}},"159b":function(n,c,t){var o=t("da84"),i=t("fdbc"),l=t("17c2"),u=t("9112");for(var f in i){var v=o[f],h=v&&v.prototype;if(h&&h.forEach!==l)try{u(h,"forEach",l)}catch{h.forEach=l}}},"17c2":function(n,c,t){var o=t("b727").forEach,i=t("a640"),l=t("ae40"),u=i("forEach"),f=l("forEach");n.exports=!u||!f?function(h){return o(this,h,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(n,c,t){var o=t("d066");n.exports=o("document","documentElement")},"1c0b":function(n,c){n.exports=function(t){if(typeof t!="function")throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(n,c,t){var o=t("b622"),i=o("iterator"),l=!1;try{var u=0,f={next:function(){return{done:!!u++}},return:function(){l=!0}};f[i]=function(){return this},Array.from(f,function(){throw 2})}catch{}n.exports=function(v,h){if(!h&&!l)return!1;var p=!1;try{var y={};y[i]=function(){return{next:function(){return{done:p=!0}}}},v(y)}catch{}return p}},"1d80":function(n,c){n.exports=function(t){if(t==null)throw TypeError("Can't call method on "+t);return t}},"1dde":function(n,c,t){var o=t("d039"),i=t("b622"),l=t("2d00"),u=i("species");n.exports=function(f){return l>=51||!o(function(){var v=[],h=v.constructor={};return h[u]=function(){return{foo:1}},v[f](Boolean).foo!==1})}},"23cb":function(n,c,t){var o=t("a691"),i=Math.max,l=Math.min;n.exports=function(u,f){var v=o(u);return v<0?i(v+f,0):l(v,f)}},"23e7":function(n,c,t){var o=t("da84"),i=t("06cf").f,l=t("9112"),u=t("6eeb"),f=t("ce4e"),v=t("e893"),h=t("94ca");n.exports=function(p,y){var m=p.target,g=p.global,x=p.stat,b,E,I,C,N,R;if(g?E=o:x?E=o[m]||f(m,{}):E=(o[m]||{}).prototype,E)for(I in y){if(N=y[I],p.noTargetGet?(R=i(E,I),C=R&&R.value):C=E[I],b=h(g?I:m+(x?".":"#")+I,p.forced),!b&&C!==void 0){if(typeof N==typeof C)continue;v(N,C)}(p.sham||C&&C.sham)&&l(N,"sham",!0),u(E,I,N,p)}}},"241c":function(n,c,t){var o=t("ca84"),i=t("7839"),l=i.concat("length","prototype");c.f=Object.getOwnPropertyNames||function(f){return o(f,l)}},"25f0":function(n,c,t){var o=t("6eeb"),i=t("825a"),l=t("d039"),u=t("ad6d"),f="toString",v=RegExp.prototype,h=v[f],p=l(function(){return h.call({source:"a",flags:"b"})!="/a/b"}),y=h.name!=f;(p||y)&&o(RegExp.prototype,f,function(){var g=i(this),x=String(g.source),b=g.flags,E=String(b===void 0&&g instanceof RegExp&&!("flags"in v)?u.call(g):b);return"/"+x+"/"+E},{unsafe:!0})},"2ca0":function(n,c,t){var o=t("23e7"),i=t("06cf").f,l=t("50c4"),u=t("5a34"),f=t("1d80"),v=t("ab13"),h=t("c430"),p="".startsWith,y=Math.min,m=v("startsWith"),g=!h&&!m&&!!function(){var x=i(String.prototype,"startsWith");return x&&!x.writable}();o({target:"String",proto:!0,forced:!g&&!m},{startsWith:function(b){var E=String(f(this));u(b);var I=l(y(arguments.length>1?arguments[1]:void 0,E.length)),C=String(b);return p?p.call(E,C,I):E.slice(I,I+C.length)===C}})},"2d00":function(n,c,t){var o=t("da84"),i=t("342f"),l=o.process,u=l&&l.versions,f=u&&u.v8,v,h;f?(v=f.split("."),h=v[0]+v[1]):i&&(v=i.match(/Edge\/(\d+)/),(!v||v[1]>=74)&&(v=i.match(/Chrome\/(\d+)/),v&&(h=v[1]))),n.exports=h&&+h},"342f":function(n,c,t){var o=t("d066");n.exports=o("navigator","userAgent")||""},"35a1":function(n,c,t){var o=t("f5df"),i=t("3f8c"),l=t("b622"),u=l("iterator");n.exports=function(f){if(f!=null)return f[u]||f["@@iterator"]||i[o(f)]}},"37e8":function(n,c,t){var o=t("83ab"),i=t("9bf2"),l=t("825a"),u=t("df75");n.exports=o?Object.defineProperties:function(v,h){l(v);for(var p=u(h),y=p.length,m=0,g;y>m;)i.f(v,g=p[m++],h[g]);return v}},"3bbe":function(n,c,t){var o=t("861d");n.exports=function(i){if(!o(i)&&i!==null)throw TypeError("Can't set "+String(i)+" as a prototype");return i}},"3ca3":function(n,c,t){var o=t("6547").charAt,i=t("69f3"),l=t("7dd0"),u="String Iterator",f=i.set,v=i.getterFor(u);l(String,"String",function(h){f(this,{type:u,string:String(h),index:0})},function(){var p=v(this),y=p.string,m=p.index,g;return m>=y.length?{value:void 0,done:!0}:(g=o(y,m),p.index+=g.length,{value:g,done:!1})})},"3f8c":function(n,c){n.exports={}},4160:function(n,c,t){var o=t("23e7"),i=t("17c2");o({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},"428f":function(n,c,t){var o=t("da84");n.exports=o},"44ad":function(n,c,t){var o=t("d039"),i=t("c6b6"),l="".split;n.exports=o(function(){return!Object("z").propertyIsEnumerable(0)})?function(u){return i(u)=="String"?l.call(u,""):Object(u)}:Object},"44d2":function(n,c,t){var o=t("b622"),i=t("7c73"),l=t("9bf2"),u=o("unscopables"),f=Array.prototype;f[u]==null&&l.f(f,u,{configurable:!0,value:i(null)}),n.exports=function(v){f[u][v]=!0}},"44e7":function(n,c,t){var o=t("861d"),i=t("c6b6"),l=t("b622"),u=l("match");n.exports=function(f){var v;return o(f)&&((v=f[u])!==void 0?!!v:i(f)=="RegExp")}},4930:function(n,c,t){var o=t("d039");n.exports=!!Object.getOwnPropertySymbols&&!o(function(){return!String(Symbol())})},"4d64":function(n,c,t){var o=t("fc6a"),i=t("50c4"),l=t("23cb"),u=function(f){return function(v,h,p){var y=o(v),m=i(y.length),g=l(p,m),x;if(f&&h!=h){for(;m>g;)if(x=y[g++],x!=x)return!0}else for(;m>g;g++)if((f||g in y)&&y[g]===h)return f||g||0;return!f&&-1}};n.exports={includes:u(!0),indexOf:u(!1)}},"4de4":function(n,c,t){var o=t("23e7"),i=t("b727").filter,l=t("1dde"),u=t("ae40"),f=l("filter"),v=u("filter");o({target:"Array",proto:!0,forced:!f||!v},{filter:function(p){return i(this,p,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(n,c,t){var o=t("0366"),i=t("7b0b"),l=t("9bdd"),u=t("e95a"),f=t("50c4"),v=t("8418"),h=t("35a1");n.exports=function(y){var m=i(y),g=typeof this=="function"?this:Array,x=arguments.length,b=x>1?arguments[1]:void 0,E=b!==void 0,I=h(m),C=0,N,R,S,P,M,j;if(E&&(b=o(b,x>2?arguments[2]:void 0,2)),I!=null&&!(g==Array&&u(I)))for(P=I.call(m),M=P.next,R=new g;!(S=M.call(P)).done;C++)j=E?l(P,b,[S.value,C],!0):S.value,v(R,C,j);else for(N=f(m.length),R=new g(N);N>C;C++)j=E?b(m[C],C):m[C],v(R,C,j);return R.length=C,R}},"4fad":function(n,c,t){var o=t("23e7"),i=t("6f53").entries;o({target:"Object",stat:!0},{entries:function(u){return i(u)}})},"50c4":function(n,c,t){var o=t("a691"),i=Math.min;n.exports=function(l){return l>0?i(o(l),9007199254740991):0}},5135:function(n,c){var t={}.hasOwnProperty;n.exports=function(o,i){return t.call(o,i)}},5319:function(n,c,t){var o=t("d784"),i=t("825a"),l=t("7b0b"),u=t("50c4"),f=t("a691"),v=t("1d80"),h=t("8aa5"),p=t("14c3"),y=Math.max,m=Math.min,g=Math.floor,x=/\$([$&'`]|\d\d?|<[^>]*>)/g,b=/\$([$&'`]|\d\d?)/g,E=function(I){return I===void 0?I:String(I)};o("replace",2,function(I,C,N,R){var S=R.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,P=R.REPLACE_KEEPS_$0,M=S?"$":"$0";return[function(w,X){var L=v(this),Y=w==null?void 0:w[I];return Y!==void 0?Y.call(w,L,X):C.call(String(L),w,X)},function(D,w){if(!S&&P||typeof w=="string"&&w.indexOf(M)===-1){var X=N(C,D,this,w);if(X.done)return X.value}var L=i(D),Y=String(this),st=typeof w=="function";st||(w=String(w));var _=L.global;if(_){var G=L.unicode;L.lastIndex=0}for(var at=[];;){var pt=p(L,Y);if(pt===null||(at.push(pt),!_))break;var Tt=String(pt[0]);Tt===""&&(L.lastIndex=h(Y,u(L.lastIndex),G))}for(var ht="",St=0,$t=0;$t=St&&(ht+=Y.slice(St,ut)+zt,St=ut+wt.length)}return ht+Y.slice(St)}];function j(D,w,X,L,Y,st){var _=X+D.length,G=L.length,at=b;return Y!==void 0&&(Y=l(Y),at=x),C.call(st,at,function(pt,Tt){var ht;switch(Tt.charAt(0)){case"$":return"$";case"&":return D;case"`":return w.slice(0,X);case"'":return w.slice(_);case"<":ht=Y[Tt.slice(1,-1)];break;default:var St=+Tt;if(St===0)return pt;if(St>G){var $t=g(St/10);return $t===0?pt:$t<=G?L[$t-1]===void 0?Tt.charAt(1):L[$t-1]+Tt.charAt(1):pt}ht=L[St-1]}return ht===void 0?"":ht})}})},5692:function(n,c,t){var o=t("c430"),i=t("c6cd");(n.exports=function(l,u){return i[l]||(i[l]=u!==void 0?u:{})})("versions",[]).push({version:"3.6.5",mode:o?"pure":"global",copyright:"\xA9 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(n,c,t){var o=t("d066"),i=t("241c"),l=t("7418"),u=t("825a");n.exports=o("Reflect","ownKeys")||function(v){var h=i.f(u(v)),p=l.f;return p?h.concat(p(v)):h}},"5a34":function(n,c,t){var o=t("44e7");n.exports=function(i){if(o(i))throw TypeError("The method doesn't accept regular expressions");return i}},"5c6c":function(n,c){n.exports=function(t,o){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:o}}},"5db7":function(n,c,t){var o=t("23e7"),i=t("a2bf"),l=t("7b0b"),u=t("50c4"),f=t("1c0b"),v=t("65f0");o({target:"Array",proto:!0},{flatMap:function(p){var y=l(this),m=u(y.length),g;return f(p),g=v(y,0),g.length=i(g,y,y,m,0,1,p,arguments.length>1?arguments[1]:void 0),g}})},6547:function(n,c,t){var o=t("a691"),i=t("1d80"),l=function(u){return function(f,v){var h=String(i(f)),p=o(v),y=h.length,m,g;return p<0||p>=y?u?"":void 0:(m=h.charCodeAt(p),m<55296||m>56319||p+1===y||(g=h.charCodeAt(p+1))<56320||g>57343?u?h.charAt(p):m:u?h.slice(p,p+2):(m-55296<<10)+(g-56320)+65536)}};n.exports={codeAt:l(!1),charAt:l(!0)}},"65f0":function(n,c,t){var o=t("861d"),i=t("e8b5"),l=t("b622"),u=l("species");n.exports=function(f,v){var h;return i(f)&&(h=f.constructor,typeof h=="function"&&(h===Array||i(h.prototype))?h=void 0:o(h)&&(h=h[u],h===null&&(h=void 0))),new(h===void 0?Array:h)(v===0?0:v)}},"69f3":function(n,c,t){var o=t("7f9a"),i=t("da84"),l=t("861d"),u=t("9112"),f=t("5135"),v=t("f772"),h=t("d012"),p=i.WeakMap,y,m,g,x=function(S){return g(S)?m(S):y(S,{})},b=function(S){return function(P){var M;if(!l(P)||(M=m(P)).type!==S)throw TypeError("Incompatible receiver, "+S+" required");return M}};if(o){var E=new p,I=E.get,C=E.has,N=E.set;y=function(S,P){return N.call(E,S,P),P},m=function(S){return I.call(E,S)||{}},g=function(S){return C.call(E,S)}}else{var R=v("state");h[R]=!0,y=function(S,P){return u(S,R,P),P},m=function(S){return f(S,R)?S[R]:{}},g=function(S){return f(S,R)}}n.exports={set:y,get:m,has:g,enforce:x,getterFor:b}},"6eeb":function(n,c,t){var o=t("da84"),i=t("9112"),l=t("5135"),u=t("ce4e"),f=t("8925"),v=t("69f3"),h=v.get,p=v.enforce,y=String(String).split("String");(n.exports=function(m,g,x,b){var E=b?!!b.unsafe:!1,I=b?!!b.enumerable:!1,C=b?!!b.noTargetGet:!1;if(typeof x=="function"&&(typeof g=="string"&&!l(x,"name")&&i(x,"name",g),p(x).source=y.join(typeof g=="string"?g:"")),m===o){I?m[g]=x:u(g,x);return}else E?!C&&m[g]&&(I=!0):delete m[g];I?m[g]=x:i(m,g,x)})(Function.prototype,"toString",function(){return typeof this=="function"&&h(this).source||f(this)})},"6f53":function(n,c,t){var o=t("83ab"),i=t("df75"),l=t("fc6a"),u=t("d1e7").f,f=function(v){return function(h){for(var p=l(h),y=i(p),m=y.length,g=0,x=[],b;m>g;)b=y[g++],(!o||u.call(p,b))&&x.push(v?[b,p[b]]:p[b]);return x}};n.exports={entries:f(!0),values:f(!1)}},"73d9":function(n,c,t){var o=t("44d2");o("flatMap")},7418:function(n,c){c.f=Object.getOwnPropertySymbols},"746f":function(n,c,t){var o=t("428f"),i=t("5135"),l=t("e538"),u=t("9bf2").f;n.exports=function(f){var v=o.Symbol||(o.Symbol={});i(v,f)||u(v,f,{value:l.f(f)})}},7839:function(n,c){n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(n,c,t){var o=t("1d80");n.exports=function(i){return Object(o(i))}},"7c73":function(n,c,t){var o=t("825a"),i=t("37e8"),l=t("7839"),u=t("d012"),f=t("1be4"),v=t("cc12"),h=t("f772"),p=">",y="<",m="prototype",g="script",x=h("IE_PROTO"),b=function(){},E=function(S){return y+g+p+S+y+"/"+g+p},I=function(S){S.write(E("")),S.close();var P=S.parentWindow.Object;return S=null,P},C=function(){var S=v("iframe"),P="java"+g+":",M;return S.style.display="none",f.appendChild(S),S.src=String(P),M=S.contentWindow.document,M.open(),M.write(E("document.F=Object")),M.close(),M.F},N,R=function(){try{N=document.domain&&new ActiveXObject("htmlfile")}catch{}R=N?I(N):C();for(var S=l.length;S--;)delete R[m][l[S]];return R()};u[x]=!0,n.exports=Object.create||function(P,M){var j;return P!==null?(b[m]=o(P),j=new b,b[m]=null,j[x]=P):j=R(),M===void 0?j:i(j,M)}},"7dd0":function(n,c,t){var o=t("23e7"),i=t("9ed3"),l=t("e163"),u=t("d2bb"),f=t("d44e"),v=t("9112"),h=t("6eeb"),p=t("b622"),y=t("c430"),m=t("3f8c"),g=t("ae93"),x=g.IteratorPrototype,b=g.BUGGY_SAFARI_ITERATORS,E=p("iterator"),I="keys",C="values",N="entries",R=function(){return this};n.exports=function(S,P,M,j,D,w,X){i(M,P,j);var L=function($t){if($t===D&&at)return at;if(!b&&$t in _)return _[$t];switch($t){case I:return function(){return new M(this,$t)};case C:return function(){return new M(this,$t)};case N:return function(){return new M(this,$t)}}return function(){return new M(this)}},Y=P+" Iterator",st=!1,_=S.prototype,G=_[E]||_["@@iterator"]||D&&_[D],at=!b&&G||L(D),pt=P=="Array"&&_.entries||G,Tt,ht,St;if(pt&&(Tt=l(pt.call(new S)),x!==Object.prototype&&Tt.next&&(!y&&l(Tt)!==x&&(u?u(Tt,x):typeof Tt[E]!="function"&&v(Tt,E,R)),f(Tt,Y,!0,!0),y&&(m[Y]=R))),D==C&&G&&G.name!==C&&(st=!0,at=function(){return G.call(this)}),(!y||X)&&_[E]!==at&&v(_,E,at),m[P]=at,D)if(ht={values:L(C),keys:w?at:L(I),entries:L(N)},X)for(St in ht)(b||st||!(St in _))&&h(_,St,ht[St]);else o({target:P,proto:!0,forced:b||st},ht);return ht}},"7f9a":function(n,c,t){var o=t("da84"),i=t("8925"),l=o.WeakMap;n.exports=typeof l=="function"&&/native code/.test(i(l))},"825a":function(n,c,t){var o=t("861d");n.exports=function(i){if(!o(i))throw TypeError(String(i)+" is not an object");return i}},"83ab":function(n,c,t){var o=t("d039");n.exports=!o(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(n,c,t){var o=t("c04e"),i=t("9bf2"),l=t("5c6c");n.exports=function(u,f,v){var h=o(f);h in u?i.f(u,h,l(0,v)):u[h]=v}},"861d":function(n,c){n.exports=function(t){return typeof t=="object"?t!==null:typeof t=="function"}},8875:function(n,c,t){var o,i,l;(function(u,f){i=[],o=f,l=typeof o=="function"?o.apply(c,i):o,l!==void 0&&(n.exports=l)})(typeof self<"u"?self:this,function(){function u(){var f=Object.getOwnPropertyDescriptor(document,"currentScript");if(!f&&"currentScript"in document&&document.currentScript||f&&f.get!==u&&document.currentScript)return document.currentScript;try{throw new Error}catch(N){var v=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,h=/@([^@]*):(\d+):(\d+)\s*$/ig,p=v.exec(N.stack)||h.exec(N.stack),y=p&&p[1]||!1,m=p&&p[2]||!1,g=document.location.href.replace(document.location.hash,""),x,b,E,I=document.getElementsByTagName("script");y===g&&(x=document.documentElement.outerHTML,b=new RegExp("(?:[^\\n]+?\\n){0,"+(m-2)+"}[^<]* + + + +
+ + +