38 lines
49 KiB
JavaScript
38 lines
49 KiB
JavaScript
"use strict";(self["webpackChunkwordhelper"]=self["webpackChunkwordhelper"]||[]).push([[774],{7023:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525);
|
||
/**
|
||
* @license lucide-vue-next v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const r=(0,n.A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},19629:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525);
|
||
/**
|
||
* @license lucide-vue-next v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const r=(0,n.A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},38307:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525);
|
||
/**
|
||
* @license lucide-vue-next v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const r=(0,n.A)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]])},55727:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525);
|
||
/**
|
||
* @license lucide-vue-next v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const r=(0,n.A)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},58774:function(e,t,o){o.r(t),o.d(t,{default:function(){return Ye}});o(44114),o(18111),o(20116),o(61701);var n=o(56768),r=o(90144),a=o(24232),i=o(45130),l=o(98728),s=o(97387),c=o(95802),d=o(19629),u=o(7023),p=o(55727),v=o(96530),h=o(62784),g=o(38307),m=o(54880),f=o(68042),b=o(42517),w=o(71168),y=o(34707),x=o(84279),C=(0,n.pM)({name:"Forward",render(){return(0,n.h)("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M7.73271 4.20694C8.03263 3.92125 8.50737 3.93279 8.79306 4.23271L13.7944 9.48318C14.0703 9.77285 14.0703 10.2281 13.7944 10.5178L8.79306 15.7682C8.50737 16.0681 8.03263 16.0797 7.73271 15.794C7.43279 15.5083 7.42125 15.0336 7.70694 14.7336L12.2155 10.0005L7.70694 5.26729C7.42125 4.96737 7.43279 4.49264 7.73271 4.20694Z",fill:"currentColor"}))}}),k=(0,n.pM)({name:"Backward",render(){return(0,n.h)("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M12.2674 15.793C11.9675 16.0787 11.4927 16.0672 11.2071 15.7673L6.20572 10.5168C5.9298 10.2271 5.9298 9.7719 6.20572 9.48223L11.2071 4.23177C11.4927 3.93184 11.9675 3.92031 12.2674 4.206C12.5673 4.49169 12.5789 4.96642 12.2932 5.26634L7.78458 9.99952L12.2932 14.7327C12.5789 15.0326 12.5673 15.5074 12.2674 15.793Z",fill:"currentColor"}))}}),F=(0,n.pM)({name:"FastBackward",render(){return(0,n.h)("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,n.h)("g",{fill:"currentColor","fill-rule":"nonzero"},(0,n.h)("path",{d:"M8.73171,16.7949 C9.03264,17.0795 9.50733,17.0663 9.79196,16.7654 C10.0766,16.4644 10.0634,15.9897 9.76243,15.7051 L4.52339,10.75 L17.2471,10.75 C17.6613,10.75 17.9971,10.4142 17.9971,10 C17.9971,9.58579 17.6613,9.25 17.2471,9.25 L4.52112,9.25 L9.76243,4.29275 C10.0634,4.00812 10.0766,3.53343 9.79196,3.2325 C9.50733,2.93156 9.03264,2.91834 8.73171,3.20297 L2.31449,9.27241 C2.14819,9.4297 2.04819,9.62981 2.01448,9.8386 C2.00308,9.89058 1.99707,9.94459 1.99707,10 C1.99707,10.0576 2.00356,10.1137 2.01585,10.1675 C2.05084,10.3733 2.15039,10.5702 2.31449,10.7254 L8.73171,16.7949 Z"}))))}}),A=(0,n.pM)({name:"FastForward",render(){return(0,n.h)("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,n.h)("g",{fill:"currentColor","fill-rule":"nonzero"},(0,n.h)("path",{d:"M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z"}))))}}),z=(0,n.pM)({name:"More",render(){return(0,n.h)("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,n.h)("g",{fill:"currentColor","fill-rule":"nonzero"},(0,n.h)("path",{d:"M4,7 C4.55228,7 5,7.44772 5,8 C5,8.55229 4.55228,9 4,9 C3.44772,9 3,8.55229 3,8 C3,7.44772 3.44772,7 4,7 Z M8,7 C8.55229,7 9,7.44772 9,8 C9,8.55229 8.55229,9 8,9 C7.44772,9 7,8.55229 7,8 C7,7.44772 7.44772,7 8,7 Z M12,7 C12.5523,7 13,7.44772 13,8 C13,8.55229 12.5523,9 12,9 C11.4477,9 11,8.55229 11,8 C11,7.44772 11.4477,7 12,7 Z"}))))}}),P=o(79882),B=o(88733),M=o(82813),R=o(25216),S=o(38741),I=o(62334);const T={tiny:"mini",small:"tiny",medium:"small",large:"medium",huge:"large"};function _(e){const t=T[e];if(void 0===t)throw new Error(`${e} has no smaller size.`);return t}var j=o(37901),E=o(34350),$=o(25972),L=o(93913),O=o(86866),W=o(91462),N=o(41519),H=o(94035),K=o(36921),U=o(11766),V=o(77727);const D=(0,V.D)("n-popselect");o(7588);var Q=o(11336),X=o(47794),q=o(44650),J=o(52126),Y=o(28828),Z=(0,E.cB)("popselect-menu","\n box-shadow: var(--n-menu-box-shadow);\n");const G={multiple:Boolean,value:{type:[String,Number,Array],default:null},cancelable:Boolean,options:{type:Array,default:()=>[]},size:{type:String,default:"medium"},scrollable:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onMouseenter:Function,onMouseleave:Function,renderLabel:Function,showCheckmark:{type:Boolean,default:void 0},nodeProps:Function,virtualScroll:Boolean,onChange:[Function,Array]},ee=(0,J.Y)(G);var te=(0,n.pM)({name:"PopselectPanel",props:G,setup(e){const t=(0,n.WQ)(D),{mergedClsPrefixRef:o,inlineThemeDisabled:a}=(0,B.Ay)(e),i=(0,P.A)("Popselect","-pop-select",Z,U.A,t.props,o),l=(0,n.EW)(()=>(0,X.G)(e.options,(0,Y.ag)("value","children")));function s(t,o){const{onUpdateValue:n,"onUpdate:value":r,onChange:a}=e;n&&(0,j.T)(n,t,o),r&&(0,j.T)(r,t,o),a&&(0,j.T)(a,t,o)}function c(e){u(e.key)}function d(e){(0,Q.d)(e,"action")||(0,Q.d)(e,"empty")||(0,Q.d)(e,"header")||e.preventDefault()}function u(o){const{value:{getNode:r}}=l;if(e.multiple)if(Array.isArray(e.value)){const t=[],n=[];let a=!0;e.value.forEach(e=>{if(e===o)return void(a=!1);const i=r(e);i&&(t.push(i.key),n.push(i.rawNode))}),a&&(t.push(o),n.push(r(o).rawNode)),s(t,n)}else{const e=r(o);e&&s([o],[e.rawNode])}else if(e.value===o&&e.cancelable)s(null,null);else{const e=r(o);e&&s(o,e.rawNode);const{"onUpdate:show":n,onUpdateShow:a}=t.props;n&&(0,j.T)(n,!1),a&&(0,j.T)(a,!1),t.setShow(!1)}(0,n.dY)(()=>{t.syncPosition()})}(0,n.wB)((0,r.lW)(e,"options"),()=>{(0,n.dY)(()=>{t.syncPosition()})});const p=(0,n.EW)(()=>{const{self:{menuBoxShadow:e}}=i.value;return{"--n-menu-box-shadow":e}}),v=a?(0,R.R)("select",void 0,p,t.props):void 0;return{mergedTheme:t.mergedThemeRef,mergedClsPrefix:o,treeMate:l,handleToggle:c,handleMenuMousedown:d,cssVars:a?void 0:p,themeClass:null===v||void 0===v?void 0:v.themeClass,onRender:null===v||void 0===v?void 0:v.onRender}},render(){var e;return null===(e=this.onRender)||void 0===e||e.call(this),(0,n.h)(q.A,{clsPrefix:this.mergedClsPrefix,focusable:!0,nodeProps:this.nodeProps,class:[`${this.mergedClsPrefix}-popselect-menu`,this.themeClass],style:this.cssVars,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,multiple:this.multiple,treeMate:this.treeMate,size:this.size,value:this.value,virtualScroll:this.virtualScroll,scrollable:this.scrollable,renderLabel:this.renderLabel,onToggle:this.handleToggle,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseenter,onMousedown:this.handleMenuMousedown,showCheckmark:this.showCheckmark},{header:()=>{var e,t;return(null===(t=(e=this.$slots).header)||void 0===t?void 0:t.call(e))||[]},action:()=>{var e,t;return(null===(t=(e=this.$slots).action)||void 0===t?void 0:t.call(e))||[]},empty:()=>{var e,t;return(null===(t=(e=this.$slots).empty)||void 0===t?void 0:t.call(e))||[]}})}});const oe=Object.assign(Object.assign(Object.assign(Object.assign({},P.A.props),(0,O.c)(K.vY,["showArrow","arrow"])),{placement:Object.assign(Object.assign({},K.vY.placement),{default:"bottom"}),trigger:{type:String,default:"hover"}}),G);var ne=(0,n.pM)({name:"Popselect",props:oe,slots:Object,inheritAttrs:!1,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=(0,B.Ay)(e),o=(0,P.A)("Popselect","-popselect",void 0,U.A,e,t),a=(0,r.KR)(null);function i(){var e;null===(e=a.value)||void 0===e||e.syncPosition()}function l(e){var t;null===(t=a.value)||void 0===t||t.setShow(e)}(0,n.Gt)(D,{props:e,mergedThemeRef:o,syncPosition:i,setShow:l});const s={syncPosition:i,setShow:l};return Object.assign(Object.assign({},s),{popoverInstRef:a,mergedTheme:o})},render(){const{mergedTheme:e}=this,t={theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:{padding:"0"},ref:"popoverInstRef",internalRenderBody:(e,t,o,r,a)=>{const{$attrs:i}=this;return(0,n.h)(te,Object.assign({},i,{class:[i.class,e],style:[i.style,...o]},(0,W.a)(this.$props,ee),{ref:(0,N.V)(t),onMouseenter:(0,H.u)([r,i.onMouseenter]),onMouseleave:(0,H.u)([a,i.onMouseleave])}),{header:()=>{var e,t;return null===(t=(e=this.$slots).header)||void 0===t?void 0:t.call(e)},action:()=>{var e,t;return null===(t=(e=this.$slots).action)||void 0===t?void 0:t.call(e)},empty:()=>{var e,t;return null===(t=(e=this.$slots).empty)||void 0===t?void 0:t.call(e)}})}};return(0,n.h)(K.Ay,Object.assign({},(0,O.c)(this.$props,ee),t,{internalDeactivateImmediately:!0}),{trigger:()=>{var e,t;return null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e)}})}}),re=o(19605),ae=o(37448);const ie="\n background: var(--n-item-color-hover);\n color: var(--n-item-text-color-hover);\n border: var(--n-item-border-hover);\n",le=[(0,E.cM)("button","\n background: var(--n-button-color-hover);\n border: var(--n-button-border-hover);\n color: var(--n-button-icon-color-hover);\n ")];var se=(0,E.cB)("pagination","\n display: flex;\n vertical-align: middle;\n font-size: var(--n-item-font-size);\n flex-wrap: nowrap;\n",[(0,E.cB)("pagination-prefix","\n display: flex;\n align-items: center;\n margin: var(--n-prefix-margin);\n "),(0,E.cB)("pagination-suffix","\n display: flex;\n align-items: center;\n margin: var(--n-suffix-margin);\n "),(0,E.c)("> *:not(:first-child)","\n margin: var(--n-item-margin);\n "),(0,E.cB)("select","\n width: var(--n-select-width);\n "),(0,E.c)("&.transition-disabled",[(0,E.cB)("pagination-item","transition: none!important;")]),(0,E.cB)("pagination-quick-jumper","\n white-space: nowrap;\n display: flex;\n color: var(--n-jumper-text-color);\n transition: color .3s var(--n-bezier);\n align-items: center;\n font-size: var(--n-jumper-font-size);\n ",[(0,E.cB)("input","\n margin: var(--n-input-margin);\n width: var(--n-input-width);\n ")]),(0,E.cB)("pagination-item","\n position: relative;\n cursor: pointer;\n user-select: none;\n -webkit-user-select: none;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n min-width: var(--n-item-size);\n height: var(--n-item-size);\n padding: var(--n-item-padding);\n background-color: var(--n-item-color);\n color: var(--n-item-text-color);\n border-radius: var(--n-item-border-radius);\n border: var(--n-item-border);\n fill: var(--n-button-icon-color);\n transition:\n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n fill .3s var(--n-bezier);\n ",[(0,E.cM)("button","\n background: var(--n-button-color);\n color: var(--n-button-icon-color);\n border: var(--n-button-border);\n padding: 0;\n ",[(0,E.cB)("base-icon","\n font-size: var(--n-button-icon-size);\n ")]),(0,E.C5)("disabled",[(0,E.cM)("hover",ie,le),(0,E.c)("&:hover",ie,le),(0,E.c)("&:active","\n background: var(--n-item-color-pressed);\n color: var(--n-item-text-color-pressed);\n border: var(--n-item-border-pressed);\n ",[(0,E.cM)("button","\n background: var(--n-button-color-pressed);\n border: var(--n-button-border-pressed);\n color: var(--n-button-icon-color-pressed);\n ")]),(0,E.cM)("active","\n background: var(--n-item-color-active);\n color: var(--n-item-text-color-active);\n border: var(--n-item-border-active);\n ",[(0,E.c)("&:hover","\n background: var(--n-item-color-active-hover);\n ")])]),(0,E.cM)("disabled","\n cursor: not-allowed;\n color: var(--n-item-text-color-disabled);\n ",[(0,E.cM)("active, button","\n background-color: var(--n-item-color-disabled);\n border: var(--n-item-border-disabled);\n ")])]),(0,E.cM)("disabled","\n cursor: not-allowed;\n ",[(0,E.cB)("pagination-quick-jumper","\n color: var(--n-jumper-text-color-disabled);\n ")]),(0,E.cM)("simple","\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n ",[(0,E.cB)("pagination-quick-jumper",[(0,E.cB)("input","\n margin: 0;\n ")])])]);function ce(e){var t;if(!e)return 10;const{defaultPageSize:o}=e;if(void 0!==o)return o;const n=null===(t=e.pageSizes)||void 0===t?void 0:t[0];return"number"===typeof n?n:(null===n||void 0===n?void 0:n.value)||10}function de(e,t,o,n){let r=!1,a=!1,i=1,l=t;if(1===t)return{hasFastBackward:!1,hasFastForward:!1,fastForwardTo:l,fastBackwardTo:i,items:[{type:"page",label:1,active:1===e,mayBeFastBackward:!1,mayBeFastForward:!1}]};if(2===t)return{hasFastBackward:!1,hasFastForward:!1,fastForwardTo:l,fastBackwardTo:i,items:[{type:"page",label:1,active:1===e,mayBeFastBackward:!1,mayBeFastForward:!1},{type:"page",label:2,active:2===e,mayBeFastBackward:!0,mayBeFastForward:!1}]};const s=1,c=t;let d=e,u=e;const p=(o-5)/2;u+=Math.ceil(p),u=Math.min(Math.max(u,s+o-3),c-2),d-=Math.floor(p),d=Math.max(Math.min(d,c-o+3),s+2);let v=!1,h=!1;d>s+2&&(v=!0),u<c-2&&(h=!0);const g=[];g.push({type:"page",label:1,active:1===e,mayBeFastBackward:!1,mayBeFastForward:!1}),v?(r=!0,i=d-1,g.push({type:"fast-backward",active:!1,label:void 0,options:n?ue(s+1,d-1):null})):c>=s+1&&g.push({type:"page",label:s+1,mayBeFastBackward:!0,mayBeFastForward:!1,active:e===s+1});for(let m=d;m<=u;++m)g.push({type:"page",label:m,mayBeFastBackward:!1,mayBeFastForward:!1,active:e===m});return h?(a=!0,l=u+1,g.push({type:"fast-forward",active:!1,label:void 0,options:n?ue(u+1,c-1):null})):u===c-2&&g[g.length-1].label!==c-1&&g.push({type:"page",mayBeFastForward:!0,mayBeFastBackward:!1,label:c-1,active:e===c-1}),g[g.length-1].label!==c&&g.push({type:"page",mayBeFastForward:!1,mayBeFastBackward:!1,label:c,active:e===c}),{hasFastBackward:r,hasFastForward:a,fastBackwardTo:i,fastForwardTo:l,items:g}}function ue(e,t){const o=[];for(let n=e;n<=t;++n)o.push({label:`${n}`,value:n});return o}const pe=Object.assign(Object.assign({},P.A.props),{simple:Boolean,page:Number,defaultPage:{type:Number,default:1},itemCount:Number,pageCount:Number,defaultPageCount:{type:Number,default:1},showSizePicker:Boolean,pageSize:Number,defaultPageSize:Number,pageSizes:{type:Array,default(){return[10]}},showQuickJumper:Boolean,size:{type:String,default:"medium"},disabled:Boolean,pageSlot:{type:Number,default:9},selectProps:Object,prev:Function,next:Function,goto:Function,prefix:Function,suffix:Function,label:Function,displayOrder:{type:Array,default:["pages","size-picker","quick-jumper"]},to:I.$.propTo,showQuickJumpDropdown:{type:Boolean,default:!0},"onUpdate:page":[Function,Array],onUpdatePage:[Function,Array],"onUpdate:pageSize":[Function,Array],onUpdatePageSize:[Function,Array],onPageSizeChange:[Function,Array],onChange:[Function,Array]});var ve=(0,n.pM)({name:"Pagination",props:pe,slots:Object,setup(e){const{mergedComponentPropsRef:t,mergedClsPrefixRef:o,inlineThemeDisabled:a,mergedRtlRef:i}=(0,B.Ay)(e),l=(0,P.A)("Pagination","-pagination",se,ae.A,e,o),{localeRef:s}=(0,M.A)("Pagination"),c=(0,r.KR)(null),d=(0,r.KR)(e.defaultPage),u=(0,r.KR)(ce(e)),p=(0,y.A)((0,r.lW)(e,"page"),d),v=(0,y.A)((0,r.lW)(e,"pageSize"),u),h=(0,n.EW)(()=>{const{itemCount:t}=e;if(void 0!==t)return Math.max(1,Math.ceil(t/v.value));const{pageCount:o}=e;return void 0!==o?Math.max(o,1):1}),g=(0,r.KR)("");(0,n.nT)(()=>{e.simple,g.value=String(p.value)});const m=(0,r.KR)(!1),f=(0,r.KR)(!1),b=(0,r.KR)(!1),w=(0,r.KR)(!1),x=()=>{e.disabled||(m.value=!0,H())},C=()=>{e.disabled||(m.value=!1,H())},k=()=>{f.value=!0,H()},F=()=>{f.value=!1,H()},A=e=>{K(e)},z=(0,n.EW)(()=>de(p.value,h.value,e.pageSlot,e.showQuickJumpDropdown));(0,n.nT)(()=>{z.value.hasFastBackward?z.value.hasFastForward||(m.value=!1,b.value=!1):(f.value=!1,w.value=!1)});const I=(0,n.EW)(()=>{const t=s.value.selectionSuffix;return e.pageSizes.map(e=>"number"===typeof e?{label:`${e} / ${t}`,value:e}:e)}),T=(0,n.EW)(()=>{var o,n;return(null===(n=null===(o=null===t||void 0===t?void 0:t.value)||void 0===o?void 0:o.Pagination)||void 0===n?void 0:n.inputSize)||_(e.size)}),$=(0,n.EW)(()=>{var o,n;return(null===(n=null===(o=null===t||void 0===t?void 0:t.value)||void 0===o?void 0:o.Pagination)||void 0===n?void 0:n.selectSize)||_(e.size)}),L=(0,n.EW)(()=>(p.value-1)*v.value),O=(0,n.EW)(()=>{const t=p.value*v.value-1,{itemCount:o}=e;return void 0!==o&&t>o-1?o-1:t}),W=(0,n.EW)(()=>{const{itemCount:t}=e;return void 0!==t?t:(e.pageCount||1)*v.value}),N=(0,S.I)("Pagination",i,o);function H(){(0,n.dY)(()=>{var e;const{value:t}=c;t&&(t.classList.add("transition-disabled"),null===(e=c.value)||void 0===e||e.offsetWidth,t.classList.remove("transition-disabled"))})}function K(t){if(t===p.value)return;const{"onUpdate:page":o,onUpdatePage:n,onChange:r,simple:a}=e;o&&(0,j.T)(o,t),n&&(0,j.T)(n,t),r&&(0,j.T)(r,t),d.value=t,a&&(g.value=String(t))}function U(t){if(t===v.value)return;const{"onUpdate:pageSize":o,onUpdatePageSize:n,onPageSizeChange:r}=e;o&&(0,j.T)(o,t),n&&(0,j.T)(n,t),r&&(0,j.T)(r,t),u.value=t,h.value<p.value&&K(h.value)}function V(){if(e.disabled)return;const t=Math.min(p.value+1,h.value);K(t)}function D(){if(e.disabled)return;const t=Math.max(p.value-1,1);K(t)}function Q(){if(e.disabled)return;const t=Math.min(z.value.fastForwardTo,h.value);K(t)}function X(){if(e.disabled)return;const t=Math.max(z.value.fastBackwardTo,1);K(t)}function q(e){U(e)}function J(){const t=Number.parseInt(g.value);Number.isNaN(t)||(K(Math.max(1,Math.min(t,h.value))),e.simple||(g.value=""))}function Y(){J()}function Z(t){if(!e.disabled)switch(t.type){case"page":K(t.label);break;case"fast-backward":X();break;case"fast-forward":Q();break}}function G(e){g.value=e.replace(/\D+/g,"")}(0,n.nT)(()=>{p.value,v.value,H()});const ee=(0,n.EW)(()=>{const{size:t}=e,{self:{buttonBorder:o,buttonBorderHover:n,buttonBorderPressed:r,buttonIconColor:a,buttonIconColorHover:i,buttonIconColorPressed:s,itemTextColor:c,itemTextColorHover:d,itemTextColorPressed:u,itemTextColorActive:p,itemTextColorDisabled:v,itemColor:h,itemColorHover:g,itemColorPressed:m,itemColorActive:f,itemColorActiveHover:b,itemColorDisabled:w,itemBorder:y,itemBorderHover:x,itemBorderPressed:C,itemBorderActive:k,itemBorderDisabled:F,itemBorderRadius:A,jumperTextColor:z,jumperTextColorDisabled:P,buttonColor:B,buttonColorHover:M,buttonColorPressed:R,[(0,E.cF)("itemPadding",t)]:S,[(0,E.cF)("itemMargin",t)]:I,[(0,E.cF)("inputWidth",t)]:T,[(0,E.cF)("selectWidth",t)]:_,[(0,E.cF)("inputMargin",t)]:j,[(0,E.cF)("selectMargin",t)]:$,[(0,E.cF)("jumperFontSize",t)]:L,[(0,E.cF)("prefixMargin",t)]:O,[(0,E.cF)("suffixMargin",t)]:W,[(0,E.cF)("itemSize",t)]:N,[(0,E.cF)("buttonIconSize",t)]:H,[(0,E.cF)("itemFontSize",t)]:K,[`${(0,E.cF)("itemMargin",t)}Rtl`]:U,[`${(0,E.cF)("inputMargin",t)}Rtl`]:V},common:{cubicBezierEaseInOut:D}}=l.value;return{"--n-prefix-margin":O,"--n-suffix-margin":W,"--n-item-font-size":K,"--n-select-width":_,"--n-select-margin":$,"--n-input-width":T,"--n-input-margin":j,"--n-input-margin-rtl":V,"--n-item-size":N,"--n-item-text-color":c,"--n-item-text-color-disabled":v,"--n-item-text-color-hover":d,"--n-item-text-color-active":p,"--n-item-text-color-pressed":u,"--n-item-color":h,"--n-item-color-hover":g,"--n-item-color-disabled":w,"--n-item-color-active":f,"--n-item-color-active-hover":b,"--n-item-color-pressed":m,"--n-item-border":y,"--n-item-border-hover":x,"--n-item-border-disabled":F,"--n-item-border-active":k,"--n-item-border-pressed":C,"--n-item-padding":S,"--n-item-border-radius":A,"--n-bezier":D,"--n-jumper-font-size":L,"--n-jumper-text-color":z,"--n-jumper-text-color-disabled":P,"--n-item-margin":I,"--n-item-margin-rtl":U,"--n-button-icon-size":H,"--n-button-icon-color":a,"--n-button-icon-color-hover":i,"--n-button-icon-color-pressed":s,"--n-button-color-hover":M,"--n-button-color":B,"--n-button-color-pressed":R,"--n-button-border":o,"--n-button-border-hover":n,"--n-button-border-pressed":r}}),te=a?(0,R.R)("pagination",(0,n.EW)(()=>{let t="";const{size:o}=e;return t+=o[0],t}),ee,e):void 0;return{rtlEnabled:N,mergedClsPrefix:o,locale:s,selfRef:c,mergedPage:p,pageItems:(0,n.EW)(()=>z.value.items),mergedItemCount:W,jumperValue:g,pageSizeOptions:I,mergedPageSize:v,inputSize:T,selectSize:$,mergedTheme:l,mergedPageCount:h,startIndex:L,endIndex:O,showFastForwardMenu:b,showFastBackwardMenu:w,fastForwardActive:m,fastBackwardActive:f,handleMenuSelect:A,handleFastForwardMouseenter:x,handleFastForwardMouseleave:C,handleFastBackwardMouseenter:k,handleFastBackwardMouseleave:F,handleJumperInput:G,handleBackwardClick:D,handleForwardClick:V,handlePageItemClick:Z,handleSizePickerChange:q,handleQuickJumperChange:Y,cssVars:a?void 0:ee,themeClass:null===te||void 0===te?void 0:te.themeClass,onRender:null===te||void 0===te?void 0:te.onRender}},render(){const{$slots:e,mergedClsPrefix:t,disabled:o,cssVars:r,mergedPage:a,mergedPageCount:i,pageItems:l,showSizePicker:s,showQuickJumper:c,mergedTheme:d,locale:u,inputSize:p,selectSize:v,mergedPageSize:h,pageSizeOptions:g,jumperValue:m,simple:f,prev:b,next:w,prefix:y,suffix:P,label:B,goto:M,handleJumperInput:R,handleSizePickerChange:S,handleBackwardClick:I,handlePageItemClick:T,handleForwardClick:_,handleQuickJumperChange:j,onRender:E}=this;null===E||void 0===E||E();const O=y||e.prefix,W=P||e.suffix,N=b||e.prev,H=w||e.next,K=B||e.label;return(0,n.h)("div",{ref:"selfRef",class:[`${t}-pagination`,this.themeClass,this.rtlEnabled&&`${t}-pagination--rtl`,o&&`${t}-pagination--disabled`,f&&`${t}-pagination--simple`],style:r},O?(0,n.h)("div",{class:`${t}-pagination-prefix`},O({page:a,pageSize:h,pageCount:i,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount})):null,this.displayOrder.map(e=>{switch(e){case"pages":return(0,n.h)(n.FK,null,(0,n.h)("div",{class:[`${t}-pagination-item`,!N&&`${t}-pagination-item--button`,(a<=1||a>i||o)&&`${t}-pagination-item--disabled`],onClick:I},N?N({page:a,pageSize:h,pageCount:i,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount}):(0,n.h)(x.A,{clsPrefix:t},{default:()=>this.rtlEnabled?(0,n.h)(C,null):(0,n.h)(k,null)})),f?(0,n.h)(n.FK,null,(0,n.h)("div",{class:`${t}-pagination-quick-jumper`},(0,n.h)(L.A,{value:m,onUpdateValue:R,size:p,placeholder:"",disabled:o,theme:d.peers.Input,themeOverrides:d.peerOverrides.Input,onChange:j}))," /"," ",i):l.map((e,r)=>{let a,i,l;const{type:s}=e;switch(s){case"page":const o=e.label;a=K?K({type:"page",node:o,active:e.active}):o;break;case"fast-forward":const r=this.fastForwardActive?(0,n.h)(x.A,{clsPrefix:t},{default:()=>this.rtlEnabled?(0,n.h)(F,null):(0,n.h)(A,null)}):(0,n.h)(x.A,{clsPrefix:t},{default:()=>(0,n.h)(z,null)});a=K?K({type:"fast-forward",node:r,active:this.fastForwardActive||this.showFastForwardMenu}):r,i=this.handleFastForwardMouseenter,l=this.handleFastForwardMouseleave;break;case"fast-backward":const s=this.fastBackwardActive?(0,n.h)(x.A,{clsPrefix:t},{default:()=>this.rtlEnabled?(0,n.h)(A,null):(0,n.h)(F,null)}):(0,n.h)(x.A,{clsPrefix:t},{default:()=>(0,n.h)(z,null)});a=K?K({type:"fast-backward",node:s,active:this.fastBackwardActive||this.showFastBackwardMenu}):s,i=this.handleFastBackwardMouseenter,l=this.handleFastBackwardMouseleave;break}const c=(0,n.h)("div",{key:r,class:[`${t}-pagination-item`,e.active&&`${t}-pagination-item--active`,"page"!==s&&("fast-backward"===s&&this.showFastBackwardMenu||"fast-forward"===s&&this.showFastForwardMenu)&&`${t}-pagination-item--hover`,o&&`${t}-pagination-item--disabled`,"page"===s&&`${t}-pagination-item--clickable`],onClick:()=>{T(e)},onMouseenter:i,onMouseleave:l},a);if("page"!==s||e.mayBeFastBackward||e.mayBeFastForward){const t="page"===e.type?e.mayBeFastBackward?"fast-backward":"fast-forward":e.type;return"page"===e.type||e.options?(0,n.h)(ne,{to:this.to,key:t,disabled:o,trigger:"hover",virtualScroll:!0,style:{width:"60px"},theme:d.peers.Popselect,themeOverrides:d.peerOverrides.Popselect,builtinThemeOverrides:{peers:{InternalSelectMenu:{height:"calc(var(--n-option-height) * 4.6)"}}},nodeProps:()=>({style:{justifyContent:"center"}}),show:"page"!==s&&("fast-backward"===s?this.showFastBackwardMenu:this.showFastForwardMenu),onUpdateShow:e=>{"page"!==s&&(e?"fast-backward"===s?this.showFastBackwardMenu=e:this.showFastForwardMenu=e:(this.showFastBackwardMenu=!1,this.showFastForwardMenu=!1))},options:"page"!==e.type&&e.options?e.options:[],onUpdateValue:this.handleMenuSelect,scrollable:!0,showCheckmark:!1},{default:()=>c}):c}return c}),(0,n.h)("div",{class:[`${t}-pagination-item`,!H&&`${t}-pagination-item--button`,{[`${t}-pagination-item--disabled`]:a<1||a>=i||o}],onClick:_},H?H({page:a,pageSize:h,pageCount:i,itemCount:this.mergedItemCount,startIndex:this.startIndex,endIndex:this.endIndex}):(0,n.h)(x.A,{clsPrefix:t},{default:()=>this.rtlEnabled?(0,n.h)(k,null):(0,n.h)(C,null)})));case"size-picker":return!f&&s?(0,n.h)(re.A,Object.assign({consistentMenuWidth:!1,placeholder:"",showCheckmark:!1,to:this.to},this.selectProps,{size:v,options:g,value:h,disabled:o,theme:d.peers.Select,themeOverrides:d.peerOverrides.Select,onUpdateValue:S})):null;case"quick-jumper":return!f&&c?(0,n.h)("div",{class:`${t}-pagination-quick-jumper`},M?M():(0,$.Nj)(this.$slots.goto,()=>[u.goto]),(0,n.h)(L.A,{value:m,onUpdateValue:R,size:p,placeholder:"",disabled:o,theme:d.peers.Input,themeOverrides:d.peerOverrides.Input,onChange:j})):null;default:return null}}),W?(0,n.h)("div",{class:`${t}-pagination-suffix`},W({page:a,pageSize:h,pageCount:i,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount})):null)}}),he=o(48129),ge=o(64498),me=o(35720);const fe={class:"note-mng-view max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},be={class:"mb-8 flex items-center justify-between",initial:{opacity:0,y:-20},enter:{opacity:1,y:0,transition:{duration:500}}},we={class:"flex items-center gap-3"},ye={class:"p-3 bg-primary/10 rounded-xl"},xe={class:"text-sm text-gray-500 dark:text-gray-400 mt-1"},Ce={key:0,class:"flex justify-center py-12"},ke={key:1},Fe={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},Ae=["enter"],ze=["onClick"],Pe={class:"flex items-center justify-between mb-2"},Be={class:"text-xl font-bold text-gray-900 dark:text-white group-hover:text-primary transition-colors"},Me={class:"flex items-center gap-2 text-xs text-gray-400"},Re={key:0},Se={key:0,class:"text-sm text-gray-600 dark:text-gray-300 line-clamp-1"},Ie={class:"font-mono text-xs opacity-70"},Te={class:"flex-grow bg-yellow-50/50 dark:bg-yellow-900/5 rounded-lg p-3 mb-4"},_e={class:"text-gray-700 dark:text-gray-300 whitespace-pre-wrap text-sm leading-relaxed"},je={class:"flex items-center justify-between pt-2 mt-auto border-t border-gray-100 dark:border-gray-700/50"},Ee={class:"text-xs text-gray-400 flex items-center gap-1"},$e={class:"flex items-center gap-2 opacity-100 sm:opacity-0 group-hover:opacity-100 transition-opacity"},Le={class:"flex justify-center mt-12 mb-8"},Oe={key:2,class:"flex flex-col items-center justify-center py-20 text-center"},We={class:"bg-gray-100 dark:bg-gray-800 p-6 rounded-full mb-4"},Ne={class:"mb-4"},He={class:"text-lg font-bold text-gray-900 dark:text-white mb-1"},Ke={class:"text-sm text-gray-500"},Ue={key:0},Ve={class:"flex justify-end gap-2"},De={class:"space-y-4"},Qe={class:"flex justify-end gap-2"};var Xe={__name:"NoteMngView",setup(e){const t=(0,l.rd)(),o=(0,s.J)(),y=(0,r.KR)(!1),x=(0,r.KR)([]),C=(0,r.KR)(0),k=(0,r.KR)(1),F=(0,r.KR)(1),A=(0,r.KR)(9),z=(0,r.KR)(!1),P=(0,r.KR)(!1),B=(0,r.KR)(null),M=(0,r.KR)({content:""}),R=(0,r.KR)(!1),S=(0,r.KR)(!1),I=(0,r.KR)({word_id:null,content:""}),T=(0,r.KR)([]),_=(0,r.KR)(!1),j=async(e=1)=>{y.value=!0;try{const t=await me.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/note/list",{params:{page:e,limit:A.value}}),o=t.data;x.value=o.list||[],o.pagination&&(C.value=o.pagination.total_items,k.value=o.pagination.total_pages,F.value=o.pagination.current_page)}catch(t){console.error("Fetch notes failed:",t),o.error("获取笔记列表失败")}finally{y.value=!1}},E=e=>{j(e),window.scrollTo({top:0,behavior:"smooth"})},$=e=>{const o=t.resolve({name:"word-detail",query:{word_id:e}});window.open(o.href,"_blank")},O=e=>{B.value=e,M.value.content=e.content,z.value=!0},W=async()=>{if(M.value.content.trim()){P.value=!0;try{const e={word_id:B.value.word_id,content:M.value.content,note_id:B.value.id},t=await me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/note",e);o.success(t.data.message||"保存成功"),z.value=!1;const n=x.value.find(e=>e.id===B.value.id);n&&(n.content=M.value.content,n.updated_at=(new Date).toISOString())}catch(e){console.error("Save note failed:",e),o.error("保存笔记失败")}finally{P.value=!1}}else o.warning("笔记内容不能为空")},N=async e=>{try{const t=await me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/del_note",{note_id:e});o.success(t.data.message||"删除成功"),1===x.value.length&&F.value>1?j(F.value-1):j(F.value)}catch(t){console.error("Delete note failed:",t),o.error("删除笔记失败")}},H=()=>{I.value={word_id:null,content:""},T.value=[],R.value=!0},K=async e=>{if(e){_.value=!0;try{const t=await me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/search",{keyword:e,page:1,limit:5}),o=t.data;T.value=(o.list||[]).map(e=>({label:e.word,value:e.id}))}catch(t){console.error("Search failed:",t)}finally{_.value=!1}}else T.value=[]},U=async()=>{if(I.value.word_id)if(I.value.content.trim()){S.value=!0;try{const e={word_id:I.value.word_id,content:I.value.content},t=await me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/detail/note",e);o.success(t.data.message||"添加成功"),R.value=!1,j(1)}catch(e){console.error("Add note failed:",e),o.error("添加笔记失败")}finally{S.value=!1}}else o.warning("笔记内容不能为空");else o.warning("请选择一个单词")};return(0,n.sV)(()=>{document.title="我的笔记 - Word Helper",j()}),(e,t)=>{const o=(0,n.gN)("motion");return(0,n.uX)(),(0,n.CE)("div",fe,[(0,n.bo)(((0,n.uX)(),(0,n.CE)("div",be,[(0,n.Lk)("div",we,[(0,n.Lk)("div",ye,[(0,n.bF)((0,r.R1)(c.A),{class:"w-6 h-6 text-primary"})]),(0,n.Lk)("div",null,[t[10]||(t[10]=(0,n.Lk)("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"我的笔记",-1)),(0,n.Lk)("p",xe," 共 "+(0,a.v_)(C.value)+" 条笔记 ",1)])]),(0,n.bF)((0,r.R1)(m.Ay),{type:"primary",onClick:H},{icon:(0,n.k6)(()=>[(0,n.bF)((0,r.R1)(d.A),{class:"w-4 h-4"})]),default:(0,n.k6)(()=>[t[11]||(t[11]=(0,n.eW)(" 快速添加 ",-1))]),_:1})])),[[o]]),y.value&&0===x.value.length?((0,n.uX)(),(0,n.CE)("div",Ce,[(0,n.bF)((0,r.R1)(f.A),{size:"large"})])):x.value.length>0?((0,n.uX)(),(0,n.CE)("div",ke,[(0,n.Lk)("div",Fe,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(x.value,(e,l)=>(0,n.bo)(((0,n.uX)(),(0,n.CE)("div",{key:e.id,initial:{opacity:0,y:20},enter:{opacity:1,y:0,transition:{delay:50*l}},class:"group relative flex flex-col h-full"},[(0,n.bF)((0,r.R1)(b.Ay),{class:"h-full rounded-xl shadow-sm hover:shadow-md transition-all duration-300 dark:bg-gray-800 border-l-4 border-l-primary",bordered:!1,"content-style":"display: flex; flex-direction: column; height: 100%;"},{default:(0,n.k6)(()=>[(0,n.Lk)("div",{class:"mb-4 cursor-pointer",onClick:t=>$(e.word_id)},[(0,n.Lk)("div",Pe,[(0,n.Lk)("h3",Be,(0,a.v_)(e.word),1),(0,n.Lk)("div",Me,[e.us_accent?((0,n.uX)(),(0,n.CE)("span",Re,"美 ["+(0,a.v_)(e.us_accent)+"]",1)):(0,n.Q3)("",!0),(0,n.bF)((0,r.R1)(u.A),{class:"w-3 h-3 opacity-0 group-hover:opacity-100 transition-opacity"})])]),e.translations&&e.translations.length>0?((0,n.uX)(),(0,n.CE)("div",Se,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.translations.slice(0,2),(e,t)=>((0,n.uX)(),(0,n.CE)("span",{key:t,class:"mr-2"},[(0,n.Lk)("span",Ie,(0,a.v_)(e.pos),1),(0,n.eW)(" "+(0,a.v_)(e.meaning),1)]))),128))])):(0,n.Q3)("",!0)],8,ze),(0,n.Lk)("div",Te,[(0,n.Lk)("p",_e,(0,a.v_)(e.content),1)]),(0,n.Lk)("div",je,[(0,n.Lk)("div",Ee,[(0,n.bF)((0,r.R1)(p.A),{class:"w-3 h-3"}),(0,n.eW)(" "+(0,a.v_)(new Date(e.updated_at).toLocaleDateString()),1)]),(0,n.Lk)("div",$e,[(0,n.bF)((0,r.R1)(m.Ay),{size:"tiny",secondary:"",circle:"",type:"primary",onClick:(0,i.D$)(t=>O(e),["stop"])},{icon:(0,n.k6)(()=>[(0,n.bF)((0,r.R1)(v.A),{class:"w-3 h-3"})]),_:1},8,["onClick"]),(0,n.bF)((0,r.R1)(w.A),{onPositiveClick:t=>N(e.id)},{trigger:(0,n.k6)(()=>[(0,n.bF)((0,r.R1)(m.Ay),{size:"tiny",secondary:"",circle:"",type:"error",onClick:t[0]||(t[0]=(0,i.D$)(()=>{},["stop"]))},{icon:(0,n.k6)(()=>[(0,n.bF)((0,r.R1)(h.A),{class:"w-3 h-3"})]),_:1})]),default:(0,n.k6)(()=>[t[12]||(t[12]=(0,n.eW)(" 确定要删除这条笔记吗? ",-1))]),_:1},8,["onPositiveClick"])])])]),_:2},1024)],8,Ae)),[[o]])),128))]),(0,n.Lk)("div",Le,[(0,n.bF)((0,r.R1)(ve),{page:F.value,"onUpdate:page":[t[1]||(t[1]=e=>F.value=e),E],"page-count":k.value,"page-size":A.value},null,8,["page","page-count","page-size"])])])):((0,n.uX)(),(0,n.CE)("div",Oe,[(0,n.Lk)("div",We,[(0,n.bF)((0,r.R1)(g.A),{class:"w-12 h-12 text-gray-400"})]),t[14]||(t[14]=(0,n.Lk)("h3",{class:"text-lg font-medium text-gray-900 dark:text-white mb-2"},"还没有笔记",-1)),t[15]||(t[15]=(0,n.Lk)("p",{class:"text-gray-500 mb-3 dark:text-gray-400 max-w-sm"}," 随时记录你的心得体会和助记方法 ",-1)),(0,n.bF)((0,r.R1)(m.Ay),{class:"mt-6",type:"primary",onClick:t[2]||(t[2]=t=>e.$router.push("/dict"))},{default:(0,n.k6)(()=>[...t[13]||(t[13]=[(0,n.eW)(" 去学习 ",-1)])]),_:1})])),(0,n.bF)((0,r.R1)(he.A),{show:z.value,"onUpdate:show":t[5]||(t[5]=e=>z.value=e),preset:"card",title:"编辑笔记",class:"w-full max-w-lg"},{footer:(0,n.k6)(()=>[(0,n.Lk)("div",Ve,[(0,n.bF)((0,r.R1)(m.Ay),{onClick:t[4]||(t[4]=e=>z.value=!1)},{default:(0,n.k6)(()=>[...t[16]||(t[16]=[(0,n.eW)("取消",-1)])]),_:1}),(0,n.bF)((0,r.R1)(m.Ay),{type:"primary",loading:P.value,onClick:W},{default:(0,n.k6)(()=>[...t[17]||(t[17]=[(0,n.eW)("保存",-1)])]),_:1},8,["loading"])])]),default:(0,n.k6)(()=>[(0,n.Lk)("div",Ne,[(0,n.Lk)("div",He,(0,a.v_)(B.value?.word),1),(0,n.Lk)("div",Ke,[B.value?.translations&&B.value.translations.length>0?((0,n.uX)(),(0,n.CE)("span",Ue,(0,a.v_)(B.value.translations[0].meaning),1)):(0,n.Q3)("",!0)])]),(0,n.bF)((0,r.R1)(L.A),{value:M.value.content,"onUpdate:value":t[3]||(t[3]=e=>M.value.content=e),type:"textarea",placeholder:"记录你的学习心得...",autosize:{minRows:4,maxRows:8}},null,8,["value"])]),_:1},8,["show"]),(0,n.bF)((0,r.R1)(he.A),{show:R.value,"onUpdate:show":t[9]||(t[9]=e=>R.value=e),preset:"card",title:"快速添加笔记",class:"w-full max-w-lg"},{footer:(0,n.k6)(()=>[(0,n.Lk)("div",Qe,[(0,n.bF)((0,r.R1)(m.Ay),{onClick:t[8]||(t[8]=e=>R.value=!1)},{default:(0,n.k6)(()=>[...t[21]||(t[21]=[(0,n.eW)("取消",-1)])]),_:1}),(0,n.bF)((0,r.R1)(m.Ay),{type:"primary",loading:S.value,onClick:U},{default:(0,n.k6)(()=>[...t[22]||(t[22]=[(0,n.eW)("保存",-1)])]),_:1},8,["loading"])])]),default:(0,n.k6)(()=>[(0,n.bF)((0,r.R1)(ge.A),{type:"warning",class:"mb-6","show-icon":""},{default:(0,n.k6)(()=>[...t[18]||(t[18]=[(0,n.eW)(" 如果此单词下已有笔记,此处输入的内容将替换原笔记内容,原笔记内容不会保存。 ",-1)])]),_:1}),(0,n.Lk)("div",De,[(0,n.Lk)("div",null,[t[19]||(t[19]=(0,n.Lk)("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"选择单词",-1)),(0,n.bF)((0,r.R1)(re.A),{value:I.value.word_id,"onUpdate:value":t[6]||(t[6]=e=>I.value.word_id=e),filterable:"",remote:"",placeholder:"输入单词搜索...",options:T.value,loading:_.value,onSearch:K,clearable:""},null,8,["value","options","loading"])]),(0,n.Lk)("div",null,[t[20]||(t[20]=(0,n.Lk)("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"笔记内容",-1)),(0,n.bF)((0,r.R1)(L.A),{value:I.value.content,"onUpdate:value":t[7]||(t[7]=e=>I.value.content=e),type:"textarea",placeholder:"记录你的学习心得...",autosize:{minRows:4,maxRows:8}},null,8,["value"])])])]),_:1},8,["show"])])}}},qe=o(71241);const Je=(0,qe.A)(Xe,[["__scopeId","data-v-0f0ff0fe"]]);var Ye=Je},62784:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525);
|
||
/**
|
||
* @license lucide-vue-next v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const r=(0,n.A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},64498:function(e,t,o){o.d(t,{A:function(){return B}});var n=o(55472),r=o(56768),a=o(90144),i=o(55405),l=o(81260),s=o(84279),c=o(4660),d=o(31603),u=o(73921),p=o(98351),v=o(79882),h=o(88733),g=o(25216),m=o(38741),f=o(34350),b=o(25972),w=o(13707),y=o(64075),x=o(98659);function C(e){const{lineHeight:t,borderRadius:o,fontWeightStrong:n,baseColor:r,dividerColor:a,actionColor:i,textColor1:l,textColor2:s,closeColorHover:c,closeColorPressed:d,closeIconColor:u,closeIconColorHover:p,closeIconColorPressed:v,infoColor:h,successColor:g,warningColor:m,errorColor:f,fontSize:b}=e;return Object.assign(Object.assign({},x.A),{fontSize:b,lineHeight:t,titleFontWeight:n,borderRadius:o,border:`1px solid ${a}`,color:i,titleTextColor:l,iconColor:s,contentTextColor:s,closeBorderRadius:o,closeColorHover:c,closeColorPressed:d,closeIconColor:u,closeIconColorHover:p,closeIconColorPressed:v,borderInfo:`1px solid ${(0,w.sN)(r,(0,w.QX)(h,{alpha:.25}))}`,colorInfo:(0,w.sN)(r,(0,w.QX)(h,{alpha:.08})),titleTextColorInfo:l,iconColorInfo:h,contentTextColorInfo:s,closeColorHoverInfo:c,closeColorPressedInfo:d,closeIconColorInfo:u,closeIconColorHoverInfo:p,closeIconColorPressedInfo:v,borderSuccess:`1px solid ${(0,w.sN)(r,(0,w.QX)(g,{alpha:.25}))}`,colorSuccess:(0,w.sN)(r,(0,w.QX)(g,{alpha:.08})),titleTextColorSuccess:l,iconColorSuccess:g,contentTextColorSuccess:s,closeColorHoverSuccess:c,closeColorPressedSuccess:d,closeIconColorSuccess:u,closeIconColorHoverSuccess:p,closeIconColorPressedSuccess:v,borderWarning:`1px solid ${(0,w.sN)(r,(0,w.QX)(m,{alpha:.33}))}`,colorWarning:(0,w.sN)(r,(0,w.QX)(m,{alpha:.08})),titleTextColorWarning:l,iconColorWarning:m,contentTextColorWarning:s,closeColorHoverWarning:c,closeColorPressedWarning:d,closeIconColorWarning:u,closeIconColorHoverWarning:p,closeIconColorPressedWarning:v,borderError:`1px solid ${(0,w.sN)(r,(0,w.QX)(f,{alpha:.25}))}`,colorError:(0,w.sN)(r,(0,w.QX)(f,{alpha:.08})),titleTextColorError:l,iconColorError:f,contentTextColorError:s,closeColorHoverError:c,closeColorPressedError:d,closeIconColorError:u,closeIconColorHoverError:p,closeIconColorPressedError:v})}const k={name:"Alert",common:y.A,self:C};var F=k,A=o(92548),z=(0,f.cB)("alert","\n line-height: var(--n-line-height);\n border-radius: var(--n-border-radius);\n position: relative;\n transition: background-color .3s var(--n-bezier);\n background-color: var(--n-color);\n text-align: start;\n word-break: break-word;\n",[(0,f.cE)("border","\n border-radius: inherit;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n transition: border-color .3s var(--n-bezier);\n border: var(--n-border);\n pointer-events: none;\n "),(0,f.cM)("closable",[(0,f.cB)("alert-body",[(0,f.cE)("title","\n padding-right: 24px;\n ")])]),(0,f.cE)("icon",{color:"var(--n-icon-color)"}),(0,f.cB)("alert-body",{padding:"var(--n-padding)"},[(0,f.cE)("title",{color:"var(--n-title-text-color)"}),(0,f.cE)("content",{color:"var(--n-content-text-color)"})]),(0,A._)({originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.9)"}}),(0,f.cE)("icon","\n position: absolute;\n left: 0;\n top: 0;\n align-items: center;\n justify-content: center;\n display: flex;\n width: var(--n-icon-size);\n height: var(--n-icon-size);\n font-size: var(--n-icon-size);\n margin: var(--n-icon-margin);\n "),(0,f.cE)("close","\n transition:\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n position: absolute;\n right: 0;\n top: 0;\n margin: var(--n-close-margin);\n "),(0,f.cM)("show-icon",[(0,f.cB)("alert-body",{paddingLeft:"calc(var(--n-icon-margin-left) + var(--n-icon-size) + var(--n-icon-margin-right))"})]),(0,f.cM)("right-adjust",[(0,f.cB)("alert-body",{paddingRight:"calc(var(--n-close-size) + var(--n-padding) + 2px)"})]),(0,f.cB)("alert-body","\n border-radius: var(--n-border-radius);\n transition: border-color .3s var(--n-bezier);\n ",[(0,f.cE)("title","\n transition: color .3s var(--n-bezier);\n font-size: 16px;\n line-height: 19px;\n font-weight: var(--n-title-font-weight);\n ",[(0,f.c)("& +",[(0,f.cE)("content",{marginTop:"9px"})])]),(0,f.cE)("content",{transition:"color .3s var(--n-bezier)",fontSize:"var(--n-font-size)"})]),(0,f.cE)("icon",{transition:"color .3s var(--n-bezier)"})]);const P=Object.assign(Object.assign({},v.A.props),{title:String,showIcon:{type:Boolean,default:!0},type:{type:String,default:"default"},bordered:{type:Boolean,default:!0},closable:Boolean,onClose:Function,onAfterLeave:Function,onAfterHide:Function});var B=(0,r.pM)({name:"Alert",inheritAttrs:!1,props:P,slots:Object,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:o,inlineThemeDisabled:i,mergedRtlRef:l}=(0,h.Ay)(e),s=(0,v.A)("Alert","-alert",z,F,e,t),c=(0,m.I)("Alert",l,t),d=(0,r.EW)(()=>{const{common:{cubicBezierEaseInOut:t},self:o}=s.value,{fontSize:r,borderRadius:a,titleFontWeight:i,lineHeight:l,iconSize:c,iconMargin:d,iconMarginRtl:u,closeIconSize:p,closeBorderRadius:v,closeSize:h,closeMargin:g,closeMarginRtl:m,padding:b}=o,{type:w}=e,{left:y,right:x}=(0,n.Tj)(d);return{"--n-bezier":t,"--n-color":o[(0,f.cF)("color",w)],"--n-close-icon-size":p,"--n-close-border-radius":v,"--n-close-color-hover":o[(0,f.cF)("closeColorHover",w)],"--n-close-color-pressed":o[(0,f.cF)("closeColorPressed",w)],"--n-close-icon-color":o[(0,f.cF)("closeIconColor",w)],"--n-close-icon-color-hover":o[(0,f.cF)("closeIconColorHover",w)],"--n-close-icon-color-pressed":o[(0,f.cF)("closeIconColorPressed",w)],"--n-icon-color":o[(0,f.cF)("iconColor",w)],"--n-border":o[(0,f.cF)("border",w)],"--n-title-text-color":o[(0,f.cF)("titleTextColor",w)],"--n-content-text-color":o[(0,f.cF)("contentTextColor",w)],"--n-line-height":l,"--n-border-radius":a,"--n-font-size":r,"--n-title-font-weight":i,"--n-icon-size":c,"--n-icon-margin":d,"--n-icon-margin-rtl":u,"--n-close-size":h,"--n-close-margin":g,"--n-close-margin-rtl":m,"--n-padding":b,"--n-icon-margin-left":y,"--n-icon-margin-right":x}}),u=i?(0,g.R)("alert",(0,r.EW)(()=>e.type[0]),d,e):void 0,p=(0,a.KR)(!0),b=()=>{const{onAfterLeave:t,onAfterHide:o}=e;t&&t(),o&&o()},w=()=>{var t;Promise.resolve(null===(t=e.onClose)||void 0===t?void 0:t.call(e)).then(e=>{!1!==e&&(p.value=!1)})},y=()=>{b()};return{rtlEnabled:c,mergedClsPrefix:t,mergedBordered:o,visible:p,handleCloseClick:w,handleAfterLeave:y,mergedTheme:s,cssVars:i?void 0:d,themeClass:null===u||void 0===u?void 0:u.themeClass,onRender:null===u||void 0===u?void 0:u.onRender}},render(){var e;return null===(e=this.onRender)||void 0===e||e.call(this),(0,r.h)(i.A,{onAfterLeave:this.handleAfterLeave},{default:()=>{const{mergedClsPrefix:e,$slots:t}=this,o={class:[`${e}-alert`,this.themeClass,this.closable&&`${e}-alert--closable`,this.showIcon&&`${e}-alert--show-icon`,!this.title&&this.closable&&`${e}-alert--right-adjust`,this.rtlEnabled&&`${e}-alert--rtl`],style:this.cssVars,role:"alert"};return this.visible?(0,r.h)("div",Object.assign({},(0,r.v6)(this.$attrs,o)),this.closable&&(0,r.h)(l.A,{clsPrefix:e,class:`${e}-alert__close`,onClick:this.handleCloseClick}),this.bordered&&(0,r.h)("div",{class:`${e}-alert__border`}),this.showIcon&&(0,r.h)("div",{class:`${e}-alert__icon`,"aria-hidden":"true"},(0,b.Nj)(t.icon,()=>[(0,r.h)(s.A,{clsPrefix:e},{default:()=>{switch(this.type){case"success":return(0,r.h)(c.A,null);case"info":return(0,r.h)(d.A,null);case"warning":return(0,r.h)(u.A,null);case"error":return(0,r.h)(p.A,null);default:return null}}})])),(0,r.h)("div",{class:[`${e}-alert-body`,this.mergedBordered&&`${e}-alert-body--bordered`]},(0,b.iQ)(t.header,t=>{const o=t||this.title;return o?(0,r.h)("div",{class:`${e}-alert-body__title`},o):null}),t.default&&(0,r.h)("div",{class:`${e}-alert-body__content`},t))):null}})}})},71168:function(e,t,o){o.d(t,{A:function(){return P}});var n=o(56768),r=o(90144),a=o(79882),i=o(88733),l=o(37901),s=o(86866),c=o(91462),d=o(36921),u=o(29767),p=o(77727);const v=(0,p.D)("n-popconfirm");var h=o(84279),g=o(73921),m=o(82813),f=o(25216),b=o(52126),w=o(25972),y=o(54880);const x={positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0}},C=(0,b.Y)(x);var k=(0,n.pM)({name:"NPopconfirmPanel",props:x,setup(e){const{localeRef:t}=(0,m.A)("Popconfirm"),{inlineThemeDisabled:o}=(0,i.Ay)(),{mergedClsPrefixRef:a,mergedThemeRef:l,props:s}=(0,n.WQ)(v),c=(0,n.EW)(()=>{const{common:{cubicBezierEaseInOut:e},self:{fontSize:t,iconSize:o,iconColor:n}}=l.value;return{"--n-bezier":e,"--n-font-size":t,"--n-icon-size":o,"--n-icon-color":n}}),d=o?(0,f.R)("popconfirm-panel",void 0,c,s):void 0;return Object.assign(Object.assign({},(0,m.A)("Popconfirm")),{mergedClsPrefix:a,cssVars:o?void 0:c,localizedPositiveText:(0,n.EW)(()=>e.positiveText||t.value.positiveText),localizedNegativeText:(0,n.EW)(()=>e.negativeText||t.value.negativeText),positiveButtonProps:(0,r.lW)(s,"positiveButtonProps"),negativeButtonProps:(0,r.lW)(s,"negativeButtonProps"),handlePositiveClick(t){e.onPositiveClick(t)},handleNegativeClick(t){e.onNegativeClick(t)},themeClass:null===d||void 0===d?void 0:d.themeClass,onRender:null===d||void 0===d?void 0:d.onRender})},render(){var e;const{mergedClsPrefix:t,showIcon:o,$slots:r}=this,a=(0,w.Nj)(r.action,()=>null===this.negativeText&&null===this.positiveText?[]:[null!==this.negativeText&&(0,n.h)(y.Ay,Object.assign({size:"small",onClick:this.handleNegativeClick},this.negativeButtonProps),{default:()=>this.localizedNegativeText}),null!==this.positiveText&&(0,n.h)(y.Ay,Object.assign({size:"small",type:"primary",onClick:this.handlePositiveClick},this.positiveButtonProps),{default:()=>this.localizedPositiveText})]);return null===(e=this.onRender)||void 0===e||e.call(this),(0,n.h)("div",{class:[`${t}-popconfirm__panel`,this.themeClass],style:this.cssVars},(0,w.iQ)(r.default,e=>o||e?(0,n.h)("div",{class:`${t}-popconfirm__body`},o?(0,n.h)("div",{class:`${t}-popconfirm__icon`},(0,w.Nj)(r.icon,()=>[(0,n.h)(h.A,{clsPrefix:t},{default:()=>(0,n.h)(g.A,null)})])):null,e):null),a?(0,n.h)("div",{class:[`${t}-popconfirm__action`]},a):null)}}),F=o(34350),A=(0,F.cB)("popconfirm",[(0,F.cE)("body","\n font-size: var(--n-font-size);\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n position: relative;\n ",[(0,F.cE)("icon","\n display: flex;\n font-size: var(--n-icon-size);\n color: var(--n-icon-color);\n transition: color .3s var(--n-bezier);\n margin: 0 8px 0 0;\n ")]),(0,F.cE)("action","\n display: flex;\n justify-content: flex-end;\n ",[(0,F.c)("&:not(:first-child)","margin-top: 8px"),(0,F.cB)("button",[(0,F.c)("&:not(:last-child)","margin-right: 8px;")])])]);const z=Object.assign(Object.assign(Object.assign({},a.A.props),d.vY),{positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},trigger:{type:String,default:"click"},positiveButtonProps:Object,negativeButtonProps:Object,onPositiveClick:Function,onNegativeClick:Function});var P=(0,n.pM)({name:"Popconfirm",props:z,slots:Object,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=(0,i.Ay)(),o=(0,a.A)("Popconfirm","-popconfirm",A,u.A,e,t),s=(0,r.KR)(null);function c(t){var o;if(!(null===(o=s.value)||void 0===o?void 0:o.getMergedShow()))return;const{onPositiveClick:n,"onUpdate:show":r}=e;Promise.resolve(!n||n(t)).then(e=>{var t;!1!==e&&(null===(t=s.value)||void 0===t||t.setShow(!1),r&&(0,l.T)(r,!1))})}function d(t){var o;if(!(null===(o=s.value)||void 0===o?void 0:o.getMergedShow()))return;const{onNegativeClick:n,"onUpdate:show":r}=e;Promise.resolve(!n||n(t)).then(e=>{var t;!1!==e&&(null===(t=s.value)||void 0===t||t.setShow(!1),r&&(0,l.T)(r,!1))})}(0,n.Gt)(v,{mergedThemeRef:o,mergedClsPrefixRef:t,props:e});const p={setShow(e){var t;null===(t=s.value)||void 0===t||t.setShow(e)},syncPosition(){var e;null===(e=s.value)||void 0===e||e.syncPosition()},mergedTheme:o,popoverInstRef:s,handlePositiveClick:c,handleNegativeClick:d};return p},render(){const{$slots:e,$props:t,mergedTheme:o}=this;return(0,n.h)(d.Ay,Object.assign({},(0,s.c)(t,C),{theme:o.peers.Popover,themeOverrides:o.peerOverrides.Popover,internalExtraClass:["popconfirm"],ref:"popoverInstRef"}),{trigger:e.trigger,default:()=>{const o=(0,c.a)(t,C);return(0,n.h)(k,Object.assign({},o,{onPositiveClick:this.handlePositiveClick,onNegativeClick:this.handleNegativeClick}),e)}})}})},96530:function(e,t,o){o.d(t,{A:function(){return r}});var n=o(45525);
|
||
/**
|
||
* @license lucide-vue-next v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const r=(0,n.A)("pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]])}}]);
|
||
//# sourceMappingURL=774.e1ca78ab.js.map
|